Skip to content

Commit 4ac0d11

Browse files
committed
Set default camera control values when connecting
1 parent 779655e commit 4ac0d11

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

examples/zed_oc_video_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void handleKeyboard( sl_oc::VideoCapture &cap, int key )
204204

205205
case 'r':
206206
case 'R':
207-
cap.resetBrightnessSetting();
207+
cap.resetBrightness();
208208
cap.resetSharpness();
209209
cap.resetContrast();
210210
cap.resetHue();

include/videocapture.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class SL_OC_EXPORT VideoCapture
130130
/*!
131131
* \brief Reset the Brightness value to default value
132132
*/
133-
void resetBrightnessSetting();
133+
void resetBrightness();
134134

135135
/*!
136136
* \brief Set the Sharpness value

src/videocapture.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,15 @@ bool VideoCapture::initializeVideo( int devId/*=-1*/ )
306306

307307
setLEDstatus( true );
308308

309+
resetAECAGC();
310+
resetAutoWhiteBalance();
311+
resetBrightness();
312+
resetContrast();
313+
resetGamma();
314+
resetHue();
315+
resetSaturation();
316+
resetSharpness();
317+
309318
return mInitialized;
310319
}
311320

@@ -1519,7 +1528,7 @@ void VideoCapture::setBrightness(int brightness)
15191528
setCameraControlSettings(LINUX_CTRL_BRIGHTNESS, brightness);
15201529
}
15211530

1522-
void VideoCapture::resetBrightnessSetting()
1531+
void VideoCapture::resetBrightness()
15231532
{
15241533
resetCameraControlSettings(LINUX_CTRL_BRIGHTNESS);
15251534
}

0 commit comments

Comments
 (0)