From: Andrey Kamaev Date: Mon, 19 Mar 2012 18:58:42 +0000 (+0000) Subject: Fixed Windows build of videostab module. X-Git-Tag: accepted/2.0/20130307.220821~1091 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cabfc5441f1b9fee06d01c65f2b9633d9889298;p=profile%2Fivi%2Fopencv.git Fixed Windows build of videostab module. --- diff --git a/modules/videostab/src/global_motion.cpp b/modules/videostab/src/global_motion.cpp index 5b74ffd..4409d78 100644 --- a/modules/videostab/src/global_motion.cpp +++ b/modules/videostab/src/global_motion.cpp @@ -97,7 +97,7 @@ static Mat estimateGlobMotionLeastSquaresTranslationAndScale( solve(A, b, sol, DECOMP_SVD); if (rmse) - *rmse = norm(A*sol, b, NORM_L2) / sqrt(npoints); + *rmse = norm(A*sol, b, NORM_L2) / sqrt((double)npoints); Mat_ M = Mat::eye(3, 3, CV_32F); M(0,0) = M(1,1) = sol(0,0); @@ -130,7 +130,7 @@ static Mat estimateGlobMotionLeastSquaresAffine( solve(A, b, sol, DECOMP_SVD); if (rmse) - *rmse = norm(A*sol, b, NORM_L2) / sqrt(npoints); + *rmse = norm(A*sol, b, NORM_L2) / sqrt((double)npoints); Mat_ M = Mat::eye(3, 3, CV_32F); for (int i = 0, k = 0; i < 2; ++i) diff --git a/modules/videostab/src/stabilizer.cpp b/modules/videostab/src/stabilizer.cpp index aca40d7..4bdb803 100644 --- a/modules/videostab/src/stabilizer.cpp +++ b/modules/videostab/src/stabilizer.cpp @@ -54,7 +54,7 @@ Stabilizer::Stabilizer() { setFrameSource(new NullFrameSource()); setMotionEstimator(new PyrLkRobustMotionEstimator()); - setMotionFilter(new GaussianMotionFilter(15, sqrt(15))); + setMotionFilter(new GaussianMotionFilter(15, sqrt(15.0))); setDeblurer(new NullDeblurer()); setInpainter(new NullInpainter()); setEstimateTrimRatio(true);