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 | |
|---|---|---|---|---|
![]() |
inImage | Image | Input image | |
![]() |
inRoi | ShapeRegion | None | None | Region of interest |
![]() |
inRoiAlignment | CoordinateSystem2D | None | None | Adjusts the region of interest to the position of the inspected object |
![]() |
inBarcodeParams | BarcodeParams | BarcodeParams(BarcodeFormat.EAN13, Polarity.Dark, 1.5, 12.0) | Specification of barcode that can be detected |
![]() |
inDecodingParams | BarcodeDecodingParams | BarcodeDecodingParams(5, 5, 5.0, BarcodeReadingStrategy.Regular) | Parameters of the barcode decoding algorithm |
![]() |
outBarcode | Barcode | None | A barcode that has been correctly detected and decoded | |
![]() |
outBarcodeCandidates | list[Rectangle2D] | Places with high gradient values that are further investigated | |
![]() |
outAlignedRoi | ShapeRegion | None | None | Input ROI after transformation (in the image coordinates) |
![]() |
diagGradientImage | Image | None | None | Image of gradient directions |
![]() |
diagScheduledScanSegments | list[ list[Segment2D] ] | Scheduled scan segments |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.



