projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5e2bcac
)
Updated FMM run() signature
author
Alexey Spizhevoy
<no@email>
Wed, 21 Mar 2012 07:53:36 +0000
(07:53 +0000)
committer
Alexey Spizhevoy
<no@email>
Wed, 21 Mar 2012 07:53:36 +0000
(07:53 +0000)
modules/videostab/include/opencv2/videostab/fast_marching.hpp
patch
|
blob
|
history
modules/videostab/include/opencv2/videostab/fast_marching_inl.hpp
patch
|
blob
|
history
modules/videostab/src/global_motion.cpp
patch
|
blob
|
history
diff --git
a/modules/videostab/include/opencv2/videostab/fast_marching.hpp
b/modules/videostab/include/opencv2/videostab/fast_marching.hpp
index
ab75eee
..
45663d4
100644
(file)
--- a/
modules/videostab/include/opencv2/videostab/fast_marching.hpp
+++ b/
modules/videostab/include/opencv2/videostab/fast_marching.hpp
@@
-60,7
+60,7
@@
public:
FastMarchingMethod() : inf_(1e6f) {}
template <typename Inpaint>
FastMarchingMethod() : inf_(1e6f) {}
template <typename Inpaint>
-
void
run(const Mat &mask, Inpaint inpaint);
+
Inpaint
run(const Mat &mask, Inpaint inpaint);
Mat distanceMap() const { return dist_; }
Mat distanceMap() const { return dist_; }
diff --git
a/modules/videostab/include/opencv2/videostab/fast_marching_inl.hpp
b/modules/videostab/include/opencv2/videostab/fast_marching_inl.hpp
index
e7eb09f
..
dc860c2
100644
(file)
--- a/
modules/videostab/include/opencv2/videostab/fast_marching_inl.hpp
+++ b/
modules/videostab/include/opencv2/videostab/fast_marching_inl.hpp
@@
-51,7
+51,7
@@
namespace videostab
{
template <typename Inpaint>
{
template <typename Inpaint>
-
void
FastMarchingMethod::run(const cv::Mat &mask, Inpaint inpaint)
+
Inpaint
FastMarchingMethod::run(const cv::Mat &mask, Inpaint inpaint)
{
using namespace std;
using namespace cv;
{
using namespace std;
using namespace cv;
@@
-156,6
+156,8
@@
void FastMarchingMethod::run(const cv::Mat &mask, Inpaint inpaint)
}
}
}
}
}
}
+
+ return inpaint;
}
} // namespace videostab
}
} // namespace videostab
diff --git
a/modules/videostab/src/global_motion.cpp
b/modules/videostab/src/global_motion.cpp
index
9c48557
..
0813814
100644
(file)
--- 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)
solve(A, b, sol, DECOMP_SVD);
if (rmse)
- *rmse =
norm(A*sol, b, NORM_L2) / sqrt(static_cast<float>(npoints
));
+ *rmse =
static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)
));
Mat_<float> M = Mat::eye(3, 3, CV_32F);
M(0,0) = M(1,1) = sol(0,0);
Mat_<float> 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)
solve(A, b, sol, DECOMP_SVD);
if (rmse)
- *rmse =
norm(A*sol, b, NORM_L2) / sqrt(static_cast<float>(npoints
));
+ *rmse =
static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)
));
Mat_<float> M = Mat::eye(3, 3, CV_32F);
for (int i = 0, k = 0; i < 2; ++i)
Mat_<float> M = Mat::eye(3, 3, CV_32F);
for (int i = 0, k = 0; i < 2; ++i)
@@
-157,8
+157,8
@@
Mat estimateGlobalMotionLeastSquares(
Mat estimateGlobalMotionRobust(
Mat estimateGlobalMotionRobust(
- const vector<Point2f> &points0, const vector<Point2f> &points1, int model,
const RansacParams ¶ms,
- float *rmse, int *ninliers)
+ const vector<Point2f> &points0, const vector<Point2f> &points1, int model,
+
const RansacParams ¶ms,
float *rmse, int *ninliers)
{
CV_Assert(points0.size() == points1.size());
{
CV_Assert(points0.size() == points1.size());
@@
-168,7
+168,8
@@
Mat estimateGlobalMotionRobust(
estimateGlobMotionLeastSquaresAffine };
const int npoints = static_cast<int>(points0.size());
estimateGlobMotionLeastSquaresAffine };
const int npoints = static_cast<int>(points0.size());
- const int niters = static_cast<int>(ceil(log(1 - params.prob) / log(1 - pow(1 - params.eps, params.size))));
+ const int niters = static_cast<int>(ceil(log(1 - params.prob) /
+ log(1 - pow(1 - params.eps, params.size))));
RNG rng(0);
vector<int> indices(params.size);
RNG rng(0);
vector<int> indices(params.size);
@@
-248,7
+249,8
@@
Mat estimateGlobalMotionRobust(
}
}
-PyrLkRobustMotionEstimator::PyrLkRobustMotionEstimator() : ransacParams_(RansacParams::affine2dMotionStd())
+PyrLkRobustMotionEstimator::PyrLkRobustMotionEstimator()
+ : ransacParams_(RansacParams::affine2dMotionStd())
{
setDetector(new GoodFeaturesToTrackDetector());
setOptFlowEstimator(new SparsePyrLkOptFlowEstimator());
{
setDetector(new GoodFeaturesToTrackDetector());
setOptFlowEstimator(new SparsePyrLkOptFlowEstimator());