Clahe - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

A histogram is created for each tile using which histogram equalization is performed.

API Syntax

CLAHEImpl Class API:

template <int IN_TYPE, int HEIGHT, int WIDTH, int NPC, int CLIPLIMIT, int TILES_Y_MAX, int TILES_X_MAX, int TILES_Y_MIN = 4, int TILES_X_MIN = 4, int XFCVDEPTH_IN_1 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT>
class CLAHEImpl {}

Processing member function:

xf::cv::clahe::CLAHEImpl<IN_TYPE, HEIGHT, WIDTH, NPC, CLIPLIMIT, TILES_Y_MAX, TILES_X_MAX, TILES_Y_MIN, TILES_X_MIN, XF_CV_DEPTH_IN_1, XF_CV_DEPTH_OUT_1>::process(imgOutput, imgInput, _lutw, _lutr, _clipCounter, height, width, clip, tilesY, tilesX)

Parameter Descriptions

The following table describes the template and the function parameters.

Table 346 Table. clahe Parameter Description
Paramete r Description
IN_TYPE Input pixel type. The current supported pixel value is XF_8UC1.
HEIGHT Maximum height of input and output image.
WIDTH Maximum width of input and output image.
NPC Number of pixels to be processed per cycle; possible options are XF_NPPC1 for 1 pixel operation.
CLIPLIMIT Number of pixels to be processed per cycle; possible options are XF_NPPC1 for 1 pixel operation.
TILES_Y_MAX Max range of number of tiles created vertically
TILES_X_MAX Min range of number of tiles created horizontally
TILES_Y_MIN Min range of number of tiles created vertically
TILES_X_MIN Max range of number of tiles created horizontally
XF_CV_DEPTH_IN_1 Depth of input image
XF_CV_DEPTH_OUT_1 Depth of output image

Resource Utilization

The following table summarizes the resource utilization of the clahe function, generated using vitis HLS 2022.1 tool for the xcu200-fsgd2104-2-e FPGA.

Table 347 Table. clahe Function Resource Utilization Summary
Operating Mode Operating Frequency (MHz) Utilization Estimate
BRAM_18K DSP_48Es FF LUT CLB
1 Pixel 300 0.5 77 376 15468 2969

Performance Estimate

The following table summarizes the performance in different configurations, as generated using vitis HLS 2022.1 tool for the xcu200-fsgd2104-2-e.

Table 348 Table 71. clahe Function Performance Estimate Summary
Operating Mode Latency Estimate
Max Latency (ms)
1 pixel operation (300 MHz) 1.8592