xfOpenCV Kernel on the reVISION Platform

ThexfOpenCVlibrary is designed to be used with the SDx™ development environment.xfOpenCVkernels are evaluated on the reVISION™ platform.

The following steps describe the general flow of an example design, where both the input and the output are image files.

  1. Read the image usingcv::imread().
  2. Copy the data toxF::Mat.
  3. Call the processing function(s) inxfOpenCV.
  4. Copy the data fromxF::Mattocv::Mat.
  5. Write the output to image usingcv::imwrite().

The entire code is written as the host code for the pipeline , from which all the calls toxfOpenCVfunctions are moved to hardware. Functions fromOpenCVare used to read and write images in the memory. The image containers forxfOpenCVlibrary functions arexF::Matobjects. For more information, see thexF::Mat Image Container Class.

The reVISION platform supports both live and file input-output (I/O) modes. For more details, see the reVISION Getting Started Guide.
  • File I/O mode enables the controller to transfer images from SD Card to the hardware kernel. The following steps describe the file I/O mode.
    1. Processing system (PS) reads the image frame from the SD Card and stores it in the DRAM.
    2. ThexfOpenCVkernel reads the image from the DRAM, processes it and stores the output back in the DRAM memory.
    3. The PS reads the output image frame from the DRAM and writes it back to the SD Card.
  • Live I/O mode enables streaming frames into the platform, processing frames with thexfOpenCVkernel, and streaming out the frames through the appropriate interface. The following steps describe the live I/O mode.
    1. Video capture IPs receive a frame and store it in the DRAM.
    2. ThexfOpenCVkernel fetches the image from the DRAM, processes the image, and stores the output in the DRAM.
    3. Display IPs read the output frame from the DRAM and transmits the frame through the appropriate display interface.

Following figure shows the reVISION platform with thexfOpenCVkernel block:

Figure:xfOpenCV Kernel on the reVISION Platform



Note:For more information on the PS-PL interfaces and PL-DDR interfaces, see the (UG1085).