I'm trying to implement a bicubic interpolation algorithm. In order to calculate the interpolated values, I need to calculate sixteen coefficients used in the calculation process - and that's where I'm stumped.
So far I've tried to use the calculation methods for univariate functions as explained by Paul Bourke in his article on interpolation methods, calculating the coefficients for each vertical coordinate individually, using this data to determine the function values at the selected Y coordinate, using those values to calculate the coefficients for the given slice of the function and calculate the function value for the given X coordinate. This technically works, but does not give the same results as expected.
Using the first coefficient calculation method described by Bourke, the image is closer overall but includes visible artifacts: http://i.stack.imgur.com/gT500.png
Using Catmull-Rom splines (as described by Bourke), image is smoother but differs far more from the example I'm trying to recreate): http://i.stack.imgur.com/R2de6.png
"A Review of Some Image Pixel Interpolation Algorithms" by Don Lancaster and the Wikipedia article on bicubic interpolation show decidedly different results using same data values.
Both describe what (I assume) should be the correct way of calculating the coefficients - the final formula itself is pretty clear, but relies on determining several partial derivatives and cross products.
It has been several years since I had calculus and while I understand what a partial derivative is, I no longer remember how to actually calculate it from given function values. I'm completely clueless as to the cross products - the subject might not have been actually covered during the calculus and linear algebra courses I took.
I'd appreciate advice as to how I should proceed to properly determine those values.