Point Grey Flea3 GigE Technical Reference A FlyCapture API Code Samples
//Set the absolute value of gamma to 1.5
prop.absValue = 1.5;
//Set the property.
error = cam.SetProperty( &prop );
A.10 Setting White Balance Using the FlyCapture API
The following FlyCapture code snippet adjusts the white balance red channel to 500 and the blue channel to 850 using
the C++ interface. The snippet assumes a Camera object cam.
//Declare a Property struct.
Property prop;
//Define the property to adjust.
prop.type = WHITE_BALANCE;
//Ensure the property is on.
prop.onOff = true;
//Ensure auto-adjust mode is off.
prop.autoManualMode = false;
//Set the white balance red channel to 500.
prop.valueA = 500;
//Set the white balance blue channel to 850.
prop.valueB = 850;
//Set the property.
error = cam.SetProperty( &prop );
A.11 Accessing Raw Bayer Data using FlyCapture
Using the FlyCapture SDK, raw image data can be accessed programmatically via the getData method of the Image
class. In Raw8 modes, the first byte represents the pixel at [row 0, column 0], the second byte at [row 0, column 1], and
so on.
Read the BAYER_TILE_MAPPING register 0x1040 to determine the current Bayer output format (RGGB, GRBG, and so
on). Using a Bayer format of RGGB, for example, thegetData method returns the following (assuming char* data
= rawImage.GetData(); and an Image object rawImage):
n data[0] = Row 0, Column 0 = red pixel (R)
n data[1] = Row 0, Column 1 = green pixel (G)
n data[640] = Row 1, Column 0 = green pixel (G)
n data[641] = Row 1, Column 1 = blue pixel (B)
A.12 Setting Hue Using the FlyCapture API
The following FlyCapture code snippet adjusts hue to -30 deg. using the C++ interface. The snippet assumes a Camera
object cam.
//Declare a Property struct.
Property prop;
//Define the property to adjust.
prop.type = HUE;
//Ensure the property is on.
prop.onOff = true;
//Ensure the property is set up to use absolute value control.
Revised 10/29/2013
Copyright ©2010-2013 Point Grey Research Inc.
91