Arducam IMX477 UVC Camera Adapter Board 12MP camera output using Python

I am using Arducam IMX477 UVC Camera Adapter Board for a 12MP Raspberry Pi HQ Camera with RPi HQ Camera, but unable to capture a 12MP image in Python code through its coming perfectly in Matlab and AMCap software. Kindly guide me on how I can capture 12MP images in Python using this hardware and RPi HQ Cameras.

Please try this demo I attached for you: (1016 Bytes)

Not able to work with 12MP (i.e 4032x3040 resolution), working with 8.3MP (3840x2160 resolution)

Don’t worry.
Tomorrow our engineer will test it again.

Our engineer has reconfirmed that the demo can work normal using 12MP(imx477)
Please using v4l2-ctl -d 0 --list-formats-ext command to check if the camera you are using support 4032x3040 mode.

I tried one code for checking available all resolution and it came like below.

(base) C:\Users\siddharth>python
{'640.0x480.0': 'OK', '1280.0x720.0': 'OK', '1280.0x960.0': 'OK', '1600.0x1200.0': 'OK', '1920.0x1080.0': 'OK', '2560.0x1440.0': 'OK', '2592.0x1944.0': 'OK', '3840.0x2160.0': 'OK', '4032.0x3040.0': 'OK', '4672.0x3504.0': 'OK'}

When I am running the shared code with 4032x3040 resolution, below-shown error is coming

(base) C:\Users\siddharth>python
{'framecount': -1.0, 'fps': 10.0, 'width': 4032, 'height': 3040, 'codec': 22}
[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1752) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638
Traceback (most recent call last):
  File "C:\Users\siddharth\", line 27, in <module>
    cv2.imshow('video', frame)
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:967: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

but with 3840x2160 resolution, it’s coming properly.

(base) C:\Users\siddharth>python
{'framecount': -1.0, 'fps': 20.0, 'width': 3840, 'height': 2160, 'codec': 22}
Traceback (most recent call last):
  File "C:\Users\siddharth\", line 26, in <module>
    ret, frame =

Please let me know how to resolve the issue.
I’m using Intel(R) Core™ i7-4770 CPU @ 3.40GHz 3.00 GHz Processor with 16.0 GB RAM.