Needing to get the coordinates of the illuminated pixels

1 vue (au cours des 30 derniers jours)
Antonio Cebrián
Antonio Cebrián le 5 Avr 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);

Réponses (2)

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

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by