Needing to get the coordinates of the illuminated pixels
2 views (last 30 days)
Show older comments
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);
0 Comments
Answers (2)
Thorsten
on 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
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!