Class ResultPoint


  • 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.

    Author:
    Sean Owen
    • Constructor Detail

      • ResultPoint

        public ResultPoint​(float x,
                           float y)
    • Method Detail

      • getX

        public final float getX()
      • getY

        public final float getY()
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • orderBestPatterns

        public static void orderBestPatterns​(ResultPoint[] patterns)

        Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and BC < AC and the angle between BC and BA is less than 180 degrees.

      • distance

        public static float distance​(ResultPoint pattern1,
                                     ResultPoint pattern2)
        Returns:
        distance between two points