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
673f879c
Commit
673f879c
authored
Apr 10, 2012
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in videostab sample. Fixed model size in global estimators.
parent
bf00eba0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
global_motion.hpp
...les/videostab/include/opencv2/videostab/global_motion.hpp
+5
-5
global_motion.cpp
modules/videostab/src/global_motion.cpp
+1
-1
videostab.cpp
samples/cpp/videostab.cpp
+4
-0
No files found.
modules/videostab/include/opencv2/videostab/global_motion.hpp
View file @
673f879c
...
...
@@ -80,11 +80,11 @@ struct CV_EXPORTS RansacParams
RansacParams
(
int
size
,
float
thresh
,
float
eps
,
float
prob
)
:
size
(
size
),
thresh
(
thresh
),
eps
(
eps
),
prob
(
prob
)
{}
static
RansacParams
translation2dMotionStd
()
{
return
RansacParams
(
2
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
translationAndScale2dMotionStd
()
{
return
RansacParams
(
3
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
linearSimilarity2dMotionStd
()
{
return
RansacParams
(
4
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
affine2dMotionStd
()
{
return
RansacParams
(
6
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
homography2dMotionStd
()
{
return
RansacParams
(
8
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
translation2dMotionStd
()
{
return
RansacParams
(
1
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
translationAndScale2dMotionStd
()
{
return
RansacParams
(
2
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
linearSimilarity2dMotionStd
()
{
return
RansacParams
(
2
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
affine2dMotionStd
()
{
return
RansacParams
(
3
,
0.5
f
,
0.5
f
,
0.99
f
);
}
static
RansacParams
homography2dMotionStd
()
{
return
RansacParams
(
4
,
0.5
f
,
0.5
f
,
0.99
f
);
}
};
CV_EXPORTS
Mat
estimateGlobalMotionRobust
(
...
...
modules/videostab/src/global_motion.cpp
View file @
673f879c
...
...
@@ -377,7 +377,7 @@ Mat PyrLkRobustMotionEstimator::estimate(const Mat &frame0, const Mat &frame1)
else
{
vector
<
uchar
>
mask
;
M
=
findHomography
(
pointsPrevGood_
,
pointsGood_
,
CV_RANSAC
,
ransacParams_
.
thresh
,
mask
);
M
=
findHomography
(
pointsPrevGood_
,
pointsGood_
,
mask
,
CV_RANSAC
,
ransacParams_
.
thresh
);
ninliers
=
0
;
rmse
=
0
;
...
...
samples/cpp/videostab.cpp
View file @
673f879c
...
...
@@ -262,8 +262,12 @@ int main(int argc, const char **argv)
}
if
(
arg
(
"save-motions"
)
!=
"no"
)
{
MotionModel
model
=
stabilizer
->
motionEstimator
()
->
motionModel
();
stabilizer
->
setMotionEstimator
(
new
ToFileMotionWriter
(
arg
(
"save-motions"
),
stabilizer
->
motionEstimator
()));
stabilizer
->
motionEstimator
()
->
setMotionModel
(
model
);
}
stabilizer
->
setRadius
(
argi
(
"radius"
));
if
(
arg
(
"deblur"
)
==
"yes"
)
...
...
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