Method | Description | |
---|---|---|
Detector ( |
||
createTransform ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension ) : |
||
detect ( ) : |
Detects a QR Code in an image, simply.
|
|
detect ( Object>.Dictionary |
Detects a QR Code in an image, simply.
|
Method | Description | |
---|---|---|
calculateModuleSize ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft ) : float |
Computes an average estimated module size based on estimated derived from the positions of the three finder patterns.
|
|
computeDimension ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, float moduleSize ) : int |
Computes the dimension (number of modules on a size) of the QR Code based on the position of the finder patterns and estimated module size.
|
|
findAlignmentInRegion ( float overallEstModuleSize, int estAlignmentX, int estAlignmentY, float allowanceFactor ) : AlignmentPattern |
Attempts to locate an alignment pattern in a limited region of the image, which is guessed to contain it. This method uses {@link AlignmentPattern}.
|
|
processFinderPatternInfo ( FinderPatternInfo info ) : |
Method | Description | |
---|---|---|
calculateModuleSizeOneWay ( ResultPoint pattern, ResultPoint otherPattern ) : float |
Estimates module size based on two finder patterns -- it uses {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the width of each, measuring along the axis between their centers.
|
|
round ( float d ) : int |
Ends up being a bit faster than Math.round(). This merely rounds its argument to the nearest int, where x.5 rounds up.
|
|
sampleGrid ( |
||
sizeOfBlackWhiteBlackRun ( int fromX, int fromY, int toX, int toY ) : float |
This method traces a line from a point in the image, in the direction towards another point. It begins in a black region, and keeps going until it finds white, then black, then white again. It reports the distance from the start to this point. This is used when figuring out how wide a finder pattern is, when the finder pattern may be skewed or rotated.
|
|
sizeOfBlackWhiteBlackRunBothWays ( int fromX, int fromY, int toX, int toY ) : float |
See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of a finder pattern by looking for a black-white-black run from the center in the direction of another point (another finder pattern center), and in the opposite direction too.
|
public Detector ( |
||
image | ||
return | System |
protected calculateModuleSize ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft ) : float | ||
topLeft | ResultPoint | |
topRight | ResultPoint | |
bottomLeft | ResultPoint | |
return | float |
protected static computeDimension ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, float moduleSize ) : int | ||
topLeft | ResultPoint | |
topRight | ResultPoint | |
bottomLeft | ResultPoint | |
moduleSize | float | |
return | int |
public createTransform ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension ) : |
||
topLeft | ResultPoint | |
topRight | ResultPoint | |
bottomLeft | ResultPoint | |
alignmentPattern | ResultPoint | |
dimension | int | |
return |
public detect ( Object>.Dictionary |
||
hints | Object>.Dictionary | optional hints to detector /// |
return |
protected findAlignmentInRegion ( float overallEstModuleSize, int estAlignmentX, int estAlignmentY, float allowanceFactor ) : AlignmentPattern | ||
overallEstModuleSize | float | estimated module size so far /// |
estAlignmentX | int | x coordinate of center of area probably containing alignment pattern /// |
estAlignmentY | int | y coordinate of above /// |
allowanceFactor | float | number of pixels in all directions to search from the center /// |
return | AlignmentPattern |
protected processFinderPatternInfo ( FinderPatternInfo info ) : |
||
info | FinderPatternInfo | |
return |