Gaussian Difference

Gaussian Difference example resides in L3/examples/gaussiandifference directory.

This benchmark tests the performance of gaussiandifference function. The Difference of Gaussian Filter function can be implemented by applying Gaussian Filter on the original source image, and that Gaussian blurred image is duplicated as two images. The Gaussian blur function is applied to one of the duplicated images, whereas the other one is stored as it is. Later, perform the Subtraction function on, two times Gaussian applied image and one of the duplicated image.

The tutorial provides a step-by-step guide that covers commands for building and running kernel.

Executable Usage

  • Work Directory(Step 1)

The steps for library download and environment setup can be found in README file of L3 folder. For getting the design,

cd L3/example/gaussiandifference
  • Build kernel(Step 2)

Run the following make command to build your XCLBIN and host binary targeting a specific device. Please be noticed that this process will take a long time, maybe couple of hours.

export OPENCV_INCLUDE=< path-to-opencv-include-folder >
export OPENCV_LIB=< path-to-opencv-lib-folder >
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:< path-to-opencv-lib-folder >
export DEVICE=< path-to-platform-directory >/< platform >.xpfm
make host xclbin TARGET=hw
  • Run kernel(Step 3)

To get the benchmark results, please run the following command.

make run TARGET=hw
  • Example output(Step 4)

-----------Guassian Difference Design---------------
INFO: Running OpenCL section.
Found Platform
Platform Name: Xilinx
INFO: Device found - xilinx_u200_xdma_201830_2
XCLBIN File Name: krnl_gaussiandifference
INFO: Importing Vitis_Libraries/vision/L3/examples/gaussiandifference/Xilinx_Gaussiandifference_L3_Test_vitis_hw_u200/build_dir.hw.xilinx_u200_xdma_201830_2/krnl_gaussiandifference.xclbin
Loading: 'Vitis_Libraries/vision/L3/examples/gaussiandifference/Xilinx_Gaussiandifference_L3_Test_vitis_hw_u200/build_dir.hw.xilinx_u200_xdma_201830_2/krnl_gaussiandifference.xclbin'
Test Passed
------------------------------------------------------------

Profiling

The Gaussian Difference design is validated on Alveo U200 board at 300 MHz frequency. The hardware resource utilizations are listed in the following table.

Table 1 Hardware resources for Gaussian Difference

Dataset

LUT

BRAM

FF

DSP

Resolution

NPPC

other params

4K

1

Filter - 3x3

27235

35

37426

281

FHD

1

Filter - 3x3

15146

19

22032

193

The performance is shown below

Table 2 Performance numbers in terms of FPS (Frames Per Second) for Gaussian Difference

Dataset

FPS(CPU)

FPS(FPGA)

4k (3840x2160)

126

289

Full HD(1920x1080)

500

1100