AXIS Random Selector

Solution overview

An overview of the different devices, applications, and tools needed for a complete system.

AXIS Random Selector

AXIS Random Selector is an analytic application that can be installed on a network camera. The application detects when someone is leaving the premises and randomly determines if that person should be scheduled for inspection or not.

The selection of individuals to be inspected is done at random, eliminating any bias in delicate situations which in turn reduces employee discomfort. If an individual is selected for inspection, the application triggers an alarm to notify the person responsible for the inspection.

AXIS Random Selector includes AXIS People Counter functionality.

Mount the camera

NOTICE

The application is designed for scenarios where it counts objects with the characteristics of an adult person. The exact height limitation of the object depends on camera model, camera lens, and the selected counter sensitivity.

In addition to the instructions in the camera’s Installation Guide, there are some important steps to follow for the application to behave in the expected way:

  • We recommend that you install the camera at a minimum height of 270 cm (8.9 ft).

  • As a rule-of-thumb, the camera covers an area as wide as the camera’s mounting height. For details about a specific camera model, see the Camera selector for AXIS People Counter

  • After installation, the covered area can be increased depending on the camera’s zoom setting.

  • If the camera is mounted high enough, you can get a coverage width of 8 meters. You can cover even wider entrances by using multiple counters.

  • The camera must be mounted straight above the point where people pass.

  • Make sure the camera is facing straight down, in line with the ceiling.

  • If you install the application before you install the camera, you can use the counting area indicated in the live view to position the camera. The counting area should go from left to right, perpendicular to the path where people cross.

  • Make sure there is sufficient white light or IR illumination on site.

  • Make sure that there are no continuously moving objects in the counting area. For example, do not install the camera above an escalator.

  • Make sure there are no moving objects interfering in the counting area. For example, do not install the camera too close to a door.

  • Avoid getting very strong light, like sunlight, and sharp shadows in the camera view.

Find the device on the network

For more information about how to find and assign IP addresses, go to How to assign an IP address and access your device.

Access the device

  1. Open a browser and enter the IP address or host name of the Axis device.

    If you do not know the IP address, use AXIS IP Utility or AXIS Device Manager to find the device on the network.

  2. Enter the username and password. If you access the device for the first time, you must set the root password. See Set a new password for the root account.

  3. The live view page opens in your browser.

Secure passwords

Important

Axis devices send the initially set password in clear text over the network. To protect your device after the first login, set up a secure and encrypted HTTPS connection and then change the password.

The device password is the primary protection for your data and services. Axis devices do not impose a password policy as they may be used in various types of installations.

To protect your data we strongly recommend that you:

  • Use a password with at least 8 characters, preferably created by a password generator.

  • Don’t expose the password.

  • Change the password at a recurring interval, at least once a year.

Set a new password for the root account

Important

The default administrator username is root. If the password for root is lost, reset the device to factory default settings. See

Support tip: Password security confirmation check
  1. Type a password. Follow the instructions about secure passwords. See Secure passwords.

  2. Retype the password to confirm the spelling.

  3. Click Create login. The password has now been configured.

Install the application on the camera

Note
  • The license is only valid for one camera. You can’t activate the license on another camera without a new registration key.
  • To install applications on the camera you need administrator rights.
  1. Install the camera on your network..

  2. Go to the camera’s web interface in your browser, see the user manual for the camera.

  3. Go to Apps.

  4. Upload the application file (.eap) to the camera.

  5. Activate the license. If you’re online, enter the license code. The application automatically activates the license.

How to activate the license when you’re offline

  1. To activate the license when you’re offline, you need a license key. If you don’t have a license key on the computer, do the following:
  2. Go to www.axis.com/applications

  3. Go to License key registration. You need the license code and the Axis device serial number.

  4. Save the license key file on the computer and select the file when the application asks for it.

Access the application settings

  1. In the camera’s web interface, go to Apps, start the application and click Open.

Additional settings

Set the date and time

The date and time settings are important for your camera to keep the correct time for a longer period of time, and for the statistics to be attributed to the correct time. You set the date and time in the camera’s web interface.

  1. In the camera’s web interface, go to System > Date and time.

  2. For more information about date and time settings, click .

Create a user account

You can create user accounts with different privileges, so that unauthorized staff can view statistics but not change any settings of the counter.

You create user accounts in the camera’s web interface.

  1. In the camera’s web interface, go to System > Users.

  2. For more information about user accounts, click .

Set up the counter

To check if the application is calibrated for your camera, go to the Camera selector for AXIS People Counter tool.

  1. In the application’s web interface, go to Settings > General.

  2. Make sure Status is on.

  3. In the Name field, type the name of the camera or location.

    This can be for example “Axis_Main_entrance_T_building”. All cameras need to have unique names.

  4. Set Calibration mode. Do one of the following:

    • If the application is calibrated for your camera, select Height setting. Type the mounting height in the Visual height field.

    • If the application is not calibrated, select Manual setting and click Setup. Place a person underneath the camera and adjust the size of the yellow box so that it covers just one person.

  5. If you need to zoom in, do one of the following:

    • Turn on Digital zoom and click Setup.

    • If the camera has optical zoom, you need to go to the camera’s web interface to adjust the zoom.

  6. Set Direction in to Up or Down, depending on the direction of the people passing by in live view.

  7. To adjust the counting area, go to Adjust the counting area.

Adjust the counting area

Note

The camera model and the mounting height both limit how much you can adjust the counting area.

In the live view image, the counting area is indicated by two blue lines and a red area. A person needs to pass through the red area to be counted.

Use the curvature settings to change the shape so that it is natural for people to pass through the counting area. Keep the curvature as close to a straight angle as possible.

  1. Go to Settings > Counting zone.

  2. To move the entire counting area up or down, use the Line offset slider. How much you can move it depends on the counting area size.

  3. To adjust the height of the counting area, use the Counting zone height slider.

  4. To adjust the width of the counting area, use the Counting zone width slider. How much you can adjust it depends on the camera’s mounting height.

  5. To use a curved counting area, select Curved line and then adjust the radius with the Radius slider.

  6. To change the direction of the curvature, click the Radius icon.

  7. Click Submit to save the settings when you are done.

  8. You might need to fine-tune the counter for the best possible performance, see Validate the system.

Neighbor counters for wide entrances

NOTICE

You can only use this feature with cameras of the same model.

If you need to cover a wide entrance with several counters you can set up multiple cameras, also called Neighbor counters. To calculate how many cameras are needed to cover the entire width of the entrance, use the Camera selector for AXIS People Counter.

The primary camera overrides the following settings on the secondary cameras:

  • Visual height

  • Counter sensitivity

  • Digital zoom

  • Network & time

  • Line offset

  • Counting zone height

  • Counting schedule

Configure neighbor counters

  1. Mount the cameras side by side following the measurements indicated by the camera selector tool.

  2. Go to the primary camera application web interface and select Settings > Advanced > Neighbor counters.

  3. Select Enable as primary.

  4. If you have a secondary camera that you want to connect to:

    1. Go to the secondary camera.

    2. Go to Advanced > Neighbor counters.

    3. Select Display connection key

    4. Click Copy connection key.

    5. Return to the primary camera.

    6. Paste the text under Connection key.

  5. Note

    If you don’t have a secondary camera, you can leave the Connection key field empty.

  6. Note

    If the cameras are configured to send data to AXIS Store Data Manager, make sure that only the primary camera is connected. The primary camera automatically uploads the data from all the secondary cameras as one single unit.

  7. Click Submit.

  8. When you have connected all cameras, go to Calibrate secondary position.

  9. Place an object, for example a sheet of paper, at the exact mid-point between the two cameras. It’s very important that you place the object exactly in the middle of the two cameras since the object is used as a reference point to calibrate the cameras.

  10. Drag the view of the secondary camera over the primary camera view. Try to avoid vertical offset.

    1. Primary camera view
    2. Secondary camera view
    3. Reference object
  11. Once the calibration is done, go to Live view in the primary camera to view all of the secondary cameras.

If you can’t see the video stream from the secondary cameras in the primary camera, make sure that there are no other connections to the secondary cameras running.

How to trigger an event

  1. Go to Settings > AXIS Random Selector.

  2. Move the slider to set the frequency of random inspections, for example one out of a hundred people.

  3. Go to the camera’s webpage to access the event system.

  4. In the event setup, use the trigger Applications.

  5. You can select if the people should be inspected on their way in to the building or on their way out, or in both directions.

  6. Follow the built-in instructions to set up the event in the camera.

Set up a schedule

The application automatically disables the counting functionality when it gets dark. If you want to limit the counting further, you can set up a schedule.

  1. Go to Settings > Counting schedule.

  2. To adjust start and stop times, move any of the sliders. To set individual schedules for each day of the week, select Per day schedule and then move the corresponding sliders.

Turn off the application on a specific day of the week

Clear the checkbox next to the slider.

Anonymize people

You can configure the application so that people can no longer be identified from the camera.

Anonymize soft

This feature blocks all video streams and images from the camera. The live view still shows a blurred image which means you can still see what is going on but you can't identify people.

  1. Go to Maintenance > Anonymize.

  2. Click Anonymize soft.

  3. To go back to normal mode, click Reset anonymization. Only users with an administrator account can do this.

Copy the application settings to another camera

Use the copy functionality if you want to copy the application settings to, for example, other cameras in the same store with the same mounting height. Camera-specific settings, such as the application license and camera name, are not included.

  1. To copy the application settings, go to Maintenance > Parameter backups.

  2. Click Copy. The computer saves the file in your browser’s default folder for downloads.

Validate the system

Note

Before you validate the system, make sure you have mounted the camera according to the recommendations. See Mount the camera.

When you have installed and set up all cameras in the building, we recommend that you validate the accuracy and fine-tune the system. This is likely to increase the accuracy or identify any problems with the counters.

To get an overview, go to Statistics and look at the counting data for a couple of days back. If the difference between number of persons going in and out is <5% it’s a good first indication that the system is configured correctly.

If the difference is greater than that, follow the instructions inValidate the counter.

Validate the counter

  1. Go to Live view.

  2. Click Test accuracy.

  3. To hide the automatic counter, click Hide.

  4. Click Start and manually count 100 or more passages by pressing the up and down arrows on your keyboard. You can also click In and Out.

  5. If you need to start over, click Reset.

  6. Click Result when you are done.

  7. Check the accuracy table. Under normal circumstances, the total accuracy percentage should be 95 % or higher.

If you’re not satisfied with the accuracy of the counter, see Fine-tune the counter.

Fine-tune the counter

  1. Make sure the camera is mounted according to the instructions in Mount the camera.

  2. Go to Settings > General.

  3. Go to the Counter sensitivity slider, or click Setup if the counter is running in manual mode, and do one of the following:

    • If the counter is counting too many compared to the control figure, decrease the counter sensitivity with about 20 units or increase the size of the yellow box slightly.

    • If the counter is counting too few compared to the control figure, increase the counter sensitivity with about 20 units or decrease the size of the yellow box slightly.

  4. Validate the accuracy again, see Validate the counter.

Statistics

There are several ways to use the statistics from the counter:

  • In the application’s web interface, view real-time counting data in the built-in graphs.

  • View built-in graphs in day and week view from the statistics page. The data is updated in real time.

    Data is available on the camera for up to 90 days and updated every 15 minutes. The data is stored in 15-minute bins representing the in and out counts for the 15-minute periods.

  • Download data through an open API. See VAPIX® Library.

  • Use AXIS Store Data Manager, a software package that acts as a central point to store and manage data collected from all devices. See Connect a camera to a folder in AXIS Store Data Manager.

  • Use AXIS Store Reporter, a statistical web-based solution, for managing and monitoring historical data.

  • Download statistics to your computer, see Download statistics.

Connect a camera to a folder in AXIS Store Data Manager

To perform this task, the application must be installed on the camera.

  1. In AXIS Store Data Manager, go to Sources and get the Folder connection identifier and the Folder connection password for the folder you want to connect to.

  2. In the camera’s web interface, go to Settings > Apps and open the application’s web interface.

  3. In the application’s web interface, go to Settings > Reporting.

  4. To enable pushing data to a server, select Enabled.

  5. Enter the web address for AXIS Store Data Manager, for example https://[subdomain].asdm.axis.com/datamanager where [subdomain] is replaced by a unique name.

  6. Enter the Folder connection identifier and Folder connection password.

  7. To test the connection, click Run test.

  8. Click Submit.

Download statistics

  1. Go to Statistics > Download statistics.

  2. Select the file format:

    • If you select .xml, .csv or .json format you can also select the time interval.

    • File format .cnt is a proprietary, binary format, available for compatibility reasons.

  3. Select date in the calendar. The data is presented in a new tab in your browser.

  4. If you want to save the data as a local file on the computer, right-click and select Save as. The browser saves the file in the default download folder.

  5. If you want to download all available data, click Download all next to the file format.

Troubleshooting

IssueAction
The software doesn’t upload to AXIS Store Data Manager.The most common reason is network communication problems. Run the connection test under Settings > Reporting to get information about the root cause for the problem.
The software doesn’t count.Make sure the instructions for how to mount the camera has been followed, see Mount the camera.
The software doesn’t count correctly.Make sure people pass the entire counting zone, crossing both blue lines. They should not turn left or right before they have passed both lines.
There’s no video stream in live view.Make sure no one else is watching the video or that you have a video stream to a VMS or other ongoing recording. Check if the camera has a limited number of viewers or video streams allowed at the same time.
The software prompts me with a warning saying that the frame rate is too low.1. Make sure the scene has sufficient lighting. If the scene is too dark, the camera does not deliver enough frames per second for the application to work.
2. If the processor in the camera has a high workload, the application might suffer. When streaming video from the camera make sure to open only one stream at a time.
The software doesn’t count after changing parameters.After changing the parameters the software may need to run up to 10 minutes before the counting accuracy is optimal.
I still can’t get the software to count.If you have followed the advice above and still can’t get the software to work, contact your Axis reseller.

Restart the application

If the counting is inaccurate or the web interface unusually slow, you can try restarting the running services or restart the device.

To restart the device, go to Maintenance > Restart.

Reset the application

Go to Maintenance > Reset and do one of the following:

  • To clear all counting data from the camera, click Clear data.

  • To restore all settings of the application to default, click Restore settings.

Back up the settings

  1. To back up the application settings, go to Maintenance > Parameter backups.

  2. Click Backup. The computer saves the file in your browser’s default folder for downloads.

Restore the settings

  1. Go to Maintenance > Parameter backups.

  2. Browse to select the previously saved backup file and then click Restore.

Generate a log report

If you have any trouble with your device you can generate a log report.

  1. Go to Maintenance > Logs.

  2. Click Generate logs.

  3. The browser saves the file on the default download browser on the computer.

  4. Attach the log report when submitting an issue to support.

Manage your license

Go to Maintenance > Registration.

  • To register a license, click on the Registration page.

  • If you want to remove you license from this product, click Clear registration.

  • If you have an updated license, click Renew license.

The light web interface

There is a light-weight version of the web interface at the URL http://<servername>/people-counter/lite/index.html. These pages can for instance be used to embed the application into systems, for example AXIS Camera Station or Milestone's XProtect Smart Client.

There are four pages available:

  • http://<servername>/people-counter/lite/day.html: The page shows the day plot, the same plot that can be seen on the Statistics page.

  • http://<servername>/people-counter/lite/week.html: The page shows the week plot, the same plot that can be seen on the Statistics page.

  • http://<servername>/people-counter/lite/count.html: A page that shows the live count for the current day.

  • http://<servername>/people-counter/lite/liveview.html: A slim version of the live view page that shows live count and the video stream with the counting area as overlay.

The menu at the bottom of the pages can be disabled by appending ?clean to the URL:s above, e.g. http://<servername>/people-counter/lite/liveview.html?clean. You can also add a lang tag before lite to display these pages in other languages, example http://<servername>/people-counter/cn/lite/liveview.html

Description

AXIS People Counter is an application accessible on your indoor Axis camera that provides simultaneous two-way counting of people, which lets you analyze visitor trends such as peak visitor hours. It is also able to estimate occupancy levels in real-time and provide access to data on the number of people present on either the premises or in a certain area at a certain time. This is helpful when you want to understand occupancy trends that enables you to measure if the occupancy levels exceed a set threshold.

Additionally, the application can detect and notify if more than one person enters within a set time interval or move in the wrong direction. This means that if you set up the application over a one-way entrance you will receive a notification whenever someone tries to leave or if more than one person tries to enter at the same time.

Common examples

Example

Request real time data from the People Counter

Request
http://<servername>/local/tvpc/.api?live-sum.json
Return
{
  "serial":"00408CAC512B",
  "name":"Exit south",
  "timestamp":"20170503112756",
  "in":12,
  "out":318
}

See Request real-time data for additional information.

Example

List all days of data available on the People Counter

Request
http://<servername>/local/tvpc/.api?list-cnt.json
Return
{
  "timestamp" : "20170513132513",
  "days":["20170510", "20170511", "20170513"]}
}

See List available data for additional information.

Example

Request historical data for the 12th to the 15th of May 2017

Request
http://<servername>/local/tvpc/.api?export-cnt&date=20170512-20170515

See Download binary data for additional information.

Example

Request all available historical data

Request
http://<servername>/local/tvpc/.api?export-cnt&date=all

See Download binary data for additional information.

Example

Request historical CSV data for the 12th and the 15th of May 2017 with 15-minute resolution

Request
http://<servername>/local/tvpc/.api?export-csv&date=20170512,20170515&res=15m

See Request CSV data for additional information.

Example

Request historical data for all available days, with 24-hour resolution

Request
http://<servername>/local/tvpc/.api?export-csv&date=all&res=24h

See Request CSV data for additional information.

Example

Request historical XML data for the 12th and the 15th of May 2017 with 15-minute resolution

Request
http://<servername>/local/tvpc/.api?export-xml&date=20170512,20170515&res=15m

See Request XML data for additional information.

Example

Request Live view information from the People Counter

Request
http://<servername>/local/tvpc/.api?cntpos.json
Response
{
  "width":320,
  "height":240,
  "left":0,
  "right":296,
  "top":88,
  "bottom":224,
  "yfirst":88,
  "ylast":152,
  "radius":0
}

See Live view information for additional information.

API specification

Request real-time data

Returns JSON file with real time counting data.

Format:
JSON
Method:
GET
Request
http://<servername>/local/tvpc/.api?live-sum.json
Return
{
  "serial":"<camera-serial>",
  "name":"<counter-name>",
  "timestamp":"<timestamp>",
  "in":<in>,
  "out":<out>
}
Return value descriptions
ValueDescription
camera-serialcamera serial number
counter-namename of the counter
timestamptime in the camera in the format YYYYMMDDhhmmss
innumber of people passing in until now today
outnumber of people passing out until now

List available data

Returns a list of days where data exists.

Format:
JSON
Method:
GET
Request
http://<servername>/local/tvpc/.api?list-cnt.json
Return
{
  "timestamp" : "<timestamp>",
  "days":["YYYYMMDD", [..] "YYYYMMDD"]}
}
Return value descriptions
ValueDescription
timestamptime in the camera in the format YYYYMMDDhhmmss
daysan array of days where there exists

Download binary data

This script returns a binary data file for the given date(s), to be used in AXIS Store Data Manager

Format:
cnt
Method:
GET
Request
http://<servername>/local/tvpc/.api?export-cnt&date=<date>
Request parameter descriptions
ParameterDescription
datea date of the form YYYYMMDD
a date interval of the form YYYYMMDD-YYYYMMDD
comma separated dates of the form YYYYMMDD,[..],YYYYMMDD
all for all available data

Return

A binary data file for the given date(s).

Request CSV data

Returns historical data in CSV format

Format:
CSV
Method:
GET
Request
http://<servername>/local/tvpc/.api?export-csv[&date=<date>][&res=<res>]
Request parameter descriptions
ParameterDescription
datea date of the form YYYYMMDD
a date interval of the form YYYYMMDD-YYYYMMDD
comma separated dates of the form YYYYMMDD,[..],YYYYMMDD
all (default) for all available data
res15m (default) for data in 15 minute bins
1h for data in 1 hour bins
24h for data in 1 day bins

Return

This script returns data in plain text, comma-separated values. The first line contains a description of each element, and the following lines contain the corresponding data for the chosen time interval and resolution.

Request XML data

Returns historical data in XML format

Format:
XML
Method:
GET
Request
http://<servername>/local/tvpc/.api?export-xml[&date=<date>][&res=<res>]
Request parameter descriptions
ParameterDescription
datea date of the form YYYYMMDD
a date interval of the form YYYYMMDD-YYYYMMDD
comma separated dates of the form YYYYMMDD,[..],YYYYMMDD
all (default) for all available data
res15m (default) for data in 15 minute bins
1h for data in 1 hour bins
24h for data in 1 day bins

Return

This script returns data in XML format. The DTD file can be found at: http://<servername>/local/tvpc/appdata.dtd

Request JSON data

Returns historical data in JSON format

Format:
JSON
Method:
GET
Request
http://<servername>/local/tvpc/.api?export-json[&date=<date>][&res=<res>]
Request parameter descriptions
ParameterDescription
datea date of the form YYYYMMDD
a date interval of the form YYYYMMDD-YYYYMMDD
comma separated dates of the form YYYYMMDD,[..],YYYYMMDD
all (default) for all available data
res15m (default) for data in 15 minute bins
1h for data in 1 hour bins
24h for data in 1 day bins

Return

This script returns data in JSON format.

Clear counting data

Format:
text/plain
Method:
GET
Request
http://<servername>/local/tvpc/.apioperator?clear-data
Return
OK
Note

Please note that this method will permanently delete all counting data from your device.

Live view information

Returns information about the placement of the lines in Live view.

Format:
JSON
Method:
GET
Request
http://<servername>/local/tvpc/.api?cntpos.json
Response
{
  "width":<width>,
  "height":<height>,
  "left":<left>,
  "right":<right>,
  "top":<top>,
  "bottom":<bottom>,
  "yfirst":<yfirst>,
  "ylast":<ylast>,
  "radius":<radius>
}
Return value descriptions
ValueDescription
widthdimension of the video stream
height
leftx coordinates in pixels forstart and stop for the blue lines in Live view
right
topy coordinates in pixels for the two blue lines in Live view
bottom
yfirsty coordinates in pixels for the top and bottom of the red counting area, disregarding curvature
ylast
radiusradius in pixels describing the curvature of the red counting area, as measured in the center of the area on both axes, or if the area is not curved

Show the system log

Format:
text/plain
Method:
GET
Request
http://<servername>/local/tvpc/.apioperator?show-logs

Return

Displays the system logs.

Generate a log archive

Format:
tar.gz
Method:
GET
Request
http://<servername>/local/tvpc/.apioperator?generate-logs

Return

A log archive

List people counter parameters

Format:
JSON
Method:
GET
Request
http://<servername>/local/tvpc/.api?params.json

Return

A JSON object of all the People Counter related parameters.

Set people counter parameters

Format:
text
Method:
POST

The post format has a format where pairs and values need to be specified, best described by an example: &p1=Counter.Enable&v1=1&p2=Counter.Height&v2=280&setparams=needstobeincluded

Note

For Firmware-version 5.60 and later, use: setparams&Counter.Height=280 instead.

Request
http://<servername>/local/tvpc/.apioperator?setparams
Return
OK