PDA

View Full Version : Exposures for camera [B]DMK 23GV024[/B]



Alexander
June 12, 2014, 08:23:18
Hi,
I have a camera DMK 23GV024.
The advertisement stated that it can work with shutter speed of 1/100 000.
Which set of exposures exist for this camera and how to set the exposures
to 1/100,000 for this camera in the program in VC++?

Thanks
Alexander

Stefan Geissler
June 12, 2014, 14:56:48
Hello,

the minimum exposure time of the DMK 23GV024 is 1,5E-05 seconds.

It can be set by using follwing codes:


bool Is_Exposure_Value_Available(Grabber* pGrabber)
{
bool bResult = false;
if( pGrabber->isDevValid() )
{
tIVCDAbsoluteValuePropertyPtr pAbsValItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Value ,pAbsValItf);

if( pAbsValItf != NULL )
{
bResult = true;
}
}

return bResult;
}


double Get_Exposure_Value_Value(Grabber* pGrabber)
{
if( pGrabber->isDevValid() )
{
tIVCDAbsoluteValuePropertyPtr pAbsValItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Value ,pAbsValItf);

if( pAbsValItf != NULL )
{
return pAbsValItf->getValue();
}
}

return 0.0;
}

void Set_Exposure_Value_Value(Grabber* pGrabber, double Value)
{
if( pGrabber->isDevValid() )
{
tIVCDAbsoluteValuePropertyPtr pAbsValItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Value ,pAbsValItf);

if( pAbsValItf != NULL )
{
pAbsValItf->setValue(Value);
}
}
}

double Get_Exposure_Value_Min(Grabber* pGrabber)
{
if( pGrabber->isDevValid() )
{
tIVCDAbsoluteValuePropertyPtr pAbsValItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Value ,pAbsValItf);

if( pAbsValItf != NULL )
{
return pAbsValItf->getRangeMin();
}
}

return 0.0;
}

double Get_Exposure_Value_Max(Grabber* pGrabber)
{
if( pGrabber->isDevValid() )
{
tIVCDAbsoluteValuePropertyPtr pAbsValItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Value ,pAbsValItf);

if( pAbsValItf != NULL )
{
return pAbsValItf->getRangeMax();
}
}

return 0.0;
}


You call Get_Exposure_Value_Min(Grabber* pGrabber) to receive the minimum range value, which can be set by calling Set_Exposure_Value_Value(Grabber* pGrabber, double Value).

You should disable the automatics, before you set a value manually. This is done with these functions:


bool Is_Exposure_Auto_Available(Grabber* pGrabber)
{
bool bResult = false;
if( pGrabber->isDevValid() )
{
tIVCDSwitchPropertyPtr pSwitchItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Auto ,pSwitchItf);

if( pSwitchItf != NULL )
{
bResult = true;
}
}

return bResult;
}


bool Get_Exposure_Auto(Grabber* pGrabber)
{
if( pGrabber->isDevValid() )
{
tIVCDSwitchPropertyPtr pSwitchItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Auto ,pSwitchItf);

if( pSwitchItf != NULL )
{
return pSwitchItf->getSwitch();
}
}

return false;
}

void Set_Exposure_Auto(Grabber* pGrabber, bool OnOff)
{
if( pGrabber->isDevValid() )
{
tIVCDSwitchPropertyPtr pSwitchItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_Exposure, VCDElement_Auto ,pSwitchItf);

if( pSwitchItf != NULL )
{
pSwitchItf->setSwitch(OnOff);
}
}
}


You call the functions in your code with the parameters you want to set.