opencv-android | Easy way to integrate OpenCv | Build Tool library

 by   quickbirdstudios C++ Version: v4.3.0-contrib License: Non-SPDX

kandi X-RAY | opencv-android Summary

kandi X-RAY | opencv-android Summary

opencv-android is a C++ library typically used in Utilities, Build Tool, OpenCV, Gradle applications. opencv-android has no bugs, it has no vulnerabilities and it has low support. However opencv-android has a Non-SPDX License. You can download it from GitHub.

Easy way to integrate OpenCV into your Android project via Gradle. No NDK dependency needed - just include this library and you are good to go. Disclamer: The GitHub project is not (yet) intended to be used as module dependency. Include one of this dependencies in your module's build.gradle dependencies section.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              opencv-android has a low active ecosystem.
              It has 326 star(s) with 75 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 48 have been closed. On average issues are closed in 126 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of opencv-android is v4.3.0-contrib

            kandi-Quality Quality

              opencv-android has no bugs reported.

            kandi-Security Security

              opencv-android has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              opencv-android has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              opencv-android releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of opencv-android
            Get all kandi verified functions for this library.

            opencv-android Key Features

            No Key Features are available at this moment for opencv-android.

            opencv-android Examples and Code Snippets

            No Code Snippets are available at this moment for opencv-android.

            Community Discussions

            QUESTION

            Issue using functions from opencv shared libraries cross compiled for android
            Asked 2022-Feb-17 at 12:30

            I was trying to build and execute a cpp code that links few opencv shared libraries that I had cross compiled for android but while trying to utilize the namespace cv or trying to use a function of opencv, it says undeclared identifier. I did try this documentation here: https://developer.android.com/ndk/guides/prebuilts but was unable to get it working. Also I referred to another stackoverflow question for reference here: OpenCV with Android NDK Undefined References as well. Any guidance on how to link them and import opencv functions properly which I am probably missing out here would be really helpful.

            trial_onnx.cpp file

            ...

            ANSWER

            Answered 2022-Feb-17 at 12:30

            I've fixed the issue myself, it was a linking issue along with modifying the Android.mk file accordingly. For others who may encounter the issue: My Android.Mk file after the fix looks like

            Source https://stackoverflow.com/questions/71128354

            QUESTION

            Linking C++ OpenCV to an app in Android Studio
            Asked 2022-Jan-04 at 11:08

            I am integrating existing C++ code that uses OpenCV to an Android app, using Android studio. For this purpose, I have installed the package OpenCV-android-sdk and added it as a module to Android studio. I have also created a simple Kotlin app.

            So far I have managed to integrate my C++ code into the project. After adding the paths to the OpenCV includes by means of an include_directories statement, the code compiles successfully.

            My next step would be to link against the precompiled OpenCV library, to resolve the "undefined symbol" errors. I have no idea how to achieve this/where to specify it. I have tried to find resources on the web, but not two resources tell the same and the solutions seem overly complicated. I am lost in the jungle.

            ...

            ANSWER

            Answered 2022-Jan-04 at 11:08

            I finally managed. Here comes the recipe (validated under Windows).

            Make sure to download the OpenCV Android SDK and copy it somewhere.

            The project must be created as a Native C++ app (Phone and tablet). A cpp folder is automatically created with a native-lib.cpp source file and a CMakeLists.txt.

            Add the following lines to the CMakeLists file, after the project line:

            Source https://stackoverflow.com/questions/70399226

            QUESTION

            OpenCV for Android via Visual Studio to Unity
            Asked 2021-Jun-10 at 16:27

            I tried to compile a .so library using Visual Studio 2019 along with OpenCV Android in order to use this library in Unity. There are some answers on how to configure Visual Studio to use OpenCV Android (here or here) but none of these work for me. Below you can see my configurations.

            Visual Studio 2019 (running on Windows 10)

            android-ndk-r21e // also tried with android-ndk-r15c android-ndk-r16b and android-ndk-r17c

            OpenCV Android 4.5.2 // also tried with OpenCV Android 4.0.0, 4.0.1 and 4.1.0

            My settings in Visual Studio 2019 look as follows:

            Configuration Properties

            - General

            • Platform Toolset Clang 5.0 (also tried Clang 3.8 or GCC 4.9)

            • Configuration Type Dynamic Library (.so)

            • Target API Level Nougat 7.0 (android-24) (also tried different versions)

            • Use STL LLVM libc++ static library (c++_static) (also tried "GNU STL static library (gnustl_static)")

            C/C++

            - General

            • Additional Include Directories "Path to OpenCV_4_5_2_Android\sdk\native\jni\include"

            • Code Generation Enable C++ Exceptions "Yes(-fexceptions)"

            • Language C++17(-std=c++1z)

            • Precompiled Headers Not using Precompiled Headers

            Linker

            - General

            • Additional Library Directories Path to OpenCV_4_5_2_Android\sdk\native\libs\armeabi-v7a

            - Input

            • Additional Dependencies Path to OpenCV_4_5_2_Android\sdk\native\libs\armeabi-v7a\libopencv_java4.so

            My Source.cpp I try to compile is just a single function for testing purposes

            ...

            ANSWER

            Answered 2021-Jun-10 at 16:27

            I had the exact same issue as you (though I used c++ 11) with the exact same setup, and struggled for days. I believe the errors you're seeing (like me) are from arm_neon.h. Very oddly, I was able to just build (not run) the .so successfully, even with those errors (I say "errors" because if you look at arm_neon.h, others pop up), so try it. Maybe it's some kind of IntelliJ/Intellisense mistake more than anything else where it's catching false negatives from some other toolchain setup.

            At the same time, I'm not 100% sure I was always able to build with that issue, so try these steps as well if you can't:

            1. use OpenCV 4.0.1 with Android NDK 16rb. The NDK matters when it comes to OpenCV builds, and this is the only supposed match that I know of.
            2. follow this tutorial from scratch: https://amin-ahmadi.com/2019/06/03/how-to-use-opencv-in-unity-for-android/
            3. if the downloaded OpenCV android SDK is still giving trouble, build OpenCV from the source using his other tutorial here: https://amin-ahmadi.com/2019/02/03/how-to-build-opencv-4-x-for-native-android-development/ and then repeat step 2.

            MAJOR EDIT: OpenCV 4.5.2 needs to be treated differently because it no longer uses toolchains with gnu c++. -When you build OpenCV from CMake, build with Android NDK 21e, and do not use the toolchain in OpenCV 4.5.2. Use the one inside the Android NDK's build folder (android-ndk-r21e\build\cmake). -When you build your .so from Visual Studio 2019, do not use the GNU STL, use the LLVM. GNU c++ is no longer part of Android NDKs, and you need to cut it out of the process entirely. -In the Linker Input, put the names of your library files (or file, if it's just the world one) in the Library Dependencies field, not the Additional Dependencies field. -Everything else is the same as in those common tutorials.

            Source https://stackoverflow.com/questions/67777653

            QUESTION

            CMake build error: "More than one file was found with OS independent path 'lib/arm64-v8a/libopencv_java3.so'"
            Asked 2021-Apr-20 at 23:27

            I'm trying to setup OpenCv 3.4.14 on Android Studio (4.0.0) project which has c++ support from the beginning, (Native project). I'm getting this error over and over again. I searched the web and didn't found any useful solution for that problem, please help.

            I followed this video for setting up OpenCv on Android Studio. It works well in the video, but for some reason it doesn't work for me.

            Note:

            I've tried to setup OpenCv on projects that don't include c++, and it worked without any problem. What makes me think that the problem here is somewhere in the CMakeLists.txt file.

            So i will share here all what i have (after following the video above):

            Project structure:

            build.gradle (:app):

            ...

            ANSWER

            Answered 2021-Apr-20 at 23:27

            To anyone who struggle configuring OpenCV in a native c++ Android projects, I've found this video useful, it is the best guide for setting up OpenCV on Android. All the work is done only by the CMake file. It worked for me.

            Source https://stackoverflow.com/questions/67186084

            QUESTION

            Take path from env var doesn't work properly in CMakeList.txt
            Asked 2020-Nov-01 at 11:50

            I am working with CMakeList.txt file and need to set a path to my lib. Currently I do it this way:

            ...

            ANSWER

            Answered 2020-Nov-01 at 11:50

            What am I doing wrong?

            You are reading cmake variable and expecting it to expand to the value of the environment variable.

            how to convert env var value from key to actual value.

            Read the environment variable.

            Source https://stackoverflow.com/questions/64631529

            QUESTION

            How can we fork opencv-android repo and use it in own project?
            Asked 2020-Sep-26 at 13:07

            I had used openCV for android from this repo https://github.com/quickbirdstudios/opencv-android. its worked and also camera was running. But there is a issue with camera orientation in this repo. So I just forked and published mine using https://jitpack.io/ without any changes (just to check if its working).

            build.gradle:

            ...

            ANSWER

            Answered 2020-Sep-26 at 13:07

            I have forked from diff OpenCV repo and it worked. but not sure why it didn't work with this.

            Source https://stackoverflow.com/questions/63926310

            QUESTION

            Error : java.lang.UnsatisfiedLinkError with Charuco Camera Calibration (DetectorParameters)
            Asked 2020-Jul-23 at 15:07

            Good morning everyone. I am currently working on a project in which I have to detect object coordinates within an image with high precision. I have tried using a normal chessboard for camera calibration but the reprojection error was too high so I decided to use the Charuco calibration pattern. I am working with OpenCv 3.4 and Java (project constraint). Since the Aruco function are not included in OpenCv for Java I created a new package in my project which includes the necessary classes. The Aruco code is the one that you can find in the following link : Aruco Code Github

            The code that I'm executing is the following:

            ...

            ANSWER

            Answered 2020-Jul-23 at 15:07

            The error indicates that you have opencv package without special module you're using;

            In order to fix that you'd need to either find a prebuilt opencv with module you need (in your exactly case it's lcoated in contrib library, so this probably helps.

            In case you want to build it from sources - you should enable the module you want in cmake properties. For contrib - you'd need to cmake contrib project first & then enable contrib in main opencv makefile. For building opencv & contirb - please follow official documentation.

            Source https://stackoverflow.com/questions/63031705

            QUESTION

            how can i track GREEN color in openCV? while red&blue worked
            Asked 2020-Jul-16 at 13:50

            red and blue works fine, what happened to GREEN. i've read the similar question and another one,still doesn't work. see my picture frame,mask,res

            ...

            ANSWER

            Answered 2020-Jul-16 at 13:50

            In HSV color space, Hue represents the traditional colors which we perceive. Another main difference is that when RGB color space represented as a cube, HSV is a cylinder so the range of Hue is actually 0 to 360 degrees. Hue represents Green values between ~121 to ~180 degrees and when we rescale that to the input range of Opencv functions (0-255) the value of green should be between 85 to 128. If you are looking for a visual representation this page has a nice interactive model for both RGB and HSV color spaces.

            Source https://stackoverflow.com/questions/62890898

            QUESTION

            android app asks for OpencvManager installation even after including opencv sdk in project and adding dependency
            Asked 2020-May-07 at 23:14

            I have been trying to do this from past few days. Aim is to access android camera and stream frames on the screen using opencv library.

            ...

            ANSWER

            Answered 2020-May-07 at 23:14

            I just have followed this with the latest(like you) version of everything. And it's working! Enjoy!

            I am giving my version of instructions thinking about if the link ever gets broken.

            1. Download opencv sdk for android at: https://opencv.org/releases.html
            2. Unzip opencv sdk and place it in the same root of sample project folder

              -> MyProjects

            Source https://stackoverflow.com/questions/61664969

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install opencv-android

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/quickbirdstudios/opencv-android.git

          • CLI

            gh repo clone quickbirdstudios/opencv-android

          • sshUrl

            git@github.com:quickbirdstudios/opencv-android.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link