我正在创建一个彩色灰度图像来显示图像块的分类。我需要使用零阶对低分辨率分类图像进行上采样以匹配原始图像大小。
When I use skimage.transform.rescale(I,16,order=0)
, I get the desired result:
However, when I use scipy.ndimage.zoom(I,16,order=0)
, I get the following image with misalignment of the upsampled classification blocks and the original image patches (note the non-square blocks at the edges):
My questions are:
- 这是预期的行为吗?
- 为什么有区别?
我可以看到zoom
行为导致了意想不到的悲伤,因为我只是在这里注意到它与明显的块未对齐。
[编辑1]:也许相关的问题 https://stackoverflow.com/questions/33721988/scipy-ndimage-zoom-result-depends-on-image-size.
[编辑2]:应该能够拉这个仓库 http://github.com/jessexknight/bayes-texture并运行 python main.py,并在顶部注释(标记)两个导入之一。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)