Realm

oa::vision::calibrate_camera

Calibrate a monocular camera from views >= 3 planar grids, matching calibrateCamera on Zhang’s method. object is [V, N, 3] object coordinates (the plane must satisfy z = 0) and image [V, N, 2] pixel observations with N >= 4. Intrinsics solve through the B-matrix constraints; extrinsics recover per-view; refine_iterations > 0 then runs damped bundle adjustment over (fx, fy, cx, cy, k1, k2) plus per-view pose. Returns camera, (k1, k2, p1, p2, k3) distortion, per-view rvecs [V, 3], tvecs [V, 3], and RMS reprojection error. Errors Returns an error for shape violations, degenerate grids, or a singular B-matrix solve.

FnRust public API

Function Documentation

pub fn calibrate_camera( object: &Matrix, image: &Matrix, refine_iterations: i32 ) -> Result<CalibrateCameraResult>
Calibrate a monocular camera from views >= 3 planar grids, matching calibrateCamera on Zhang’s method. object is [V, N, 3] object coordinates (the plane must satisfy z = 0) and image [V, N, 2] pixel observations with N >= 4. Intrinsics solve through the B-matrix constraints; extrinsics recover per-view; refine_iterations > 0 then runs damped bundle adjustment over (fx, fy, cx, cy, k1, k2) plus per-view pose. Returns camera, (k1, k2, p1, p2, k3) distortion, per-view rvecs [V, 3], tvecs [V, 3], and RMS reprojection error. Errors Returns an error for shape violations, degenerate grids, or a singular B-matrix solve.