Mode filter - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

Mode filter is a non-linear digital filter which improves noise reduction. This implements filter operation with given size of N by computing mode for all the pixels in an NxN window.

API Syntax

template <int FILTER_SIZE, int BORDER_TYPE, int TYPE, int ROWS, int COLS, int NPC = 1, int XFCVDEPTH_IN = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT = _XFCVDEPTH_DEFAULT>
void modefilter(xf::cv::Mat<TYPE, ROWS, COLS, NPC, XFCVDEPTH_IN>& _src, xf::cv::Mat<TYPE, ROWS, COLS, NPC, XFCVDEPTH_OUT>& _dst)

Parameter Descriptions

The following table describes the template and the function parameters.

Resource Utilization

The following table summarizes the resource utilization of the Mode filter function for XF_NPPC1 configurations, generated using Vitis HLS 2020.2 version tool.

Table 665 Table Mode filter Function Resource Utilization Summary
Operating Mode FILTER_SIZE Operating Frequency (MHz) Utilization Estimate
LUTs FFs DSPs BRAMs
1 pixel 3 300 628 900 0 3
1 pixel 5 300 2579 4070 0 5
1 pixel 7 300 7852 14065 0 7

Performance Estimate

The following table summarizes performance estimates of Mode filter function on Vitis HLS 2020.2 version tool.

Table 666 Table Mode filter Function Performance Estimate Summary
Operating Mode FILTER_SIZE Operating Frequency (MHz) Input Image Size Latency Estimate Max (ms)
1 pixel 3 300 1920x1080 6.99
1 pixel 5 300 1920x1080 7.00
1 pixel 7 300 1920x1080 7.15