what exact interpolator is 'cubic'?

5 ビュー (過去 30 日間)
Bo 2016 年 4 月 4 日
編集済み: Alex Taylor 2016 年 4 月 4 日
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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by