Sorry I am probably not much help to you here.
Recently I purchased one of these boards as a way to test out some things on
the Zephyr side. In particular it looked like this is one of the few boards, that Arduino makes that is in any of the Vision (Camera) test sketches on
Zephyr.
I am currently working on hopefully getting A Pull Request accepted by
Zephyr that allows for cropping of larger sizes down to a smaller size:
VIDEO: GC2145/stm32_dcmi support for CROP/Snapshot by KurtE · Pull Request
#93797 · zephyrproject-rtos/zephyr
I mention this as with the current Zephyr code you are also restricted to
only 320x240 as it required at least two Screen size buffers defined:
so 320x240x2=153600 bytes per buffer and need 2 so 307200 bytes,
which is about all you can fit into a 512kb main memory.
For example VGA: 640x480x2=614400 bytes which for sure won't fit.
With my current code, I am able to read in a 480x320 image which is the
size of an ILI9488 or ST7796 display which is nice. As I showed on that
PR:
Which was the board capturing an image off of my IPAD...
I am guessing you can also capture similar using the MBED version.
However it might take some editing of the Camera library. In particular:
the table:
/// Table to store the resolution width and height for each resolution
const uint32_t restab[CAMERA_RMAX][2] = {
{160, 120 }, // QQVGA
{320, 240 }, // QVGA
{320, 320 },
{640, 480 }, // VGA
{0, 0 }, // Empty entry because there's a jump in the resolution enum initializers
{800, 600 }, // SVGA
{1600, 1200}, // UXGA
};
To add the 480x320 to the list. It will probably also require a few changes
in the GC2145::setResolutionWithZoom as well, which should be reasonably easy
I know we did something similar when a few of us made a version of
the camera library for Teensy boards. We actually started from the
arducam_dvp library.
// Sensor frame size/resolution table.
const int resolution[][2] = {
{640, 480}, /* VGA */
{160, 120}, /* QQVGA */
{320, 240}, /* QVGA */
{480, 320}, /* ILI9488 */
{320, 320}, /* 320x320 */
{320, 240}, /* QVGA */
{176, 144}, /* QCIF */
{352, 288}, /* CIF */
{800, 600}, /* SVGA */
{1600, 1200}, /* UXGA */
{0, 0},
};
And the Teensy_camera library case, the Setting of the frame size and
zoom were done by sizes instead of index...
Again it should not be difficult to have it support this specific size.
But if you need even larger images, not sure.
Good luck!