Module videoio

Source
Expand description

§Video I/O

Read and write video or images sequence with OpenCV

§See also:

  • [videoio_overview]
  • Tutorials: [tutorial_table_of_content_app]

    §Flags for video I/O

    §Additional flags for video I/O API backends

    §Hardware-accelerated video decoding and encoding

    §C API for video I/O

    §iOS glue for video I/O

    §WinRT glue for video I/O

    §Query I/O API backends registry

Modules§

prelude

Structs§

IStreamReader
Read data stream interface
VideoCapture
Class for video capturing from video files, image sequences or cameras.
VideoWriter
Video writer class.

Enums§

VideoAccelerationType
Video Acceleration type
VideoCaptureAPIs
cv::VideoCapture API backends identifier.
VideoCaptureOBSensorDataType
OBSENSOR (for Orbbec 3D-Sensor device/module )
VideoCaptureOBSensorGenerators
OBSENSOR stream generator
VideoCaptureOBSensorProperties
OBSENSOR properties
VideoCaptureProperties
cv::VideoCapture generic properties identifier.
VideoWriterProperties
cv::VideoWriter generic properties identifier.

Constants§

CAP_ANDROID
MediaNDK (API Level 21+) and NDK Camera (API level 24+) for Android
CAP_ANY
Auto detect == 0
CAP_ARAVIS
Aravis SDK
CAP_AVFOUNDATION
AVFoundation framework for iOS (OS X Lion will have the same API)
CAP_CMU1394
Same value as CAP_FIREWIRE
CAP_DC1394
Same value as CAP_FIREWIRE
CAP_DSHOW
DirectShow (via videoInput)
CAP_FFMPEG
Open and record video file or stream using the FFMPEG library
CAP_FIREWARE
Same value as CAP_FIREWIRE
CAP_FIREWIRE
IEEE 1394 drivers
CAP_GIGANETIX
Smartek Giganetix GigEVisionSDK
CAP_GPHOTO2
gPhoto2 connection
CAP_GSTREAMER
GStreamer
CAP_IEEE1394
Same value as CAP_FIREWIRE
CAP_IMAGES
OpenCV Image Sequence (e.g. img_%02d.jpg)
CAP_INTELPERC
RealSense (former Intel Perceptual Computing SDK)
CAP_INTELPERC_DEPTH_GENERATOR
CAP_INTELPERC_DEPTH_MAP
Each pixel is a 16-bit integer. The value indicates the distance from an object to the camera’s XY plane or the Cartesian depth.
CAP_INTELPERC_GENERATORS_MASK
CAP_INTELPERC_IMAGE
CAP_INTELPERC_IMAGE_GENERATOR
CAP_INTELPERC_IR_GENERATOR
CAP_INTELPERC_IR_MAP
Each pixel is a 16-bit integer. The value indicates the intensity of the reflected laser beam.
CAP_INTELPERC_UVDEPTH_MAP
Each pixel contains two 32-bit floating point values in the range of 0-1, representing the mapping of depth coordinates to the color coordinates.
CAP_INTEL_MFX
Intel MediaSDK
CAP_MSMF
Microsoft Media Foundation (via videoInput). See platform specific notes above.
CAP_OBSENSOR
For Orbbec 3D-Sensor device/module (Astra+, Femto, Astra2, Gemini2, Gemini2L, Gemini2XL, Femto Mega) attention: Astra2 cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions.
CAP_OBSENSOR_BGR_IMAGE
Data given from BGR stream generator
CAP_OBSENSOR_DEPTH_GENERATOR
CAP_OBSENSOR_DEPTH_MAP
Depth values in mm (CV_16UC1)
CAP_OBSENSOR_GENERATORS_MASK
CAP_OBSENSOR_IMAGE_GENERATOR
CAP_OBSENSOR_IR_GENERATOR
CAP_OBSENSOR_IR_IMAGE
Data given from IR stream generator(CV_16UC1)
CAP_OPENCV_MJPEG
Built-in OpenCV MotionJPEG codec
CAP_OPENNI
OpenNI (for Kinect)
CAP_OPENNI2
OpenNI2 (for Kinect)
CAP_OPENNI2_ASTRA
OpenNI2 (for Orbbec Astra)
CAP_OPENNI2_ASUS
OpenNI2 (for Asus Xtion and Occipital Structure sensors)
CAP_OPENNI_ASUS
OpenNI (for Asus Xtion)
CAP_OPENNI_BGR_IMAGE
Data given from RGB image generator
CAP_OPENNI_DEPTH_GENERATOR
CAP_OPENNI_DEPTH_GENERATOR_BASELINE
CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH
CAP_OPENNI_DEPTH_GENERATOR_PRESENT
CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION
CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON
CAP_OPENNI_DEPTH_MAP
Depth values in mm (CV_16UC1)
CAP_OPENNI_DISPARITY_MAP
Disparity in pixels (CV_8UC1)
CAP_OPENNI_DISPARITY_MAP_32F
Disparity in pixels (CV_32FC1)
CAP_OPENNI_GENERATORS_MASK
CAP_OPENNI_GRAY_IMAGE
Data given from RGB image generator
CAP_OPENNI_IMAGE_GENERATOR
CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE
CAP_OPENNI_IMAGE_GENERATOR_PRESENT
CAP_OPENNI_IR_GENERATOR
CAP_OPENNI_IR_GENERATOR_PRESENT
CAP_OPENNI_IR_IMAGE
Data given from IR image generator
CAP_OPENNI_POINT_CLOUD_MAP
XYZ in meters (CV_32FC3)
CAP_OPENNI_QVGA_30HZ
CAP_OPENNI_QVGA_60HZ
CAP_OPENNI_SXGA_15HZ
CAP_OPENNI_SXGA_30HZ
CAP_OPENNI_VALID_DEPTH_MASK
CV_8UC1
CAP_OPENNI_VGA_30HZ
CAP_PROP_ANDROID_DEVICE_TORCH
CAP_PROP_APERTURE
Aperture. Can be readonly, depends on camera program.
CAP_PROP_ARAVIS_AUTOTRIGGER
Automatically trigger frame capture if camera is configured with software trigger
CAP_PROP_AUDIO_BASE_INDEX
(read-only) Index of the first audio channel for .retrieve() calls. That audio channel number continues enumeration after video channels.
CAP_PROP_AUDIO_DATA_DEPTH
(open, read) Alternative definition to bits-per-sample, but with clear handling of 32F / 32S
CAP_PROP_AUDIO_POS
(read-only) Audio position is measured in samples. Accurate audio sample timestamp of previous grabbed fragment. See CAP_PROP_AUDIO_SAMPLES_PER_SECOND and CAP_PROP_AUDIO_SHIFT_NSEC.
CAP_PROP_AUDIO_SAMPLES_PER_SECOND
(open, read) determined from file/codec input. If not specified, then selected audio sample rate is 44100
CAP_PROP_AUDIO_SHIFT_NSEC
(read only) Contains the time difference between the start of the audio stream and the video stream in nanoseconds. Positive value means that audio is started after the first video frame. Negative value means that audio is started before the first video frame.
CAP_PROP_AUDIO_STREAM
(open-only) Specify stream in multi-language media files, -1 - disable audio processing or microphone. Default value is -1.
CAP_PROP_AUDIO_SYNCHRONIZE
(open, read) Enables audio synchronization.
CAP_PROP_AUDIO_TOTAL_CHANNELS
(read-only) Number of audio channels in the selected audio stream (mono, stereo, etc)
CAP_PROP_AUDIO_TOTAL_STREAMS
(read-only) Number of audio streams.
CAP_PROP_AUTOFOCUS
CAP_PROP_AUTO_EXPOSURE
DC1394: exposure control done by camera, user can adjust reference level using this feature.
CAP_PROP_AUTO_WB
enable/ disable auto white-balance
CAP_PROP_BACKEND
Current backend (enum VideoCaptureAPIs). Read-only property
CAP_PROP_BACKLIGHT
CAP_PROP_BITRATE
(read-only) Video bitrate in kbits/s
CAP_PROP_BRIGHTNESS
Brightness of the image (only for those cameras that support).
CAP_PROP_BUFFERSIZE
CAP_PROP_CHANNEL
Video input or Channel Number (only for those cameras that support)
CAP_PROP_CODEC_EXTRADATA_INDEX
Positive index indicates that returning extra data is supported by the video back end. This can be retrieved as cap.retrieve(data, ). E.g. When reading from a h264 encoded RTSP stream, the FFmpeg backend could return the SPS and/or PPS if available (if sent in reply to a DESCRIBE request), from calls to cap.retrieve(data, ).
CAP_PROP_CODEC_PIXEL_FORMAT
(read-only) codec’s pixel format. 4-character code - see VideoWriter::fourcc . Subset of AV_PIX_FMT_* or -1 if unknown
CAP_PROP_CONTRAST
Contrast of the image (only for cameras).
CAP_PROP_CONVERT_RGB
Boolean flags indicating whether images should be converted to RGB.
GStreamer note: The flag is ignored in case if custom pipeline is used. It’s user responsibility to interpret pipeline output.
CAP_PROP_DC1394_MAX
CAP_PROP_DC1394_MODE_AUTO
CAP_PROP_DC1394_MODE_MANUAL
set automatically when a value of the feature is set by the user.
CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO
CAP_PROP_DC1394_OFF
turn the feature off (not controlled manually nor automatically).
CAP_PROP_DTS_DELAY
(read-only) FFmpeg back-end only - maximum difference between presentation (pts) and decompression timestamps (dts) using FPS time base. e.g. delay is maximum when frame_num = 0, if true, VideoCapture::get(\ref CAP_PROP_PTS) = 0 and VideoCapture::get(\ref CAP_PROP_DTS_DELAY) = 2, dts = -2. Non zero values usually imply the stream is encoded using B-frames which are not decoded in presentation order.
CAP_PROP_EXPOSURE
Exposure (only for those cameras that support).
CAP_PROP_EXPOSUREPROGRAM
Camera exposure program.
CAP_PROP_FOCUS
CAP_PROP_FORMAT
Format of the %Mat objects (see Mat::type()) returned by VideoCapture::retrieve(). Set value -1 to fetch undecoded RAW video streams (as Mat 8UC1).
CAP_PROP_FOURCC
4-character code of codec. see VideoWriter::fourcc .
CAP_PROP_FPS
Frame rate.
CAP_PROP_FRAME_COUNT
Number of frames in the video file.
CAP_PROP_FRAME_HEIGHT
Height of the frames in the video stream.
CAP_PROP_FRAME_TYPE
(read-only) FFmpeg back-end only - Frame type ascii code (73 = ‘I’, 80 = ‘P’, 66 = ‘B’ or 63 = ‘?’ if unknown) of the most recently read frame.
CAP_PROP_FRAME_WIDTH
Width of the frames in the video stream.
CAP_PROP_GAIN
Gain of the image (only for those cameras that support).
CAP_PROP_GAMMA
CAP_PROP_GIGA_FRAME_HEIGH_MAX
CAP_PROP_GIGA_FRAME_OFFSET_X
CAP_PROP_GIGA_FRAME_OFFSET_Y
CAP_PROP_GIGA_FRAME_SENS_HEIGH
CAP_PROP_GIGA_FRAME_SENS_WIDTH
CAP_PROP_GIGA_FRAME_WIDTH_MAX
CAP_PROP_GPHOTO2_COLLECT_MSGS
Collect messages with details.
CAP_PROP_GPHOTO2_FLUSH_MSGS
Readonly, returns (const char *).
CAP_PROP_GPHOTO2_PREVIEW
Capture only preview from liveview mode.
CAP_PROP_GPHOTO2_RELOAD_CONFIG
Trigger, only by set. Reload camera settings.
CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE
Reload all settings on set.
CAP_PROP_GPHOTO2_WIDGET_ENUMERATE
Readonly, returns (const char *).
CAP_PROP_GSTREAMER_QUEUE_LENGTH
Default is 1
CAP_PROP_GUID
CAP_PROP_HUE
Hue of the image (only for cameras).
CAP_PROP_HW_ACCELERATION
(open-only) Hardware acceleration type (see #VideoAccelerationType). Setting supported only via params parameter in cv::VideoCapture constructor / .open() method. Default value is backend-specific.
CAP_PROP_HW_ACCELERATION_USE_OPENCL
(open-only) If non-zero, create new OpenCL context and bind it to current thread. The OpenCL context created with Video Acceleration context attached it (if not attached yet) for optimized GPU data copy between HW accelerated decoder and cv::UMat.
CAP_PROP_HW_DEVICE
(open-only) Hardware device index (select GPU if multiple available). Device enumeration is acceleration type specific.
CAP_PROP_IMAGES_BASE
CAP_PROP_IMAGES_LAST
CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD
CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ
CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT
CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE
CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE
CAP_PROP_INTELPERC_PROFILE_COUNT
CAP_PROP_INTELPERC_PROFILE_IDX
CAP_PROP_IOS_DEVICE_EXPOSURE
CAP_PROP_IOS_DEVICE_FLASH
CAP_PROP_IOS_DEVICE_FOCUS
CAP_PROP_IOS_DEVICE_TORCH
CAP_PROP_IOS_DEVICE_WHITEBALANCE
CAP_PROP_IRIS
CAP_PROP_ISO_SPEED
CAP_PROP_LRF_HAS_KEY_FRAME
FFmpeg back-end only - Indicates whether the Last Raw Frame (LRF), output from VideoCapture::read() when VideoCapture is initialized with VideoCapture::open(CAP_FFMPEG, {CAP_PROP_FORMAT, -1}) or VideoCapture::set(CAP_PROP_FORMAT,-1) is called before the first call to VideoCapture::read(), contains encoded data for a key frame.
CAP_PROP_MODE
Backend-specific value indicating the current capture mode.
CAP_PROP_MONOCHROME
CAP_PROP_N_THREADS
(open-only) Set the maximum number of threads to use. Use 0 to use as many threads as CPU cores (applicable for FFmpeg back-end only).
CAP_PROP_OBSENSOR_INTRINSIC_CX
CAP_PROP_OBSENSOR_INTRINSIC_CY
CAP_PROP_OBSENSOR_INTRINSIC_FX
CAP_PROP_OBSENSOR_INTRINSIC_FY
CAP_PROP_OPENNI2_MIRROR
CAP_PROP_OPENNI2_SYNC
CAP_PROP_OPENNI_APPROX_FRAME_SYNC
CAP_PROP_OPENNI_BASELINE
In mm
CAP_PROP_OPENNI_CIRCLE_BUFFER
CAP_PROP_OPENNI_FOCAL_LENGTH
In pixels
CAP_PROP_OPENNI_FRAME_MAX_DEPTH
In mm
CAP_PROP_OPENNI_GENERATOR_PRESENT
CAP_PROP_OPENNI_MAX_BUFFER_SIZE
CAP_PROP_OPENNI_MAX_TIME_DURATION
CAP_PROP_OPENNI_OUTPUT_MODE
CAP_PROP_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”).
CAP_PROP_OPENNI_REGISTRATION_ON
CAP_PROP_OPEN_TIMEOUT_MSEC
(open-only) timeout in milliseconds for opening a video capture (applicable for FFmpeg and GStreamer back-ends only)
CAP_PROP_ORIENTATION_AUTO
if true - rotates output frames of CvCapture considering video file’s metadata (applicable for FFmpeg and AVFoundation back-ends only) (https://github.com/opencv/opencv/issues/15499)
CAP_PROP_ORIENTATION_META
(read-only) Frame rotation defined by stream meta (applicable for FFmpeg and AVFoundation back-ends only)
CAP_PROP_PAN
CAP_PROP_POS_AVI_RATIO
Relative position of the video file: 0=start of the film, 1=end of the film.
CAP_PROP_POS_FRAMES
0-based index of the frame to be decoded/captured next. When the index i is set in RAW mode (CAP_PROP_FORMAT == -1) this will seek to the key frame k, where k <= i.
CAP_PROP_POS_MSEC
Current position of the video file in milliseconds.
CAP_PROP_PTS
(read-only) FFmpeg back-end only - presentation timestamp of the most recently read frame using the FPS time base. e.g. fps = 25, VideoCapture::get(\ref CAP_PROP_PTS) = 3, presentation time = 3/25 seconds.
CAP_PROP_PVAPI_BINNINGX
Horizontal binning factor.
CAP_PROP_PVAPI_BINNINGY
Vertical binning factor.
CAP_PROP_PVAPI_DECIMATIONHORIZONTAL
Horizontal sub-sampling of the image.
CAP_PROP_PVAPI_DECIMATIONVERTICAL
Vertical sub-sampling of the image.
CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE
FrameStartTriggerMode: Determines how a frame is initiated.
CAP_PROP_PVAPI_MULTICASTIP
IP for enable multicast master mode. 0 for disable multicast.
CAP_PROP_PVAPI_PIXELFORMAT
Pixel format.
CAP_PROP_READ_TIMEOUT_MSEC
(open-only) timeout in milliseconds for reading from a video capture (applicable for FFmpeg and GStreamer back-ends only)
CAP_PROP_RECTIFICATION
Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently).
CAP_PROP_ROLL
CAP_PROP_SAR_DEN
Sample aspect ratio: num/den (den)
CAP_PROP_SAR_NUM
Sample aspect ratio: num/den (num)
CAP_PROP_SATURATION
Saturation of the image (only for cameras).
CAP_PROP_SETTINGS
Pop up video/camera filter dialog (note: only supported by DSHOW backend currently. The property value is ignored)
CAP_PROP_SHARPNESS
CAP_PROP_SPEED
Exposure speed. Can be readonly, depends on camera program.
CAP_PROP_STREAM_OPEN_TIME_USEC
(read-only) time in microseconds since Jan 1 1970 when stream was opened. Applicable for FFmpeg backend only. Useful for RTSP and other live streams
CAP_PROP_TEMPERATURE
CAP_PROP_TILT
CAP_PROP_TRIGGER
CAP_PROP_TRIGGER_DELAY
CAP_PROP_VIDEO_STREAM
(open-only) Specify video stream, 0-based index. Use -1 to disable video stream from file or IP cameras. Default value is 0.
CAP_PROP_VIDEO_TOTAL_CHANNELS
(read-only) Number of video channels
CAP_PROP_VIEWFINDER
Enter liveview mode.
CAP_PROP_WB_TEMPERATURE
white-balance color temperature
CAP_PROP_WHITE_BALANCE_BLUE_U
Currently unsupported.
CAP_PROP_WHITE_BALANCE_RED_V
CAP_PROP_XI_ACQ_BUFFER_SIZE
Acquisition buffer size in buffer_size_unit. Default bytes.
CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT
Acquisition buffer size unit in bytes. Default 1. E.g. Value 1024 means that buffer_size is in KiBytes.
CAP_PROP_XI_ACQ_FRAME_BURST_COUNT
Sets number of frames acquired by burst. This burst is used only if trigger is set to FrameBurstStart.
CAP_PROP_XI_ACQ_TIMING_MODE
Type of sensor frames timing.
CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT
Number of buffers to commit to low level.
CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE
Acquisition transport buffer size in bytes.
CAP_PROP_XI_AEAG
Automatic exposure/gain.
CAP_PROP_XI_AEAG_LEVEL
Average intensity of output signal AEAG should achieve(in %).
CAP_PROP_XI_AEAG_ROI_HEIGHT
Automatic exposure/gain ROI Height.
CAP_PROP_XI_AEAG_ROI_OFFSET_X
Automatic exposure/gain ROI offset X.
CAP_PROP_XI_AEAG_ROI_OFFSET_Y
Automatic exposure/gain ROI offset Y.
CAP_PROP_XI_AEAG_ROI_WIDTH
Automatic exposure/gain ROI Width.
CAP_PROP_XI_AE_MAX_LIMIT
Maximum limit of exposure in AEAG procedure.
CAP_PROP_XI_AG_MAX_LIMIT
Maximum limit of gain in AEAG procedure.
CAP_PROP_XI_APPLY_CMS
Enable applying of CMS profiles to xiGetImage (see XI_PRM_INPUT_CMS_PROFILE, XI_PRM_OUTPUT_CMS_PROFILE).
CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION
Automatic bandwidth calculation.
CAP_PROP_XI_AUTO_WB
Automatic white balance.
CAP_PROP_XI_AVAILABLE_BANDWIDTH
Calculate and returns available interface bandwidth(int Megabits).
CAP_PROP_XI_BINNING_HORIZONTAL
Horizontal Binning - number of horizontal photo-sensitive cells to combine together.
CAP_PROP_XI_BINNING_PATTERN
Binning pattern type.
CAP_PROP_XI_BINNING_SELECTOR
Binning engine selector.
CAP_PROP_XI_BINNING_VERTICAL
Vertical Binning - number of vertical photo-sensitive cells to combine together.
CAP_PROP_XI_BPC
Correction of bad pixels.
CAP_PROP_XI_BUFFERS_QUEUE_SIZE
Queue of field/frame buffers.
CAP_PROP_XI_BUFFER_POLICY
Data move policy.
CAP_PROP_XI_CC_MATRIX_00
Color Correction Matrix element [0][0].
CAP_PROP_XI_CC_MATRIX_01
Color Correction Matrix element [0][1].
CAP_PROP_XI_CC_MATRIX_02
Color Correction Matrix element [0][2].
CAP_PROP_XI_CC_MATRIX_03
Color Correction Matrix element [0][3].
CAP_PROP_XI_CC_MATRIX_10
Color Correction Matrix element [1][0].
CAP_PROP_XI_CC_MATRIX_11
Color Correction Matrix element [1][1].
CAP_PROP_XI_CC_MATRIX_12
Color Correction Matrix element [1][2].
CAP_PROP_XI_CC_MATRIX_13
Color Correction Matrix element [1][3].
CAP_PROP_XI_CC_MATRIX_20
Color Correction Matrix element [2][0].
CAP_PROP_XI_CC_MATRIX_21
Color Correction Matrix element [2][1].
CAP_PROP_XI_CC_MATRIX_22
Color Correction Matrix element [2][2].
CAP_PROP_XI_CC_MATRIX_23
Color Correction Matrix element [2][3].
CAP_PROP_XI_CC_MATRIX_30
Color Correction Matrix element [3][0].
CAP_PROP_XI_CC_MATRIX_31
Color Correction Matrix element [3][1].
CAP_PROP_XI_CC_MATRIX_32
Color Correction Matrix element [3][2].
CAP_PROP_XI_CC_MATRIX_33
Color Correction Matrix element [3][3].
CAP_PROP_XI_CHIP_TEMP
Camera sensor temperature.
CAP_PROP_XI_CMS
Mode of color management system.
CAP_PROP_XI_COLOR_FILTER_ARRAY
Returns color filter array type of RAW data.
CAP_PROP_XI_COLUMN_FPN_CORRECTION
Correction of column FPN.
CAP_PROP_XI_COOLING
Start camera cooling.
CAP_PROP_XI_COUNTER_SELECTOR
Select counter.
CAP_PROP_XI_COUNTER_VALUE
Counter status.
CAP_PROP_XI_DATA_FORMAT
Output data format.
CAP_PROP_XI_DEBOUNCE_EN
Enable/Disable debounce to selected GPI.
CAP_PROP_XI_DEBOUNCE_POL
Debounce polarity (pol = 1 t0 - falling edge, t1 - rising edge).
CAP_PROP_XI_DEBOUNCE_T0
Debounce time (x * 10us).
CAP_PROP_XI_DEBOUNCE_T1
Debounce time (x * 10us).
CAP_PROP_XI_DEBUG_LEVEL
Set debug level.
CAP_PROP_XI_DECIMATION_HORIZONTAL
Horizontal Decimation - horizontal sub-sampling of the image - reduces the horizontal resolution of the image by the specified vertical decimation factor.
CAP_PROP_XI_DECIMATION_PATTERN
Decimation pattern type.
CAP_PROP_XI_DECIMATION_SELECTOR
Decimation engine selector.
CAP_PROP_XI_DECIMATION_VERTICAL
Vertical Decimation - vertical sub-sampling of the image - reduces the vertical resolution of the image by the specified vertical decimation factor.
CAP_PROP_XI_DEFAULT_CC_MATRIX
Set default Color Correction Matrix.
CAP_PROP_XI_DEVICE_MODEL_ID
Returns device model id.
CAP_PROP_XI_DEVICE_RESET
Resets the camera to default state.
CAP_PROP_XI_DEVICE_SN
Returns device serial number.
CAP_PROP_XI_DOWNSAMPLING
Change image resolution by binning or skipping.
CAP_PROP_XI_DOWNSAMPLING_TYPE
Change image downsampling type.
CAP_PROP_XI_EXPOSURE
Exposure time in microseconds.
CAP_PROP_XI_EXPOSURE_BURST_COUNT
Sets the number of times of exposure in one frame.
CAP_PROP_XI_EXP_PRIORITY
Exposure priority (0.5 - exposure 50%, gain 50%).
CAP_PROP_XI_FFS_ACCESS_KEY
Setting of key enables file operations on some cameras.
CAP_PROP_XI_FFS_FILE_ID
File number.
CAP_PROP_XI_FFS_FILE_SIZE
Size of file.
CAP_PROP_XI_FRAMERATE
Define framerate in Hz.
CAP_PROP_XI_FREE_FFS_SIZE
Size of free camera FFS.
CAP_PROP_XI_GAIN
Gain in dB.
CAP_PROP_XI_GAIN_SELECTOR
Gain selector for parameter Gain allows to select different type of gains.
CAP_PROP_XI_GAMMAC
Chromaticity gamma.
CAP_PROP_XI_GAMMAY
Luminosity gamma.
CAP_PROP_XI_GPI_LEVEL
Get general purpose level.
CAP_PROP_XI_GPI_MODE
Set general purpose input mode.
CAP_PROP_XI_GPI_SELECTOR
Selects general purpose input.
CAP_PROP_XI_GPO_MODE
Set general purpose output mode.
CAP_PROP_XI_GPO_SELECTOR
Selects general purpose output.
CAP_PROP_XI_HDR
Enable High Dynamic Range feature.
CAP_PROP_XI_HDR_KNEEPOINT_COUNT
The number of kneepoints in the PWLR.
CAP_PROP_XI_HDR_T1
Position of first kneepoint(in % of XI_PRM_EXPOSURE).
CAP_PROP_XI_HDR_T2
Position of second kneepoint (in % of XI_PRM_EXPOSURE).
CAP_PROP_XI_HEIGHT
Height of the Image provided by the device (in pixels).
CAP_PROP_XI_HOUS_BACK_SIDE_TEMP
Camera housing back side temperature.
CAP_PROP_XI_HOUS_TEMP
Camera housing temperature.
CAP_PROP_XI_HW_REVISION
Returns hardware revision number.
CAP_PROP_XI_IMAGE_BLACK_LEVEL
Last image black level counts. Can be used for Offline processing to recall it.
CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH
bitdepth of data returned by function xiGetImage.
CAP_PROP_XI_IMAGE_DATA_FORMAT
Output data format.
CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA
The alpha channel of RGB32 output image format.
CAP_PROP_XI_IMAGE_IS_COLOR
Returns 1 for color cameras.
CAP_PROP_XI_IMAGE_PAYLOAD_SIZE
Buffer size in bytes sufficient for output image returned by xiGetImage.
CAP_PROP_XI_IS_COOLED
Returns 1 for cameras that support cooling.
CAP_PROP_XI_IS_DEVICE_EXIST
Returns 1 if camera connected and works properly.
CAP_PROP_XI_KNEEPOINT1
Value of first kneepoint (% of sensor saturation).
CAP_PROP_XI_KNEEPOINT2
Value of second kneepoint (% of sensor saturation).
CAP_PROP_XI_LED_MODE
Define camera signalling LED functionality.
CAP_PROP_XI_LED_SELECTOR
Selects camera signalling LED.
CAP_PROP_XI_LENS_APERTURE_VALUE
Current lens aperture value in stops. Examples: 2.8, 4, 5.6, 8, 11.
CAP_PROP_XI_LENS_FEATURE
Allows access to lens feature value currently selected by XI_PRM_LENS_FEATURE_SELECTOR.
CAP_PROP_XI_LENS_FEATURE_SELECTOR
Selects the current feature which is accessible by XI_PRM_LENS_FEATURE.
CAP_PROP_XI_LENS_FOCAL_LENGTH
Lens focal distance in mm.
CAP_PROP_XI_LENS_FOCUS_DISTANCE
Lens focus distance in cm.
CAP_PROP_XI_LENS_FOCUS_MOVE
Moves lens focus motor by steps set in XI_PRM_LENS_FOCUS_MOVEMENT_VALUE.
CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE
Lens current focus movement value to be used by XI_PRM_LENS_FOCUS_MOVE in motor steps.
CAP_PROP_XI_LENS_MODE
Status of lens control interface. This shall be set to XI_ON before any Lens operations.
CAP_PROP_XI_LIMIT_BANDWIDTH
Set/get bandwidth(datarate)(in Megabits).
CAP_PROP_XI_LUT_EN
Activates LUT.
CAP_PROP_XI_LUT_INDEX
Control the index (offset) of the coefficient to access in the LUT.
CAP_PROP_XI_LUT_VALUE
Value at entry LUTIndex of the LUT.
CAP_PROP_XI_MANUAL_WB
Calculates White Balance(must be called during acquisition).
CAP_PROP_XI_OFFSET_X
Horizontal offset from the origin to the area of interest (in pixels).
CAP_PROP_XI_OFFSET_Y
Vertical offset from the origin to the area of interest (in pixels).
CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH
Device output data bit depth.
CAP_PROP_XI_OUTPUT_DATA_PACKING
Device output data packing (or grouping) enabled. Packing could be enabled if output_data_bit_depth > 8 and packing capability is available.
CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE
Data packing type. Some cameras supports only specific packing type.
CAP_PROP_XI_RECENT_FRAME
GetImage returns most recent frame.
CAP_PROP_XI_REGION_MODE
Activates/deactivates Region selected by Region Selector.
CAP_PROP_XI_REGION_SELECTOR
Selects Region in Multiple ROI which parameters are set by width, height, … ,region mode.
CAP_PROP_XI_ROW_FPN_CORRECTION
Correction of row FPN.
CAP_PROP_XI_SENSOR_BOARD_TEMP
Camera sensor board temperature.
CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ
Sensor clock frequency in Hz.
CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX
Sensor clock frequency index. Sensor with selected frequencies have possibility to set the frequency only by this index.
CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH
Sensor output data bit depth.
CAP_PROP_XI_SENSOR_FEATURE_SELECTOR
Selects the current feature which is accessible by XI_PRM_SENSOR_FEATURE_VALUE.
CAP_PROP_XI_SENSOR_FEATURE_VALUE
Allows access to sensor feature value currently selected by XI_PRM_SENSOR_FEATURE_SELECTOR.
CAP_PROP_XI_SENSOR_MODE
Current sensor mode. Allows to select sensor mode by one integer. Setting of this parameter affects: image dimensions and downsampling.
CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT
Number of output channels from sensor used for data transfer.
CAP_PROP_XI_SENSOR_TAPS
Number of taps.
CAP_PROP_XI_SHARPNESS
Sharpness Strength.
CAP_PROP_XI_SHUTTER_TYPE
Change sensor shutter type(CMOS sensor).
CAP_PROP_XI_TARGET_TEMP
Set sensor target temperature for cooling.
CAP_PROP_XI_TEST_PATTERN
Selects which test pattern type is generated by the selected generator.
CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR
Selects which test pattern generator is controlled by the TestPattern feature.
CAP_PROP_XI_TIMEOUT
Image capture timeout in milliseconds.
CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT
Current format of pixels on transport layer.
CAP_PROP_XI_TRG_DELAY
Specifies the delay in microseconds (us) to apply after the trigger reception before activating it.
CAP_PROP_XI_TRG_SELECTOR
Selects the type of trigger.
CAP_PROP_XI_TRG_SOFTWARE
Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE.
CAP_PROP_XI_TRG_SOURCE
Defines source of trigger.
CAP_PROP_XI_TS_RST_MODE
Defines how time stamp reset engine will be armed.
CAP_PROP_XI_TS_RST_SOURCE
Defines which source will be used for timestamp reset. Writing this parameter will trigger settings of engine (arming).
CAP_PROP_XI_USED_FFS_SIZE
Size of used camera FFS.
CAP_PROP_XI_WB_KB
White balance blue coefficient.
CAP_PROP_XI_WB_KG
White balance green coefficient.
CAP_PROP_XI_WB_KR
White balance red coefficient.
CAP_PROP_XI_WIDTH
Width of the Image provided by the device (in pixels).
CAP_PROP_ZOOM
CAP_PVAPI
PvAPI, Prosilica GigE SDK
CAP_PVAPI_DECIMATION_2OUTOF4
2 out of 4 decimation
CAP_PVAPI_DECIMATION_2OUTOF8
2 out of 8 decimation
CAP_PVAPI_DECIMATION_2OUTOF16
2 out of 16 decimation
CAP_PVAPI_DECIMATION_OFF
Off
CAP_PVAPI_FSTRIGMODE_FIXEDRATE
FixedRate
CAP_PVAPI_FSTRIGMODE_FREERUN
Freerun
CAP_PVAPI_FSTRIGMODE_SOFTWARE
Software
CAP_PVAPI_FSTRIGMODE_SYNCIN1
SyncIn1
CAP_PVAPI_FSTRIGMODE_SYNCIN2
SyncIn2
CAP_PVAPI_PIXELFORMAT_BAYER8
Bayer8
CAP_PVAPI_PIXELFORMAT_BAYER16
Bayer16
CAP_PVAPI_PIXELFORMAT_BGR24
Bgr24
CAP_PVAPI_PIXELFORMAT_BGRA32
Bgra32
CAP_PVAPI_PIXELFORMAT_MONO8
Mono8
CAP_PVAPI_PIXELFORMAT_MONO16
Mono16
CAP_PVAPI_PIXELFORMAT_RGB24
Rgb24
CAP_PVAPI_PIXELFORMAT_RGBA32
Rgba32
CAP_QT
QuickTime (obsolete, removed)
CAP_REALSENSE
Synonym for CAP_INTELPERC
CAP_UEYE
uEye Camera API
CAP_UNICAP
Unicap drivers (obsolete, removed)
CAP_V4L
V4L/V4L2 capturing support
CAP_V4L2
Same as CAP_V4L
CAP_VFW
Video For Windows (obsolete, removed)
CAP_WINRT
Microsoft Windows Runtime using Media Foundation
CAP_XIAPI
XIMEA Camera API
CAP_XINE
XINE engine (Linux)
CV__CAP_PROP_LATEST
CV__VIDEOWRITER_PROP_LATEST
VIDEOWRITER_PROP_DEPTH
Defaults to \ref CV_8U.
VIDEOWRITER_PROP_DTS_DELAY
Specifies the maximum difference between presentation (pts) and decompression timestamps (dts) using the FPS time base. This property is necessary only when encapsulating externally encoded video where the decoding order differs from the presentation order, such as in GOP patterns with bi-directional B-frames. The value should be calculated based on the specific GOP pattern used during encoding. For example, in a GOP with presentation order IBP and decoding order IPB, this value would be 1, as the B-frame is the second frame presented but the third to be decoded. It can be queried from the resulting encapsulated video file using VideoCapture::get(\ref CAP_PROP_DTS_DELAY). Non-zero values usually imply the stream is encoded using B-frames. FFmpeg back-end only.
VIDEOWRITER_PROP_FRAMEBYTES
(Read-only): Size of just encoded video frame. Note that the encoding order may be different from representation order.
VIDEOWRITER_PROP_HW_ACCELERATION
(open-only) Hardware acceleration type (see #VideoAccelerationType). Setting supported only via params parameter in VideoWriter constructor / .open() method. Default value is backend-specific.
VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL
(open-only) If non-zero, create new OpenCL context and bind it to current thread. The OpenCL context created with Video Acceleration context attached it (if not attached yet) for optimized GPU data copy between cv::UMat and HW accelerated encoder.
VIDEOWRITER_PROP_HW_DEVICE
(open-only) Hardware device index (select GPU if multiple available). Device enumeration is acceleration type specific.
VIDEOWRITER_PROP_IS_COLOR
If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames.
VIDEOWRITER_PROP_KEY_FLAG
Set to non-zero to signal that the following frames are key frames or zero if not, when encapsulating raw video (\ref VIDEOWRITER_PROP_RAW_VIDEO != 0). FFmpeg back-end only.
VIDEOWRITER_PROP_KEY_INTERVAL
(open-only) Set the key frame interval using raw video encapsulation (\ref VIDEOWRITER_PROP_RAW_VIDEO != 0). Defaults to 1 when not set. FFmpeg back-end only.
VIDEOWRITER_PROP_NSTRIPES
Number of stripes for parallel encoding. -1 for auto detection.
VIDEOWRITER_PROP_PTS
Specifies the frame presentation timestamp for each frame using the FPS time base. This property is only necessary when encapsulating externally encoded video where the decoding order differs from the presentation order, such as in GOP patterns with bi-directional B-frames. The value should be provided by your external encoder and for video sources with fixed frame rates it is equivalent to dividing the current frame’s presentation time (\ref CAP_PROP_POS_MSEC) by the frame duration (1000.0 / VideoCapture::get(\ref CAP_PROP_FPS)). It can be queried from the resulting encapsulated video file using VideoCapture::get(\ref CAP_PROP_PTS). FFmpeg back-end only.
VIDEOWRITER_PROP_QUALITY
Current quality (0..100%) of the encoded videostream. Can be adjusted dynamically in some codecs.
VIDEOWRITER_PROP_RAW_VIDEO
(open-only) Set to non-zero to enable encapsulation of an encoded raw video stream. Each raw encoded video frame should be passed to VideoWriter::write() as single row or column of a \ref CV_8UC1 Mat. \note If the key frame interval is not 1 then it must be manually specified by the user. This can either be performed during initialization passing \ref VIDEOWRITER_PROP_KEY_INTERVAL as one of the extra encoder params to \ref VideoWriter::VideoWriter(const String &, int, double, const Size &, const std::vector< int > &params) or afterwards by setting the \ref VIDEOWRITER_PROP_KEY_FLAG with \ref VideoWriter::set() before writing each frame. FFMpeg backend only.
VIDEO_ACCELERATION_ANY
Prefer to use H/W acceleration. If no one supported, then fallback to software processing.
VIDEO_ACCELERATION_D3D11
DirectX 11
VIDEO_ACCELERATION_MFX
libmfx (Intel MediaSDK/oneVPL)
VIDEO_ACCELERATION_NONE
Do not require any specific H/W acceleration, prefer software processing. Reading of this value means that special H/W accelerated handling is not added or not detected by OpenCV.
VIDEO_ACCELERATION_VAAPI
VAAPI

Traits§

IStreamReaderTrait
Mutable methods for crate::videoio::IStreamReader
IStreamReaderTraitConst
Constant methods for crate::videoio::IStreamReader
VideoCaptureTrait
Mutable methods for crate::videoio::VideoCapture
VideoCaptureTraitConst
Constant methods for crate::videoio::VideoCapture
VideoWriterTrait
Mutable methods for crate::videoio::VideoWriter
VideoWriterTraitConst
Constant methods for crate::videoio::VideoWriter

Functions§

get_backend_name
Returns backend API name or “UnknownVideoAPI(xxx)”
get_backends
Returns list of all available backends
get_camera_backend_plugin_version
Returns description and ABI/API version of videoio plugin’s camera interface
get_camera_backends
Returns list of available backends which works via cv::VideoCapture(int index)
get_stream_backend_plugin_version
Returns description and ABI/API version of videoio plugin’s stream capture interface
get_stream_backends
Returns list of available backends which works via cv::VideoCapture(filename)
get_stream_buffered_backend_plugin_version
Returns description and ABI/API version of videoio plugin’s buffer capture interface
get_stream_buffered_backends
Returns list of available backends which works via cv::VideoCapture(buffer)
get_writer_backend_plugin_version
Returns description and ABI/API version of videoio plugin’s writer interface
get_writer_backends
Returns list of available backends which works via cv::VideoWriter()
has_backend
Returns true if backend is available
is_backend_built_in
Returns true if backend is built in (false if backend is used as plugin)