How to Count Not Counted Objects on Image Processing

Hello,
I have attached photo as a result of image object count with image processing.
As it seems obviously, some objects are not counted. At this result I would like to add manual count function to count uncounted objects manually. Also, there are some over counts.
How could I add manual count and extract function to add uncounted ones and extract over counts with the numbers 11 and 4 ?
What I want to do is to add numbers for the arrowed ones by mouse clicking on it.
Is there a way to do this?

1 个评论

I think I should have adapted this into my code but I can not play on my result image with counting numbers.
Maybe you could help at this point?
% Display an image.
imshow('Filepath');
hold on;
% Initialize counter.
count = 0;
message = sprintf('Click as many points as you want.\nHit return when done.');
title(message, 'FontSize', 20);
button = questdlg(message, 'Continue?', 'OK', 'Cancel', 'OK');
drawnow; % Refresh screen to get rid of dialog box remnants.
if strcmpi(button, 'Cancel')
return;
end
% Begin loop where user clicks points over display (plot or image or whatever).
while count < 1000 % or whatever failsafe you want.
% User clicks one point. If user types Enter/Return, x is empty.
[x,y] = ginput(1);
if isempty(x)
break;
end
% Put a cross over the point.
plot(x, y, 'r+', 'MarkerSize', 24, 'LineWidth', 3);
% Increment the count.
count = count + 1
% Save coordinates (if desired).
allX(count) = x;
allY(count) = y;
end

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Display Image 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by