Crate calib_targets_core

Crate calib_targets_core 

Source
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.
GrayImage
GrayImageView
GridAlignment
A grid alignment dst = transform(src) + translation.
GridCoords
Integer grid coordinates (i, j) in board space.
GridTransform
Integer 2D grid transform (a 2×2 matrix) used for aligning detected grids to a board model.
Homography
LabeledCorner
A corner that is part of a detected target, with optional ID info.
OrientationClusteringParams
Parameters for orientation clustering.
OrientationClusteringResult
Result of orientation clustering.
OrientationHistogram
RectifiedView
TargetDetection
One detected target (board instance) in an image.

Enums§

RectToImgMapper
TargetKind
The kind of target that a detection corresponds to.

Constants§

GRID_TRANSFORMS_D4
The 8 dihedral transforms D4 on 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.