Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
8fc84b7a
Commit
8fc84b7a
authored
Mar 21, 2012
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated FMM run() signature
parent
5e2bcacb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
fast_marching.hpp
...les/videostab/include/opencv2/videostab/fast_marching.hpp
+1
-1
fast_marching_inl.hpp
...videostab/include/opencv2/videostab/fast_marching_inl.hpp
+3
-1
global_motion.cpp
modules/videostab/src/global_motion.cpp
+8
-6
No files found.
modules/videostab/include/opencv2/videostab/fast_marching.hpp
View file @
8fc84b7a
...
...
@@ -60,7 +60,7 @@ public:
FastMarchingMethod
()
:
inf_
(
1e6
f
)
{}
template
<
typename
Inpaint
>
void
run
(
const
Mat
&
mask
,
Inpaint
inpaint
);
Inpaint
run
(
const
Mat
&
mask
,
Inpaint
inpaint
);
Mat
distanceMap
()
const
{
return
dist_
;
}
...
...
modules/videostab/include/opencv2/videostab/fast_marching_inl.hpp
View file @
8fc84b7a
...
...
@@ -51,7 +51,7 @@ namespace videostab
{
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
;
...
...
@@ -156,6 +156,8 @@ void FastMarchingMethod::run(const cv::Mat &mask, Inpaint inpaint)
}
}
}
return
inpaint
;
}
}
// namespace videostab
...
...
modules/videostab/src/global_motion.cpp
View file @
8fc84b7a
...
...
@@ -97,7 +97,7 @@ static Mat estimateGlobMotionLeastSquaresTranslationAndScale(
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
);
...
...
@@ -130,7 +130,7 @@ static Mat estimateGlobMotionLeastSquaresAffine(
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
)
...
...
@@ -157,8 +157,8 @@ Mat estimateGlobalMotionLeastSquares(
Mat
estimateGlobalMotionRobust
(
const
vector
<
Point2f
>
&
points0
,
const
vector
<
Point2f
>
&
points1
,
int
model
,
const
RansacParams
&
params
,
float
*
rmse
,
int
*
ninliers
)
const
vector
<
Point2f
>
&
points0
,
const
vector
<
Point2f
>
&
points1
,
int
model
,
const
RansacParams
&
params
,
float
*
rmse
,
int
*
ninliers
)
{
CV_Assert
(
points0
.
size
()
==
points1
.
size
());
...
...
@@ -168,7 +168,8 @@ Mat estimateGlobalMotionRobust(
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
);
...
...
@@ -248,7 +249,8 @@ Mat estimateGlobalMotionRobust(
}
PyrLkRobustMotionEstimator
::
PyrLkRobustMotionEstimator
()
:
ransacParams_
(
RansacParams
::
affine2dMotionStd
())
PyrLkRobustMotionEstimator
::
PyrLkRobustMotionEstimator
()
:
ransacParams_
(
RansacParams
::
affine2dMotionStd
())
{
setDetector
(
new
GoodFeaturesToTrackDetector
());
setOptFlowEstimator
(
new
SparsePyrLkOptFlowEstimator
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment