← Back to Articles

Cross-Line Detector (advanced Visitors Counter)

The detector's icon

Try crossing the line and people counter will get you countedGenerally, security is particularly concerned with entrance and exit points for the guarded area, since those are easier to keep under surveillance than an entire perimeter and provide the most traffic. A particularly wide-spread method is setting lines across doorways or narrow corridors to control the number of people crossing them (or across driveways and lanes for cars) – a simple traffic counter. The method allows to both protect the area from unwanted visitors and collect statistical data, which is what makes it so popular. We’ve mentioned the topic while dealing with “Visitors Counter”, because it functions in a similar fashion. However, there are more intricate ways the same method can be applied, where this module may lack the ability to distinguish directions of line crossing. One has to admit that more often than not someone entering the area demands more attention that somebody leaving. This is where another module comes into play – “Cross-Line Detector”.

 

First of all, this module is a close friend of “Object Detector”, so the simplest chain looks like this:

Chain sample

The main principle behind this duo is simple: the first looks for objects that fit the designated size in the camera’s field of view and relays the information on their movement to the second. “Cross-Line Detector” checks whether any of those objects crossed any of the lines in the right direction.
Here are the detector’s settings:

The detector's settings

  • Counter ID sets the module’s name, this will come in handy later when it comes for logging. Note that several counters can have the same ID.
  • Interval of resetting the counter shows how often the traffic counter will start tallying anew. If no reset is required, drag the slider to the far left.
  • Show count of visitors makes “Cross-Line Detector” indicate the results on the preview in the lower right corner of the frame.
  • The drawing screen allows you to create lines by clicking and dragging. A single detector can work with as many lines as you need.
  • Selected line chooses one of the lines to apply the following 2 options:
  • Change direction switches the direction for the chosen line (bidirectional tallying works too).
  • Remove selected line deletes the chosen line.
  • Remove all lines deletes any and all lines present on the drawing screen.
  • Save data in CSV report creates a log-file that will keep the info on all the times the lines were crossed, including date, time, the counter’s name and the tally. You can give several detectors the same name (e.g. if they control the same area with different entrances and exits) to sum up their results.

Now let us look at this module’s practical applications.

Hallway

People counter example

“HTTP Marking” will enable you to search the archive for the times the lines were crossed. Here is how it works: when the “Cross-Line Detector” triggers, it activates “HTTP Request Sender”, which, in turn, instructs “HTTP Marking” to start the event. Once the object is done crossing the line, another “HTTP Request Sender” stops the event. The same system applies for the other detector, so that you could search the archive separately for different lines. When viewing the archive you will be able to go Archive menu → Search by HTTP Marking and choose the line you need – the timeline will have the right intervals highlighted. This part serves as a people counter with a smart archiving system.
At the same time, “Detector of abandoned objects” checks if anything is left motionless for too long, and if it does react to something – “Sending Email” notifies you.

Parking Lot

Traffic counter example

This chain accounts for different times of day. The top “Scheduler” works during daytime and allows “Cross-Line Detector” to count cars entering and exiting the lot. “Object Detector” is set to react only to car-size objects, as we don’t want a people counter here. “ANPR” is connected to an external database with license plates belonging to cars known to infringe regulations – those are given special attention and reported by “HTTP Request Sender”.
The bottom “Scheduler” works during nighttime and enables the “Motion Detector”, which, in turn, uses “Sound Alarm” to notify security personnel and keeps a separate archive for detected motion.

A smart traffic counter yields a lot of benefits and works as a reliable part of security.

April, 16 2018

Read also:
Safe City
Video surveillance system in the parking space
Recreation department: provide security