컴퓨터/Python

opencv 배우기 같은이미지찾기

풍경소리^^ 2019. 6. 1. 13:42

이미지 읽기

https://www.learnopencv.com/read-an-image-in-opencv-python-cpp/


find_img=cv2.imread('img.png',cv2.IMREAD_COLOR)

find_img_position=match_center_loc(screenshot,find_img)

pyautogui.moveTo(find_img_position)

pyautogui.click()

pyautogui.typewrite('*****')


이미지찾기

capture=pyautogui.screenshot()


res=cv2.matchTemplate(screen,template,cv2.TM_CCOEFF_NORMED

min_val,max_val,min_loc,max_loc=cv2.minMaxLoc(res)

top_left=max_loc

h,w=template.shape[:2]

x,y=int(top_left[0]+w/2),int(top_left[1]+h/2)

'컴퓨터 > Python' 카테고리의 다른 글

python mouse keyboard  (0) 2019.06.01
ping  (0) 2019.06.01
Combining Excel Sheets with Python 엑셀 파일 병합  (0) 2019.06.01
pandas excel columns duplicate  (0) 2019.06.01
pandas row delete  (0) 2019.05.31