OpenCV not working GuvcView Camera feed not working

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

ubuntu 22.04

Please describe your issue below:

Trying to run OpenCv using Python and window pop up not working when displaying camera feed. Same issue with guvcview no window pop up. Issues with Qt and/or Gtk+. Need help

@MonkeyDLuffy Ycan try with our code.

I am using a USB camera which requires no drivers installations. The camera can capture images and videos and save them to the directory. But it does not show any camera window pop up feed. Same issue with Opencv - imshow() or waitkey() crashes the code. I’ll provide error messages later sorry about that.

@MonkeyDLuffy This code is also applicable to USB cameras, you can try it

I can’t even see the camera feed on guvcview. I can capture images and video but I can see the feed window. Does the VIM4 support the camera properly or is there anything I have to configure?

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin “wayland” in “/home/khadas/.local/lib/python3.10/site-packages/cv2/qt/plugins”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted

I did. Try the code and same issue with .imshow()