barcodereader-ag凯发旗舰厅



com.spire.barcode.implementation.scanner.reader
class barcodereader

java.lang.object
  extended by com.spire.barcode.implementation.scanner.reader.barcodereader

public class barcodereader
extends java.lang.object

constructor summary
barcodereader()
          initializes a new instance of the barcodereader class with default values.
barcodereader(com.spire.ms.system.drawing.bitmap image)
          initializes a new instance of the barcodereader class from an image.
barcodereader(com.spire.ms.system.drawing.bitmap image,  type)
          initializes a new instance of the barcodereader class.
(com.spire.ms.system.drawing.bitmap image, com.spire.ms.system.drawing.rectangle area,  type)
          initializes a new instance of the barcodereader class.
barcodereader(com.spire.ms.system.io.stream stream)
          initializes a new instance of the barcodereader class.
barcodereader(com.spire.ms.system.io.stream stream,  type)
          initializes a new instance of the barcodereader class.
barcodereader(java.lang.string filename)
          initializes a new instance of the barcodereader class from file.
barcodereader(java.lang.string filename,  type)
          initializes a new instance of the barcodereader class.
 
method summary
 void close()
          closes barcode reader.
 [] getallpossiblebarcodes()
          gets all possible barcodes found.
 float getangle()
          gets the angle of the barcode (0-360).
 java.lang.string getchecksum()
          gets the checksum for 1d barcodes.
  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 the checksum validation flag.
 byte[] getcodebytes()
          gets the encoded code bytes.
 java.lang.string getcodetext()
          gets the code text.
 java.lang.string getcodetext(com.spire.ms.system.text.encoding encoding)
          gets the code text with encoding.
 int getexpectedbarcodecount()
          expected barcodes to be found.the reader will stop reading the image once it found barcodes more than this value.
  getimagebinarizationhints()
          gets the image binarization hints.
 int getmacropdf417fileid()
          gets the file id of the barcode, only available with macropdf417.
 int getmacropdf417segmentid()
          gets the segment id of the barcode,only available with macropdf417.
 int getmacropdf417segmentscount()
          gets macro pdf417 barcode segments count.
 int getmediansmoothingwindowsize()
          gets the median smoothing window size.
  getorientationhints()
          gets the orientation hints.
 int getqrstructuredappendmodebarcodeindex()
          gets the index of the qr structured append mode barcode.
 int getqrstructuredappendmodebarcodesquantity()
          gets the qr structured append mode barcodes quantity.
 int getqrstructuredappendmodeparitydata()
          gets the qr structured append mode parity data.
  getreadtype()
          gets the barcode type.
 float getrecognitionquality()
          gets the recognition quality.
  getregion()
          gets the barcode dataregion.
 boolean getstripfnc()
          strip fnc1, fnc2, fnc3 characters from codetext.
 int gettimeout()
          gets the timeout of recognition process.
  getuserinfotype()
          gets the interpreting type for the customer information of australianpost barcode.default is userinfotype.other.
static boolean islicensed()
          gets a value indicating whether recognition module is licensed.
 boolean iswritewarning()
           
 boolean read()
          reads barcode from the image.
 void setbarcodeimage(com.spire.ms.system.drawing.bitmap value)
          sets bitmap image for recognition.
 void setbarcodeimage(java.lang.string filename)
          sets image file for recogniton.
 void setbarcodereadtype( type)
          sets barcodereadtype for recognition.
 void setchecksumvalidation( value)
          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 the checksum validation flag.
 void setexpectedbarcodecount(int value)
          expected barcodes to be found.the reader will stop reading the image once it found barcodes more than this value.
 void ( value)
          sets the image binarization hints.
 void setmediansmoothingwindowsize(int value)
          sets the median smoothing window size.
 void setorientationhints( value)
          gets the orientation hints.
 void setstripfnc(boolean value)
          strip fnc1, fnc2, fnc3 characters from codetext.
 void setuserinfotype( value)
          sets the interpreting type for the customer information of australianpost barcode.default is userinfotype.other.
 
constructor detail

barcodereader

public barcodereader()
initializes a new instance of the barcodereader class with default values. requires to set image (setbitmapimage()) before to call read() method.

barcodereader

public barcodereader(com.spire.ms.system.drawing.bitmap image)
initializes a new instance of the barcodereader class from an image.
parameters:
image - a bitmap instance containing the image

barcodereader

public barcodereader(com.spire.ms.system.drawing.bitmap image,
                      type)
initializes a new instance of the barcodereader class.
parameters:
image - the image.
type - the barcodereadtype.

barcodereader

public barcodereader(com.spire.ms.system.drawing.bitmap image,
                     com.spire.ms.system.drawing.rectangle area,
                      type)
initializes a new instance of the barcodereader class. not support compact framework.
parameters:
image - the image.
area - the area for recognition.
type - the barcodereadtype.

barcodereader

public barcodereader(java.lang.string filename)
initializes a new instance of the barcodereader class from file.
parameters:
filename - the filename.
throws:
java.lang.exception

barcodereader

public barcodereader(java.lang.string filename,
                      type)
initializes a new instance of the barcodereader class.
parameters:
filename - the filename.
type - the barcodereadtype.
throws:
java.lang.exception

barcodereader

public barcodereader(com.spire.ms.system.io.stream stream)
initializes a new instance of the barcodereader class.
parameters:
stream - the stream.

barcodereader

public barcodereader(com.spire.ms.system.io.stream stream,
                      type)
initializes a new instance of the barcodereader class.
parameters:
stream - the stream.
type - the the barcodereadtype.
method detail

iswritewarning

public boolean iswritewarning()

islicensed

public static boolean islicensed()
gets a value indicating whether recognition module is licensed. true if recognition module is licensed; otherwise, false.
returns:
boolean

gettimeout

public int gettimeout()
gets the timeout of recognition process. the timeout.
returns:
int

getchecksumvalidation

public  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 the checksum validation flag.

setchecksumvalidation

public void setchecksumvalidation( value)
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 the checksum validation flag.

getmediansmoothingwindowsize

public int getmediansmoothingwindowsize()
gets the median smoothing window size. typical values are 3 or 4. default value is 3. recognition hint mediansmoothing must be set. the median smoothing window size. typical values are 3 or 4. default value is 3.
returns:
int

setmediansmoothingwindowsize

public void setmediansmoothingwindowsize(int value)
sets the median smoothing window size. typical values are 3 or 4. default value is 3. recognition hint mediansmoothing must be set. the median smoothing window size. typical values are 3 or 4. default value is 3.
parameters:
value -

getexpectedbarcodecount

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.
returns:
int

setexpectedbarcodecount

public void setexpectedbarcodecount(int value)
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.
parameters:
value -

getstripfnc

public boolean getstripfnc()
strip fnc1, fnc2, fnc3 characters from codetext. default value is false.
returns:
boolean

setstripfnc

public void setstripfnc(boolean value)
strip fnc1, fnc2, fnc3 characters from codetext. default value is false.
parameters:
value -

getuserinfotype

public  getuserinfotype()
gets the interpreting type for the customer information of australianpost barcode.default is userinfotype.other.
returns:
userinfotype

setuserinfotype

public void setuserinfotype( value)
sets the interpreting type for the customer information of australianpost barcode.default is userinfotype.other.
parameters:
value -

close

public void close()
closes barcode reader.

read

public boolean read()
reads barcode from the image.
returns:
true if the next barcode was read successfully; false if there are no more nodes to read.

getorientationhints

public  getorientationhints()
gets the orientation hints. the orientation hints. default value is norotate.
returns:
orientation

setorientationhints

public void setorientationhints( value)
gets the orientation hints. the orientation hints. default value is norotate.
parameters:
value -

getimagebinarizationhints

public  getimagebinarizationhints()
gets the image binarization hints. the image binarization hints. default value is none.
returns:
imagebinarization

setimagebinarizationhints

public void setimagebinarizationhints( value)
sets the image binarization hints. the image binarization hints. default value is none.
parameters:
value -

getcodetext

public java.lang.string getcodetext()
gets the code text.
returns:
the code text of the barcode.

getcodetext

public java.lang.string getcodetext(com.spire.ms.system.text.encoding encoding)
gets the code text with encoding.
parameters:
encoding - the encoding for codetext.
returns:
a string containing recognized code text.

getchecksum

public java.lang.string getchecksum()
gets the checksum for 1d barcodes.
returns:
the checksum for 1d barcode.

getangle

public float getangle()
gets the angle of the barcode (0-360). recognitionhints.orientation enum does not included into the calculation.
returns:
the angle for barcode (0-360).

getcodebytes

public byte[] getcodebytes()
gets the encoded code bytes.
returns:
the code bytes of the barcode.

getmacropdf417fileid

public int getmacropdf417fileid()
gets the file id of the barcode, only available with macropdf417.
returns:
the file id for macropdf417

getmacropdf417segmentid

public int getmacropdf417segmentid()
gets the segment id of the barcode,only available with macropdf417.
returns:
the segment id of the barcode.

getmacropdf417segmentscount

public int getmacropdf417segmentscount()
gets macro pdf417 barcode segments count. default value is -1.
returns:
segments count.

getqrstructuredappendmodebarcodesquantity

public int getqrstructuredappendmodebarcodesquantity()
gets the qr structured append mode barcodes quantity. default value is -1.
returns:
the quantity of the qr structured append mode barcode.

getqrstructuredappendmodebarcodeindex

public int getqrstructuredappendmodebarcodeindex()
gets the index of the qr structured append mode barcode. index starts from 0. default value is -1.
returns:
the index of the qr structured append mode barcode.

getqrstructuredappendmodeparitydata

public int getqrstructuredappendmodeparitydata()
gets the qr structured append mode parity data. default value is -1.
returns:
the qr structured append mode parity data.

getregion

public  getregion()
gets the barcode dataregion.
returns:
the dataregion of the recognized barcode.

getreadtype

public  getreadtype()
gets the barcode type.
returns:
the type information of the recognized barcode.

getrecognitionquality

public float getrecognitionquality()
gets the recognition quality. works for 1d and postal barcodes.
returns:
the recognition quality percent.

getallpossiblebarcodes

public [] getallpossiblebarcodes()
gets all possible barcodes found. only for 1d barcodes. includes correct answer if the barcode recognized fine.
returns:
the array of possible 1d barcodes. includes correct answer if the barcode recognized fine.

setbarcodeimage

public void setbarcodeimage(com.spire.ms.system.drawing.bitmap value)
sets bitmap image for recognition. must be called before read() method.
parameters:
value - the bitmap image for recognition.

setbarcodeimage

public void setbarcodeimage(java.lang.string filename)
sets image file for recogniton. must be called before read() method.
parameters:
filename - the image file for recogniton.
throws:
java.lang.exception

setbarcodereadtype

public void setbarcodereadtype( type)
sets barcodereadtype for recognition. must be called before read() method.
parameters:
type - the type of barcode to read.


网站地图