Results 1 to 3 of 3

Thread: gain: discrepancy between GUI and API

  1. #1
    Join Date
    Jul 2015
    Posts
    14

    gain: discrepancy between GUI and API

    Hello !

    After I set the gain value via the "Filter Inspector" I read back that value via an API call.
    But the value I read is always '100'.

    This is only true for VCDID_Gain. The other properties like e.g. VCDID_Saturation or VCDID_Exposure behave like expected.

    This is my code for reading the values:
    Code:
    val = m_VCDProp->getValue(g);
    with m_VCDProp being a CSimplePropertyAccess object;

    Can you explain what I'm doing wrong?

    Best regards,
    Uwe Andersen

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: gain: discrepancy between GUI and API

    There seems to be a driver error. You may try the absolute values interface instead, this works as expected:

    Code:
    double Get_Gain_Value_Value(Grabber* pGrabber)
    {
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDAbsoluteValuePropertyPtr pAbsValItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_Gain, VCDElement_Value ,pAbsValItf);
    
    		if( pAbsValItf != NULL )
    		{
    			return pAbsValItf->getValue();
    		}
    	}
    
    	return 0.0;
    }
    
    void Set_Gain_Value_Value(Grabber* pGrabber, double Value)
    {
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDAbsoluteValuePropertyPtr pAbsValItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_Gain, VCDElement_Value ,pAbsValItf);
    
    		if( pAbsValItf != NULL )
    		{
    			pAbsValItf->setValue(Value);
    		}
    	}
    }
    Last edited by Stefan Geissler; January 18, 2017 at 17:57:33.
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Jul 2015
    Posts
    14

    Re: gain: discrepancy between GUI and API

    Yes, it does!

    Thank you, Stefan!

Similar Threads

  1. Electronic gain and IC capture gain
    By lorenzo_V in forum Hardware and Driver
    Replies: 6
    Last Post: April 2, 2012, 17:14:54
  2. Gain settings
    By darbyvet in forum Astronomy Cameras Support Forum
    Replies: 18
    Last Post: May 16, 2011, 09:55:56
  3. Higher max gain possible?
    By JKr in forum Astronomy Cameras Support Forum
    Replies: 1
    Last Post: February 22, 2011, 10:12:50
  4. gain or not gain or contrast
    By stefan6973 in forum IC Imaging Control C++ Class Library
    Replies: 1
    Last Post: September 16, 2005, 18:27:55
  5. Gain control
    By kiske in forum IC Imaging Control C++ Class Library
    Replies: 1
    Last Post: September 7, 2005, 08:59:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •