Show more

Read more

View product

View report

Drag

Carmen® OCR RailCode

Gain Full Visibility and Accurately Read Every Railway Code
with Carmen® OCR Railway Software Library

Read Any Rail Code
Accurately

Carmen® OCR RailCode empowers you to achieve unprecedented visibility across your railway network. Easily extract and read any code, including UIC, BRA, RUS, AAR, and even North American chassis numbers, regardless of placement or font type, with unmatched 99.7% accuracy. 

carmen ocr railcode recognition block image 1

Read Any Railway Code,
Anywhere in the World

Manage your global railway network with confidence using Carmen® OCR RailCode, which offers unparalleled coverage for railway codes and eliminates compatibility issues. Our RailCode engines, Carmen® EU_Rail (for UIC and RUs) and Carmen® AM_Rail (for AAR and BRA codes), deliver results with an impressive 99.7% accuracy. 

Camera independence provides added flexibility, ensuring Carmen® OCR RailCode delivers reliable data extraction consistently, regardless of camera quality or lighting conditions. 

carmen ocr railcode railway code recognition block image 2

Simple Integration,
Scalable Power

Carmen® OCR RailCode integrates seamlessly with your existing infrastructure, minimizing disruptions. 

As your railway network expands, Carmen® OCR RailCode effortlessly adapts to accommodate your growing needs. Whether you manage a small regional network or a vast global operation, Carmen® OCR RailCode delivers the scalability and power you need to streamline operations effectively. 

Highlighted
features

carmen ocr railcode railway code recognition software features - supported codes

Supported
Codes

European (UIC), Russian (RUS), Brazilian (BRA), North American (AAR) railway codes recognized

carmen ocr railcode railway code recognition software features - tried and tested

Tried
& Tested

Used in thousands of systems worldwide.

carmen ocr railcode railway code recognition software features - scalability

Scalability

From small through medium, to large and complex systems.

carmen ocr railcode railway code recognition software features - image-based code recognition

Image-based
Code Recognition

SDK supports image processing.

carmen ocr railcode railway code recognition software features - major OP systems supported

Major
OP Systems Supported

Runs on Windows and Linux.

carmen ocr railcode railway code recognition software features - UIC regular engine updates

Regular
Engine Updates

Four updates released per year.

Play Carmen® OCR RailCode product film

Play Video

FAQ

  • What types of railway codes can Carmen® OCR RailCode recognize?

    Carmen® OCR RailCode can recognize a wide range of railway codes, including European (UIC), Russian (RUS), Brazilian (BRA), and North American (AAR) railway codes, as well as North American chassis numbers.

  • What are the system requirements for running Carmen® OCR RailCode?

    The minimum system requirements for Carmen® OCR RailCode include a 2 GHz CPU, 1 GB RAM, and 1 GB HDD. The software supports both Windows and Linux operating systems.

  • How does Carmen® OCR RailCode handle different image sources and lighting conditions?

    Carmen® OCR RailCode processes image sequences from multiple sources, ensuring optimal OCR results regardless of camera position or lighting conditions. It supports various image formats such as BMP, PNG, JPEG, and RAW.

  • How frequently is Carmen® OCR RailCode updated?

    Carmen® OCR RailCode receives four updates per year, ensuring it remains current with new standards and technologies, maintaining its high accuracy and performance.

  • What integration options are available for Carmen® OCR RailCode?

    Carmen® OCR RailCode features a user-friendly API that allows for seamless integration with existing railway management systems. It supports multiple programming languages, including C, C++, C#, Java, and Visual Basic, making integration straightforward and efficient.

  • What additional data can Carmen® OCR RailCode extract besides railway codes?

    In addition to railway codes, Carmen® OCR RailCode can extract valuable data such as the container’s size and type, enabling better management and optimization of railway logistics and operations.

Most common
applications

Carmen® OCR RailCode’s unmatched accuracy and comprehensive functionality make it an invaluable tool for diverse applications focused on streamlining and optimizing railway operations. Here are just a few of the most common uses:

Automated Code Reading and Data Capture

Inventory Management

Logistics and Yard Operations

Global Railway Network Management

Scalable Solution for Growing Networks

Sample Codes

  • C

    /** \file ********************************************************************* * * cmocr02 - Sample program for Container Code Reader * * 2006-2021 (c) Adaptive Recognition Hungary Inc. (http://www.adaptiverecognition.com) ******************************************************************************/ /** * cmocr_readcodea() example * * Purpose: * Demonstrates the use of the cmocr_getresult() function * to read industrial codes from a series of images. * * Description: * After the user choose what kind o engine would like to try,f * the application loads the necessary images from file, adds them to the engine, and calls * the cmocr_getresult() function to read industrial codes from the series. */ #include "gxsdldr.c" #include "gximage.h" #include "cmocr.h" #include "gxproperty.h" #include #include #include "stringtools.c" /** Prints the GX error code and string to the stderr. */ void print_error(const char* format, ...) { int errcode; char errstr[256]; char _format[1024]; va_list args; gx_geterrora(&errcode, errstr, sizeof(errstr) - 1); errstr[sizeof(errstr) - 1] = 0; gx_snprintf(_format, sizeof(_format), "\n<%s> GX error (%x) occured: %s\n", format, errcode, errstr); va_start(args, format); vfprintf(stderr, _format, args); va_end(args); } /** * Main function */ #define NOCRTYPES 11 const char ocr_types[NOCRTYPES][16] = { "aar", "accr_usa", "bra", "chassis", "ilu", "iso", "isoilu", "moco" "rus", "uic", "usdot", }; int main(void) { gxHANDLE ocrhandle = { 0 }; gxHANDLE imagehandle = { 0 }; gxHANDLE prophandle; struct CMOCR_RESULT* presult = NULL; int confidence; char code[64]; char* type = 0; int choice_int; int ix; bool b_err = false; /** Open the container reader */ if (!gx_openmodulea(&prophandle, "gxproperty", "default")) { print_error("Error while opening gxproperty module"); return 0; } printf("Which engine would you like to try ?\n1.AAR\n2.ACCR_USA\n3.BRA\n4.CHASSIS\n5.ILU\n6.ISO\n7.ISOILU\n8.MOCO\n9.RUS\n10.UIC\n11.USDOT\n12.OLD engine(released before 21Q1)\n13.Use the default engine\nPlease choose a number between 1 and 13! Your choice : "); scanf("%d", &choice_int); while (choice_int < 1 || choice_int > 13) { printf("Please choose a number between 1 and 13: "); scanf("%d", &choice_int); } printf("\n"); if (choice_int <= NOCRTYPES) { char t[16] = "", ev[64] = ""; char engname[128] = ""; memset(engname, 0, sizeof(engname)); type = gx_strdup(ocr_types[choice_int - 1]); gx_strncpy(t, type, sizeof(t)); strupr(t); memset(ev, 0, sizeof(ev)); gx_snprintf(ev, sizeof(ev) - 1, "%s/cmocr", type); if (!gx_getpropertya(prophandle, ev, engname, (int)sizeof(engname))) { print_error("Reading %s property error", ev); b_err = true; } else { printf("You have choosen the \"%s\" engine: %s\n\n", t, engname); /** Open the container reader */ if (!gx_openmodulea(&ocrhandle, "cmocr", type)) { print_error("Error while opening cmocr module"); b_err = true; } } } else if (choice_int == 12) { char engine[128] = ""; printf("You have choosen an old engine (released before 21Q1), please give us the exact engine name like \"cmaccr-7.3.2.66:ilu\": "); scanf("%s", engine); if (!gx_setpropertya(prophandle, "default/cmocr", engine)) { print_error("Error while setting \"%s\" engine as a default", engine); b_err = true; } else { char t[16] = ""; type = substring(engine, indexOf(engine, ':') + 1); trimstr(type); gx_strncpy(t, type, sizeof(t)); strupr(t); printf("You have choosen the old (\"%s\") engine: %s\n\n", t, engine); /** Open the container reader */ if (!gx_openmodulea(&ocrhandle, "cmocr", "default")) { print_error("Error while opening cmocr module"); b_err = true; } } } else /** Open the container reader */ if (!gx_openmodulea(&ocrhandle, "cmocr", "default")) { print_error("Error while opening cmocr module"); b_err = true; } else { char defeng[128] = ""; memset(defeng, 0, sizeof(defeng)); if (!gx_getpropertya(prophandle, "default/cmocr", defeng, (int)sizeof(defeng))) { print_error("Get property error"); b_err = true; } else { char t[16] = "", * t1, * t2; type = substring(defeng, indexOf(defeng, ':') + 1); trimstr(type); gx_strncpy(t, type, sizeof(t)); strupr(t); printf("You have choosen the default (\"%s\") engine: %s\n\n", t, defeng); } } if (!b_err) { int i; char images[3][128]; /** Open the image module and allocates the image structure */ if (!gx_openmodulea(&imagehandle, "gximage", "default")) { print_error("Error while opening gximage module"); gx_unrefhandle(&ocrhandle); gx_unrefhandle(&prophandle); return 0; } /** Reset the container module */ if (!cmocr_reset(ocrhandle)) { print_error("Reset error"); gx_unrefhandle(&ocrhandle); gx_unrefhandle(&imagehandle); gx_unrefhandle(&prophandle); return 0; } memset(images, 0, sizeof(images)); for (i = 0; i < 3; i++) { gx_snprintf(images[i], sizeof(images[i]), "../../../data/%s%02i.jpg", type, i + 1); } free(type); for (ix = 0; ix < 3; ix++) { /** Allocate an image */ gxIMAGE* image = 0; if (!gx_allocimage(imagehandle, &image)) { print_error("Allocate image failed"); gx_unrefhandle(&ocrhandle); gx_unrefhandle(&imagehandle); gx_unrefhandle(&prophandle); return 0; } /** Load the image */ printf("Load image: %s...", images[ix]); if (!gx_loadimagea(imagehandle, image, images[ix], GX_UNDEF)) { print_error("FAILED"); gx_unrefimage(imagehandle, image); gx_unrefhandle(&ocrhandle); gx_unrefhandle(&imagehandle); gx_unrefhandle(&prophandle); return 0; } else printf("OK\n"); /** Add image to the module */ printf("Add image to the module..."); if (!cmocr_addimage(ocrhandle, image, 0)) { print_error("FAILED"); gx_unrefimage(imagehandle, image); gx_unrefhandle(&ocrhandle); gx_unrefhandle(&imagehandle); gx_unrefhandle(&prophandle); return 0; } else printf("OK\n"); gx_unrefimage(imagehandle, image); } /** Read the first container code */ printf("\nRead the container code by cmocr_getresult() function..."); if (!cmocr_getresult(ocrhandle, &presult)) { print_error("FAILED"); } else printf("OK\n"); if (!presult || (presult->code[0] == 0)) { printf("No result\n"); } else { int csvalid, checksum; printf("Code: '%s', Confidence: '%i'\n", presult->code, presult->confidence); for (ix = 0; ix < presult->nimage; ix++) printf("\tImgIndex: %d Code: '%s', Confidence: '%i'\n", presult->images[ix].imgindex, presult->images[ix].text, presult->images[ix].confidence); printf("\nRead the result of the checksum validation..."); if (!cmocr_checksumisvalid(ocrhandle, presult->code, &csvalid, &checksum)) { print_error("FAILED"); if (presult) gx_globalfree(presult); return 0; } else printf("OK\nChecksum validation result: %i, checksum: %i\n\n", csvalid, checksum); } /** Release the result memory */ if (presult) { gx_globalfree(presult); presult = 0; } /** Release the handle */ if (gx_isvalidhandle(ocrhandle)) gx_unrefhandle(&ocrhandle); if (gx_isvalidhandle(imagehandle)) gx_unrefhandle(&imagehandle); if (gx_isvalidhandle(prophandle)) gx_unrefhandle(&prophandle); return 1; } }

  • C++

    /** \file ********************************************************************* * * cmocr02 - Sample program for Container Code Reader * * 2006-2021 (c) Adaptive Recognition Hungary Inc. (http://www.adaptiverecognition.com) ******************************************************************************/ /** * FindFirstContainerCode() example * * Purpose: * Demonstrates the use of the FindFirstContainerCode() function * to read industrial codes from a series of images. * * Description: * After the user choose what kind of engine would like to try, * the application loads the necessary images from file, adds them to the engine, and calls * the FindFirstContainerCode() function to read indutrial codes from the series. */ #include "gxsdldr.cpp" #include "gximage.h" #include "cmocr.h" #include "gxproperty.h" #include #include #include #include #ifdef GX_NAMESPACES using namespace gx; using namespace cm; using namespace std; #endif // trim from start (in place) static inline void ltrim(std::string& s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { return !std::isspace(ch); })); } // trim from end (in place) static inline void rtrim(std::string& s) { s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { return !std::isspace(ch); }).base(), s.end()); } // trim from both ends (in place) static inline void trim(std::string& s) { ltrim(s); rtrim(s); } static inline std::string strupr(std::string s) { std::string ret = s; std::transform(ret.begin(), ret.end(), ret.begin(), [](unsigned char c) { return std::toupper(c); }); return ret; } /** * Main function */ int main(void) { const int NOCRTYPES = 11; char* ocr_types[NOCRTYPES] = { "aar", "accr_usa", "bra", "chassis", "ilu", "iso", "isoilu", "moco" "rus", "uic", "usdot", }; try { gxProperty gxProperty; cout << "Which engine would you like to try ?\n1.AAR\n2.ACCR_USA\n3.BRA\n4.CHASSIS\n5.ILU\n6.ISO\n7.ISOILU\n8.MOCO\n9.RUS\n10.UIC\n11.USDOT\n12.OLD engine(released before 21Q1)\n13.Use the default engine\nPlease choose a number between 1 and 13! Your choice : "; int choice_int; cin >> choice_int; while (choice_int < 1 || choice_int > 13) { cout << "Please choose a number between 1 and 13: "; cin >> choice_int; } cout << endl; // Open the container reader cmOcr* ocr = 0; string type = ""; if (choice_int <= NOCRTYPES) { type = ocr_types[choice_int - 1]; std::string utype = strupr(type); string engine = gxProperty.GetProperty(type + "/cmocr"); cout << "You have choosen the \"" << utype << "\" engine: " << engine << "\n\n"; ocr = new cmOcr(type); } else if (choice_int == 12) { cout << "You have choosen an old engine (released before 21Q1), please give us the exact engine name like \"cmaccr-7.3.2.66:ilu\": "; string engine; cin >> engine; gxProperty.SetProperty("default/cmocr", engine); type = engine.substr(engine.find(':') + 1); trim(type); std::string utype = strupr(type); cout << "You have choosen the old (\"" << utype << "\") engine: " << engine << "\n\n"; ocr = new cmOcr("default"); } else { ocr = new cmOcr("default"); string engine = gxProperty.GetProperty("default/cmocr"); type = engine.substr(engine.find(':') + 1); trim(type); std::string utype = strupr(type); cout << "You have choosen the default (\"" << utype << "\") engine: " << engine << "\n\n"; } // Reset the container module ocr->Reset(); char images[3][128]; memset(images, 0, sizeof(images)); for (int i = 0; i < 3; i++) { gx_snprintf(images[i], sizeof(images[i]), "../../../data/%s%02i.jpg", type.c_str(), i + 1); } for (int ix = 0; ix < 3; ix++) { // Load the image gxImage image; cout << "Load " << images[ix] << "..."; image.Load(images[ix]); cout << "OK" << endl; // Add image to the module cout << "Add image to the module" << "..."; ocr->AddImage(image, 0); cout << "OK" << endl; } cout << endl; // Read the code cout << "Read the code by FindFirstContainerCode() function..."; ocr->FindFirstContainerCode(); cout << "OK" << endl; if(ocr->IsValid()) { cout << "Code: '" << ocr->GetCodeA() << "', Confidence: '" << ocr->GetConfidence() << "'" << endl; for (int ix=0; ixGetNumberOfImages(); ix++) cout << "\t" << "ImgIndex: " << ocr->GetImageIndex(ix) << ", " << "Code: '" << ocr->GetImageTextA(ix) << "', " << "Confidence: '" << ocr->GetImageConfidence(ix) << "'" << endl; cout << endl << "Read the result of the checksum validation..."; int csvalid = ocr->ChecksumIsValid(); int checksum = ocr->GetChecksum(); cout << "OK" << endl; cout << "Checksum validation result: " << csvalid << ", checksum: " << checksum << endl << endl; } else { cout << "No result" << endl; } } catch(gxError &e) { // Displays error code and description cerr << "GX error (" << e.GetErrorCode() << ") occurred: " << e.GetErrorStringA() << "\n"; // Terminates the program return 0; } return 1; }

  • C#

    /** \file ********************************************************************* * * cmocr02 - Sample program for Container Code Reader * * 2006-2021 (c) Adaptive Recognition Hungary Inc. (http://www.adaptiverecognition.com) ******************************************************************************/ /** * FindFirstContainerCode() example * * Purpose: * Demonstrates the use of the FindFirstContainerCode() function * to read industrial codes from a series of images. * * Description: * After the user choose what kind of engine would like to try, * the application loads the necessary images from file, adds them to the engine, and calls * the FindFirstContainerCode() function to read indutrial codes from the series. */ using gx; using cm; using System; namespace cmocr01 { class MainClass { const int NOCRTYPES = 11; // Number of OCR engine types public static string[] ocr_types = new string[NOCRTYPES] { "aar", "accr_usa", "bra", "chassis", "ilu", "iso", "isoilu", "moco" "rus", "uic", "usdot", }; public static void Main(string[] args) { try { gxProperty gxProperty = new gxProperty(); Console.Write("Which engine would you like to try ?\n1.AAR\n2.ACCR_USA\n3.BRA\n4.CHASSIS\n5.ILU\n6.ISO\n7.ISOILU\n8.MOCO\n9.RUS\n10.UIC\n11.USDOT\n12.OLD engine(released before 21Q1)\n13.Use the default engine\nPlease choose a number between 1 and 13! Your choice : "); string choice = Console.ReadLine(); //Console.WriteLine("\""+choice+"\""); int choice_int = Convert.ToInt32(choice); while (choice_int < 1 || choice_int > 13) { Console.Write("Please choose a number between 1 and 13: "); choice = Console.ReadLine(); //Console.WriteLine("\"" + choice + "\""); choice_int = Convert.ToInt32(choice); } Console.WriteLine(); //Creates the OCR object cmOcr ocr; string type = ""; if (choice_int <= NOCRTYPES) { type = ocr_types[choice_int - 1]; Console.WriteLine("You have choosen the \"{0}\" engine: {1}\n", type.ToUpper(), gxProperty.GetProperty(type + "/cmocr")); ocr = new cmOcr(type); } else if (choice_int == 12) { Console.Write("You have choosen an old engine (released before 21Q1), please give us the exact engine name like \"cmaccr-7.3.2.66:ilu\": "); string engine = Console.ReadLine(); Console.WriteLine(); //Console.WriteLine("\"" + engine + "\""); gxProperty.SetProperty("default/cmocr", engine); type = engine.Substring(engine.IndexOf(":") + 1); type = type.Trim(); Console.WriteLine("You have choosen the old (\"{0}\") engine: {1}\n", type.ToUpper(), engine); ocr = new cmOcr("default"); } else { ocr = new cmOcr("default"); string engine = gxProperty.GetProperty("default/cmocr"); type = engine.Substring(engine.IndexOf(":") + 1); type = type.Trim(); Console.WriteLine("You have choosen the default (\"{0}\") engine: {1}\n", type.ToUpper(), engine); } ocr.Reset(); string[] images = new string[3]; for (int i = 0; i < images.Length; i++) { images[i] = "../../../../../../data/" + type + (i + 1).ToString("D2") + ".jpg"; } for (int ix = 0; ix < 3; ix++) { // Creates the image object gxImage image = new gxImage("default"); // Loads the sample image Console.Write("Load {0}...", images[ix]); image.Load(images[ix]); Console.WriteLine("OK"); // Add image to the module Console.Write("Add image to the module..."); ocr.AddImage(image, 0); Console.WriteLine("OK"); image.Dispose(); } Console.WriteLine(); //Console.WriteLine(ocr.GetProperty("datafile")); // Read the code Console.Write("Read the code by FindFirstContainerCode() function..."); ocr.FindFirstContainerCode(); Console.WriteLine("OK"); if (ocr.IsValid()) { Console.WriteLine("Code: '{0}', Confidence: '{1}'", ocr.GetCode(), ocr.GetConfidence()); for (int ix = 0; ix < ocr.GetNumberOfImages(); ix++) { Console.WriteLine("\tImgIndex: {0}, Code: '{1}', Confidence: '{2}'", ocr.GetImageIndex(ix), ocr.GetImageText(ix), ocr.GetImageConfidence(ix)); } Console.Write("Read the result of the checksum validation..."); int csvalid = ocr.ChecksumIsValid(); int checksum = ocr.GetChecksum(); Console.WriteLine("OK"); Console.WriteLine("Checksum validation result: {0}, checksum: {1}", csvalid, checksum); } else { Console.WriteLine("No result"); } //Console.ReadKey(); } catch (gxException) { Console.Error.WriteLine("GX error (" + gxSystem.GetErrorCode() + ") occured: " + gxSystem.GetErrorString()); //Console.ReadKey(); } } } }

  • Java

    /** \file ********************************************************************* * * cmocr02 - Sample program for Container Code Reader * * 2006-2021 (c) Adaptive Recognition Hungary Inc. (http://www.adaptiverecognition.com) ******************************************************************************/ /** * FindFirstContainerCode() example * * Purpose: * Demonstrates the use of the FindFirstContainerCode() function * to read industrial codes from a series of images. * * Description: * After the user choose what kind of engine would like to try, * the application loads the necessary images from file, adds them to the engine, and calls * the FindFirstContainerCode() function to read indutrial codes from the series. */ import com.adaptiverecognition.gx.*; import com.adaptiverecognition.cm.*; import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; public class cmocr02 { static { try { System.loadLibrary("jgx"); System.loadLibrary("jcmocr"); } catch (UnsatisfiedLinkError e) { System.err.println("Native code library failed to load." + e); System.exit(1); } } public static int NOCRTYPES = 11; public static String ocr_types[] = { "aar", "accr_usa", "bra", "chassis", "ilu", "iso", "isoilu", "moco" "rus", "uic", "usdot", }; public static void main(String argv[]) throws IOException { try { gxProperty gxProperty = new gxProperty(); System.out.print("Which engine would you like to try ?\n1.AAR\n2.ACCR_USA\n3.BRA\n4.CHASSIS\n5.ILU\n6.ISO\n7.ISOILU\n8.MOCO\n9.RUS\n10.UIC\n11.USDOT\n12.OLD engine(released before 21Q1)\n13.Use the default engine\nPlease choose a number between 1 and 13! Your choice : "); // Enter data using BufferReader BufferedReader reader = new BufferedReader( new InputStreamReader(System.in)); String choice = reader.readLine(); int choice_int = Integer.parseInt(choice); while (choice_int < 1 || choice_int > 13) { System.out.print("Please choose a number between 1 and 13: "); choice = reader.readLine(); //Console.WriteLine("\"" + choice + "\""); choice_int = Integer.parseInt(choice); } System.out.println(""); // Creates the OCR object cmOcr ocr; String type = ""; if (choice_int <= NOCRTYPES) { type = ocr_types[choice_int - 1]; System.out.println("You have choosen the \"" + type.toUpperCase() + "\" engine: " + gxProperty.GetProperty(type + "/cmocr") + "\n"); ocr = new cmOcr(type); } else if (choice_int == 12) { System.out.println("You have choosen an old engine (released before 21Q1), please give us the exact engine name like \"cmaccr-7.3.2.66:ilu\": "); String engine = reader.readLine(); //System.out.println("\"" + engine + "\""); gxProperty.SetProperty("default/cmocr", engine); type = engine.substring(engine.indexOf(":") + 1); type = type.trim(); System.out.println("You have choosen the old (\"" + type.toUpperCase() + "\") engine: " + engine + "\n"); ocr = new cmOcr("default"); } else { ocr = new cmOcr("default"); String engine = gxProperty.GetProperty("default/cmocr"); //System.out.println("\"" + engine + "\""); gxProperty.SetProperty("default/cmocr", engine); type = engine.substring(engine.indexOf(":") + 1); type = type.trim(); System.out.println("You have choosen the default (\"" + type.toUpperCase() + "\") engine: " + engine + "\n"); } // Reset the container module ocr.Reset(); String images[] = new String[3]; for (int i = 0; i < images.length; i++) { images[i] = "../../data/" + type + String.format("%02d", i + 1) +".jpg"; } for (int ix = 0; ix < 3; ix++) { // Creates the image object gxImage image = new gxImage("default"); // Loads the sample image System.out.print("Load: " + images[ix] + "..."); image.Load(images[ix]); System.out.println("OK"); // Add image to the module System.out.print("Add image to the module..."); ocr.AddImage(image, 0); System.out.println("OK"); } System.out.println(""); // Read code System.out.print("Read the code by FindFirstContainerCode() fucntion..."); ocr.FindFirstContainerCode(); System.out.println("OK"); if (ocr.IsValid()) { System.out.println("Code: '" + ocr.GetCode() + "', Confidence: '" + ocr.GetConfidence() + "'"); for (int ix = 0; ix < ocr.GetNumberOfImages(); ix++) System.out.println("\tImgIndex: " + ocr.GetImageIndex(ix) + ", " + "Code: '" + ocr.GetImageText(ix) + ", " + "Confidence: '" + ocr.GetImageConfidence(ix) + "'"); System.out.print("Read the result of the checksum validation..."); int csvalid = ocr.ChecksumIsValid(); int checksum = ocr.GetChecksum(); System.out.println("OK\nChecksum validation result: " + csvalid + ", checksum: " + checksum); } else { System.out.println("No result"); } } catch (RuntimeException e) { System.err.println("GX error (" + String.format("0x%08x",gxSystem.GetErrorCode()) + ") occured: " + gxSystem.GetErrorString()); System.exit(1); } } }

  • Visual Basic

    '/** \file ********************************************************************* ' * ' * cmanpr01 - CMANPR sample program ' * ' * 2006-2021 (c) Adaptive Recognition Hungary Inc. (http://www.adaptiverecognition.com) ' ******************************************************************************/ ' '/** ' * Show an ANPR process ' * ' * Purpose: ' * At the beginning, the application is checking if everything is all right with the gxsd.dat syntax, if not, the execution will stop and will notify the user about the problem. ' * Shows how to do an ANPR on an image and print out the result in text ' */ Imports System Imports gx Imports cm Module Main Sub Main() Try Dim gxProperty As gxProperty = New gxProperty gxProperty.IsPropertiesValid() Console.WriteLine("The syntax of the gxsd.dat file is fine!") Console.WriteLine() ' Creates the ANPR object Dim anpr As cmAnpr = New cmAnpr("default") ' Creates the image object Dim image As gxImage = New gxImage("default") ' Gets the name of the default engine Console.WriteLine("Engine: '{0}'", anpr.GetProperty("anprname")) Console.WriteLine() ' Checks the licenses for the default engine If Not anpr.CheckLicenses4Engine("", 0) Then Console.WriteLine("Cannot find licenses for the current engine!!!") Exit Sub End If ' Loads the sample image image.Load("../../../../../../data/plate.jpg") ' Finds the first license plate If anpr.FindFirst(image) Then ' Get short country code Dim cc As String cc = anpr.GetCountryCode(anpr.GetType(), CC_TYPE.CCT_COUNTRY_SHORT) If cc.Length = 0 Then cc = "No plate type" ' Displays the result, Country code and type Console.WriteLine("Plate text: '{0}'; Country code: '{1}' ({2})", anpr.GetText(), cc, anpr.GetType()) Else Console.WriteLine("No license plate found") End If Console.ReadKey() Catch ex As gxException Console.Error.WriteLine("GX error (" + gxSystem.GetErrorCode().ToString() + ") occured: " + gxSystem.GetErrorString()) Console.ReadKey() End Try End Sub End Module

Licensing Guidelines Based on
Processing Power and Requirements

Single License (Image/Sec)
Dual License (Image/Sec)
Quad License (Image/Sec)
i3 processor

1 - 2

1 - 4

1 - 8

i5 processor

1 - 2

1 - 5

2 - 10

i7 processor

1 - 3

2 - 7

2 - 14

Image processing capacity depends on numerous factors, such as resolution, the processing capacity of hardware, the complexity of regional license plates, and the number of license plate types. The values above are guidelines based on FHD resolution and OCR-ready images. For more information, please contact us.

Product documentation
and other resources

Contact

Get more information or a quote

Our sales & product experts are here to help you. Contact us or find an affiliate near your location.

Reference projects
for this product category Carmen® OCR RailCode

Sursee–Triengen-Bahn
Oresund_ Bridge
Serbia_ministry_of_interior
DFDS
Adaptive Recognition horizontal logo 2024
OUR REFERENCES

Go beyond the claims, see the proof.
Explore our reference projects and
case studies for tangible evidence of
how Adaptive Recognition delivers
exceptional outcomes

OUR RESOURCES

By those who see challenges as opportunities and rewrite the definition of impossible every day
Follow Adaptive Recognition