what exact interpolator is 'cubic'?

1 次查看(过去 30 天)
Image Processing Toolbox, 'imwarp' offers interpolator 'nearest', 'linear' or 'cubic'. It seems the 'cubic' is based on a Catmull-Rom interpolator, can you confirm this? I've backtracked a systematic bias error in my code to originate from the pixel interpolator, 'linear' is no better and 'nearest' is not an option, ideally I'd prefer a plain 'B-spline' (with no negative values in the kernel), what are the chances of supporting custom interpolators (as in the old imtransform)?

采纳的回答

Alex Taylor
Alex Taylor 2016-4-4
编辑:Alex Taylor 2016-4-4
Yes, 'cubic' is based on the Catmull-Rom cubic kernel. I agree the documentation for imwarp should be more explicit about this.
As for the "bias" in your code, I assume you mean an unexpected spatial bias? If so, I'd recommend working with floating point data and using 'linear' and go with a very simple geometric transformation like a half-pixel translation to narrow down the source of the issue. This should reveal where the problem is. You could go even simpler and work with a 1-D test "image" to really simplify things. I don't see how working with any of the cubic kernels makes a debugging issue related to interpolation easier since there are more neighbors to account for, but maybe I'm missing something about your particular problem.
Custom interpolants were a very rarely used feature of imtransform, so we did not include them in imwarp, but we could consider this moving forward. We could also consider other explicit cubic interpolation algorithms like B-spline moving fowrard.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Splines 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by