Color Thresholding - 2023.1 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.1 English

The colorthresholding function compares the color space values of the source image with low and high threshold values, and returns either 255 or 0 as the output.

API Syntax

template<int SRC_T,int DST_T,int MAXCOLORS, int ROWS, int COLS,int NPC, int XFCVDEPTH_IN_1 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT>
          void colorthresholding(xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_1> & _src_mat,xf::cv::Mat<DST_T, ROWS, COLS, NPC, XFCVDEPTH_OUT_1> & _dst_mat,unsigned char low_thresh[MAXCOLORS*3], unsigned char high_thresh[MAXCOLORS*3])

Parameter Descriptions

The table below describes the template and the function parameters.

Parameter Description
SRC_T Input pixel type. Only 8-bit, unsigned, 3 channel is supported (XF_8UC3).
DST_T Output pixel type. Only 8-bit, unsigned, 1 channel is supported (XF_8UC1).
MAXCOLORS Maximum number of color values
ROWS Maximum height of input and output image
COLS Maximum width of input and output image. Must be a multiple of 8, for 8 pixel mode.
NPC Number of pixels to be processed per cycle. Only XF_NPPC1 supported.
XFCVDEPTH_IN_1 Depth of input image
XFCVDEPTH_OUT_1 Depth of output image
_src_mat Input image
_dst_mat Thresholded image
low_thresh Lowest threshold values for the colors
high_thresh Highest threshold values for the colors

Resource Utilization