Class ConfigECoCheckMarkers

All Implemented Interfaces:
Configuration, Serializable

public class ConfigECoCheckMarkers extends Object implements Configuration
Specifies the grid shape and physical sizes for one or more ConfigECoCheckDetector type markers. In most use cases, having a single marker shape is desirable. However, the detector supports arbitrary shapes for each marker. This configuration can do both by allowing the first marker in the list to be duplicated.
See Also:
  • Field Details


      public static final int DEFAULT_CHECKSUM
      See Also:

      public static final int DEFAULT_ECC
      See Also:
    • dataBitWidthFraction

      public double dataBitWidthFraction
      Fraction of a cell's length the data bit is
    • dataBorderFraction

      public double dataBorderFraction
      Fraction of the length the quite-zone is around data bits
    • firstTargetDuplicated

      public int firstTargetDuplicated
      Number of times the first marker is duplicated.
    • markerShapes

      public final FastArray<ConfigECoCheckMarkers.MarkerShape> markerShapes
      Shapes of individual markers. The first marker might be duplicated.
    • errorCorrectionLevel

      public int errorCorrectionLevel

      Amount of error correction applied. Larger values increase the number of data bits that need to be encoded, but increase the number of errors it can recover from. More bits means smaller dots and more errors. If there are extra bits in the square they will be allocated to error correction automatically. If two targets have different amounts of error correction they will be incompatible.

      0 = no error correction. 9 = maximum amount.
    • checksumBits

      public int checksumBits
      Number of bits allocated to the checksum. There can be at most 8 bits.
  • Constructor Details

    • ConfigECoCheckMarkers

      public ConfigECoCheckMarkers()
  • Method Details

    • singleShape

      public static ConfigECoCheckMarkers singleShape(int rows, int cols, int numMarkers, double squareSize)
      Configures N markers with the same shape
    • parse

      public static ConfigECoCheckMarkers parse(String description, double squareSize)
      Parses the standard compact name string and converts it into a configuration. Note that error correction 'e' and checksum 'c' are optional. See compactName() for a summary of this string format.
    • convertToGridList

      public void convertToGridList(List<GridShape> markers)
      Converts this configuration into a list of GridShapes
      markers - (Output) Storage for converted shapes
    • setTo

    • compactName

      public String compactName()

      String which compactly describes markers with duplicate shapes.

      • Example: 9x7n1e3c6 means 9x7 pattern, 1 possible marker, with error correction level of 3, checksum with 6 bits.
      • Example: 9x7n1 is the same, but ecc and checksum have default values.
    • 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