Commit 9180b6e8 authored by Yaowu Xu's avatar Yaowu Xu

Prevent divide-by-zero

Change-Id: Id22615d461bf16272d1b2e2c72ae7e00db8bcb5c
parent bdda9d4e
......@@ -139,6 +139,7 @@ static void normalize_homography(double *pts, int n, double *T) {
double msqe = 0;
double scale;
int i;
if (n <= 0) return;
for (i = 0; i < n; ++i, p += 2) {
mean[0] += p[0];
mean[1] += p[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment