Reputation: 297
I want to make an app where, if a person is in front of the phone a video show up, so, im trying to detect any movement on the camera to play the video or take two photos and analyze the pictures to know if something is different.
I wonder if that can be done with appcelerator/titanium, the app is for iOS and Android
Upvotes: 0
Views: 78
Reputation: 486
The one way I can think of doing this would be to take a photo at interval (every second maybe) then use something like resemble.js (http://huddle.github.io/Resemble.js/) or something like this (https://rosettacode.org/wiki/Percentage_difference_between_images#JavaScript) to determine the difference in images and then decide what to do with that.
You can use appcelerator to take photos every x seconds, then process them, see http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media-method-takePicture. Not sure how fast it would be, but I think it's doable...
Ray
Upvotes: 0