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

AllowDuplicateValues

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

Code25Checksum

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

Code39Checksum

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

Code39NeedStartStop

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

ColorThreshold

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

ConvertUPCEToEAN13

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 

Encoding

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

ErrorCorrection

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

ExtendedCode39

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

GammaCorrection

R/W int apply gamma correction to color images.

LineJump

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

MaxLength

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

MedianFilter

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

MinLength

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

MinOccurrence

R/W int minimum number of hits allowed.

MinSeparation

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

MinSpaceBarWidth

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.

MultipleRead

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

NoiseReduction

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.

Photometric

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.

PrefOccurrence

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

QuietZoneSize

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

ReadCodabar

R/W bool search for type Codabar barcodes.

ReadCode128

R/W bool search for type 128 barcodes.

ReadCode25

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

ReadCode25ni

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

ReadCode39

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

ReadDataMatrix

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

ReadEAN13

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

ReadEAN8

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

ReadMicroPDF417

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

ReadNumeric

R/W bool report only numeric barcodes.

ReadPDF417

R/W bool search for PDF-417 barcodes.

ReadPatchCodes

R/W bool search for patch code barcodes.

ReadShortCode128

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

ReadUPCA

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

ReadUPCE

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

ReadQRCode

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

ScanDirection

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

ShortCode128MinLength

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

ShowCheckDigit

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

SkewLineJump

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.

SkewTolerance

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

UseOverSampling

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.