在Ubuntu 16.04 系统下使用opencv-3.2.0打开摄像头,运行可执行程序后出现如下错误:
OpenCV Error: Assertion failed (total() == 0 || data != NULL) in Mat, file /home/thunder/code/opencv-3.2.0/modules/core/include/opencv2/core/mat.inl.hpp, line 431
terminate called after throwing an instance of 'cv::Exception'
what(): /home/thunder/code/opencv-3.2.0/modules/core/include/opencv2/core/mat.inl.hpp:431: error: (-215) total() == 0 || data != NULL in function Mat
已放弃 (核心已转储)
求助各位大神这是什么地方的问题,不胜感激!
可能是没有读到图片,你就直接imshow了,建议在imshow外面判断一下Mat是否为空
请问问题解决了吗?看到好多说在命令前加sudo的,加过之后只提示“已放弃”,还是出错
应该是安装的过程中某些cv依赖库没有安装,我也遇到过这种问题,通过安装依赖库就没问题了