我有一大堆圖像顯示了一些黑斑,其位置隨時間變化(見圖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)? – 2014-09-24 09:01:34