opencv #pythoncamera #deeplearning

Deep Learning/Computer Vision

파이썬 카메라에 도형 그리기

1. 파이썬 카메라에 직사각형 그리기 일단 모두 하나의 셀로 실행해야 할 것을 염두에 둘것 import cv2 cap = cv2.VideoCapture(0) width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) #에러 피하기 위함 int 프레임 혹 정수로 height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) # 직사각형 만들기 #top left corner x = width//2 #정수가 되기 위함 소수점 안나오게 하는 정수값 y = height//2 # Width and height w = width//4 h = height//4 #bottom right x+w, y+h while True: # 프레임 캡쳐 ret, frame = cap...

해파리냉채무침
'opencv #pythoncamera #deeplearning' 태그의 글 목록