Skip to content

Syhids/Android-Compose-OpenCv-Skeleton

Repository files navigation

Compose + OpenCV setup

This is a basic Android project that demonstrates the integration of Jetpack Compose with OpenCV for real-time image processing. The app captures video from the camera, processes each frame to detect motion, and displays an alert on the screen when motion is detected.

Features

  • Camera Preview: Displays a live feed from the device's camera using OpenCV's JavaCameraView.
  • Motion Detection: Implements a simple motion detection algorithm using MotionDetector.kt.
  • Jetpack Compose UI: The entire UI is built with Jetpack Compose, including the camera preview integration and permission handling.
  • Permissions Handling: Utilizes accompanist-permissions to request and manage camera permissions.

Steps to launch

  • Download latest OpenCV Android SDK and uncompress it.
  • Go to New -> Import module...
  • Select the sdk folder (it must have a build.gradle inside) and name the module open_cv
  • Uncomment implementation(project(":open_cv")) line in app/build.gradle.kts
  • Build the project

About

Skeleton of Android with Jetpack Compose and OpenCV

Resources

Stars

Watchers

Forks

Languages