How to implement sub-pixel linear interpolation in matlab?
古いコメントを表示
The problem is quite clear, but I really don't know where to start.
Assuming this is a gray scale image, the black dot(not the rectangle) is the pixel. For example, x0 is a pixel, it has a x-y location (say (70, 82) ) and a gray value. And I have a direction value(say 135 degree) for pixel x0.
I want to do the linear interpolation along the direction from x0, the method is using the two nearest pixels' gray value. For example, I want to get x's value, the two nearest pixels around x is a and b.
I only want to interpolate pixels on the direction line, and either it's x-coordinate value or y-coordinate value is integer, like the red dots on this picture.
I think my function's input should be a gray scale image, start point x0's coordinate location, a direction value, and a range value to limit how many red dot's I want to get, and output should be the interpolated gray scale values for these red dots.
Thanks for your advices.

採用された回答
その他の回答 (1 件)
Alex Taylor
2015 年 6 月 18 日
2 投票
Out of curiosity, why not just use interp2 in MATLAB? Just pass in the image and the x,y query points and you are done.
カテゴリ
ヘルプ センター および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!