![Kaya Instruments Komodo CoaXPress Скачать руководство пользователя страница 8](http://html2.mh-extra.com/html/kaya-instruments/komodo-coaxpress/komodo-coaxpress_manual_3687709008.webp)
KAYA Frame Grabbers Color Geometric Distortion Correction
7
4.3
Configuration steps
To configure the Color Distortion Corrector the following steps should be taken:
1.
A
color
channel(Blue,
Green
or
Red)
should
be
selected
by
setting
the
“ColorDistortionCorrectionSelector”
2.
The mode of data loading should be set to “Normal” using the parameter
“ColorDistortionCorrectionLoadMode”. Afterwards, initial color channel address should be
selected by setting the “ColorDistortionCorrectionAddress”.
3.
The
desired
mode
of
data
loading
should
be
defined
using
the
“ColorDistortionCorrectionLoadMode”.
4.
If “Incremental” Load Mode is selected then data value should be written to
“ColorDistortionCorrectionValue”, each write will update the selected pixel color channel
correction value and increment the “ColorDistortionCorrectionAddress”;
On the other hand, if “Normal” Load Mode is selected, on each transection the
“ColorDistortionCorrectionAddress” should be updated and data value write/read could
follow, for selected pixel color channel correction address.
5.
Corrector may be enabled/disabled using the “ColorDistortionCorrectionEnable” parameter.
Example code:
Color Geometric Distortion Correction
CAMHANDLE camHandle;
KYFG_SetGrabberValueEnum_ByValueName(camHandle,“ColorDistortionCorrectionSelector”,
“DistortCorrectChannelBlue”);
KYFG_SetGrabberValueEnum_ByValueName(camHandle,“ColorDistortionCorrectionLoadMode”,
“Normal”);
KYFG_SetGrabberValueInt(camHandle,“ColorDistortionCorrectionAddress”, 0);
KYFG_SetGrabberValueEnum_ByValueName(camHandle,“ColorDistortionCorrectionLoadMode”,
“Incremental”);
for(size_t iValueReg = 0; iValueReg < 4096; iV+)
{
int64_t value = ((int64_t)rand() % 256) - 128; // range of -128 up to +127
KYFG_SetGrabberValueInt(camHandle,“ColorDistortionCorrectionValue”, value);
}
KYFG_SetGrabberValueEnum_ByValueName(camHandle,“ColorDistortionCorrectionEnable”,
“Enable”);