How to count dots and mark those dots with crosses in an Image?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohsin Zubair
am 4 Jul. 2021
Bearbeitet: Mohsin Zubair
am 8 Jul. 2021
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?
0 Kommentare
Akzeptierte Antwort
DGM
am 4 Jul. 2021
As far as I can tell, your sample image is corrupted. Either way, you can do this:
% 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')
13 Kommentare
Image Analyst
am 7 Jul. 2021
@Mohsin Zubair, so it looks like your original images are pretty contrasty black and white, though some of the blobs might be brighter or fainter than the others. But again, you have given us no idea of how you decided to outline those particular blobs and not the others. Do you just want to take a large grouping that is roughly in the center of the image? Or can the ROI be anywhere in the image? Is there more thought put into deciding which ones to include than just taking the blobs within a radius of half the image from the center? If so, what is your thought process in deciding which ones to include and which to exclude? We need to know that if we're to develop any sort of automatic way of getting the ROI.
Also, include the original image because the screenshot with the blue stuff in the overlay, while good for showing us which blobs you chose to include, won't be any good when we try to develop an automated method.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!