Configuration of CARRIDA

Revision: 1.0
Date: 2018-02-05
Copyright: 1996-2018 Carrida Technologies GmbH, Ettlingen, Germany
Author: VC Support

Home page

Table of Contents

1   Introduction

The way how lprcarrida functions and operates is defined with the help of a configuration file which is stored in standard INI file format. This configuration file is loaded upon LPR object creation. Its path needs to be provided to the C++ object constructor respectively to the C initialization function.

The lprcarrida configuration file collects all parameters which are necessary to control the ANPR process. The configuration file is being opened read only, hence one can use the same file for several program instances simultaneously.

Here is the small example of an ini-file content.


Mode = parking


Mode = standard
Classifier = data/usa.dat

There are two main categories of parameters - stream related (ANPR_STREAM section) and single image related (ANPR_ENGINE section). The next two sections describe these categories in detail.

2   Stream parameters

Stream parameters are related to the handling of video streams - i.e., situations where a number plate is visible in more than one successive frames. Mostly, this concerns the way how multiple license plate readings are merged into one reading result per vehicle. Besides, multi-threading parameters as well as some general image preprocessing parameters can be set here. Stream parameters are located in the ANPR_STREAM section of the ini-file.

There are several streaming modes available that set individual parameters to the predefined values, as shown in (1). The mode can be optinally defined be setting the ANPR_STREAM / Mode parameter to one of the following values.

Streaming modes
Name Description
single This is the default mode. Streaming parameters are configured in such a way that the video handling functionality is switched off - i.e. each input image is considered to be not related to adjacent images
parking This mode is designed for access and parking control systems. Each vehicle number plate is required to be detected at least three times. The output result is available immediatelly afterwards.
offline In this mode, reading results are getting available with a delay about 25 frames. The reading quality is the best in this mode as the engine has more frames to analyse before producing results. It is not suited for real-time applications where any delay is unwanted. The main purpose of offline mode is to process video files.
freeflow This mode is designed for freeflow real-time systems. It is configured in such a way that it tries to catch all passing vehicles. The results may become available with a delay up to 15 frames.
Parameters default values depending on a streaming mode
Parameter/Preset single parking offline freeflow
MinReadings 1 3 3 2
StreamBufferLength 1 1 20 1
DropAfterFrames 0 15 25 15
BorderWidthRelative 0.0 1.5 1.5 1.5
BorderHeightRelative 0.0 1.0 1.0 1.0
MaxStringMatchingDistance 0 1 1 1
EngineQueueLength NumberOfEngines - 1 NumberOfEngines - 1 NumberOfEngines - 1 20
BlockingMode true false true false

Generally, when streaming mode is defined, streaming parameters are set to the predefined meaningful values. Besides, each individual parameter can be set explicit (thus overriding its default value). Each parameter is described in the following table in detail.

Stream parameters
Name Description Type Default
Multiple reading handling parameters
Streaming mode as described above. Possible values are:
- single (0)
- parking (1)
- offline (2)
- freeflow (3)
string or
Minimal number of required readings per vehicle before its license plate will be produced to the output. This parameter can be used to suppress occasional wrong readings.
Readings for the last three successive frames: ABC123 x ABC123
(x means there were no reading results for the corresponding frame)
If MinReadings = 1: Output will be produced (ABC123)
if MinReadings = 3: Not enough readings, output will not be produced (license plate will be suppressed).
integer 1
If set > 1, results will become available with the delay - the number of delayed frames is equal to the StreamBufferLength - 1. The advantage in this case is that the engine has more frames to analyse before producing the output results - this allows to correct possible reading errors by merging multiple readings results. A good strategy is to set this parameter to a lower value for real-time applications where any delay is critical, and to increase this parameter for offline applications.
Readings for the last three successive frames: ABC12 ABC123 ABC123
In this example, first reading result contains an error, while the successive two are correct. If StreamBufferLength = 1, result will be returned immediately - for the frame 1 the output string will be ABC12. But if StreamBufferLength = 3, the engine analyses readings for all 3 frames first, merges multiple readings afterwards, and returns the right output value ABC123 for the frame 1.
integer 1
Ideally, a license plate should be detected in each frame during a vehicle moves across the video scene. In a practice, hovewer, there can be some time (frame) gaps in reading. DropAfterFrames parameter specifies the max allowed gap in frames to keep license plate string in the processing history. After reaching this gap, vehicle with the relevant license plate string is removed from the memory; new readings would trigger new detection. In contrast to the StreamBufferLength, this parameter does not produce delay in results and can be safely set to higher values.
Readings for the last seven successive frames: ABC123 x ABC123 x x x ABC123
If DropSize = 5, single result will be produced. But if e.g. DropSize = 2, two reading results will be produced, as there is a gap of three frames without reading results.
integer 0
The intention of these parameters is to filter (reject) license plates that are located too close to the image borders - in such cases there is a danger that a license plate is not fully visible. These parameters are relative to the average plate characters height. For example, if there is a plate detected with 20 pixels high characters in average, and the BorderWidthRelative is set to 1.5, there must be at least 30 pixels distance from both left and right image borders to the license plate bounding box to accept this reading.
Max levenstein distance (number of character deletions + insertions + replacements to transform one string into another) between two ANPR reading results achieved in two different frames that is used for decision if these readings belong to the same vehicle or not. Setting this parameter to a higher value increases tolerance of the system to the reading errors. Normally, there is no need to change this parameter.
Readings for the last three successive frames: ABC123 A8C12 ABC123
If MaxStringMatchingDistance = 2, single result is produced (ABC123). If MaxStringMatchingDistance = 1, two outputs are produced (ABC123 and A8C12), as there are 2 operations needed to transform ABC123 into A8C12.
integer 1
Multi-threading parameters
NumberOfEngines Number of CARRIDA instances that will be run in parallel. If set to zero, the actual number of hardware cores will be taken - thus, the processing time will be optimal. Note, however, that the standard CARRIDA license allows usage of 1 CARRIDA instance - thus, setting NumberOfEngines parameter to a higher value will raise an exception in this case. integer 1
EngineQueueLength Max possible queue length of images, waiting to be processed in each CARRIDA instance. Increasing this parameter increases memory usage, but allows more flexible usage of a thread recources. integer 0
BlockingMode If set to true, each coming frame is guaranted to be processed. Thus, if the images queues for all CARRIDA instances are full, the engine will be blocked until one of the queues will be able to accept new image. If BlockingMode = false, an input image will be rejected from the processing in the case if all queues are full. A good strategy is to set BlockingMode to false for live streams and to set it to true for processing of e.g. offline videos or image folders. boolean true
Preprocessing parameters
If set, input images will be rotated before any processing begins. All further CARRIDA parameters are related to the rotated images. Output images will be rotated as well, and the license plate coordinates will be also related to the rotated images.
Possible values are:
0 (none) No rotation
1 (right) Rotate image 90 grad clockwise
2 (left) Rotate image 90 grad counter clockwise
3 (180 grad) Rotate image 180 grad (flip it both horizontally and vertically)
4 (flip_hor) Flip image horizontally
5 (flip_ver) Flip image vertically
integer 0
FineRotation Optinally, successive (after applying of Rotation) image fine rotation in grad. Settings this parameter does not change image resolution. integer 0

3   Engine parameters

Engine parameters are related to the license plate recognition functionality, based on a single input image. The parameters are located inside of the ANPR_ENGINE section of the ini-file. The parameters provided in the lprcarrida configuration file are generally a very good starting point for the ANPR engine and usually do not need to be modified, even for varying camera viewpoints and/or changing illumination conditions.

3.1   Configuration modes

The CARRIDA ANPR engine can operate in several performance modes which are differentiated by recognition speed and reading accuracy. Set the lprcarrida mode using the configuration file as described below.

The supported modes are:

  • fastest
  • fast
  • standard
  • high
  • best

The performance setting is used to select between the fastest possible operation (fastest) and the best recognition quality (best).

The high mode is about twice slower compared to the fast mode (e.g. from 50 ms to 100 ms), the reading accuracy of the high mode is typically 3-4% better than in fast mode. The best mode is available for some regions, currently USA and Europe.

Note: The standard mode is a good compromise between speed and accuracy.

A new setup of lprcarrida typically involves only the following parameters:

  • Engine performance mode
  • Classifier (the location of the OCR engine data)
  • MinLetterHeight
  • MaxLetterHeight
  • MinPlateConfidence

3.2   Description of the individual engine parameters

Configuration modes can be seen as presets - they set CARRIDA parameters to predefined default values. Additionally, each individual parameter can be set explicit in the configuration file. The table below describes each CARRIDA parameter in detail.

Engine parameters
Name Description Type Default
Image preprocessing
If these parameters are present, the input image will be scaled by the given ratios before processing. This procedure is sometimes usefull if license plates are visually distorted due to non-optimal camera view (especially for steep top views).
The resizing values have to be provided in percent of the original size (100 = original size).
ScaleHeight = 120 scales the image vertically by 20% before any processing is done.
Deinterlace If true, de-interlacing will be applied to the input image before further processing. boolean false
Masking parameters
Following three parameters describe possibilities to set image masking areas - i.e. areas which has to be excluded from ANPR processing. Arbitrary combination of these parameters can be used - if several mask types are specified, logical AND operation of the masking images will be performed intern.
Border These is a trimming parameter - it defines number of pixels that will be trimmed from the each image side. It must contain 4 values, specifying trimming values from the left, top, right, and bottom image side respectively. The main purpose is to cut image areas with timestamps overlays that are often present in an input stream.
0 0 0 0
This parameter gives the possibility to define arbitrary number of masking polygons - the processing will happen only inside of these polygons. The format is following:
img_width img_height Num_p(N) Num_p1(M) p_1_1.x p_1_1.y p_1_2.x p_1_2.y ... p_1_m.x p_1_m.y p_2_m.x p_2_m.y ... p_n_m.y
Here, N - is number of polygons, and M is number of points in the next polygon
Path (absoluto or relative) to the binary (grayscale) masking image. The processing will be performed only for pixels that have non-zero values in a mask image.
Note: resulution of the mask image must be the same as resolution of each input image, otherwise exception will be thrown.
string -
Here, configuration preset can be chosen. Four options are available:
1. freeflow (1) (fastest mode)
2. fast (2) - fast processing time will be preferred
3. standard (3) - trade-off between quality and processing time
4. high (4) - reading quality will be preferred
5. best (5) - the best available quality, available for some regions
string or
Number of CPU cores that will be used for processing. Non-positive value means all available cores have to be used.
Note: upper value is limited depending on installed license (4 for default license setup)
integer 0
Path to the main characters classification file. This is the only parameter which must be provided in order to run the detection process. All other parameters are optional.
Note: classifier path can be either absolute or relative to the ini file path.
string -
ANPR parameteres
Minimum and maximum character heights in pixels. Setting MinLetterHeight to lower values (less than 14 pixels) can lead to increased processing time. The minimal characters height that Carrida can reliable handle is about 8 pixels, assuming that image quality is satisfying (good contrast, no big compression artefacts). For the upper character height, there is no limit for the engine. Note, hovewer, that the engine is tuned by default to handle license plates having low resolution (with individual characters being 15-30 pixels high). integer
MinPlateConfidence Minimum confidence value for each license plate to be accepted. Range is [0..100]. integer 40
MaxPlateAngle Max allowed plate angle in grad integer (2)
SearchInverted If true, white-on-black (inverted) plates will be also searched in the case if no black-on-white plates are found, resulting in a slightly slower processing time. boolean true
SearchInvertedAlways If true, inverted plates will be always searched – even if usual black-on-white plates are found. Using of this parameter increases processing time. boolean false
MaxPlates Maximum number of license plates that the engine returns per image. E.g., if MaxPlates is equal 2, there will be at most 2 plates (with highest confidences) per image returned. integer unlimited
Filter number plates that consist either only of digits or letters respectively.
If set to true, image noise will be filtered before the whole ANPR process begins. Using of this parameter can significantly improve runtime performance for noisy images
Note: Setting this parameter to true for images that does not have much noise can increase processing time
boolean false
MinContrast Min contrast to differentiate foreground (characters) from background (license plate itself). Reducing this parameter increases both reading performance and processing time. integer (2)
StateRecognition Setting this parameter to false switches off the state recongnition process for classifiers with state recognition functionality. The processing time will be faster, but the reading performance will be slightly worse at the same time. boolean true
Optionally, list of countries/states/provinces that have to be included/excluded in the state recognition process.
1) States = DE FR AT
2) IgnoreStates = NL PL
In the first example, all plates are forced to be belong either to Germany, France, or Austria. In the second example, Netherlands and Poland are excluded from the state recognition process - i.e. output plates can not belong for these states.
Note: Parameters States and IgnoreStates are mutually exclusive. For the list of all state abbreviations please refer to (3).
Advanced ANPR parameteres
Following parameters can be additionally configured but this is do not needed normally
Minimum and maximum number of characters for a plate to be accepted in the output list. License plates with a character count smaller or bigger than these thresholds will be ignored.
Best results will be realized by selecting a value in the range of [3 .. 9]
Depends on
OneRowOnly If set to true, plates consisting of two rows will be ignored. The processing time will be faster. boolean
Depends on
Parameters default values depending on a configuration mode
Parameter/Preset fastest fast standard high best
MaxPlateAngle 15 15 20 25 25
MinContrast 50 50 50 12 12
Countries/States abbreviations
Abbreviation State
AD Andorra
AE United Arab Emirates
AE/AJ United Arab Emirates - Ajman
AE/AZ United Arab Emirates - Abu Dhabi
AE/DU United Arab Emirates - Dubai
AE/FU United Arab Emirates - Al Fujayrah
AE/RK United Arab Emirates - Ra's al Khaymah
AE/SH United Arab Emirates - Ash Shariqah
AE/UQ United Arab Emirates - Umm al Qaywayn
AL Albania
AM Armenia
AO Angola
AR Argentina
AT Austria
AU Australia
AU/ACT Australia - Australian Capital Territory
AU/NSW Australia - New South Wales
AU/NT Australia - Norther Territories
AU/QLD Australia - Queensland
AU/SA Australia - South Australia
AU/TAS Australia - Tasmania
AU/VIC Australia - Victoria
AU/WA Australia - Western Australia
AZ Azerbaijan
BA Bosnia and Herzegovina
BD Bangladesh
BE Belgium
BG Bulgaria
BH Bahrain
BJ Benin
BM Bermuda
BN Brunei Darussalam
BO Bolivia, Plurinational State of
BR Brazil
BT Bhutan
BW Botswana
BY Belarus
BZ Belize
CA Canada
CA/AB Canada - Alberta
CA/BC Canada - British Columbia
CA/GOV Canada - Government
CA/MB Canada - Manitoba
CA/NB Canada - New Brunswick
CA/NL Canada - Newfoundland and Labrador
CA/NS Canada - Nova Scotia
CA/NT Canada - Northwest Territories
CA/NU Canada - Nunavut
CA/ON Canada - Ontario
CA/PE Canada - Prince Edward Island
CA/QC Canada - Quebec
CA/SK Canada - Saskatchewan
CA/YT Canada - Yukon Territory
CH Switzerland
CL Chile
CN China
CO Colombia
CR Costa Rica
CU Cuba
CY Cyprus
CZ Czech Republic
DE Germany
DK Denmark
DZ Algeria
EC Ecuador
EE Estonia
EG Egypt
ES Spain
FI Finland
FR France
GB United Kingdom
GE Georgia
GI Gibraltar
GR Greece
GT Guatemala
HK Hong Kong
HN Honduras
HR Croatia
HU Hungary
ID Indonesia
IE Ireland
IL Israel
IN India
IQ Iraq
IR Iran, Islamic Republic of
IS Iceland
IT Italy
JM Jamaica
JO Jordan
JP Japan
KE Kenya
KG Kyrgyzstan
KH Cambodia
KR Korea, Republic of
KW Kuwait
KZ Kazakhstan
LB Lebanon
LI Liechtenstein
LK Sri Lanka
LR Liberia
LS Lesotho
LT Lithuania
LU Luxembourg
LV Latvia
LY Libya
MA Morocco
MC Monaco
MD Moldova
ME Montenegro
MG Madagascar
MK Macedonia
MM Myanmar
MN Mongolia
MO Macao
MT Malta
MW Malawi
MX Mexico
MY Malaysia
NA Namibia
NG Nigeria
NI Nicaragua
NL Netherlands
NO Norway
NP Nepal
NZ New Zealand
None None
OM Oman
PA Panama
PE Peru
PH Philippines
PK Pakistan
PL Poland
PR Puerto Rico
PT Portugal
PY Paraguay
QA Qatar
RO Romania
RS Serbia
RU Russian Federation
SA Saudi Arabia
SE Sweden
SG Singapore
SI Slovenia
SK Slovakia
SM San Marino
SV El Salvador
SY Syrian Arab Republic
SZ Swaziland
TH Thailand
TH/ACR Thailand - Amnatcharoen
TH/ATG Thailand - Ang Thong
TH/AYA Thailand - Phra Nakhon Si Ayutthaya
TH/BKK Thailand - Bangkok
TH/BKN Thailand - Bueng Kan
TH/BRM Thailand - Buriram
TH/CBI Thailand - Chon Buri
TH/CCO Thailand - Chachoengsao
TH/CMI Thailand - Chiang Mai
TH/CNT Thailand - Chainat
TH/CPM Thailand - Chaiyaphum
TH/CPN Thailand - Chumphon
TH/CRI Thailand - Chiang Rai
TH/CTI Thailand - Chanthaburi
TH/KBI Thailand - Krabi
TH/KKN Thailand - Khon Kaen
TH/KPT Thailand - Kamphaeng Phet
TH/KRI Thailand - Kanchanaburi
TH/KSN Thailand - Kalasin
TH/LEI Thailand - Loei
TH/LPG Thailand - Lampang
TH/LPN Thailand - Lamphun
TH/LRI Thailand - Lop Buri
TH/MDH Thailand - Mukdahan
TH/MKM Thailand - Maha Sarakham
TH/MSN Thailand - Mae Hong Son
TH/NAN Thailand - Nan
TH/NBI Thailand - Nonthaburi
TH/NBP Thailand - Nongbualumphu
TH/NKI Thailand - Nong Khai
TH/NMA Thailand - Nakhon Ratchasima
TH/NPM Thailand - Nakhon Phanom
TH/NPT Thailand - Nakhon Pathom
TH/NRT Thailand - Nakhon Si Thammarat
TH/NSN Thailand - Nakhon Sawan
TH/NWT Thailand - Narathiwat
TH/NYK Thailand - Nakhon Nayok
TH/PBI Thailand - Phetchaburi
TH/PCT Thailand - Pchichit
TH/PKN Thailand - Prachuap Khiri Khan
TH/PKT Thailand - Phuket
TH/PLG Thailand - Phatthalung
TH/PLK Thailand - Phitsanulok
TH/PNA Thailand - Phangnga
TH/PNB Thailand - Phetchabun
TH/PRE Thailand - Phrae
TH/PRI Thailand - Prachin Buri
TH/PTE Thailand - Pathum Thani
TH/PTN Thailand - Pattani
TH/PYO Thailand - Phayao
TH/RBR Thailand - Ratchaburi
TH/RET Thailand - Roi Et
TH/RNG Thailand - Ranong
TH/RYG Thailand - Rayong
TH/SBR Thailand - Sing Buri
TH/SKA Thailand - Songkhla
TH/SKM Thailand - Samut Songhram
TH/SKN Thailand - Samut Sakorn
TH/SKW Thailand - Sa Keo
TH/SNI Thailand - Surat Thani
TH/SNK Thailand - Sakon Nakhon
TH/SPB Thailand - Suphan Buri
TH/SPK Thailand - Samut Prakan
TH/SRI Thailand - Sara Buri
TH/SRN Thailand - Surin
TH/SSK Thailand - Sisaket
TH/STI Thailand - Sukhothai
TH/STN Thailand - Satun
TH/TAK Thailand - Tak
TH/TRG Thailand - Trang
TH/TRT Thailand - Trat
TH/UBN Thailand - Ubon Ratchathani
TH/UDN Thailand - Udon Thani
TH/UTD Thailand - Uttaradit
TH/UTI Thailand - Uthai Thani
TH/YLA Thailand - Yala
TH/YST Thailand - Yasothon
TJ Tajikistan
TM Turkmenistan
TN Tunisia
TR Turkey
TW Taiwan
UA Ukraine
UG Uganda
US United States
US/AK United States - Alaska
US/AL United States - Alabama
US/AR United States - Arkansas
US/AS United States - American Samoa
US/AZ United States - Arizona
US/CA United States - California
US/CO United States - Colorado
US/CT United States - Connecticut
US/DC United States - District of Columbia
US/DE United States - Delaware
US/FL United States - Florida
US/GA United States - Georgia
US/GOV United States - US Government
US/GU United States - Guam
US/HI United States - Hawaii
US/IA United States - Iowa
US/ID United States - Idaho
US/IL United States - Illinois
US/IN United States - Indiana
US/KS United States - Kansas
US/KY United States - Kentucky
US/LA United States - Louisiana
US/MA United States - Massachusetts
US/MD United States - Maryland
US/ME United States - Maine
US/MI United States - Michigan
US/MN United States - Minnesota
US/MO United States - Missouri
US/MP United States - Northern Mariana Islands
US/MS United States - Mississippi
US/MT United States - Montana
US/NC United States - North Carolina
US/ND United States - North Dakota
US/NE United States - Nebraska
US/NH United States - New Hampshire
US/NJ United States - New Jersey
US/NM United States - New Mexico
US/NV United States - Nevada
US/NY United States - New York
US/OH United States - Ohio
US/OK United States - Oklahoma
US/OR United States - Oregon
US/PA United States - Pennsylvania
US/PR United States - Puerto Rico
US/RI United States - Rhode Island
US/SC United States - South Carolina
US/SD United States - South Dakota
US/TN United States - Tennessee
US/TX United States - Texas
US/UM United States - United States Minor Outlying Islands
US/UT United States - Utah
US/VA United States - Virginia
US/VI United States - Virgin Islands
US/VT United States - Vermont
US/WA United States - Washington
US/WI United States - Wisconsin
US/WV United States - West Virginia
US/WY United States - Wyoming
UY Uruguay
UZ Uzbekistan
VA Vatican
VE Venezuela
VN Viet Nam
ZA South Africa

4   Software motion trigger

Starting from the version 4.1, Carrida offers an option to perform ANPR detection only for the frames where motion has been detected. This allows faster overall performance which can be important especially when processing live streams with a weaker hardware. To setup motion trigger, one has to define a virtual line in the ini file. Each time there is a motion across the line detected, trigger fires and the ANPR process is performed for the corresponding frame. There are also auxiliary parameters which can (but don't necessary have to) be specified. All parameters are described in the table below. These parameters has to be located in the SOFTWARE_TRIGGER section of the ini file.

To better understand individual parameters, here is a short explanation to the motion detection algorithm given. Basically, a predifined number of pixels N will be projected from one frame into the next one. Thus, N motion vectors are formed. These vectors will be analysed - if there are enough motion vectors crossing virtual line in a desired direction, software trigger will be fired. The motion detection algorithm is highly optimized and is significantly faster to perform then the ANPR detection.

In the picture below, motion vectors are shown with green lines, the yellow line represents virtual measurement line. As it can be seen, three motion lines intersect measurement line (intersection points are shown with small green circles). Red numbers represent motion vector angles in degrees. Two circles in the upper left corner represent trigger state with green and red colours meaning if motion is detected. The left circle reprents state for active frame, the right one - state for the last N frames (see MotionVectorsHistoryLength parameter).

Software motion trigger parameters
Name Description Type Default
One or more virtual lines to set. Format is line1_x1 line1_y1 line1_x2 line1_y2 ... lineN_x1 lineN_y1 lineN_x2 lineN y2.
Example (one trigger line):
MeasurementLines = 300 400 350 450
integer_vec -
MaskFactor All pixels that are located within the distance length(line) * MaskFactor from the measurement line will participate in the motion detection process. Setting this parameter to a lower value will reduce the area for the motion detection, which will lead to the faster detection. In contrary, setting MaskFactor to a higher value will allow to cope with higher velocities. float 0.5
FramesAfterTrigger Number of frames that will be additionally analysed with ANPR after the trigger has changed its state 1 -> 0. After motion detection is over, one can add some more frames to the ANPR analysis to be sure a license plate has been captured. integer 5
FramesBeforeTrigger Number of frames that will be additionally analysed with ANPR immediately before the trigger has changed its state 0 -> 1. Right before a motion has been detected, one can optionally add some frames to the ANPR analysis to be sure a license plate has been captured. integer 3
Optionally, not only intersection over a virtual trigger line can be detected, but also the motion direction. While making setup on the road, all vehicles are expected to be driven in a strict specific direction. When min and max angles for the direction are set, all other directions will be ignored. For example, if MinValidMotionVectorAngle = 45 and MaxValidMotionVectorAngle = 90, only directions between 45 and 90 degrees will be captured. Here, 0 and 360 dergrees point to the right direction, 90 degrees point to the bottom, 180 - to the left and 270 to the up. The values are to be defined for each measurement line. For example, having two lines, two integer values for both Min and MixValidMotionVactorAngle have to be specified, e.g. MinValidMotionVectorAngle = 30 45 integer_vec
MinValidMotionVectorLength Optionally, min length of the motion vectors in pixels that can lead to the trigger fire. Setting this value to a higher value can help to suppress image noise. On the other side, slow motions can be overseen in this case. integer 3
MinValidMotionVectors Minimal number of motion vectors that have to cross virtual measurement line to fire the trigger. Setting this value to a higher value can help to suppress noise. integer 3
NumMotionVectors Number of the motion vectors to be used within the motion mask. Setting this parameter to a higher value leads to the better detection quality, but increases processing time. integer 200
MinMotionVectorsDist Minimal distance between neighbouring motion vectors in pixels. Setting this parameter to a higher value can help to distribute motion vectors more evenly over the motion mask area. ingeger 2
MotionVectorsHistoryLength To make the motion detection process more robust, motion not just between two adjustent frames, but basically between any number N frames is analysed. Intern, all frame to frame motions are accumulated until N is reached. The resulting vectors are used for the final decision. integer 4
MinMotionContrast Min contrast in a pixel neighbourhood to decide if that pixel is suitable to be used to form motion vector. Setting this value to a higher value will increase quality of individual motion vectors. In environments with a poor contrast, though, MinMotionContrast parameter may be needed to be reduced. integer 15
ReduceImageFactor To speed up motion detection process, the analysis is performed on the reduced image size. By default, input frames are reduced so that the motion mask area fits 320x240 pixels resolution. There is normally no need to change this parameters as other parameters are tuned to work with this resolution. float /-
Path (full or relative) to the folder where all images with detected motion will be saved. If the folder does not exist, it will be created. This can be used e.g. for the cases where the ANPR detections are suspiciously rare. Saving all images with motion can help to understand whether the traffic is low or there is some problem in the ANPR detection pipeline.
Note: this parameter is intended to be used rather for debugging purposes. Saving of all images with motion for a long time can potentionally lead to run out of the hard disk space.
string (not set)
If set to true, additional window will popup displaying motion vectors in the real time. This parameter can be used for debugging purpose - visualisation can help to better fine tune motion parameters.
Note: setting this parameter will slow down the algorithm.
bool false