Draw Bounding Box

This function draws bounding boxes around blobs in a binary image.
6.2K Downloads
Updated 7 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 (2024). Draw Bounding Box (https://www.mathworks.com/matlabcentral/fileexchange/26296-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!
Version Published Release Notes
1.0.0.0