CvCapture Class OpenCvSharp Class Library
Video capturing class
Inheritance Hierarchy

SystemObject
  OpenCvSharpDisposableObject
    OpenCvSharpDisposableCvObject
      OpenCvSharpCvCapture

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public class CvCapture : DisposableCvObject

The CvCapture type exposes the following members.

Constructors

  NameDescription
Public methodCvCapture(Int32)
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).
Protected methodCvCapture(IntPtr)
ポインタから初期化
Public methodCvCapture(String)
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 methodCvCapture(CaptureDevice)
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 methodCvCapture(CaptureDevice, Int32)
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).
Top
Properties

  NameDescription
Protected propertyAllocatedMemory
Gets or sets a memory address allocated by AllocMemory.
(Inherited from DisposableObject.)
Protected propertyAllocatedMemorySize
Gets or sets the byte length of the allocated memory
(Inherited from DisposableObject.)
Public propertyAutoExposure
exposure control done by camera, user can adjust refernce level using this feature [CV_CAP_PROP_AUTO_EXPOSURE]
Public propertyAutoGrab
property for highgui class CvCapture_Android only [CV_CAP_PROP_AUTOGRAB]
Public propertyBrightness
Gets or sets brightness of image (only for cameras)
Public propertyCaptureType
Gets the capture type (File or Camera)
Public propertyContrast
Gets or sets contrast of image (only for cameras)
Public propertyConvertRgb
Boolean flags indicating whether images should be converted to RGB
Public propertyCvPtr
Native pointer of OpenCV structure
(Inherited from DisposableCvObject.)
Public propertyExposure
Exposure (only for cameras)
Public propertyFormat
The format of the Mat objects returned by retrieve()
Public propertyFourCC
Gets or sets 4-character code of codec
Public propertyFps
Gets or sets frame rate
Public propertyFrameCount
Gets number of frames in video file
Public propertyFrameHeight
Gets or sets height of frames in the video stream
Public propertyFrameWidth
Gets or sets width of frames in the video stream
Public propertyGain
Gain of the image (only for cameras)
Public propertyGamma
[CV_CAP_PROP_GAMMA]
Public propertyGStreamerQueueLength
default is 1 [CV_CAP_GSTREAMER_QUEUE_LENGTH]
Public propertyHue
Gets or sets hue of image (only for cameras)
Public propertyIsDisposed
Gets a value indicating whether this instance has been disposed.
(Inherited from DisposableObject.)
Public propertyIsEnabledDispose
Gets or sets a value indicating whether you permit disposing this instance.
(Inherited from DisposableObject.)
Public propertyMaxDC1394
[CV_CAP_PROP_MAX_DC1394]
Public propertyMode
A backend-specific value indicating the current capture mode
Public propertyMonocrome
Public propertyOpenNI_Baseline
in mm [CV_CAP_PROP_OPENNI_BASELINE]
Public propertyOpenNI_DepthGeneratorBaseline
[CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE]
Public propertyOpenNI_DepthGeneratorFocalLength
[CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH]
Public propertyOpenNI_DepthGeneratorRegistrationON
[CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON]
Public propertyOpenNI_FocalLength
in pixels [CV_CAP_PROP_OPENNI_FOCAL_LENGTH]
Public propertyOpenNI_FrameMaxDepth
in mm [CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH]
Public propertyOpenNI_ImageGeneratorOutputMode
[CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE]
Public propertyOpenNI_OutputMode
[CV_CAP_PROP_OPENNI_OUTPUT_MODE]
Public propertyOpenNI_Registratiob
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]
Public propertyOpenNI_RegistrationON
flag [CV_CAP_PROP_OPENNI_REGISTRATION_ON]
Public propertyPosAviRatio
Gets or sets relative position of video file
Public propertyPosFrames
Gets or sets 0-based index of the frame to be decoded/captured next
Public propertyPosMsec
Gets or sets film current position in milliseconds or video capture timestamp
Public propertyPreviewFormat
readonly, tricky property, returns cpnst char* indeed [CV_CAP_PROP_PREVIEW_FORMAT]
Public propertyPvAPIMulticastIP
ip for anable multicast master mode. 0 for disable multicast [CV_CAP_PROP_PVAPI_MULTICASTIP]
Public propertyRectification
TOWRITE (note: only supported by DC1394 v 2.x backend currently)
Public propertySaturation
Gets or sets saturation of image (only for cameras)
Public propertySharpness
[CV_CAP_PROP_SHARPNESS]
Public propertySupportedPreviewSizesString
readonly, tricky property, returns cpnst char* indeed [CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING]
Public propertyTemperature
[CV_CAP_PROP_TEMPERATURE]
Public propertyTrigger
[CV_CAP_PROP_TRIGGER]
Public propertyTriggerDelay
[CV_CAP_PROP_TRIGGER_DELAY]
Public propertyWhiteBalance
Public propertyWhiteBalanceRedV
[CV_CAP_PROP_WHITE_BALANCE_RED_V]
Public propertyXI_AEAG
Automatic exposure/gain [CV_CAP_PROP_XI_AEAG]
Public propertyXI_AEAGLevel
default is 1 [CV_CAP_PROP_XI_AEAG_LEVEL]
Public propertyXI_AEMaxLimit
Maximum limit of exposure in AEAG procedure [CV_CAP_PROP_XI_AE_MAX_LIMIT]
Public propertyXI_AGMaxLimit
Maximum limit of gain in AEAG procedure [CV_CAP_PROP_XI_AG_MAX_LIMIT]
Public propertyXI_AutoWB
Automatic white balance [CV_CAP_PROP_XI_AUTO_WB]
Public propertyXI_DataFormat
Output data format. [CV_CAP_PROP_XI_DATA_FORMAT]
Public propertyXI_Downsampling
Change image resolution by binning or skipping. [CV_CAP_PROP_XI_DOWNSAMPLING]
Public propertyXI_ExpPriority
Exposure priority (0.5 - exposure 50%, gain 50%). [CV_CAP_PROP_XI_EXP_PRIORITY]
Public propertyXI_GpiLevel
Get general purpose level [CV_CAP_PROP_XI_GPI_LEVEL]
Public propertyXI_GpiMode
Set general purpose input mode [CV_CAP_PROP_XI_GPI_MODE]
Public propertyXI_GpiSelector
Selects general purpose input [CV_CAP_PROP_XI_GPI_SELECTOR]
Public propertyXI_GpoMode
Set general purpose output mode [CV_CAP_PROP_XI_GPO_MODE]
Public propertyXI_GpoSelector
Selects general purpose output [CV_CAP_PROP_XI_GPO_SELECTOR]
Public propertyXI_LedMode
Define camera signalling LED functionality [CV_CAP_PROP_XI_LED_MODE]
Public propertyXI_LedSelector
Selects camera signalling LED [CV_CAP_PROP_XI_LED_SELECTOR]
Public propertyXI_ManualWB
Calculates White Balance(must be called during acquisition) [CV_CAP_PROP_XI_MANUAL_WB]
Public propertyXI_OffsetX
Horizontal offset from the origin to the area of interest (in pixels). [CV_CAP_PROP_XI_OFFSET_X]
Public propertyXI_OffsetY
Vertical offset from the origin to the area of interest (in pixels). [CV_CAP_PROP_XI_OFFSET_Y]
Public propertyXI_Timeout
default is 1 [CV_CAP_PROP_XI_TIMEOUT]
Public propertyXI_TrgSoftware
Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE. [CV_CAP_PROP_XI_TRG_SOFTWARE]
Public propertyXI_TrgSource
Defines source of trigger. [CV_CAP_PROP_XI_TRG_SOURCE]
Top
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)
Clean up any resources being used.
(Overrides DisposableCvObjectDispose(Boolean).)
Public methodEquals (Inherited from Object.)
Protected methodFinalize
Destructor
(Inherited from DisposableObject.)
Public methodStatic memberFromCamera(Int32)
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 methodStatic memberFromCamera(CaptureDevice)
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 methodStatic memberFromCamera(CaptureDevice, Int32)
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 methodStatic memberFromFile
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 methodGetCaptureProperty(Int32)
Retrieves the specified property of camera or video file.
Public methodGetCaptureProperty(CaptureProperty)
Retrieves the specified property of camera or video file.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodGrabFrame
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.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodNotifyMemoryPressure
Notifies the allocated size of memory.
(Inherited from DisposableObject.)
Public methodQueryFrame
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 methodRetrieveFrame
Returns the pointer to the image grabbed with cvGrabFrame function. The returned image should not be released or modified by user.
Public methodRetrieveFrame(Int32)
Returns the pointer to the image grabbed with cvGrabFrame function. The returned image should not be released or modified by user.
Public methodRetrieveFrame(CameraChannels)
Returns the pointer to the image grabbed with cvGrabFrame function. The returned image should not be released or modified by user.
Public methodSetCaptureProperty(Int32, Double)
Sets the specified property of video capturing.
Public methodSetCaptureProperty(CaptureProperty, Double)
Sets the specified property of video capturing.
Public methodThrowIfDisposed
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.)
Public methodToString (Inherited from Object.)
Top
Fields

  NameDescription
Protected fieldcaptureType
Capture type (File or Camera)
Protected fielddataHandle
Gets or sets a handle which allocates using cvSetData.
(Inherited from DisposableObject.)
Protected fielddisposed
Track whether Dispose has been called
Protected fieldptr
Data pointer
(Inherited from DisposableCvObject.)
Top
See Also

Reference