# Get Box Shape Coordinate from image [closed]

I 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 help

• Is this something to do with the software Mathematica or Python? can you show us what you have tried? – Dunlop Apr 7 at 19:05
• 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 – Zoumana Apr 7 at 21:21
• This forum is for the software Mathematica not Python. Perhaps you should post this on another site? – Dunlop Apr 8 at 5:04
• I'm voting to close this question as off-topic because this is a question related to Python not Mathematica. – Dunlop Apr 8 at 5:05