Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Tracking bats - how to increase the motion detection frequency? (tosiara) ---------------------------------------------------------------------- Message: 1 Date: Tue, 23 Apr 2019 11:14:54 +0300 From: tosiara <tosi...@gmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Tracking bats - how to increase the motion detection frequency? Message-ID: <cachtdwr77qnk7b-ye2gtbab6c95_f9if1mpsrdpr5+jw0b-...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Motion has hardcoded frame rate for motion detection - it is 3 fps Here: https://github.com/Motion-Project/motion/blob/master/motion.c#L1835 You can try to alter this code and force process_thisframe=1 for every frame, that should do the trick On Fri, Apr 19, 2019 at 10:27 PM Andre Zibell <andre.zib...@gmail.com> wrote: > > Hi everybody, > > I am trying to set up a raspberry pi3 with NoIR camera and motion in > order to track the activity of bats, so very small, very fast flying > animals. In the worst case I am pointing the camera just at the sky with > IR LEDs for illumination. So the event duration is only a fraction of a > second. > > Therefore, to get at least some images from a single bat, I tried to > squeeze the maximum number of frames out of the camera, by using the > following control parameters (motion installed via > pi_stretch_motion_4.2.2-1_armhf.deb). Please feel free to hint for more > optimization. > > mmalcam_name vc.ril.camera > mmalcam_control_params -md 7 > v4l2_palette 9 > width 640 > height 480 > framerate 90 > threshold 300 > noise_level 32 > disabling despeckle filter > disabling video file output > > With these I get rather constant 90 FPS from the camera, being enough > for nice "time-lapse" shots. I prefer the Raspberry Pi v1 Camera over > the v2, since the 640x480 mode of the v2 camera seems to use only the > center part of the sensor, resulting in a smaller field of view. > > Now to my question/issue: using the "text_changes on" command I noticed > that the number of changed pixels written to the upper corner only > changes every 30th or so frame, and thus the decision "threshold crossed > or not?" also only happens every ~30th frame. For my application this > leads to the following problems: > > 1) When this motion detection decision happens when the bat is already > somewhere within the field of view, I miss the pictures of it entering > the field of view. I got around this by setting the pre_capture option to 30 > > 2) When the bat entrers AND leaves the camera field of view in during > these ~30 frames in between these decision cycles, no event is generated > at all, and I miss it. > > So my question is: is there an option to have the number of changed > pixels being calculated in shorter intervals, ideally EVERY frame, or at > least every third frame or so? I am aware this would increase the CPU > load, but I am trying to minimize it on the other hand by using no image > processing, no rescaling, writing only jpegs, etc. > > Thanks for your ideas and help on this - otherwise the software > perfectly fits my needs for this application :) Maybe you can hint me to > the location for this in the source code, so that I can recompile motion > for this? > > Best regards > > Andre > > > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 154, Issue 14 ********************************************