Needing to get the coordinates of the illuminated pixels

1 Ansicht (letzte 30 Tage)
Antonio Cebrián
Antonio Cebrián am 5 Apr. 2017
Bearbeitet: Antonio Cebrián am 6 Apr. 2017
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);

Antworten (2)

Thorsten
Thorsten am 5 Apr. 2017
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 am 6 Apr. 2017
sorry but it doesn't work. I have got an empty matrix

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by