I\'m using python and opencv to detect rectangles in images. In most cases there are a single rectangle or multiple but separated ones. These are the easy cases. In other cases