Skip to content

Using OpenCv's Android Camera2(JavaCamera2View) with OpenCV 4.8.0

License

Notifications You must be signed in to change notification settings

frknkrc44/CvCamera-Mobile

 
 

Repository files navigation

CvCamera-Mobile

OpenCV's Android Camera2 with OpenCV4 (JavaCamera2View)

MIT Kotlin Gradle OpenCV Conventional Commits android-studio GithubCI pre-commit.ci status

This android project is barebone setting up OpenCV 4.8.0 (and other 4.x.y versions) for Android in Android Studio with Native Development Kit (NDK) support. Android NDK enables you to implement your OpenCV image processing pipeline in C++ and call that C++ code from Android Kotlin/Java code through JNI (Java Native Interface).

This sample Android application displays a live camera feed only and camera switch to back and front in runtime.

How to use this repository

  1. Download and Install Android Studio

  2. Install NDK and CMake

  3. Clone this repository as an Android Studio project :

    • In Android Studio, click on File -> New -> Project from Version Control -> Git
    • Paste this repository Github URL, choose a project directory and click next.
  4. Install OpenCV Android release :

    • Download OpenCV 4.8.0 Android release or download latest available Android release on OpenCV website.

    • Unzip downloaded file and put OpenCV-android-sdk directory next your project and rename folder opencvsdk480. If you want to place somewhere else please change path in settings.gradle

    • Optional(For linux) you can run setupOpenCV.sh for automatic download and setup gradle file for opencv

  5. Sync Gradle and run the application on your Android Device!

Keywords

Kotlin, OpenCV 4, Android, Android Studio, Native, NDK, Native Development Kit, JNI, C++,

About

Using OpenCv's Android Camera2(JavaCamera2View) with OpenCV 4.8.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 88.4%
  • CMake 8.8%
  • Shell 1.5%
  • C++ 1.3%