piecam wrote:HI all experts,
Can some one kindly point to a link or provide a working Motion detection configuration as well as raspMJPEG conf.?
Basically, I'd like to Pi up and running with with motion detection in effect. If there's , say 10-15% pixel change, record high resolution stills (if not 2500x1900, 1600x1200 or 1280x1024 would be good) for that motion. If it can record 10 mintues video, it's even better.
There are so much info on this forum and I have difficulty in putting them together.
Thanks in advance.
You can make it boot with motion detection on by default by changing the last line in the raspimjpeg conf file (in /etc from
to
The standard motion.conf (in /etc/motion/) should provide a degree of motion detection as standard.
The 2 basic settings to change are
noise_level 32
and
threshold 1500
Noise level sets the change needed in the corresponding pixel from frame to frame for it to be regarded as a changed pixel. These have values from 0 - 255. So if a pixel is say 100 in 1 frame and 120 in the next then it is not a changed pixel.
The threshold is the number of pixels that have to 'change' from frame to frame for the frames to be regarded as different and potentially causing a motion trigger. The frames fed to motion are 512 x 288 (for 16x9) and so have 150,000 pixels. With a threshold of 1500 that means that 1% of the pixels have to change to cause a motion event.
I find these defaults a bit too sensitive and as typical objects moving through a frame give big changes in pixel values and larger numbers of pixels changing. So increasing these can give less false events if these numbers are increased. I use 80 for a noise level and 3000 for the threshold. Note that in my version you can adjust these values from the web interface directly.
The current software is arranged to stop video recording when motion detects no movement. It is possible with my python helper program (soon to be integrated into the web app) to basically disable motion from stopping a recording and then setting a maximum capture time of whatever you want which will then terminate the capture. That way any triggered recording will be of a fixed length.