@k7amd


我用cv.TM_CCORR_NORMED 和cv.TM_CCOEFF_NORMED,找图都不理想。这个该如何操作?谢谢
FULL = luJingFirst+"\yuanTu.jpg"
TEMP = luJingFirst+"\\xiaotu.jpg"
tpl = cv.imread(TEMP)
target = cv.imread(FULL)
tpl = cv.Canny(tpl, 80, 150, (3, 3))
target = cv.Canny(target, 80, 150, (3, 3))
cv.imshow("template image", tpl)
cv.imshow("target image", target)
#result = cv.matchTemplate(target, tpl, cv.TM_CCORR_NORMED)
result = cv.matchTemplate(target, tpl, cv.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv.minMaxLoc(result)
--
FROM 117.66.130.*