public class BarCodeReader
extends Component
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform Read operation to detect barcodes
Constructor and Description |
---|
BarCodeReader(Bitmap image)
BarCodeReader constructor from an image
|
BarCodeReader(Bitmap image,
long type)
Initializes a new instance of the
BarCodeReader class. |
BarCodeReader(Bitmap image,
java.awt.Rectangle area,
long type) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes barcode reader.
|
void |
dispose()
Release resource
|
int |
getBarCodeOrientation() |
java.lang.String |
getCheckSum() |
int |
getChecksumValidation()
Enable checksum validation during recognition for 1D barcodes.
|
byte[] |
getCodeBytes() |
java.lang.String |
getCodeText()
Gets the code text.
|
int |
getCustomerInformationInterpretingType()
Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other.
|
int |
getCustomizedScanStrength()
Gets the ScanStrength, value range is 1(weakest) to 100(strongest).
|
int |
getCustomizedThreshold()
Gets the the threshold value.This property works only the ThresholdHints.Customized Hints was set.
|
int |
getExpectedBarCodeCount()
Expected barcodes to be found.The reader will stop reading the image once it found barcodes more than this value.
|
ImageBinarization |
getImageBinarizationHints()
Gets the image binarization hints.
|
java.lang.String |
getMacroPdf417FileID()
Gets the file ID of the barcode, only available with MacroPdf417.
|
boolean |
getMacroPdf417LastSegment()
Gets the last segment flag,only available with MacroPdf417..
|
int |
getMacroPdf417SegmentID()
Gets the segment ID of the barcode,only available with MacroPdf417.
|
Orientation |
getOrientationHints()
Gets the orientation hints.
|
long |
getReadType()
Gets the barcode type.
|
BarCodeRegion |
getRegion()
Gets the barcode region.
|
boolean |
getStripFNC()
Strip FNC1, FNC2, FNC3 characters from codetext.
|
int |
getTimeout() |
static boolean |
isLicensed()
Gets a value indicating whether recognition module is licensed.
|
boolean |
read()
Reads barcode from the image.
|
void |
setChecksumValidation(int value) |
void |
setCustomerInformationInterpretingType(int value)
Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other.
|
void |
setCustomizedScanStrength(int value)
Sets the ScanStrength, value range is 1(weakest) to 100(strongest).
|
void |
setCustomizedThreshold(int value)
Sets the the threshold value.This property works only the ThresholdHints.Customized Hints was set.
|
void |
setExpectedBarCodeCount(int value) |
void |
setImageBinarizationHints(ImageBinarization value)
Sets the image binarization hints.
|
void |
setOrientationHints(Orientation value)
Sets the orientation hints.
|
void |
setStripFNC(boolean value) |
void |
setTimeout(int value) |
public BarCodeReader(Bitmap image)
BarCodeReader constructor from an image
image
- A Bitmap instance containing the imagepublic BarCodeReader(Bitmap image, long type)
Initializes a new instance of the BarCodeReader
class.
image
- The image.type
- The BarCodeReadType.public BarCodeReader(Bitmap image, java.awt.Rectangle area, long type)
public void close()
Closes barcode reader.
public void dispose()
Release resource
public int getBarCodeOrientation()
public java.lang.String getCheckSum()
public int getChecksumValidation()
Enable checksum validation during recognition for 1D barcodes.
Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
Checksum never used: Codabar
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
Checksum always used: Rest symbologies
Value: The checksum validation flag.public byte[] getCodeBytes()
public java.lang.String getCodeText()
Gets the code text.
public int getCustomerInformationInterpretingType()
Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other.
public int getCustomizedScanStrength()
Gets the ScanStrength, value range is 1(weakest) to 100(strongest).
This property works only ScanStrengthHints.Customized was set to BarCodeReader.
public int getCustomizedThreshold()
Gets the the threshold value.This property works only the ThresholdHints.Customized Hints was set.
public int getExpectedBarCodeCount()
Expected barcodes to be found.The reader will stop reading the image once it found barcodes more than this value. Default value is int.MaxValue.
public ImageBinarization getImageBinarizationHints()
Gets the image binarization hints.
Value: The image binarization hints. Default value is None.public java.lang.String getMacroPdf417FileID()
Gets the file ID of the barcode, only available with MacroPdf417.
public boolean getMacroPdf417LastSegment()
Gets the last segment flag,only available with MacroPdf417..
public int getMacroPdf417SegmentID()
Gets the segment ID of the barcode,only available with MacroPdf417.
public Orientation getOrientationHints()
Gets the orientation hints.
Value: The orientation hints. Default value is NoRotate.public long getReadType()
Gets the barcode type.
public BarCodeRegion getRegion()
Gets the barcode region.
public boolean getStripFNC()
Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
public int getTimeout()
public static boolean isLicensed()
Gets a value indicating whether recognition module is licensed.
Value:true
if recognition module is licensed; otherwise, false
.public boolean read()
Reads barcode from the image.
Detect AllSupportedTypes[C#] BarCodeReader reader; reader = new BarCodeReader(@"c:\test.jpg"); while(reader.Read()) { Console.WriteLine("BarCode Type: "+reader.GetReadType()); Console.WriteLine("BarCode CodeText: " + reader.GetCodeText()); } reader.Close(); [VB.NET] Dim reader As BarCodeReader reader = New BarCodeReader("c:\test.jpg") While reader.Read() Console.WriteLine("BarCode Type: " & reader.GetReadType()) Console.WriteLine("BarCode CodeText: " & reader.GetCodeText()) End While reader.Close()
public void setChecksumValidation(int value)
public void setCustomerInformationInterpretingType(int value)
Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other.
public void setCustomizedScanStrength(int value)
Sets the ScanStrength, value range is 1(weakest) to 100(strongest).
This property works only ScanStrengthHints.Customized was set to BarCodeReader.
public void setCustomizedThreshold(int value)
Sets the the threshold value.This property works only the ThresholdHints.Customized Hints was set.
public void setExpectedBarCodeCount(int value)
public void setImageBinarizationHints(ImageBinarization value)
Sets the image binarization hints.
Value: The image binarization hints. Default value is None.public void setOrientationHints(Orientation value)
Sets the orientation hints.
Value: The orientation hints. Default value is NoRotate.public void setStripFNC(boolean value)
public void setTimeout(int value)