GridSampler class abstract

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(GridSampler) with an instance of a class which implements this interface.

@author Sean Owen

Implementers

Constructors

GridSampler()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sampleGrid(BitMatrix image, int dimensionX, int dimensionY, PerspectiveTransform transform) BitMatrix
sampleGridBulk(BitMatrix image, int dimensionX, int dimensionY, double p1ToX, double p1ToY, double p2ToX, double p2ToY, double p3ToX, double p3ToY, double p4ToX, double p4ToY, double p1FromX, double p1FromY, double p2FromX, double p2FromY, double p3FromX, double p3FromY, double p4FromX, double p4FromY) 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.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

checkAndNudgePoints(BitMatrix image, List<double> points) → 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.
getInstance() GridSampler
@return the current implementation of GridSampler
setGridSampler(GridSampler newGridSampler) → void
Sets the implementation of GridSampler used by the library. One global instance is stored, which may sound problematic. But, the implementation provided ought to be appropriate for the entire platform, and all uses of this library in the whole lifetime of the JVM. For instance, an Android activity can swap in an implementation that takes advantage of native platform libraries.