Zynq UltraScale MPSoC Base TRD 2017.2 - Design Module 9
Zynq UltraScale MPSoC Base TRD 2017.2 - Design Module 9
Table of Contents
2D Filter and Optical Flow Combined Sample
Design Overview
This module shows how to add two image-processing filters between the capture and the display. The 2D filter and dense optical flow algorithm are implemented in hardware.
Design Components
This module requires the following components:
zcu102_base_trd (SDSoC)
filter2d_optflow (HW)
video_lib
video_qt2
Build Flow Tutorials
2D Filter and Optical Flow Combined Sample
This tutorial shows how to build the hls_video version of filter2d combined with the xfopencv dense optical flow algorithm sample based on the Base TRD SDSoC platform.
Set the SYSROOT environment variable. This requires that you have previously completed the PetaLinux build step.
Note 1 : Make sure you set the env variable in the same shell that is used to launch SDx. Also make sure the env variable is set before starting SDx, otherwise close and re-start SDx.
Note 2: The below command assumes you are using the default yocto tmp directory. If you are using a custom yocto tmp directory, you need to modify the path accordingly.
% export SYSROOT=$TRD_HOME/apu/petalinux_bsp/tmp/sysroots/plnx_aarch64Open the existing SDx workspace from design module 8 using the SDx tool.
% cd $TRD_HOME/apu/video_app % sdx -workspace . &&Create a new SDx Project.
Enter 'filter2d_optflow' as project name.
Click 'Add Custom Platform', browse to the $TRD_HOME/apu/sdsoc_pfm directory and confirm. Select the newly added 'zcu102_base_trd (custom)' platform for production silicon or 'zcu102_es2_base_trd (custom)' for ES2 silicon from the list and click 'Next'.
Note: You can skip this step if you have added the platform in a previous design module.
Check the 'Shared Library' box and click 'Next'.
Select 'Filter 2D and Optical Flow Library' template and click 'Finish'.
Verify the functions added to the HW functions in the project settings panel and the clock frequency is set to 299.97MHz. Wait until the C/C++ indexer has finished, indicated by the progress icon in the lower right corner. Only then change the active build configuration to 'Release'.
Right-click the filter2d_optflow project, select 'C/C++ Build Settings'. Navigate to the 'Build Artifacts' tab and add the output prefix 'lib'. Click OK.
Right-click the filter2d_optflow project and select 'Build Project'.
Copy the content of the generated sd_card folder to the dm9 SD card directory
% mkdir -p $TRD_HOME/images/dm9 % cp -r filter2d_optflow/Release/sd_card/* $TRD_HOME/images/dm9