Camera Motion Detector

Warning This repository is archived for read-only purpose and is not maintained anymore.


The Camera Motion Detector, an Android application, is designed to connect to a video source like the ESP32 M5CAM, and uses OpenCV to detect motion. Upon detecting movement, it alerts users through sound notifications.

Here is a diagram involving ESP32 M5CAM: Diagram

Note: The actual name of the application is “As*hole Movement Detector” due to initial reason I developed it. Sorry for that!

Getting Started


  • Build the application or download and install the .apk from Release v0.0.1.
  • Access to the video source’s network (if it’s private and not available over the Internet). For ESP32 M5CAM, connect to its Wi-Fi network (SSID is usually something like this: M5Psram_Cam, m5stack-, or similar).
  • Knowledge of your video source’s JPEG stream URL. For ESP32 M5CAM, the default is

Initial Setup

  1. Ensure you’re connected to the video source’s network.
  2. Launch the app and enter the JPEG stream URL.
  3. Let it load images from the source.

Configuring Detection Area

Define the detection zone by drawing one or more rectangles within the image as shown here:


Starting Detection

Click the start (resume) button to begin motion detection. Refer to this UI guide for more details: Elements


  1. Clone the repository.
  2. Install OpenCV 4.5.5 SDK into sdk directory in project root.
  3. Build the apk output.


  • This is a personal, non-commercial project.
  • It may contain bugs and might not function as expected.
  • The provided .apk file in the release is not signed and does not support Android 9+ due to API changes.
  • A solution for the API issue is included in the AndroidManifest.xml, but a new build with this fix has not been generated.


View Github