GridSampler

abstract class GridSampler

Implementations of this class can, given locations of finder patterns for a QR code in an image, sample the right points in the image to reconstruct the QR code, accounting for perspective distortion. It is abstracted since it is relatively expensive and should be allowed to take advantage of platform-specific optimized implementations, like Sun's Java Advanced Imaging library, but which may not be available in other environments such as J2ME, and vice versa.

The implementation used can be controlled by calling setGridSampler with an instance of a class which implements this interface.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun sampleGrid(image: BitMatrix, dimensionX: Int, dimensionY: Int, transform: PerspectiveTransform): BitMatrix

abstract fun sampleGrid(image: BitMatrix, dimensionX: Int, dimensionY: Int, p1ToX: Float, p1ToY: Float, p2ToX: Float, p2ToY: Float, p3ToX: Float, p3ToY: Float, p4ToX: Float, p4ToY: Float, p1FromX: Float, p1FromY: Float, p2FromX: Float, p2FromY: Float, p3FromX: Float, p3FromY: Float, p4FromX: Float, p4FromY: Float): BitMatrix

Samples an image for a rectangular matrix of bits of the given dimension. The sampling transformation is determined by the coordinates of 4 points, in the original and transformed image space.