This is done by replacing the entire user-defined lookup table (LUT).
To replace individual entries in the lookup table, use the LUT feature.
In this topic Hide
LUT is short for "lookup table", which is basically an indexed list of numbers. For more information, see the LUT feature description.
While the LUT feature allows you to change individual entries in the lookup table, the LUT Value All feature allows you to change all entries in the lookup table in a single operation.
In many cases, this is faster than repeatedly changing individual entries in the LUT.
To change all entries in the lookup table, use the LUTValueAll parameter. The parameter structure depends on the maximum pixel bit depth of your camera.
On cameras with a maximum pixel bit depth of 12 bit, the LUTValueAll parameter is an array that consists of 4096 x 4 bytes. Each 4-byte word represents a LUTValue parameter value.
The LUTValue parameter values are sorted by the LUTIndex number in ascending order (0 through 4095).
On cameras with a maximum pixel bit depth of 10 bit, the LUTValueAll parameter is an array that consists of 1024 x 4 bytes. Each 4-byte word represents a LUTValue parameter value.
The LUTValue parameter values are sorted by the LUTIndex number in ascending order (0 through 1023).
To set all entries in the lookup table:
To get all entries in the lookup table:
The LUTValueAll parameter is not available in the pylon Viewer application. You can only set or get the parameter via the pylon API.
Camera Model | Endianness of the 4-Byte Words (LUT Values) |
---|---|
All ace 2 GigE camera models | LUT Value All feature not supported |
All ace 2 USB 3.0 camera models | LUT Value All feature not supported |
All ace USB 3.0 camera models | Little-endian |
All ace GigE camera models | Big-endian |
All boost CXP-12 camera models | LUT Value All feature not supported |
All dart BCON for LVDS camera models | LUT Value All feature not supported |
All dart BCON for MIPI camera models | LUT Value All feature not supported |
All dart USB 3.0 camera models | LUT Value All feature not supported |
All pulse USB 3.0 camera models | LUT Value All feature not supported |
// Write a lookup table to the device
// The following lookup table inverts the pixel values
// (bright -> dark, dark -> bright)
// Only applies to cameras with a maximum pixel bit depth of 12 bit
// Note: This is a simplified code sample.
// You should always check the camera interface and
// the endianness of your system before using LUTValueAll.
// For more information, see the 'LUTValueAll' code sample
// in the C++ Programmer's Guide and Reference Documentation
// delivered with the Basler pylon Camera Software Suite.
uint32_t lutValues[4096];
for (int i=0; i<4096; i+=8)
{
lutValues[i] = 4095-i;
}
camera.LUTValueAll.SetValue(lutValues);
// Enable the LUT
camera.LUTEnable.SetValue(true);
You can also use the pylon Viewer to easily set the parameters.