Video capture
VideoCapture object = cv2.VideoCapture(filename[, apiPreference])
The function has 1 required argument:
1.filename
: 불러올 영상파일 명, 경로를 지정하여 특정 위치에 있는 파일도 불러 올수 있음. 만약 웹캡을 사용하고 싶으면 filename으로 0을 입력하면된다.OpenCV Documentation
read()
retval, image = cv2.VideoCapture.read()(filename[, apiPreference])
The function has 2 output:
1. retval : 해당 클래스에 프레임이 있는지 확인하여 T/F로 반환
2. image : 해당 클래스에 프레임이 있다면 제일 앞쪽에 있는 이미지를 반환OpenCV Documentation
release()
cv2.VideoCapture.relase()(filename[, apiPreference])
해당 클래스를 실행 하면 생성된 video 객체를 닫거나 외부 카메라와 연결을 끊는다.
release()