I can't open raspberry pi camera using jetson nano

I am trying to connect my raspberry pi camera with custom trained model that i have trained using google colab. Before connecting with my model, I followed all the steps from this video to test my camera: https://www.youtube.com/watch?v=mmyxWBOo1kg&t=1659s
to see whether this method will work with my camera. In the video, it uses the same camera sensor as i do which is IMX219. After following all the steps, I run the commans (same as in video) to test with my camera but the camera window did not open. I have installed opencv,numpy,pytorch,torchvision. what is wrong with the error shown in the screenshot? My camera CAN open/run when i use basic command such as gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink

cv2.error: OpenCV(4.10.0) /tmp/pip-install-l5a5hlfi/opencv-python_b58eb577278744cab91495182a2b67ba/opencv/modules/highgui/src/window.cpp:1301: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function ‘cvShowImage’



Confirm the sensor driver and HW by below command.

sudo apt-get install v4l-utils

v4l2-ctl --stream-mmap -c bypass_mode=0


here’s what ive obtained

How about below command.

export DISPLAY=:0
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! queue ! fpsdisplaysink video-sink=fakesink text-overlay=false -v

Looks like the gst-launch working well. The problem could be the py code.

do you have any idea how to check if i have installed opencv correctly or not? whether i have installed all the packages in opencv? because the py code did work with the owner of the video above.


based on this screenshot i can see that my GUI is not available in opencv 4.10 installation. what am i supposed to do to fix this? can you check in the information given if i have missed/ error at anything else?

Maybe reference to below link.

I have tried the command from the link provided but it still shows the same error. As you can see in the information above, GUI = NONE. How do i make this available? I have tried to reinstall opencv without uninstalling the previous one. I assume my opencv installation is the problem since it didnt make my GUI available.