Using the xfOpenCV Library

This section describes using the xfOpenCV library in the SDx development environment.

Note: The instructions in this section assume that you have downloaded and installed all the required packages. For more information, see the Prerequisites .

Use the following steps to run a unit test for bilateral filter on zcu102_es2_reVISION:

  1. Launch the SDx development environment using the desktop icon or the Start menu.
    The Workspace Launcher dialog appears.
  2. Click Browse to enter a workspace folder used to store your projects (you can use workspace folders to organize your work), then click OK to dismiss the Workspace Launcher dialog.
    Note: Before launching the SDx IDE on Linux, ensure that you use the same shell that you have used to set the $SYSROOT environment variable. This is usually the file path to the Linux root file system.
    The SDx development environment window opens with the Welcome tab visible when you create a new workspace. The Welcome tab can be closed by clicking the X icon or minimized if you do not wish to use it.
  3. Select File > New > Xilinx SDx Project. from the SDx development environment menu bar.
    The New Project dialog box opens.
  4. Specify the name of the project. For example Bilateral.
  5. Click Next.
    The the Choose Hardware Platform page appears.
  6. From the Choose Hardware Platform page, click the Add Custom Platform button.
  7. Browse to the directory where you extracted the reVISION platform files. Ensure that you select the zcu102_es2_reVISION folder.
  8. From the Choose Hardware Platform page, select zcu102_es2_reVISION (custom).
  9. Click Next.
    The Templates page appears, containing source code examples for the selected platform.
  10. From the list of application templates, select bilateral - File I/O and click Finish.
  11. Click the Active build configurations drop-down from the SDx Project Settings window, to select the active configuration or create a build configuration.

    The standard build configurations are Debug and Release. To get the best runtime performance, switch to use the Release build configuration as it uses a higher compiler optimization setting than the Debug build configuration.

    Figure: SDx Project Settings - Active Build Configuration



  12. Set the Data motion network clock frequency (MHz) to the required frequency, on the SDx Project Settings page.
  13. Select the Generate bitstream and Generate SD card image check boxes.
  14. Right-click the project and select Build Project or press Ctrl+B keys to build the project, in the Project Explorer view.
  15. Copy the contents of the newly created sd_card folder to the SD card.
    The sd_card folder contains all the files required to run designs on the ZCU102 board.
  16. Insert the SD card in the ZCU102 board card slot and switch it ON.
    Note: A serial port emulator (Teraterm/ minicom) is required to interface the user commands to the board.
  17. Upon successful boot, run the following command in the Teraterm terminal (serial port emulator):
    #cd /media/card
  18. Run the .elf file for the respective functions.