Feed Events into Motion Detection w/Custom Zone Definition
Feed Events into Motion Detection w/Custom Zone Definition
I had an idea while watching video the other day. If I'm correct in my thinking of how ZoneMinder is built, this may be little more than pasting different chunks of the system together in a new way.
A vehicle on our lot got keyed badly and there was a camera 10 feet away. However, since I have the cameras continually recording in 5 minute chunks and did not know the exact time of the vandalism, I had to sit through hours of video played at 10x watching for somebody to go near the vehicle in question, then slow it down and see if they did anything. (Unfortunately, I didn't archive far enough back and the events were overwritten before I realized that it happened earlier than I thought. ) Motion detection produces too high of a load to use on all the cameras all the time, which is why I have the cameras set to continually record.
Anyways, I'd like to create a custom zone definition. This could probably be done with the existing zone definition code. I would use this to define where I'm looking for motion. ie - near the back of the tailgate where the paint was destroyed.
Then, I'd like to be able to feed selected events into any of the zone definitions that I've created and have the system examine the events using the existing motion detection code to determine which ones have motion in the specified zones.
Afterwards, the events with motion in them should be flagged somehow and presented for review. This would eliminate my having to watch hours of video when only half a dozen events have anything happening in them (people walking by, etc).
What do you think?
A vehicle on our lot got keyed badly and there was a camera 10 feet away. However, since I have the cameras continually recording in 5 minute chunks and did not know the exact time of the vandalism, I had to sit through hours of video played at 10x watching for somebody to go near the vehicle in question, then slow it down and see if they did anything. (Unfortunately, I didn't archive far enough back and the events were overwritten before I realized that it happened earlier than I thought. ) Motion detection produces too high of a load to use on all the cameras all the time, which is why I have the cameras set to continually record.
Anyways, I'd like to create a custom zone definition. This could probably be done with the existing zone definition code. I would use this to define where I'm looking for motion. ie - near the back of the tailgate where the paint was destroyed.
Then, I'd like to be able to feed selected events into any of the zone definitions that I've created and have the system examine the events using the existing motion detection code to determine which ones have motion in the specified zones.
Afterwards, the events with motion in them should be flagged somehow and presented for review. This would eliminate my having to watch hours of video when only half a dozen events have anything happening in them (people walking by, etc).
What do you think?
This message is made up of not less than 90% recycled electrons.
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
I think this is already in hand as i saked for it about a year ago ish i will look now
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:
Effectively you are asking about retrospective motion detection? If so then this is on the to do list, but is not trivial to implement, mostly in terms of what to do with the results (ie can you have two events from the same cam in the same timespan?).
Onto your other point, it can sometimes be quicker to use the timeline view for long event reviews if you are on the same LAN as your ZM box. Just move your mouse back and forth along the event strip and you can relatively quickly flip back and forth along events.
Onto your other point, it can sometimes be quicker to use the timeline view for long event reviews if you are on the same LAN as your ZM box. Just move your mouse back and forth along the event strip and you can relatively quickly flip back and forth along events.
Phil
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
regarding this motion thing phil, I assumed it would work like:
Set start and end times ie 00:00:00 1/1/2000 to 18:00:00 1/1/2000
set zone and sensitivity on image like we do now
then run filter
All images returned could be clicked on like the frame view now
I thouht if it could be passed vi http i could also do this with zm4ms and then playback the results at whatever speed via the data returned as that would give me recorded imgae paths
Set start and end times ie 00:00:00 1/1/2000 to 18:00:00 1/1/2000
set zone and sensitivity on image like we do now
then run filter
All images returned could be clicked on like the frame view now
I thouht if it could be passed vi http i could also do this with zm4ms and then playback the results at whatever speed via the data returned as that would give me recorded imgae paths
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
I was envisioning this feature would work similarly to what James described:
I use the existing filter mechanism to obtain a set of events that I'm interested in. I then define a zone with the sensativity settings and the like and then feed the set of events into the motion detection function using this zone definition. The computer chews on the video for a while and the set of events that have motion in them is shown in a list just like when the filter mechanism is used. (The entire event wouldn't even need to be analyzed; once motion is detected, the rest of the event can be ignored. For example, if an event is 5 minutes long and motion is detected 1 minute into it, the remaining 4 minutes could be skipped; the event would be included in the result set.) I could then go over this set of events and look for what I'm interested in.
As I was writing this, I had another thought. I was originally thinking of a button or link on the filter results page that would accomplish this, but this feature could be built into the filtering routine and interface. I understand that the current filtering UI is basically doing little but providing an easy way for users to build a SQL statement, but perhaps having another option like 'Has motion in' and a list of pre-defined zones to run the motion detection routines on the selected events? This definitely would be more difficult than making a standalone function for this purpose, but would integrate more seemlessly with the rest of the package.
I use the existing filter mechanism to obtain a set of events that I'm interested in. I then define a zone with the sensativity settings and the like and then feed the set of events into the motion detection function using this zone definition. The computer chews on the video for a while and the set of events that have motion in them is shown in a list just like when the filter mechanism is used. (The entire event wouldn't even need to be analyzed; once motion is detected, the rest of the event can be ignored. For example, if an event is 5 minutes long and motion is detected 1 minute into it, the remaining 4 minutes could be skipped; the event would be included in the result set.) I could then go over this set of events and look for what I'm interested in.
As I was writing this, I had another thought. I was originally thinking of a button or link on the filter results page that would accomplish this, but this feature could be built into the filtering routine and interface. I understand that the current filtering UI is basically doing little but providing an easy way for users to build a SQL statement, but perhaps having another option like 'Has motion in' and a list of pre-defined zones to run the motion detection routines on the selected events? This definitely would be more difficult than making a standalone function for this purpose, but would integrate more seemlessly with the rest of the package.
This message is made up of not less than 90% recycled electrons.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Interesting. I am getting an idea of a simpler way to do this now. As you say, if it done in the filters then that is sensible. Plus if an additional zone type, say called 'PostProc' is allowed, then this can be defined but not used in normal operation. With a filter action of 'Post Process' (filter actions are being added anyway) it would chunder off and look through the events as you have described.
The fiddly bit in a way is what is each image compared to in order to detect motion. You would need to be able to specify a reference image to start with at least and this image may not be valid for day times and night times. Unless the reference is just a blend of all images in the comparison set.
The fiddly bit in a way is what is each image compared to in order to detect motion. You would need to be able to specify a reference image to start with at least and this image may not be valid for day times and night times. Unless the reference is just a blend of all images in the comparison set.
Phil
Assuming that all the images are from the same monitor, why not start with the image of the first frame captured in the first event as the reference image and do the normal blending from there?
An internal design issue that I'm sure you've already thought about is that all the other filters should be applied to shrink the event set *before* the motion detection is done in order to shorten the time it takes to do the motion detection.
If this is added, I may finally have to learn how to make zones that aren't triggered by anything and everything.
An internal design issue that I'm sure you've already thought about is that all the other filters should be applied to shrink the event set *before* the motion detection is done in order to shorten the time it takes to do the motion detection.
If this is added, I may finally have to learn how to make zones that aren't triggered by anything and everything.
This message is made up of not less than 90% recycled electrons.
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
I agree why cant it be compared to the previous image, how does zm handle day and night now?
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:
The reference image is continuously updated, using the reference blend percentage. So each frame contributes say 10% to the reference frame, but this %ge decreases with time.
The issue with just blending images in thsi case is that it is probably running on images with unusual captures already (as they are events) and so the reference may not include the normal long periods of nothing happening in between.
I think the answer, as with most of these things, is to let the user choose how they want it done. So make it an option
The issue with just blending images in thsi case is that it is probably running on images with unusual captures already (as they are events) and so the reference may not include the normal long periods of nothing happening in between.
I think the answer, as with most of these things, is to let the user choose how they want it done. So make it an option
Phil
Ahhhh... I wasn't thinking enough. I have ZoneMinder configured to continually record in 5 minute chunks, so I was looking for something to do motion detection on those events. I didn't think that most people probably use motion detection and therefore would have motion in their events to begin with.
This message is made up of not less than 90% recycled electrons.
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
mw too i use mocord or record so that would work, i forgot about modect
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