Error with OpenCV and IMX477 on Jetson Nano

I’m having some problems. I can use the camera on the Jetson Nano command prompt, but I can’t use the camera in the algorithms.

I’m using Python 3.6, Jetpack 4.6 and OpenCV 4.6.

This is the message error: “cv2.error: OpenCV(4.6.0) /tmp/pip-req-build-zuuo394f/opencv/modules/highgui/src/window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow’”

Do you have any sugestion or tutorial?

@Jardel

Please give me more information.

  1. What is your camera SKU number (if you don’t know, you can take pictures)
  2. Please talk about which code you can’t use