[Solved] How to reduce blob using aspect ratio?

you can use regionprops for that , for example: s=regionprops(bw,’BoundingBox’,’PixelIdxList’); where bw is your binary image. The output of s.BoundingBox is a [x,y,width,height] vector you can loop over s for i=1:numel(s) ar(i) = s(i).BoundingBox(3)/s(i).BoundingBox(4) end and see if the width/height ratio ar (or whatever you define aspect ratio) is approx above 1 or not (because … Read more