Allow BGR, RGB, or gray capture via libv4l

This commit is contained in:
Joe Howse
2014-12-16 20:07:37 -04:00
parent fed1b3fd59
commit 620a969285
3 changed files with 139 additions and 23 deletions

View File

@@ -110,6 +110,7 @@ enum { CAP_PROP_POS_MSEC =0,
CAP_PROP_WHITE_BALANCE_BLUE_U =17,
CAP_PROP_RECTIFICATION =18,
CAP_PROP_MONOCROME =19,
CAP_PROP_MONOCHROME =CAP_PROP_MONOCROME,
CAP_PROP_SHARPNESS =20,
CAP_PROP_AUTO_EXPOSURE =21, // DC1394: exposure control done by camera, user can adjust refernce level using this feature
CAP_PROP_GAMMA =22,
@@ -130,6 +131,14 @@ enum { CAP_PROP_POS_MSEC =0,
};
// Generic camera output modes.
// Currently, these are supported through the libv4l interface only.
enum { CAP_MODE_BGR = 0, // BGR24 (default)
CAP_MODE_RGB = 1, // RGB24
CAP_MODE_GRAY = 2 // Y8
};
// DC1394 only
// modes of the controlling registers (can be: auto, manual, auto single push, absolute Latter allowed with any other mode)
// every feature can have only one mode turned on at a time
@@ -268,6 +277,7 @@ enum { CAP_PROP_ANDROID_AUTOGRAB = 1024,
enum { CAP_ANDROID_COLOR_FRAME_BGR = 0, //BGR
CAP_ANDROID_COLOR_FRAME = CAP_ANDROID_COLOR_FRAME_BGR,
CAP_ANDROID_GREY_FRAME = 1, //Y
CAP_ANDROID_GRAY_FRAME = CAP_ANDROID_GREY_FRAME,
CAP_ANDROID_COLOR_FRAME_RGB = 2,
CAP_ANDROID_COLOR_FRAME_BGRA = 3,
CAP_ANDROID_COLOR_FRAME_RGBA = 4