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 />
TriggerMode mTrigger;<br />
mTrigger.mode = 0;<br />
mTrigger.source = 0;<br />
mTrigger.parameter = 0;<br />
mTrigger.onOff = true;<br />
mTrigger.polarity = 1;<br />
cam.SetTriggerMode(&mTrigger);<br />
C.4 Example: Setting Brightness Using the FlyCapture API<br />
The following FlyCapture 2.0 code snippet adjusts brightness to 0.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 = BRIGHTNESS;<br />
//Ensure the property is set up to use absolute value control.<br />
prop.absControl = true;<br />
//Set the absolute value of brightness to 0.5%.<br />
prop.absValue = 0.5;<br />
//Set the property.<br />
error = cam.SetProperty( &prop );<br />
C.5 Example: Setting Shutter Using the FlyCapture API<br />
The following FlyCapture 2.0 code snippet adjusts the shutter speed to 20 ms 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 = SHUTTER;<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 shutter to 20 ms.<br />
Revised 12/13/2012<br />
Copyright ©2012 Point Grey Research Inc.<br />
77