C# 클래스 OpenCvSharp.VideoCapture

Video capturing class
상속: OpenCvSharp.DisposableCvObject
파일 보기 프로젝트 열기: shimat/opencvsharp 1 사용 예제들

공개 메소드들

메소드 설명
FromCamera ( CaptureDevice device ) : VideoCapture

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

FromCamera ( CaptureDevice device, int index ) : VideoCapture

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

FromCamera ( int index ) : VideoCapture

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

FromFile ( string fileName ) : VideoCapture

Allocates and initialized the CvCapture structure for reading the video stream from the specified file. After the allocated structure is not used any more it should be released by cvReleaseCapture function.

Get ( CaptureProperty propertyId ) : double

Retrieves the specified property of camera or video file.

Get ( int propertyId ) : double

Retrieves the specified property of camera or video file.

Grab ( ) : bool

Grabs the frame from camera or file. The grabbed frame is stored internally. The purpose of this function is to grab frame fast that is important for syncronization in case of reading from several cameras simultaneously. The grabbed frames are not exposed because they may be stored in compressed format (as defined by camera/driver). To retrieve the grabbed frame, cvRetrieveFrame should be used.

IsOpened ( ) : bool

Returns true if video capturing has been initialized already.

Open ( CaptureDevice device ) : void

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

Open ( CaptureDevice device, int index ) : void

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

Open ( int index ) : void

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

Open ( string fileName ) : void

Opens the specified video file

Read ( OpenCvSharp.Mat image ) : bool

Grabs a frame from camera or video file, decompresses and returns it. This function is just a combination of cvGrabFrame and cvRetrieveFrame in one call. The returned image should not be released or modified by user.

Release ( ) : void

Closes video file or capturing device.

Retrieve ( OpenCvSharp.Mat image, CameraChannels streamIdx = CameraChannels.OpenNI_DepthMap ) : bool

Returns the pointer to the image grabbed with cvGrabFrame function. The returned image should not be released or modified by user.

Retrieve ( OpenCvSharp.Mat image, int channel ) : bool

Decodes and returns the grabbed video frame.

RetrieveMat ( ) : OpenCvSharp.Mat

Decodes and returns the grabbed video frame.

Set ( CaptureProperty propertyId, double value ) : int

Sets the specified property of video capturing.

Set ( int propertyId, double value ) : int

Sets the specified property of video capturing.

VideoCapture ( ) : System

Initializes empty capture. To use this, you should call Open.

VideoCapture ( CaptureDevice device ) : System

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

VideoCapture ( CaptureDevice device, int index ) : System

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

VideoCapture ( int index ) : System

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).

VideoCapture ( string fileName ) : System

Allocates and initialized the CvCapture structure for reading the video stream from the specified file. After the allocated structure is not used any more it should be released by cvReleaseCapture function.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

VideoCapture ( IntPtr ptr ) : System

Initializes from native pointer

메소드 상세

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
리턴 void

FromCamera() 공개 정적인 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public static FromCamera ( CaptureDevice device ) : VideoCapture
device CaptureDevice Device type
리턴 VideoCapture

FromCamera() 공개 정적인 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public static FromCamera ( CaptureDevice device, int index ) : VideoCapture
device CaptureDevice Device type
index int Index of the camera to be used. If there is only one camera or it does not matter what camera to use -1 may be passed.
리턴 VideoCapture

FromCamera() 공개 정적인 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public static FromCamera ( int index ) : VideoCapture
index int Index of the camera to be used. If there is only one camera or it does not matter what camera to use -1 may be passed.
리턴 VideoCapture

FromFile() 공개 정적인 메소드

Allocates and initialized the CvCapture structure for reading the video stream from the specified file. After the allocated structure is not used any more it should be released by cvReleaseCapture function.
public static FromFile ( string fileName ) : VideoCapture
fileName string Name of the video file.
리턴 VideoCapture

Get() 공개 메소드

Retrieves the specified property of camera or video file.
public Get ( CaptureProperty propertyId ) : double
propertyId CaptureProperty property identifier.
리턴 double

Get() 공개 메소드

Retrieves the specified property of camera or video file.
public Get ( int propertyId ) : double
propertyId int property identifier.
리턴 double

Grab() 공개 메소드

Grabs the frame from camera or file. The grabbed frame is stored internally. The purpose of this function is to grab frame fast that is important for syncronization in case of reading from several cameras simultaneously. The grabbed frames are not exposed because they may be stored in compressed format (as defined by camera/driver). To retrieve the grabbed frame, cvRetrieveFrame should be used.
public Grab ( ) : bool
리턴 bool

IsOpened() 공개 메소드

Returns true if video capturing has been initialized already.
public IsOpened ( ) : bool
리턴 bool

Open() 공개 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public Open ( CaptureDevice device ) : void
device CaptureDevice Device type
리턴 void

Open() 공개 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public Open ( CaptureDevice device, int index ) : void
device CaptureDevice Device type
index int Index of the camera to be used. If there is only one camera or it does not matter what camera to use -1 may be passed.
리턴 void

Open() 공개 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public Open ( int index ) : void
index int Index of the camera to be used. If there is only one camera or it does not matter what camera to use -1 may be passed.
리턴 void

Open() 공개 메소드

Opens the specified video file
public Open ( string fileName ) : void
fileName string
리턴 void

Read() 공개 메소드

Grabs a frame from camera or video file, decompresses and returns it. This function is just a combination of cvGrabFrame and cvRetrieveFrame in one call. The returned image should not be released or modified by user.
public Read ( OpenCvSharp.Mat image ) : bool
image OpenCvSharp.Mat
리턴 bool

Release() 공개 메소드

Closes video file or capturing device.
public Release ( ) : void
리턴 void

Retrieve() 공개 메소드

Returns the pointer to the image grabbed with cvGrabFrame function. The returned image should not be released or modified by user.
public Retrieve ( OpenCvSharp.Mat image, CameraChannels streamIdx = CameraChannels.OpenNI_DepthMap ) : bool
image OpenCvSharp.Mat
streamIdx CameraChannels non-zero streamIdx is only valid for multi-head camera live streams
리턴 bool

Retrieve() 공개 메소드

Decodes and returns the grabbed video frame.
public Retrieve ( OpenCvSharp.Mat image, int channel ) : bool
image OpenCvSharp.Mat
channel int non-zero streamIdx is only valid for multi-head camera live streams
리턴 bool

RetrieveMat() 공개 메소드

Decodes and returns the grabbed video frame.
public RetrieveMat ( ) : OpenCvSharp.Mat
리턴 OpenCvSharp.Mat

Set() 공개 메소드

Sets the specified property of video capturing.
public Set ( CaptureProperty propertyId, double value ) : int
propertyId CaptureProperty property identifier.
value double value of the property.
리턴 int

Set() 공개 메소드

Sets the specified property of video capturing.
public Set ( int propertyId, double value ) : int
propertyId int property identifier.
value double value of the property.
리턴 int

VideoCapture() 공개 메소드

Initializes empty capture. To use this, you should call Open.
public VideoCapture ( ) : System
리턴 System

VideoCapture() 공개 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public VideoCapture ( CaptureDevice device ) : System
device CaptureDevice Device type
리턴 System

VideoCapture() 공개 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public VideoCapture ( CaptureDevice device, int index ) : System
device CaptureDevice Device type
index int Index of the camera to be used. If there is only one camera or it does not matter what camera to use -1 may be passed.
리턴 System

VideoCapture() 보호된 메소드

Initializes from native pointer
protected VideoCapture ( IntPtr ptr ) : System
ptr IntPtr CvCapture*
리턴 System

VideoCapture() 공개 메소드

Allocates and initialized the CvCapture structure for reading a video stream from the camera. Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL); and two on Linux: V4L and FireWire (IEEE1394).
public VideoCapture ( int index ) : System
index int Index of the camera to be used. If there is only one camera or it does not matter what camera to use -1 may be passed.
리턴 System

VideoCapture() 공개 메소드

Allocates and initialized the CvCapture structure for reading the video stream from the specified file. After the allocated structure is not used any more it should be released by cvReleaseCapture function.
public VideoCapture ( string fileName ) : System
fileName string Name of the video file.
리턴 System