如何识别面积较小的广场?

时间:2017-03-30 15:32:03

标签: matlab

我只想识别较小的正方形组,我需要一些关于该效果的提示。[/ p>]

 I = imread('q1.jpg');
Ibw = ~im2bw(I,graythresh(I));
Ifill = imfill(Ibw,'holes');
Iarea = bwareaopen(Ifill,100100);
stat = regionprops(Iarea,'boundingbox');
imshow(I); hold on;
for cnt = 1 : numel(stat)
    bb = stat(cnt).BoundingBox;
    rectangle('position',bb,'edgecolor','r','linewidth',2);
end

enter image description here

0 个答案:

没有答案