Package com.google.zxing.qrcode.detector
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 int
count
private float
estimatedModuleSize
-
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
All Methods Instance Methods Concrete Methods 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
getCount()
float
getEstimatedModuleSize()
-
Methods inherited from class com.google.zxing.ResultPoint
distance, equals, getX, getY, hashCode, orderBestPatterns, toString
-
-
-
-
Method Detail
-
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 newFinderPattern
containing a weighted average based on count.
-
-