Jump to content
  • 0

Custom Image Processing on Zybo-Z7 20


Amin

Question

I am doing an image processing (not video)  with Zybo Z7, and I am writing my own algorithm in C and C++ language for the image processing algorithm.

  • For the simulation (without camera), I have some ready photos that can be loaded from SD card and then I want to test the performance of my algorithm on. I know Xilinx provide xsdps driver for the SD card, but I don't know how to use it for my project. 
  • But For the real application, the image processing will be done on the photos that are taken regularly by a camera.

My priority, for now, is to first test my code using simulation.

Could someone provide me a tutorial or a sample project? All the tutorials on the internet are about processing Video (not simple images)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Hi @Amin,

I have not made a project like this.  To get a Zybo-Z7-20 project working with the SD card:

Make sure you are using the Digilent board files.Here is the installation tutorial for the board files. Your block design should be the just the Zynq processor with FCLK_CLK0 connected to the M_AXI GP0_ACLK as shown with the attached screen shot. Run block automation as default(board files) when the Digilent board files are being used. Then create a wrapper and generate a bitstream. Next export the hardware including the bitstream and launch SDK. In SDK you should be able to alter the main.c file attache above to work for your needs. 

If your goal is to use a standalone project i can assist with using the ZYNQ processor with the SD card. I would have to reach out to more experience engineers for assistance using HLS or non-prebuilt SDSoC project.

 If your project does not need to be standalone then I would suggest using either an embedded linux project like petalinux , a pre-built SDSoC project or the SDSoC reVISION platform.

1)   Here is the Petalinux Support for Digilent Boards which has two version releases and a very detailed readme which should help you get the project going.

2) Here is the SDSoC Platforms which has a project completed for the Zybo-Z7-20.

3) Here is the SDSoC reVISION project for the Zybo-Z7-20.

thank you,

Jon

image.png.028330d471e7d76b2a16405d3fe55306.png

Link to comment
Share on other sites

21 hours ago, jpeyron said:

Hi @Amin,

I have attached a main.c made by one of our community members that uses the xsds driver.

thank you,

Jon

main.c

Thank you for the C code.

Could you guide me what will be the possible programmer logic block diagrams or Verilog code? (for simulation and real-time)

Link to comment
Share on other sites

On 1/31/2019 at 4:04 PM, jpeyron said:

Hi @Amin,

I have attached a main.c made by one of our community members that uses the xsds driver.

thank you,

Jon

main.c

@jpeyron I set up  the BD as stated and in the main.c and the #include "ff.h" and #include "Pmod.h" are giving me "Unresolved inclusion:" errors. I only want to use the SD card, are these both essential for the SD card use? I clearly don't need the Pmod for the GPS, but I am not sure what the ff.h is for.

Do you know what bare-bones I would need to write to the SD card? I want to read an image from the SD card, convert to binary and operate on it, and save it back to the SD card.

Thanks,

Samuel

Link to comment
Share on other sites

Hi @sidesantis01,

The main.c is a good reference for how to use the SD card reader without an interrupt. To better stream line the main.c you would want to remove anything to do with the PmodGPS. You will need to add the xilff library to the bsp in this example since it is not using the PmodSD.h or PmodSD.c. 

In SDK select the BSP and then select modify this BSP's Settings. Then select xilff and then OK.  I have attached a screen shot showing this. in the 

The main.c in the example folder in the Pmod SD IP Core uses the Pmod SD with an interrupt.  

best regards,

Jon

 


 

image.png.dc33c1e7171f9c94ccec81fe0ee86be7.png

 

 

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...