class VideoCapture之:: VideoCapture

来源:互联网 发布:淘宝省钱app 编辑:程序博客网 时间:2024/06/05 09:34

VideoCapture constructors.

C++: VideoCapture::VideoCapture()
C++: VideoCapture::VideoCapture(const string& filename)
C++: VideoCapture::VideoCapture(int device)
Python: cv2.VideoCapture() → <VideoCapture object>
Python: cv2.VideoCapture(filename) → <VideoCapture object>
Python: cv2.VideoCapture(device) → <VideoCapture object>
C: CvCapture* cvCaptureFromCAM(int device)
Python: cv.CaptureFromCAM(index) → CvCapture
C: CvCapture* cvCaptureFromFile(const char* filename)
Python: cv.CaptureFromFile(filename) → CvCapture
Parameters:
  • filename – name of the opened video file
  • device – id of the opened video capturing device (i.e. a camera index). If there is a single camera connected, just pass 0.

Note

 

In C API, when you finished working with video, release CvCapture structure with cvReleaseCapture(), or usePtr<CvCapture> that calls cvReleaseCapture() automatically in the destructor.