Unable to set resolution to full resolution and capture on IMX 298

1.Which seller did you purchase the product(s) from?
Amazon
2.The Model number of the product(s) you have purchased?
IMX 298 https://www.arducam.com/product/16mp-imx298-color-mipi-camera-module-raspberry-pi/
3.Which Platform are you using the product(s) on?
Raspberry Pi 3B
4.Which instruction are you following?
https://www.arducam.com/docs/cameras-for-raspberry-pi/mipi-camera-modules/camera-userland-driver-sdk-and-examples/ https://github.com/ArduCAM/MIPI_Camera (attempted using capture.c, capture_raw.c, capture.py, capture_raw.py
5.Has your product ever worked properly?
Never captured full res, smaller res always worked
6.What problems are you experiencing?
IMX 298’s full resolution is listed as either 4672×3496 or 4656x3496. However, when attempting to capture at 4656x3496 in python, an error occurs (presumably due to set_resolution):

This is relevant code from test.py

I have also attempted to use capture_raw.c and capture_raw.py.

this is the code I changed in capture_raw.c:

width = 4672;
height = 3496;
LOG(“Setting the resolution…”);
res = arducam_set_resolution(camera_instance, &width, &height);

and with capture_raw.py, this is the only code I changed below:

fmt = camera.set_resolution(4672, 3496)

I have attempted using both 4656x3496 and 4572x3496, and the same thing occurs. All resolutions above a certain threshold (around 3000x3000) result in the same error. All resolutions below that threshold capture properly, including 2336x1748, 1920x1080, 1160x800, etc.
7.What attempts at troubleshooting have you already made?
Try many different resolutions and both c and python. All resolutions below a threshold of ~3000 x 3000 capture properly
8.How would you like us to help you?
Help me capture images at full res (either 4672 x 3496 or 4656 x 3496) on python

Hello,

Don’t worry and I will try my best to help you.

What about your GPU memory? If getting the biggest resolution, you should set the gpu memory to 400M, please ensure it and let me know if you need more help.

 

Hi bin,

after setting the GPU memory to 400 mb, the same error still occurs. When setting resolution to 3118 x 3000, it captures fine. At 3119 x 3000, it gives the same error no matter the GPU memory.

Thanks so much for your reply

Hi,

I have resolved the issue by adding the option cma=400M in /boot/cmdline.txt.

Thank you!

Hi bin,

is it possible to capture a region of interest (for example, 2336 x 1748) at the same pixel density as 4656 x 3496 without binning?

Hi,

The 2336x1748 mode should be binned from full resolution, it should be no viewing angle loss.

Have you compared the viewing angle between the two size image?