Class FinderPattern

java.lang.Object
com.google.zxing.ResultPoint
com.google.zxing.qrcode.detector.FinderPattern

public final class FinderPattern extends ResultPoint

Encapsulates a finder pattern, which are the three square patterns found in the corners of QR Codes. It also encapsulates a count of similar finder patterns, as a convenience to the finder's bookkeeping.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final float
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    (package private)
    FinderPattern(float posX, float posY, float estimatedModuleSize)
     
    private
    FinderPattern(float posX, float posY, float estimatedModuleSize, int count)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
    aboutEquals(float moduleSize, float i, float j)
    Determines if this finder pattern "about equals" a finder pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.
    (package private) FinderPattern
    combineEstimate(float i, float j, float newModuleSize)
    Combines this object's current estimate of a finder pattern position and module size with a new estimate.
    int
     
    float
     

    Methods inherited from class com.google.zxing.ResultPoint

    distance, equals, getX, getY, hashCode, orderBestPatterns, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • estimatedModuleSize

      private final float estimatedModuleSize
    • count

      private final int count
  • Constructor Details

    • FinderPattern

      FinderPattern(float posX, float posY, float estimatedModuleSize)
    • FinderPattern

      private FinderPattern(float posX, float posY, float estimatedModuleSize, int count)
  • Method Details

    • getEstimatedModuleSize

      public float getEstimatedModuleSize()
    • getCount

      public int getCount()
    • aboutEquals

      boolean aboutEquals(float moduleSize, float i, float j)

      Determines if this finder pattern "about equals" a finder pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.

    • combineEstimate

      FinderPattern combineEstimate(float i, float j, float newModuleSize)
      Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new FinderPattern containing a weighted average based on count.