Houjie
2025-07-24 52a3ff1bce1417b39f6872d8e8cb378e9c2ccc6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import BitMatrix from '../../common/BitMatrix';
import DetectorResult from '../../common/DetectorResult';
/**
 * <p>Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code
 * is rotated or skewed, or partially obscured.</p>
 *
 * @author Sean Owen
 */
export default class Detector {
    private image;
    private rectangleDetector;
    constructor(image: BitMatrix);
    /**
     * <p>Detects a Data Matrix Code in an image.</p>
     *
     * @return {@link DetectorResult} encapsulating results of detecting a Data Matrix Code
     * @throws NotFoundException if no Data Matrix Code can be found
     */
    detect(): DetectorResult;
    private static shiftPoint;
    private static moveAway;
    /**
     * Detect a solid side which has minimum transition.
     */
    private detectSolid1;
    /**
     * Detect a second solid side next to first solid side.
     */
    private detectSolid2;
    /**
     * Calculates the corner position of the white top right module.
     */
    private correctTopRight;
    /**
     * Shift the edge points to the module center.
     */
    private shiftToModuleCenter;
    private isValid;
    private static sampleGrid;
    /**
     * Counts the number of black/white transitions between two points, using something like Bresenham's algorithm.
     */
    private transitionsBetween;
}