Performs interpolation to upscale or down-scale images. For down-sampling N-dimensional images with integer factors by applying the arithmetic sum or mean, see skimage.measure.local_sum and skimage.transform.downscale_local_mean, respectively.
...
scale : {float, tuple of floats}
Scale factors. Separate scale factors can be defined as (row_scale, col_scale).
来自the documentation:
我的解释是
skimage.measure.rescale
只支持2D图像。快速尝试为每个维度传递单独的比例因子似乎可以证实这一点:如文档所述,您可以使用
skimage.transform.local_sum
或skimage.downscale_local_mean
,前提是您只需要减少一个整数因子(在您的例子中是2)。在另一种支持对非整数缩放因子使用插值的方法是^{} :
^{pr2}$相关问题 更多 >
编程相关推荐