From 0e380ff15d5734363043b54771398791a307cce4 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Mon, 4 Jul 2016 19:34:47 +0900 Subject: [PATCH] calib3d: compare error and threshold both in square * resolve #5183 --- modules/calib3d/src/ptsetreg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/ptsetreg.cpp b/modules/calib3d/src/ptsetreg.cpp index f417696547..463027d510 100644 --- a/modules/calib3d/src/ptsetreg.cpp +++ b/modules/calib3d/src/ptsetreg.cpp @@ -462,7 +462,7 @@ public: double b = F[4]*f.x + F[5]*f.y + F[ 6]*f.z + F[ 7] - t.y; double c = F[8]*f.x + F[9]*f.y + F[10]*f.z + F[11] - t.z; - errptr[i] = (float)std::sqrt(a*a + b*b + c*c); + errptr[i] = (float)(a*a + b*b + c*c); } }