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
dfedaff9
Commit
dfedaff9
authored
Apr 17, 2012
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary code (videostab)
parent
19c30eaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
49 deletions
+1
-49
motion_stabilizing.cpp
modules/videostab/src/motion_stabilizing.cpp
+0
-48
precomp.hpp
modules/videostab/src/precomp.hpp
+1
-1
No files found.
modules/videostab/src/motion_stabilizing.cpp
View file @
dfedaff9
...
...
@@ -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
<
Mat
>
&
motions
,
vector
<
uchar
>
&
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
<
int
>
(
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_
<
float
>
M
=
Mat
::
eye
(
3
,
3
,
CV_32F
);
Mat_
<
float
>
Ml
=
motions
[
left
];
Mat_
<
float
>
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
modules/videostab/src/precomp.hpp
View file @
dfedaff9
...
...
@@ -44,7 +44,7 @@
#define __OPENCV_PRECOMP_HPP__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#include "cvconfig.h"
#endif
#include <stdexcept>
...
...
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