Skip to main content

Crate projective_grid

Crate projective_grid 

Source
Expand description

Image-free recovery of regular projective grids from 2D point evidence.

The ordinary workflow has one entry point and production defaults:

use nalgebra::Point2;
use projective_grid::{
    detect_grid, DetectionRequest, Evidence, LatticeKind, LocalAxis,
    OrientedFeature, PointFeature,
};

let features = vec![
    OrientedFeature::new(
        PointFeature::new(0, Point2::new(0.0, 0.0)),
        [LocalAxis::new(0.0, None), LocalAxis::new(1.57, None)],
    ),
    OrientedFeature::new(
        PointFeature::new(1, Point2::new(10.0, 0.0)),
        [LocalAxis::new(0.0, None), LocalAxis::new(1.57, None)],
    ),
    OrientedFeature::new(
        PointFeature::new(2, Point2::new(10.0, 10.0)),
        [LocalAxis::new(0.0, None), LocalAxis::new(1.57, None)],
    ),
    OrientedFeature::new(
        PointFeature::new(3, Point2::new(0.0, 10.0)),
        [LocalAxis::new(0.0, None), LocalAxis::new(1.57, None)],
    ),
];
let request = DetectionRequest::new(
    LatticeKind::Square,
    Evidence::Oriented2(&features),
);
let detection = detect_grid(request)?;

Pattern-specific detector builders use the curated expert namespace. Exact intermediate evidence is available through the opt-in diagnostics feature.

Modules§

diagnostics
Opt-in evidence explaining how detections were produced.
expert
Expert composition surface for detector builders.

Structs§

ConsistencyParams
Parameters for coordinate-hypothesis consistency checks.
ConsistencyReport
Report returned by coordinate-hypothesis consistency checks.
ConsistencyRequest
Coordinate-hypothesis consistency request.
Coord
Integer coordinate on a lattice.
CoordinateHypothesis
Caller-supplied hypothesis that a feature lies at a lattice coordinate.
DetectionParams
Detection parameters for ordinary callers.
DetectionRequest
Detection request.
GridDetection
Successful grid detection.
GridDimensions
Known maximum grid extent, counted in observable feature positions.
GridEntry
One labelled grid feature in a solved grid.
LabelledGrid
A labelled grid component.
LatticeFit
Fitted lattice-to-image transform plus residual summary.
LocalAxis
One undirected local lattice-axis observation.
OrientedFeature
A point feature augmented with one or more local lattice directions.
PointFeature
One detected image-space feature.
ResidualSummary
Residual summary in image pixels.

Enums§

Evidence
Evidence supplied to a detection task.
EvidenceKind
Evidence kind supplied to a grid task.
GridError
User-facing failure modes for projective-grid tasks.
GridTask
Grid task that reported an error.
LatticeKind
Supported lattice families.

Functions§

check_consistency
Check whether caller-supplied coordinate hypotheses are geometrically consistent under the requested lattice family.
detect_grid
Detect a grid from feature evidence.
detect_grid_all
Multi-component variant of detect_grid.