Click or drag to resize

VideoCapture Methods

The VideoCapture type exposes the following members.

Methods
  NameDescription
Protected methodAllocGCHandle
Pins the object to be allocated by cvSetData.
(Inherited from DisposableObject.)
Protected methodAllocMemory
Allocates the specified size of memory.
(Inherited from DisposableObject.)
Public methodDispose
Releases the resources
(Inherited from DisposableObject.)
Protected methodDispose(Boolean)
Releases the resources
(Inherited from DisposableObject.)
Protected methodDisposeManaged
Releases managed resources
(Inherited from DisposableObject.)
Protected methodDisposeUnmanaged
Releases unmanaged resources
(Overrides DisposableCvObjectDisposeUnmanaged.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Destructor
(Inherited from DisposableObject.)
Public methodStatic memberFromCamera
Opens a camera for video capturing
Public methodStatic memberFromFile
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
Public methodGet(Int32)
Returns the specified VideoCapture property
Public methodGet(VideoCaptureProperties)
Returns the specified VideoCapture property
Public methodGetBackendName
Returns used backend API name. Note that stream should be opened.
Public methodGetExceptionMode
query if exception mode is active
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGrab
Grabs the next frame from video file or capturing device. The method/function grabs the next frame from video file or camera and returns true (non-zero) in the case of success. The primary use of the function is in multi-camera environments, especially when the cameras do not have hardware synchronization. That is, you call VideoCapture::grab() for each camera and after that call the slower method VideoCapture::retrieve() to decode and get frame from each camera. This way the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames from different cameras will be closer in time. Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the correct way of retrieving data from it is to call VideoCapture::grab() first and then call VideoCapture::retrieve() one or more times with different values of the channel parameter.
Public methodIsOpened
Returns true if video capturing has been initialized already.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodNotifyMemoryPressure
Notifies the allocated size of memory.
(Inherited from DisposableObject.)
Public methodOpen(Int32, VideoCaptureAPIs)
Opens a camera for video capturing
Public methodOpen(String, VideoCaptureAPIs)
Opens a video file or a capturing device or an IP video stream for video capturing.
Public methodRead(Mat)
Grabs, decodes and returns the next video frame. The method/function combines VideoCapture::grab() and VideoCapture::retrieve() in one call. This is the most convenient method for reading video files or capturing data from decode and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns empty image (with %cv::Mat, test it with Mat::empty()).
Public methodRead(OutputArray)
Grabs, decodes and returns the next video frame. The method/function combines VideoCapture::grab() and VideoCapture::retrieve() in one call. This is the most convenient method for reading video files or capturing data from decode and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns empty image (with %cv::Mat, test it with Mat::empty()).
Public methodRelease
Closes video file or capturing device.
Public methodRetrieve(Mat, CameraChannels)
Decodes and returns the grabbed video frame. The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
Public methodRetrieve(Mat, Int32)
Decodes and returns the grabbed video frame. The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
Public methodRetrieve(OutputArray, CameraChannels)
Decodes and returns the grabbed video frame. The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
Public methodRetrieve(OutputArray, Int32)
Decodes and returns the grabbed video frame. The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
Public methodRetrieveMat
Decodes and returns the grabbed video frame. The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
Public methodSet(Int32, Double)
Sets a property in the VideoCapture.
Public methodSet(VideoCaptureProperties, Double)
Sets a property in the VideoCapture.
Public methodSetExceptionMode
Switches exceptions mode. methods raise exceptions if not successful instead of returning an error code
Public methodThrowIfDisposed
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also