Users Manual – svs4021, svs2020,svs2050, svs2051, svs1020, svs1050, svs285, svs340, svs625
p. 70
Last Update 20.07.2009
17.10.7
Decoding 12-bit images
When a camera is switched to 12-bit mode the received image usually needs
decoding in order to further process that image e.g. for displaying purposes (8-
bit needed) respectively storage purposes (most often 16-bit needed).
A
conversion will be based on the layout of 12-bit data where 2 pixels are folded
into 3 bytes in the following way:
The SDK provides for the following functions that perform conversion from 12-
bit to 8-bit and 16-bit as well as from 16-bit to 8-bit:
Image_getImage12bitAs8bit(Camera, Buffer8bit, BufferLength);
Image_getImage12bitAs16bit(Camera, Buffer16bit, BufferLength);
Image_getImage16bitAs8bit(Camera, Buffer8bit, BufferLength);
17.10.8
Adjusting tap balance automatically
Whenever a dual-tap camera is opened by calling
Camera_openConnection(Camera);
a balance check between the right and the left tap will be performed on the first
image that is regularly captured by the application. In case of a need to run a
tap balance, new gain factors are determined for achieving an optimal tap
balance. It may take multiple images until a final balance is reached. Once a
balance is adjusted, the tap balance is finished and the gain factors are not
changed anymore. Those gain factors will apply until the camera is closed.
An application can take more control over the auto tap balance process if this is
needed. The following options are offered for “auto tap balance” mode:
Off
Once
Continuous
An application can switch auto tap balance OFF before opening a streaming
channel in order to prevent from running any adjustments. Further an
application can switch auto tap balance to ONCE at any time in order to run a
one-time adjustment of tap balance. Only in case of big changes of gain and
exposure during a camera usage it might be recommended to switch auto tap
balance to CONTINUOUS. In that case every captured image is checked for tap
balance and individual gain factors for right and left balance are adjusted
appropriately whenever this is needed. There is no visible runtime penalty when
switching auto tap balance to CONTINUOUS since only a small stripe left and
right the middle of the sensor are taken into account for evaluating a deviation
from tap balance.
The following two functions allow for switching the auto tap balance mode to
explained values and for retrieving current state:
Camera_setAutoTapBalanceMode(Camera, AutoTapBalanceMode);
Camera_getAutoTapBalanceMode(Camera, *AutoTapBalanceMode);
A reset to factory defaults or to arbitrary values inside a range of +/- 1.5 dB
can be performed by the following function. The second function retrieves
current setting:
Camera_setTapBalance (Camera, TapBalance);
Camera_getTapBalance (Camera, *TapBalance);