2
$\begingroup$

From a book, I learned that image interpolation (or upsampling) can be written as a convolution like this: $$g(i,j) = \sum_{(x,y)}f(x,y)h(i-rx,j-ry)$$ while $r$ is the upsampling rate.

But I have a time understanding this formula, since AFAIK, the basic idea of image interpolation is to bring near-by pixels into consideration, so I thought a convolution like below might suffice: $$g(i,j) = \sum_{(x,y)}f(x,y)h(i-x,j-y)$$ What is the point of $r$ in the formula?

$\endgroup$
1
$\begingroup$

Image interpolation is not (exactly) the same as upsampling. Suppose that you have a grid $\Lambda$ which is a $640 \times 480$ grid of pixels. Each pixel has a location $(x,y) \in \Lambda$. Each pixel also has an intensity $I(x,y)$. This could be a gray-scale value or an RGB triplet. Now suppose that you want to know the intensity of a location that is not centered on one of the pixels. For example, suppose that you wanted the intensity at location $(17.35, 188.42)$. In this case, you would use the neighboring integer pixel intensities in an appropriate interpolation scheme (nearest neighbor, bilinear, bicubic, Lanczos etc.) to get the sub-pixel intensity. This is image interpolation.

Image upsampling is when you want to go from a grid $\Lambda$ that is $640 \times 480$ to a larger grid $\Gamma$ that is for example, $1280 \times 960$ pixels. In such a case, a simple algorithm is create the new grid filled with zeros. Then, if there is a pixel value in the original image at $(x,y)$, then take its intensity I(x,y) and fill it in the upsampled image at $I'(2x,2y)$. The $2$ is the $r$ (rate) referred in your formula. Then, we use an appropriate kernel (the $h$ in your formula) to filter the image and complete the upsampling. NOTE: This is a simple explanation. Please see Gozalez, Woods and Eddins, Digital Image Processing for a better treatment.

$\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.