Merge pull request #3433 from StevenPuttemans:fix_whitebalance_naming

pull/3445/head
Vadim Pisarevsky 10 years ago
commit 3dd1afe4ec
  1. 12
      modules/highgui/doc/reading_and_writing_images_and_video.rst
  2. 4
      modules/highgui/include/opencv2/highgui/highgui_c.h
  3. 8
      modules/highgui/src/cap_dc1394_v2.cpp
  4. 6
      modules/highgui/src/cap_dshow.cpp
  5. 4
      modules/java/generator/gen_java.py

@ -406,10 +406,14 @@ Returns the specified ``VideoCapture`` property
* **CV_CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted to RGB. * **CV_CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted to RGB.
* **CV_CAP_PROP_WHITE_BALANCE** Currently not supported * **CV_CAP_PROP_WHITE_BALANCE_U** The U value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_WHITE_BALANCE_V** The V value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently) * **CV_CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_ISO_SPEED** The ISO speed of the camera (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_BUFFERSIZE** Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently) * **CV_CAP_PROP_BUFFERSIZE** Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently)
@ -463,10 +467,14 @@ Sets a property in the ``VideoCapture``.
* **CV_CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted to RGB. * **CV_CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted to RGB.
* **CV_CAP_PROP_WHITE_BALANCE** Currently unsupported * **CV_CAP_PROP_WHITE_BALANCE_U** The U value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_WHITE_BALANCE_V** The V value of the whitebalance setting (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently) * **CV_CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_ISO_SPEED** The ISO speed of the camera (note: only supported by DC1394 v 2.x backend currently)
* **CV_CAP_PROP_BUFFERSIZE** Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently) * **CV_CAP_PROP_BUFFERSIZE** Amount of frames stored in internal buffer memory (note: only supported by DC1394 v 2.x backend currently)
:param value: Value of the property. :param value: Value of the property.

@ -362,7 +362,7 @@ enum
CV_CAP_PROP_GAIN =14, CV_CAP_PROP_GAIN =14,
CV_CAP_PROP_EXPOSURE =15, CV_CAP_PROP_EXPOSURE =15,
CV_CAP_PROP_CONVERT_RGB =16, CV_CAP_PROP_CONVERT_RGB =16,
CV_CAP_PROP_WHITE_BALANCE_BLUE_U =17, CV_CAP_PROP_WHITE_BALANCE_U =17,
CV_CAP_PROP_RECTIFICATION =18, CV_CAP_PROP_RECTIFICATION =18,
CV_CAP_PROP_MONOCROME =19, CV_CAP_PROP_MONOCROME =19,
CV_CAP_PROP_SHARPNESS =20, CV_CAP_PROP_SHARPNESS =20,
@ -373,7 +373,7 @@ enum
CV_CAP_PROP_TEMPERATURE =23, CV_CAP_PROP_TEMPERATURE =23,
CV_CAP_PROP_TRIGGER =24, CV_CAP_PROP_TRIGGER =24,
CV_CAP_PROP_TRIGGER_DELAY =25, CV_CAP_PROP_TRIGGER_DELAY =25,
CV_CAP_PROP_WHITE_BALANCE_RED_V =26, CV_CAP_PROP_WHITE_BALANCE_V =26,
CV_CAP_PROP_ZOOM =27, CV_CAP_PROP_ZOOM =27,
CV_CAP_PROP_FOCUS =28, CV_CAP_PROP_FOCUS =28,
CV_CAP_PROP_GUID =29, CV_CAP_PROP_GUID =29,

@ -665,13 +665,13 @@ double CvCaptureCAM_DC1394_v2_CPP::getProperty(int propId)
return fps; return fps;
case CV_CAP_PROP_RECTIFICATION: case CV_CAP_PROP_RECTIFICATION:
return rectify ? 1 : 0; return rectify ? 1 : 0;
case CV_CAP_PROP_WHITE_BALANCE_BLUE_U: case CV_CAP_PROP_WHITE_BALANCE_U:
if (dc1394_feature_whitebalance_get_value(dcCam, if (dc1394_feature_whitebalance_get_value(dcCam,
&feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].BU_value, &feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].BU_value,
&feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].RV_value) == DC1394_SUCCESS) &feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].RV_value) == DC1394_SUCCESS)
return feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].BU_value; return feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].BU_value;
break; break;
case CV_CAP_PROP_WHITE_BALANCE_RED_V: case CV_CAP_PROP_WHITE_BALANCE_V:
if (dc1394_feature_whitebalance_get_value(dcCam, if (dc1394_feature_whitebalance_get_value(dcCam,
&feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].BU_value, &feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].BU_value,
&feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].RV_value) == DC1394_SUCCESS) &feature_set.feature[DC1394_FEATURE_WHITE_BALANCE-DC1394_FEATURE_MIN].RV_value) == DC1394_SUCCESS)
@ -795,7 +795,7 @@ bool CvCaptureCAM_DC1394_v2_CPP::setProperty(int propId, double value)
else else
act_feature->current_mode=DC1394_FEATURE_MODE_MANUAL; act_feature->current_mode=DC1394_FEATURE_MODE_MANUAL;
// if property is one of the white balance features treat it in different way // if property is one of the white balance features treat it in different way
if (propId == CV_CAP_PROP_WHITE_BALANCE_BLUE_U) if (propId == CV_CAP_PROP_WHITE_BALANCE_U)
{ {
if (dc1394_feature_whitebalance_set_value(dcCam,cvRound(value), act_feature->RV_value)!=DC1394_SUCCESS) if (dc1394_feature_whitebalance_set_value(dcCam,cvRound(value), act_feature->RV_value)!=DC1394_SUCCESS)
return false; return false;
@ -805,7 +805,7 @@ bool CvCaptureCAM_DC1394_v2_CPP::setProperty(int propId, double value)
return true; return true;
} }
} }
if (propId == CV_CAP_PROP_WHITE_BALANCE_RED_V) if (propId == CV_CAP_PROP_WHITE_BALANCE_V)
{ {
if (dc1394_feature_whitebalance_set_value(dcCam, act_feature->BU_value, cvRound(value))!=DC1394_SUCCESS) if (dc1394_feature_whitebalance_set_value(dcCam, act_feature->BU_value, cvRound(value))!=DC1394_SUCCESS)
return false; return false;

@ -2249,7 +2249,7 @@ int videoInput::getVideoPropertyFromCV(int cv_property){
case CV_CAP_PROP_MONOCROME: case CV_CAP_PROP_MONOCROME:
return VideoProcAmp_ColorEnable; return VideoProcAmp_ColorEnable;
case CV_CAP_PROP_WHITE_BALANCE_BLUE_U: case CV_CAP_PROP_WHITE_BALANCE_U:
return VideoProcAmp_WhiteBalance; return VideoProcAmp_WhiteBalance;
case CV_CAP_PROP_BACKLIGHT: case CV_CAP_PROP_BACKLIGHT:
@ -3246,7 +3246,7 @@ double CvCaptureCAM_DShow::getProperty( int property_id )
case CV_CAP_PROP_SHARPNESS: case CV_CAP_PROP_SHARPNESS:
case CV_CAP_PROP_GAMMA: case CV_CAP_PROP_GAMMA:
case CV_CAP_PROP_MONOCROME: case CV_CAP_PROP_MONOCROME:
case CV_CAP_PROP_WHITE_BALANCE_BLUE_U: case CV_CAP_PROP_WHITE_BALANCE_U:
case CV_CAP_PROP_BACKLIGHT: case CV_CAP_PROP_BACKLIGHT:
case CV_CAP_PROP_GAIN: case CV_CAP_PROP_GAIN:
if (VI.getVideoSettingFilter(index,VI.getVideoPropertyFromCV(property_id),min_value,max_value,stepping_delta,current_value,flags,defaultValue) ) return (double)current_value; if (VI.getVideoSettingFilter(index,VI.getVideoPropertyFromCV(property_id),min_value,max_value,stepping_delta,current_value,flags,defaultValue) ) return (double)current_value;
@ -3350,7 +3350,7 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
case CV_CAP_PROP_SHARPNESS: case CV_CAP_PROP_SHARPNESS:
case CV_CAP_PROP_GAMMA: case CV_CAP_PROP_GAMMA:
case CV_CAP_PROP_MONOCROME: case CV_CAP_PROP_MONOCROME:
case CV_CAP_PROP_WHITE_BALANCE_BLUE_U: case CV_CAP_PROP_WHITE_BALANCE_U:
case CV_CAP_PROP_BACKLIGHT: case CV_CAP_PROP_BACKLIGHT:
case CV_CAP_PROP_GAIN: case CV_CAP_PROP_GAIN:
return VI.setVideoSettingFilter(index,VI.getVideoPropertyFromCV(property_id),(long)value); return VI.setVideoSettingFilter(index,VI.getVideoPropertyFromCV(property_id),(long)value);

@ -71,7 +71,7 @@ const_ignore_list = (
"CV_CAP_PROP_GAIN", "CV_CAP_PROP_GAIN",
"CV_CAP_PROP_EXPOSURE", "CV_CAP_PROP_EXPOSURE",
"CV_CAP_PROP_CONVERT_RGB", "CV_CAP_PROP_CONVERT_RGB",
"CV_CAP_PROP_WHITE_BALANCE_BLUE_U", "CV_CAP_PROP_WHITE_BALANCE_U",
"CV_CAP_PROP_RECTIFICATION", "CV_CAP_PROP_RECTIFICATION",
"CV_CAP_PROP_MONOCROME", "CV_CAP_PROP_MONOCROME",
"CV_CAP_PROP_SHARPNESS", "CV_CAP_PROP_SHARPNESS",
@ -80,7 +80,7 @@ const_ignore_list = (
"CV_CAP_PROP_TEMPERATURE", "CV_CAP_PROP_TEMPERATURE",
"CV_CAP_PROP_TRIGGER", "CV_CAP_PROP_TRIGGER",
"CV_CAP_PROP_TRIGGER_DELAY", "CV_CAP_PROP_TRIGGER_DELAY",
"CV_CAP_PROP_WHITE_BALANCE_RED_V", "CV_CAP_PROP_WHITE_BALANCE_V",
"CV_CAP_PROP_MAX_DC1394", "CV_CAP_PROP_MAX_DC1394",
"CV_CAP_GSTREAMER_QUEUE_LENGTH", "CV_CAP_GSTREAMER_QUEUE_LENGTH",
"CV_CAP_PROP_PVAPI_MULTICASTIP", "CV_CAP_PROP_PVAPI_MULTICASTIP",

Loading…
Cancel
Save