Never crash: trackers and camera solver without expect()

The camera solver, KLT pyramid and subspace (warp stabilizer) tracker expect()ed data-structure
invariants: a track point seen in a frame, a solved camera, a pyramid level. A missing value now
skips that point/track (or, for finish(), returns a SolveError: "no frame was solved") instead of
panicking. Denies the panic lints in the crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-04 13:24:17 -04:00
co-authored by Claude Opus 5.5
parent 10644a83aa
commit bf8962becf
5 changed files with 23 additions and 17 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ impl GrayPyramid {
pub fn from_plane(base: Plane, offset: [f64; 2], factor: f64, levels: usize) -> GrayPyramid {
let mut lv = vec![base];
for _ in 0..levels {
let last = lv.last().expect("level");
let Some(last) = lv.last() else { break };
if last.w < 16 || last.h < 16 {
break;
}