I cut a small area in the original map, and then find a rectangle in the small area, draw it. At this time, I show the original map and find that it also draws a rectangular area. How does it correspond to coordinates? How do I get these coordinates?

asked 2019-01-28 19:04:59 -0500

QRcode_img = img[int(p1_temp[1]):int(p3_temp[1]), int(p1_temp[0]):int(p3_temp[0])] cv2.imshow('QRcode_img', QRcode_img) cv2.waitKey(0) contours = cv2.QRCodeDetector().detect(QRcode_img) if np.all(contours[1] != None): box = contours[1].reshape(4, 2).astype(np.int64) code_img = cv2.drawContours(QRcode_img, [box], -1, (0, 0, 255), 2) cv2.imshow('xx', code_img) cv2.waitKey(0) cv2.imshow('origin_img', img) cv2.waitKey(0)

edit retag flag offensive close merge delete