How to count dots and mark those dots with crosses in an Image?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
DGM
2021-7-4
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 个评论
Image Analyst
2021-7-7
@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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!