PDA

View Full Version : VCD Property problem getting non physical values



Unregistered
December 8, 2004, 18:03:14
Hi,
I'm having some real trouble with VCD properties. I'm trying to get the camera's exposure value in camera units (not physical units eg -2 -> 1/4 s). The problem is no matter what I do I keep getting the physical values and yet sample programs such as List VCD Properties in vc6 folder seems to be doing the exact same thing and yet the slider displays camera units.

Here's my code:
tIVCDPropertyItemsPtr pItems = m_Grabber.getAvailableVCDProperties();
tIVCDPropertyInterfacePtr pItf = pItems->findInterface( VCDID_Exposure, VCDElement_Value, IID_IVCDRangeProperty );
tIVCDRangePropertyPtr m_pExposure;
pItf->QueryInterface( m_pExposure );
int val = m_pExposure[0]->getValue(); //returns -2 or other physical values

Note that IID_IVCDAbsoluteValueProperty interface isn't found for my camera. And if I step through the sample program, it isn't found/used there either. The sample program creates the slider using IID_IVCDRangeProperty interface and the slider has the desired values.

I also tried the different approach:
...
tIVCDPropertyItemPtr pExposureItem = pItems->findItem( VCDID_Exposure );
tIVCDPropertyElementPtr pExposureValueElement = pExposureItem->findElement( VCDElement_Value );
pBrightnessAutoElement->getInterfacePtr( m_pExposure );
...
to get the same results.

Thanks for the help.

Stefan Geissler
December 9, 2004, 12:24:29
Hello,

Please send a request to support@imagingcontrol.com, so i can send you a tool to switch between physical and register values.

The usage of physical or register values is a matter of the driver, especially The Imaging Source driver. Thus it can not changed directly by IC Imaging Control.

Stefan Geissler
December 9, 2004, 15:09:36
Hello,

To retrieve register and physical values simultaneously, use following code:


tIVCDPropertyItemsPtr pItems = m_Grabber.getAvailableVCDProperties();
tIVCDPropertyItemPtr pExposureItem = pItems->findItem( VCDID_Exposure );
tIVCDPropertyElementPtr pExposureValueElement = pExposureItem->findElement( VCDElement_Value );
tIVCDRangePropertyPtr pRegisterValues;
tIVCDMapStringsPropertyPtr pPhysicalValues;
pExposureValueElement->getInterfacePtr(pRegisterValues);
pExposureValueElement->getInterfacePtr(pPhysicalValues);
int iRegisterValue = pRegisterValues->getValue();
int iPhysicalValue = pPhysicalValues->getValue();

This works with DCam WDM drivers programmed by The Imaging Source.