cv2.imshow 在 Visual Studio (M1 Macbook) 中不起作用

问题描述

每次尝试使用cv2.imshow时,都会出现窗口图像但无法关闭,然后python崩溃了。

我使用的是 M1 MacBook Air,我不确定这是否是 Visual Code 的问题。

我的代码

cv2.startwindowThread() # 
cv2.imshow("img",img) # show image
# : Press any key to directly destroy all open HighGUI windows
cv2.waitKey(0) # Wait for user input,press any key
cv2.destroyAllWindows()

有什么建议吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)