Important!
This documentation is currently in beta and is a work in progress. Content may change as features are finalized.
1. Introduction
Welcome to the Container Code Recognigtion (CCR) v2.5 user manual. This software application is designed to automatically recognize and read container codes and license plates from video streams captured by cameras. The application processes video in real-time, identifies vehicles, extracts license plate numbers and container codes,
and can trigger various actions based on the recognition results.
The CCR system is widely used in:
Container Terminals: Tracking shipping containers as they enter or exit facilities
Vehicle Access Control: Monitoring and controlling vehicle access at secured entrances
Logistics Centers: Recording vehicle movements and cargo information
Toll Gates: Automatic vehicle identification and billing
Parking Facilities: Entry and exit tracking
Key Features
The CCR application offers a comprehensive set of features designed for reliable and efficient automatic recognition:
Multi-Camera Support: Connect to various types of IP cameras and video sources
Real-Time Processing: Analyze video streams and recognize plates and codes in real-time
Multiple Recognition Engine Modes: Choose between continuous scanning or trigger-based operation
Configurable Detection Area: Define exactly where on the screen recognition should be made
Direction Detection: Determine whether vehicles are entering or leaving
Integration Capabilities: Connect with external systems like barriers, sensors, and databases
Reporting: Send recognition results to remote servers for logging and processing
GPS Support: Record location data with each recognition event
Hardware Integration: Connect to weight scales and radar devices
2. Starting the Application
To launch the CCR application:
Control Panel starts automatically when the server is on.
Add a new application for CCR- see Control Panel user manual
Do the next settings
Starting without GUI (Headless Mode):
./metrici-ccr -nogui
Use the headless mode when running on servers without a display or when you need the application to run in the background without a visible window.
First Time Setup
When you first run the CCR application, you will need to configure basic settings:
Click the "Settings" button on the main toolbar
The Settings window will open with multiple configuration categories
Configure your camera connection settings (see Camera Configuration section)
Adjust recognition settings as needed for your environment
Click "Save" to apply your settings
The application will automatically attempt to connect to your camera
Important: Make sure your camera is powered on and accessible on the network before attempting to configure the CCR application. If you cannot establish a connection, check your network settings and camera configuration.
3. Main Interface Overview
The CCR application main window is divided into several key areas that provide visual feedback and control over the recognition process.
Main Window Components
Video Display Area
The main video display shows the live video feed from your connected camera. This area:
Displays the processed video with recognition overlays
Highlights detected license plates and codes with bounding boxes
Shows recognized characters
Indicates the detection window (if configured)
Connection Status Indicators
Located near the video display, these indicators show the current connection status:
Status
Meaning
● Connected
Camera is connected and video is streaming normally
● Connecting
Attempting to establish connection to the camera
● Disconnected
Camera connection has been lost or cannot be established
Fig. Application main window
Frame Rate Display
Shows the current processing speed in frames per second (FPS). This helps you monitor system performance.
Last Detected CC (Container Code)
This area displays the most recently recognized container code:
The recognized container code
Confidence level (how sure the system is of the recognition)
Timestamp of when the code was detected
A thumbnail image of the detected code
Codes History Table
A scrolling table showing all recently detected codes with:
Timestamp of detection
Recognized code
Direction (entering/leaving)
Confidence level
Control Buttons
The main toolbar contains these essential buttons:
Button
Function
Settings
Opens the configuration window to adjust all application settings
About
Displays version information and license details
Quit
Closes the application
GPS Status Display
If GPS integration is enabled, this area shows:
Current GPS connection status
Latitude and longitude coordinates
Signal quality indicator
4. Camera and Video Stream Configuration - Input Stream
Configuring your camera correctly is essential for reliable license plate recognition. The CCR application supports a wide variety of camera types and video streaming protocols.
Supported Camera Types
The CCR application supports numerous camera manufacturers and video formats:
RTSP Streaming Cameras with H.264 and H.265 protocols
Real-Time Streaming Protocol (RTSP) is the industry standard for IP cameras:
HTTP Streaming Cameras
Cameras that stream video over HTTP:
Specialized Camera Types
Video File: Process pre-recorded video files instead of live cameras
Configuring Camera Settings
Step-by-Step Camera Configuration
Click the "Settings" button on the main toolbar
Expand the "Input Stream" section in the settings tree
Configure the following parameters:
Stream Type Selection
From the dropdown menu, select the type of video stream:
Stream Type: [Generic RTSP H.264 ▼]
Choose the option that matches your camera manufacturer and streaming protocol.
Camera Address
Enter the network address of your camera. The format depends on the stream type:
Stream Type
Example Address Format
RTSP
rtsp://192.168.1.100:554/stream1
HTTP MJPEG
192.168.1.100/cgi-bin/mjpeg?stream=0
HTTP JPEG
192.168.1.100/snapshot
Tip: Most camera manufacturers provide the exact RTSP or HTTP URL in their documentation. Consult your camera manual or manufacturer's website for the correct stream URL.
TCP Port
For RTSP streams, specify the TCP port number:
Default RTSP Port: 554
Alternative RTSP Ports: 555, 8554, 10554
HTTP Port: Usually 80 or 8080
TCP Port: [554]
Authentication Credentials
If your camera requires login credentials:
Username: [admin]
Password: [••••••••]
Security Note: Use strong passwords for your camera accounts. Avoid using default passwords as this is a significant security risk.
FPS Limit
Set a maximum frame rate to limit processing load:
Example FPS Limit: [6]
Fig. Input stream menu
Video Resolution set in Camera's menu
Configure the video resolution for optimal recognition:
Resolution
Best For
Bandwidth
1280 × 720 (720p)
General purpose, balanced quality
Medium
1920 × 1080 (1080p)
High detail, distant codes
High
1024 × 768
Lower bandwidth, faster processing
Low
800 × 600
Very limited bandwidth
Recommendation: For license plate recognition and container codes, higher resolution is generally better as it allows reading from greater distances.
However, ensure your network and computer can handle the increased bandwidth and processing requirements.
RTSP Stream Settings
For RTSP streams, additional options are available:
RTSP Latency: Delay buffer for RTSP streams (typically 100-500ms). Higher values improve stability but add delay.
Protocol Selection: Choose between UDP, TCP, or HTTP tunneling depending on your network conditions. Settings done in .ini file. See below.
Testing Camera Connection
After configuring camera settings, test the connection:
Click "Save" in the Settings window
Return to the main window
Watch the connection status indicator
If the status changes to Connected, the camera is working
If it shows Disconnected, check your settings
Troubleshooting Camera Connection
Problem
Possible Cause
Solution
Cannot connect
Wrong IP address
Verify camera IP address is correct and camera is on network
Cannot connect
Wrong stream URL
Check camera documentation for correct RTSP/HTTP URL
Cannot connect
Authentication failed
Verify username and password are correct
Video freezes
Network congestion
Reduce resolution or FPS limit, or upgrade network
Poor recognition
Low video quality
Increase resolution, improve lighting, adjust camera focus
5. Companion Stream (Secondary Camera)
The CCR application supports a second video stream called the Companion Stream. This secondary camera can provide additional views or capture different angles of the same vehicle/ code for improved recognition reliability.
Configuring Companion Stream
Click "Settings" on the main toolbar
Expand the "Companion Stream" section
Configure stream type, address, and credentials (same as main camera)
Click "Save"
Companion Stream Settings
The companion stream configuration options are identical to the main input stream:
Stream type selection (RTSP, HTTP, etc.)
Camera address
TCP port
Username and password
Display Options
The companion stream video can be displayed:
Tabbed View: Switch between main and companion with tabs
6. CCR Recognition Settings
Fine-tune the container code recognition engine to achieve optimal results for your specific environment and requirements.
Plate Detection Parameters
CCR Minimum Length
Set the minimum number of pixels expected for the codes:
Maximum CCR Length
Set the maximum number of characters expected:
Single CC mode
Single Plate Mode: [✓] Enabled / [ ] Disabled
When enabled, the system assumes only one container code is in the detection area at a time:
Same Code Delay
Set the minimum time between recognizing the same code :
This prevents duplicate recognition of the same vehicle.
Vehicle Direction Settings
Direction Indicator
Configure how the system determines vehicle direction:
Code Direction: [0-360 degrees]
Set the expected direction of vehicle movement. Arrange the arrow on the dial accordingly
Event Type
Define what happens when a vehicle/ code is detected:
Event Type: [Coming ▼]
Coming: Vehicle is approaching/arriving at the detection point
Leaving: Vehicle is departing from the detection point
This setting affects how recognition events are reported and logged.
Recognition Engine Working Mode
Continuous Mode
Working Mode: [Continuous ▼]
In continuous mode, the system constantly analyzes every video frame:
Pros: Maximum detection probability, no risk of missing vehicles
Cons: Higher CPU/GPU usage, may detect stationary vehicles
Best for: High-traffic areas where vehicles are always present.
Trigger Mode
In trigger mode, recognition only occurs when triggered by an external signal:
Pros: Lower resource usage, more accurate triggering of events
Best for: Controlled environments with external vehicle sensors.
Note: Trigger mode requires configuration of external trigger settings (see External Triggers section).
7. Detection Window Configuration
The detection window defines the specific area of the video frame where the system will look for codes. Properly configuring this area improves accuracy and reduces processingp>
Why Use a Detection Window
Setting a detection window provides several benefits:
Improved Accuracy: The system only searches for plates in the defined area
Faster Processing: Smaller search area means faster recognition
Enabling the Detection Window
Click "Settings" on the main toolbar
Expand the "Detection Window" section
Check the "Detection Window Active" option
Click "Save"
Setting Detection Window Position
Origin Coordinates (Top-Left Corner)
Origin X: [100] pixels
Origin Y: [200] pixels
These values define where the top-left corner of the detection area starts:
Origin X: Horizontal position from the left edge (0 = left edge)
Origin Y: Vertical position from the top edge (0 = top edge)
Window Size
Resolution X: [640] pixels
Resolution Y: [480] pixels
These values define the width and height of the detection area.
Visual Adjustment Method
For easier configuration, you can visually adjust the detection window:
In the Settings window, click on the video display area
Click and drag to draw a rectangle where you want the detection area
The coordinates will automatically update in the settings fields
Release the mouse button to set the final position
Tip: The detection window should be positioned where codes are clearly visible. Avoid areas where codes may be partially obscured or at extreme angles.
Best Practices for Detection Window
Optimal Window Position
Position where vehicles/codes are perpendicular to the camera (best angle for reading )
Include the full path of vehicle travel
Exclude areas where non-vehicle objects might cause false detections
Warning: If the detection window is too small, you may miss vehicles/codes. If it's too large, you may load the processing from areas you don't want to monitor.
Testing Detection Window
After setting up the detection window:
Save your settings
Watch the main video display
A green rectangle shows the detection area
Verify the code is detected when inside the green rectangle
Adjust the window if necessary
8. Live View Feature
The Live View feature allows you to broadcast the video feed with recognition overlays to a remote web server or monitoring system.
Purpose of Live View
Live View is useful for:
Remote Monitoring: Watch the video feed from anywhere via web browser
Central Control Rooms: Display feeds on video walls
Mobile Access: View on smartphones or tablets
Recording: External systems can capture and record the stream
Enabling Live View
Click "Settings"
Expand the "Live View" section
Check "Live View Active"
Enter the destination URL
Click "Save"
Live View URL Configuration
Live View URL: [http://your-server.com/io/ccr/live_view.php]
The URL must point to a server-side script that can receive and process the video stream.
9. Reporting and Check Action
The CCR application can automatically report recognition events to external servers for logging, processing, and integration with other systems.
This URL allows the system to query external databases or decision systems before taking action. Flow:
Code is recognized
System sends plate data to Check Action URL
Remote server processes the request
Server returns instructions (allow, deny etc )
CCR takes action based on response
Authentication
Secure your reporting and check action endpoints:
Check Action Auth Key: [your-secret-key]
Check Action ID: [1]
The auth key is the communication intermediary between engine and database. The check action ID identifies which installation is. These are to be retrieved from Metrici Interface when creating location and camera
Data Format
Data is typically sent as HTTP POST requests with JSON or form-encoded data:
The CCR application can integrate with Metrici Observer Radar device to measure vehicle speed and combine it with license plate recognition or container codes.
Purpose of Radar Integration
Speed Measurement: Record vehicle speed during recognition
Note: These URLs are examples. Consult your camera's documentation for the exact URL format. Some cameras require authentication in the URL itself: http://username:password@192.168.1.100/video
Appendix A: Configuration File (INI File)
The CCR application stores all its settings in a configuration file called an INI file. This file contains every configurable option for the application and is automatically created when you first save your settings.
INI File Location and Naming
The configuration file is located in the same directory as the CCR application executable. The file naming convention depends on the application instance:
{instance_id}.ini
Instance ID
Configuration File
0 (default)
0.ini
1
1.ini
2
2.ini
etc.
N.ini
Note: You can run multiple instances of the CCR application on the same computer by using the -app_id command line option. Each instance uses its own separate INI file.
INI File Structure
The INI file is a text-based configuration format organized into sections and key-value pairs. Here is an example of what an INI file looks like:
The following table lists all settings that can be stored in the INI file, organized by category:
Input Stream Settings
Setting Name
Default Value
Description
input_stream_type
1
Type of video stream (0-35, see stream type table)
input_stream_address
(empty)
Camera URL or IP address
input_stream_tcp_port
80
TCP port for RTSP/HTTP connection
input_stream_use_ssl
0
Enable SSL/TLS for connection (0=no, 1=yes)
input_stream_username
(empty)
Username for camera authentication
input_stream_password
(empty)
Password for camera authentication
input_stream_fps_limit
30
Maximum frames per second to process (0=unlimited)
input_stream_resx
640
Video stream width in pixels
input_stream_resy
480
Video stream height in pixels
Companion Stream Settings
Setting Name
Default Value
Description
companion_stream_type
0
Type of secondary video stream (0=disabled)
companion_stream_address
(empty)
Secondary camera URL or IP address
companion_stream_tcp_port
80
TCP port for secondary camera connection
companion_stream_use_ssl
0
Enable SSL/TLS for secondary camera
companion_stream_username
(empty)
Username for secondary camera
companion_stream_password
(empty)
Password for secondary camera
companion_stream_resx
640
Secondary video width in pixels
companion_stream_resy
480
Secondary video height in pixels
Detection Window Settings
Setting Name
Default Value
Description
input_stream_window_active
0 (false)
Enable or disable detection window (0=disabled, 1=enabled)
input_stream_window_origx
100
X coordinate of detection window top-left corner
input_stream_window_origy
100
Y coordinate of detection window top-left corner
input_stream_window_resx
100
Width of detection window in pixels (must be multiple of 4)
input_stream_window_resy
100
Height of detection window in pixels (must be multiple of 4)
Live View Settings
Setting Name
Default Value
Description
live_view_active
1 (true)
Enable or disable live view broadcasting
live_view_url
http://localhost/io/ccr/live_view.php
URL endpoint for live view stream
Reporting Settings
Setting Name
Default Value
Description
reporting_url
http://localhost/io/ccr/reporting_event.php
URL endpoint for sending recognition events
check_action_url
http://localhost/io/ccr/check_action_event.php
URL endpoint for checking actions/authorization
reporting_check_action_id
0
Installation/lane identifier for reporting
reporting_check_action_authkey
(empty)
Authentication key for reporting requests
check_action_send_trigger_address
(empty)
IP address for UDP trigger sending
check_action_send_trigger_udp_port
3500
UDP port for sending triggers (0=disabled)
Plate Recognition Settings
Setting Name
Default Value
Description
plate_min_length
100
Minimum number of characters for a valid plate
plate_max_length
1000
Maximum number of characters for a valid plate
same_plate_delay
3
Seconds before recognizing the same plate again
single_plate_mode
0 (false)
Enable if only one vehicle at a time (reduces false positives)
Vehicle Settings
Setting Name
Default Value
Description
cars_direction
0
Expected vehicle travel direction (0-359 degrees)
cars_event_type
1 (coming)
Event type: 1=coming, 2=leaving
Barrier Control Settings
Setting Name
Default Value
Description
open_barrier_url
(empty)
URL to call when opening primary barrier
close_barrier_url
(empty)
URL to call when closing primary barrier
open_close_barrier_delay
10
Seconds between opening and auto-closing primary barrier
open_barrier2_url
(empty)
URL to call when opening secondary barrier
close_barrier2_url
(empty)
URL to call when closing secondary barrier
open_close_barrier2_delay
10
Seconds between opening and auto-closing secondary barrier
External Trigger Settings
Setting Name
Default Value
Description
external_trigger_type
0 (none)
Type of external trigger device (0-5)
external_trigger_seconds
1
Trigger debounce time in seconds (filters noise)
Engine Settings
Setting Name
Default Value
Description
lpr_engine_working_mode
0 (continuous)
Recognition mode: 0=continuous, 1=triggered
Hardware Integration Settings
Setting Name
Default Value
Description
weight_scale_type
0 (none)
Type of weight scale (0-1)
weight_scale_address
(empty)
IP address of weight scale device
weight_scale_tcp_port
10001
TCP port for weight scale communication
radar_type
0 (none)
Type of radar device (0-1)
radar_address
(empty)
IP address of radar device
radar_tcp_port
10001
TCP port for radar communication
Advanced RTSP Settings
Setting Name
Default Value
Description
rtsp_stream_latency
100
RTSP stream latency buffer in milliseconds
rtsp_stream_protocols
tcp
RTSP transport protocol (tcp, udp, http)
Stream Type Values Reference
The following table shows the numeric values for stream types:
Value
Stream Type
0
Not configured
1
HTTP ACTi MJPEG
2
RTSP ACTi H.264
3
HTTP Android MJPEG
4
HTTP Arecont MJPEG
5
HTTP Axis MJPEG
6
RTSP Axis MJPEG
7
RTSP Axis H.264
8
RTSP Bosch MJPEG
9
RTSP Bosch H.264
10
HTTP Dahua MJPEG
11
HTTP Diviotec MJPEG
12
RTSP Diviotec H.264
13
HTTP Generic MJPEG
14
RTSP Generic MJPEG
15
RTSP Generic H.264
16
RTSP Generic H.265
17
HTTP Generic JPEG Picture
18
HTTP Hikvision MJPEG
19
RTSP Hikvision H.264
20
HTTP Mobotix MJPEG
21
HTTP Mobotix MxPEG
22
RTSP Mobotix H.264
23
RTSP Mobotix MOVE H.264
24
HTTP Novus MJPEG
25
RTSP Novus H.264
26
RTSP Pelco MJPEG
27
Roseek Raw
28
HTTP Samsung MJPEG
29
RTSP Samsung H.264
30
HTTP Sony MJPEG
31
RTSP Sony H.264
32
RTSP Uniview H.264
33
Video File
34
HTTP Vivotek MJPEG
35
HTTP VLC MJPEG
Trigger Type Values Reference
Value
Trigger Type
0
None
1
Barionet 50 I/O 1
2
Barionet 50 I/O 2
3
Barionet 50 I/O 3
4
Barionet 50 I/O 4
5
Metrici Virtual
Weight Scale Type Values
Value
Weight Scale Type
0
None
1
Barix Cantar I30
Radar Type Values
Value
Radar Type
0
None
1
Barix Kestrel Pico Basic
Warning: Be careful when editing the INI file manually. Incorrect values may cause the application to malfunction or fail to start. Always make a backup before editing.
Backing Up Configuration
It's good practice to backup your configuration file:
Make a copy before making major changes
Backup before software updates
Save different configurations for different scenarios
Store backups in a safe location
Resetting to Defaults
To reset all settings to default values:
Close the CCR application
Delete or rename the INI file (e.g., rename 0.ini to 0.ini.backup)
Restart the CCR application
A new INI file will be created with default settings
Multiple Instances
When running multiple instances of the CCR application, each instance has its own INI file: