Expand description
Core types and utilities for calibration target detection.
This crate is intentionally small and purely geometric. It does not depend on any concrete corner detector or image type.
§Quickstart
use calib_targets_core::{Corner, TargetDetection, TargetKind};
use nalgebra::Point2;
let corner = Corner {
position: Point2::new(10.0, 20.0),
orientation: 0.0,
orientation_cluster: None,
strength: 1.0,
};
let detection = TargetDetection {
kind: TargetKind::Chessboard,
corners: Vec::new(),
};
println!("{:?} {}", corner.position, detection.corners.len());§Includes
- Homography estimation and warping helpers.
- Lightweight grayscale image views and sampling.
- Grid alignment and target detection types.
Structs§
- Corner
- Canonical 2D corner used by all target detectors.
- Gray
Image - Gray
Image View - Grid
Alignment - A grid alignment
dst = transform(src) + translation. - Grid
Coords - Integer grid coordinates (i, j) in board space.
- Grid
Transform - Integer 2D grid transform (a 2×2 matrix) used for aligning detected grids to a board model.
- Homography
- Labeled
Corner - A corner that is part of a detected target, with optional ID info.
- Orientation
Clustering Params - Parameters for orientation clustering.
- Orientation
Clustering Result - Result of orientation clustering.
- Orientation
Histogram - Rectified
View - Target
Detection - One detected target (board instance) in an image.
Enums§
- Rect
ToImg Mapper - Target
Kind - The kind of target that a detection corresponds to.
Constants§
- GRID_
TRANSFORMS_ D4 - The 8 dihedral transforms
D4on the integer grid.
Functions§
- cluster_
orientations - Cluster ChESS orientations into two dominant directions on [0, π).
- compute_
orientation_ histogram - Compute smoothed orientation histogram for debug/visualization.
- estimate_
grid_ axes_ from_ orientations - Estimate a dominant grid axis from orientations using a double-angle mean.
- estimate_
homography_ rect_ to_ img - Estimate H such that: p_img ~ H * p_rect
- homography_
from_ 4pt - Compute H such that: dst ~ H * src (projective), using 4 point correspondences.
- init_
tracing - init_
with_ level - Install the simple logger with the provided level filter.
- sample_
bilinear - sample_
bilinear_ fast - sample_
bilinear_ u8 - warp_
perspective_ gray - Warp into rectified image: for each dst pixel, map to src via H_img_from_rect and sample.