Package com.google.zxing.qrcode.detector
Class FinderPattern
java.lang.Object
com.google.zxing.ResultPoint
com.google.zxing.qrcode.detector.FinderPattern
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 -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
FinderPattern
(float posX, float posY, float estimatedModuleSize) private
FinderPattern
(float posX, float posY, float estimatedModuleSize, int count) -
Method Summary
Modifier and TypeMethodDescription(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
Methods inherited from class com.google.zxing.ResultPoint
distance, equals, getX, getY, hashCode, orderBestPatterns, toString
-
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
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.
-