License Plate

New in version 3.17.

The License Plate Plugin can be used to scan license plates of different sizes and from different European countries, the United States and Africa at the moment.

It includes license plate localisation, perspective transformation and scanning of the license plate number - including possible country information in an EU or similar badge.

License plates need to be fully visible inside the cutout and angles of up to ~40° vertically and ~50° horizontally are possible for scanning.

This section describes the parameters in detail.
If you are looking for a How-To on loading the License Plate Plugin on your platform, please refer to the following sections:

Examples

A couple of different examples can be found at Anyline Demos and Samples: License Plate.

Parameters

scanMode

New in version 11.

The scanMode defines the region of the world from which license plates can be scanned.

Currently we support the scanning of license plates from Europe, the United States and Africa.

Note

At the moment only license plates with Latin characters are supported.

Europe

When scanning varying European license plates, the scanMode should be set to AUTO.

When scanning a European license plate from a specific country only, the scanMode can be set to one of the countries currently supported (see here).

United States

When scanning license plates from the United States, the scanMode needs to be set to unitedStates.

Africa

When scanning license plates from Africa, the scanMode needs to be set to africa.

validationRegex

The License Plate Plugin provides an API where you can set a regular expression for each country. Here’s an example how you would set a regular expression for scanning Austrian license plates:

regex
"licensePlatePlugin": {
        "validationRegex": {
                "Austria": "^[a-zA-Z0-9]{1,10}$"
        },
        "scanMode": "Austria"
}

Note

Please make sure that you check that the regular expressions are correct and make sense for the countries you want to scan. The example above is just for testing purposes and should not be used for a real use-case.

Note

Not available for the scanMode unitedStates and africa at the moment.

Warning

For UWP, passing special characters (e.g. Ä, Ö, Ü) to the validation regex is not supported.

Scannable License Plate Information

Plate Number

The main result of the license plate scan is the license plate number. Line-breaks are substituted with whitespaces.

Example Returned as Type
W ANY 1 W ANY 1 String
W ANY\n123-4 W ANY 123-4 String

Country

For supported countries, the country code is returned if detected.

Example Returned as Type
A A String

Note

Not available for the scanMode africa at the moment.

Supported countries:

Country Returned as
Albania AL
Austria A
Belgium B
Bosnia and Herzegovina BIH
Bulgaria BG
Croatia HR
Cyprus CY
Czechia CZ
Denmark DK
Estonia EST
Faroe Islands FO
Finland FIN
France F
Georgia GE
Germany D
Gibraltar GBZ
Greece GR
Hungary H
Iceland IS
Ireland IRL
Italy I
Kosovo RKS
Latvia LV
Lithuania LT
Luxembourg L
Malta M
Moldova MD
Montenegro MNE
Netherlands NL
North Macedonia MK
Norway N
Poland PL
Portugal P
Romania RO
Serbia SRB
Slovakia SK
Slovenia SLO
Spain E
Sweden S
Switzerland CH
Turkey TR
Ukraine UA
United Kingdom GB
United States US

Area

New in version 29.

On US license plates, the state information is returned as area.

Example Returned as Type
Massachusetts Massachusetts String

Supported states:

State Code Returned as
Alabama AL Alabama
Alaska AK Alaska
Arizona AZ Arizona
Arkansas AR Arkansas
California CA California
Colorado CO Colorado
Connecticut CT Connecticut
Delaware DE Delaware
Florida FL Florida
Georgia GA Georgia
Hawaii HI Hawaii
Idaho ID Idaho
Illinois IL Illinois
Indiana IN Indiana
Iowa IA Iowa
Kansas KS Kansas
Kentucky KY Kentucky
Louisiana LA Louisiana
Maine ME Maine
Maryland MD Maryland
Massachusetts MA Massachusetts
Michigan MI Michigan
Minnesota MN Minnesota
Mississippi MS Mississippi
Missouri MO Missouri
Montana MT Montana
Nebraska NE Nebraska
Nevada NV Nevada
New Hampshire NH New Hampshire
New Jersey NJ New Jersey
New Mexico NM New Mexico
New York NY New York
North Carolina NC North Carolina
North Dakota ND North Dakota
Ohio OH Ohio
Oklahoma OK Oklahoma
Oregon OR Oregon
Pennsylvania PA Pennsylvania
Rhode Island RI Rhode Island
South Carolina SC South Carolina
South Dakota SD South Dakota
Tennessee TN Tennessee
Texas TX Texas
Utah UT Utah
Vermont VT Vermont
Virginia VA Virginia
Washington WA Washington
West Virginia WV West Virginia
Wisconsin WI Wisconsin
District of Columbia DC District of Columbia
American Samoa AS American Samoa
Guam GU Guam
Puerto Rico PR Puerto Rico

Known Limitations

All License Plates:

  • charWhitelist parameter is no longer supported

European License Plates:

  • Limited support for two-line license plates for the following countries: Belarus, Belgium, Bulgaria, Croatia, Denmark, Estonia, Finland, Hungary, Latvia, North Macedonia and Romania
  • Limited support for small two-line license plates for light motorized vehicles such as mopeds

US License Plates:

  • State detection is not reliable for vanity plates
  • Experimental support for the territories American Samoa, Guam and Puerto Rico
  • Stacked characters (one character above another) aren’t scanning correctly at the moment
  • Multi-line is currently not supported

Full List of Supported Scan Modes

Region scanMode
Auto (for European countries only) auto
Albania albania
Andorra andorra
Armenia armenia
Austria austria
Azerbaijan azerbaijan
Belarus belarus
Belgium belgium
Bosnia and Herzegovina bosniaAndHerzegovina
Bulgaria bulgaria
Croatia croatia
Cyprus cyprus
Czech Republic czechRepublic
Denmark denmark
Estonia estonia
Finland finland
France france
Georgia georgia
Germany germany
Greece greece
Hungary hungary
Iceland iceland
Ireland ireland
Italy italy
Latvia latvia
Liechtenstein liechtenstein
Lithuania lithuania
Luxembourg luxembourg
Malta malta
Moldova moldova
Monaco monaco
Montenegro montenegro
Netherlands netherlands
NorthMacedonia northMacedonia
Norway norway
Norway (Special) norwaySpecial
Poland poland
Portugal portugal
Romania romania
Russia russia
Serbia serbia
Slovakia slovakia
Slovenia slovenia
Spain spain
Sweden sweden
Switzerland switzerland
Turkey turkey
Ukraine ukraine
United Kingdom unitedKingdom
United States unitedStates
Africa africa