Merge Events Option
Merge Events Option
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.
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.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
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
Phil
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
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.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.
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.
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
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
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
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.
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.
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
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.
I do need to get on with this feature as I think it would be useful though.
Phil
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.
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.