Up | BarcodeReader Class | Examples | Release Notes



BarcodeReader Class

Use the python method GetBarcodeReader() from  BarcodeReader module to retrieve an instance of the class to be able to read bar codes.

The BarcodeReader is installed with Scorpion version 8.

The following description refers to Barcode Reader v2.0.0.1:

Option Access Type Description


R/W bool used to stop from reporting duplicate barcodes.


R/W bool use the last digit of a Code 25 barcode as a checksum.


R/W bool use the last digit of a Code 39 barcode as a checksum.


R/W bool insist on start/stop * characters.
ColorProcessingLevel R/W int amount of processing time spent reading barcode values from color images


R/W int is the color value used by the control to decide whether a pixel should be considered to be black or white.


R/W bool expand zero suppressed UPC-E to EAN-13.
DatabarOptions R/W int mask for GS1 databar options, constructed from the following:
  • 1 Read the supplementary 2-D portion if indicated by the linkage flag.
  • 2 Read RSS-14 barcodes
  • 4 Read RSS-14 Stacked barcodes
  • 8 Read RSS-Limited barcodes
  • 16 Read RSS-Expanded barcodes
  • 32 Read RSS-Expanded Stacked barcodes
Despeckle R/W bool remove speckled marks from an image before scanning 


R/W int controls the format in which the barcode reader returns strings for barcode types that use full symbol sets such as PDF-417:
  • 0 = Raw , with null characters suppressed.
  • 1 = Quoted printable
  • 2 = Unicode
  • 3 = UTF-8


R/W bool attempt error correction on Code-39 barcodes.


R/W bool read Code-39 barcodes in extended mode.


R/W int apply gamma correction to color images.


R/W int controls how many scan lines are missed between checks for a barcode.


R/W int defines the largest length for a barcode string.


R/W bool apply a median filter to the image before checking for barcodes.


R/W int defines the smallest length for a barcode string.


R/W int minimum number of hits allowed.


R/W int defines the minimum distance between barcodes of identical value and vertical alignment in pixels.


R/W int the minimum acceptable size for a space between the bars in a barcode. When set to a value of 0 the barcode reader will automatically select the best value.


R/W bool stops at the first positive match for a barcode.


R/W int if non zero, a noise reduction filter will be run before scanning. The filter removes marks from an image that are unlikely to be part of a barcode. A larger value for NoiseReduction will remove larger marks from the image.


R/W bool disabled - means that a pixel value of 0 if considered to represent the color black, enabled - means that a pixel value of 0 is considered to represent the color white.


R/W int preferred number of hits for a barcode.


R/W int ignores those parts of the line that are not preceded by the number of white pixels specified by QuietZoneSize.


R/W bool search for type Codabar barcodes.


R/W bool search for type 128 barcodes.


R/W bool search for type 2 of 5 interleaved barcodes.


R/W bool search for type 2 of 5 non-interleaved barcodes.


R/W bool search for type 39 barcodes.
ReadDatabar R/W bool search for type Databar


R/W bool search for DataMatrix (ECC 200) barcodes.


R/W bool search for EAN-13 type barcodes.


R/W bool search for EAN-8 type barcodes.


R/W bool search for micro-PDF-417 barcodes. 


R/W bool report only numeric barcodes.


R/W bool search for PDF-417 barcodes.


R/W bool search for patch code barcodes.


R/W bool search for Code 128 barcodes of symbol set C, without the normal start and stop characters.


R/W bool search for UPC-A type barcodes.


R/W bool search for UPC-E type barcodes.


R/W bool search for QR-Code type barcodes.


R/W int

a mask that controls the directions in which the barcode reader will look for barcodes:

  • 1 = Left to Right
  • 2 = Top to Bottom
  • 4 = Right To Left
  • 8 = Bottom to Top


R/W int defines the smallest length for a barcode string, including checksum characters.


R/W bool include the barcode check digit in the returned string.


R/W int works in a similar way to the LineJump property, but only effects the phase of the scanning process concerned with searching for skewed barcodes.
Note: if value is set to '0' and image does not contain barcode exception occurres during execution.


R/W int controls the maximum angle from the horizontal or vertical at which a barcode will be recognised:
  • 0 =  up to 5 degrees 
  • 1 = 13 degrees
  • 2 = 21 degrees 
  • 3 = 29 degrees
  • 4 = 37 degrees
  • 5 = 45 degrees


R/W bool if enabled, samples 3 lines at a time (skipping 2 lines between each sample) and takes the average pixel value.
ReadCode93 R/W bool read Code93 barcode (only for .net 2.0)


Method Returns Description
Execute() None scan for bar code strings
Execute(arrlibMatrix) None scan for bar code strings the standard Arrlib matrix (as from GetImageMatr)


Result Description
Count the number of bar codes found.
Code[n] the barcode string.
CodeType[n] the type of the barcode.
Position[n].x the barcode position.
Position[n].y the barcode position.
Size[n].x the barcode length.
Size[n].y the barcode width.


Visualisation Description
Code barcode string.
Frame bounding rectangle of a barcode.


General Description
ImageIndex Image number for taking image from Scorpion software.
To take image assigned to tool, use: GetTool(GetCurSource()).imageNo



Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.