我在原图中裁切了一个小区域,然后在小区域中找到一个矩形,画出来,此时,我显示原图,发现它也画出了矩形区域,它是如何进行坐标对应的,我该如何获取这些坐标
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('xxxxxxxxxxxxxx', img)
This is an English based forum... can you at least change your title.
@StevenPuttemans, It's interesting that in the question's URL all the hieroglyphs are replaced to their pronunciations. Unicode?
@dkurt can be, but still then I cannot ready mandarin or whatever language this is xD
@yuemengrui, If you can provide a minimal working example to reproduce the problem - it would be the best start to help you. The code is international thing and we can understand it better.
have a look at function "copyto",and it's offset