Bounding box using MATLAB for the image

后端 未结 4 832
南方客
南方客 2021-01-14 09:05

I am trying to draw a bounding box around the white blob in the image below:

\"enter

4条回答
  •  情歌与酒
    2021-01-14 09:19

    I think you can try to use bwboundries

    boundaries = bwboundaries(blob);
    
    numberOfBoundaries = size(boundaries);
    
    for k = 1 : numberOfBoundaries
    
        thisBoundary = boundaries{k};
    
        plot(thisBoundary(:,2), thisBoundary(:,1), 'g', 'LineWidth', 2);
    
    end
    

提交回复
热议问题