image thumbnail

Draw Bounding Box

version (1.46 KB) by Shadab Khan
This function draws bounding boxes around blobs in a binary image.


Updated 07 Jan 2010

View License

Input is a binary image, and output is another binary image holding the rectangles over the detected blobs. Its not a superimposition of a rectangle over an image.

DRAWBOUNDINGBOX draws the bounding boxes around the blobs in a binary image image is the binary image input supplied by the user. This function extracts the coordinates and dimension values of each blob from stats.BoundingBox structure one by one and draws the rectangle around them. To store an image you can further use IMWRITE function on the output of the function DRAWBOUNDINGBOX. the new image stored will have the rectangles marked over the blobs since it is not a superimposition.

Cite As

Shadab Khan (2021). Draw Bounding Box (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!