Accessing Raw Bayer Data Using Flycapture; Setting Hue Using The Flycapture Api; Setting Saturation Using The Flycapture Api - FLIR GRASSHOPPER 3 Series Technical Reference

Gige vision
Table of Contents

Advertisement

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, the getData method returns the following (assuming
char* data = rawImage.GetData(); and an Image object rawImage):
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)
n
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.
prop.absControl = true;
//Set the absolute value of hue to -30 deg.
prop.absValue = -30;
//Set the property.
error = cam.SetProperty( &prop );
A.13 Setting Saturation Using the FlyCapture API
The following FlyCapture code snippet adjusts saturation to 200% using the C++ interface. The snippet assumes a
Camera object cam.
//Declare a property struct.
Property prop;
2/10/2017
©2013-2017
FLIR Integrated Imaging
Solutions Inc. All rights reserved.
®
Grasshopper
3 PGE Technical Reference
A FlyCapture API Code Samples
92

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents