VideoCapture Class |
Namespace: OpenCvSharp
The VideoCapture type exposes the following members.
Name | Description | |
---|---|---|
VideoCapture |
Initializes empty capture.
To use this, you should call Open.
| |
VideoCapture(IntPtr) |
Initializes from native pointer
| |
VideoCapture(Int32, VideoCaptureAPIs) |
Opens a camera for video capturing
| |
VideoCapture(String, VideoCaptureAPIs) |
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
|
Name | Description | |
---|---|---|
AllocatedMemory |
Gets or sets a memory address allocated by AllocMemory.
(Inherited from DisposableObject.) | |
AllocatedMemorySize |
Gets or sets the byte length of the allocated memory
(Inherited from DisposableObject.) | |
AutoExposure |
exposure control done by camera,
user can adjust refernce level using this feature
[CV_CAP_PROP_AUTO_EXPOSURE]
| |
AutoFocus | ||
BackLight | ||
Brightness |
Gets or sets brightness of image (only for cameras)
| |
BufferSize | ||
CaptureType |
Gets the capture type (File or Camera)
| |
Contrast |
Gets or sets contrast of image (only for cameras)
| |
ConvertRgb |
Boolean flags indicating whether images should be converted to RGB
| |
CvPtr |
Native pointer of OpenCV structure
(Inherited from DisposableCvObject.) | |
DataHandle |
Gets or sets a handle which allocates using cvSetData.
(Inherited from DisposableObject.) | |
Exposure |
Exposure (only for cameras)
| |
Focus | ||
Format |
The format of the Mat objects returned by retrieve()
| |
FourCC |
Gets or sets 4-character code of codec
| |
Fps |
Gets or sets frame rate
| |
FrameCount |
Gets number of frames in video file
| |
FrameHeight |
Gets or sets height of frames in the video stream
| |
FrameWidth |
Gets or sets width of frames in the video stream
| |
Gain |
Gain of the image (only for cameras)
| |
Gamma | ||
GStreamerQueueLength |
default is 1
[CV_CAP_GSTREAMER_QUEUE_LENGTH]
| |
Guid | ||
Hue |
Gets or sets hue of image (only for cameras)
| |
Iris | ||
IsDisposed |
Gets a value indicating whether this instance has been disposed.
(Inherited from DisposableObject.) | |
IsEnabledDispose |
Gets or sets a value indicating whether you permit disposing this instance.
(Inherited from DisposableObject.) | |
IsoSpeed | ||
Mode |
A backend-specific value indicating the current capture mode
| |
Monocrome | ||
OpenNI_Baseline |
in mm
[CV_CAP_PROP_OPENNI_BASELINE]
| |
OpenNI_DepthGeneratorBaseline |
[CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE]
| |
OpenNI_DepthGeneratorFocalLength |
[CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH]
| |
OpenNI_DepthGeneratorRegistrationON |
[CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON]
| |
OpenNI_FocalLength |
in pixels
[CV_CAP_PROP_OPENNI_FOCAL_LENGTH]
| |
OpenNI_FrameMaxDepth |
in mm
[CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH]
| |
OpenNI_ImageGeneratorOutputMode |
[CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE]
| |
OpenNI_OutputMode |
[CV_CAP_PROP_OPENNI_OUTPUT_MODE]
| |
OpenNI_Registration |
flag that synchronizes the remapping depth map to image map
by changing depth generator's view point (if the flag is "on") or
sets this view point to its normal one (if the flag is "off").
[CV_CAP_PROP_OPENNI_REGISTRATION]
| |
Pan | ||
PosAviRatio |
Gets or sets relative position of video file
| |
PosFrames |
Gets or sets 0-based index of the frame to be decoded/captured next
| |
PosMsec |
Gets or sets film current position in milliseconds or video capture timestamp
| |
PvAPIMulticastIP |
ip for anable multicast master mode. 0 for disable multicast
[CV_CAP_PROP_PVAPI_MULTICASTIP]
| |
Rectification |
TOWRITE (note: only supported by DC1394 v 2.x backend currently)
| |
Roll | ||
Saturation |
Gets or sets saturation of image (only for cameras)
| |
Settings | ||
Sharpness | ||
Temperature |
[CV_CAP_PROP_TEMPERATURE]
| |
Tilt | ||
Trigger | ||
TriggerDelay | ||
WhiteBalanceBlueU | ||
WhiteBalanceRedV | ||
XI_AEAG |
Automatic exposure/gain
[CV_CAP_PROP_XI_AEAG]
| |
XI_AEAGLevel |
default is 1
[CV_CAP_PROP_XI_AEAG_LEVEL]
| |
XI_AEMaxLimit |
Maximum limit of exposure in AEAG procedure
[CV_CAP_PROP_XI_AE_MAX_LIMIT]
| |
XI_AGMaxLimit |
Maximum limit of gain in AEAG procedure
[CV_CAP_PROP_XI_AG_MAX_LIMIT]
| |
XI_AutoWB |
Automatic white balance
[CV_CAP_PROP_XI_AUTO_WB]
| |
XI_DataFormat |
Output data format.
[CV_CAP_PROP_XI_DATA_FORMAT]
| |
XI_Downsampling |
Change image resolution by binning or skipping.
[CV_CAP_PROP_XI_DOWNSAMPLING]
| |
XI_ExpPriority |
Exposure priority (0.5 - exposure 50%, gain 50%).
[CV_CAP_PROP_XI_EXP_PRIORITY]
| |
XI_GpiLevel |
Get general purpose level
[CV_CAP_PROP_XI_GPI_LEVEL]
| |
XI_GpiMode |
Set general purpose input mode
[CV_CAP_PROP_XI_GPI_MODE]
| |
XI_GpiSelector |
Selects general purpose input
[CV_CAP_PROP_XI_GPI_SELECTOR]
| |
XI_GpoMode |
Set general purpose output mode
[CV_CAP_PROP_XI_GPO_MODE]
| |
XI_GpoSelector |
Selects general purpose output
[CV_CAP_PROP_XI_GPO_SELECTOR]
| |
XI_LedMode |
Define camera signalling LED functionality
[CV_CAP_PROP_XI_LED_MODE]
| |
XI_LedSelector |
Selects camera signalling LED
[CV_CAP_PROP_XI_LED_SELECTOR]
| |
XI_ManualWB |
Calculates White Balance(must be called during acquisition)
[CV_CAP_PROP_XI_MANUAL_WB]
| |
XI_OffsetX |
Horizontal offset from the origin to the area of interest (in pixels).
[CV_CAP_PROP_XI_OFFSET_X]
| |
XI_OffsetY |
Vertical offset from the origin to the area of interest (in pixels).
[CV_CAP_PROP_XI_OFFSET_Y]
| |
XI_Timeout |
default is 1
[CV_CAP_PROP_XI_TIMEOUT]
| |
XI_TrgSoftware |
Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE.
[CV_CAP_PROP_XI_TRG_SOFTWARE]
| |
XI_TrgSource |
Defines source of trigger.
[CV_CAP_PROP_XI_TRG_SOURCE]
| |
Zoom |
Name | Description | |
---|---|---|
AllocGCHandle |
Pins the object to be allocated by cvSetData.
(Inherited from DisposableObject.) | |
AllocMemory |
Allocates the specified size of memory.
(Inherited from DisposableObject.) | |
Dispose |
Releases the resources
(Inherited from DisposableObject.) | |
Dispose(Boolean) |
Releases the resources
(Inherited from DisposableObject.) | |
DisposeManaged |
Releases managed resources
(Inherited from DisposableObject.) | |
DisposeUnmanaged |
Releases unmanaged resources
(Overrides DisposableCvObjectDisposeUnmanaged.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize |
Destructor
(Inherited from DisposableObject.) | |
FromCamera |
Opens a camera for video capturing
| |
FromFile |
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
| |
Get(Int32) |
Returns the specified VideoCapture property
| |
Get(VideoCaptureProperties) |
Returns the specified VideoCapture property
| |
GetBackendName |
Returns used backend API name.
Note that stream should be opened.
| |
GetExceptionMode |
query if exception mode is active
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Grab |
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.
| |
IsOpened |
Returns true if video capturing has been initialized already.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NotifyMemoryPressure |
Notifies the allocated size of memory.
(Inherited from DisposableObject.) | |
Open(Int32, VideoCaptureAPIs) |
Opens a camera for video capturing
| |
Open(String, VideoCaptureAPIs) |
Opens a video file or a capturing device or an IP video stream for video capturing.
| |
Read(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()).
| |
Read(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()).
| |
Release |
Closes video file or capturing device.
| |
Retrieve(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()).
| |
Retrieve(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()).
| |
Retrieve(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()).
| |
Retrieve(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()).
| |
RetrieveMat |
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()).
| |
Set(Int32, Double) |
Sets a property in the VideoCapture.
| |
Set(VideoCaptureProperties, Double) |
Sets a property in the VideoCapture.
| |
SetExceptionMode |
Switches exceptions mode.
methods raise exceptions if not successful instead of returning an error code
| |
ThrowIfDisposed |
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
ptr |
Data pointer
(Inherited from DisposableCvObject.) |