Loading a look-up table into the camera, Note – ALLIED Vision Technologies Stingray F-504 User Manual
Page 308

Configuration of the camera
STINGRAY Technical Manual V4.4.4
306
Loading a look-up table into the camera
Loading a look-up table into the camera is done through the
GPDATA_BUFFER. Because the size of the GPDATA_BUFFER is smaller than a
complete look-up table the data must be written in multiple steps.
To load a lookup table into the camera:
1.
Query the limits and ranges by reading LUT_INFO and GPDATA_INFO.
2.
Set EnableMemWR to true (1).
3.
Set AccessLutNo to the desired number.
4.
Set AddrOffset to 0.
5.
Write n lookup table data bytes to GPDATA_BUFFER (n might be lower
than the size of the GPDATA_BUFFER; AddrOffset is automatically
adjusted inside the camera).
6.
Repeat step 5 until all data is written into the camera.
7.
Set EnableMemWR to false (0).
Note
The BitsPerValue field indicates how many bits are read
from the LUT for any gray-value read from the sensor. To
determine the number of bytes occupied for each gray-
value round-up the BitsPerValue field to the next byte
boundary.
Examples:
•
BitsPerValue = 8 1 byte per gray-value
•
BitsPerValue = 14 2 byte per gray-value
Divide MaxLutSize by the number of bytes per gray-value
in order to get the number of LUT entries (gray levels):
that is 2
n
with n=number of bits read from sensor.
Note
Stingray cameras have the gamma feature implemented
via a built-in look-up table. Therefore you can not use
gamma and your own look-up table at the same time. Nev-
ertheless you may combine a gamma look-up table into
your own look-up table.
Note
When using the LUT feature and the gamma feature pay
attention to the following:
•
gamma ON look-up table is switched ON also
•
gamma OFF look-up table is switched OFF also
•
look-up table OFF gamma is switched OFF also
•
look-up table ON gamma is switched OFF