Getting error in cv::imshow() - ASSERT: “false” in file qasciikey.cpp, line 501

岁酱吖の 提交于 2021-02-18 11:29:30

问题


I am getting this error whenever I call cv::waitKey():

ASSERT: "false" in file qasciikey.cpp, line 501

I am not sure why I am getting this error. I am running on an Ubuntu Server 14.04 EC2 instance connected through MobaXterm on Windows. If I run all of the same code on a normal ubuntu machine, all works great.

This is the line where this happens:

char key = cvWaitKey(33);

回答1:


A workaround in MobaXterm is to uncheck "Unix-compatible keyboard" in X11 settings.




回答2:


Try this.

pip install qtconsole

I solve the problem.




回答3:


I am not trying to get the glory here but I think this deserves a proper answer.

As @George mentioned in the comment when my input was not from an English keyboard but used some other locale then this error occurs. I have seen other proposed reasons for this error but I guess this is a quite usual case since the error reports:

ASSERT: "false"




回答4:


This problem is come from mistakes my laptop battery very low and charge unstable after opencv run opencv window opened and closed quickly. THis problem solved must battery full charge.



来源:https://stackoverflow.com/questions/35837255/getting-error-in-cvimshow-assert-false-in-file-qasciikey-cpp-line-501

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!