public class Detector
extends java.lang.Object
| Constructor and Description |
|---|
Detector(BitMatrix image) |
| Modifier and Type | Method and Description |
|---|---|
protected float |
calculateModuleSize(ResultPoint topLeft,
ResultPoint topRight,
ResultPoint bottomLeft)
Computes an average estimated module size based on estimated derived from
the positions of the three finder patterns.
|
protected static int |
computeDimension(ResultPoint topLeft,
ResultPoint topRight,
ResultPoint bottomLeft,
float moduleSize)
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.
|
static PerspectiveTransform |
createTransform(ResultPoint topLeft,
ResultPoint topRight,
ResultPoint bottomLeft,
ResultPoint alignmentPattern,
int dimension) |
DetectorResult |
detect()
Detects a QR Code in an image, simply.
|
DetectorResult |
detect(java.util.Map<DecodeHintType,?> hints)
Detects a QR Code in an image, simply.
|
protected AlignmentPattern |
findAlignmentInRegion(float overallEstModuleSize,
int estAlignmentX,
int estAlignmentY,
float allowanceFactor)
Attempts to locate an alignment pattern in a limited region of the image,
which is guessed to contain it.
|
protected BitMatrix |
getImage() |
protected ResultPointCallback |
getResultPointCallback() |
protected DetectorResult |
processFinderPatternInfo(FinderPatternInfo info) |
protected BitMatrix getImage()
protected ResultPointCallback getResultPointCallback()
public DetectorResult detect()
throws NotFoundException,
FormatException
NotFoundExceptionFormatExceptionpublic DetectorResult detect(java.util.Map<DecodeHintType,?> hints)
throws NotFoundException,
FormatException
hints - optional hints to detectorNotFoundExceptionFormatExceptionprotected DetectorResult processFinderPatternInfo(FinderPatternInfo info) throws NotFoundException, FormatException
NotFoundExceptionFormatExceptionpublic static PerspectiveTransform createTransform(ResultPoint topLeft,
ResultPoint topRight,
ResultPoint bottomLeft,
ResultPoint alignmentPattern,
int dimension)
protected static int computeDimension(ResultPoint topLeft,
ResultPoint topRight,
ResultPoint bottomLeft,
float moduleSize)
throws NotFoundException
NotFoundExceptionprotected float calculateModuleSize(ResultPoint topLeft,
ResultPoint topRight,
ResultPoint bottomLeft)
protected AlignmentPattern findAlignmentInRegion(float overallEstModuleSize, int estAlignmentX, int estAlignmentY, float allowanceFactor) throws NotFoundException
AlignmentPatternoverallEstModuleSize - estimated module size so farestAlignmentX - x coordinate of center of area probably containing alignment
patternestAlignmentY - y coordinate of aboveallowanceFactor - number of pixels in all directions to search from the centerNotFoundException