Search code examples
mathimage-processinginterpolationbicubic

How to perform Bicubic Interpolation when not all neighbours are known?


enter image description here

Given only 4 edge values boxed in red, if I want to find out value at f(1,2) and it's nearest 16 neighbours(not sure if itself can be included?) are show in the picture, can I assign 0 values to the unknown functions and perform bicubic interpolation to derive f(1,2)?

Subsequently, with f(1,2) value derived from above, I'd use it's value in addition to the known values to calculate other unknown values.

Is my concept wrong? Can someone teach me if I'm wrong? Thanks.


Solution

  • If your substitute 0 for your unknown values you'll end up with all values ridiculously close to zero. Don't substitute anything for the unknowns, use only the actually known values to fill in the rest.

    For the filling in of the pixels, bicubic interpolation should work just fine even though you don't know all the neighbours. There is just less information. The wikipedia articles about resampling and bicubic interpolation are good starting points. If you are looking for actual implementations, try the OpenCV cvResize function.