Class QualitySettings

java.lang.Object
com.aspose.barcode.barcoderecognition.QualitySettings
All Implemented Interfaces:
android.os.Parcelable

public final class QualitySettings extends Object implements android.os.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());
 }
 

  • Field Details

    • CREATOR

      public static final android.os.Parcelable.Creator<QualitySettings> CREATOR
  • Constructor Details

    • QualitySettings

      protected QualitySettings(android.os.Parcel in)
    • QualitySettings

      public QualitySettings()

      QualitySettings constructor

  • Method Details

    • writeToParcel

      public void writeToParcel(android.os.Parcel dest, int flags)
      Specified by:
      writeToParcel in interface android.os.Parcelable
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • 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.
    • 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.
    • 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.
    • 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.
    • getImageScalingMode

      public com.aspose.barcode.barcoderecognition.ImageScalingMode getImageScalingMode()
      Allows scale the image with the specific ImageScaleMode
    • setImageScalingMode

      public void setImageScalingMode(com.aspose.barcode.barcoderecognition.ImageScalingMode value)
      Allows scale the image with the specific ImageScaleMode Value:
      Parameters:
      value - ImageScalingMode value
    • 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.
    • setXDimension

      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.
    • 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.
    • setMinimalXDimension

      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.
    • 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.
    • setBarcodeQuality

      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.
    • 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.
    • setDeconvolution

      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.
    • 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
    • setInverseImage

      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
    • 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.
    • setComplexBackground

      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.
    • 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.
    • setAllowIncorrectBarcodes

      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.