当前位置: 首页 > 工具软件 > VideoCapture > 使用案例 >

class VideoCapture之:: VideoCapture

贺彬
2023-12-01

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.

 类似资料: