Hi everyone, I’m working with an Arducam Mini Camera Module Shield 5MP OV5642 for Arduino (model B0068). I’m trying to capture a 640x480 image as raw data - not JPEG then converting to raw - and then isolate each pixel into its R, G, and B values. The problem is the data I read back from the captured image doesn’t seem correct at all. I’m not sure how the raw data is actually stored, which makes it hard to pull the right values from the FIFO buffer. What’s the default colour format for raw data? Is it RGB565, RGB888, or do I need to set some camera registers first?
The default color format for raw data from this OV5642 module is RGB565. So when you read from the FIFO buffer, each pixel should come through as 2 bytes in RGB565 format. You can decode R, G, and B from each 16-bit value without having to set any extra registers first.
Thanks, that fixed the decoding - the RGB values are correct now. But I’ve hit a new issue. There’s a premade function for changing resolution, OV5642_set_RAW_size();, and adding it corrupts the FIFO buffer. At the default 320x480 the colours decode fine, but the moment I add that one line, the FIFO buffer loads itself with some set data and then never flushes.
That function only works for resolutions the module actually supports. If you pass it a resolution outside the supported list, it corrupts the FIFO buffer - which matches exactly what you’re seeing. Stick to the resolutions listed in the product documentation and don’t rely on OV5642_set_RAW_size(); to select an unsupported one.
Got it, I’ll stick to the supported resolutions. One more question though - I’m wondering if I need to tweak registers to get 60fps capture speed. The specs indicate 60fps at a certain resolution, and I assumed it would automatically run at its maximum rate, but it seems limited even at the lowest resolution. Right now I’m only reading about 15fps. The manufacturer replied that the module only supports the resolutions in the product list (see attached image), but that doesn’t really explain the framerate.
![]()
This camera is designed for still capture on low-end platforms, so a higher framerate isn’t achievable through register tweaks. It won’t reach 60fps no matter which registers you change. If you need high framerate capture, you’d want to look at MIPI or UVC camera modules instead.
The camera specs still say 60fps should be achievable at 640x480, but I’ve only ever managed 15fps. Is there a reason for that, or is there any sample code that can actually capture at that rate? The manufacturer’s reply was just that no register tweaks will get a higher framerate, that it’s designed for still capture on low-end platforms, and to consider MIPI/UVC modules for high framerate.
![]()
To sum up where things stand: the raw output is RGB565 by default, so that’s what you decode from the FIFO. Resolution changes with OV5642_set_RAW_size(); only work for supported resolutions - unsupported ones corrupt the FIFO buffer. And on the framerate side, even though the sensor specs list 60fps at 640x480, this particular shield is meant for still capture on low-end platforms, so around 15fps is about what you’ll get in practice. Register tweaks won’t change that. For a high framerate use case, a MIPI or UVC camera module would be the better option.