rectify_mesh_from_grid

Function rectify_mesh_from_grid 

Source
pub fn rectify_mesh_from_grid(
    src: &GrayImageView<'_>,
    corners: &[LabeledCorner],
    inliers: &[usize],
    px_per_square: f32,
) -> Result<RectifiedMeshView, MeshWarpError>
Expand description

Build a rectified “board view” by piecewise homographies per grid cell. This is robust to lens distortion because it does not assume a single global H.

  • corners: your detection.corners
  • inliers: indices into corners that you trust
  • px_per_square: rectified pixels per chess square (recommend 60..120, preferably an integer)