13.04.2015 Views

Blackfly - CYLOD

Blackfly - CYLOD

Blackfly - CYLOD

SHOW MORE
SHOW LESS

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 />

prop.absValue = 20;<br />

//Set the property.<br />

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

C.6 Example: Setting Gain Using the FlyCapture API<br />

The following FlyCapture 2.0 code snippet adjusts gain to 10.5 dB using the C++ interface, and assumes a Camera<br />

object cam.<br />

//Declare a Property struct.<br />

Property prop;<br />

//Define the property to adjust.<br />

prop.type = GAIN;<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 gain to 10.5 dB.<br />

prop.absValue = 10.5;<br />

//Set the property.<br />

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

C.7 Example: Setting Auto Exposure Using the FlyCapture API<br />

The following FlyCapture 2.0 code snippet adjusts auto exposure to -3.5 EV using the C++ interface. The snippet<br />

assumes a Camera object cam.<br />

//Declare a Property struct.<br />

Property prop;<br />

//Define the property to adjust.<br />

prop.type = AUTO_EXPOSURE;<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 auto exposure to -3.5 EV.<br />

prop.absValue = -3.5;<br />

//Set the property.<br />

Revised 12/13/2012<br />

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

78

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

Saved successfully!

Ooh no, something went wrong!