Installation of ALPR server and camera setup on a Raspberry PI

Revision: 4.5.1
Date: 2020-12-01
Copyright: 2017-2020 Carrida Technologies GmbH, Ettlingen, Germany
Author: Carrida

Home page

Table of Contents

1   Introduction

This application note describes how the Carrida ANPR server is installed and configured for external cameras on a Raspberry Pi system.

This application note is valid for Raspberries, which use the Raspbian or Ubuntu operating system.

2   Download and Installation of the Installer


The HTOP view shows you if the installed AnprServer is running.


The Login Screen

3   Camera Configuration

The Carrida software on the Raspberry can be configured to use different camera types as image source. Some of the cameras can be setup using the Carrida camera web interface, some camera types need to be setup manually.

Note: The support for camera types and their setup will be extended in future versions of Carrida.

The ANPR server scans for USB cameras at each startup. If you attach a new camera to the system, either reboot it, or restart the server from the WebGUI.

The camera types which are supported by the standard Carrida installation are:

USB cameras

USB cameras can be connected to the RasPi USB port. Depending on the manufacturer and availability of a driver in Raspbian, the camera can be detected by Carrida using the built in OpenCV framework.

Note: Some USB cameras may be detected with V4L2 driver as well.

IP cameras/RTSP streams

If you attach an IP camera with RTSP streaming capability to the Raspi using the network interface, it can be detected by Carrida using the built in OpenCV framework.

RTSP cameras can be configured in the web GUI, see below.

MIPI/V4L2 cameras (Note: This section is intended for expert users only)

MIPI cameras are generally recognized as V4L2 cameras in Carrida. This camera type needs to be configured manually in the anpr.ini file which is used as low level server configuration file.

By default, after installation, the server starts running with the V4L2 camera with id 0, if there is such a camera connected to the Raspberry PI. You can change this behavior by manually editing the anpr.ini file.


Note Sign If the ANPR server cannot read a valid image from the camera source, an empty live view with an error message is displayed.

3.1   Configuring a camera using the WebGUI

If you have attached a USB camera or streaming camera to the RasPi, you can configure it using the Carrida web user interface. In the Configuration screen in the web interface, the tab Cameras is used for the camera configuration, as shown below. The type of camera (USB, V4L2, or RTSP) as well as the camera interface id below is displayed:


The camera configuration screen.

Each of the displayed cameras from the list can be selected as main (the round vehicle symbol) or overview camera (the round highway symbol). In the current Carrida version, only the main camera can be used for ANPR.

The green button at the lower right is used to add a new network camera. For its configuration you need to know the network address as well as login and password, if required:


The network camera configuration screen.

3.2   Camera definition in the anpr.ini file (Note: This section is intended for expert users only)

If you have attached a camera type which is only recognized as V4L2 device, it needs to be configured directly in the anpr.ini file of the ANPR server. Note that MIPI cameras are also recognized as V4L2 cameras by the Raspberry.

Use the following procedure to add a V4L2 camera:

  1. Open as su the file /srv/carrida/anprServer/anpr.ini.

  2. Set cam_type parameter from the [CAMERA] section to V4L2.

  3. Set cam_name parameter from the same section to cam#, where # should be replaced with the index of MIPI or V4L2 camera (typically the index will be 0).The following screenshot gives an example for the configuration of a camera with index 0:


    Note: All other parameters in the [Camera] Section should be left untouched!

  4. Restart the AnprServer either in webGUI (Configuration > SystemActions > Restart ALPR), or manually in the terminal with the following command:

    sudo systemctl restart anprServer