Translate movement into direction
Question
Hello.. I am trying to recognize movement using Motion. Is there a way to get a translation of the movement into left and right?
Imagine having the camera pointing on a stationary object and then a person moves in front of it.. I want to know the direction (left or right) that person moved. Is there a way to do it using motion? Thank you very much..
Paste in your error messages, config settings, terminal window output etc in this text field.
Environment
Motion version: |
3.2.11.1 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
Fedora 11 kernel 2.6. |
--
FrixosTheodoulou - 21 Nov 2011
Answer
Take a look to :
http://www.lavrsen.dk/foswiki/bin/view/Motion/ConversionSpecifiers
You can get information about center of motion detection object in X asis with ( %K )
Using triggered event like :
http://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigOptionOnMotionDetected
Cheers,
--
AngelCarpintero - 22 Nov 2011
Reply
Thank you very much.. That seems to be what I am looking for but for some reason I don't seem to get it to work. What I am doing is in the motion.conf file I have a line on_motion_detected /home/user/run which is a file with rwx modes and for now it just echoes "hey".
My first question is why cant I get /home/user/run (#!/bin/bash) script to run and secondly how am I going to pass the %K value for further processing?
In motion.conf :
on_motion_detected /home/peacefulwarrior/dev/motion/git/motion/run.sh %K
run.sh
#!/bin/bash
echo $1 >> file.txt
Cheers,
--
AngelCarpintero - 30 Nov 2011