使用opencv的人脸检测不起作用
face detection using opencv not working
我正在尝试使用OpenCv库创建一个示例人脸检测应用程序。我遵循了以下教程
http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.htmlhttps://www.openshift.com/blogs/day-12-opencv-face-detection-for-java-developers
但我收到了以下警告,它没有检测到人脸。
Hello, OpenCV
Running DetectFaceDemo
Detected 0 faces
Writing faceDetection.png
libpng warning: Image width is zero in IHDR
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data
请帮帮我。我正在使用linuxMint+eclipse系统。
出现问题
FaceDetector.class.getResource("haarcascade_frontalface_alt.xml").getPath()
它返回类似的东西
/C:/src/open/haarcascade_frontalface_alt.xml
开头的斜线应该删除
FaceDetector.class.getResource("haarcascade_frontalface_alt.xml").getPath().substring(1)
尝试这个
CascadeClassifier faceDetector=newCascadeClassifier(JavaCam.class.getResource("haarcascade_frontalface_alt.xml").getPath().substring(1));
相关文章:
- 我的神经网络不起作用 [XOR 问题]
- 在C++程序中输入的文本文件将不起作用,除非文本被复制和粘贴
- C++映射:具有自定义类的运算符[]不起作用(总是返回0)
- C++为什么尽管我调用了void函数,它却不起作用
- 为什么在保护模式下继承升级不起作用
- 循环在计数器中不起作用
- 在其他文件中创建类时在 c++ 项目中不起作用
- Visual studio代码重构似乎不起作用(例如,重命名符号-f2)
- 为什么二进制搜索在我的测试中不起作用
- 我的代码中有错误吗?使用BGI图形的C++代码对我不起作用
- 为什么 const std::p air<K,V>& 在 std::map 上基于范围的 for 循环不起作用?
- 带有指定长度字符* 参数的 std::regex_search 在 VS2017 中不起作用?
- SDL2 键盘检测不起作用
- SFINAE:检测成员变量的存在在 g++ 上不起作用
- 使用简单的BlobDetector进行对象检测,但它不起作用
- 在unix平台上使用curses检测c++中的箭头键输入在调用系统命令后不起作用
- Dlib正面人脸检测在IOS中不起作用
- C++碰撞检测在上次检查时不起作用?
- 使用opencv的人脸检测不起作用
- 人脸检测不起作用