Difference between revisions of "motion notes"

From Noah.org
Jump to navigationJump to search
Line 5: Line 5:
 
== configuration ==
 
== configuration ==
  
Edit '''/etc/motion/motion.conf'''.
+
Edit the file '''/etc/motion/motion.conf'''. Below are the settings are most often change. I found that threshold is the most difficult to estimate. Every time I do a project I found that I kind of just have to do a few test runs with different threshold values until I find a value that works. The threshold values can be orders of magnitude different between different conditions. In theory, the '''noisr
 
<pre>
 
<pre>
 
videodevice /dev/video1
 
videodevice /dev/video1
width 1280
+
# HD 1080p resolution is 1920*1080 (2073600 pixels, or 2.1 megapixels)
height 960
+
# Logitech c910/c920 max resolution 2304 * 1296
 +
width 1920
 +
height 1080
 +
 
 +
# Threshold for number of pixels that triggers motion detection (default: 1500).
 +
# This sets the threshold to 10% of all pixels, which is a massive change in most conditions.
 +
# This will make motion detection fairly insensitive and immune the minor movements.
 +
# This is not a good setting for distant objects as they may never register as high as 10%.
 +
# 1920 * 1080 = 2073600 pixels
 +
# 2073600 * 10% = 207360
 +
threshold 207360
 +
noise_level 64
 +
 
 
#width 1920
 
#width 1920
 
#height 1080
 
#height 1080
Line 19: Line 31:
 
pre_capture 1
 
pre_capture 1
 
post_capture 1
 
post_capture 1
 +
 
text_right %Y-%m-%d\n%T-%q
 
text_right %Y-%m-%d\n%T-%q
 
jpeg_filename %Y%m%d%H%M%S-%v-%q
 
jpeg_filename %Y%m%d%H%M%S-%v-%q
Line 25: Line 38:
 
#snapshot_interval 60
 
#snapshot_interval 60
 
framerate 30
 
framerate 30
# Threshold for number of pixels that triggers motion detection (default: 1500)
+
 
# 10% is a massive change.
 
# 1280*720=921600 pixels
 
# 92160 is 10% of 921600 pixels
 
#threshold 92160
 
#threshold 9216
 
threshold 921
 
 
# jpeg quality
 
# jpeg quality
 
quality 95
 
quality 95

Revision as of 02:40, 10 May 2014


http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

configuration

Edit the file /etc/motion/motion.conf. Below are the settings are most often change. I found that threshold is the most difficult to estimate. Every time I do a project I found that I kind of just have to do a few test runs with different threshold values until I find a value that works. The threshold values can be orders of magnitude different between different conditions. In theory, the noisr

videodevice /dev/video1
# HD 1080p resolution is 1920*1080 (2073600 pixels, or 2.1 megapixels)
# Logitech c910/c920 max resolution 2304 * 1296
width 1920
height 1080

# Threshold for number of pixels that triggers motion detection (default: 1500).
# This sets the threshold to 10% of all pixels, which is a massive change in most conditions.
# This will make motion detection fairly insensitive and immune the minor movements.
# This is not a good setting for distant objects as they may never register as high as 10%.
# 1920 * 1080 = 2073600 pixels
# 2073600 * 10% = 207360
threshold 207360
noise_level 64

#width 1920
#height 1080
#width 2304
#height 1296
movie_filename %Y%m%d%H%M%S-%v
timelapse_filename %Y%m%d-timelapse
gap 10
pre_capture 1
post_capture 1

text_right %Y-%m-%d\n%T-%q
jpeg_filename %Y%m%d%H%M%S-%v-%q
snapshot_filename %Y%m%d%H%M%S-snapshot
snapshot_interval 1
#snapshot_interval 60
framerate 30

# jpeg quality
quality 95
# Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0
minimum_motion_frames 2
text_right %Y-%m-%d\n%T-%q
text_changes on
text_double on

A different example:

width 640
height 480
#movie_filename %Y%m%d%H%M%S-%v
#timelapse_filename %Y%m%d-timelapse
gap 3
pre_capture 0
post_capture 0
text_right %Y-%m-%d\n%T-%q
jpeg_filename %Y%m%d%H%M%S-%v-%q
snapshot_filename %Y%m%d%H%M%S-snapshot
snapshot_interval 0
#snapshot_interval 60
framerate 1
videodevice /dev/video1
# Threshold for number of pixels that triggers motion detection (default: 1500)
# 10% is a massive change.
# 640*480=307200
# 307200 * 0.05 = 15360
threshold 15360
# jpeg quality
quality 95
# Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0
# Motion events and end cause a light to turn on and off.
on_event_end br --port=/dev/ttyUSB0 --house=A --off=1
on_motion_detected br --port=/dev/ttyUSB0 --house=A --on=1