[Solved] Grab image OV7670 and store it on SD card, post processing in Python

Hi everyone,
i have attached uno to OV7670 and SD Card as shown in the schematics. I have attached the code i am using for UNO, this code grabs the frames from OV7670 and stores the pic on SD card.

There are two python code, 1st one convert the sd card(.bmp) file to (.csv) file, 2nd code convert the .csv file to (.bmp) again. which is the final picture.

The problem i am facing is that i either get a very black picture or a total white one. I am not able to get a good picture. Any help regarding this will be appreciated. Thank you.

OV7670_SD.ino (4.99 KB)

Here, are the python files.

Python_files.zip (3.1 KB)

Here are some images which i have obtained from the above process.

PICS.zip (426 KB)

To Mods, Please close this Thread. Everything working now.

If any one can upgrade the code for 640x480 picture, please let me know. :slight_smile:

gahlot:
To Mods, Please close this Thread. Everything working now.

Just edit the first post in the thread's title, and add "Solved"

hallow there, i went through the sketch you have just provided and i want to use the same sketch with arduino mega 2560 with little modifications from UNO pins to Mega pins.....can you please help me where else to modify before i burn my 0v7670 like i did to the last one.

gahlot:
Hi everyone,
i have attached uno to OV7670 and SD Card as shown in the schematics. I have attached the code i am using for UNO, this code grabs the frames from OV7670 and stores the pic on SD card.

There are two python code, 1st one convert the sd card(.bmp) file to (.csv) file, 2nd code convert the .csv file to (.bmp) again. which is the final picture.

The problem i am facing is that i either get a very black picture or a total white one. I am not able to get a good picture. Any help regarding this will be appreciated. Thank you.

Hi can you explain more Please
I’m getting this error when I'm convert .bmp to .csv .
“did you open the file in text mode?”