【发布时间】:2014-11-15 18:56:13
【问题描述】:
我有一大堆图像显示一个带有一些黑色斑点的条形图,其位置随时间而变化(参见图 b)。为了检测斑点,我现在使用强度阈值(图中的 c,其中低于阈值的所有强度值都设置为 1),然后我使用下面的 Matlab 代码在二进制图像中搜索斑点。如您所见,二进制图像非常嘈杂,使斑点检测过程复杂化。您对如何改进形状检测有什么建议,可能包括一些机器学习算法?谢谢!
代码:
se = strel('disk',1);
se_1 = strel('disk',3);
pw2 = imclose(IM,se);
pw3 = imopen(pw2,se_1);
pw4 = imfill(pw3, 'holes');
% Consider only the blobs with more than threshold pixels
[L,num] = bwlabel(pw4);
counts = sum(bsxfun(@eq,L(:),1:num));
number_valid_counts = length(find(counts>threshold));
【问题讨论】:
-
所以基本上,您只想从图 B 中提取 blob?还是 blob(来自图 b)mius 条(在图 c)?
标签: python matlab machine-learning computer-vision feature-detection