Image Segmentation by OpenCV Contour Detection The notebook main.ipynb shows how to detect rectangles using openCV.