Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultGridSampler

author

Sean Owen

Hierarchy

Index

Methods

sampleGrid

  • sampleGrid(image: BitMatrix, dimensionX: number, dimensionY: number, p1ToX: number, p1ToY: number, p2ToX: number, p2ToY: number, p3ToX: number, p3ToY: number, p4ToX: number, p4ToY: number, p1FromX: number, p1FromY: number, p2FromX: number, p2FromY: number, p3FromX: number, p3FromY: number, p4FromX: number, p4FromY: number): BitMatrix
  • Parameters

    • image: BitMatrix
    • dimensionX: number
    • dimensionY: number
    • p1ToX: number
    • p1ToY: number
    • p2ToX: number
    • p2ToY: number
    • p3ToX: number
    • p3ToY: number
    • p4ToX: number
    • p4ToY: number
    • p1FromX: number
    • p1FromY: number
    • p2FromX: number
    • p2FromY: number
    • p3FromX: number
    • p3FromY: number
    • p4FromX: number
    • p4FromY: number

    Returns BitMatrix

sampleGridWithTransform

Static Protected checkAndNudgePoints

  • checkAndNudgePoints(image: BitMatrix, points: Float32Array): void
  • Checks a set of points that have been transformed to sample points on an image against the image's dimensions to see if the point are even within the image.

    This method will actually "nudge" the endpoints back onto the image if they are found to be barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder patterns in an image where the QR Code runs all the way to the image border.

    For efficiency, the method will check points from either end of the line until one is found to be within the image. Because the set of points are assumed to be linear, this is valid.

    throws

    NotFoundException if an endpoint is lies outside the image boundaries

    Parameters

    • image: BitMatrix

      image into which the points should map

    • points: Float32Array

      actual points in x1,y1,...,xn,yn form

    Returns void

Generated using TypeDoc