Git Product home page Git Product logo

cvcamera-mobile's Introduction

CvCamera-Mobile

Utilizing OpenCV4 with Android's Camera2 API through JavaCamera2View

MIT Kotlin Gradle Android-Gradle-Plugin OpenCV Conventional Commits android-studio ๐Ÿš€ Android CI ๐Ÿš€ Build and Release pre-commit.ci status snyk-security CodeFactor

This android project is barebone setting up OpenCV 4.10.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 Android application, provides a live camera feed with the ability to dynamically switch between front and back cameras. It includes a custom cvFpsMeter for enhanced text visibility. Also features a basic setup for Android NDK and OpenCV, as well as a CV filter with a toggle button for camera switching.

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.10.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 opencvsdk4100. 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!

Features

  • OpenCV Version Update: The OpenCV version was updated multiple times, with the latest being 4.10.0.
  • Camera Switch: Added the ability to switch between the front and back camera.
  • SetupOpenCV Script: Introduced a script for setting up OpenCV.
  • Custom cvFpsMeter: Implemented a custom cvFpsMeter for bigger text and different color choice.
  • Material3 Theme: Added configurations for the Material3 theme.
  • UI Overhaul: The user interface was significantly updated, and strings were added.
  • Timber Logging: Added Timber logging for fpsMeter and ExtendedJavaCamera2View.
  • Android NDK - OpenCV Basic Setup: Implemented a basic setup for Android NDK and OpenCV.
  • CV Filter with Toggle Button: Added a basic CV filter with a toggle button to switch between the front and back camera.

Keywords

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

cvcamera-mobile's People

Contributors

dependabot[bot] avatar emmanueldav avatar frknkrc44 avatar onuralpszr avatar pre-commit-ci[bot] avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cvcamera-mobile's Issues

OpenCL support?

Hi! Just started exploring the world of Computer Vision on mobile, and wondering, how easy is that to utilise phone's GPU for some basic OpenCV functions like grayscale/sepia/sobel filters?

Do you have any advices on how to make the OpenCV work with OpenCL support?
Thanks

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/android-ci-debug.yml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/cache v4
  • actions/setup-java v4
  • actions/upload-artifact v4
.github/workflows/android-ci-release.yml
  • actions/checkout v4
  • actions/setup-java v4.2.1
  • actions/upload-artifact v4
  • actions/create-release v1
  • actions/upload-release-asset v1
.github/workflows/commit-lint.yml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
gradle
gradle.properties
settings.gradle
build.gradle
  • com.android.application 8.5.0
  • com.android.library 8.5.0
  • org.jetbrains.kotlin.android 1.9.24
app/build.gradle
  • androidx.core:core-ktx 1.13.1
  • androidx.appcompat:appcompat 1.7.0
  • androidx.constraintlayout:constraintlayout 2.1.4
  • com.google.android.material:material 1.12.0
  • com.jakewharton.timber:timber 5.0.1
  • androidx.startup:startup-runtime 1.1.1
  • androidx.test.ext:junit-ktx 1.1.5
  • junit:junit 4.13.2
  • androidx.test.ext:junit 1.1.5
  • androidx.test.espresso:espresso-core 3.5.1
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8

  • Check this box to trigger a request for Renovate to run again on this repository

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.