Tutorial: Running the xfOpenCV examples - SundanceMultiprocessorTechnology/VCS-1 GitHub Wiki

Abstract

TBC

Requirements

Dependencies

It is assumed that the user has successfully completed the following:

Documentation

It is assumed that the user is familiar with the following documentation

Software

TBC

Hardware

TBC

Steps

  1. Open a terminal and run the following commands:
$ cd <xfopencv folder>

TBC
  1. Select the add sources under the present project in SDX and go to the colour detect example in the xfopencv/examples/colordetect and add all files except the make and *.json files to the project also add the im0.jpg file from the data folder to the project.
  2. Add the xfopencv functions for hardware acceleration in the project navigation and inthe present project click on libs/xfopenc/include/imageproc folder go to XF_Colourthresholding.hpp function click it and further click on the option xf here left click on the xF_InRange function and select toggle hw/sw.
  3. Do the same for xf_dilate, xf_erode and xf_RGB2HSV function.
  4. Please select active build configration as release and build the project.
  5. Once the project is build without errors copy the contents of sd_card folder to your sd_card BOOT folder which can be created by following the steps in Build Firmware Page.
  6. The rootfs is made on the rootfs folder again following steps in above mentioned page.
  7. One last thing is to copy a file libsds_lib.so from /Xilinx/SDx/2018.3/target/aarch64-linux/lib to /rootfs/usr/lib
  8. Take the SDcard and plug it into VCS-1 and turn the system on in a serial terminal like putty open a link with the board on ttyUSB0 and speed 115200 when the prompt comes up the password is root.
  9. Mount the BOOT folder to /mnt folder and open it then run the program by typing ./colour_detect.elf im0.jpg.
  10. Once it is finished unmount the Boot folder and shutdown the system.
  11. Plug the sdcard out and in a pc open the SDCARD boot folder one will see the images created by opencv and the other one should be created by xfopencv.