Code Monkey home page Code Monkey logo

opencvforandroid's Issues

关于OPENCV库的问题

项目跑起来没报错,但是在使用过程中要我安装OpenCV Manager。难道这个库没有包含在项目中吗?

能否标记出特整点?

大神,现在是主界面中会用绿框标记出人脸,我想在框住的人脸上面标记出特整点,比如说眼睛嘴巴这好实现吗?能否给个思路

Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=org.opencv.engine.BIND }

我在运行这个demo的时候报如下错误:

01-17 14:45:15.439 29184-29184/kong.qingwei.kqwfacedetectiondemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: kong.qingwei.kqwfacedetectiondemo, PID: 29184
java.lang.RuntimeException: Unable to start activity ComponentInfo{kong.qingwei.kqwfacedetectiondemo/kong.qingwei.kqwfacedetectiondemo.MainActivity}: android.view.InflateException: Binary XML file line #45: Error inflating class kong.qingwei.kqwfacedetectiondemo.CameraFaceDetectionView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2664)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2733)
at android.app.ActivityThread.access$900(ActivityThread.java:187)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5869)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1019)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:814)
Caused by: android.view.InflateException: Binary XML file line #45: Error inflating class kong.qingwei.kqwfacedetectiondemo.CameraFaceDetectionView
at android.view.LayoutInflater.createView(LayoutInflater.java:639)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:812)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:815)
at android.view.LayoutInflater.inflate(LayoutInflater.java:510)
at android.view.LayoutInflater.inflate(LayoutInflater.java:420)
at android.view.LayoutInflater.inflate(LayoutInflater.java:371)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:437)
at android.app.Activity.setContentView(Activity.java:2205)
at kong.qingwei.kqwfacedetectiondemo.MainActivity.onCreate(MainActivity.java:36)
at android.app.Activity.performCreate(Activity.java:6127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2617)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2733) 
at android.app.ActivityThread.access$900(ActivityThread.java:187) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:194) 
at android.app.ActivityThread.main(ActivityThread.java:5869) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1019) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:814) 
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:749) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:812) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:815) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:510) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:420) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:371) 
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:437) 
at android.app.Activity.setContentView(Activity.java:2205) 
at kong.qingwei.kqwfacedetectiondemo.MainActivity.onCreate(MainActivity.java:36) 
at android.app.Activity.performCreate(Activity.java:6127) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2617) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2733) 
at android.app.ActivityThread.access$900(ActivityThread.java:187) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:194) 
at android.app.ActivityThread.main(ActivityThread.java:5869) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1019) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:814) 
Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=org.opencv.engine.BIND }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1851)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1951)
at android.app.ContextImpl.bindService(ContextImpl.java:1929)
at android.content.ContextWrapper.bindService(ContextWrapper.java:539)
at org.opencv.android.AsyncServiceHelper.initOpenCV(AsyncServiceHelper.java:24)
at org.opencv.android.OpenCVLoader.initAsync(OpenCVLoader.java:89)
at kong.qingwei.kqwfacedetectiondemo.CameraFaceDetectionView.loadOpenCV(CameraFaceDetectionView.java:53)
at kong.qingwei.kqwfacedetectiondemo.CameraFaceDetectionView.(CameraFaceDetectionView.java:46)
at java.lang.reflect.Constructor.newInstance(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
at android.view.LayoutInflater.createView(LayoutInflater.java:613) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:749) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:812) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:815) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:510) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:420) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:371) 
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:437) 
at android.app.Activity.setContentView(Activity.java:2205) 
at kong.qingwei.kqwfacedetectiondemo.MainActivity.onCreate(MainActivity.java:36) 
at android.app.Activity.performCreate(Activity.java:6127) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2617) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2733) 
at android.app.ActivityThread.access$900(ActivityThread.java:187) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:194) 
at android.app.ActivityThread.main(ActivityThread.java:5869) 
at java.lang.reflect.Method.invoke(Native Method) 

编译版本build.gradle:

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"

defaultConfig {
    applicationId "kong.qingwei.kqwfacedetectiondemo"
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"

    ndk {
        // 设置支持的 SO 库构架
        abiFilters 'armeabi-v7a'// 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64', 'mips', 'mips64'
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

加载opencv 失败

小米pad 3,安装了OpenCV_3.2.0_Manager_3.20_armeabi.apk,
打开apk还是报 加载opencv失败

急急急,缺库Core.rectangle和Highgui.imread

老大,能否问一下,为啥Highgui.imread调不了,我加进去也不行,说我没有实现
还Core.rectangle 也没有啊
No implementation found for void org.opencv.core.Core.rectangle_2

能不能更新一下啊,或者指教一下怎么实现

DuplicateFileException错误

作者你好,这里报错有什么办法吗?
(as2.3.0,opencv3.2.0)
Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK lib/armeabi/libjniavcodec.so
File1: /Users/tom/.gradle/caches/modules-2/files-2.1/org.bytedeco.javacpp-presets/ffmpeg/3.2.1-1.3/a529ed8c20539530ca4f422b0567fa03e7bf0b44/ffmpeg-3.2.1-1.3-android-arm.jar
File2: /Users/tom/Development/open_android_demo/AI/opencv/MyOpenCV320/openCVLibrary320/build/intermediates/bundles/default/jni

我的gradle按照你的配置的

受较深的颜色影响,很容易跟丢目标,期待加入对跟踪目标的预测算法。

camshift能有效解决目标变形和遮挡的问题,对系统资源要求不高,时间复杂度低,在简单背景下能够取得良好的跟踪效果。但当背景较为复杂,或者有许多与目标颜色相似像素干扰的情况下,会导致跟踪失败。因为它单纯的考虑颜色直方图,忽略了目标的空间分布特性,所以这种情况下需加入对跟踪目标的预测算法。

目标丢失!

预览画面中选择目标,提示已经选中跟踪目标,随后立马出现目标丢失!

java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_core.so" not found

When I compile this project with the blew config, I get this error.

targetSdkVersion 23

but when I change to targetSdkVersion 19, everything goes well.

Process: kong.qingwei.kqwfacedetectiondemo, PID: 28546
java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_core.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:977)
at java.lang.System.loadLibrary(System.java:1530)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:711)
at com.googlecode.javacpp.Loader.load(Loader.java:586)
at com.googlecode.javacpp.Loader.load(Loader.java:540)
at com.googlecode.javacv.cpp.opencv_highgui.(opencv_highgui.java:79)
at com.googlecode.javacv.cpp.opencv_highgui.cvLoadImage(Native Method)
at kong.qingwei.kqwfacedetectiondemo.FaceUtil.CmpPic(FaceUtil.java:100)
at kong.qingwei.kqwfacedetectiondemo.MainActivity.onFace(MainActivity.java:119)
at kong.qingwei.kqwfacedetectiondemo.CameraFaceDetectionView.onCameraFrame(CameraFaceDetectionView.java:151)
at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:387)
at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:346)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_core.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:977)
at java.lang.System.loadLibrary(System.java:1530)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:711)
at com.googlecode.javacpp.Loader.load(Loader.java:577)

如何提取特定区域所代表的数据包?

您好,我目前想做一些关于ROI的视频传输的系统,但是在实现上需要一些理论支持!

在读取视频流的时候,判读取的视频数据包是不是属于圈定出来的ROI区域,然后再做后续处理!不知道openCV是否有解决办法,或者其他工具是否支持!

具体的一个用途,举个例子就是:当在视频传输过程中,如果需要主动丢包,我会优先丢弃非ROI区域,但是在读取视频数据包的时候,我怎么知道这些数据包里哪一部分是指代ROI区域呢?

或者最简单的是,我人为圈定中心20X20的区域,我在读取数据包的时候如何知道该数据包是否是20*20的区域呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.