赞
踩
- windows skimage为0.15
- windows skimage为0.14
调用skimage的transform.resize函数结果不一样
img = transform.resize(image, (224, 224), mode=‘constant’)
0.15以下版本:
输出img:[[[1. 1. 1.]
[1. 1. 1.]
[1. 1. 1.]
…
[1. 1. 1.]
[1. 1. 1.]
[1. 1. 1.]]
0.15及以上版本:
输出img:[[[0.72293417 0.72293417 0.72293417]
[0.84709384 0.84709384 0.84709384]
[0.85101541 0.85101541 0.85101541]
…
[0.85101541 0.85101541 0.85101541]
[0.84709384 0.84709384 0.84709384]
[0.72293417 0.72293417 0.72293417]]
参考样例:
from skimage import io, transform
image_name = r"pic.png"
image = io.imread(image_name)
print('src:',image.dtype)
img = transform.resize(image, (224, 224), mode='constant')
print('img:',img)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。