Motion detection with Axis cameras

From SpinetiX Support Wiki

Jump to: navigation, search

This page is related to Motion detection. Applies to: HMP350.

Introduction

Motion detection with Axis cameras

Motion detection is the process of detecting a change in the position of an object relative to its surroundings or a change in the surroundings relative to an object. A common scenario is to detect movement in an area, pass this information to the HMP device and have the content updated on the screen accordingly.

Motion detection is a built-in feature of Axis cameras, which can generate an alarm whenever movement starts or stops in the camera view. This is especially suitable for low-traffic areas such as office corridors, parking lots, and unattended shop areas.

The tutorial below shows in the first part how to configure an Axis camera to detect motion and send a notification to the HMP, and in the second part, how to configure the HMP and how to create an interactive project that displays a different content on the screen (in this case the camera stream) when the notification from the Axis camera is received.

Configure Axis camera for motion detection

The first part of the tutorial shows how to configure an Axis camera to detect motion and send a notification to the HMP.

  • Difficulty: Medium.
  • Total duration: 20-30 minutes.
  • Requirements:
    • Axis network camera (preferably using the latest firmware);


Note Note:
An Axis M3045-V network camera was selected for this tutorial, nevertheless, the instructions below should apply for most Axis cameras with motion detection support.

Getting started

Start the application
  1. Install the Axis camera according to the "Installation Guide" supplied with the product.
  2. Configure the Axis camera, as detailed for the Axis M3045-V network camera.
    • To open the product’s Setup pages, click "Setup" link in the top right-hand corner of the Live View page.
    • Make sure to configure the user access, IP address, date and time, and video stream settings as necessary.
  3. Go to "Application" page and check that "Axis Video Motion Detection" application (version 3 or later) is installed. Otherwise, download it from Axis website and install it.
  4. Double-click on the application name in the "Installed Applications" list.
  5. Start the application by clicking the "Start" button. Its status changes to "Idle".
  6. Click the "AXIS Video Motion Detection settings" link to open the application’s webpage for configuration.

Configure VMD application

To avoid detecting unwanted objects, the application should be configured. During configuration, visual confirmation can be used to help understand the effect of the different filters. When visual confirmation is enabled, red polygons show which objects the application detects and green polygons show which objects the application ignores.

Note Note:
For most of the operations below, Internet Explorer and AXIS Media Control (AMC) must be used. The download of AMC is automatically triggered when opening the VMD application webpage in Internet Explorer.


To configure AXIS Video Motion Detection 3, follow these steps:

  1. Modify the size and position of the include area.
    • The include area is the area in which moving objects will be detected. Objects moving outside the include area will be ignored.
    • The default include area is a square that covers the whole image. It can be changed to a polygon with up to 20 points (corners).
  2. Optionally, add one or more exclude areas.
    • Objects in an exclude area will be ignored. Use exclude areas if there are areas inside the include area that trigger a lot of unwanted detected objects. Up to 10 exclude areas can be used.
  3. Click Save to apply the changes.
  4. Use visual confirmation to verify the settings.
  5. If too many unwanted objects are detected, enable and configure one or more of the ignore filters.

Set up the action rule

Recipient Setup dialog
Action Rule Setup dialog

An action rule defines the conditions that must be met for the Axis camera to perform an action - in this case, the trigger condition is motion being detected, and the action is to send a notification to the HMP.

To send a notification message to the HMP when motion is detected, follow these steps:

  1. Go to Setup > Events > Action Rules.
  2. Click "Add..." button to create a new action rule. The Action Rule Setup" dialog opens.
  3. Enter a name for the action rule, like "Notify HMP".
  4. From the Trigger drop-down list, select "Applications".
  5. Select VMD 3 (or VMD 4), if multiple applications are installed.
  6. By default, the action rule always runs. To send notifications only during certain time periods, select a different schedule or create your own.
  7. Under Actions, select "Send Notification" from the Type drop-down list.
  8. Click "New Recipient" button. The Recipient Setup" dialog opens.
    1. Enter a name for the recipient, like "HMP350 lobby".
    2. Leave the type as HTTP.
    3. As URL, enter "http://HMP_address:1234/update " . This is the HTTP endpoint of the SV legacy server for your player.
    4. Click the "Test" button to verify the URI.
    5. Click the "OK" button to save this recipient.
  9. Under "*Message parameter" field enter the notification text, for instance "motion".
  10. Click the "OK" button to save this action rule.
Note Note:
More recipients can be added in the same manner from Events > Recipients page.

Interaction with the HMP

The second part of the tutorial shows how to configure the HMP to update the content on the screen according to the motion detection notification received from the Axis camera. A sample Elementi project is also provided.

  • Difficulty: Medium.
  • Total duration: 30 minutes.
  • Requirements:
    • An HMP350 (preferably using the latest firmware);
    • Elementi 2015 or later. (The latest version is recommended.)

Configure the HMP for interactivity

Enable Network API

The first thing to do is to configure the HMP350 for interactivity via Ethernet - for that follow these steps:

  1. Open HMP Control Center and go to Advanced Applications > Network API page.
  2. For firmware 4.3.0 or above, click "Enable secure server", then "Enable legacy unprotected server" option. For firmware below 4.3.0, click "Network API" option.
    • This allows the Axis camera to communicate with the HMP through simple HTTP requests. See more details about the Shared Variables mechanism.
  3. Change the default "1234" port if another port number was used on the recipient setup above.
  4. Click the "Apply" button.
  5. If you need to reduce the streaming latency and implicitly lower the response time of the HMP (but possibly at the expense of output quality):
    1. Click on "Advanced Applications" > Interactivity page.
    2. Lower the "Maximum rendering latency" option from 1500ms to 1000ms, 500ms or 250ms. See also when not to reduce the rendering latency.
  6. Restart the player to apply the changes.

Create an interactive Elementi project

The final step is to create an interactive Elementi project that is displaying the Axis camera stream whenever motion is detected and a default text otherwise - an Action to Switch widget is used to switch the content based on the Axis camera notification. The default text can be replaced by an image, a video, an Elementi Playlist, an Elementi Layout etc.

  1. Create a new project and set its name, model, format and duration.
  2. After the project has been created, double-click on its icon to open it.
  3. Import the Action to Switch widget from the Interactive widgets folder into the project.
    1. Click on the widget library tab and browse to "Interactivity" folder.
    2. Drag & drop the "Action to Switch" widget from the Browse panel into Preview panel (or Edit panel).
    3. Right-click on the widget layer within the Preview panel and select "Fit Screen" option.
    4. Click on the project tab (the rightmost one) in the Browse panel to get back to the project view. Notice that the widget file was automatically copied within.
  4. Double-click on the "Action to Switch" widget layer in Edit panel.
  5. Under "Properties" tab, set the Shared Variable property to "Message".
    • You can also add a transition effect to be applied when switching between different content "pages".
  6. Click on the "Mappings" tab.
    Action to Switch widget mappings
  7. Set the default content - in this example, the text was changed to "This is displayed when there is no motion detected."
  8. Removed the second page layer (P1), as it won't be needed.
  9. Add a new page to display the Axis camera stream when the notification is received:
    1. Click the "Add a Streaming Layer" button on the toolbar.
    2. Enter as URI: "rtsp://Axis_camera_IP_address/axis-media/media.amp" and click "OK" to add the streaming layer.
    3. Click under Action column, enter "motion" (as configured in the Axis action rule above) and then press Enter.
    4. Click on Elementi Icons Layer Properties.png (the "Layer Properties" button) for this layer. This opens the Layer Properties dialog.
    5. Specify the "Duration" as "60s" for instance, so that after one minute, the HMP will switch back to displaying the default content.
    6. Click "OK".
  10. Save your work and publish the project on the HMP configured in the Axis action rule above.

This tutorial is now completed.

See also

This page was last modified on 28 August 2023, at 15:07.