LUT Value All#

The LUT Value All camera feature allows you to replace all pixel values in your images by values defined by you.

This is done by replacing the entire user-defined lookup table (LUT).

To replace individual entries in the lookup table, use the LUT feature.

Using the Feature#

How It Works#

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.

12-bit Camera Models#

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).

Info

  • The endianness of the 4-byte words (lut values) depends on your camera model.
  • If the LUT is limited to 512 entries, only every eighth 4-byte word (0, 8, 16, 24, …, 4088) is actually used by the camera. The other 4-byte words are ignored. Example:
    LUT Value All Parameter Structure (12-Bit Camera Models)

10-bit Camera Models#

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).

Info

  • The endianness of the 4-byte words (lut values) depends on your camera model.
  • If the LUT is limited to 512 entries, only every second 4-byte word (0, 2, 4, 6, …, 1022) is actually used by the camera. The other 4-byte words are ignored. Example:
    LUT Value All Parameter Structure (10-Bit Camera Models)

Setting or Getting All LUT Values#

To set all entries in the lookup table:

  1. Set the LUTValueAll parameter to the desired value. Make sure to apply the correct endianness of the 4-byte words (LUT values).
  2. Set the LUTEnable parameter to true.

To get all entries in the lookup table:

  1. Get the value of the LUTValueAll parameter. Observe the endianness of the 4-byte words (LUT values).

Info

The LUTValueAll parameter is not available in the pylon Viewer application. You can only set or get the parameter via the pylon API.

Specifics#

Show all camera models

Camera Model Endianness of the 4-Byte Words (LUT Values)
a2A1920-51gcBAS Big-endian
a2A1920-51gcPRO Big-endian
a2A1920-51gmBAS Big-endian
a2A1920-51gmPRO Big-endian
a2A1920-160ucBAS Little-endian
a2A1920-160ucPRO Little-endian
a2A1920-160umBAS Little-endian
a2A1920-160umPRO Little-endian
a2A3840-13gcBAS Big-endian
a2A3840-13gmBAS Big-endian
a2A3840-45ucBAS Little-endian
a2A3840-45umBAS Little-endian
acA640-90gc Big-endian
acA640-90gm Big-endian
acA640-90uc Little-endian
acA640-90um Little-endian
acA640-120gc Big-endian
acA640-120gm Big-endian
acA640-120uc Little-endian
acA640-120um Little-endian
acA640-121gm Big-endian
acA640-300gc Big-endian
acA640-300gm Big-endian
acA640-750uc Little-endian
acA640-750um Little-endian
acA720-290gc Big-endian
acA720-290gm Big-endian
acA720-520uc Little-endian
acA720-520um Little-endian
acA780-75gc Big-endian
acA780-75gm Big-endian
acA800-200gc Big-endian
acA800-200gm Big-endian
acA800-510uc Little-endian
acA800-510um Little-endian
acA1280-60gc Big-endian
acA1280-60gm Big-endian
acA1300-22gc Big-endian
acA1300-22gm Big-endian
acA1300-30gc Big-endian
acA1300-30gm Big-endian
acA1300-30uc Little-endian
acA1300-30um Little-endian
acA1300-60gc Big-endian
acA1300-60gm Big-endian
acA1300-60gmNIR Big-endian
acA1300-75gc Big-endian
acA1300-75gm Big-endian
acA1300-200uc Little-endian
acA1300-200um Little-endian
acA1440-73gc Big-endian
acA1440-73gm Big-endian
acA1440-220uc Little-endian
acA1440-220um Little-endian
acA1600-20gc Big-endian
acA1600-20gm Big-endian
acA1600-20uc Little-endian
acA1600-20um Little-endian
acA1600-60gc Big-endian
acA1600-60gm Big-endian
acA1920-25gc Big-endian
acA1920-25gm Big-endian
acA1920-25uc Little-endian
acA1920-25um Little-endian
acA1920-40gc Big-endian
acA1920-40gm Big-endian
acA1920-40uc Little-endian
acA1920-40ucMED Little-endian
acA1920-40um Little-endian
acA1920-40umMED Little-endian
acA1920-48gc Big-endian
acA1920-48gm Big-endian
acA1920-50gc Big-endian
acA1920-50gm Big-endian
acA1920-150uc Little-endian
acA1920-150um Little-endian
acA1920-155uc Little-endian
acA1920-155ucMED Little-endian
acA1920-155um Little-endian
acA1920-155umMED Little-endian
acA2000-50gc Big-endian
acA2000-50gm Big-endian
acA2000-50gmNIR Big-endian
acA2000-165uc Little-endian
acA2000-165um Little-endian
acA2000-165umNIR Little-endian
acA2040-25gc Big-endian
acA2040-25gm Big-endian
acA2040-25gmNIR Big-endian
acA2040-35gc Big-endian
acA2040-35gm Big-endian
acA2040-55uc Little-endian
acA2040-55um Little-endian
acA2040-90uc Little-endian
acA2040-90um Little-endian
acA2040-90umNIR Little-endian
acA2040-120uc Little-endian
acA2040-120um Little-endian
acA2440-20gc Big-endian
acA2440-20gm Big-endian
acA2440-35uc Little-endian
acA2440-35ucMED Little-endian
acA2440-35um Little-endian
acA2440-35umMED Little-endian
acA2440-75uc Little-endian
acA2440-75ucMED Little-endian
acA2440-75um Little-endian
acA2440-75umMED Little-endian
acA2500-14gc Big-endian
acA2500-14gm Big-endian
acA2500-14uc Little-endian
acA2500-14um Little-endian
acA2500-20gc Big-endian
acA2500-20gcMED Big-endian
acA2500-20gm Big-endian
acA2500-20gmMED Big-endian
acA2500-60uc Little-endian
acA2500-60um Little-endian
acA3088-16gc Big-endian
acA3088-16gm Big-endian
acA3088-57uc Little-endian
acA3088-57um Little-endian
acA3800-10gc Big-endian
acA3800-10gm Big-endian
acA3800-14uc Little-endian
acA3800-14um Little-endian
acA4024-8gc Big-endian
acA4024-8gm Big-endian
acA4024-29uc Little-endian
acA4024-29um Little-endian
acA4096-11gc Big-endian
acA4096-11gm Big-endian
acA4096-30uc Little-endian
acA4096-30ucMED Little-endian
acA4096-30um Little-endian
acA4096-30umMED Little-endian
acA4096-40uc Little-endian
acA4096-40ucMED Little-endian
acA4096-40um Little-endian
acA4096-40umMED Little-endian
acA4112-8gc Big-endian
acA4112-8gm Big-endian
acA4112-20uc Little-endian
acA4112-20ucMED Little-endian
acA4112-20um Little-endian
acA4112-20umMED Little-endian
acA4112-30uc Little-endian
acA4112-30ucMED Little-endian
acA4112-30um Little-endian
acA4112-30umMED Little-endian
acA4600-7gc Big-endian
acA4600-10uc Little-endian
acA5472-5gc Big-endian
acA5472-5gm Big-endian
acA5472-17uc Little-endian
acA5472-17um Little-endian
boA4096-93cc Little-endian
boA4096-93cm Little-endian
boA4112-68cc Little-endian
boA4112-68cm Little-endian
daA1280-54lc LUT Value All feature not supported
daA1280-54lm LUT Value All feature not supported
daA1280-54uc LUT Value All feature not supported
daA1280-54um LUT Value All feature not supported
daA1600-60lc LUT Value All feature not supported
daA1600-60lm LUT Value All feature not supported
daA1600-60uc LUT Value All feature not supported
daA1600-60um LUT Value All feature not supported
daA1920-15um LUT Value All feature not supported
daA1920-30uc LUT Value All feature not supported
daA1920-30um LUT Value All feature not supported
daA2500-14lc LUT Value All feature not supported
daA2500-14lm LUT Value All feature not supported
daA2500-14uc LUT Value All feature not supported
daA2500-14um LUT Value All feature not supported
daA2500-60mc LUT Value All feature not supported
puA1280-54uc LUT Value All feature not supported
puA1280-54um LUT Value All feature not supported
puA1600-60uc LUT Value All feature not supported
puA1600-60um LUT Value All feature not supported
puA1920-30uc LUT Value All feature not supported
puA1920-30um LUT Value All feature not supported
puA2500-14uc LUT Value All feature not supported
puA2500-14um LUT Value All feature not supported

Sample Code#

// 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);

This sample code is only available in C++ language.

You can also use the pylon Viewer to easily set the parameters.