PDA

View Full Version : Changing Gain setings in software not GUI



drgolf
September 1, 2010, 03:13:12
I want to change the camera gain (get rid of grainy images).
I couldn't find an appropriate command.
THANKS :)


grabber.setVideoFormat("Y800 (640x480)");

pSink = FrameHandlerSink::create( eY800, 1 );

pSink->setSnapMode( true );
grabber.setSinkType( pSink );

result = grabber.prepareLive( false ); // this allows getting info
if (result == false)
{
printf("FAILED\n");
cin.get();
}

pSink->getOutputFrameType( info );
pBuf = new BYTE[info.buffersize];

result = grabber.setExternalTrigger(true);
grabber.startLive();

Stefan Geissler
September 1, 2010, 11:02:31
Hello,

please use the following function for setting gain:



void SetGain(Grabber *pGrabber, long Value)
{
if( pGrabber->isDevValid() )
{
tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
if( pItems != 0 )
{
tIVCDRangePropertyPtr pRange;
pItems->findInterfacePrt(VCDID_Gain,VCDElement_Value,pRang e);

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