qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/cv2/qt/plugins" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/cv2/qt/plugins” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.)
在服务器上使用opencv报错:qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/zzz/anaconda3/envs/DIPpro2/lib/python3.7/site-packages/cv2/qt/plugins” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
发现是imshow()的问题,只要删除该函数就不会报错,在网上找了很多方法都不能解决问题,所以最终将输出图片改成写入图片,在文件上查看图片,有大佬最终解决了问题的,欢迎留言。