版权声明:未经博主允许不得转载 https://blog.csdn.net/qq_40962368/article/details/83316230
问题:UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
warn("The default mode, 'constant', will be changed to 'reflect' in "
skimage.transform.resize(image, output_shape, order=1, mode=None, cval=0, clip=True,
preserve_range=False)
这是一个图片重新塑造尺寸大小的函数,和OpenCV中的resize差不多。
mode参数解释:
mode : {'constant', 'edge', 'symmetric', 'reflect', 'wrap'}, optional Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of `numpy.pad`. The default mode is 'constant'.
输入边界之外的点按照所给定的模式进行填充,模式匹配“numpy.pad”的行为,默认模式是“constant”。
解决办法:
使用警告(userwarning)中说,默认模式将会被改变为“reflect”,所以,在函数进行参数设置时,直接将mode设置为constant就可以了。即: