ReadSingleBarcode


Reads a single barcode (1D) in the input image.

Applications:For basic linear barcode reading applications.

Syntax

C++
C#
Python
 
def ReadSingleBarcode(
	inImage: Image,
	/,
	*,
	inRoi: ShapeRegion | None = None,
	inRoiAlignment: CoordinateSystem2D | None = None,
	inBarcodeParams: BarcodeParams = BarcodeParams(BarcodeFormat.EAN13, Polarity.Dark, 1.5, 12.0),
	inDecodingParams: BarcodeDecodingParams = BarcodeDecodingParams(5, 5, 5.0, BarcodeReadingStrategy.Regular),
	outAlignedRoi: ShapeRegion | None = None,
	diagGradientImage: Image | None = None
)
-> (
	outBarcode: Barcode | None,
	outBarcodeCandidates: list[Rectangle2D],
	diagScheduledScanSegments: list[ list[Segment2D] ]
)

Parameters

Name Type Default Description
Input value inImage Image Input image
Input value inRoi ShapeRegion | None None Region of interest
Input value inRoiAlignment CoordinateSystem2D | None None Adjusts the region of interest 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 detected
Input value inDecodingParams BarcodeDecodingParams BarcodeDecodingParams(5, 5, 5.0, BarcodeReadingStrategy.Regular) Parameters of the barcode decoding algorithm
Output value outBarcode Barcode | None A barcode that has been correctly detected and decoded
Output value outBarcodeCandidates list[Rectangle2D] Places with high gradient values that are further investigated
Output value outAlignedRoi ShapeRegion | None None Input ROI after transformation (in the image coordinates)
Diagnostic input diagGradientImage Image | None None Image of gradient directions
Diagnostic input diagScheduledScanSegments list[ list[Segment2D] ] Scheduled scan segments

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.