Results 1 to 3 of 3

Thread: how to accessWhiteBalanceGreen

  1. #1
    Join Date
    Jul 2015
    Posts
    14

    how to accessWhiteBalanceGreen

    Hello !

    The following
    Code:
    	long min = m_VCDProp->getRangeMin(VCDElement_WhiteBalanceRed);
    	long max = m_VCDProp->getRangeMax(VCDElement_WhiteBalanceRed);
    	long val = m_VCDProp->getValue(VCDElement_WhiteBalanceRed);
    	printf("RED min:%X max:%X val:%X\n", min, max, val);
    	
            min = m_VCDProp->getRangeMin(VCDElement_WhiteBalanceBlue);
    	max = m_VCDProp->getRangeMax(VCDElement_WhiteBalanceBlue);
    	val = m_VCDProp->getValue(VCDElement_WhiteBalanceBlue);
    	printf("BLUE min:%X max:%X val:%X\n", min, max, val);
    	
            min = m_VCDProp->getRangeMin(VCDElement_WhiteBalanceGreen);
    	max = m_VCDProp->getRangeMax(VCDElement_WhiteBalanceGreen);
    	val = m_VCDProp->getValue(VCDElement_WhiteBalanceGreen);
    	printf("GREEN min:%X max:%X val:%X\n", min, max, val);
    works for WhiteBalanceRed & WhiteBalanceBlue but nor for WhiteBalanceGreen("min", "max" and "val" are all zero).
    Can you tell me why?

    Regards,
    Uwe

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

    Re: how to accessWhiteBalanceGreen

    Please use following code:
    Code:
    bool Is_WhiteBalance_White_Balance_Green_Available(Grabber* pGrabber)
    {
    	bool bResult = false;
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDRangePropertyPtr pRangeItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_WhiteBalance, VCDElement_WhiteBalanceGreen ,pRangeItf);
    
    		if( pRangeItf != NULL )
    		{
    			bResult = true;
    		}
    	}
    
    	return bResult;
    }
    
    
    long Get_WhiteBalance_White_Balance_Green_Value(Grabber* pGrabber)
    {
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDRangePropertyPtr pRangeItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_WhiteBalance, VCDElement_WhiteBalanceGreen ,pRangeItf);
    
    		if( pRangeItf != NULL )
    		{
    			return pRangeItf->getValue();
    		}
    	}
    
    	return 0;
    }
    
    void Set_WhiteBalance_White_Balance_Green_Value(Grabber* pGrabber, long Value)
    {
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDRangePropertyPtr pRangeItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_WhiteBalance, VCDElement_WhiteBalanceGreen ,pRangeItf);
    
    		if( pRangeItf != NULL )
    		{
    			pRangeItf->setValue(Value);
    		}
    	}
    }
    
    long Get_WhiteBalance_White_Balance_Green_Min(Grabber* pGrabber)
    {
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDRangePropertyPtr pRangeItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_WhiteBalance, VCDElement_WhiteBalanceGreen ,pRangeItf);
    
    		if( pRangeItf != NULL )
    		{
    			return pRangeItf->getRangeMin();
    		}
    	}
    
    	return 0;
    }
    
    long Get_WhiteBalance_White_Balance_Green_Max(Grabber* pGrabber)
    {
    	if( pGrabber->isDevValid() )
    	{
    		tIVCDRangePropertyPtr pRangeItf;
    		tIVCDPropertyItemsPtr pItems = pGrabber->getAvailableVCDProperties();
    		pItems->findInterfacePtr(VCDID_WhiteBalance, VCDElement_WhiteBalanceGreen ,pRangeItf);
    
    		if( pRangeItf != NULL )
    		{
    			return pRangeItf->getRangeMax();
    		}
    	}
    
    	return 0;
    }
    Can you tell me why?
    Maybe it is not supported by your camera mode? I can not say, I do not know this. However, the above function "Is_WhiteBalance_White_Balance_Green_Available " will give you that answer.
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Jul 2015
    Posts
    14

    Re: how to accessWhiteBalanceGreen

    Thank you!
    Everything is working now.

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
  •