Carmen® ADR

Software Library for Dangerous Goods Code Recognition

Highlighted Features

supported-codes

Supported Codes

ADR, eADR, HIN, KEMLER, and IMO (IMDG) codes recognized.

tried-and-tested

Tried and Tested

Used in thousands of systems worldwide.

scalability

Scalability

From small through medium, to large and complex systems.

image-based-code-recognition

Image-based Code Recognition

SDK supports image processing.

major-op-systems-supported

Major OP Systems Supported

Runs on Windows and Linux.

regular-engine-updates

Regular Engine Updates

Four updates released per year.

Sample Codes

/** \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
*/

#include “gxsdldr.c”
#include “gximage.h”
#include “cmanpr.h”
#include “gxproperty.h”
//——————————————————————————
// If an error occurred it displays the error and terminates the program
void term_if_err(int st) {
int err_code;
wchar_t err_str[256];

if(st) return; // No error occurred
// Displays error code and description
err_str[(sizeof(err_str)/sizeof(wchar_t))-1] = 0;
gx_geterror(&err_code, err_str, (sizeof(err_str)/sizeof(wchar_t))-1);
fprintf(stderr, “GX error (%x) occurred: %ls\n”, err_code, err_str);
// Terminates the program
exit(1);
}
//——————————————————————————
int main(void) {
struct gxHANDLE anprhandle, imagehandle;
struct gxIMAGE *image;
struct cmNP *anprresult;
struct gxHANDLE prophandle;
char propstat[512] = “”;
wchar_t engname[256]=L””;
int st;
int b_islic;

/** Open the container reader */
st = gx_openmodulea(&prophandle, “gxproperty”, “default”);
term_if_err(st);

if (!gx_ispropertiesvalid(prophandle, propstat, 512))
{
printf(“The gxsd.dat file is invalid.\n%s\n”, propstat);
exit(1);
}
printf(“The syntax of the gxsd.dat file is fine!\n\n”);

// Opens the ANPR module with default properties
st = gx_openmodule(&anprhandle, L”cmanpr”, L”default”);
term_if_err(st);

// Opens the image module and allocates the image structure
st = gx_openmodule(&imagehandle, L”gximage”, L”default”);
term_if_err(st);
st = gx_allocimage(imagehandle, &image);
term_if_err(st);

// Gets the name of the default engine
st = gx_getmoduleproperty(anprhandle,L”anprname”,engname,256);
term_if_err(st);
printf(“Engine: ‘%ls’\n\n”, engname);

// Checks the licenses for the default engine
b_islic = 0;
st = cm_findlicenses4engine(anprhandle,0,0,&b_islic,0,0);
term_if_err(st);
if (!b_islic)
{
printf(“Cannot find licenses for the current engine!!!\n”);
exit(1);
}

// Loads the sample image
st = gx_loadimage(imagehandle, image, L”../../../data/plate.jpg”, GX_UNDEF);
term_if_err(st);

// Finds the first license plate
anprresult = 0;
st = cm_findfirst(anprhandle, image, &anprresult);
term_if_err(st);

if(anprresult) {
char cc[256]=””;
// Get short country code
st = cm_getcountrycode(anprhandle,anprresult->type,(int)CCT_COUNTRY_SHORT,cc,sizeof(cc));
term_if_err(st);
//Displays the result, Country code and type
printf(“Plate text: ‘%s’; Country code: ‘%s’ (%i)\n”, anprresult->text, cc[0]?cc:”No plate type”, anprresult->type);

// Frees up the result
st = gx_globalfree(anprresult);
term_if_err(st);
} else {
// No plate
printf(“No license plate found\n”);
}

// Frees up the resources
st = gx_unrefimage(imagehandle, image);
term_if_err(st);
st = gx_unrefhandle(&imagehandle);
term_if_err(st);
st = gx_unrefhandle(&anprhandle);
term_if_err(st);

return 0;
}
//——————————————————————————

/** \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
*/

#include “gxsdldr.cpp”
#include “gximage.h”
#include “cmanpr.h”
#include “gxproperty.h”
//——————————————————————————

using namespace std;
using namespace gx;
using namespace cm;

//——————————————————————————
int main(void) {
try {
gxProperty gxProperty;
gxProperty.IsPropertiesValid();
cout << “The syntax of the gxsd.dat file is fine!\n” << endl;

// Creates the ANPR object
cmAnpr anpr(“default”);
// Creates the image object
gxImage image(“default”);

// Gets the name of the default engine
wcout << L”Engine: ‘” << anpr.GetProperty(L”anprname”) << L”‘\n\n”;

// Checks the licenses for the default engine
if (!anpr.CheckLicenses4Engine(L””,0))
{
wcout << L”Cannot find licenses for the current engine!!!\n”;
return 1;
}

// Loads the sample image
image.Load(“../../../data/plate.jpg”);

// Finds the first license plate
if(anpr.FindFirst(image)) {
// Get short country code
gxOutStr cc = anpr.GetCountryCode(anpr.GetType(),(int)CCT_COUNTRY_SHORT);
//Displays the result, Country code and type
wcout << L”Plate text: ‘” << anpr.GetText() << L”‘; Country code: ‘” << (cc.length()>0?cc: L”No plate type”) << L”‘ (” << anpr.GetType() << L”)\n”;
} else {
wcout << L”No license plate found\n”;
}

} catch(gxError &e) {

// Displays error code and description
wcerr << L”GX error (” << e.GetErrorCode() << “) occurred: ” << e.GetErrorString() << L”\n”;
// Terminates the program
return 1;
}

return 0;
}
//——————————————————————————

/** \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
*/

using System;
using gx;
using cm;

namespace cmanpr01
{
class MainClass
{
public static void Main(string[] args)
{
try {
gxProperty gxProperty = new gxProperty();
gxProperty.IsPropertiesValid();
Console.WriteLine(“The syntax of the gxsd.dat file is fine!\n”);

// Creates the ANPR object
cmAnpr anpr = new cmAnpr(“eur”);
// Creates the image object
gxImage image = 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 (!anpr.CheckLicenses4Engine(“”, 0))
{
Console.WriteLine(“Cannot find licenses for the current engine!!!”);
return;
}
//Console.ReadKey();
// Loads the sample image
image.Load(“../../../../../../data/plate.jpg”);

// Finds the first license plate
if (anpr.FindFirst(image)) {
// Get short country code
String cc = anpr.GetCountryCode(anpr.GetType(), (int)CC_TYPE.CCT_COUNTRY_SHORT);
//Displays the result, Country code and type
Console.WriteLine(“Plate text: ‘{0}’; Country code: ‘{1}’ ({2})”, anpr.GetText(), cc.Length > 0 ? cc : “No plate type”, anpr.GetType());
} else {
Console.WriteLine(“No license plate found”);
}
Console.ReadKey();
} catch(gxException) {
Console.Error.WriteLine(“GX error (” + gxSystem.GetErrorCode() + “) occured: ” + gxSystem.GetErrorString());
Console.ReadKey();
}
}
}
}

 

/** \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
*/

import com.adaptiverecognition.gx.*;
import com.adaptiverecognition.cm.*;

public class cmanpr01 {

static {
try {
System.loadLibrary(“jgx”);
System.loadLibrary(“jcmanpr”);
} catch(UnsatisfiedLinkError e) {
System.err.println(“Native code library failed to load.” + e);
System.exit(1);
}
}

public static void main(String argv[]) {
try {
gxProperty gxProperty = new gxProperty();
gxProperty.IsPropertiesValid();
System.out.println(“The syntax of the gxsd.dat file is fine!\n”);

// Creates the ANPR object
cmAnpr anpr = new cmAnpr(“default”);
// Creates the image object
gxImage image = new gxImage(“default”);

//Gets the name of the default engine
System.out.println(“Engine: ‘” + anpr.GetProperty(“anprname”) + “‘”);
System.out.println();

// Checks the licenses for the default engine
if (!anpr.CheckLicenses4Engine(“”,0)) {
System.out.println(“Cannot find licenses for the current engine!!!\n”);
System.exit(1);
}

// Loads the sample image
image.Load(“../../data/plate.jpg”);

// Finds the first license plate
if(anpr.FindFirst(image)) {
// Get short country code
String cc = anpr.GetCountryCode(anpr.GetType(),jcmanprConstants.CCT_COUNTRY_SHORT);
//Displays the result, Country code and type
System.out.println(“Plate text: ‘”+anpr.GetText()+”‘; Country code: ‘” + (cc.length()>0?cc: “No plate type”) + “‘ (” + anpr.GetType() + “)”);
} else {
System.out.println(“No license plate found”);
}

// Frees up resources
anpr.delete();
image.delete();

} catch(RuntimeException e) {
System.err.println(“GX error (” + String.format(“0x%08x”,gxSystem.GetErrorCode()) + “) occured: ” + gxSystem.GetErrorString());
System.exit(1);
}
}
}

‘/** \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

Licesing Guidelines Based on
Processing Power and Requirements

Guidelines
Single License (Image/Sec) Dual License (Image/Sec) Quad License (Image/Sec)
i3 processor
1 - 5 2 - 10 4 - 20
i5 processor
3 - 7 6 - 14 12 - 28
i7 processor
5 - 10 10 - 20 20 - 40
i3 processor
1 - 5
i5 processor
3 - 7
i7 processor
5 - 10
i3 processor
2 - 10
i5 processor
6 - 14
i7 processor
10 - 20
i3 processor
4 - 20
i5 processor
12 - 28
i7 processor
20 - 40
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 in the regional engine. 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

AR_PRODUCT

Ez a form a termékekhez. Minden terméknél a preferred product type-ot fix értékkel egy hidden mezőben el kell helyezni. Az Aktív form nevek kezdődjenek így: AR_PRODUCT_(product név)

  • Please describe your type of business
  • This field is for validation purposes and should be left unchanged.

GET MORE INFORMATION OR A QUOTE

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

View our representatives on a map