How it works : Bilinear interpolation for image resizing

8 visualizaciones (últimos 30 días)
Binny
Binny el 2 de Sept. de 2019
Comentada: Rik el 3 de Sept. de 2019
How image resizing bilinear interpolation works in matlab? What neighborhood it considers? How it measures distance between pixel and its neighbors? Exactly which kernel and which equations it follows? Thanks in advance!
  6 comentarios
Jan
Jan el 3 de Sept. de 2019
Editada: Jan el 3 de Sept. de 2019
At least in R2009b there have been M-fucntions for imresize and even the C-codes e.g. for the Lanczos method.
@Rik: What is the problem with "neighborhood"? The documentations say:
Bilinear interpolation; the output pixel value is a weighted average
of pixels in the nearest 2-by-2 neighborhood
As far as I understand, this interpolation uses the value of a pixel, if it exists exactly in the input, but for all other cases, there are 2x2 surrounding pixels in the input for each pixel in the output, which are used for the interpolation. Sounds like a 2x2 neighborhood.
Rik
Rik el 3 de Sept. de 2019
My problem with the term neighborhood is probably that I tend to use it in the context of integer positions. It does make sort of sense to extend it this way, so maybe it is just the fact that I have never heard the term be used this way.
My main contact with the term is in the context of region growing and moving window operations.

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 3 de Sept. de 2019
According the the documentation:
"the output pixel value is a weighted average of pixels in the nearest 2-by-2 neighborhood"
The only detail, which is not explained, it the weighting factors. But according to the standard definition, the distances are used for weighting.

Community Treasure Hunt

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

Start Hunting!

Translated by