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.
- 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-permissionsto request and manage camera permissions.
- Download latest OpenCV Android SDK and uncompress it.
- Go to New -> Import module...
- Select the
sdkfolder (it must have abuild.gradleinside) and name the moduleopen_cv - Uncomment
implementation(project(":open_cv"))line inapp/build.gradle.kts - Build the project