scipy/numpy中是否有预定义的函数来移动/旋转使用sincinterpolation而不是样条插值的图像?

2024-06-03 00:13:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我希望题目能很好地概括它。我有一大堆图像要注册。为此,我需要移动/旋转图像。到目前为止我用过scipy.ndimage.rotate以及scipy.ndimage.shift为了这个任务。然而,一些图像具有高阶样条插值失败(即产生振铃伪影)的尖锐强度特征。低阶(0或1)样条函数不能很好地保存图像数据。在

scipy/numpy(或任何其他包)中是否有使用sinc插值(http://en.wikipedia.org/wiki/Whittaker%E2%80%93Shannon_interpolation_formula)的内置任务?在

我自己找了一段时间安静下来,但没有找到任何简单的解决办法,如果我遗漏了一些明显的问题,请给我指出正确的方向。在


Tags: 数据函数图像numpyshiftscipy特征样条
1条回答
网友
1楼 · 发布于 2024-06-03 00:13:41

我建议使用来自imageMagik的命令行convert您可以转换整个批并控制插值方法-可用的方法有:

integer - The color of the top-left pixel (floor function).

nearest-neighbor - The nearest pixel to the lookup point (rounded function)

average - The average color of the surrounding four pixels

bilinear - A double linear interpolation of pixels (the default)

mesh - Divide area into two flat triangular interpolations

bicubic - Fitted bicubic-spines of surrounding 16 pixels

spline - Direct spline curves (colors are blurred)

filter - Use resize-filter settings

相关问题 更多 >