How could I detect motion direction using a camera and pyBoard ?

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
Post Reply
BOB63
Posts: 58
Joined: Sat Jul 25, 2015 8:24 pm
Location: Monza , Italy

How could I detect motion direction using a camera and pyBoard ?

Post by BOB63 » Sat Aug 06, 2016 9:49 am

Hi ,
I've in mind a project to use a small camera connected by serial interface to a pyBoard and detect if an object that pass under the camera is moving left to right or viceversa. Probably with other boards like RaspeberryPi and openCV could be more simple , but I've not idea at all how
analyse the frames from the camera e define the direction. I don't need take pictures at high resolution an I think to work just wuth grayscale images.
Do you have any idea to suggest me a method that i could use for this scope ?

Thanks Roberto.
Thanks. Roberto

fdufnews
Posts: 76
Joined: Mon Jul 25, 2016 11:31 am

Re: How could I detect motion direction using a camera and pyBoard ?

Post by fdufnews » Sat Aug 06, 2016 6:21 pm

Going low tech is a trending topic but I am not sure you've chosen the best guy for this task.
May be you can use the optical sensor of a mouse. There are libraries on Arduino, mbed, and Espruino platforms that perhaps can be adapted.
If you have some money you can try the CMUCAM

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: How could I detect motion direction using a camera and pyBoard ?

Post by dhylands » Sat Aug 06, 2016 7:39 pm

OpenMV https://openmv.io/ has a camera and includes things like motion tracking, and drives it all using MicroPython.

BOB63
Posts: 58
Joined: Sat Jul 25, 2015 8:24 pm
Location: Monza , Italy

Re: How could I detect motion direction using a camera and pyBoard ?

Post by BOB63 » Sun Aug 07, 2016 11:49 am

Hi,
thank you dhylands, I'll give a look to that camera !
The solution with the mouse sensor I don't think that is applicable in my project because between the sensor and the object there are also 40-50 cm so i don't think that can be focused the sensor in the right way and then the objects are not so small.
Thanks to both! Roberto.
Thanks. Roberto

Post Reply