How do I create a MINIMUM bounding box on an object/ s in this image

5 views (last 30 days)
I write this coe and I got this:
labelImg = bwlabel(BW); % BW-binary image
objectsDetail = regionprops(labelImg,'all');
numberOfObjects = size(objectsDetail, 1);
ii=1;
for k=1:numberOfObjects
boundary = B{k};
thisBlobsBoundingBox = objectsDetail(k).BoundingBox;
subImage = imcrop(BW, thisBlobsBoundingBox);
imshow(subImage)
end
I would like to get something like this, but I have no idea :(

Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!