Unable to run IMX219 and IMX477 on jetson nano

Hello,
I have been trying to run csi cameras IMX219 and IMX477 on python3.9 to detect images using yolov5 model. But after trying for a long time and in various methods, I have figured out that python3.9 is unable to open the cameras. The opencv version is 4.7.0.
When I run my file, I get an error like this, can someone please help me understand how can I get this code running, so that the camera can detect and capture frames and send it to my yolo model?

The error is the same when I run the same code on python3.9.

Please help!

hello rusaliapple2801,

is the camera functionality works?
please refer to developer guide, Approaches for Validating and Testing the V4L2 Driver for several sample commands to test your camera stream.

Hello,
Thank you for helping out!
Yes the camera works on python3.6, and even the nvgstcapture-1.0 command works. But I am trying to merge the camera captured frames and pass them to my yolo model which runs on python3.9. So when I try to open the camera on python3.9, it fails to open camera. I cant understand how to fix this.
I am also attaching the files I am running, for your kind reference

Please help me out!
trycsi.py (1.6 KB)

csi.py (2.5 KB)

Hi,

It looks like OpenCV fails to open the camera.
How do you install OpenCV for python 3.9?

Our default installation is for python 3.6.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.