1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Refactored videostab module. Added MoreAccurateMotionWobbleSuppressor class

This commit is contained in:
Alexey Spizhevoy
2012-04-05 13:23:42 +00:00
parent f32b645b96
commit fa09f3d121
9 changed files with 163 additions and 101 deletions
+23 -2
View File
@@ -51,9 +51,30 @@ namespace cv
namespace videostab
{
void NullWobbleSuppressor::suppress(int idx, Mat &result)
WobbleSuppressorBase::WobbleSuppressorBase()
: motions_(0), stabilizationMotions_(0)
{
result = at(idx, *stabilizedFrames_);
PyrLkRobustMotionEstimator *est = new PyrLkRobustMotionEstimator();
est->setMotionModel(HOMOGRAPHY);
est->setRansacParams(RansacParams::homography2dMotionStd());
setMotionEstimator(est);
}
void NullWobbleSuppressor::suppress(int /*idx*/, const Mat &frame, Mat &result)
{
result = frame;
}
void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat &result)
{
CV_Assert(motions_ && stabilizationMotions_);
// TODO implement
CV_Error(CV_StsNotImplemented, "MoreAccurateMotionWobbleSuppressor");
result = frame;
}
} // namespace videostab