OpenCV code fail to detect overlapping rectangles in an image
I am using OpenCV to detect rectangles in an image based on their color. The code works well for non-overlapping rectangles, but it fails to detect overlapping rectangles.
Here’s code I am using