bogdan.deac

Technical Forum Moderator
  • Content Count

    59
  • Joined

  • Last visited

  • Days Won

    1

bogdan.deac last won the day on November 15 2017

bogdan.deac had the most liked content!

About bogdan.deac

  • Rank
    Frequent Visitor

Recent Profile Visitors

888 profile views
  1. Hi @ahmedengr.bilal, You have three options: 1. Use standard OpenCV library which can be included in Petalinux rootfs. After that you can develop your application using OpenCV functions. 2. Use xfOpenCV library from Xilinx. Find the documentation here. Some examples here. It offers a subset of standard OpenCV library functions, modified to be easily accelerated in FPGA. 3. Use standard OpenCV and xfOpenCV libraries. This options is suitable for more complex algorithms where you process some functions on ARM processor and another ones in FPGA for better performance. For all mentioned options you have to implement the image acquisition mechanism from a camera if you don't intend to use static images. Usually, the easiest way to develop video processing apps using xfOpenCV and OpenCV on Xilinx SoC is SDSoC. Find more info here. Using SDSoC you have a hardware platform which describes your hardware configuration and another important aspects like libraries, sample projects, etc. Usually, this platform is provided by the development board manufacturer, in this case Digilent. Two SDSoC platform aspects are important for you: 1. The hardware configuration which implements the image acquisition mechanism. Find Digilent Zybo Z7-20 SDSoC Platform here. 2. Sample projects. Find sample projects for the above mentioned platform here.
  2. bogdan.deac

    OpenCV and Pcam5-c

    To start the application run: ./config_pcam_vga.sh ./filter2d_test.elf
  3. bogdan.deac

    OpenCV and Pcam5-c

    Hi @Esti.A, I attached the files. filter2d_test.zip
  4. bogdan.deac

    OpenCV and Pcam5-c

    @Esti.A, I get that warning message but the application starts normally. I will try to discover the cause of that message.
  5. bogdan.deac

    OpenCV and Pcam5-c

    I launched the application in vga resolution configuration and tried different switches combinations to change the filter type.
  6. bogdan.deac

    OpenCV and Pcam5-c

    Hi @Esti.A, Until now, I conclude that the system works very slow. I obtained filtered images with a very low frame rate (aprox. 1 frame / 7 sec. ). Still I don't know which is the component that generates the bottleneck. I am trying to modify the project and to simplify it's structure to solve this issue. I will post here any updates that I have.
  7. bogdan.deac

    OpenCV and Pcam5-c

    Hi @Esti.A, I am still working on this issue. Do you have any updates? Partially, I encounter the same problems. If I wait for aprox. 2 min I get a single frame displayed on monitor but that'a all. What output do you get if you run v4l2-ctl -d /dev/video0 --list-inputs ?
  8. bogdan.deac

    OpenCV and Pcam5-c

    What ZYNQ part is loaded on your board, 7010 or 7020? Did you try to turn on and off the switches? The filter are controlled using them.
  9. bogdan.deac

    OpenCV and Pcam5-c

    What setup do you use? Do you have PCam and a HDMI monitor connected to Zybo Z7? Make sure that the connection is done before board power up.
  10. bogdan.deac

    OpenCV and Pcam5-c

    Please answer the following questions: 1. Did you follow these steps? 2. Have you got any error message on one of them? 3. Have you mount /dev/mmcblk0p1? How do you launch the opencv application?
  11. Hi @Esti.A, Do you use an example project or you developed your own? From the error message that you've post I understand that the error is generated by the bilateral_8u function from smooth.cpp module. The condition that is not met is the following: (src.type() == CV_8UC1 || src.type() == CV_8UC3) && src.data != dst.data The above condition is not met in two cases: 1. If the src parameter is not CV_8UC1 (unsigned char + one channel) or CV_8UC3 (unsigned char + three channels) 2. If the input image (src) and the output image (dst) are the same. Please check that the above mentioned condition is met in your code. Maybe you will find something useful here and here.
  12. Hi @Esti.A, The first error that you get is the following one: ERROR: [Common 17-179] Fork failed: Cannot allocate memory This kind of error is generated when your machine does not have enough RAM memory. Please post here the configuration of your system (CPU, OS, RAM, ..). Do you have swap enabled? Also, have a look on this post.
  13. bogdan.deac

    OpenCV and Pcam5-c

    Hi @Esti.A, If you clone the repo you obtain the "source code" for the platform and you have to generate the platform by yourself. This is a time consuming and complicated task and is not recommended if you do not understand SDSoC very well. I advise you to download the last SDSoC platform release from here. You will obtain a zip file that contains the SDSoC platform already build. After that, you can follow these steps to create your first project.
  14. bogdan.deac

    OpenCV and Pcam5-c

    Hi @Esti.A, 1. What Xilinx tools version do you use? 2017.4 or 2018.2? 2. How did you obtain the SDSoC platform? Did you clone from here or did you download the archive from release tab?
  15. bogdan.deac

    OpenCV and Pcam5-c

    Hi @Esti.A, SDx, which includes SDSoC (Software Defined System on Chip), is a development environment that allows you to develop a computer vision application, in your case, using C/C++ and OpenCV library. The target of SDx-built applications are Xilinx systems on chip (SoC) (Zynq-7000 or Zynq Ultrascale+). Xilinx SoC architecture has two main components: ARM processor (single or multi core) named Processing System (PS) and FPGA, named Programmable Logic (PL). Using SDx to build an application for SoC allows you to choose which functions from your algorithm are executed in PS and which ones are executed in PL. SDx will generate all data movers and dependencies that you need to move data between PS, DDR memory and PL. The PL is suitable for operations that can be easily executed in parallel. So if you are going to choose a median filter function to be executed in PL, instead of PS, you will obtain a better throughput from your system. As you said, you can use OpenCV to develop your application. You have to take into account that OpenCV library was developed with CPU architecture in mind. So the library was designed to obtain the best performance on some specific CPU architectures (x86-64, ARM, etc.). If you are trying to accelerate an OpenCV function in PL using SDx you will obtain a poor performance. To overcome this issue, Xilinx has developed xfopencv, which is a subset if OpenCV library functions. The functionalities of xfopecv functions and OpenCV functions are the same but the xfopencv functions are implemented having FPGA architecture in mind. xfopencv was developed in C/C++ following some coding guideline. When you are building a project, the C/C++ code is given as input to Xilinx HLS (High Level Synthesis) tool that will convert it to HDL (Hardware Description Language) that will be synthetized for FPGA. The above mentioned coding guideline provides information about how to write C/C++ code that will be implemented efficiently in FPGA. To have a better understanding on xfopencv consult this documentation. So SDx helps you to obtain a better performance by offloading PS and by taking advantage of parallel execution capabilities of PL. Have a look on SDSoC documentation. For more details check this. An SoC is a complex system composed by a Zynq (ARM + FPGA), DDR memory and many types of peripherals. Above those, one can run a Linux distribution (usually Petalinux, from Xilinx) and above the Linux distribution, the user application will run. The user application may access the DDR memory and different types of peripherals (PCam in your case). Also, it may accelerate some functions in FPGA to obtain a better performance. To simplify the development pipeline Xilinx provides an abstract way to interact with, named SDSoC platform. SDSoC platform has two components: Software Component and Hardware Component that describes the system from the hardware to the operating system. Your application will interact with this platform. You are not supposed to know all details about this platform. This was the idea, to abstract things. Usually, the SDSoC platforms are provided by the SoC development boards providers, like Digilent. All you have to do is to download the last SDSoC platform release from github. You have to use SDx 2017.4. You don't have to build your own SDSoC platform. This is a complex task. You can follow these steps in order to build your first project that will use PCam and Zybo Z7 board. The interaction between PCam and the user application is done in the following way: there is an IP in FPGA that acquires live video stream from the camera, the video stream is written into DDR memory. This pipeline is abstracted by the SDSoC platform. The user application can access the video frames by Video4Linux (V4L2). The Live I/O for PCam demo shows you how to do this. I suggest you to read the proposed documentation to obtain a basic knowledge needed for SDSoC projects development. Best regards, Bogdan D.