PDA

View Full Version : how to access WhiteBalanceMode?



UweAndersen
December 2, 2016, 08:26:52
Hello !

two weeks ago you helped me whith WhiteBalanceGreen.
Now I tried to access WhiteBalanceMode in the same way. I asked for min and max values but both are zero.
What values are possible and how can I set them?

Regards,
Uwe

P.S.: The Property Inspector shows two options: "Gray World" and "Temperature"

Stefan Geissler
December 5, 2016, 09:30:45
Hello

sorry for the delay of the answer.



void Set_WhiteBalance_WhiteBalance_Mode(Grabber* pGrabber, std::string MapString)
{
if( pGrabber->isDevValid() )
{
tIVCDMapStringsPropertyPtr pMapStringItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_WhiteBalance, StringToGUID(L"{AB98F78D-18A6-4EB2-A556-C11010EC9DF7}") ,pMapStringItf);

if( pButtonItf != NULL )
{
pMapStringItf->setString(MapString);
}
}
}

std::string Get_WhiteBalance_WhiteBalance_Mode(Grabber* pGrabber)
{
if( pGrabber->isDevValid() )
{
tIVCDMapStringsPropertyPtr pMapStringItf;
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
pItems->findInterfacePtr(VCDID_WhiteBalance, StringToGUID(L"{AB98F78D-18A6-4EB2-A556-C11010EC9DF7}") ,pMapStringItf);

if( pButtonItf != NULL )
{
pMapStringItf->getString();
}
}
return std::string("");
}

UweAndersen
December 9, 2016, 08:04:19
Hello Stefan,

Thank you for the assistance!
It is working now.
Although your code contains a little bug ;)
Must be
if( pMapStringItf!= NULL )
instead of
if( pButtonItf != NULL )

Best regards,
Uwe

Stefan Geissler
December 9, 2016, 09:07:01
Hi Uwe

this was only a test whether you read the code :-)