public class ResultPoint
extends java.lang.Object
Encapsulates a point of interest in an image containing a barcode. Typically, this would be the location of a finder pattern or the corner of the barcode, for example.
Constructor and Description |
---|
ResultPoint(float x,
float y) |
Modifier and Type | Method and Description |
---|---|
private static float |
crossProductZ(ResultPoint pointA,
ResultPoint pointB,
ResultPoint pointC)
Returns the z component of the cross product between vectors BC and BA.
|
static float |
distance(ResultPoint pattern1,
ResultPoint pattern2) |
boolean |
equals(java.lang.Object other) |
float |
getX() |
float |
getY() |
int |
hashCode() |
static void |
orderBestPatterns(ResultPoint[] patterns)
Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
and BC is less than AC, and the angle between BC and BA is less than 180 degrees.
|
java.lang.String |
toString() |
public final float getX()
public final float getY()
public final boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object
public static void orderBestPatterns(ResultPoint[] patterns)
patterns
- array of three ResultPoint
to orderpublic static float distance(ResultPoint pattern1, ResultPoint pattern2)
pattern1
- first patternpattern2
- second patternprivate static float crossProductZ(ResultPoint pointA, ResultPoint pointB, ResultPoint pointC)