목록watermelongame (1)
박민혀기
Capture to the score frame in streaming video game (Template Match) for Python
import cv2 import numpy as np cap = cv2.VideoCapture('Watermelon_Rec.mp4') if not cap.isOpened(): print("Error: Could not open video file.") exit() template = cv2.imread('Watermelon_Score_ROI.PNG') if template is None: print("Error: Could not open or read the template image.") exit() template = cv2.resize(template, (0, 0), fx=0.5, fy=0.5) total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) sta..
OpenCV
2023. 12. 14. 16:13