I am trying to draw a bounding box around the white blob in the image below:
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