open cv 识别人脸出错 cv2.error: OpenCV(4.0.0) error: (-49:Unknown error code -49) Input file is empty in f
2019-02-09 15:10
477 查看
用HAAR分类器识别人脸,屡次出错。
其中出错的语句在于:
face_cascade = cv2.CascadeClassifier(’/home/liuyu/PycharmProjects/faceRecognition-master/haarcascade_frontalfacte_defaul.xml’)
出错信息:
cv2.error: OpenCV(4.0.0) /io/opencv/modules/core/src/persistence.cpp:722: error: (-49:Unknown error code -49) Input file is empty in function ‘open’
开始以为是语句错了,调试了很久才发现是haarcascade_frontalfacte_defaul.xml 的库下载方式不对,所以下载的分类器使用中不识别。 后来干脆到github上打开该文件,粘贴到TXT在另存为 haarcascade_frontalfacte_defaul.xml 再使用, 解决问题。
分类器下载地址:
https://github.com/opencv/opencv/tree/master/data/haarcascades
相关文章推荐
- 解决cv2.error: OpenCV(4.0.0) ...error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
- 报错:OpenCV Error: Assertion failed (src.size() == dst.size() && src.type() == dst.ty pe()) in unknown function, file ..……
- Error:The method setInputPaths(JobConf, String) in the type FileInputFormat is not
- 装XP时出错,file setupdd.sys could not be loaded the error code is 4
- C++Builder 6 [BCB6] 共享数据段 错误 测试 (bug 、[Linker Error] Section SHSEG defined in .def file is empty)
- 安装mmseg出错 config.status: error: cannot find input file: src/Makefile.in
- 人脸识别报错cascadedetect.cpp:1698: error: (-215) !empty() in function detectMultiScale
- 蓝牙写入出错,error isError Domain=CBATTErrorDomain Code=114 "Unknown ATT error."
- jmeter3.2生成图形html遇到的问题Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:log is not empty
- ubuntu安装opencv2.4.9编译出错NCVPixelOperations.hpp: error: a storage class is not allowed in an explicit
- 安装mmseg出错 config.status: error: cannot find input file: src/Makefile.in
- use MyButton is simple,only add two file and then add some code just bellow in any dlg src declear the button control and will ok!
- opencv Error:Bad argument <Unknown arrray type> in cvarrTomat
- Unknown error code -49
- xxx.c: Error: C3065E: type of input file 'xxxx' unknown
- 运行Spark项目出错error: error while loading <root>, error in opening zip file
- linux驱动模块加载出错insmod: error inserting './usb_driver.ko': -1 Unknown symbol in module
- CodeSign error: code signing is required for product type Application in SDK iOS
- Uncaught TypeError: $(...).customFileInput is not a function
- 安装qwt-6.1.0时 make出错 :Project ERROR: Unknown module(s) in QT: svg