Ask Your Question
0

Why bicubic interpolation uses a 4x4 pixels neighborhood?

asked 2017-02-05 19:55:00 -0600

Kelvin gravatar image

Hello, I am just starting to learn about image interpolation. I already read some papers about it and I'm doing some tests applying the bicubic interpolation (INTER_CUBIC) using the resize function provided by the OpenCV library.

In 2 papers that I read, the authors wrote that the bicubic interpolation uses a neighborhood of 16x16 pixels, but in the OpenCV documentation, it says that the bicubic interpolation method uses a neighborhood of 4x4 pixels.

Doc: http://docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html

Can someone explain to me why it uses a 4x4 neighborhood? What is the main difference between using a 16x16 neighborhood and a 4x4 neighborhood?

Thanks in advance

Note: keep in mind that I'm a newbie.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2017-02-06 01:49:30 -0600

LBerger gravatar image

I cannot answer why but i can explain difference :

bicubic interpolation is a function f with 16 parameters. To solve a such system with 16 unknown you need 16 data =4x4 neigborhood. It is smallest compact neighborhood.

Using this neigborhood you are sure f(j,i)=I(j,i) I image function (j,i ) pixel of coordinate column and row

Now you can take larger neighborhood but f(j,i)<>I(j,i)

An example with y=a x^2+ b x + c , 5 datas x=[-2 -1 0 1 2]

y=[-5 -1 3 2 3.5]

Do you prefer red or green curve ?

image description

edit flag offensive delete link more

Comments

Thanks for the great explanation @LBerger.

The green curve seems to be smoother, am I right?

Kelvin gravatar imageKelvin ( 2017-02-07 08:59:16 -0600 )edit

Yes it is.

LBerger gravatar imageLBerger ( 2017-02-07 10:21:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-02-05 19:55:00 -0600

Seen: 2,853 times

Last updated: Feb 06 '17