import cv2 image = cv2.imread("image.png") x = cv2.selectROI("Select area", image, fromCenter=False) print("Selected box: ", format(x))