Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

author

Sean Owen

Hierarchy

Index

Constructors

constructor

  • new FinderPattern(posX: number, posY: number, estimatedModuleSize: number, count?: number): FinderPattern

Properties

Private Optional count

count: number

Private estimatedModuleSize

estimatedModuleSize: number

Methods

aboutEquals

  • aboutEquals(moduleSize: number, i: number, j: number): boolean
  • 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.

    Parameters

    • moduleSize: number
    • i: number
    • j: number

    Returns boolean

combineEstimate

  • combineEstimate(i: number, j: number, newModuleSize: number): FinderPattern
  • Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new {@code FinderPattern} containing a weighted average based on count.

    Parameters

    • i: number
    • j: number
    • newModuleSize: number

    Returns FinderPattern

equals

  • equals(other: Object): boolean

getCount

  • getCount(): number

getEstimatedModuleSize

  • getEstimatedModuleSize(): number

getX

  • getX(): float

getY

  • getY(): float

hashCode

  • hashCode(): int

toString

  • toString(): string

Static distance

Static orderBestPatterns

  • orderBestPatterns(patterns: Array<ResultPoint>): void
  • 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<ResultPoint>

      array of three {@code ResultPoint} to order

    Returns void

Generated using TypeDoc