GNOME Bugzilla – Bug 730141
motioncells improvements
Last modified: 2014-05-30 20:03:26 UTC
Created attachment 276551 [details] [review] use standard macro for gboolean some improvements
Created attachment 276552 [details] [review] make frame drop work at 30 fps
Review of attachment 276552 [details] [review]: I'd recommend to split this into 2 separate patches as it addresses 2 issues. Also this and the other patch on the bug doesn't apply cleanly on master anymore. Could you rebase, please? Thanks ::: ext/opencv/MotionCells.cpp @@ -150,1 +151,1 @@ Let me try to understand this. It actually skips frames untip the 'sum_framecnt' value is reached? Is this something imported from some opencv example or just arbitrary? This patch seems to follow the progression so it should be fine but it would be better to have some way to set this as a property. @@ -200,3 @@ performMotionMask (motionmaskcellsidx, motionmaskcells_count); if (getIsNonZero (m_pbwImage)) { //detect Motion - GST_DEBUG ("DETECT MOTION \n"); Please do the log changes on a separate patch.
thanks for the review, I'll look at these asap, another thing please, opencv plugins works with opencv 2.4.9 too, instead of do another patch like this: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=3248dff5fa506fa9420f57c63485e1b4a8ec3a36 and so for every minor release, can we do something like the following (not tested) PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 opencv < 2.5.0 , [
regarding sumframecnt: - if you send less then 5 fps to the plugin sumframecnt is 1 and m_framecnt is 1, motion is detected in all frames - if you have 10 fps sumframecnt is 2 so a frame is dropped and on the following frame motion is detected and so on - and so on it is basically a trick to preserve cpu if someone does not use a videorate element before motioncells, however actually motion is detected at max 5 fps
Comment on attachment 276551 [details] [review] use standard macro for gboolean This patch looks good, but does not apply cleanly to git master. Can you rebase it?
yes, I'll rebase and send this and some other small improvements, I'm a bit busy at the moment, I'll try to reorganize my work and send what needed this week
Created attachment 276817 [details] [review] make the plugin compile with all 2.4.x versions
Created attachment 276818 [details] [review] use standard macro for gboolean
Created attachment 276819 [details] [review] make frame drop work at 30 fps
Created attachment 276820 [details] [review] improve logging
Thanks for the patches, pushed all with a minor update to the configure.ac one to use < 2.5.0 instead of <= 2.5.0 commit 845d33098a6f4647a059acbca5d3482cce9aec09 Author: Nicola Murino <nicola.murino@gmail.com> Date: Tue May 20 07:34:56 2014 +0200 motioncells: improve logging https://bugzilla.gnome.org/show_bug.cgi?id=730141 commit f48358636b0cd1d416f407189e070096362b9f03 Author: Nicola Murino <nicola.murino@gmail.com> Date: Tue May 20 07:29:16 2014 +0200 motioncells: make framedrop work at 30 fps too https://bugzilla.gnome.org/show_bug.cgi?id=730141 commit b5cefffb9f44756e44db7534b35f62cc2d5aa8d5 Author: Nicola Murino <nicola.murino@gmail.com> Date: Tue May 20 07:25:20 2014 +0200 motioncells: use standard macro for boolean https://bugzilla.gnome.org/show_bug.cgi?id=730141 commit ab4d8d3d3c69014a191c3b4e25a5e7462ebbfd5b Author: Nicola Murino <nicola.murino@gmail.com> Date: Tue May 20 07:18:39 2014 +0200 opencv: make the plugin compile with all 2.4.x versions https://bugzilla.gnome.org/show_bug.cgi?id=730141