All, i’ve been asked by many recently to help explain the various recording related verbiage / variables featured in cams and specifically the Dahua NVRs. I’ve also received and seen a lot of questions / posts about Motion Detection, specifically ‘why is Motion Detection performance poor, why am I missing start/end of motion, how do I improve it, how does it work ?’ along with being asked why do I and many others here recommend AGAINST using it.
So as a number of these variables also relate to Motion Detection, I thought I would attempt to tackle these areas and more with this post in efforts to assist. I saw ANR mentioned in cliff notes but believe the others I didn’t see there so if this helps people maybe elements from this post could be added.
I’ve setup some mock configs and captured screen grabs to illustrate these menu items and settings for the variables I list below. Please note, some of these variables are industry standard and others are specific to certain manufacturers (Dahua, Hik etc). Posting in the Dahua forum for now.
Ok, large post incoming, let’s go:
Motion Detection - Example of How It Works & How The Variables Above Factor In
Remember that the variables above work in conjunction with each other and can trip you up if you don’t use correctly. Let’s go through a Motion Detection example. For the record I do NOT advocate Motion Detection at all and instead would ALWAYS recommend a combination of Continuous Recording + IVS rules.
First, if you are using super tight or worse yet, restricted FOV’s (those with small sections of an image reserved for MD) and/or have high speed of target in the FOV, never use MD, as you’ll most likely miss the majority of targets. If you are able to capture motion with super tight FOV’s using MD then likely your threshold and sensitivities are so low & high (respectively) that you are capturing every little movement which is not good and if you want that……….USE CONTINUOUS
However, lets now assume for a second that the cam does detect motion, then you have to factor the application of the variables above. Lets walk through it. MD is seen so starts for a minimum of 5 seconds (anti dither default) then if no further motion is detected (i.e. motion stops within the default time), applies any post record and record delay before the camera is ‘ready’ to wrap up the clip and look for any new events. IMPORTANT NOTE 2: As I noted above remember that when using in-cam recording, Record Delay is built into the recording in a similar way to Post Record on an NVR. So lets breakdown what this sample event would look like:
If just using MD then this would result in 1 clip and the cam would not be ready for the next event until the end of this time.
IMPORTANT NOTE 3: If you set your NVR for Continuous + MD or Continuous + MD + IVS, although you may feel that the trifecta of these ensures a capture, the problem in reality is spill over of events into record types, this can lead to MD clips with a cutoff start or end etc and in some cases leads to a mis-cap altogether. Again, I (like others) always recommend Continuous + IVS (no anti dither & no post record delay settings) as this ensures cleaner caps in separated files. IF you must use Motion Detection then try to avoid using it with any other form of recording or you run the risk I mentioned above.
What About AI - How Does It Detect & Process Objects
This is an area that generates a lot of misconceptions on what it should and should not capture therefore its important to understand how AI works in cam. Lets look at ANPR for example. In ANPR supported NVRs or cameras (supported, not dedicated traffic cams), the camera has to detect a target (using SOC based AI algorithms), identify it as a vehicle before it will then process for a plate.
A lot of times people may ask ‘why did I not get a plate hit on an ANPR cam when I see the car/plate on screen ?’. Well, depending on angle, distance to target, height, speed of target etc, IF the cam cannot detect a vehicle it will never process for a plate. Good example of this is night shots for ANPR, black screen, 2 seconds of bright plate flying by = not enough for processing. Think of ANPR as applying 2 stage AI, 1) Object Filtering of Vehicle first (has to detect a target as a vehicle) then 2) applying AI processing for plate within the real-time cap, which is why its important to configure an ANPR environment correctly. In this example with regular (non automated license plate processing) you may be lucky and depending on fps be able to grab a manual usable plate frame but again for ANPR the cam would never have detected a vehicle so would not start looking to process a plate.
Same goes for Object Filtering in general. Great addition to a lot of Dahua cams in the Pro AI range but remember the cam has to detect the object you've selected (Vehicle, Non-Vehicle, People) first and do that in the FOV you’ve created. So cut it some slack when you’re FOV is the size of a postage stamp due to extreme zoom
This is why it’s so important to get install locations right, understand time on screen for a target, within that, overlay FPS to truly give you an idea of how many frames your cam might actually grab and finally dialing your image within FOV specifically for the target capture zone and the desired end result. These are critical steps and if you take these into account along with the recording functions, variables above (where applicable), understand your equipment, special features such as AI and how those work, you should see higher success in caps and installs.
As always, please reach out with any questions etc and always review the great Cliff Notes
Hope this helps
So as a number of these variables also relate to Motion Detection, I thought I would attempt to tackle these areas and more with this post in efforts to assist. I saw ANR mentioned in cliff notes but believe the others I didn’t see there so if this helps people maybe elements from this post could be added.
I’ve setup some mock configs and captured screen grabs to illustrate these menu items and settings for the variables I list below. Please note, some of these variables are industry standard and others are specific to certain manufacturers (Dahua, Hik etc). Posting in the Dahua forum for now.
Ok, large post incoming, let’s go:
- ANR - Automatic Network Recovery - Ability to have a cam write to local SD card (if installed) if network connect is interrupted to NVR. Once NVR connection is resumed the NVR will re-poll the cam for video and pull back to the NVR.
- Anti Dither (Tied to Motion Detection) - This is the amount of time allowed between 1 motion event and another. Defaults to 5 seconds which means that 1 motion event is ‘allowed’ every 5 seconds and is wrapped in 1 clip. Important to remember that Record Delay factors into this. I’ll explain more in an example below. However, on top of this remember that you also have Sensitivity & Threshold settings within the Motion Detection Area selection options. All of this plays into how and when MD activates and when it will detect a target on scene. MD is now also augmented by SMD (Smart Motion Detection) which while very cool, adds a layer of object filtering to MD but also another Sensitivity layer setting that should be dialed in if using this.
- Pre Record / PR - Amount of buffer that is recorded before an event IF a target is detected. NVR and cams are separate here so if you use an SD card in cam, the settings from the connected NVR (Dahua in this example) will NOT propagate the camera Pre Record. In Dahua cams you will find this in the web GUI within Storage, Record Control Menu. In Dahua NVRs (running 4.0) you’ll find this in Storage, Schedule, Record menu and can set for all channels or individual ones.
- Pre Event Record - same as pre record on NVR this is just for local (SD card) storage options on a Dahua cam. Again found in Storage, Record Control menu of the camera web GUI
- Post Record buffer. This is the amount of ‘extra’ time (in seconds) that you want to continue recording after an event. Generally not used as much due to events recording until a target (defined when using IVS, Object filtering etc) has left the rule / area. However if you are using MD and do want to set this you can do so in Dahua NVRs (running 4.0) in the Alarm, Video Detection menus. TIP: This is called Record Delay in cam. See below
- Record Delay - In camera web GUI. This is the amount of time between ending recording of an alarm or event before the cam / NVR will record the next one. IMPORTANT NOTE 1: When using this feature in cam and writing to SD card, the Record Delay time (10s default) is added onto the end of the recording similar to Post Record buffers above.
- Pack Duration - the largest amount of time (or file size*) that events can occupy 1 file before a new one is written / file is split. This is found in Storage, Record Control menu of Dahua cams. This is the equivalent of Create Video Files = Time Length / File Size on the NVRs running 4.0 located in the Storage, Basic menu. * File systems limits observed of course
Motion Detection - Example of How It Works & How The Variables Above Factor In
Remember that the variables above work in conjunction with each other and can trip you up if you don’t use correctly. Let’s go through a Motion Detection example. For the record I do NOT advocate Motion Detection at all and instead would ALWAYS recommend a combination of Continuous Recording + IVS rules.
First, if you are using super tight or worse yet, restricted FOV’s (those with small sections of an image reserved for MD) and/or have high speed of target in the FOV, never use MD, as you’ll most likely miss the majority of targets. If you are able to capture motion with super tight FOV’s using MD then likely your threshold and sensitivities are so low & high (respectively) that you are capturing every little movement which is not good and if you want that……….USE CONTINUOUS
However, lets now assume for a second that the cam does detect motion, then you have to factor the application of the variables above. Lets walk through it. MD is seen so starts for a minimum of 5 seconds (anti dither default) then if no further motion is detected (i.e. motion stops within the default time), applies any post record and record delay before the camera is ‘ready’ to wrap up the clip and look for any new events. IMPORTANT NOTE 2: As I noted above remember that when using in-cam recording, Record Delay is built into the recording in a similar way to Post Record on an NVR. So lets breakdown what this sample event would look like:
In-Camera Recording
Motion Detected so the following kicks in:
+5s (Pre Record)
+5s (Anti Dither) - Leads to minimum recorded time for any motion 5s or under
+10s (Record Delay)
=20 seconds total recording
If just using MD then this would result in 1 clip and the cam would not be ready for the next event until the end of this time.
IMPORTANT NOTE 3: If you set your NVR for Continuous + MD or Continuous + MD + IVS, although you may feel that the trifecta of these ensures a capture, the problem in reality is spill over of events into record types, this can lead to MD clips with a cutoff start or end etc and in some cases leads to a mis-cap altogether. Again, I (like others) always recommend Continuous + IVS (no anti dither & no post record delay settings) as this ensures cleaner caps in separated files. IF you must use Motion Detection then try to avoid using it with any other form of recording or you run the risk I mentioned above.
What About AI - How Does It Detect & Process Objects
This is an area that generates a lot of misconceptions on what it should and should not capture therefore its important to understand how AI works in cam. Lets look at ANPR for example. In ANPR supported NVRs or cameras (supported, not dedicated traffic cams), the camera has to detect a target (using SOC based AI algorithms), identify it as a vehicle before it will then process for a plate.
A lot of times people may ask ‘why did I not get a plate hit on an ANPR cam when I see the car/plate on screen ?’. Well, depending on angle, distance to target, height, speed of target etc, IF the cam cannot detect a vehicle it will never process for a plate. Good example of this is night shots for ANPR, black screen, 2 seconds of bright plate flying by = not enough for processing. Think of ANPR as applying 2 stage AI, 1) Object Filtering of Vehicle first (has to detect a target as a vehicle) then 2) applying AI processing for plate within the real-time cap, which is why its important to configure an ANPR environment correctly. In this example with regular (non automated license plate processing) you may be lucky and depending on fps be able to grab a manual usable plate frame but again for ANPR the cam would never have detected a vehicle so would not start looking to process a plate.
Same goes for Object Filtering in general. Great addition to a lot of Dahua cams in the Pro AI range but remember the cam has to detect the object you've selected (Vehicle, Non-Vehicle, People) first and do that in the FOV you’ve created. So cut it some slack when you’re FOV is the size of a postage stamp due to extreme zoom
This is why it’s so important to get install locations right, understand time on screen for a target, within that, overlay FPS to truly give you an idea of how many frames your cam might actually grab and finally dialing your image within FOV specifically for the target capture zone and the desired end result. These are critical steps and if you take these into account along with the recording functions, variables above (where applicable), understand your equipment, special features such as AI and how those work, you should see higher success in caps and installs.
As always, please reach out with any questions etc and always review the great Cliff Notes
Hope this helps