QualitySettings
Inheritance: java.lang.Object
All Implemented Interfaces: android.os.Parcelable
public final class QualitySettings implements Parcelable
QualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings with embedded presets: HighPerformance, NormalQuality, HighQuality, MaxQuality or you can manually configure separate options. Default value of QualitySettings is NormalQuality.
This sample shows how to use QualitySettings with BarCodeReader //set HighPerformance recogition mode BarCodeReader reader = new BarCodeReader("test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getHighPerformance()); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); } //set HighQuality recognition mode BarCodeReader reader = new BarCodeReader("test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getHighQuality()); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); } //set HighPerformance recogition mode for low sized barcodes BarCodeReader reader = new BarCodeReader("test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getHighPerformance()); reader.getQualitySettings().setXDimension(XDimensionMode.SMALL); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); } //set HighPerformance recogition mode for low quality barcodes BarCodeReader reader = new BarCodeReader("test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getHighPerformance()); reader.getQualitySettings().setBarcodeQuality(BarcodeQualityMode.LOW); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); }
Constructors
Constructor | Description |
---|---|
QualitySettings() | QualitySettings constructor |
Fields
Field | Description |
---|---|
CREATOR |
Methods
Method | Description |
---|---|
describeContents() | |
equals(Object arg0) | |
getAllowIncorrectBarcodes() | Allows engine to recognize barcodes which has incorrect checksumm or incorrect values. |
getBarcodeQuality() | Mode which enables methods to recognize barcode elements with the selected quality. |
getClass() | |
getComplexBackground() | Mode which enables or disables additional recognition of color barcodes on color images. |
getDeconvolution() | Deconvolution (image restorations) mode which defines level of image degradation. |
getHighPerformance() | HighPerformance recognition quality preset. |
getHighQuality() | HighQuality recognition quality preset. |
getImageScalingMode() | Allows scale the image with the specific ImageScaleMode |
getInverseImage() | Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance). |
getMaxQuality() | MaxQuality recognition quality preset. |
getMinimalXDimension() | Minimal size of XDimension in pixels which is used with UseMinimalXDimension. |
getNormalQuality() | NormalQuality recognition quality preset. |
getXDimension() | Recognition mode which sets size (from 1 to infinity) of barcode minimal element: matrix cell or bar. |
hashCode() | |
notify() | |
notifyAll() | |
setAllowIncorrectBarcodes(boolean value) | Allows engine to recognize barcodes which has incorrect checksumm or incorrect values. |
setBarcodeQuality(BarcodeQualityMode value) | Mode which enables methods to recognize barcode elements with the selected quality. |
setComplexBackground(ComplexBackgroundMode value) | Mode which enables or disables additional recognition of color barcodes on color images. |
setDeconvolution(DeconvolutionMode value) | Deconvolution (image restorations) mode which defines level of image degradation. |
setImageScalingMode(ImageScalingMode value) | Allows scale the image with the specific ImageScaleMode Value: |
setInverseImage(InverseImageMode value) | Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance). |
setMinimalXDimension(float value) | Minimal size of XDimension in pixels which is used with UseMinimalXDimension. |
setXDimension(XDimensionMode value) | Recognition mode which sets size (from 1 to infinity) of barcode minimal element: matrix cell or bar. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) | |
writeToParcel(Parcel dest, int flags) |
QualitySettings()
public QualitySettings()
QualitySettings constructor
CREATOR
public static final Parcelable.Creator<QualitySettings> CREATOR
describeContents()
public int describeContents()
Returns: int
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAllowIncorrectBarcodes()
public boolean getAllowIncorrectBarcodes()
Allows engine to recognize barcodes which has incorrect checksumm or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text.
Value: Allows engine to recognize incorrect barcodes.
Returns: boolean
getBarcodeQuality()
public BarcodeQualityMode getBarcodeQuality()
Mode which enables methods to recognize barcode elements with the selected quality. Barcode element with lower quality requires more hard methods which slows the recognition.
Value: Mode which enables methods to recognize barcode elements with the selected quality.
Returns: BarcodeQualityMode
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getComplexBackground()
public ComplexBackgroundMode getComplexBackground()
Mode which enables or disables additional recognition of color barcodes on color images.
Value: Additional recognition of color barcodes on color images.
Returns: ComplexBackgroundMode
getDeconvolution()
public DeconvolutionMode getDeconvolution()
Deconvolution (image restorations) mode which defines level of image degradation. Originally deconvolution is a function which can restore image degraded (convoluted) by any natural function like blur, during obtaining image by camera. Because we cannot detect image function which corrupt the image, we have to check most well know functions like sharp or mathematical morphology.
Value: Deconvolution mode which defines level of image degradation.
Returns: DeconvolutionMode
getHighPerformance()
public static QualitySettings getHighPerformance()
HighPerformance recognition quality preset. High quality barcodes are recognized well in this mode.
This sample shows how to use HighPerformance mode BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getHighPerformance()); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); }
Value: HighPerformance recognition quality preset.
Returns: QualitySettings
getHighQuality()
public static QualitySettings getHighQuality()
HighQuality recognition quality preset. This preset is developed for low quality barcodes. Allows to detect highly damaged barcodes.
This sample shows how to use HighQuality mode BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getHighQuality()); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); }
Value: HighQuality recognition quality preset.
Returns: QualitySettings
getImageScalingMode()
public ImageScalingMode getImageScalingMode()
Allows scale the image with the specific ImageScaleMode
Returns: com.aspose.barcode.barcoderecognition.ImageScalingMode
getInverseImage()
public InverseImageMode getInverseImage()
Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance).
Value: Additional recognition of barcodes on images with inverse colors
Returns: InverseImageMode
getMaxQuality()
public static QualitySettings getMaxQuality()
MaxQuality recognition quality preset. This preset is developed to recognize all possible barcodes, even incorrect barcodes.
This sample shows how to use MaxQuality mode BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getMaxQuality()); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); }
Value: MaxQuality recognition quality preset.
Returns: QualitySettings
getMinimalXDimension()
public float getMinimalXDimension()
Minimal size of XDimension in pixels which is used with UseMinimalXDimension.
Value: Minimal size of XDimension in pixels which is used with UseMinimalXDimension.
Returns: float
getNormalQuality()
public static QualitySettings getNormalQuality()
NormalQuality recognition quality preset. Suitable for the most of barcodes
This sample shows how to use NormalQuality mode BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128); { reader.setQualitySettings(QualitySettings.getNormalQuality()); for(BarCodeResult result : reader.readBarCodes()) System.out.println(result.getCodeText()); }
Value: NormalQuality recognition quality preset.
Returns: QualitySettings
getXDimension()
public XDimensionMode getXDimension()
Recognition mode which sets size (from 1 to infinity) of barcode minimal element: matrix cell or bar.
Value: size (from 1 to infinity) of barcode minimal element: matrix cell or bar.
Returns: XDimensionMode
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAllowIncorrectBarcodes(boolean value)
public void setAllowIncorrectBarcodes(boolean value)
Allows engine to recognize barcodes which has incorrect checksumm or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text.
Value: Allows engine to recognize incorrect barcodes.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setBarcodeQuality(BarcodeQualityMode value)
public void setBarcodeQuality(BarcodeQualityMode value)
Mode which enables methods to recognize barcode elements with the selected quality. Barcode element with lower quality requires more hard methods which slows the recognition.
Value: Mode which enables methods to recognize barcode elements with the selected quality.
Parameters:
Parameter | Type | Description |
---|---|---|
value | BarcodeQualityMode |
setComplexBackground(ComplexBackgroundMode value)
public void setComplexBackground(ComplexBackgroundMode value)
Mode which enables or disables additional recognition of color barcodes on color images.
Value: Additional recognition of color barcodes on color images.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ComplexBackgroundMode |
setDeconvolution(DeconvolutionMode value)
public void setDeconvolution(DeconvolutionMode value)
Deconvolution (image restorations) mode which defines level of image degradation. Originally deconvolution is a function which can restore image degraded (convoluted) by any natural function like blur, during obtaining image by camera. Because we cannot detect image function which corrupt the image, we have to check most well know functions like sharp or mathematical morphology.
Value: Deconvolution mode which defines level of image degradation.
Parameters:
Parameter | Type | Description |
---|---|---|
value | DeconvolutionMode |
setImageScalingMode(ImageScalingMode value)
public void setImageScalingMode(ImageScalingMode value)
Allows scale the image with the specific ImageScaleMode Value:
Parameters:
Parameter | Type | Description |
---|---|---|
value | com.aspose.barcode.barcoderecognition.ImageScalingMode | ImageScalingMode value |
setInverseImage(InverseImageMode value)
public void setInverseImage(InverseImageMode value)
Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance).
Value: Additional recognition of barcodes on images with inverse colors
Parameters:
Parameter | Type | Description |
---|---|---|
value | InverseImageMode |
setMinimalXDimension(float value)
public void setMinimalXDimension(float value)
Minimal size of XDimension in pixels which is used with UseMinimalXDimension.
Value: Minimal size of XDimension in pixels which is used with UseMinimalXDimension.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float |
setXDimension(XDimensionMode value)
public void setXDimension(XDimensionMode value)
Recognition mode which sets size (from 1 to infinity) of barcode minimal element: matrix cell or bar.
Value: size (from 1 to infinity) of barcode minimal element: matrix cell or bar.
Parameters:
Parameter | Type | Description |
---|---|---|
value | XDimensionMode |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |
writeToParcel(Parcel dest, int flags)
public void writeToParcel(Parcel dest, int flags)
Parameters:
Parameter | Type | Description |
---|---|---|
dest | android.os.Parcel | |
flags | int |