문제

I have working OpenCV template matching code made with python. Now I am searching for a way to tell OpenCV to search only in a supplied area (x, y, w, h), is that possible?

Regards, Philip

도움이 되었습니까?

해결책

roi = image[y:y+h , x:x+w]

cv2.matchTemplate(roi, templ, ...
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top