mirror of
https://github.com/jjaldridge2009/Project_Xs.git
synced 2024-08-17 14:29:40 +02:00
show bounds of pokemon eye scan
This commit is contained in:
parent
3c6fbb95cc
commit
671abee1be
@ -238,6 +238,7 @@ def tracking_poke_blink(img, roi_x, roi_y, roi_w, roi_h, size = 64, th = 0.85, M
|
|||||||
res = cv2.matchTemplate(roi,eye,cv2.TM_CCOEFF_NORMED)
|
res = cv2.matchTemplate(roi,eye,cv2.TM_CCOEFF_NORMED)
|
||||||
_, match, _, max_loc = cv2.minMaxLoc(res)
|
_, match, _, max_loc = cv2.minMaxLoc(res)
|
||||||
|
|
||||||
|
cv2.rectangle(frame,(roi_x,roi_y), (roi_x+roi_w,roi_y+roi_h), (0,0,255), 2)
|
||||||
if 0.4<match<th:
|
if 0.4<match<th:
|
||||||
cv2.rectangle(frame,(roi_x,roi_y), (roi_x+roi_w,roi_y+roi_h), 255, 2)
|
cv2.rectangle(frame,(roi_x,roi_y), (roi_x+roi_w,roi_y+roi_h), 255, 2)
|
||||||
if state==IDLE:
|
if state==IDLE:
|
||||||
@ -258,7 +259,6 @@ def tracking_poke_blink(img, roi_x, roi_y, roi_w, roi_h, size = 64, th = 0.85, M
|
|||||||
state = IDLE
|
state = IDLE
|
||||||
|
|
||||||
if tk_window == None:
|
if tk_window == None:
|
||||||
print("CV2")
|
|
||||||
cv2.imshow("view", frame)
|
cv2.imshow("view", frame)
|
||||||
keypress = cv2.waitKey(1)
|
keypress = cv2.waitKey(1)
|
||||||
if keypress == ord('q'):
|
if keypress == ord('q'):
|
||||||
|
Loading…
Reference in New Issue
Block a user