Row and Column Interpolations

Hi everyone,
I'm new at MATLAB and I'm trying to implement a method proposed in a paper. In that paper it says "In the second phase column interpolation is performed by using bicubic interpolated image and the filtered image obtained from the first phase.", and it also has a row interpolation version of this sentence later on. But I didn't understand what is meant by row/column interpolations. I'd be glad if you can help me with that.
Cheers,
Ozan

Answers (1)

Steve Eddins
Steve Eddins on 5 Oct 2020
Edited: Steve Eddins on 5 Oct 2020
[Update: based on the comment thread below, it appears that "column interpolation" means something different than what I wrote in this answer. I'm leaving the answer in place so that the thread will make sense.]
In image processing, "column interpolation" and "row interpolation" refer to one-dimensional interpolation operations in either the vertical or the horizontal direction. For example, suppose you have a 3x3 matrix:
>> A = magic(3)
A =
8 1 6
3 5 7
4 9 2
Suppose I want to use "column interpolation" to estimate a value for A that is halfway between A(1,1) and A(2,1). Call it A(1.5,1). Using linear interpolation between A(1,1) and A(2,1) would give 0.5*8 + 0.5*3, or 5.5.
The following call to interp1 performs 1-D interpolation down each column ("column interpolation") of A using cubic interpolation.
>> B = interp1((1:3)',A,(1:0.5:3)','cubic')
B =
8.0000 1.0000 6.0000
4.7500 3.0000 7.2500
3.0000 5.0000 7.0000
2.7500 7.0000 5.2500
4.0000 9.0000 2.0000
Now let's perform row interpolation on B. The function interp1 doesn't support a "DIM" syntax for specifying the direction of interpolation, so to get row interpolation, first transpose B, then call interp1, then transpose the result.
>> C = interp1((1:3)',B',(1:0.5:3)','cubic')'
C =
8.0000 3.0000 1.0000 2.0000 6.0000
4.7500 3.1250 3.0000 4.3750 7.2500
3.0000 4.0000 5.0000 6.0000 7.0000
2.7500 5.6250 7.0000 6.8750 5.2500
4.0000 8.0000 9.0000 7.0000 2.0000
Performing 1-D cubic interpolation in one direction, followed by 1-D cubic interpolation of the result in the other direction, is called bicubic interpolation.

8 Comments

Thanks for the fast response. I understood it in principle but I couldn't make it work for 2 matrices using interp2 function. In Mathworks' website it doesn't show how to do that in a clear way as I don't understand what to enter for the parameter 'V' since I don't have a common point for these two matrices I want to interpolate. Could you explain how I can do that?
I don't understand what you mean by "these two matrices I want to interpolate." Can you elaborate?
My goal is to implement such an interpolation illustrated in the image below. By using same elements of each matrix in terms of row and column, I want to make an interpolation
Thanks for the diagram. I believe I understand now what the authors meant by column interpolation. Based on the color coding in the three pixel arrays, I believe the array labeled "Column Interpolation" is formed by interleaving the columns from the "Bicubic Interpolation" array and the "Filtered Image" array.
The first column in the "Column Interpolation" array is the first column of the "Bicubic Interpolation" array.
The second column in the "Column Interpolation" array is the first column of the "Filtered Image" array.
The third column in the "Column Interpolation" array is the second column of the "Bicubic Interpolation" array.
The fourth column in the "Column Interpolation" array is the second column of the "Filtered Image" array.
Since none of these arrays are on a rectilinear grid, you'll have to work out your own scheme for how to store them in MATLAB arrays.
Well, from my understanding this shouldn't be the case. The lightest blue color indicates the original pixel values of Low Resolution image which is 4x4. The bicubic interpolation is done to obtain a 7x7 high resolution version of it. So I believe the array labeled as "Column Interpolation" should illustrate a 7x7 matrix.
That's why I believed that for the first column of the image at the bottom, I should interpolate the first columns of the matrices on the top. So in my opinion I should implement this by using interp2 function somehow...
Well, the "Column Interpolation" array in the diagram is clearly not 7x7. Neither is the diagram's "Bicubic Interpolation" array.
You might consider contacting the authors directly to ask for clarification.
I sent the authors an email to be sure, but the resulting matrices should be 7x7, it doesn't make any sense otherwise. I'd be glad if you can help me as if the resulting matrices are 7x7.
The diagram makes absolutely no sense to me. I'm sorry, but I don't have any idea what computation you are trying to perform.

Sign in to comment.

Categories

Find more on Interpolation in Help Center and File Exchange

Products

Release

R2020a

Asked:

on 5 Oct 2020

Commented:

on 5 Oct 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!