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
2f409055
Commit
2f409055
authored
Jun 08, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Android build
parent
ec0ec693
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
79 additions
and
48 deletions
+79
-48
CMakeLists.txt
3rdparty/libjpeg/CMakeLists.txt
+2
-0
CMakeLists.txt
3rdparty/libpng/CMakeLists.txt
+2
-0
CMakeLists.txt
3rdparty/libtiff/CMakeLists.txt
+1
-1
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+0
-0
OpenCVGenHeaders.cmake
cmake/OpenCVGenHeaders.cmake
+7
-7
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+3
-3
window.cpp
modules/highgui/src/window.cpp
+4
-4
test_gui.cpp
modules/highgui/test/test_gui.cpp
+1
-1
CMakeLists.txt
modules/java/CMakeLists.txt
+2
-0
jni_part.cpp
modules/java/src/cpp/jni_part.cpp
+36
-13
perf_stich.cpp
modules/stitching/perf/perf_stich.cpp
+1
-1
stitcher.cpp
modules/stitching/src/stitcher.cpp
+2
-2
test_matchers.cpp
modules/stitching/test/test_matchers.cpp
+1
-1
global_motion.hpp
...les/videostab/include/opencv2/videostab/global_motion.hpp
+2
-2
optical_flow.hpp
modules/videostab/include/opencv2/videostab/optical_flow.hpp
+2
-2
wobble_suppression.hpp
...ideostab/include/opencv2/videostab/wobble_suppression.hpp
+2
-2
global_motion.cpp
modules/videostab/src/global_motion.cpp
+1
-1
inpainting.cpp
modules/videostab/src/inpainting.cpp
+1
-1
optical_flow.cpp
modules/videostab/src/optical_flow.cpp
+2
-2
wobble_suppression.cpp
modules/videostab/src/wobble_suppression.cpp
+1
-1
CMakeLists.txt
samples/android/CMakeLists.txt
+2
-0
videostab.cpp
samples/cpp/videostab.cpp
+4
-4
No files found.
3rdparty/libjpeg/CMakeLists.txt
View file @
2f409055
...
@@ -25,6 +25,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
...
@@ -25,6 +25,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties
(
jcdctmgr.c PROPERTIES COMPILE_FLAGS
"-O1"
)
set_source_files_properties
(
jcdctmgr.c PROPERTIES COMPILE_FLAGS
"-O1"
)
endif
()
endif
()
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wcast-align
)
set_target_properties
(
${
JPEG_LIBRARY
}
set_target_properties
(
${
JPEG_LIBRARY
}
PROPERTIES OUTPUT_NAME
${
JPEG_LIBRARY
}
PROPERTIES OUTPUT_NAME
${
JPEG_LIBRARY
}
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
...
...
3rdparty/libpng/CMakeLists.txt
View file @
2f409055
...
@@ -21,6 +21,8 @@ if(UNIX)
...
@@ -21,6 +21,8 @@ if(UNIX)
endif
()
endif
()
endif
()
endif
()
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wcast-align
)
set_target_properties
(
${
PNG_LIBRARY
}
set_target_properties
(
${
PNG_LIBRARY
}
PROPERTIES OUTPUT_NAME
${
PNG_LIBRARY
}
PROPERTIES OUTPUT_NAME
${
PNG_LIBRARY
}
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
...
...
3rdparty/libtiff/CMakeLists.txt
View file @
2f409055
...
@@ -90,7 +90,7 @@ if(WIN32)
...
@@ -90,7 +90,7 @@ if(WIN32)
list
(
APPEND lib_srcs tif_win32.c
)
list
(
APPEND lib_srcs tif_win32.c
)
endif
(
WIN32
)
endif
(
WIN32
)
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef
)
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef
-Wcast-align
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-declarations
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-declarations
)
if
(
UNIX
AND
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
))
if
(
UNIX
AND
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
))
...
...
cmake/OpenCVCompilerOptions.cmake
View file @
2f409055
This diff is collapsed.
Click to expand it.
cmake/OpenCVGenHeaders.cmake
View file @
2f409055
...
@@ -20,17 +20,17 @@ set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC})
...
@@ -20,17 +20,17 @@ set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC})
ocv_list_sort
(
OPENCV_MOD_LIST
)
ocv_list_sort
(
OPENCV_MOD_LIST
)
foreach
(
m
${
OPENCV_MOD_LIST
}
)
foreach
(
m
${
OPENCV_MOD_LIST
}
)
string
(
TOUPPER
"
${
m
}
"
m
)
string
(
TOUPPER
"
${
m
}
"
m
)
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
#define HAVE_
${
m
}
1
\n
"
)
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
#define HAVE_
${
m
}
\n
"
)
endforeach
()
endforeach
()
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
\n
"
)
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
\n
"
)
set
(
OPENCV_MOD_LIST
${
OPENCV_MODULES_DISABLED_USER
}
${
OPENCV_MODULES_DISABLED_AUTO
}
)
#set(OPENCV_MOD_LIST ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO} ${OPENCV_MODULES_DISABLED_FORCE
})
ocv_list_sort
(
OPENCV_MOD_LIST
)
#
ocv_list_sort(OPENCV_MOD_LIST)
foreach
(
m
${
OPENCV_MOD_LIST
}
)
#
foreach(m ${OPENCV_MOD_LIST})
string
(
TOUPPER
"
${
m
}
"
m
)
#
string(TOUPPER "${m}" m)
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
#undef HAVE_
${
m
}
\n
"
)
#
set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#undef HAVE_${m}\n")
endforeach
()
#
endforeach()
configure_file
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/templates/opencv_modules.hpp.in"
"
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/opencv2/opencv_modules.hpp"
)
configure_file
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/templates/opencv_modules.hpp.in"
"
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/opencv2/opencv_modules.hpp"
)
install
(
FILES
"
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/opencv2/opencv_modules.hpp"
DESTINATION
${
OPENCV_INCLUDE_PREFIX
}
/opencv2 COMPONENT main
)
install
(
FILES
"
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/opencv2/opencv_modules.hpp"
DESTINATION
${
OPENCV_INCLUDE_PREFIX
}
/opencv2 COMPONENT main
)
cmake/OpenCVUtils.cmake
View file @
2f409055
...
@@ -47,12 +47,12 @@ macro(ocv_check_flag_support lang flag varname)
...
@@ -47,12 +47,12 @@ macro(ocv_check_flag_support lang flag varname)
string
(
TOUPPER
"
${
flag
}
"
${
varname
}
)
string
(
TOUPPER
"
${
flag
}
"
${
varname
}
)
string
(
REGEX REPLACE
"^(/|-)"
"HAVE_
${
_lang
}
_"
${
varname
}
"
${${
varname
}}
"
)
string
(
REGEX REPLACE
"^(/|-)"
"HAVE_
${
_lang
}
_"
${
varname
}
"
${${
varname
}}
"
)
string
(
RE
PLACE
"-
"
"_"
${
varname
}
"
${${
varname
}}
"
)
string
(
RE
GEX REPLACE
" -|-|=| |
\\
.
"
"_"
${
varname
}
"
${${
varname
}}
"
)
if
(
_lang STREQUAL
"CXX"
)
if
(
_lang STREQUAL
"CXX"
)
CHECK_CXX_COMPILER_FLAG
(
${
flag
}
${${
varname
}}
)
CHECK_CXX_COMPILER_FLAG
(
"
${
ARGN
}
${
flag
}
"
${${
varname
}}
)
elseif
(
_lang STREQUAL
"C"
)
elseif
(
_lang STREQUAL
"C"
)
CHECK_C_COMPILER_FLAG
(
"
${
flag
}
"
${${
varname
}}
)
CHECK_C_COMPILER_FLAG
(
"
${
ARGN
}
${
flag
}
"
${${
varname
}}
)
else
()
else
()
set
(
${
varname
}
FALSE
)
set
(
${
varname
}
FALSE
)
endif
()
endif
()
...
...
modules/highgui/src/window.cpp
View file @
2f409055
...
@@ -724,10 +724,10 @@ CV_IMPL void cvSaveWindowParameters(const char* name)
...
@@ -724,10 +724,10 @@ CV_IMPL void cvSaveWindowParameters(const char* name)
CV_NO_GUI_ERROR
(
"cvSaveWindowParameters"
);
CV_NO_GUI_ERROR
(
"cvSaveWindowParameters"
);
}
}
CV_IMPL
void
cvLoadWindowParameterss
(
const
char
*
name
)
//
CV_IMPL void cvLoadWindowParameterss(const char* name)
{
//
{
CV_NO_GUI_ERROR
(
"cvLoadWindowParameters"
);
//
CV_NO_GUI_ERROR("cvLoadWindowParameters");
}
//
}
CV_IMPL
int
cvCreateButton
(
const
char
*
,
void
(
*
)(
int
,
void
*
),
void
*
,
int
,
int
)
CV_IMPL
int
cvCreateButton
(
const
char
*
,
void
(
*
)(
int
,
void
*
),
void
*
,
int
,
int
)
{
{
...
...
modules/highgui/test/test_gui.cpp
View file @
2f409055
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
#include "test_precomp.hpp"
#include "test_precomp.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui.hpp"
#if defined HAVE_GTK || defined HAVE_QT || defined WIN32 || defined _WIN32 ||
HAVE_CARBON ||
HAVE_COCOA
#if defined HAVE_GTK || defined HAVE_QT || defined WIN32 || defined _WIN32 ||
defined HAVE_CARBON || defined
HAVE_COCOA
using
namespace
cv
;
using
namespace
cv
;
using
namespace
std
;
using
namespace
std
;
...
...
modules/java/CMakeLists.txt
View file @
2f409055
...
@@ -162,6 +162,8 @@ else()
...
@@ -162,6 +162,8 @@ else()
endif
()
endif
()
add_dependencies
(
${
the_module
}
${
api_target
}
)
add_dependencies
(
${
the_module
}
${
api_target
}
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-declarations
)
# Additional target properties
# Additional target properties
set_target_properties
(
${
the_module
}
PROPERTIES
set_target_properties
(
${
the_module
}
PROPERTIES
OUTPUT_NAME
"
${
the_module
}
"
OUTPUT_NAME
"
${
the_module
}
"
...
...
modules/java/src/cpp/jni_part.cpp
View file @
2f409055
#include <jni.h>
#include <jni.h>
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
# include "opencv2/nonfree/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_FEATURES2D
# include "opencv2/features2d/features2d.hpp"
#endif
#ifdef HAVE_OPENCV_VIDEO
# include "opencv2/video/video.hpp"
#endif
#ifdef HAVE_OPENCV_ML
# include "opencv2/ml/ml.hpp"
#endif
extern
"C"
{
extern
"C"
{
JNIEXPORT
jint
JNICALL
JNIEXPORT
jint
JNICALL
...
@@ -9,6 +27,23 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
...
@@ -9,6 +27,23 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
if
(
vm
->
GetEnv
((
void
**
)
&
env
,
JNI_VERSION_1_6
)
!=
JNI_OK
)
if
(
vm
->
GetEnv
((
void
**
)
&
env
,
JNI_VERSION_1_6
)
!=
JNI_OK
)
return
-
1
;
return
-
1
;
bool
init
=
true
;
#ifdef HAVE_OPENCV_NONFREE
init
&=
cv
::
initModule_nonfree
();
#endif
#ifdef HAVE_OPENCV_FEATURES2D
init
&=
cv
::
initModule_features2d
();
#endif
#ifdef HAVE_OPENCV_VIDEO
init
&=
cv
::
initModule_video
();
#endif
#ifdef HAVE_OPENCV_ML
init
&=
cv
::
initModule_ml
();
#endif
if
(
!
init
)
return
-
1
;
/* get class with (*env)->FindClass */
/* get class with (*env)->FindClass */
/* register methods with (*env)->RegisterNatives */
/* register methods with (*env)->RegisterNatives */
...
@@ -22,15 +57,3 @@ JNI_OnUnload(JavaVM *vm, void *reserved)
...
@@ -22,15 +57,3 @@ JNI_OnUnload(JavaVM *vm, void *reserved)
}
}
}
// extern "C"
}
// extern "C"
\ No newline at end of file
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_MODULES_NONFREE
#include "opencv2/nonfree/nonfree.hpp"
static
bool
makeUseOfNonfree
=
initModule_nonfree
();
#endif
#if HAVE_OPENCV_MODULES_FEATURES2D
#include "opencv2/features2d/features2d.hpp"
static
bool
makeUseOfNonfree
=
initModule_features2d
();
#endif
\ No newline at end of file
modules/stitching/perf/perf_stich.cpp
View file @
2f409055
...
@@ -18,7 +18,7 @@ using std::tr1::get;
...
@@ -18,7 +18,7 @@ using std::tr1::get;
typedef
TestBaseWithParam
<
String
>
stitch
;
typedef
TestBaseWithParam
<
String
>
stitch
;
typedef
TestBaseWithParam
<
String
>
match
;
typedef
TestBaseWithParam
<
String
>
match
;
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
#define TEST_DETECTORS testing::Values("surf", "orb")
#define TEST_DETECTORS testing::Values("surf", "orb")
#else
#else
#define TEST_DETECTORS testing::Values<String>("orb")
#define TEST_DETECTORS testing::Values<String>("orb")
...
...
modules/stitching/src/stitcher.cpp
View file @
2f409055
...
@@ -61,7 +61,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
...
@@ -61,7 +61,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
#ifdef HAVE_OPENCV_GPU
#ifdef HAVE_OPENCV_GPU
if
(
try_use_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
if
(
try_use_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
{
{
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinderGpu
());
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinderGpu
());
#else
#else
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
...
@@ -72,7 +72,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
...
@@ -72,7 +72,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
else
else
#endif
#endif
{
{
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinder
());
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinder
());
#else
#else
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
...
...
modules/stitching/test/test_matchers.cpp
View file @
2f409055
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#include "test_precomp.hpp"
#include "test_precomp.hpp"
#include "opencv2/opencv_modules.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
using
namespace
cv
;
using
namespace
cv
;
using
namespace
std
;
using
namespace
std
;
...
...
modules/videostab/include/opencv2/videostab/global_motion.hpp
View file @
2f409055
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
#include "opencv2/videostab/motion_core.hpp"
#include "opencv2/videostab/motion_core.hpp"
#include "opencv2/videostab/outlier_rejection.hpp"
#include "opencv2/videostab/outlier_rejection.hpp"
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/gpu/gpu.hpp"
#endif
#endif
...
@@ -200,7 +200,7 @@ private:
...
@@ -200,7 +200,7 @@ private:
std
::
vector
<
Point2f
>
pointsPrevGood_
,
pointsGood_
;
std
::
vector
<
Point2f
>
pointsPrevGood_
,
pointsGood_
;
};
};
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
class
CV_EXPORTS
KeypointBasedMotionEstimatorGpu
:
public
ImageMotionEstimatorBase
class
CV_EXPORTS
KeypointBasedMotionEstimatorGpu
:
public
ImageMotionEstimatorBase
{
{
public
:
public
:
...
...
modules/videostab/include/opencv2/videostab/optical_flow.hpp
View file @
2f409055
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#include "opencv2/core/core.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/opencv_modules.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/gpu/gpu.hpp"
#endif
#endif
...
@@ -99,7 +99,7 @@ public:
...
@@ -99,7 +99,7 @@ public:
OutputArray
status
,
OutputArray
errors
);
OutputArray
status
,
OutputArray
errors
);
};
};
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
class
CV_EXPORTS
SparsePyrLkOptFlowEstimatorGpu
class
CV_EXPORTS
SparsePyrLkOptFlowEstimatorGpu
:
public
PyrLkOptFlowEstimatorBase
,
public
ISparseOptFlowEstimator
:
public
PyrLkOptFlowEstimatorBase
,
public
ISparseOptFlowEstimator
{
{
...
...
modules/videostab/include/opencv2/videostab/wobble_suppression.hpp
View file @
2f409055
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/log.hpp"
#include "opencv2/videostab/log.hpp"
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/gpu/gpu.hpp"
#endif
#endif
...
@@ -119,7 +119,7 @@ private:
...
@@ -119,7 +119,7 @@ private:
Mat_
<
float
>
mapx_
,
mapy_
;
Mat_
<
float
>
mapx_
,
mapy_
;
};
};
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
class
CV_EXPORTS
MoreAccurateMotionWobbleSuppressorGpu
:
public
MoreAccurateMotionWobbleSuppressorBase
class
CV_EXPORTS
MoreAccurateMotionWobbleSuppressorGpu
:
public
MoreAccurateMotionWobbleSuppressorBase
{
{
public
:
public
:
...
...
modules/videostab/src/global_motion.cpp
View file @
2f409055
...
@@ -686,7 +686,7 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1,
...
@@ -686,7 +686,7 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1,
}
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
KeypointBasedMotionEstimatorGpu
::
KeypointBasedMotionEstimatorGpu
(
Ptr
<
MotionEstimatorBase
>
estimator
)
KeypointBasedMotionEstimatorGpu
::
KeypointBasedMotionEstimatorGpu
(
Ptr
<
MotionEstimatorBase
>
estimator
)
:
ImageMotionEstimatorBase
(
estimator
->
motionModel
()),
motionEstimator_
(
estimator
)
:
ImageMotionEstimatorBase
(
estimator
->
motionModel
()),
motionEstimator_
(
estimator
)
{
{
...
...
modules/videostab/src/inpainting.cpp
View file @
2f409055
...
@@ -325,7 +325,7 @@ public:
...
@@ -325,7 +325,7 @@ public:
MotionInpainter
::
MotionInpainter
()
MotionInpainter
::
MotionInpainter
()
{
{
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
setOptFlowEstimator
(
new
DensePyrLkOptFlowEstimatorGpu
());
setOptFlowEstimator
(
new
DensePyrLkOptFlowEstimatorGpu
());
#else
#else
CV_Error
(
CV_StsNotImplemented
,
"Current implementation of MotionInpainter requires GPU"
);
CV_Error
(
CV_StsNotImplemented
,
"Current implementation of MotionInpainter requires GPU"
);
...
...
modules/videostab/src/optical_flow.cpp
View file @
2f409055
...
@@ -60,7 +60,7 @@ void SparsePyrLkOptFlowEstimator::run(
...
@@ -60,7 +60,7 @@ void SparsePyrLkOptFlowEstimator::run(
}
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
SparsePyrLkOptFlowEstimatorGpu
::
SparsePyrLkOptFlowEstimatorGpu
()
SparsePyrLkOptFlowEstimatorGpu
::
SparsePyrLkOptFlowEstimatorGpu
()
{
{
CV_Assert
(
gpu
::
getCudaEnabledDeviceCount
()
>
0
);
CV_Assert
(
gpu
::
getCudaEnabledDeviceCount
()
>
0
);
...
@@ -135,7 +135,7 @@ void DensePyrLkOptFlowEstimatorGpu::run(
...
@@ -135,7 +135,7 @@ void DensePyrLkOptFlowEstimatorGpu::run(
flowX_
.
download
(
flowX
.
getMatRef
());
flowX_
.
download
(
flowX
.
getMatRef
());
flowY_
.
download
(
flowY
.
getMatRef
());
flowY_
.
download
(
flowY
.
getMatRef
());
}
}
#endif //
#if
HAVE_OPENCV_GPU
#endif // HAVE_OPENCV_GPU
}
// namespace videostab
}
// namespace videostab
}
// namespace cv
}
// namespace cv
modules/videostab/src/wobble_suppression.cpp
View file @
2f409055
...
@@ -115,7 +115,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat
...
@@ -115,7 +115,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat
}
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
void
MoreAccurateMotionWobbleSuppressorGpu
::
suppress
(
int
idx
,
const
gpu
::
GpuMat
&
frame
,
gpu
::
GpuMat
&
result
)
void
MoreAccurateMotionWobbleSuppressorGpu
::
suppress
(
int
idx
,
const
gpu
::
GpuMat
&
frame
,
gpu
::
GpuMat
&
result
)
{
{
CV_Assert
(
motions_
&&
stabilizationMotions_
);
CV_Assert
(
motions_
&&
stabilizationMotions_
);
...
...
samples/android/CMakeLists.txt
View file @
2f409055
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
add_custom_target
(
opencv_android_examples
)
add_custom_target
(
opencv_android_examples
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-declarations
)
add_subdirectory
(
15-puzzle
)
add_subdirectory
(
15-puzzle
)
add_subdirectory
(
face-detection
)
add_subdirectory
(
face-detection
)
add_subdirectory
(
image-manipulations
)
add_subdirectory
(
image-manipulations
)
...
...
samples/cpp/videostab.cpp
View file @
2f409055
...
@@ -215,7 +215,7 @@ public:
...
@@ -215,7 +215,7 @@ public:
outlierRejector
=
tblor
;
outlierRejector
=
tblor
;
}
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
if
(
gpu
)
if
(
gpu
)
{
{
KeypointBasedMotionEstimatorGpu
*
kbest
=
new
KeypointBasedMotionEstimatorGpu
(
est
);
KeypointBasedMotionEstimatorGpu
*
kbest
=
new
KeypointBasedMotionEstimatorGpu
(
est
);
...
@@ -256,7 +256,7 @@ public:
...
@@ -256,7 +256,7 @@ public:
outlierRejector
=
tblor
;
outlierRejector
=
tblor
;
}
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
if
(
gpu
)
if
(
gpu
)
{
{
KeypointBasedMotionEstimatorGpu
*
kbest
=
new
KeypointBasedMotionEstimatorGpu
(
est
);
KeypointBasedMotionEstimatorGpu
*
kbest
=
new
KeypointBasedMotionEstimatorGpu
(
est
);
...
@@ -341,7 +341,7 @@ int main(int argc, const char **argv)
...
@@ -341,7 +341,7 @@ int main(int argc, const char **argv)
return
0
;
return
0
;
}
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
if
(
arg
(
"gpu"
)
==
"yes"
)
if
(
arg
(
"gpu"
)
==
"yes"
)
{
{
cout
<<
"initializing GPU..."
;
cout
.
flush
();
cout
<<
"initializing GPU..."
;
cout
.
flush
();
...
@@ -419,7 +419,7 @@ int main(int argc, const char **argv)
...
@@ -419,7 +419,7 @@ int main(int argc, const char **argv)
{
{
MoreAccurateMotionWobbleSuppressorBase
*
ws
=
new
MoreAccurateMotionWobbleSuppressor
();
MoreAccurateMotionWobbleSuppressorBase
*
ws
=
new
MoreAccurateMotionWobbleSuppressor
();
if
(
arg
(
"gpu"
)
==
"yes"
)
if
(
arg
(
"gpu"
)
==
"yes"
)
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
ws
=
new
MoreAccurateMotionWobbleSuppressorGpu
();
ws
=
new
MoreAccurateMotionWobbleSuppressorGpu
();
#else
#else
throw
runtime_error
(
"OpenCV is built without GPU support"
);
throw
runtime_error
(
"OpenCV is built without GPU support"
);
...
...
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