Comments (3)
@kongqw 我搞定了!这样解决的:
在 CameraFaceDetectionView 中的loadOpenCV 中把loadOpenCV方法改成下面这样就跑起来了:
`
private void loadOpenCV(Context context) {
// 初始化OpenCV
// boolean b = OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_5, context, mLoaderCallback);
// Log.i(TAG, "loadOpenCV: b = " + b);
if (OpenCVLoader.initDebug()){
mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
}
}`
貌似没发现有启动服务的地方吧?看源码跟服务有关的地方AsyncServiceHelper中的:
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); if (AppContext.bindService(new Intent("org.opencv.engine.BIND"), helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }
这块儿咱们不用改吧?
from opencvforandroid.
Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=org.opencv.engine.BIND }
@SOFTPOWER1991
Android 5.0 以后要显示启动服务。
你把targetSdkVersion改成 19,或者改下服务启动方式再试试
from opencvforandroid.
@SOFTPOWER1991
解决了就好!过去太久,封装完了以后也没有再看,有些记不清了,我记得源码里是有启动服务了,我还改过。
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
- 320版本的分支代码是不是少了/data/data/kong.qingwei.opencv320/app_cascade/2131099665.xml HOT 7
- 关于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.