I have an image with bright dots over a dark back ground, I have created a ROI in it and then created a binary image, Now I want to count number of dots in this image inside ROI region and produce a result like "desired_result.jpg", any ideas or suggestions how can I do it?
Kshitij Singh answered .
2025-11-20
% find centers of objects S = regionprops(mybinaryimage,'centroid'); C = vertcat(S.Centroid); numspots = numel(S) % count objects % show image and plot markers imshow(mybinaryimage); hold on plot(C(:,1),C(:,2),'x')