I want to implement the adaptive bilinear interpolation method for image upsampling given in this paper. But I am stuck on a very basic question.
imresize() in Matlab performs bilinear interpolation by taking a weighted average of pixels in the nearest 2x2 neighborhood.
I want to know how does Matlab determine this 2x2 neighborhood for the boundary pixels?
What I really want to know is how shall I determine the neighborhood for the boundary pixels in the attached paper, since each boundary will have no neighborhood in at least 1 direction, for example, the topmost row won't have any row for determining any vertical upper mask, the leftmost column won't have any column for determining any horizontal mask, and so on.
I gave the Matlab example to get an intuition about how boundary cases are solved by languages in such algorithms.