how to extract connected components with similar height
조회 수: 1 (최근 30일)
이전 댓글 표시
im doing simple extraction of connected components, but now i want to choose only componets with similar height how can i do that??
[L Ne]=bwlabel(imagen);
labeledImage=bwlabel(imagen);
%%Measure properties of image regions
propied=regionprops(L,'BoundingBox');
hold on
%%Plot Bounding Box
for n=1:size(propied,1)
rectangle('Position',propied(n).BoundingBox,'EdgeColor','g','LineWidth',2)
end
hold off
pause (1)
%%Objects extraction
for n=1:Ne
[r,c] = find(L==n);
n1=imagen(min(r):max(r),min(c):max(c));
height=max(r)-min(r)+1;
width=max(c)-min(c)+1;
end
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!