MinMax Location
ThexFminMaxLoc
function finds the minimum and maximum values in an image and location of those values.
API Syntax
template void xFminMaxLoc(xF::Mat & _src,int32_t *max_value, int32_t *min_value,uint16_t *_minlocx, uint16_t *_minlocy, uint16_t *_maxlocx, uint16_t *_maxlocy )
Parameter Descriptions
The following table describes the template and the function parameters.
Parameter | Description |
---|---|
SRC_T | Input pixel type. 8-bit, unsigned, 1 channel (XF_8UC1), 16-bit, unsigned, 1 channel (XF_16UC1), 16-bit, signed, 1 channel (XF_16SC1), 32-bit, signed, 1 channel (XF_32SC1) are 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 per cycle; possible options are XF_NPPC1 and XF_NPPC8 for 1 pixel and 8 pixel operations respectively. |
_src | Input image |
max_val | Maximum value in the image, of type int. |
min_val | Minimum value in the image, of type int. |
_minlocx | x-coordinate location of the first minimum value. |
_minlocy | y-coordinate location of the first maximum value. |
_maxlocx | x-coordinate location of the first minimum value. |
_maxlocy | y-coordinate location of the first maximum value. |
Resource Utilization
The following table summarizes the resource utilization of the xFminMaxLoc function, generated usingVivado HLS 2017.1tool for theXilinx Xczu9eg-ffvb1156-1-i-es1FPGA, to process a grayscale HD (1080x1920) image.
Operating Mode | Operating Frequency (MHz) |
Utilization Estimate | ||||
---|---|---|---|---|---|---|
BRAM_18K | DSP_48Es | FF | LUT | CLB | ||
1 pixel | 300 | 0 | 3 | 451 | 398 | 86 |
8 pixel | 150 | 0 | 3 | 1049 | 1025 | 220 |
Performance Estimate
The following table summarizes the performance in different configurations, as generated usingVivado HLS 2017.1tool for theXilinx Xczu9eg-ffvb1156-1-i-es1, to process a grayscale HD (1080x1920) image.
Operating Mode | Latency Estimate |
---|---|
Max Latency | |
1 pixel operation (300 MHz) | 6.9 ms |
8 pixel operation (150 MHz) | 1.69 ms |