From dd8589c3523ade76ddb887c92ebbec78b17d70fe Mon Sep 17 00:00:00 2001 From: StevenPuttemans Date: Thu, 6 Aug 2015 14:59:15 +0200 Subject: [PATCH] change as suggested by original programmer and user of ecc software --- modules/video/src/ecc.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/video/src/ecc.cpp b/modules/video/src/ecc.cpp index cc08ac005c..d11419e402 100644 --- a/modules/video/src/ecc.cpp +++ b/modules/video/src/ecc.cpp @@ -298,11 +298,7 @@ static void update_warping_matrix_ECC (Mat& map_matrix, const Mat& update, const } if (motionType == MOTION_EUCLIDEAN) { double new_theta = updatePtr[0]; - if (mapPtr[3]>0) - new_theta += acos(mapPtr[0]); - - if (mapPtr[3]<0) - new_theta -= acos(mapPtr[0]); + new_theta += asin(mapPtr[3]); mapPtr[2] += updatePtr[1]; mapPtr[5] += updatePtr[2];