How does cv2.boundingRect() function of OpenCV work?

The cv2.boundingRect() function of OpenCV is used to draw an approximate rectangle around the binary image. This function is used mainly to highlight the region of interest after obtaining contours from an image. As per the documentation there are two types of bounding rectangles: Straight Bounding Rectangle Here a simple rectangle is drawn around the contour (ROI). As you … Read more