【发布时间】:2018-03-05 09:30:42
【问题描述】:
我正在尝试确定和计算图像中 WBC 的数量,我可以使用以下代码确定它。但是当我尝试标记检测到的 WBC 时出现,它正在标记圆圈外的数字。结果附在下面。
你能告诉我我在这里缺少什么吗?
clc;
clear all;
close all;
rgb = imread('test.jpg');
figure;
imshow(rgb);
binaryImage=im2bw(rgb);
bw = im2bw(rgb, graythresh(rgb));
imshow(bw)
L = bwlabel(bw);
imshow(rgb) hold on
[centers, radii, metric] = imfindcircles(rgb,[9 24],'ObjectPolarity','dark','Sensitivity',0.86,'Method','twostage');
m = viscircles(centers,radii);
[a,b]=size(centers);
disp(a);
disp(b);
s = regionprops(L, 'Centroid');
for k = 1:numel(s)
c = s(k).Centroid;
text(c(1), c(2), sprintf('%d', k), ...
'Color', 'w', ...
'HorizontalAlignment', 'center', ...
'VerticalAlignment', 'middle');
end
hold off
【问题讨论】:
-
图片丢失,本页显示一个:en.wikipedia.org/wiki/Westboro_Baptist_Church
-
@YvesDaoust 我猜你是在开玩笑(我笑了),但以防万一,它代表白细胞。
-
这仍然没有给我们一个图像。
-
抱歉这个错误。我会尽快更新。再次抱歉。
-
@YvesDaoust 我更新了帖子并添加了图片。再次抱歉
标签: matlab image-processing object-detection