Needing to get the coordinates of the illuminated pixels

1 回表示 (過去 30 日間)
Antonio Cebrián
Antonio Cebrián 2017 年 4 月 5 日
編集済み: Antonio Cebrián 2017 年 4 月 6 日
Hi, I'm trying to get the coordinates of the pixels in the lit area of greyImg. Is this possible?
RGB=imread('image_0.png');
greyImg = rgb2gray(RGB);

回答 (2 件)

Thorsten
Thorsten 2017 年 4 月 5 日
You can define a threshold by visual inspection to separate the lit from the unlit pixels to get a binary image.
mythreshold = 0.55;
BW = im2bw(I, mythreshold);
idx = BW == 1; % logical index
idx = find(BW); % numerical index

Antonio Cebrián
Antonio Cebrián 2017 年 4 月 6 日
sorry but it doesn't work. I have got an empty matrix

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by