Hello, I’m trying to adapt this ov2640 interface https://github.com/openmv/openmv/blob/master/src/omv/ov2640.c to a project.
The thing is, I want to process UXGA pictures, but the board I’m using doesn’t have enough RAM to have a full picture in memory.
With that in mind, I’m trying to use the registers described in the datasheet: https://www.uctronics.com/download/cam_module/OV2640DS.pdf, and my idea is to only retrieve a “crop” of the full resolution at a time. The thing is I don’t understand how the registers relate to each other, and I’m getting a lot of “sensor timeouts”, “green images” and other things of the sort.
I’ve identified the following registers as being relevant: HSIZE, VSIZE, XOFFL, YOFFL, VHYX, TEST, ZMOW, ZMOH, ZMHH, SIZEL, HSIZE8, VSIZE8, COM1, COM7, HREFST, HREFEND, VSTRT, VEND and REG32.
Can someone help me understand how this registers work and how to use them to achieve the desired objective?
Say I want to retrieve only one 224x224 portion of the full UXGA resolution at a time, what values should I use for image size, etc…?