|
Issue:
Using absolute value registers to convert camera property values to real-world units.
Solution:
Using the absolute values contained in the ABS_VAL camera registers is easier and more efficient than applying complex conversion formulas to the information in the Value field of the associated Control and Status Register (CSR). In addition, conversion formulas can change between firmware versions. PGR therefore recommends using the absolute value registers to determine camera values.
Absolute Value CSRs
Detailed information regarding the ABS_VAL register offsets and definitions can be located in the "Absolute Value CSR Registers" section of the PGR IEEE-1394 Digital Camera Register Reference, which can be found in our Downloads section.
Interpreting Absolute Value CSR Values
The Absolute Value CSR’s store 32-bit floating-point values with IEEE/REAL*4 format. To programmatically determine the floating point equivalent of the hexadecimal Value for the ABS_VAL_SHUTTER register:
// declare a union of a floating point and unsigned long typedef union _AbsValueConversion { unsigned long ulValue; float fValue; } AbsValueConversion;
float fShutter; AbsValueConversion regValue;
// read the 32-bit hex value into the unsigned long member flycaptureGetCameraRegister(context, 0x918, & regValue.ulValue ); fShutter = regValue.fValue;
Accessing Absolute Values with FlyCapture
The FlyCapture API provides function calls for getting and setting absolute values, including:
-
flycaptureGetCameraAbsPropertyRange()
-
flycaptureGetCameraAbsPropertyEx()
-
flycaptureSetCameraAbsPropertyEx()
Related
Articles:
1.) Calculating Dragonfly gain and shutter settings
Article
ID: |
202 |
| Published: |
6/6/2005 11:31:12 AM |
Last
Modified: |
9/21/2006 10:06:54 AM |
| Keywords: |
absolute, value, ABS_VALUE, CSR, real, world, IEEE/REAL*4 format, shutter, gain, gamma, brightness, register, property, conversion, formula |
Issue Type: |
Normal Use |
|