SimpleLPR 3.5.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package SimpleLPR --version 3.5.6                
NuGet\Install-Package SimpleLPR -Version 3.5.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimpleLPR" Version="3.5.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimpleLPR --version 3.5.6                
#r "nuget: SimpleLPR, 3.5.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SimpleLPR as a Cake Addin
#addin nuget:?package=SimpleLPR&version=3.5.6

// Install SimpleLPR as a Cake Tool
#tool nuget:?package=SimpleLPR&version=3.5.6                

SimpleLPR is a software component for vehicle license plate recognition. It has a very simple programming interface that allows applications to supply a path to an image or a buffer in memory and returns the detected license plate text and its location in the input image. It can be used from C++, .NET-enabled programming languages, or Python.

Typical detection rates range between 85% and 95%, provided the license plates are in good condition, free of obstructions, and the text height is at least 20 pixels.

For further information, please download the user's guide and the class reference for .NET.

You can submit your questions/issues/bug reports/feedback to support@warelogic.com

Integration is simple and straightforward, as demonstrated in the following example:

using System;
using System.Collections.Generic;
using SimpleLPR3;

namespace TestSimpleLPR
{
    class Program
    {
    static void Main(string[] args)
    {
            // Create an instance of the SimpleLPR engine.
            EngineSetupParms setupP;
            setupP.cudaDeviceId = -1; // Select CPU
            setupP.enableImageProcessingWithGPU = false;
            setupP.enableClassificationWithGPU = false;
            setupP.maxConcurrentImageProcessingOps = 0;  // Use the default value.  

            ISimpleLPR lpr = SimpleLPR.Setup(setupP);

            // Output the version number
            VersionNumber ver = lpr.versionNumber;
            Console.WriteLine("SimpleLPR version {0}.{1}.{2}.{3}", ver.A, ver.B, ver.C, ver.D);

            try
            {
                bool bOk = (args.Length == 2 || args.Length == 3);
                if (bOk)
                {
                    string sFilePath = args[1];

                    // Configure country weights based on the selected country
                    uint countryId = uint.Parse(args[0]);

                    if (countryId >= lpr.numSupportedCountries)
                        throw new Exception("Invalid country id");

                    for (uint ui = 0; ui < lpr.numSupportedCountries; ++ui)
                        lpr.set_countryWeight(ui, 0.0f);

                    lpr.set_countryWeight(countryId, 1.0f);

                    lpr.realizeCountryWeights();

                    // Set the product key (if supplied)
                    if (args.Length == 3)
                        lpr.set_productKey(args[2]);

                    // Create a processor object
                    IProcessor proc = lpr.createProcessor();
                    proc.plateRegionDetectionEnabled = true;
                    proc.cropToPlateRegionEnabled = true;

                    // Use the analyze version that takes the path to a file
                    List<Candidate> cds = proc.analyze(sFilePath);

                    // Output the results
                    Console.WriteLine("***********");
                    Console.WriteLine("Results of IProcessor.analyze(file)");

                    if (cds.Count == 0)
                    {
                        Console.WriteLine("No license plate found");
                    }
                    else
                    {
                        Console.WriteLine("{0} license plate candidates found:", cds.Count);

                        // Iterate over all candidates
                        foreach (Candidate cd in cds)
                        {
                            Console.WriteLine("***********");
                            Console.WriteLine("Light background: {0}, left: {1}, top: {2}, width: {3}, height: {4}", cd.brightBackground, cd.bbox.Left, cd.bbox.Top, cd.bbox.Width, cd.bbox.Height);
                            Console.WriteLine("Plate confidence: {0}. Plate vertices: {1}", cd.plateDetectionConfidence, string.Join(", ", cd.plateRegionVertices));
                            Console.WriteLine("Matches:");

                            // Iterate over all country matches
                            foreach (CountryMatch match in cd.matches)
                            {
                                Console.WriteLine("-----------");
                                Console.WriteLine("Text: {0}, country: {1}, ISO: {2}, confidence: {3}", match.text, match.country, match.countryISO, match.confidence);
                                Console.WriteLine("Elements:");

                                foreach (Element e in match.elements)
                                {
                                    Console.WriteLine("   Glyph: {0}, confidence: {1}, left: {2}, top: {3}, width: {4}, height: {5}",
                                                      e.glyph, e.confidence, e.bbox.Left, e.bbox.Top, e.bbox.Width, e.bbox.Height);
                                }
                            }
                        }
                    }
                }
                else
                {
                    Console.WriteLine("\nUsage:  {0} <country id> <source file> [product key]", Environment.GetCommandLineArgs()[0]);
                    Console.WriteLine("    Parameters:");
                    Console.WriteLine("     country id: Country identifier. The allowed values are");

                    for (uint ui = 0; ui < lpr.numSupportedCountries; ++ui)
                        Console.WriteLine("\t\t\t{0}\t: {1}", ui, lpr.get_countryCode(ui));

                    Console.WriteLine("     source file: file containing the image to be processed");
                    Console.WriteLine("     product key:  product key file. this value is optional, if not provided SimpleLPR will run in evaluation mode");
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine("Exception occurred!: {0}", ex.Message);
            }
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.5.7 4,746 8/1/2024
3.5.6 4,428 6/3/2024
3.5.5 9,393 6/30/2023
3.5.4 1,533 5/26/2023
3.5.3 1,751 3/14/2023
3.5.2 1,587 2/28/2023
3.5.1 1,566 1/5/2023
3.5.0 1,211 11/27/2022

Letter 'Q' is now correctly recognized in license plates from Azerbaijan.