Méthode | Description | |
---|---|---|
Detector ( BinaryBitmap image ) : System | ||
detect ( ) : |
Detects a PDF417 Code in an image, simply.
|
|
detect ( Object>.Dictionary |
Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.
|
Méthode | Description | |
---|---|---|
computeDimension ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint bottomRight, float moduleWidth ) : int |
Computes the dimension (number of modules in a row) of the PDF417 Code based on vertices of the codeword area and estimated module size.
|
|
computeModuleWidth ( ResultPoint vertices ) : float |
Estimates module size (pixels in a module) based on the Start and End finder patterns.
|
|
correctCodeWordVertices ( ResultPoint vertices, bool upsideDown ) : void |
Because we scan horizontally to detect the start and stop patterns, the vertical component of the codeword coordinates will be slightly wrong if there is any skew or rotation in the image. This method moves those points back onto the edges of the theoretically perfect bounding quadrilateral if needed.
|
|
findGuardPattern ( |
||
findVertices ( |
Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. Assumes that the barcode begins in the left half of the image, and ends in the right half. TODO: Fix this assumption, allowing the barcode to be anywhere in the image. TODO: Scanning every row is very expensive. We should only do this for TRY_HARDER.
|
|
findVertices180 ( |
Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. This assumes that the image is rotated 180 degrees and if it locates the start and stop patterns at it will re-map the vertices for a 0 degree rotation. TODO: Change assumption about barcode location. TODO: Scanning every row is very expensive. We should only do this for TRY_HARDER.
|
|
patternMatchVariance ( int counters, int pattern, int maxIndividualVariance ) : int |
Determines how closely a set of observed counts of runs of black/white values matches a given target pattern. This is reported as the ratio of the total variance from the expected pattern proportions across all pattern elements, to the length of the pattern.
|
|
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 ( |
public Detector ( BinaryBitmap image ) : System | ||
image | BinaryBitmap | |
Résultat | System |
public detect ( Object>.Dictionary |
||
hints | Object>.Dictionary | optional hints to detector /// |
Résultat |