diff --git a/apriltag.c b/apriltag.c index ec4f0224..e483fb8f 100644 --- a/apriltag.c +++ b/apriltag.c @@ -445,6 +445,8 @@ static matd_t* homography_compute2(double c[4][4]) { } } + assert(max_val_idx != -1); + if (max_val < epsilon) { debug_print("WRN: Matrix is singular.\n"); return NULL;