IDMax Vision Data Access Functions

This topic lists the Vision Data Access Functions that return values from an IDMax structure.

Note: All returned values are from a referenced IDMax structure, which is inserted in the spreadsheet when the ReadIDMax function is created. The optional Index can reference an indexed string from the ReadIDMax function result table.

Function

Description

GetAngle(IDMax,[Index])

Returns the angle of a symbol.

GetCodeName(IDMax,[Index])

Returns the name of the code type. This is the same code name shown in the ReadIDMax Property Sheet.

GetCodeType(IDMax,[Index])

Returns the Code Type.

Code Type

Corresponding Code Name

1

Code 128

0

Code 39

2 Interleaved 2 of 5
3/4

UPC/EAN

11

Code 93

15

Codabar

18 Code 25

132

PDF 417

9

DataBar

10

DataBar Limited

12

DataBar Expanded

16 MSI

16

EAN.UCC Composite

128

Data Matrix

129

QR Code

135 MaxiCode
136 Aztec Code
133 DotCode

GetColor(IDMax,[Index])

Returns the value of the foreground color for a Data Matrix, QR Code or PDF 417 symbol. Value 0 is black, 1 is white.

GetContrast(IDMax,[Index])

Returns the average contrast between foreground and background in greyscale values in a barcode. This provides a measurement of the contrast between the darkest and lightest elements in the symbol. A high quality symbol exhibits a high percentage of contrast between the symbol's foreground and background.

  • Grade A (4.0) ≥ 70%
  • Grade B (3.0) ≥ 55%
  • Grade C (2.0) ≥ 40%
  • Grade D (1.0) ≥ 20%
  • Grade F (0.0) < 20%

GetDecodability(IDMax,[Index])

Returns the minimum decodability of the barcode. A measure of printing accuracy, decodability is the fraction of the available margin for error that has not been used by the printing process, and is thus available for the reader. For every character of every scan line, a reference threshold is calculated and is a measure of the module width threshold. Each character's widest narrow element and narrowest wide element is compared to this to determine decodability. (Element refers to a bar or space in a barcode.)

  • Grade A (4.0) ≥ .62
  • Grade B (3.0) ≥ .50
  • Grade C (2.0) ≥ .37
  • Grade D (1.0) ≥ .20
  • Grade F (0.0) < .20
Note:
  • Scan line: For 1D symbols, the barcode is divided into a maximum of 10 equally spaced lines, referred to as scan lines, which run perpendicular to the direction of the bars. For 2D symbols, a scan line is run across each row of the symbol. A scan reflectance profile is measured for each scan line; these are used for all verification calculations.
  • For more information, refer to the Bar Code Print Quality Test Specification (P/N ISO/IEC-15416) published by the International Standards Organization (ISO/IEC), the Bar Code Print Quality Guideline (P/N ANSI X3.182-1900) published by the American National Standards Institute (ANSI) or specification EN1635 published by the Comité Européen de Normalisation (CEN).
GetDecoded(Structure,Index) Returns whether the indexed ID symbol is found. Returns 0.0 for not found, or 1.0 for found.

GetDefect(IDMax,[Index])

Returns the ratio of the maximum element (a bar or space in a barcode) reflectance non-uniformity to the average barcode contrast.
This is a measure of voids in bars or spots in spaces.

  • Grade A (4.0) ≤ .15
  • Grade B (3.0) ≤ .20
  • Grade C (2.0) ≤ .25
  • Grade D (1.0) ≤ .30
  • Grade F (0.0) > .30

GetECLevel(IDMax,[Index])

Returns the error correction level for a 2-D symnol: a Data Matrix or a PDF 417 code. PDF 417 symbols support 9 error correction levels, with 0 being the least thorough, and 8 being the most thorough.

Note: The Verify checkbox in ReadIDMax must be checked.

GetECMin(IDMax,[Index])

Returns the minimum edge response between successive elements in a barcode. Also referred to as the minimum edge contrast, the minimum edge response is a measurement of the minimum contrast of the worst (the least amount of contrast) edge in the code. With maximum reflectance being 100% and no reflectance being 0%, the minimum difference in contrast must be greater than or equal to 15% for a pass, otherwise the code fails the minimum edge response test.

  • Grade A (4.0) = Pass
  • Grade F (0.0) = Fail

GetErrorCode(IDMax,[Index])

Returns an error code for each information string if the function fails.

Note: Error strings are inserted into the spreadsheet using the GetErrorString function.

Diagnostic Code

Corresponding Information String

00010000

Vision processing error.

00010001

Invalid image memory.

00010001

Input region is too small.

00010002

Input region exceeds image boundary.

00019000

IDMax vision processing error.

04010000

ReadCompositeCode error.

04010001

Cannot detect 2D component address patterns.

04010002

Too much invalid 2D component image data.

04010003

Cannot detect 2D component symbol version.

04010004

Unable to fill in missing 2D component address patterns.

04010005

Scan line detected invalid image data.

04010006

Scan line exceeds image boundary.

04010007

Cannot detect 1D component finder patterns.

04010008

Too much invalid 1D component image data.

04010009

No valid Composite symbols found.

Note: For all other symbols, 04020001 is returned.

04010010

Too many symbol errors to correct.

04010011

Error correction failed.

04010012

1D and 2D are decodable but are not linked.

04010013

Automatic contrast threshold calculation failed.

04010014

Contrast sensitivity exceeds allowed range.

04010015

Scanning parameter exceeds allowed range.

04020000

ReadIDMax error.

04020001

No valid symbols found.

04020002

Could not decode symbol.

GetErrorCount(IDMax,[Index])

Returns the number of erroneous codewords found in a 2D symbol. This value is used to calculate UnusedEC.

GetErrorString(IDMax,[Index])

Returns diagnostic information if symbol decoding fails.

Note: The GetErrorString Vision Data Access function may be used to extract the following list of errors from either the data structure returned by a ReadIDMax function.
  • System error.
  • Insufficient heap memory.
  • Vision processing error.
  • Invalid image buffer.
  • Invalid region size.
  • Region exceeds image boundary.
  • ReadIDMax error.
  • ReadIDCode error.
  • Cannot detect Row Address Patterns.
  • Row Address Patterns (RAP) memory limit exceeded.
  • Can't detect CC-A symbol version.
  • Unable to fill in missing RAP points.
  • Invalid scan line detected.
  • Scan line exceeds image boundary.
  • Cannot detect half value patterns.
  • Half value memory limit exceeded.
  • No valid symbols found.
  • Too many symbol errors to correct.
  • Reed Solomon error correction failed.
  • Automatic contrast threshold calculation failed.
  • Contrast sensitivity exceeds allowed range.

GetFormat(IDMax,[Index])

Returns the value representing the format of a 2D symbol in the ReadIDMax function. See the GetFormat Values topic.

GetFound(IDMax, Index) Returns whether the indexed ID symbol is found; 0.0 for not found, or 1.0 for found.

GetGridCols(IDMax,[Index])

Returns the number of columns contained in a 2D symbol.

GetGridRows(IDMax,[Index])

Returns the number of rows contained in a 2D symbol.

GetHeight(IDMax,[Index])

Returns the height of the symbol.

GetLearned(IDMax,[Index])

Returns 1 if the model of the symbol has been successfully trained and 0 if the model is not trained.
If the index is 0, the symbol is DataMatrix, if 1, the symbol is QR code, if 2, the symbol is 1D. The index is only valid when used with ReadIDMax.

GetLearnedGridCol(IDMax,[Index])

Returns the number of columns in a trained QR Code or Data Matrix symbol.

GetLearnedGridRow(IDMax,[Index])

Returns the number of rows in a trained QR Code or Data Matrix symbol.

GetLearnedSymbology(IDMax) Returns a string containing the symbology currently learned in ReadIDMax.

GetMirror(IDMax,[Index])

Returns the mirrored status (0 = not mirrored, 1 = mirrored) of a Data Matrix or QR Code symbol. Value 0 means the status is not mirrored, 1 is mirrored.

GetModulation(IDMax,[Index])

Returns the ratio of the Minimum Edge Response (ECMin) to the average contrast of the barcode (except RSS Stacked barcodes). This test measures how consistent the contrast is throughout the barcode.

  • Grade A (4.0) ≥ .70
  • Grade B (3.0) ≥ .60
  • Grade C (2.0) ≥ .50
  • Grade D (1.0) ≥ .40
  • Grade F (0.0) < .40

GetModuleSize(IDMax,[Index])

Returns the size of the 2D module.

GetNonUniformity(IDMax,[Index])

Returns the 2D symbol axial non-uniformity test result (except PDF 417 symbols). Also referred to as axial non-uniformity, this is a measurement of whether the symbol is correctly proportioned for its grid size. For example, if a symbol having an equal number of rows and columns is not square, then it is considered to be non-uniform.

  • Grade A (4.0) ≥ 0.06
  • Grade B (3.0) ≥ 0.08
  • Grade C (2.0) ≥ 0.10
  • Grade D (1.0) ≥ 0.12
  • Grade F (0.0) > 0.12

GetNumResults(IDMax)

Returns the number of found and decoded results.

GetRawStream(IDMax,[Index])

Returns the undecoded data stream from a read symbol of a Code 128 symbol.

GetResolution(IDMax,[Index])

For 2D symbols, the average size of the cells is returned in pixels. Although not specifically a quality verification test, resolution measures the average size of an element, or cell in a symbol in pixels. Each type of symbol has a minimum resolution specification:

  • Data Matrix: four pixels per element
  • QR Code: four pixels per element
  • PDF 417: three pixels per element

GetString(IDMax,[Index])

Returns the string from the indexed result. The result is 0, if Index is not provided.

Note: If the string contains NULL (0x00), the function automatically swaps out the character with “<NUL>”.

GetStringIDMax(IDMax,TranslationMode,[Index])

Returns the string from the indexed result, based on the selected Translation Mode, which specifies how the function processes non-printable ASCII characters.

  • When Translation Mode is set to 0, the function swaps ASCII character 0x00 with <NUL>. This is teh default setting.

  • When Translation Mode is set to 1, the function translates all non-printable ASCII characters (0-31, 127-255), using the following table:
0x00 "<NUL>"
0x01 "<SOH>"
0x02 "<STX>"
0x03 "<ETX>"
0x04 "<EOT>"
0x05 "<ENQ>"
0x06 "<ACK>"
0x07 "<BEL>"
0x08 "<BS>"
0x09 "<HT>"
0x0a "<LF>"
0x0b "<VT>"
0x0c "<FF>"
0x0d "<CR>"
0x0e "<SO>"
0x0f "<SI>"
0x10 "<DLE>"
0x11 "<DC1>"
0x12 "<DC2>"
0x13 "<DC3>"
0x14 "<DC4>"
0x15 "<NAK>"
0x16 "<SYN>"
0x17 "<ETB>"
0x18 "<CAN>"
0x19 "<EM>"
0x1a "<SUB>"
0x1b "<ESC>"
0x1c "<FS>"
0x1d "<GS>"
0x1e "<RS>"
0x1f "<US>"
0x7f "<DEL>"
Note: Non-printable ASCII characters that are not listed in the table are tanslated as "<X>", where X is the decimal value.
  • When the Translation Mode is set to 2, the function translates all non-printable ASCII characters, except CR (0x0d) and LF (0x0a).

GetSymbologyIdentifier(IDMax,[Index])

Returns the type of symbol based on the ISO 15424 specification as a three-character code.

GetUnusedEC(IDMax,[Index])

Returns the unused error correction test result for a 2D symbol as a percentage. This test measures the percentage of error correction contained in the symbol that does not have to be used for a successful decode. High quality symbols can be decode without having to use any error correction.

  • Grade A (4.0) ≥ 0.62
  • Grade B (3.0) ≥ 0.50
  • Grade C (2.0) ≥ 0.37
  • Grade D (1.0) ≥ 0.25
  • Grade F (0.0) < 0.25

GetWidth(IDMax,[Index])

Returns the width of the symbol.

GetX(IDMax, [Index1], [Index2]) Returns an X-coordinate. Index1 refers to the symbol corner, Index2 to the found symbol.
GetY(IDMax, [Index1], [Index2]) Returns a Y-coordinate. Index1 refers to the symbol corner, Index2 to the found symbol.
SetSymbolMinStringLength(IDMax,Symbology,MinLength)

Sets the minimum string length of the specified Symbology for the referenced IDMax structure.

IDMax ReadIDMax(Image, Fixture, Region, ...)
Reads, and optionally verifies, alphanumeric strings contained in 1D and 2D barcodes and symbologies. Returns an IDCode structure with the decoded string.
Symbology The specified Symbology. Only supports Interleaved 2 of 5(73).
MinLength Minimum String Length integer, the maximum value is 80.