PDA

View Full Version : Changing Exposure through C-wrapper dll



Ian48
October 13, 2009, 18:16:56
Hello,

I am using the c-wrapper dll in the Borland C++ Builder environment with the DMx 41BU02 camera.

I'm trying to implement a small property control section in my application for exposure, gain, brightness, and gamma. I've been able to do everything I've needed so far except to turn off auto-exposure on the camera.

The menu displayed with the IC_ShowPropertyDialog function successfully controls exposure, but I would like to avoid using this menu in my application. When I try using IC_EnableAutoCameraProperty(hGrabber, PROP_CAM_EXPOSURE, 0), it returns IC_SUCCESS but doesn't actually disable auto-exposure. I have verified this by watching the live video exposure auto-adjust as I moved the gain up and down afterwards. Of course since the exposure property is stuck on auto, I cannot manually set a value for it using IC_SetCameraProperty either.

I have been able to control video properties such as gain, using the appropriate wrapper functions. The exposure property is the only one I'm having trouble with. How can I disable auto-exposure using the wrapper functions?

Also, I have also noticed that IC_CameraPropertyGetRange for exposure returns a range of -11 to 4, which I understand from other posts is the "physical" interface. The IC_ShowPropertyDialog menu allows me to use a wide range absolute values - is it possible to access this absolute range through the wrapper dll, or am I stuck using the physical interface?

If it makes any difference, I have been attempting all these property changes during live video.

Stefan Geissler
October 19, 2009, 11:42:36
Hello,

The function IC_EnableAutoCameraProperty enables the automatic regardless, what the user wants. It seems, there is a programming error. I am very sorry for this. You may use the function IC_EnableExpRegValAuto( HGRABBER hGrabber, int iOnOff ) instead.

For using the absolute values interface, please use following functions:


//////////////////////////////////////////////////////////////////////////
/*! Functions for the absolute values interface of exposure.
*/
int AC IC_IsExpAbsValAvailable( HGRABBER hGrabber);
int AC IC_GetExpAbsValRange(HGRABBER hGrabber, float *fMin, float *fMax);
int AC IC_GetExpAbsVal(HGRABBER hGrabber, float *fValue);
int AC IC_SetExpAbsVal(HGRABBER hGrabber, float fValue );