RecognizeBarcode


Extracts information from a barcode located in the input image at a given position.

Applications:Most often used after a barcode detection filter.

Syntax

C++
C#
Python
 
def RecognizeBarcode(
	inImage: Image,
	inBarcodePosition: Rectangle2D,
	/,
	*,
	inBarcodePositionAlignment: CoordinateSystem2D | None = None,
	inBarcodeParams: BarcodeParams = BarcodeParams(BarcodeFormat.EAN13, Polarity.Dark, 1.5, 12.0),
	inScanCount: int = 5,
	inScanWidth: int = 5,
	inMinEdgeStrength: float = 5.0,
	outAlignedBarcodePosition: Rectangle2D | None = None
)
-> (
	outBarcode: Barcode | None,
	diagScheduledScanSegments: list[Segment2D]
)

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inBarcodePosition Rectangle2D Position of the input image in which the barcode is located
Input value inBarcodePositionAlignment CoordinateSystem2D | None None Adjusts the barcode rectangle to the position of the inspected object
Input value inBarcodeParams BarcodeParams BarcodeParams(BarcodeFormat.EAN13, Polarity.Dark, 1.5, 12.0) Specification of barcode that can be read
Input value inScanCount int 1 - 5 Number of parallel scans run until first successful read
Input value inScanWidth int 1 - 5 Width of the single scan
Input value inMinEdgeStrength float 0.0 - 5.0 Minimal strength of an extracted edge
Output value outBarcode Barcode | None Decoded barcode or nothing if all of the scans failed
Output value outAlignedBarcodePosition Rectangle2D | None None
Diagnostic input diagScheduledScanSegments list[Segment2D] Scheduled scan segments