AnsweredAssumed Answered

Obtaining image using STM3220G-EVAL

Question asked by jain.abhilasha on Oct 13, 2014
Latest reply on Oct 13, 2014 by gonzalez.laurent
Hello,

I'm using the STM3220G Eval board and the camera (OV2640) present on the eval board to obtain a RGB image on MATLAB.

The image mode is set to QVGA. As per standard, the image size of QVGA is 320X240 pixels, but when we run DCMI+DMA code on the STM, the V-sync line goes low after obtaining 320*240*2 number of bytes. That means we're getting twice the amount of data than we should actually.

Now, this data is stored in the external SRAM using FSMC and then sent to the PC using UART. After obtaining this data on MATLAB, while displaying it there's an issue since we have twice the data than we should. Trying multiple approaches, we got the following image after omitting every alternate pixel.

First image shows every odd pixel and second image shows every even pixel. Also we've displayed this gray-scale format not RGB.
cam1.PNG cam2.PNG

Also looking at the example code to initialize the camera, we are not able to tell which image format is QVGA in. Reading the camera datasheet has not been much help either.

Can someone guide us on what format the camera is set to? And how to interpret the data.

Thanks!

P.S. Also attached is the source code. 

Attachments

Outcomes