API Syntax
template <int IN_TYPE,
int OUT_TYPE,
int HEIGHT,
int WIDTH,
int NPC,
int XFCVDEPTH_IN = _XFCVDEPTH_DEFAULT,
int XFCVDEPTH_OUT = _XFCVDEPTH_DEFAULT>
void preProcess_fp32(xf::cv::Mat<IN_TYPE, HEIGHT, WIDTH, NPC, XFCVDEPTH_IN>& in_mat,
xf::cv::Mat<OUT_TYPE, HEIGHT, WIDTH, NPC, XFCVDEPTH_OUT>& out_mat,
float params[2 * XF_CHANNELS(IN_TYPE, NPC)]);
preProcess Template Parameter Descriptions
The following table describes the common template parameters for all
preProcess_* variants. Implementations are in
L1/include/dnn/xf_preprocess_generic.hpp.
Resource Utilization
The following table summarizes resource utilization for a 1920 x 1080 image, as generated in the Vitis HLS 2026.1 tool for Versal AI Edge at 300 MHz.
| Function Config | Image Size | Frequency (MHz) | NPC | LUT | FF | DSP | BRAM | URAM |
|---|---|---|---|---|---|---|---|---|
| INT8 | 1920 x 1080 | 300 | 4 | 3282 | 2138 | 17 | 0 | 0 |
| BF16, FP16 | 1920 x 1080 | 300 | 4 | 6866 | 2238 | 1 | 0 | 0 |
| FP32 | 1920 x 1080 | 300 | 4 | 9672 | 7547 | 77 | 0 | 30 |
Performance Estimate
The following table summarizes the latency estimates for a Full HD (1920 x 1080) image at 300 MHz.
| Operating Mode | Operating Frequency (MHz) |
Latency Estimate Max (ms) |
|---|---|---|
| 4 pixel (NPC4) | 300 | 1.8 |
| 2 pixel (NPC2) | 300 | 3.6 |
| 1 pixel (NPC1) | 300 | 7.0 |