From: Alexey Spizhevoy Date: Tue, 17 Apr 2012 09:21:09 +0000 (+0000) Subject: Removed unnecessary code (videostab) X-Git-Tag: accepted/2.0/20130307.220821~364^2~915 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfedaff99b29def56eb32ff4a947b5c17138ef43;p=profile%2Fivi%2Fopencv.git Removed unnecessary code (videostab) --- diff --git a/modules/videostab/src/motion_stabilizing.cpp b/modules/videostab/src/motion_stabilizing.cpp index 98db99b..81ff8c9 100644 --- a/modules/videostab/src/motion_stabilizing.cpp +++ b/modules/videostab/src/motion_stabilizing.cpp @@ -716,53 +716,5 @@ float estimateOptimalTrimRatio(const Mat &M, Size size) return r; } - -// TODO should process left open and right open segments? -void interpolateMotions(vector &motions, vector &mask) -{ - CV_Assert(motions.size() == mask.size() && motions.size() > 0); - - enum { INIT, IN_SEGMENT, LEFT_OPEN } state = mask[0] ? INIT : LEFT_OPEN; - int left = -1; - - for (int i = 1; i < static_cast(motions.size()); ++i) - { - if (state == INIT) - { - if (!mask[i]) - { - state = IN_SEGMENT; - left = i - 1; - } - } - else if (state == IN_SEGMENT) - { - if (mask[i]) - { - for (int j = left; j < i; ++j) - { - Mat_ M = Mat::eye(3, 3, CV_32F); - Mat_ Ml = motions[left]; - Mat_ Mr = motions[i]; - - float d1 = j - left; - float d2 = i - j; - - for (int l = 0; l < 3; ++l) - for (int s = 0; s < 3; ++s) - M(l,s) = (d2*Ml(l,s) + d1*Mr(l,s)) / (d1 + d2); - - motions[i] = M; - mask[i] = 1; - } - } - } - else if (state == LEFT_OPEN) - { - if (mask[i]) state = INIT; - } - } -} - } // namespace videostab } // namespace cv diff --git a/modules/videostab/src/precomp.hpp b/modules/videostab/src/precomp.hpp index 6d773b9..aed026b 100644 --- a/modules/videostab/src/precomp.hpp +++ b/modules/videostab/src/precomp.hpp @@ -44,7 +44,7 @@ #define __OPENCV_PRECOMP_HPP__ #ifdef HAVE_CVCONFIG_H -#include "cvconfig.h" + #include "cvconfig.h" #endif #include