フィルターのクリア

How do I get windows of several feature points in an image, and return the intensity of all the pixels in that window?

2 ビュー (過去 30 日間)
Hi! I have a image (2d double array) and a bunch of feature points (x and y coordinates, bule crosses in the image). Now I want to get 5-by-5 windows of those feature points in an image, and return the intensity of all the pixels in that window. I know "meshgrid" is a good function, but I failed. Is there any build-in function in matlab I can use or what should I do to meet the requirement? Thank you very much.
Say M*N is the size of the image, X1 and Y1 are the coordinates of the cross points

回答 (1 件)

Mann Baidi
Mann Baidi 2023 年 9 月 11 日
Hi Yuhong,
I understand that you want to get the intensity of pixel of a 5x5 window size window at specific pixels. For this we can try out the following code:
value = I(y, x);
values = I(y-5:y+5, x-5:x+5);
The “values” will contain the intensity of the pixels in the window.
Hope this helps!

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by