Look Up Table

ThexFLUTfunction performs the table lookup operation. Transforms the source image into the destination image using the given look-up table. The input image must be of depth AU_8UP and the output image of same type as input image.

Iout(x, y) = LUT [Iin1(x, y)]

Where:

  • Iout(x, y) is the intensity of output image at (x, y) position
  • Iin(x, y) is the intensity of first input image at (x, y) position
  • LUT is the lookup table of size 256 and type unsigned char.

API Syntax

template  void xFLUT(xF::Mat & _src, xF::Mat & _dst,unsigned char* _lut)

Parameter Descriptions

The following table describes the template and the function parameters.

Table 1.xFLUT Function Parameter Descriptions
Parameter Description
SRC_T Input pixel type. 8-bit, unsigned, 1 channel (XF_8UC1) is supported.
ROWS Number of rows in the image being processed.
COLS Number of columns in the image being processed.
NPC Number of pixels to be processed in parallel. Possible options are XF_NPPC1 and XF_NPPC8 for 1 pixel and 8 pixel operations respectively.
_src Input image of size (ROWS, COLS) and type 8U.
_dst Output image of size (ROWS, COLS) and same type as input.
_lut Input lookup Table of size 256 and type unsigned char.

Resource Utilization

The following table summarizes the resource utilization of the xFLUT function, generated usingVivado HLS 2017.1tool for the Xilinx Xczu9eg-ffvb1156-1-i-es1 FPGA, to process a grayscale HD (1080x1920) image.

Table 2.xFLUT Function Resource Utilization Summary
Operating Mode

Operating Frequency (MHz)

Utilization Estimate
BRAM_18K DSP_48Es FF LUT CLB
1 pixel 300 1 0 937 565 137
8 pixel 150 9 0 1109 679 162

Performance Estimate

The following table summarizes the performance in different configurations, as generated usingVivado HLS 2017.1tool for the Xilinx Xczu9eg-ffvb1156-1-i-es1, to process a grayscale HD (1080x1920) image.

Table 3.xFLUT Function Performance Estimate Summary
Operating Mode Latency Estimate
Max Latency
1 pixel operation (300 MHz) 6.92 ms
8 pixel operation (150 MHz) 1.66 ms