Using the Papilio one with the OV7670 and putting data out through VGA


Recommended Posts

Hi guys,

 

I need to do some manipulations on an image and would like to know if the approach I am following is correct.

-I plan to use a Papilio one in order to write verilog code for the image manipulation tasks

- The camera will most probably be the OV7670 and voelker has done a lot of work on it. I would most probably buy the wing along with the camera. I am assuming that interfacing the 2 would be straightforward since it has already been done.

- Let say at a later point of time I want to increase my image resolution. What would be the ideal way to do this? I know interfacing USB is not possible . Does anyone have any other ideas?

- How do I get the video out of the papilio one?  I would like to display it on my TVdirectly. Is this possible or do I need to use the serial port of the papilio and send and receive data through this only?

- Does the papilio one have enough processing power to do things like edge detection, overlay subtiles on an image etc

 

Could someone please help me out?

Link to comment
Share on other sites

Hello Rocker_Roller,

 

All of the pieces of the puzzle are there, but unfortunately it will take some work to put them together.

 

Hamster has some code for interfacing the camera:

http://hamsterworks.co.nz/mediawiki/index.php/OV7670_camera

 

There is also Voelker's work for a good example.

 

We have a Wing available:

http://store.gadgetfactory.net/ov7670-camera-wing/

This Wing was designed for the OV7670 camera's that are powered by 2.8V. The 3.3V camera's are more popular now. It may be necessary to remove the 2.8V voltage regulator from the Wing and jumper it to 3.3V if you have the newer 3.3V Camera.

 

I did, at one point, get Hamster's code working under DesignLab but for the life of me I can't find it anywhere... I know it works though, the quality was pretty low though because it was using the limited BRAM available on the Papilio One.

 

Some ideas for better quality output, these will all take some work though...

  • Output over HDMI, there will hopefully be HDMI support coming soon. I spent a couple days last week working with HDMI and I think we are pretty close to having a good solution. This would support full 24-bit output and will give the best results.
  • Output over VGA, should be doable with some work. The best VGA output we have is 444RGB though...
  • Output over USB port on the Papilio DUO. It is supposed to support much faster speeds then the Papilio One - I don't remember exactly the number but I want to say 24Mbs vs the 3Mbs on the Papilio One.
  • A high speed USB Wing - We have a design for the FT232H chip which can output at 480Mbs. I just need to get them tested and manufactured.

If you want to do manipulation of the image then you need plenty of memory to store the input, do something to it, and then output it. This is where the Papilio One boards lack. The Papilio Pro and Papilio DUO have enough RAM for this.

 

I'm not sure about this, Alvie would be the one to ask, but I think it should be possible to setup the OV7670 as a wishbone device that can be connected to the ZPUino. It can be setup for DMA transfers so the video output could be written directly to memory. Then c code on the ZPUino, possibly OpenCV if we can port it, can be used for edge detection etc.

 

So to answer your question, there is a ton of things that are possible to do, but it will all be a lot of work, we do not have very much done yet at this point.

 

Jack.

Link to comment
Share on other sites

Ok, so I was just thinking about this some more and I think I have a real easy way to get a project up and running quickly.

 

We can just use Arduino code examples to read from the OV7670 camera without setting up any special hardware on the FPGA. Then we can just feed the RGB565 values that we read into the cool new VGA "chip" that Alvie made. It's already in DesignLab and it uses the Adafruit GFX library. We can just read from the OV7670 module and write directly into the VGA controllers framebuffer as fast as we read. Since the ZPUino runs at 96Mhz we should be able to get this up and running quickly.

 

Jack.

Link to comment
Share on other sites

Hi,

 

At the risk of sounding stupid I am going to write this anyway. The main aim of this project is the image manipulation(may be edge detection, or some other new algorithms for real time image improvement). The focus is on the algorithm development and not on the setup. I dont want to waste too much time setting this up).

Would it be possible to obtain the image from a computer screen , lets say through a USB video camera which is available easily ,and would it be possible to get this setup running quicker. What I would like to do is transfer the data coming into the computer from the USB camera onto the FPGA. Then run the custom real time algorithms on the FPGA and send the data back either through HDMI or VGA to another device(Would it be possible to use the same USB port to send data back to the computer sending the data in? Would this make it easier?).

-Also one of the restrictions on the project is that it should be written in verilog(It is an FPGA project after all, so the image manipulation tasks must be written in verilog. Is there any sample code anywhere that provides an idea as to how to work with images in verilog for the papilio(I understand that I would have to go in for the duo or pro since the papilio one doesnt have enough memory, but since I already have a papilio one would it be possible to get started with it.)

 

Thanks a lot for the reply. I really was unsure about the direction in which I was to proceed.

Link to comment
Share on other sites

Well,

 

You could take a look at this:

https://forum.pjrc.com/threads/25185-cheap-32x32-RGB-panel-with-24bit-color-and-30fps-live-streaming

 

There is a java application meant to stream video data from a computer stream over the parallel port. It's meant to be displayed on an RGB Matrix screen but you could repurpose it to send data to the Papilio for image processing.

 

As far as image processing in VHDL or Verilog, I don't know much about it. Voelker is the only examples of doing this that I know about.

 

Jack.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.