python opencv 예제 코드
import cv2 img = cv2.imread('img550x779.jpg') cv2.imshow('see img', img) presskey = cv2.waitKey(0) print(presskey) cv2.destroyAllWindows() import cv2 cam = cv2.VideoCapture(0) # device ID = 0 if not cam.isOpened(): exit() while True: ret, frame = cam.read() if not ret: print('실시간 영상자료 없음') break cv2.imshow('camera', frame) presskey = cv2.waitKey(1) if presskey == ord('q'): print('q를 눌러서 종료합니다.')..
Programming
2022. 4. 2. 06:51