With the release of Nx Witness 4.1, Nx Desktop users can configure a new component of 3rd party video analytics called Region of Interest (ROI). ROIs on a camera allow you to specify special regions of a video frame.
ROIs can be used for optimizing resources for processing and analyzing video and creating perimeters for intrusion detection by drawing lines and allowing the specification of direction. ROIs can be configured differently for each individual camera to respond to various spatial triggers.
What are ROIs?
A Region of Interest (ROI) is a frame-related setting that is used by analytics engines to mark a specific part of the video stream. This can be to focus on a region, to create conditions for an event trigger, etc. It is drawn by the user and can take the shape of an area, box, polyline, or line.
ROI settings can be found in Nx Desktop through a camera’s plugin settings where you can define the regions. The settings are passed to the plugin when OK or Apply is pressed in the plugin settings window.
For ROI regions to be shown on the camera stream within Nx Desktop, two conditions must be met:
- The option “Display on video”, located under where you define the region in the plugin settings, must be checked to see the visible regions.
- The Objects tab in the Notification panel must be selected.
The image below is an example of what the ROI settings look like, using the standard stub_analytics_plugin.dll — which can be found in
- Level of detection — Threshold that needs to be passed for changes to be considered motion.
- Sensitivity — Camera's sensitivity to motion.
- Minimum duration(s) — Minimum amount of time that needs to pass.
For more information on the settings model, see src/nx/sdk/settings_model.md and samples/stub_analytics_plugin/src/nx/vms_server_plugins/analytics/stub/settings_model.h in the Metadata SDK.
An area is polygon-shaped and allows for the most customization in terms of size and shape of the detection area.
Example (note the slanted sides):
A box is rectangle-shaped and is commonly used for doors, doorways, windows and for specifying a region of the video to process for analytics.
Example (note the straight sides):
A line is a simple line segment that can vary in length and offers the ability to detect motion dependent on the direction it came from.
A polyline allows you to draw broken lines. This is useful if the same event processing is required for a large number of lines.
Real World Use Example
One example of a system benefiting from ROI is an ATM camera. ROI can be utilized to detect a person standing in front of an ATM longer than X seconds. This would then trigger a sequence of events, starting with the system receiving a notification of possible fraudulent activity taking place.
The system could then check to see if a valid transaction is happening at the same time. It can either ignore it, or it can flag the instance and send a notification for review. The person reviewing the instance would then be able to check when the incident occurred and for how long. The same situation could apply to a vehicle at an ATM as well.
How to use ROIs?
ROI Best Practices
- Implement as many events as you can. A common list is: line crossing, area intrusion, loitering (hanging out in the zone for a long time).
- Use ROI to limit the frame where video processing happens to optimize resources.
- Set the name of the area/line in the caption or description field of the event so that users can create different rules for different situations.
For more information regarding ROIs, check out our Stub Analytics Plugin example in the Metadata SDK.
Next article in Integrating Video Analytics: Integrating with Face Recognition