Page 1 of 1
Merge Events Option
Posted: Thu Sep 15, 2005 8:24 pm
by Blazer
It would be nice to have an option to "merge" several events into one. For instance the test ZM I have setup at work, often someone comes into the zone and either stops moving long enough to prematurely terminate an event, or perhaps they move out of the zone area just long enough, so that I end up having 3-4 events that really should be one "event".
It would be cool in the event viewer to have an option to merge events, basically you would check off the ones to merge and it would either create a new numeric event, or even prompt you for a custom name.
Posted: Thu Sep 15, 2005 9:37 pm
by zoneminder
Noted. This has come up a couple of times before. The main thing that isn't a gimme is what to do if there is a gap between the events (ie. someone standing still for 5 minutes). There would be a jump in the middle of the event. Other than this there is no major reason why it couldn't be done at all, though increasing the post-event buffer size in the meantime might help.
Phil
Posted: Sat Sep 17, 2005 5:30 pm
by thelight
Maybe an option to have some kind of indication of which event is currently being viewed. Either by having the event number displayed in a corner, of by flashing up a white screen for a few frames to indicate moving from one event to the next.
Posted: Tue Sep 20, 2005 9:33 am
by zoneminder
I think probably a couple of inter-event transition frames is the simplest way.
Phil
Posted: Thu Sep 22, 2005 9:41 am
by Blazer
zoneminder wrote:Noted. This has come up a couple of times before. The main thing that isn't a gimme is what to do if there is a gap between the events (ie. someone standing still for 5 minutes). There would be a jump in the middle of the event. Other than this there is no major reason why it couldn't be done at all, though increasing the post-event buffer size in the meantime might help.
I agree the transition probably wouldn't be very graceful as far as true timeflow goes. I just thought it would be a nice way to combine several events to one.
For instance...someone comes into zone, and because they are reading a poster or something you have on their wall, they are mostly standing still, but also moving/swaying now and then....so to Zm this 2 minutes of the person standing there gets broken up into 5-6 events. It would be nice to be able to merge all of those into one event, and I could optionaly archive it with a custom name.
Another example is someone coming in and out of the zone, let's say they are stealing things or playing a prank. You could merge those 5-6 events into one and call it "theft #3" or whatever. It would also be easier to make a movie if you could first merge the events together.
Thanks for considering.
Posted: Fri Jun 09, 2006 12:38 am
by schuitz
I'll add my two bits here and bump this up.
I don't mind multiple events like this, but I was looking for a way to mod export so that events could be merged for the purposes of generating a single video. A cursory look through zmvideo.pl shows this is not trival, and the reasons why.
It seemed to me that the following new paradigm is logical: in addition to the alarm post_event_count, why not a new additional variable, say, alert_frame_count, which indicates the length of the ALERT state, independent of post_event_count. It should always be greater than or equal to post_event_count.
An example:
post_event_count = 10;
alert_frame_count = 80;
If we leave alert after 80 frames, just keep the 10 after the last alarmed frame. If we get a new alarmed frame within 80, keep them all. All events always have 10 frames of post-roll, but could have up to 80 frames of no activity in the middle.
After examining Monitor::Analyse(), it seemed to me this could be fairly straightforward to accomplish without altering the existing state machine. The only thing I couldn't figure out was whether it is trivial to discard those frames in between post_event_count and alert_frame_count. If you could provide some direction in this regard, I may go ahead and try out those code updates here.
MikeS
Posted: Fri Jun 09, 2006 6:56 am
by jameswilson
I did a test to 'join' events in a windows app but the problem can be the pre and post alarm eg
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
Assume a pre and post of 5
camera goes into alarm at 1 stops at 5 but has 5 post and closes the event. We are now ar image 11, at image 14 a new event starts but we add 9,10,11,12,13,14 to the new event. so you end up with overlap, this gets worse with higher pre event counters. I did think about inserting says 4-5 frames of a static jpeg with the text Ending, event and starting new etc etc. But never got round to finishing it.
Posted: Fri Jun 09, 2006 10:48 am
by zoneminder
It may be possible to eliminate duplicate frames by inspecting their timestamps in the database. However the precision of the db timestamp is less than that stored internally so you may end up not getting every single one, or missing the odd one. It should be better than not doing it as per your example though.
I do need to get on with this feature as I think it would be useful though.
Posted: Fri Jun 09, 2006 12:04 pm
by schuitz
Having a merge button in the events window would certainly be nice. But do consider adding an independent length for the alert state anyhow. I suspect it would be much simpler to implement, and would obviate the need for a manual event merge function in most cases.
Cheers
MikeS
Posted: Thu May 14, 2009 12:58 am
by MrEvoMan
+1 for a "merge" button in the Events window. This should be easy enough, since you don't have to "guess" at merging them, but leave it up to the user.
Wouldn't it just be a simple rename and combine of directories?
Posted: Fri May 15, 2009 11:45 am
by MrEvoMan
I am currently working on a cgi addon perl script to do event merging functions.
There are a lot of things to consider, but I'm working my way through it.
It will provide a user-selectable list of events (similar to the event window now) which you can choose from non-archived, monitor sorted events to group and merge together.
It will then handle the file merging, directory movement, database updating and make it all work.
I have the first 1/2 of it done.