You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Point Grey <strong>Blackfly</strong> Technical Reference<br />
Appendix C: FlyCapture API Code Examples<br />
error = cam.SetProperty( &prop );<br />
C.8 Example: Setting Saturation Using the FlyCapture API<br />
The following FlyCapture 2.0 code snippet adjusts saturation to 200% using the C++ interface. The snippet assumes a<br />
Camera object cam.<br />
//Declare a property struct.<br />
Property prop;<br />
//Define the property to adjust.<br />
prop.type = SATURATION;<br />
//Ensure the property is on.<br />
prop.onOff = true;<br />
//Ensure auto-adjust mode is off.<br />
prop.autoManualMode = false;<br />
//Ensure the property is set up to use absolute value control.<br />
prop.absControl = true;<br />
//Set the absolute value of saturation to 200%.<br />
prop.absValue = 200;<br />
//Set the property.<br />
error = cam.SetProperty( &prop );<br />
C.9 Example: Setting Hue Using the FlyCapture API<br />
The following FlyCapture 2.0 code snippet adjusts hue to -30 deg. using the C++ interface. The snippet assumes a<br />
Camera object cam.<br />
//Declare a Property struct.<br />
Property prop;<br />
//Define the property to adjust.<br />
prop.type = HUE;<br />
//Ensure the property is on.<br />
prop.onOff = true;<br />
//Ensure the property is set up to use absolute value control.<br />
prop.absControl = true;<br />
//Set the absolute value of hue to -30 deg.<br />
prop.absValue = -30;<br />
//Set the property.<br />
error = cam.SetProperty( &prop );<br />
Revised 12/13/2012<br />
Copyright ©2012 Point Grey Research Inc.<br />
79