cubic B-spline:
cubic o-Moms:
1. 测试了上面3种方法的upscale,效果上linear<<cubic key<cubic Bspline<cubic oMoms, 并且结果清晰的提升效果越来越弱,最后BSpline与oMoms区别已经很弱了。
2. 但从[3]oMoms文献里的图表显示omoms会比Bspline提高比较多,这点与我的实现有差异,暂没明白问题在哪。
3. 实现中linear,cubic key是一类算法,Bspline omoms是另一类,后一类算法不能直接使用函数进行插值,需要额外增加一步prefilter的操作,先计算出控制点,然后才是计算插值,否则结果反而会变得模糊。(这也是paper[4]里提到的,许多人误操作cubic Bspline,然后误认为其效果too blur)
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
最近与faststone比对上采样效果,发现faststone里提供的所有算法中,cubic效果最好,其次lanczos。faststone里的cubic算法可能是另一种不知名算法,与里面的其它算法出来的图片中心点有所区别,像是不是一个体系的算法。
除开这个不知名cubic算法,最好的算法还是omom>spline>lanczos>cubic。faststone实现的spline效果明显是有问题的,太糊了。
omom spline算法耗时上比cubic多了个prefilter过程,这个过程paper里说不算主体耗时,那是扯淡,估计测试的时候他们都是从小图放大到大图,然后在小图上算prefilter,那肯定不耗时了。
如果考虑warp情况,src与dst的尺寸相当,那么prefilter还是挺耗时的,需额外来回遍历4次大图。如果考虑小图到大图,那src图尺寸越小,prefilter耗时越忽略不计,此时omom与spline耗时与cubic性能基本一致,大约为双线性的2倍左右,主体时间还是花在遍历内存上,计算时间用查表去除(这里的性能考虑的是有规律的插值,如上采样可以查表预计算,如果是warp,由于插值不规律,那计算还是挺耗时的)
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[1] Thévenaz P, Blu T, Unser M. Image interpolation and resampling[J]. Handbook of medical imaging, processing and analysis, 2000, 1(1): 393-420
[2] R. Keys (1981). "Cubic convolution interpolation for digital image processing". IEEE Transactions on Acoustics, Speech, and Signal Processing. 29 (6): 1153–1160. Bibcode:1981ITASS..29.1153K. CiteSeerX 10.1.1.320.776. doi:10.1109/TASSP.1981.1163711.
[3] T. Blu, P. Thévenaz and M. Unser, "Minimum Support Interpolators with Optimum
Approximation Properties," in Proc. IEEE International Conference on Image Processing,
Chicago, Illinois, U.S.A., October 4–7, 1998, pp. WA06.10.
[4] Unser M. Splines: A perfect fit for signal and image processing[J]. IEEE Signal processing magazine, 1999, 16(6): 22-38.
https://pixinsight.com/doc/tools/ImageIntegration/ImageIntegration.html