i have a code which identifies contours after applying filters on video frames. Now in my case i get 3 contours and i show them by drawing rectangles around them, what i want to
If you want to box everything in a binary image, you can generate points from all non zero values and apply the algorithms on that. This is done as seen below:
points = cv2.findNonZero(thresholdImage)
rect = cv2.minAreaRect(points)