import cv2
img = cv2.imread('./data/rect.jpg') # load a dummy imagesd
while(1):
cv2.imshow('img',img)
k = cv2.waitKeyEx(0)
if k==27: # Esc key to stop
break
elif k==-1: # normally -1 returned,so don't print it
continue
else:
print (k) # else print its value
waitKeyEx()에서 방향키 입력 받기
key == 0xFF53: # 65363 오른쪽
key == 0xFF54: # 65364 아래
key == 0xFF51: # 65361 왼쪽
key == 0xFF52: # 65362 위
error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' (0) | 2023.02.07 |
---|---|
OpenCV 버전 문제 cv2.split() (0) | 2023.01.30 |
OpenCV 리눅스 우분투 18.04에서 설치하기 (0) | 2023.01.25 |