Capturing images from OV7670 camera module with Arduino


I got all working fine and smooth, can capture images and get them out of the camera at 20fps, including a basic color segmentation algorithm. However,getting them out over UART port is not that fast, even @ 250 kbps is still taking 0.8 seconds to send one out… I’ll be trying to do it over SPI instead, should be faster. Since only UART and SPI (4 pins) left available, will need to add a “shell” to allow me to change the configuration on the fly. For a start not many things to change, but will be cool to be able to choose which algorithm to use for tracking or even what color to look for. Consdering that I’m using an atmega328p, basically can run on any arduino board, I do not set very high expectations… Once this works smooth, will move entire application on ARM instead, with 64 Kb RAM and DMA can do more processing and better algorithms than processing only 2 lines at a time on AVR

Advertisements

12 thoughts on “Capturing images from OV7670 camera module with Arduino

  1. Hi Claudiu! Another question: I would really like to catch a glimpse of your source code. I’d like to use an OV7670 module with a Lego Mindstorms NXT robot to build some soccer playing robots. I’m familiar with Arduinos, too, so looking at your code should give me an idea how to initalize the camera and obtain pictures. Thanks a lot in advance!
    Sincerely – Lars Pelz

    • Hi Lars, while my code runs on arduino or any atmegaxx8 microcontroller with minimum or no change at all, i did use actually only C and AVR Studio, as i am not a big fan of Arduino IDE. Also using Arduino’s operations on pins may be too slow for this, however, themaincode should work with minimum or no changes at all.

      Basically, thecode is pretty much explained in one of the comments in another post, i will try to post some pseudocode to make it easier probably. Anyway, please remember that there are 2 parts of the code: camera driver and image processing… I’ll try to put a pseudocode for the driver one of these days, maybe will help you with your project. Then you can use any microcontroller, does not have to be arduino… My first version runs on ARM3 Cortex just fine, but can not build my own board with it like i do with DIP chips.

  2. Hi, I have question. Have arduino capacibilities capturing images with camera ov7670 without FIFO buffer ?? I have ATMega8 or 328P

    Thank for answer. Lazi

    • Hi Lazi, should have, there is another project using a similar camera, without FIFO on Atmega8, try to google for “avrcam”.
      I’ll be also trying to work on something similar once i get some free time. Thank you for interest.

  3. Hello, i’m a student, have this camera and arduino, can anybody tell me how to connect it to the arduino and give a test code, just fo start, please?

    • Hi there, any details on what is your setup?
      If you take a look on comments you may see several functional solutions, while not specific for Arduino, it may get you started.

  4. A nooby question

    I have an Arduino UNO and an OV7670 AL422 FIFO Camera Module.

    How do I wire them together. What goes where?

    Thanks in advance.

  5. hey, i m student and i have a noob question if someone can help me
    i connected the camera 7670 with the arduino uno, then i set a program (i get it from this https://youtu.be/OrcCgCNwilc ) and i took so many pictures, but all of them is a black/white pictures.. the prblm is how can i take a color pictures !
    .
    thanks ^^

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s