Class ConfigQrCode

All Implemented Interfaces:
Configuration, Serializable

public class ConfigQrCode extends Object implements Configuration
Configuration for QrCodePreciseDetector
See Also:
  • Field Details

    • threshold

      public ConfigThreshold threshold
      Specifies how images are thresholded and converted into a binary format
    • polygon

      public ConfigPolygonDetector polygon
      Configuration for polygon detector that's used to find position patterns
    • versionMinimum

      public int versionMinimum
      Minimum and maximum assumed version of QR Codes. Can be used to reduce false positives, slightly.
    • versionMaximum

      public int versionMaximum
    • forceEncoding

      @Nullable public @Nullable String forceEncoding
      If not null, then when decoding BYTE mode data it will always use this encoding. This can be desirable if the automatic encoding detection is making a mistake or if you know the data is binary. For binary data you should set this to EciEncoding.BINARY.
    • defaultEncoding

      public String defaultEncoding
      Fore BYTE mode, if the auto encoding detection decides it's not UTF-8 then it will use this encoding. Depending on which QR code standard you are following (few people follow either) it should be EciEncoding.ISO8859_1 or EciEncoding.JIS.
    • considerTransposed

      public boolean considerTransposed
      If true it will consider QR codes which have been incorrectly encoded with transposed bits. Set to false if you know your markers are standard compliant and want a modest speed boost.
    • ignorePaddingBytes

      public boolean ignorePaddingBytes
      This turns off the check to ensure padding bytes have the expected pattern. This was added due to a bug in a popular encoder where for messages of a certain length it would be off by one. Since no data is encoded in the padding and bugs are so common in encoders, by default we will ignore the padding.
  • Constructor Details

    • ConfigQrCode

      public ConfigQrCode()
  • Method Details

    • fast

      public static ConfigQrCode fast()
      Default configuration for a QR Code detector which is optimized for speed
    • setTo

      public ConfigQrCode setTo(ConfigQrCode src)
    • checkValidity

      public void checkValidity()
      Description copied from interface: Configuration
      Checks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect.
      Specified by:
      checkValidity in interface Configuration