← Back to Articles

Cross-Line Detector (advanced Visitors Counter, or Tripwire)

The Cross-Line 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”.

 

This module is sometimes also called a ‘tripwire’ for it basically does the same – detects someone crossing a line.

The main principle behind its work is that it gets information about objects that fit the designated size in the camera’s field of view or looks for them itself. “Cross-Line Detector” checks whether any of those objects crossed any of the lines in the right direction.

Depending on the types of objects that you’d need to detect crossing a virtual line, the ‘Cross-Line Detector’ can work in combination with various modules, and its detection accuracy will also depend on what module gives it the information about objects.
1. ‘Cross-Line Detector’ has embedded tracker of most popular objects – people and cars – so if you need to track their crossing the line, you can use ‘Cross-Line Detector’ by itself and connect it to Universal Camera and to destination modules with no intermediary filter modules and activate the “Use object recognition” option.
2. If you’re looking for people or cars that cross the drawn lines but need more accuracy, you can put a “Face Recognition” module into the chain before “Cross-Line Detector” that will detect and send to ‘Cross-Line Detector’ only episodes with people in sight, – or an “ANPR” module that will only push video stream with cars to ‘Cross-Line Detector’.
3. If you’d like to tripwire other types of objects, connect an “Object Recognizer” module that can recognize birds, animals, drones, etc too before the ‘Cross-Line Detector’. The latter will then receive information from the former and will only react if the selected objects types are trespassing the line.

4. If it is the arrival of a truck with a certain number in the unloading area that you’d like the system to recognize, you can use the “Cross-Line Detector” with the “Text Recognition” module, in the settings of which it is selected to respond to certain numbers or letters.

5. The “Cross-Line Detector” is also combined with the “QR Code Recognition” module, so you can, for example, count incoming people with QR code badges, or keep track of the number of products on the conveyor that have barcodes on the label.

6. And if you’d like to get reaction to any types of objects crossing the lines you’ve drawn, place the “Object Detector” there, so the simplest chain looks like this:

Chain sample

Important advice from Xeoma Starting with Xeoma 23.3.22 the Cross-Line Detector has a new option to display statistics of line crossing for a specified period. The calculation is based on module’s CSV reports.

Here are the detector’s settings:

Cross-line Detector's settings

  • Use object recognition – allows the module to recognize people and cars autonomously (without using additional modules).
  • 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.
  • Visitors counting method – allows you to switch between two available visitors counting methods. “One-direction counting” allows to count the number of people who have crossed the line in the direction of the arrow. In this case only the “Incoming” index will be calculated in statistics. “Two-direction counting” allows to count people who have crossed the line in the direction of the arrow and in the opposite direction. Crossing the line in the direction of the arrow is counted in the “Incoming” index, in the opposite direction – in the “Outgoing” index. The number of lines doesn’t affect the counting principles. For instance, if you add two lines and select “One-direction counting”, crossing any of those lines will be counted in the “Incoming” index.
  • Trigger type – allows you to switch between 2 types of triggering: Trigger when an object touches the line and trigger when an object completely crosses the line.

Cross-line Detector's settings

  • 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.
  • Time of first reset – defines the time when the visitors counting statistics will be reset for the first time. The subsequent resets will be counted from the first one, according to the selected reset interval.
  • Show count of visitors makes “Cross-Line Detector” indicate the results on the preview in the lower right corner of the frame.

Cross-line Detector's settings

  • 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 allows you to select one of the lines in order to determine the destination filter which will be triggered when the line is crossed (see the details below) and to apply one of 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.
  • Destination filter – allows you to select a module which will be triggered, if 2 or more modules are connected in parallel after the “Cross-line Detector” module.
  • Select the time range to show statistics for – defines the period of time for which the statistics will be displayed.

Cross-line Detector's settings

  • 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.
  • Post-record – defines the time during which the following modules will keep triggered after the line is crossed. This option may be useful to record archive by line crossing (when the “Preview and Archive” module is connected after the “Cross-line Detector” module). This way you can continue recording the archive during the specified time after the line is crossed.
  • Lifetime of an object since its last appearance – defines the time during which Xeoma will consider an object in the frame the same object. In other words, this parameter defines the time during which a person in the frame will be considered the same person. The increase of this parameter leads to the decrease of the number of false alarms, when the same person crosses a line in the same direction several times.

 

Important advice from Xeoma Beginning with Xeoma 23.12.5 there is an option to select the module which will be triggered after each of the lines in “Cross-line Detector” is crossed.

To activate this option, add 2 or more lines in the “Cross-line Detector” module’s settings and connect 2 or more modules after the detector in parallel. Select the desired line in “Selected line” menu item and then select a module which will be triggered if the selected line is crossed in the “Destination filter” menu item.

Simple module chain

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” tripwire module 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, updated December 14, 2023

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