13.04.2015 Views

Blackfly - CYLOD

Blackfly - CYLOD

Blackfly - CYLOD

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Point Grey <strong>Blackfly</strong> Technical Reference<br />

Appendix C: FlyCapture API Code Examples<br />

C.10 Example: Setting Sharpness Using the FlyCapture API<br />

The following FlyCapture 2.0 code snippet adjusts sharpness to 1500 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 = SHARPNESS;<br />

//Ensure the property is on.<br />

prop.onOff = true;<br />

//Ensure auto-adjust mode is off.<br />

prop.autoManualMode = false;<br />

//Set the value of sharpness to 1500.<br />

prop.valueA = 1500;<br />

//Set the property.<br />

error = cam.SetProperty( &prop );<br />

C.11 Example: Setting Gamma Using the FlyCapture API<br />

The following FlyCapture 2.0 code snippet adjusts gamma to 1.5 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 = GAMMA;<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 gamma to 1.5<br />

prop.absValue = 1.5;<br />

//Set the property.<br />

error = cam.SetProperty( &prop );<br />

Revised 12/13/2012<br />

Copyright ©2012 Point Grey Research Inc.<br />

80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!