Press Release

Direction Sensing in the Security Industry
By Bernie Butler-Smith, VP Engineering, ICU Security.

There are many applications in the security industry where controlling the direction of movement is critical. To name a few, examples such as access control (exit/entrance), control lanes (used in airports), traffic-monitoring (on-ramps/off-ramps) are typical applications.

Several technologies are available to determine the direction of movement of people or objects through an area. There are basically 5 categories:
1: Mechanical Turnstiles
2: Ultrasonic Doppler
3: Microwave Doppler
4: Beam Crossing Detectors
5: Video Imaging Processing

Mechanical Turnstiles have the advantage of a mechanical barrier. They prevent a person from moving in the wrong direction, by using a mechanical ratchet mechanism, allowing the flow of people in one direction only. They are used widely in entrance/exit applications. In many cases these systems, used in conjunction with some form of identification technology, restrict the access to approved personnel only in one direction. In some applications, especially in crowded areas, mechanical turnstiles become a hindrance to the flow of traffic, causing a "bottle-neck" which is undesirable.

Ultrasonic Doppler, once highly used as a motion detection device, is prone to false alarms due to wind currents, insects near the sensor, false echoes off clothing, and temperature changes. The Doppler effect can detect the direction of movement by phase and/or frequency shift of an ultrasonic sound wave being echoed off moving objects. It has become less popular due to the high false alarm rate.

Microwave Doppler uses RF energy instead of sound waves. It is the same technology used by law enforcement in some speed traps! It can be very accurate in detecting people moving towards or away from the sensor, even through walls, but is prone to false alarms caused by reflections off moving objects especially metal objects such as fans and machinery.  It is also prone to alarms caused by other RF sources in the area.

Beam Crossing Detectors use an array of optical sensors.  Each sensor detects a beam of light. A post mounted in the ground transmits the beams, and a second post receives or reflects back the beams of light to the first post. A person moving through the scene between these posts breaks the beams of light. The sequence of beams being broken determines the direction of motion. This will work well detecting one person at a time, in the restricted area between two posts only.

Video Imaging is a field I am most familiar with. Having developed several motion detection technologies in the past 12 years, I have explored several algorithms for determining direction of movement.

Algorithm 1

The first product I developed for direction sensing uses an algorithm that bounds all moving objects in the scene by a rectangle. The 4 sides of the rectangle are analyzed on a frame-to-frame basis to determine the direction of moving objects.

The scene can be masked out to ignore movement in "nuisance" areas. However, the weakness of this algorithm is in its inability to process more than 2 moving objects in the scene.

This algorithm works fine on tracking the direction of a single person, because 2 sides of the rectangle will move in the direction being sensed.

When 2 people are moving in the scene, at least one of the sides of the rectangle will sense the direction; even if the 2 people are moving towards each other or away from each other.


When more than 2 people are moving in the scene; a problem arises since a person may be moving between 2 other people in an opposing direction. This person is not sensed.

This product is therefore limited to low congestion applications only.

Algorithm 2

On the next product I used a direction algorithm. The screen is divided up into 8 user definable areas. These areas are assigned a letter from A to H. Each area processes motion independently. The direction is sensed by tracking the sequence of alarm events in the defined areas using up to 4 pairs (A>B, C>D, E>F, and G>H).


The main weakness of this system is the placement of areas. Defining the areas in a low-resolution grid of 24h x 12v, may cause a problem. First, if the areas are placed too far apart the sequence can be broken between rule 2 and 3 when there is no motion in either area A or B.  Second, if the areas are placed too close together, it is possible to trigger area A and B simultaneously especially if the moving object is large or moving too quickly. This is a catch 22 in many instances!

Another weakness is that each of the 4 pairs is not logically combined to form a redundancy verification of an event.  Each pair is processed independently.

Algorithm 3

The third algorithm I used in a product called the "Upstream" (or ExitSentry by an OEM private-label name). It calculates motion on a pixel-by-pixel basis, and uses the "brute-force" approach.  Instead of looking at objects, however, it looks at gaps between the edges of moving objects. If a moving edge is detected, it is compared with the previous frame.


Objects are separated by measuring the gaps between moving edges. If the gap is sufficient, it is considered a separate object. This gap-distance is user definable in both horizontal and vertical directions, and in most cases is set to the size of a single person.

The beauty of this algorithm lies in its ability to distinguish a single object moving "upstream" from all the other movements in the scene, even if there are hundreds of moving objects in the scene.

The isolation of an object moving in a particular direction is achieved by tagging the edges of gaps between the present (live) image and the previous (stored) image. The gaps are digitally superimposed to determine their overlap direction. The overlapped areas are accumulated throughout the image by a pixel counter. A user definable count will trigger an alarm event. The purpose of this accumulation is to prevent false triggering by small movement such as a person moving forward or swinging his arms backwards! Further filtering is performed in a convolution algorithm, which requires adjacent pixels to be triggered in an image processing technique called "blob-analysis".

An inherent advantage to this algorithm is that a person trying to move "upstream" will try to find gaps in front of him to avoid colliding into other people. This gap he finds in front of him lends to the input of the algorithm itself!

The best placement of the camera is on the ceiling looking straight down, thereby increasing the overall gap-areas between people.


Algorithm 4!

In my quest to find the "Holy Grail" of direction sensing, movement of people behind the picket fence surrounding my front yard caught my attention!  I was watching them through the gaps between the fence posts and I could perceive which direction they were walking to!  Now, what if a machine could do what my brain was doing right now?

Using a video camera to capture images is like blinking your eyes 60 times a second; so, I blinked my eyes as quickly as I could, and I still could perceive the direction! I went to my computer and figured out that regardless of how fast people move, even Olympic sprinters,  they would not be able to overlap themselves on the subsequent video images! In other words, they can not cover a distance wider than themselves in 1/60 of a second, regardless of how small or large they appear on the image.

This concept overcomes the most computationally intense task of separation of objects irrespective of their speed; so I set out to define a new algorithm. Moving objects can now be separated by capturing samples in the image separated by the width of an average person and then processing the sequence of triggering in a defined direction.

The sequencing needs to be more intelligent than a tick-list of events; because what has to be taken into account is the occurrences of erratic (intentionally or unintentionally) movement of different sizes of objects. (E.g. swaying things like a briefcase in the opposite direction of a man carrying it)

A predictive flow-chart with timed-truncation of event tracking is what this algorithm has evolved to. It is somewhere in-between fuzzy-logic, parallel processing, and neural-net processing!

This new algorithm will appear in an upcoming design, to be released by ICU Security in the near future.