SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By rujatt
#150774
puh, haris - I cant find there any zip Atachment. The Tread have no Answers .....all empty
By your Problem with YUV Pictures , I think:
First process only the Y signal to got a black/white picture.
Have you test that befor ? ?
If the black and white picture is sharp and okay, it will be the YUV chroma Algorythm.
Then its better to use RGB.

I have think about my camera project.
So I THINK I take a STM32 F207 not useing the DCMI.
I will be use a AL422B Frame Buffer.
By rujatt
#150853
Your zip file you have uploadet only have pictures and picture datas.
I had like a list with initial values for the OV7670 registers.
I hope you can send me the values that you use in your project. How do you calculate the RGB Datas from YUV ?
Your picture with to much blue color-share comes from using the theoretical YUV formula - other TFT show maby other results. corect this manualy in your Algorythm.
How do you calculate the RGB Datas from YUV ? Can you send me your Formula ?
I think later the microcontroler must calculate the RGB Data from YUV to display on a TFT
That will take much more calculation time.
By haris
#150949
now I have correct image. i am not showing data on TFT . first I take the data in the matlab then reconstruct in 3-D as TUV or RGB then display it.

there is difference between pclk polarity. I am using matlab function to convert from YUV to RGB.
my sensor is ov7690.

currently I am looking at direct transfer of DATA over USART from DCMI perpheral. till now first I capture the picture after I sequentialy transmit data over usart from memory space.. now I want to transfer data as data is coming from DCMI to DMA address.>>>???
By brijesh
#151108
Haris, Rujatt,

Sorry about not responding to your posts earlier. For some reason I did not get email alerts of new posts on this thread. If you guys still need register settings send me a PM I will be glad to share.

Cheers
By haris
#151184
very thanks brijesh. its so kind of u. glad u like to help us out...

I have managed to get colorful image from ov7690. till now i am getting 128x128 image. first save in a memory. after first capture complete I transfer whole data from USART to PC. there i reconstruct data in matlab and i ma getting very fine picture.



as 480x640 will have data of 480x320x4=614400 bytes OR 480x320 uint32=153600 in yuv format , has so large data that it can not be stored in RAM of stm32F4 (if there is way please tell me, i read in data sheet that it has also 192KB system RAM but I dont know how to use it) [thats why i am using 128x128 image (it can be stored in RAM)so that i can test my program]

NOW i want to transmit data over usart as a capture is complete i will tranfer it at 115200 bps so 128x128 image will transfer in 2.27 sec, how can i get transfer my DMA stored data to PC as DMA is filling USART simultaneously send data, hope u under stand my question??!!! what interrupts should i use? and do i need to use in double buffer mode?
By haris
#151837
Hi, brijesh. did you take 640x480 image? how you managed it in the memory of STM32? currently i am capturing 128x128 image, saving it in ram of stm32f4. then stop capture. and transmit it over serial.

how did you get 640x480 image on serial?

thanks
brijesh wrote:Finally success!! After a lot of trail and error, finally managed to get register setup that worked. Here are couple of good color images

Image
Image

With this capture, hardware is fully proven. Now have to concentrate on the software. If someone wants the board I still have couple of them that I can ship.

Mule,

Yes, default power-up mode is VGA-YUV{4:2:2]-30FPS. YUV is multiple of 2 bytes not sure what you mean multiple of 4 bytes. That is for a 640x480 image, you get 640x480x2 bytes, unless you are using 10bit DCMI mode. Are you using 10bit DCMI mode?

Using python code to build image and then see it in windows app is lot of work. I have a working program that displays image in real time, currently it is hardcoded for QQVGA-YUV format. If you want I will send you the program and register configuration that worked for me.


Cheers
By robotonics
#152194
Hi Brijesh

I would be very grateful if you could send me your register settings...roboshopz(at)gmail(.)com
I am working on the OV7670 using STM32F4 Discovery board and a HY32D LCD, and although I get a picture, it is not stable and color is too blue and red.
By giannajayjay
#152566
Hey there,
I've just found this thread. I'm right now facing similar problems.
I'm using the STM32F103 board with the OV7670 camera module without FIFO. I'm supplying it with an 8MHz clock from the STM32 through PA8. I've also attached the SIOC and SIOD pins of the camera to the I2C1 of the STM32. Now I got some issues with the I2C communication, I can now send some data to the registers of the camera using the writing address of the camera. But I think somehow the camera doesn't get them. If I'm trying to read data from the camera I'm always running into a timeout during sending the reading address.
So I thought the camera might be preconfigured and I just wanted to make sure that the camera is working somehow. Over an oscilloscope I'm catching the signals from the Vsync,href and pclk and at least it seems to work fine. Now if I'm trying to grab the pixel data from the different pins the signals of the pins are just oscillating. Even if a put a blend or a paper over the lens it doesn't give me a black or any gray value but just oscillating values. I also tested my program with a second camera, nothing.
Do you have any idea? I've found some sample code for the FIFO module or for the STM32F104 which uses the DCMI but that couldn't help me.
I would appreciate any replay,

Bye Gianna
By haris
#152689
gianna
did u set correct values for I2C bus ,i.e slave write and read register? which library r u using?
By giannajayjay
#152690
Hey,
I'm using the STM32F10x Standard Peripherals Library. I'm using 0x42 for write adress and 0x43 for read adress which I found in the datasheet. Also the different register adresses are from the datasheet. I have really no clue I'm trying to figure out a solution for weeks now. So if anyone has an idea I'll appreciate.

Cu
By brijesh
#153251
Hello,

There is some incompatibility with how I2C interface on camera module functions. I could not get it work with the I2C module on STM32F4. I ended up just bit banging a crude I2C interface by using normal GPIO functionality.

If you need the code, will be glad to share.

Cheers
By max62niers
#154805
Hi!

I've been struggling for quite a while now with the same problem, due to the fact I don't have programming background but still in need to connect the OV7670 with STF4 board. I would be happy if could share the code with me so I can try to properly understand where my code is wrong: maxime.sixdeniers(at)gmail(dot)com
Thanks in advance!

Maxime
By brijesh
#154860
Maxime,

Check your email, I have sent the code.

There has been a long pause in the project. But I am making progress. I now have line tracking algorithm up and running. Will post a video shortly. Currently working on color tracking aspect.

I still have couple of boards left, if anyone is interested and would like to collaborate on the project.

Cheers