I need to be able to get and set the properties of my webcam (brightness, contrast, saturation, backlight compensation, exposure and gain). I know that ofVideoGrabber has the “videoSettings()” function that pops up a window where I can control the camera settings, but I need to do that form my code (not from a window).
Reading the videoInput.h file I found the following functions:
and the following list of properties:
long propBrightness; long propContrast; long propHue; long propSaturation; long propSharpness; long propGamma; long propColorEnable; long propWhiteBalance; long propBacklightCompensation; long propGain; long propPan; long propTilt; long propRoll; long propZoom; long propExposure; long propIris; long propFocus;
As the ofVideoGrabber has no functions to “manualy” set/get these properties I am trying to find out the way to write the functions myself:
Shoud I crate a new class (which extends the ofVideoGrabber class) and ad new methods, for example “setCameraProperty” and “getCameraProperty” using videoInput’s setVideoSettingCamera and getVideoSettingCamera?
Is there a more appropiate way of doing this?
Any advice is welcome! Thanks in advance