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
14a1549d
Commit
14a1549d
authored
Mar 19, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Android build of new videostab module
parent
844bdea5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
4 deletions
+15
-4
CMakeLists.txt
modules/videostab/CMakeLists.txt
+1
-1
fast_marching.hpp
...les/videostab/include/opencv2/videostab/fast_marching.hpp
+1
-1
optical_flow.hpp
modules/videostab/include/opencv2/videostab/optical_flow.hpp
+7
-1
inpainting.cpp
modules/videostab/src/inpainting.cpp
+4
-0
optical_flow.cpp
modules/videostab/src/optical_flow.cpp
+2
-1
No files found.
modules/videostab/CMakeLists.txt
View file @
14a1549d
set
(
the_description
"Video stabilization"
)
ocv_define_module
(
videostab opencv_imgproc opencv_features2d opencv_video OPTIONAL opencv_gpu
)
ocv_define_module
(
videostab opencv_imgproc opencv_features2d opencv_video
opencv_highgui
OPTIONAL opencv_gpu
)
modules/videostab/include/opencv2/videostab/fast_marching.hpp
View file @
14a1549d
...
...
@@ -72,7 +72,7 @@ private:
float
dist
;
int
x
,
y
;
DXY
()
{}
DXY
()
:
dist
(
0
),
x
(
0
),
y
(
0
)
{}
DXY
(
float
dist
,
int
x
,
int
y
)
:
dist
(
dist
),
x
(
x
),
y
(
y
)
{}
bool
operator
<
(
const
DXY
&
dxy
)
const
{
return
dist
<
dxy
.
dist
;
}
};
...
...
modules/videostab/include/opencv2/videostab/optical_flow.hpp
View file @
14a1549d
...
...
@@ -44,7 +44,11 @@
#define __OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP__
#include "opencv2/core/core.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_GPU
# include "opencv2/gpu/gpu.hpp"
#endif
namespace
cv
{
...
...
@@ -94,6 +98,7 @@ public:
OutputArray
status
,
OutputArray
errors
);
};
#if HAVE_OPENCV_GPU
class
DensePyrLkOptFlowEstimatorGpu
:
public
PyrLkOptFlowEstimatorBase
,
public
IDenseOptFlowEstimator
{
...
...
@@ -107,6 +112,7 @@ private:
gpu
::
PyrLKOpticalFlow
optFlowEstimator_
;
gpu
::
GpuMat
frame0_
,
frame1_
,
flowX_
,
flowY_
,
errors_
;
};
#endif
}
// namespace videostab
}
// namespace cv
...
...
modules/videostab/src/inpainting.cpp
View file @
14a1549d
...
...
@@ -246,7 +246,11 @@ public:
MotionInpainter
::
MotionInpainter
()
{
#if HAVE_OPENCV_GPU
setOptFlowEstimator
(
new
DensePyrLkOptFlowEstimatorGpu
());
#else
CV_Error
(
CV_StsNotImplemented
,
"Current implementation of MotionInpainter requires GPU"
);
#endif
setFlowErrorThreshold
(
1e-4
f
);
setBorderMode
(
BORDER_REPLICATE
);
}
...
...
modules/videostab/src/optical_flow.cpp
View file @
14a1549d
...
...
@@ -41,7 +41,6 @@
//M*/
#include "precomp.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/video/video.hpp"
#include "opencv2/videostab/optical_flow.hpp"
...
...
@@ -60,6 +59,7 @@ void SparsePyrLkOptFlowEstimator::run(
}
#if HAVE_OPENCV_GPU
DensePyrLkOptFlowEstimatorGpu
::
DensePyrLkOptFlowEstimatorGpu
()
{
CV_Assert
(
gpu
::
getCudaEnabledDeviceCount
()
>
0
);
...
...
@@ -86,6 +86,7 @@ void DensePyrLkOptFlowEstimatorGpu::run(
flowX_
.
download
(
flowX
.
getMatRef
());
flowY_
.
download
(
flowY
.
getMatRef
());
}
#endif
}
// namespace videostab
...
...
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