enter image description hereI would like to taget each box (rectangle) in this image in order to have the coordinate of each one and finally crop on each one.

For example, I have 3 rectangles in the image, I would like to automatically get the coordinate of each one and create 3 images where one rectangle = one image after the crop.

I tried image processing, but I don't know how to find the coordinate of the rectangles. Thank you for your helpenter image description here

  • $\begingroup$ Is this something to do with the software Mathematica or Python? can you show us what you have tried? $\endgroup$ – Dunlop Apr 7 '20 at 19:05
  • $\begingroup$ Hi Dunlop, I am using python and tried openCV ``` import cv2 import numpy as np img = cv2.imread("../data/images/image1.jpg", cv2.IMREAD_GRAYSCALE) lap = cv2.Laplacian(img, cv2.CV_64F) lap = np.uint8(np.absolute(lap)) ``` I aplied the Laplacian Transform in order to get the rectangle borders, but I have no idea about how to extract the rectangles. You can find the original image to the left and the transformed image to the right. Thank you in advance for your help $\endgroup$ – Zoumana Apr 7 '20 at 21:21
  • $\begingroup$ This forum is for the software Mathematica not Python. Perhaps you should post this on another site? $\endgroup$ – Dunlop Apr 8 '20 at 5:04
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because this is a question related to Python not Mathematica. $\endgroup$ – Dunlop Apr 8 '20 at 5:05