Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - camera as motion detector

How to implement a simple motion detector using the front camera and Android SDK?

An example scenario would be like this: a device is standing on a stand and plays a movie. If a person appears in front of it, without even touching it - it changes the movie.

like image 220
Yar Avatar asked Mar 19 '12 16:03

Yar


People also ask

Can I use my phone as a motion sensor camera?

Use Motion Detector Android App Motion Detector app is another free Android third-party application that offers motion detection with the help of your phone's camera. This is a simple app that shows the number of times motion is detected through your camera and also takes photos of the motion to save it on your device.

Can I use my webcam as a motion detector?

Yawcam is completely free Windows users will want to check out Yawcam, a free piece software that turns your webcam into a motion-sensitive security camera. You can also view live video over the internet, shoot time-lapse movies, and set it to upload images to an FTP server however you like.


2 Answers

Here is my open source motion detection app for Android.

https://github.com/phishman3579/android-motion-detection

like image 155
Justin Avatar answered Sep 20 '22 17:09

Justin


Here is a Tutorial on how to take a photo with the camera.

If your take a photo every second, and then scale it down to something like 8x8 pixels, you can easily compare two photos and find out if something has happened, to trigger you action.

The reason why you should scale it down are the following:

  1. It is less error prone to noise introduced by the camera
  2. It will be much faster than doing a comparison of the whole image
like image 22
devsnd Avatar answered Sep 17 '22 17:09

devsnd