MATRIX VISION - mvBlueCOUGAR-X/-XD Technical Documentation
Introducing LUTs

Introduction

Look-Up-Tables (LUT) are used to transform input data into a desirable output format. For example, if you want to invert an 8 bit image, a Look-Up-Table will look like the following:

Figure 1: Look-Up-Table which inverts a pixel of an 8 bit mono image

I.e., a pixel which is white in the input image (value 255) will become black (value 0) in the output image.

All MATRIX VISION devices use a hardware based LUT which means that

  • no host CPU load is needed and
  • the LUT operations are independent of the transmission bit depth.

Setting the hardware based LUTs via LUT Control

On the mvBlueCOUGAR-X using wxPropView, you will find the LUT Control via "Setting -> Base -> Camera -> GenICam -> LUT Control".

wxPropView offers a wizard for the LUT Control usage:

  1. Click on "Setting -> Base -> Camera -> GenICam -> LUT Control".
    Now, the "Wizard" button becomes active.

    Figure 2: wxPropView - LUT Control wizard button

  2. Click on the "Wizard" button to start the LUT Control wizard tool.
    The wizard will load the LUT data from the camera.

    Figure 3: wxPropView - LUT Control wizard dialog

It is easy to change settings like the Gamma value of the Luminance or of each color channel (in combination with a color sensor of course) with the help of the wizard. You can also invert the values of each pixel with the wizard. It is not possible to set a LUT mode and the "mv LUT Mapping" is fixed.

Make your changes and do not forget to

  1. click on "Copy to..." and select "All" or the color channel you need, to
  2. click on "Enable All", and finally, to
  3. click on Synchronize and play the settings back to the device (via "Cache -> Device").
Note
If you select "Enable All" without entering any value the image will be inverted.

Setting the Host based LUTs via LUTOperations

Host based LUTs are also available via "Setting -> Base -> ImageProcessing -> LUTOperations"). Here, the changes will affect the 8 bit image data and the processing needs the CPU of the host system.

Three "LUTMode"s are available:

  • "Gamma"
    You can use "Gamma" to lift darker image areas and to flatten the brighter ones. This compensates the contrast of the object. The calculation is described here. It makes sense to set the "GammaStartThreshold" higher than 0 to avoid a too extreme lift or noise in the darker areas.
  • "Interpolated"
    With "Interpolated" you can set the key points of a characteristic line. You can defined the number of key points. The following figure shows the behavior of all 3 LUTInterpolationModes with 3 key points:
Figure 4: LUTMode "Interpolated" -> LUTInterpolationMode
  • "Direct"
    With "Direct" you can set the LUT values directly.

Example 1: Inverting an Image

To get an inverted 8 bit mono image like shown in Figure 1, you can set the LUT using wxPropView. After starting wxPropView and using the device,

  1. Set "LUTEnable" to "On" in "Setting -> Base -> ImageProcessing -> LUTOperations".
  2. Afterwards, set "LUTMode" to "Direct".
  3. Right-click on "LUTs -> LUT-0 -> DirectValues[256]" and select "Set Multiple Elements... -> Via A User Defined Value Range".
    This is one way to get an inverted result. It is also possible to use the "LUTMode" - "Interpolated".
  4. Now you can set the range from 0 to 255 and the values from 255 to 0 as shown in Figure 2.
Figure 5: Inverting an image using wxPropView with LUTMode "Direct"