How it works : Bilinear interpolation for image resizing

조회 수: 12 (최근 30일)
Binny
Binny 2019년 9월 2일
댓글: Rik 2019년 9월 3일
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
Jan
Jan 2019년 9월 3일
편집: Jan 2019년 9월 3일
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 2019년 9월 3일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2019년 9월 3일
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