OpenCV  3.1.0-dev
Open Source Computer Vision
Enumerations
Flags for video I/O

Enumerations

enum  cv::VideoCaptureAPIs {
  cv::CAP_ANY = 0,
  cv::CAP_VFW = 200,
  cv::CAP_V4L = 200,
  cv::CAP_V4L2 = CAP_V4L,
  cv::CAP_FIREWIRE = 300,
  cv::CAP_FIREWARE = CAP_FIREWIRE,
  cv::CAP_IEEE1394 = CAP_FIREWIRE,
  cv::CAP_DC1394 = CAP_FIREWIRE,
  cv::CAP_CMU1394 = CAP_FIREWIRE,
  cv::CAP_QT = 500,
  cv::CAP_UNICAP = 600,
  cv::CAP_DSHOW = 700,
  cv::CAP_PVAPI = 800,
  cv::CAP_OPENNI = 900,
  cv::CAP_OPENNI_ASUS = 910,
  cv::CAP_ANDROID = 1000,
  cv::CAP_XIAPI = 1100,
  cv::CAP_AVFOUNDATION = 1200,
  cv::CAP_GIGANETIX = 1300,
  cv::CAP_MSMF = 1400,
  cv::CAP_WINRT = 1410,
  cv::CAP_INTELPERC = 1500,
  cv::CAP_OPENNI2 = 1600,
  cv::CAP_OPENNI2_ASUS = 1610,
  cv::CAP_GPHOTO2 = 1700,
  cv::CAP_GSTREAMER = 1800,
  cv::CAP_FFMPEG = 1900,
  cv::CAP_IMAGES = 2000
}
 Capture API backends. More...
 
enum  cv::VideoCaptureModes {
  cv::CAP_MODE_BGR = 0,
  cv::CAP_MODE_RGB = 1,
  cv::CAP_MODE_GRAY = 2,
  cv::CAP_MODE_YUYV = 3
}
 Generic camera output modes. More...
 
enum  cv::VideoCaptureProperties {
  cv::CAP_PROP_POS_MSEC =0,
  cv::CAP_PROP_POS_FRAMES =1,
  cv::CAP_PROP_POS_AVI_RATIO =2,
  cv::CAP_PROP_FRAME_WIDTH =3,
  cv::CAP_PROP_FRAME_HEIGHT =4,
  cv::CAP_PROP_FPS =5,
  cv::CAP_PROP_FOURCC =6,
  cv::CAP_PROP_FRAME_COUNT =7,
  cv::CAP_PROP_FORMAT =8,
  cv::CAP_PROP_MODE =9,
  cv::CAP_PROP_BRIGHTNESS =10,
  cv::CAP_PROP_CONTRAST =11,
  cv::CAP_PROP_SATURATION =12,
  cv::CAP_PROP_HUE =13,
  cv::CAP_PROP_GAIN =14,
  cv::CAP_PROP_EXPOSURE =15,
  cv::CAP_PROP_CONVERT_RGB =16,
  cv::CAP_PROP_WHITE_BALANCE_BLUE_U =17,
  cv::CAP_PROP_RECTIFICATION =18,
  cv::CAP_PROP_MONOCHROME =19,
  cv::CAP_PROP_SHARPNESS =20,
  cv::CAP_PROP_AUTO_EXPOSURE =21,
  cv::CAP_PROP_GAMMA =22,
  cv::CAP_PROP_TEMPERATURE =23,
  cv::CAP_PROP_TRIGGER =24,
  cv::CAP_PROP_TRIGGER_DELAY =25,
  cv::CAP_PROP_WHITE_BALANCE_RED_V =26,
  cv::CAP_PROP_ZOOM =27,
  cv::CAP_PROP_FOCUS =28,
  cv::CAP_PROP_GUID =29,
  cv::CAP_PROP_ISO_SPEED =30,
  cv::CAP_PROP_BACKLIGHT =32,
  cv::CAP_PROP_PAN =33,
  cv::CAP_PROP_TILT =34,
  cv::CAP_PROP_ROLL =35,
  cv::CAP_PROP_IRIS =36,
  cv::CAP_PROP_SETTINGS =37,
  cv::CAP_PROP_BUFFERSIZE =38,
  cv::CAP_PROP_AUTOFOCUS =39
}
 generic properties (based on DC1394 properties) More...
 
enum  cv::VideoWriterProperties {
  cv::VIDEOWRITER_PROP_QUALITY = 1,
  cv::VIDEOWRITER_PROP_FRAMEBYTES = 2,
  cv::VIDEOWRITER_PROP_NSTRIPES = 3
}
 Generic properties identifier for VideoWriter. More...
 

Detailed Description

Enumeration Type Documentation

Capture API backends.

Select preferred API for a capture object. To be used in the constructor VideoCapture::VideoCapture or VideoCapture::open

Note
Backends are available only if they have been built with your OpenCV binaries.
Check in cvconfig.h to know which APIs are currently available (e.g. HAVE_MSMF, HAVE_VFW, HAVE_LIBV4L). To enable/disable APIs, you have to:
  1. re-configure OpenCV using the appropriates CMake switches (e.g. -DWITH_MSMF=ON -DWITH_VFW=ON ... ) or checking related switch in cmake-gui
  2. rebuild OpenCV itself
Enumerator
CAP_ANY 

Auto detect.

CAP_VFW 

Video For Windows (platform native)

CAP_V4L 

V4L/V4L2 capturing support via libv4l.

CAP_V4L2 

Same as CAP_V4L.

CAP_FIREWIRE 

IEEE 1394 drivers.

CAP_FIREWARE 

Same as CAP_FIREWIRE.

CAP_IEEE1394 

Same as CAP_FIREWIRE.

CAP_DC1394 

Same as CAP_FIREWIRE.

CAP_CMU1394 

Same as CAP_FIREWIRE.

CAP_QT 

QuickTime.

CAP_UNICAP 

Unicap drivers.

CAP_DSHOW 

DirectShow (via videoInput)

CAP_PVAPI 

PvAPI, Prosilica GigE SDK.

CAP_OPENNI 

OpenNI (for Kinect)

CAP_OPENNI_ASUS 

OpenNI (for Asus Xtion)

CAP_ANDROID 

Android - not used.

CAP_XIAPI 

XIMEA Camera API.

CAP_AVFOUNDATION 

AVFoundation framework for iOS (OS X Lion will have the same API)

CAP_GIGANETIX 

Smartek Giganetix GigEVisionSDK.

CAP_MSMF 

Microsoft Media Foundation (via videoInput)

CAP_WINRT 

Microsoft Windows Runtime using Media Foundation.

CAP_INTELPERC 

Intel Perceptual Computing SDK.

CAP_OPENNI2 

OpenNI2 (for Kinect)

CAP_OPENNI2_ASUS 

OpenNI2 (for Asus Xtion and Occipital Structure sensors)

CAP_GPHOTO2 

gPhoto2 connection

CAP_GSTREAMER 

GStreamer.

CAP_FFMPEG 

FFMPEG.

CAP_IMAGES 

OpenCV Image Sequence (e.g. img_%02d.jpg)

Generic camera output modes.

Note
Currently, these are supported through the libv4l interface only.
Enumerator
CAP_MODE_BGR 

BGR24 (default)

CAP_MODE_RGB 

RGB24.

CAP_MODE_GRAY 

Y8.

CAP_MODE_YUYV 

YUYV.

generic properties (based on DC1394 properties)

Enumerator
CAP_PROP_POS_MSEC 

Current position of the video file in milliseconds.

CAP_PROP_POS_FRAMES 

0-based index of the frame to be decoded/captured next.

CAP_PROP_POS_AVI_RATIO 

Relative position of the video file: 0=start of the film, 1=end of the film.

CAP_PROP_FRAME_WIDTH 

Width of the frames in the video stream.

CAP_PROP_FRAME_HEIGHT 

Height of the frames in the video stream.

CAP_PROP_FPS 

Frame rate.

CAP_PROP_FOURCC 

4-character code of codec. see VideoWriter::fourcc .

CAP_PROP_FRAME_COUNT 

Number of frames in the video file.

CAP_PROP_FORMAT 

Format of the Mat objects returned by VideoCapture::retrieve().

CAP_PROP_MODE 

Backend-specific value indicating the current capture mode.

CAP_PROP_BRIGHTNESS 

Brightness of the image (only for cameras).

CAP_PROP_CONTRAST 

Contrast of the image (only for cameras).

CAP_PROP_SATURATION 

Saturation of the image (only for cameras).

CAP_PROP_HUE 

Hue of the image (only for cameras).

CAP_PROP_GAIN 

Gain of the image (only for cameras).

CAP_PROP_EXPOSURE 

Exposure (only for cameras).

CAP_PROP_CONVERT_RGB 

Boolean flags indicating whether images should be converted to RGB.

CAP_PROP_WHITE_BALANCE_BLUE_U 

Currently unsupported.

CAP_PROP_RECTIFICATION 

Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently).

CAP_PROP_MONOCHROME 
CAP_PROP_SHARPNESS 
CAP_PROP_AUTO_EXPOSURE 

DC1394: exposure control done by camera, user can adjust reference level using this feature.

CAP_PROP_GAMMA 
CAP_PROP_TEMPERATURE 
CAP_PROP_TRIGGER 
CAP_PROP_TRIGGER_DELAY 
CAP_PROP_WHITE_BALANCE_RED_V 
CAP_PROP_ZOOM 
CAP_PROP_FOCUS 
CAP_PROP_GUID 
CAP_PROP_ISO_SPEED 
CAP_PROP_BACKLIGHT 
CAP_PROP_PAN 
CAP_PROP_TILT 
CAP_PROP_ROLL 
CAP_PROP_IRIS 
CAP_PROP_SETTINGS 
CAP_PROP_BUFFERSIZE 
CAP_PROP_AUTOFOCUS 

Generic properties identifier for VideoWriter.

Enumerator
VIDEOWRITER_PROP_QUALITY 

Current quality (0..100%) of the encoded videostream. Can be adjusted dynamically in some codecs.

VIDEOWRITER_PROP_FRAMEBYTES 

(Read-only): Size of just encoded video frame. Note that the encoding order may be different from representation order.

VIDEOWRITER_PROP_NSTRIPES 

Number of stripes for parallel encoding. -1 for auto detection.