|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.barcoderecognition.BarCodeReader
public class BarCodeReader
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform Read operation to detect barcodes
Detect an code39 barcode with supplement[C#] BarCodeReader reader; BarCodeReader reader; reader = new BarCodeReader(@"c:\test.jpg",BarCodeReadType.Code39Standard); 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",BarCodeReadType.Code39Standard) While reader.Read() Console.WriteLine("BarCode Type: " + reader.GetReadType()) Console.WriteLine("BarCode CodeText: " + reader.GetCodeText()) End While reader.Close()
Constructor Summary | |
---|---|
BarCodeReader(BinarizedBitmap binarizedBitmap)
|
|
BarCodeReader(BinarizedBitmap image,
BarCodeReadType type)
|
|
BarCodeReader(BufferedImage image)
BarCodeReader constructor from an image |
|
BarCodeReader(BufferedImage image,
BarCodeReadType type)
Initializes a new instance of the BarCodeReader class. |
|
BarCodeReader(BufferedImage image,
Rectangle area,
BarCodeReadType type)
|
|
BarCodeReader(InputStream stream)
|
|
BarCodeReader(InputStream stream,
BarCodeReadType type)
|
|
BarCodeReader(String filename)
BarCodeReader constructor |
|
BarCodeReader(String filename,
BarCodeReadType type)
Initializes a new instance of the BarCodeReader class. |
Method Summary | |
---|---|
void |
close()
Closes barcode reader. |
int |
getBarCodeOrientation()
|
byte[] |
getCodeBytes()
|
String |
getCodeText()
Gets the code text. |
boolean |
getConfirmCheckSum()
Gets or sets if the checksum need to be confirmed. |
int |
getCustomerInformationInterpretingType()
Gets or sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. |
int |
getCustomizedScanStrength()
|
int |
getCustomizedThreshold()
Gets or sets 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. |
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. |
BarCodeReadType |
getReadType()
Gets the barcode type. |
BarCodeRegion |
getRegion()
Gets the barcode region. |
int |
getTimeout()
|
boolean |
read()
Reads barcode from the image. |
void |
setConfirmCheckSum(boolean value)
|
void |
setCustomerInformationInterpretingType(int value)
|
void |
setCustomizedScanStrength(int value)
|
void |
setCustomizedThreshold(int value)
|
void |
setExpectedBarCodeCount(int value)
|
void |
setHints(RecognitionHints hints)
|
void |
setTimeout(int value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BarCodeReader(BufferedImage image)
BarCodeReader constructor from an image
image
- A Bitmap instance containing the imagepublic BarCodeReader(BufferedImage image, BarCodeReadType type)
Initializes a new instance of the BarCodeReader
class.
image
- The image.type
- The BarCodeReadType.public BarCodeReader(BufferedImage image, Rectangle area, BarCodeReadType type)
public BarCodeReader(BinarizedBitmap image, BarCodeReadType type)
public BarCodeReader(String filename)
BarCodeReader constructor
filename
- The filename.public BarCodeReader(String filename, BarCodeReadType type)
Initializes a new instance of the BarCodeReader
class.
filename
- The filename.type
- The BarCodeReadType.public BarCodeReader(InputStream stream)
public BarCodeReader(InputStream stream, BarCodeReadType type)
public BarCodeReader(BinarizedBitmap binarizedBitmap)
Method Detail |
---|
public int getTimeout()
public void setTimeout(int value)
public int getCustomizedScanStrength()
public void setCustomizedScanStrength(int value)
public int getCustomizedThreshold()
Gets or sets the the threshold value.This property works only the ThresholdHints.Customized Hints was set.
public void setCustomizedThreshold(int value)
public boolean getConfirmCheckSum()
Gets or sets if the checksum need to be confirmed.
public void setConfirmCheckSum(boolean value)
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 void setExpectedBarCodeCount(int value)
public int getCustomerInformationInterpretingType()
Gets or sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other.
public void setCustomerInformationInterpretingType(int value)
public void close()
Closes barcode reader.
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 setHints(RecognitionHints hints)
public String getCodeText()
Gets the code text.
public int getBarCodeOrientation()
public byte[] getCodeBytes()
public String getMacroPdf417FileID()
Gets the file ID of the barcode, only available with MacroPdf417.
public int getMacroPdf417SegmentID()
Gets the segment ID of the barcode,only available with MacroPdf417.
public boolean getMacroPdf417LastSegment()
Gets the last segment flag,only available with MacroPdf417..
public BarCodeRegion getRegion()
Gets the barcode region.
public BarCodeReadType getReadType()
Gets the barcode type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |