2014-10-13 07:30 AM
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. 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.2014-10-13 08:48 AM
IT is likely that every pixel from your sensor is send using two bytes. Encoding may vary depending configuration.
As for an example, you can get RGB data organized as RRRRRGGG and GGGBBBBBB.