Mean and Standard Deviation
ThexFMeanStddev
function computes the mean and standard deviation of input image. The output Mean value is in fixed point Q8.8 format, and the Standard Deviation value is in Q8.8 format. Mean and standard deviation are calculated as follows:
API Syntax
template void xFmeanstd(xF::Mat & _src,unsigned short* _mean,unsigned short* _stddev)
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) 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 per cycle; possible options are XF_NPPC1 and XF_NPPC8 for 1 pixel and 8 pixel operations respectively. |
_src | Input image |
_mean | 16-bit data pointer through which the computed mean of the image is returned. |
_stddev | 16-bit data pointer through which the computed standard deviation of the image is returned. |
Resource Utilization
The following table summarizes the resource utilization of the xFmeanstd 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 | 6 | 896 | 461 | 121 |
8 pixel | 150 | 0 | 13 | 1180 | 985 | 208 |
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 |