From 7694fc18255afb59928159486af9c863fda256f2 Mon Sep 17 00:00:00 2001 From: Vladyslav Usenko Date: Wed, 31 Jul 2019 12:51:23 +0200 Subject: [PATCH] small fix --- include/basalt/optimization/linearize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/basalt/optimization/linearize.h b/include/basalt/optimization/linearize.h index 2fe0cf7..3526708 100644 --- a/include/basalt/optimization/linearize.h +++ b/include/basalt/optimization/linearize.h @@ -153,7 +153,7 @@ struct LinearizeBase { } else { valid = cam.project(point3d, proj); } - if (!valid) return; + if (!valid || !proj.array().isFinite().all()) return; Eigen::Vector2d residual = proj - corner_pos;