VideoCapture
cv::VideoCapture::VideoCapture(
const String& filename,
int apiPreference = CAP_ANY
)
cv::VideoCapture::VideoCapture(
int index,
int apiPreference = CAP_ANY
)
VideoCapture VideoCapture(
string fileName,
VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY
)
VideoCapture VideoCapture(
int index,
VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY
)
<VideoCapture object> = cv2.VideoCapture(
filename,
apiPreference
)
<VideoCapture object> = cv2.VideoCapture(
index,
apiPreference
)
Tip:
문자열을 입력할 경우, 파일 경로로 간주하여 동영상 파일을 읽습니다.
-
동영상 파일 : video.avi
Tip:
문자열 포맷팅(formatting)이 있는 경우, 시퀀스로 간주하여 다수의 이미지를 읽습니다.
-
-
이미지 시퀀스 : img_%02d.jpg
-
API 백엔드(apiPreference) 설정 필요
Tip:
URL이 있는 경우, 스트리밍(Streaming)으로 간주하여, 실시간 재생 파일을 읽습니다.
-
URL : protocol://host:port/script_name?script_params|auth
Tip:
정수를 입력할 경우, 카메라 장치 번호로 간주하여 카메라를 읽습니다.
-
카메라 : 0
요약(Summary)
비디오 파일, 카메라, IP 비디오 스트림, 이미지 시퀀스 등을 읽습니다.
매개변수(Parameter)
파일 이름(filename)이미지 파일의 경로
카메라 장치 번호(index)카메라 장치 ID 번호
API 백엔드(apiPreference)API 백엔드 식별자
반환값(Returns)
생성자(VideoCapture)VideoCapture 생성자