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
45
46
47
48
49
//! Symbology-agnostic image-processing toolkit shared by 2D barcode samplers.
//!
//! A per-symbology *sampler* turns a [`GrayFrame`] containing a matrix code into a
//! clean [`BitMatrix`] for the symbology's decoder. This module provides the shared
//! primitives every such sampler needs, none of them tied to a particular code:
//!
//! - [`binary`] — an owned [`BinaryImage`] (dark = `true`) with accessors.
//! - [`integral`] — an [`IntegralImage`] for O(1) box sums (used by adaptive
//! thresholding and blob analysis).
//! - [`threshold`] — global [`otsu_threshold`] and adaptive local binarization
//! ([`adaptive_binarize_bradley`], [`adaptive_binarize_sauvola`]) robust to
//! uneven lighting.
//! - [`components`] — [`connected_components`] labeling (4/8-connectivity) returning
//! per-blob bounding boxes, centroids and areas.
//! - [`homography`] — a 3×3 [`Homography`] solved from four point correspondences,
//! with forward mapping and inversion.
//! - `line` — least-squares line fitting and a seeded [`ransac_line`] fitter for
//! locating code borders.
//! - `sample` — [`sample_grid`], the sub-pixel bilinear grid reader that turns a
//! warped frame plus a homography into a [`BitMatrix`].
//! - [`edges`] — Sobel gradient magnitude and binary morphology (erode/dilate).
//! - [`rng`] — a small explicit seeded [`Prng`] so any randomness is reproducible.
//!
//! Everything here is deterministic and dependency-free.
//!
//! [`GrayFrame`]: crate::image::GrayFrame
//! [`BitMatrix`]: crate::output::BitMatrix
pub use BinaryImage;
pub use ;
pub use ;
pub use Homography;
pub use IntegralImage;
pub use ;
pub use Prng;
pub use ;
pub use ;