3
$\begingroup$

Computational Science people:

The title is the question: exactly how does Matlab's "interp2" command (with the "cubic" option) perform bicubic interpolation? I tried the Mathworks documentation online and I couldn't find the answer there. I found a nice Wikipedia article at http://en.wikipedia.org/wiki/Bicubic_interpolation , but it describes an algorithm that requires values of $f$, $f_x$, $f_y$, and $f_{xy}$, while "interp2" requires only function values, not derivatives. Maybe Matlab estimates the partial derivatives somehow, but I don't know.

My apologies if the answer actually is in the Mathworks documentation, but I looked pretty hard and I couldn't find it.

$\endgroup$
  • 3
    $\begingroup$ The usefulness of edit depends on whether it is implemented in matlab or not. Sometimes matlab calls functions written in other languages, which it does not have the source code from. In those cases, you may or may not find useful information. it is always worth a shot though. $\endgroup$ – Godric Seer Sep 23 '13 at 2:01
  • $\begingroup$ I think the question may be of interest to someone else in the future, so it's worth keeping it in the site. If nobody comes up with a better answer, then I'll appreciate if you accept mine. $\endgroup$ – Juan M. Bello-Rivas Sep 23 '13 at 20:34
5
$\begingroup$

Running the command edit interp2 allows you to see the source code of this particular function and then you can read the piece of code that deals with bicubic interpolation. In MATLAB R2011, there is even a paper being cited: "Cubic Convolution Interpolation for Digital Image Processing", Robert G. Keys, IEEE Trans. on Acoustics, Speech, and Signal Processing, Vol. 29, No. 6, Dec. 1981, pp. 1153-1160.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.