Comments (7)
没有呀,可以正常运行呢,您这有没有什么log信息。
from opencvforandroid.
错误信息就是mCascadeClassifier这个检测器报了个空指针,我看github上的代码也没有那个xml的啊
Process: kong.qingwei.opencv320, PID: 14634
java.lang.NullPointerException
at com.kongqw.ObjectDetector.detectObject(ObjectDetector.java:106)
at com.kongqw.ObjectDetectingView.onCameraFrame(ObjectDetectingView.java:51)
at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392)
at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:355)
at java.lang.Thread.run(Thread.java:841)
from opencvforandroid.
clone后改过程序吗?createDetector(Context context, int id)
的 id 要传入R.raw.xxx
xxx 是 main/res/raw/ 下的xml文件,检查一下。
from opencvforandroid.
没改过的,createDetector方法也传了R.raw.xxx了的。现在就是我点击完目标检测,程序就会实例化那几个检测器(都赋值了null),再点一下人脸检测,程序就奔溃了。
from opencvforandroid.
您这是读取 xml 失败了,raad都返回-1了,检查一下 xml 是否正常。
另外您是什么设备?系统版本?
from opencvforandroid.
大神,真的是和系统版本有关系!
我用的android4.4和android5.1的平板试了都报这个错,用7.1系统的手机来试可以的。
from opencvforandroid.
Android 8.1 / OpenCV 3.4.x:
javaDetector = new CascadeClassifier(cascadeFile.getAbsolutePath());
javaDetector.load( cascadeFile.getAbsolutePath()); //添加这个
from opencvforandroid.
Related Issues (20)
- 有两个问题:1.这个开源卡可以在java spring上使用吗?因为我们要做web版的人脸识别
- 2.为什么我在华为手机android6.0上camera一片漆黑的呢? HOT 9
- 打包正式版本摄像头一片漆黑,debug版本可以正常使用,系统是 Android 原生 5.1.1 HOT 2
- 目标跟踪,容易丢失 HOT 2
- 受较深的颜色影响,很容易跟丢目标,期待加入对跟踪目标的预测算法。 HOT 6
- 关于OPENCV库的问题 HOT 1
- 已经安装了OpenCV_3.2.0_Manager_3.20,还是提示未安装 HOT 1
- 华为P9人脸识别失败 HOT 1
- 其中人脸识别检测时候分别调用了OPENCV的哪些算法能说一下吗
- 大神!!人脸检测的demo可以正常运行,人脸识别的demo可以提取到人脸,但是当两个人脸比对的时候,demo却提示缺少so库 HOT 1
- 大神,我在手机上装了opencv,但是应用点开还是提示没有安装opencv HOT 4
- 目标丢失!
- 如何提取特定区域所代表的数据包?
- 打包生成app失败 而且在安卓平台上演试 也没用加载app出来
- Is it a charge?
- 大神能回复一下下么 HOT 1
- 怎么保存人脸图片啊
- 大佬,还在不在,为啥图像是个反的啊
- 可以升级opencv 版本到4.6.0嘛
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencvforandroid.