Bicubic interpolation artifacts (image upscale)
bicubic, c++, image-processing, image-resizing, interpolation
Solution
second derivative of cubic B-Spline is continuous while that of bicubic interpolation is not.
http://en.wikipedia.org/wiki/Spline_interpolation http://en.wikipedia.org/wiki/Cubic_interpolation
https://math.stackexchange.com/questions/485935/piecewise-interpolation-with-derivatives-that-is-also-twice-differentiable
Problem
I am using a bicubic interpolation algorithm in order to upscale an height map, and I am noticing some artifacts around the pixels boundaries. However, these artifacts don't seem to appear when I use a simple cubic interpolation (spline). Could it be because the bicubic interpolation doesn't guarantee the second derivative to be continuous, unlike the cubic spline ? If so, is there known algorithms that have a continuous second derivative ? Otherwise, is there a way to deal with these artifacts ? Linear interpolation (shows the pixels boundaries): Bicubic interpolation (artifacts visible at pixels boundaries): Cubic interpolation (no noticeable artifacts): I tried several bicubic formulas, which gave me the same results. Here are some examples: - http://paulbourke.net/miscellaneous/interpolation - http://www.paulinternet.nl/?page=bicubic Edit: I made some searches and found that B-Spline have a continuous C2 (also suggested by Bharat). I implemented it and it looks fine, even if it's an approximation and not an interpolation (it doesn't go through the samples). B-spline (approximation):