Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I have,

  1. AA5620 camera , http://electronics123.net/amazon/datasheet/OV5620_CLCC_DS%20%281.3%29.pdf http://electronics123.net/amazon/datasheet/AA5620.pdf

  2. STM32VL Discovery board http://www.st.com/internet/evalboard/product/250863.jsp

  3. Generic MicroSD Card

AIM: Need to take a color image from the camera and store it onto the SD Card.

So, i was able to enable the camera and then write onto the internal registers of the camera, and get a image out to the SD Card in bmp format.

I am currently taking a greyscale image for test purposes, will be implementing color later.

The problem is: This is the image i get...

image problem

This is where i am stuck for quite some time now. I have tried using both horizontal and blanking lines. Nothing seems to change.

Any pointers ?

thanks!

share|improve this question
2  
You did not tell how you interface with the camera. Do you use the digital video port, or the compact camera interface? Master or slave mode? Also, the culprit might be the image compression (or do you save raw data and create the PNG on your PC?). Otherwise, the image looks like the timings are wrong - you might not be fast enough with saving the image. And last but not least: can you point to how the image should look like? – hli Jul 19 '12 at 19:13
Oh! I use the Serial Camera Control Bus interface (similar to I2C) to write values into the registers. I use my uC as the master. The image should actually just contain 1 clear photo (there are 6 images juxtaposed in the image link shared)..How do you say i resolve the timing error ? Save faster ? Is it some related to frame rates as well ? – Shan Jul 19 '12 at 19:41
You say you use the SCCB to write to the registers, but how do you receive the image data? – Oli Glaser Jul 19 '12 at 20:37
I see six images of a guy who made a self portrait too close to the lens. !! Do you have the correct memory map? – Tony Stewart Jul 19 '12 at 22:06

1 Answer

enter image description here

Is your memory map of each image location correct?

share|improve this answer
I am trying to get only a single image. I don't know the reason why i am getting 6 images all adjacent. What i am doing stepwise is: 1.Initialise the Camera through the SCCB Interface using I2C lines from my board and write into control registers specifying the resolution, PCLK, Output clock speed etc. 2.Pick up data from my Port Register to which the lines are physically connected (through DMA )and start dumping them on my SPI interface (SD Card) How do i verify if my memory map is correct ? Could this be because of a slow clock used for writing onto the card ? Camera too fast ? – Shan Jul 20 '12 at 16:54
I think again it is the memory map of the image. What you see is interleaved, so your assumptions for row and column byte numbers appears like consequtive fields in an interleaved frame. You need to convert to a single image with the proper memory. i just extracted one field and resized. You need to confirm with OEM source. – Tony Stewart Jul 20 '12 at 16:58
Oh, right! Yes, interleaving does make sense. Come again, how do i resolve this ? How exactly do i convert to a single image with proper memory ? How exactly did you extract one 'field' out ? This is the first time i am working on a camera, sorry for not sounding like a pro! :-| – Shan Jul 20 '12 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.