Package io.scanbot.sdk.barcode.entity
Class ResultPoint
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class ResultPoint implements Parcelable
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 Summary
Constructors Constructor Description ResultPoint(Float x, Float y)
-
Method Summary
Modifier and Type Method Description final Float
getX()
final Float
getY()
Integer
describeContents()
final static Unit
orderBestPatterns(Array<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. final static Float
distance(ResultPoint pattern1, ResultPoint pattern2)
final static Float
distance(Float aX, Float aY, Float bX, Float bY)
-
-
Method Detail
-
describeContents
Integer describeContents()
-
orderBestPatterns
final static Unit orderBestPatterns(Array<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.
- Parameters:
patterns
- array of threeResultPoint
to order
-
distance
final static Float distance(ResultPoint pattern1, ResultPoint pattern2)
- Parameters:
pattern1
- first patternpattern2
- second pattern
-
-
-
-