Hello everyone,
I’m trying to build a project in MIT App Inventor where I need to detect motion direction using the device’s camera feed — specifically whether the movement comes from the left or right side of the screen.
Here’s what I want it to do:
Continuously analyze the camera preview.
When motion is detected, identify whether it appeared from the left or right side.
Trigger different actions depending on the direction of movement.
After detecting one movement, it should ignore further detections for 2 minutes before checking again.
I don’t need face or object recognition — just simple motion detection and direction awareness.
Can anyone guide me on how to achieve this in MIT App Inventor or if there’s any known method to implement such functionality?
Thanks a lot!
— Rudra
Try this?
or
@TIMAI2 I saw those but those don't tell the side of the motion not even the co-ordinates of where motion occured.
You could ask the developers if they can update to include this?
An alternative is to compare two images, split into tiles, measuring and comparing the luminance of each tile. If different, return the location of the tile, which will give you left and right. The general advice is to resize the images before comparison in order to speed things up.
The Taifun camera extension can programmatically take photos with your device camera. (although it may not be able to take pictures quickly enough)
Also see:
When you switch to "photo" 2 Images/sec will be taken
and stored in your /Documents folder.
in the djmotiondetect extension