IDCode

Note:
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • All returned values are from a referenced IDCode structure, which is inserted in the spreadsheet when the ReadIDCode function is created.

Function

Description

GetAngle(IDCode)

Returns the angle of a symbol (except PharmaCode, RSS-14\Stacked and RSS Limited codes).

Note:
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.
  • The Algorithm parameter in the ReadIDCode function must be enabled.
  • When the Algorithm parameter in the ReadIDCode function is disabled, if the angle is within approximately 4 degrees of 0, 90, 180 or 270 degrees, the returned value will be 0, 90, 180 or 270 degrees, respectively.

GetBarSkew(IDCode)

Returns the mean of the skew of the bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetBarSpace(IDCode)

Returns the mean space width between bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetBarWidth(IDCode)

Returns the average width of the bars in a Postal barcode.

GetCodeName(IDCode)

Returns the name of the code type. This is the same code name shown in the property sheet. For more information, see Property Sheet.

GetCodeType(IDCode)

Returns the code type.

GetCol(IDCode, [Index])

Returns the column coordinate (in pixels) of the upper left-hand corner of a Postal symbol and the column (y) coordinate for 2D symbols at the indexed (0 to 3) finder pattern points. For more information, see Finder Pattern Points.

Note:  The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetColor(IDCode)

Returns the value (0 = black, 1 = white) of the foreground color for a Data Matrix, QR Code or PDF417 symbol.

GetContrast(IDCode)

Returns the mean contrast between foreground and background in grey levels in a Postal barcode.

Note:
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.
  • If the Algorithm parameter is enabled in the ReadIDCode function, GetContrast returns a #ERR for PDF417 codes.

GetDecodability(IDCode)

Returns the minimum decodability of the barcode (except RSS Stacked barcodes).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetDefect(IDCode)

Returns the ratio of the maximum element reflectance nonuniformity to the average barcode contrast (except RSS Stacked barcodes). An element refers to either a bar or space in a barcode.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetECLevel(IDCode)

Returns the error correction level of a Data Matrix or a PDF 417 code.

GetECMin(IDCode)

Returns the minimum edge response between successive elements in a barcode (except RSS Stacked barcodes).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetErrorCode(IDCode)

Returns an error code for each information string.

ClosedSee error codes and corresponding strings

 

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

Can't detect 2D component address patterns.

04010002

Too much invalid 2D component image data.

04010003

Can't 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

Can't 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

ReadIDCode error.

04020001

No valid symbols found.

04020002

Could not decode symbol.

GetErrorCount(IDCode)

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

GetErrorString(IDCode)

Returns diagnostic information if symbol decoding fails. For more information, see ID Error Strings.

GetFormat(IDCode)

Returns the value representing the format of a 2D symbol in the ReadIDCode function. For more information, see GetFormat Values.

GetGrade(IDCode, [IDCode])

Returns the overall quality grade for the barcode based on the lowest grade received from the Contrast, Modulation, Defect and Decodability tests. The Verify checkbox in ReadIDCode must be enabled. A second IDCode structure can be referenced as an optional parameter.

  • Grade A = 4.0
  • Grade B = 3.0
  • Grade C = 2.0
  • Grade D = 1.0
  • Grade F = 0.0
Note: If the Algorithm parameter is enabled in the ReadIDCode function, GetGrade returns a #ERR for PDF417 codes.

ClosedSee return values when the optional second IDCode parameter is used

The optional IDCode parameter supports Composite symbols. The Composite symbol is a combination of a linear 1D RSS barcode component, and a 2D CC-A\CC-B Composite component, which is an EAN/UCC-specific variant of MicroPDF417. For more information, see Reduced Space Symbology (RSS) Symbols and MicroPDF417 Variant.

 

The following is returned if the optional IDCode parameter is used:

  • If both decoded symbols from the two IDCode structures are 1D, or both symbols are 2D, GetGrade will return an #ERR. One IDCode structure must contain a 1D symbol and the other IDCode structure must contain a 2D symbol.
  • If the IDCode structure containing the 2D component of the Composite symbol is not an RSS CC-A\CC-B or a PDF417 symbol, GetGrade returns an #ERR.
  • If the IDCode structure containing the 1D component of the Composite symbol is not an RSS symbol, GetGrade returns the lesser of the two incoming IDCode grades.
  • If the IDCode structure containing the 1D component of the Composite symbol is an RSS symbol, GetGrade checks the composite linkage flag. If the flag passes (meaning that the 1D and 2D symbols are linked) the lesser of the two grades is returned. If the flag fails, meaning that the 1D and 2D symbols are not linked, then GetGrade returns 0.

GetGridCols(IDCode)

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

GetGridRows(IDCode)

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

GetGrowth(IDCode)

Returns the 2D symbol print growth test result. The horizontal and vertical print growths are calculated independently and the lower score is returned.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetHigh(IDCode)

Returns the height of the symbol.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetLearned(IDCode)

Returns '1' if the model of the symbol has been successfully learned and '0' if the model is not learned.

GetLearnedGridCol(IDCode)

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

GetLearnedGridRow(IDCode)

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

GetMaxBarSkew(IDCode)

Returns the maximum skew of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMaxBarWidth(IDCode)

Returns the maximum width of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMaxSpaceWidth(IDCode)

Returns the maximum space width between bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMinBarSkew(IDCode)

Returns the minimum skew of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMinBarWidth(IDCode)

Returns the minimum width of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMinSpaceWidth(IDCode)

Returns the minimum space width between bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMirror(IDCode)

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

GetModulation(IDCode)

Returns the ratio of the Minimum Edge Response (ECMin) to the average contrast of the barcode (except RSS Stacked barcodes).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetNBars(IDCode)

Returns the number of bars found in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetNonUniformity(IDCode)

Returns the 2D symbol axial non-uniformity test result (except PDF417 symbols).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetNumEdges(IDCode)

Returns the total number of edges found for one valid scan line for the verified RSS CC-A\CC-B symbol component(s).

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Algorithm parameter must be disabled in the ReadIDCode function.

GetQuietZonesCheck(IDCode)

Returns the ratio of the maximum non-uniformity found in a 2D RSS CC-A\CC-B symbol's quiet zones to the average symbol contrast. The Verify checkbox in ReadIDCode must be enabled.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Algorithm parameter must be disabled in the ReadIDCode function.

GetRawStream(IDCode)

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

GetReflectanceDark(IDCode)

Returns the minimum (dark) reflectance for a 2D RSS CC-A\CC-B or Postal symbol.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetReflectanceLight(IDCode)

Returns the maximum (light) reflectance for a 2D RSS CC-A\CC-B or Postal symbol.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetResolution(IDCode)

Returns the minimum (narrowest) element width for a Postal barcode. For 2D symbols, the average size, in pixels, of the cells is returned.

GetRow(IDCode, [Index])

Returns the row coordinate (in pixels) of the upper left-hand corner of a Postal symbol and the row (y) coordinate for 2D symbols at the indexed (0 to 3) finder pattern point. For more information, see Finder Pattern Points.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetSDevBarSkew(IDCode)

Returns the standard deviation of the skew of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetSDevBarSpace(IDCode)

Returns the standard deviation of the space width between bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetSDevBarWidth(IDCode)

Returns the standard deviation of the width of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetSDevContrast(IDCode)

Returns the standard deviation of the contrast between foreground and background in grey levels in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetString(IDCode)

Returns the string encoded in the symbol.

GetSymbologyIdentifier(IDCode)

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

Note: The Algorithm parameter in the ReadIDCode function must be enabled.

GetUnusedEC(IDCode)

Returns the unused error correction test result for a 2D symbol, as a percentage.

GetWide(IDCode)

Returns the width of the symbol.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.