Ask Your Question

Revision history [back]

Simply said

  • Use findContours on the binary image. It will return blob locations.
  • Then use boundingRect to get the rectangle surrounding the blob
  • Now loop over all the rectangles AND use the rectangle function to draw them

Good luck!