Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
2f409055
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2f409055
编写于
6月 08, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed Android build
上级
ec0ec693
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
170 addition
and
114 deletion
+170
-114
3rdparty/libjpeg/CMakeLists.txt
3rdparty/libjpeg/CMakeLists.txt
+2
-0
3rdparty/libpng/CMakeLists.txt
3rdparty/libpng/CMakeLists.txt
+2
-0
3rdparty/libtiff/CMakeLists.txt
3rdparty/libtiff/CMakeLists.txt
+1
-1
cmake/OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+83
-58
cmake/OpenCVGenHeaders.cmake
cmake/OpenCVGenHeaders.cmake
+7
-7
cmake/OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+3
-3
modules/highgui/src/window.cpp
modules/highgui/src/window.cpp
+4
-4
modules/highgui/test/test_gui.cpp
modules/highgui/test/test_gui.cpp
+1
-1
modules/java/CMakeLists.txt
modules/java/CMakeLists.txt
+2
-0
modules/java/src/cpp/jni_part.cpp
modules/java/src/cpp/jni_part.cpp
+36
-13
modules/stitching/perf/perf_stich.cpp
modules/stitching/perf/perf_stich.cpp
+1
-1
modules/stitching/src/stitcher.cpp
modules/stitching/src/stitcher.cpp
+2
-2
modules/stitching/test/test_matchers.cpp
modules/stitching/test/test_matchers.cpp
+2
-2
modules/videostab/include/opencv2/videostab/global_motion.hpp
...les/videostab/include/opencv2/videostab/global_motion.hpp
+3
-3
modules/videostab/include/opencv2/videostab/optical_flow.hpp
modules/videostab/include/opencv2/videostab/optical_flow.hpp
+2
-2
modules/videostab/include/opencv2/videostab/wobble_suppression.hpp
...ideostab/include/opencv2/videostab/wobble_suppression.hpp
+2
-2
modules/videostab/src/global_motion.cpp
modules/videostab/src/global_motion.cpp
+4
-4
modules/videostab/src/inpainting.cpp
modules/videostab/src/inpainting.cpp
+4
-4
modules/videostab/src/optical_flow.cpp
modules/videostab/src/optical_flow.cpp
+2
-2
modules/videostab/src/wobble_suppression.cpp
modules/videostab/src/wobble_suppression.cpp
+1
-1
samples/android/CMakeLists.txt
samples/android/CMakeLists.txt
+2
-0
samples/cpp/videostab.cpp
samples/cpp/videostab.cpp
+4
-4
未找到文件。
3rdparty/libjpeg/CMakeLists.txt
浏览文件 @
2f409055
...
...
@@ -25,6 +25,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties
(
jcdctmgr.c PROPERTIES COMPILE_FLAGS
"-O1"
)
endif
()
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wcast-align
)
set_target_properties
(
${
JPEG_LIBRARY
}
PROPERTIES OUTPUT_NAME
${
JPEG_LIBRARY
}
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
...
...
3rdparty/libpng/CMakeLists.txt
浏览文件 @
2f409055
...
...
@@ -21,6 +21,8 @@ if(UNIX)
endif
()
endif
()
ocv_warnings_disable
(
CMAKE_C_FLAGS -Wcast-align
)
set_target_properties
(
${
PNG_LIBRARY
}
PROPERTIES OUTPUT_NAME
${
PNG_LIBRARY
}
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
...
...
3rdparty/libtiff/CMakeLists.txt
浏览文件 @
2f409055
...
...
@@ -90,7 +90,7 @@ if(WIN32)
list
(
APPEND lib_srcs tif_win32.c
)
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
)
if
(
UNIX
AND
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
))
...
...
cmake/OpenCVCompilerOptions.cmake
浏览文件 @
2f409055
...
...
@@ -21,76 +21,102 @@ if(MSVC)
endif
()
endif
()
set
(
OPENCV_EXTRA_FLAGS
""
)
set
(
OPENCV_EXTRA_C_FLAGS
""
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
""
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
""
)
set
(
OPENCV_EXTRA_CXX_FLAGS
""
)
set
(
OPENCV_EXTRA_FLAGS_RELEASE
""
)
set
(
OPENCV_EXTRA_FLAGS_DEBUG
""
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS
""
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
""
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
""
)
macro
(
add_extra_compiler_option option
)
ocv_check_flag_support
(
CXX
"
${
option
}
"
_varname
${
ARGN
}
)
if
(
${
_varname
}
)
set
(
OPENCV_EXTRA_CXX_FLAGS
"
${
OPENCV_EXTRA_CXX_FLAGS
}
${
option
}
"
)
endif
()
ocv_check_flag_support
(
C
"
${
option
}
"
_varname
${
ARGN
}
)
if
(
${
_varname
}
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
${
option
}
"
)
endif
()
endmacro
()
if
(
MINGW
)
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838
# here we are trying to workaround the problem
include
(
CheckCXXCompilerFlag
)
CHECK_CXX_COMPILER_FLAG
(
-mstackrealign HAVE_STACKREALIGN_FLAG
)
if
(
HAVE_STACKREALIGN_FLAG
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
-mstackrealign"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
-mstackrealign"
)
else
()
CHECK_CXX_COMPILER_FLAG
(
-mpreferred-stack-boundary=2 HAVE_PREFERRED_STACKBOUNDARY_FLAG
)
if
(
HAVE_PREFERRED_STACKBOUNDARY_FLAG
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
-mstackrealign"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
-mstackrealign"
)
endif
()
endif
()
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
# High level of warnings.
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-Wall"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-Wmissing-declarations -Wcast-align -Wundef -Winit-self -Wpointer-arith"
)
#-Wstrict-aliasing=2
add_extra_compiler_option
(
-Wall
)
add_extra_compiler_option
(
-Werror=return-type
)
add_extra_compiler_option
(
-Werror=non-virtual-dtor
)
add_extra_compiler_option
(
-Werror=address
)
add_extra_compiler_option
(
-Werror=sequence-point
)
add_extra_compiler_option
(
-Wformat
)
add_extra_compiler_option
(
-Werror=format-security -Wformat
)
add_extra_compiler_option
(
-Wmissing-declarations
)
add_extra_compiler_option
(
-Wmissing-prototypes
)
add_extra_compiler_option
(
-Wstrict-prototypes
)
add_extra_compiler_option
(
-Wundef
)
add_extra_compiler_option
(
-Winit-self
)
add_extra_compiler_option
(
-Wpointer-arith
)
#add_extra_compiler_option(-Wcast-align)
#add_extra_compiler_option(-Wstrict-aliasing=2)
#add_extra_compiler_option(-Wshadow)
# The -Wno-long-long is required in 64bit systems when including sytem headers.
if
(
X86_64
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-Wno-long-long"
)
add_extra_compiler_option
(
-Wno-long-long
)
endif
()
# We need pthread's
if
(
UNIX AND NOT ANDROID
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-pthread"
)
add_extra_compiler_option
(
-pthread
)
endif
()
if
(
OPENCV_WARNINGS_ARE_ERRORS
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-Werror"
)
add_extra_compiler_option
(
-Werror
)
endif
()
if
(
X86 AND NOT MINGW64 AND NOT X86_64 AND NOT APPLE
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-march=i686"
)
add_extra_compiler_option
(
-march=i686
)
endif
()
# Other optimizations
if
(
ENABLE_OMIT_FRAME_POINTER
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-fomit-frame-pointer"
)
add_extra_compiler_option
(
-fomit-frame-pointer
)
else
()
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-fno-omit-frame-pointer"
)
add_extra_compiler_option
(
-fno-omit-frame-pointer
)
endif
()
if
(
ENABLE_FAST_MATH
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-ffast-math"
)
add_extra_compiler_option
(
-ffast-math
)
endif
()
if
(
ENABLE_POWERPC
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-mcpu=G3 -mtune=G5"
)
add_extra_compiler_option
(
"
-mcpu=G3 -mtune=G5"
)
endif
()
if
(
ENABLE_SSE
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-msse"
)
add_extra_compiler_option
(
-msse
)
endif
()
if
(
ENABLE_SSE2
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-msse2"
)
add_extra_compiler_option
(
-msse2
)
endif
()
# SSE3 and further should be disabled under MingW because it generates compiler errors
if
(
NOT MINGW
)
if
(
ENABLE_SSE3
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-msse3"
)
add_extra_compiler_option
(
-msse3
)
endif
()
if
(
${
CMAKE_OPENCV_GCC_VERSION_NUM
}
GREATER 402
)
...
...
@@ -102,14 +128,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if
(
HAVE_GCC42_OR_NEWER OR APPLE
)
if
(
ENABLE_SSSE3
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-mssse3"
)
add_extra_compiler_option
(
-mssse3
)
endif
()
if
(
HAVE_GCC43_OR_NEWER
)
if
(
ENABLE_SSE41
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-msse4.1"
)
add_extra_compiler_option
(
-msse4.1
)
endif
()
if
(
ENABLE_SSE42
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-msse4.2"
)
add_extra_compiler_option
(
-msse4.2
)
endif
()
endif
()
endif
()
...
...
@@ -117,39 +143,40 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if
(
X86 OR X86_64
)
if
(
NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4
)
if
(
ENABLE_SSE2
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-mfpmath=sse"
)
# !! important - be on the same wave with x64 compilers
else
()
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-mfpmath=387"
)
endif
()
if
(
ENABLE_SSE2
)
add_extra_compiler_option
(
-mfpmath=sse
)
# !! important - be on the same wave with x64 compilers
else
()
add_extra_compiler_option
(
-mfpmath=387
)
endif
()
endif
()
endif
()
# Profiling?
if
(
ENABLE_PROFILING
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-pg -g"
)
add_extra_compiler_option
(
"
-pg -g"
)
# turn off incompatible options
foreach
(
flags CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS_RELEASE
)
foreach
(
flags CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG
OPENCV_EXTRA_FLAGS_RELEASE OPENCV_EXTRA_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS OPENCV_EXTRA_CXX_FLAGS
)
string
(
REPLACE
"-fomit-frame-pointer"
""
${
flags
}
"
${${
flags
}}
"
)
string
(
REPLACE
"-ffunction-sections"
""
${
flags
}
"
${${
flags
}}
"
)
endforeach
()
elseif
(
NOT APPLE AND NOT ANDROID
)
# Remove unreferenced functions: function level linking
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
-ffunction-sections"
)
add_extra_compiler_option
(
-ffunction-sections
)
endif
()
set
(
OPENCV_EXTRA_
C_FLAGS_RELEASE
"
${
OPENCV_EXTRA_C
_FLAGS_RELEASE
}
-DNDEBUG"
)
set
(
OPENCV_EXTRA_
C_FLAGS_DEBUG
"
${
OPENCV_EXTRA_C
_FLAGS_DEBUG
}
-O0 -DDEBUG -D_DEBUG"
)
set
(
OPENCV_EXTRA_
FLAGS_RELEASE
"
${
OPENCV_EXTRA
_FLAGS_RELEASE
}
-DNDEBUG"
)
set
(
OPENCV_EXTRA_
FLAGS_DEBUG
"
${
OPENCV_EXTRA
_FLAGS_DEBUG
}
-O0 -DDEBUG -D_DEBUG"
)
if
(
BUILD_WITH_DEBUG_INFO
)
set
(
OPENCV_EXTRA_
C_FLAGS_DEBUG
"
${
OPENCV_EXTRA_C
_FLAGS_DEBUG
}
-ggdb3"
)
set
(
OPENCV_EXTRA_
FLAGS_DEBUG
"
${
OPENCV_EXTRA
_FLAGS_DEBUG
}
-ggdb3"
)
endif
()
endif
()
if
(
MSVC
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS"
)
# 64-bit portability warnings, in MSVC80
if
(
MSVC80
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/Wp64"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/Wp64"
)
endif
()
if
(
BUILD_WITH_DEBUG_INFO
)
...
...
@@ -157,38 +184,38 @@ if(MSVC)
endif
()
# Remove unreferenced functions: function level linking
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/Gy"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/Gy"
)
if
(
NOT MSVC_VERSION LESS 1400
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/bigobj"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/bigobj"
)
endif
()
if
(
BUILD_WITH_DEBUG_INFO
)
set
(
OPENCV_EXTRA_
C_FLAGS_RELEASE
"
${
OPENCV_EXTRA_C
_FLAGS_RELEASE
}
/Zi"
)
set
(
OPENCV_EXTRA_
FLAGS_RELEASE
"
${
OPENCV_EXTRA
_FLAGS_RELEASE
}
/Zi"
)
endif
()
if
(
NOT MSVC64
)
# 64-bit MSVC compiler uses SSE/SSE2 by default
if
(
ENABLE_SSE
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/arch:SSE"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/arch:SSE"
)
endif
()
if
(
ENABLE_SSE2
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/arch:SSE2"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/arch:SSE2"
)
endif
()
endif
()
if
(
ENABLE_SSE3
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/arch:SSE3"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/arch:SSE3"
)
endif
()
if
(
ENABLE_SSE4_1
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/arch:SSE4.1"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/arch:SSE4.1"
)
endif
()
if
(
ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/Oi"
)
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/Oi"
)
endif
()
if
(
X86 OR X86_64
)
if
(
CMAKE_SIZEOF_VOID_P EQUAL 4 AND ENABLE_SSE2
)
set
(
OPENCV_EXTRA_
C_FLAGS
"
${
OPENCV_EXTRA_C
_FLAGS
}
/fp:fast"
)
# !! important - be on the same wave with x64 compilers
set
(
OPENCV_EXTRA_
FLAGS
"
${
OPENCV_EXTRA
_FLAGS
}
/fp:fast"
)
# !! important - be on the same wave with x64 compilers
endif
()
endif
()
endif
()
...
...
@@ -197,33 +224,31 @@ endif()
if
(
NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID
)
# Android does not need these settings because they are already set by toolchain file
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
stdc++
)
set
(
OPENCV_EXTRA_
C_FLAGS
"-fPIC
${
OPENCV_EXTRA_C
_FLAGS
}
"
)
set
(
OPENCV_EXTRA_
FLAGS
"-fPIC
${
OPENCV_EXTRA
_FLAGS
}
"
)
endif
()
# Add user supplied extra options (optimization, etc...)
# ==========================================================
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
"
CACHE INTERNAL
"Extra compiler options"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
CACHE INTERNAL
"Extra compiler options for Release build"
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
"
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
CACHE INTERNAL
"Extra compiler options for Debug build"
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
"
CACHE INTERNAL
"Extra compiler options"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
"
CACHE INTERNAL
"Extra compiler options for C sources"
)
set
(
OPENCV_EXTRA_CXX_FLAGS
"
${
OPENCV_EXTRA_CXX_FLAGS
}
"
CACHE INTERNAL
"Extra compiler options for C++ sources"
)
set
(
OPENCV_EXTRA_FLAGS_RELEASE
"
${
OPENCV_EXTRA_FLAGS_RELEASE
}
"
CACHE INTERNAL
"Extra compiler options for Release build"
)
set
(
OPENCV_EXTRA_FLAGS_DEBUG
"
${
OPENCV_EXTRA_FLAGS_DEBUG
}
"
CACHE INTERNAL
"Extra compiler options for Debug build"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS
}
"
CACHE INTERNAL
"Extra linker flags"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
}
"
CACHE INTERNAL
"Extra linker flags for Release build"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
}
"
CACHE INTERNAL
"Extra linker flags for Debug build"
)
#combine all "extra" options
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
OPENCV_EXTRA_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
OPENCV_EXTRA_
C
_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
${
OPENCV_EXTRA_C
_FLAGS_RELEASE
}
"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
${
OPENCV_EXTRA_
C_
FLAGS_RELEASE
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
${
OPENCV_EXTRA_
C_
FLAGS_DEBUG
}
"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
OPENCV_EXTRA_
C_
FLAGS_DEBUG
}
"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
OPENCV_EXTRA_
FLAGS
}
${
OPENCV_EXTRA_
C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
OPENCV_EXTRA_
FLAGS
}
${
OPENCV_EXTRA_CXX
_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
${
OPENCV_EXTRA
_FLAGS_RELEASE
}
"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
${
OPENCV_EXTRA_FLAGS_RELEASE
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
${
OPENCV_EXTRA_FLAGS_DEBUG
}
"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
OPENCV_EXTRA_FLAGS_DEBUG
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS_DEBUG
"
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
}
"
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wmissing-prototypes -Wstrict-prototypes"
)
endif
()
if
(
MSVC
)
# avoid warnings from MSVC about overriding the /W* option
# we replace /W3 with /W4 only for C++ files,
...
...
cmake/OpenCVGenHeaders.cmake
浏览文件 @
2f409055
...
...
@@ -20,17 +20,17 @@ set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC})
ocv_list_sort
(
OPENCV_MOD_LIST
)
foreach
(
m
${
OPENCV_MOD_LIST
}
)
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
()
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
\n
"
)
set
(
OPENCV_MOD_LIST
${
OPENCV_MODULES_DISABLED_USER
}
${
OPENCV_MODULES_DISABLED_AUTO
}
)
ocv_list_sort
(
OPENCV_MOD_LIST
)
foreach
(
m
${
OPENCV_MOD_LIST
}
)
string
(
TOUPPER
"
${
m
}
"
m
)
set
(
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
}
#undef HAVE_
${
m
}
\n
"
)
endforeach
()
#set(OPENCV_MOD_LIST ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO} ${OPENCV_MODULES_DISABLED_FORCE
})
#
ocv_list_sort(OPENCV_MOD_LIST)
#
foreach(m ${OPENCV_MOD_LIST})
#
string(TOUPPER "${m}" m)
#
set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#undef HAVE_${m}\n")
#
endforeach()
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
)
cmake/OpenCVUtils.cmake
浏览文件 @
2f409055
...
...
@@ -47,12 +47,12 @@ macro(ocv_check_flag_support lang flag varname)
string
(
TOUPPER
"
${
flag
}
"
${
varname
}
)
string
(
REGEX REPLACE
"^(/|-)"
"HAVE_
${
_lang
}
_"
${
varname
}
"
${${
varname
}}
"
)
string
(
RE
PLACE
"-
"
"_"
${
varname
}
"
${${
varname
}}
"
)
string
(
RE
GEX REPLACE
" -|-|=| |
\\
.
"
"_"
${
varname
}
"
${${
varname
}}
"
)
if
(
_lang STREQUAL
"CXX"
)
CHECK_CXX_COMPILER_FLAG
(
${
flag
}
${${
varname
}}
)
CHECK_CXX_COMPILER_FLAG
(
"
${
ARGN
}
${
flag
}
"
${${
varname
}}
)
elseif
(
_lang STREQUAL
"C"
)
CHECK_C_COMPILER_FLAG
(
"
${
flag
}
"
${${
varname
}}
)
CHECK_C_COMPILER_FLAG
(
"
${
ARGN
}
${
flag
}
"
${${
varname
}}
)
else
()
set
(
${
varname
}
FALSE
)
endif
()
...
...
modules/highgui/src/window.cpp
浏览文件 @
2f409055
...
...
@@ -724,10 +724,10 @@ CV_IMPL void cvSaveWindowParameters(const char* name)
CV_NO_GUI_ERROR
(
"cvSaveWindowParameters"
);
}
CV_IMPL
void
cvLoadWindowParameterss
(
const
char
*
name
)
{
CV_NO_GUI_ERROR
(
"cvLoadWindowParameters"
);
}
//
CV_IMPL void cvLoadWindowParameterss(const char* name)
//
{
//
CV_NO_GUI_ERROR("cvLoadWindowParameters");
//
}
CV_IMPL
int
cvCreateButton
(
const
char
*
,
void
(
*
)(
int
,
void
*
),
void
*
,
int
,
int
)
{
...
...
modules/highgui/test/test_gui.cpp
浏览文件 @
2f409055
...
...
@@ -43,7 +43,7 @@
#include "test_precomp.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
std
;
...
...
modules/java/CMakeLists.txt
浏览文件 @
2f409055
...
...
@@ -162,6 +162,8 @@ else()
endif
()
add_dependencies
(
${
the_module
}
${
api_target
}
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-declarations
)
# Additional target properties
set_target_properties
(
${
the_module
}
PROPERTIES
OUTPUT_NAME
"
${
the_module
}
"
...
...
modules/java/src/cpp/jni_part.cpp
浏览文件 @
2f409055
#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"
{
JNIEXPORT
jint
JNICALL
...
...
@@ -9,6 +27,23 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
if
(
vm
->
GetEnv
((
void
**
)
&
env
,
JNI_VERSION_1_6
)
!=
JNI_OK
)
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 */
/* register methods with (*env)->RegisterNatives */
...
...
@@ -21,16 +56,4 @@ JNI_OnUnload(JavaVM *vm, void *reserved)
//do nothing
}
}
// extern "C"
#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
}
// extern "C"
\ No newline at end of file
modules/stitching/perf/perf_stich.cpp
浏览文件 @
2f409055
...
...
@@ -18,7 +18,7 @@ using std::tr1::get;
typedef
TestBaseWithParam
<
String
>
stitch
;
typedef
TestBaseWithParam
<
String
>
match
;
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
#define TEST_DETECTORS testing::Values("surf", "orb")
#else
#define TEST_DETECTORS testing::Values<String>("orb")
...
...
modules/stitching/src/stitcher.cpp
浏览文件 @
2f409055
...
...
@@ -61,7 +61,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
#ifdef HAVE_OPENCV_GPU
if
(
try_use_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
{
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinderGpu
());
#else
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
...
...
@@ -72,7 +72,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
else
#endif
{
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinder
());
#else
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
...
...
modules/stitching/test/test_matchers.cpp
浏览文件 @
2f409055
...
...
@@ -42,7 +42,7 @@
#include "test_precomp.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_NONFREE
#if
def
HAVE_OPENCV_NONFREE
using
namespace
cv
;
using
namespace
std
;
...
...
@@ -57,7 +57,7 @@ TEST(SurfFeaturesFinder, CanFindInROIs)
rois
.
push_back
(
Rect
(
img
.
cols
/
2
,
img
.
rows
/
2
,
img
.
cols
-
img
.
cols
/
2
,
img
.
rows
-
img
.
rows
/
2
));
detail
::
ImageFeatures
roi_features
;
(
*
finder
)(
img
,
roi_features
,
rois
);
int
tl_rect_count
=
0
,
br_rect_count
=
0
,
bad_count
=
0
;
for
(
size_t
i
=
0
;
i
<
roi_features
.
keypoints
.
size
();
++
i
)
{
...
...
modules/videostab/include/opencv2/videostab/global_motion.hpp
浏览文件 @
2f409055
...
...
@@ -53,7 +53,7 @@
#include "opencv2/videostab/motion_core.hpp"
#include "opencv2/videostab/outlier_rejection.hpp"
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp"
#endif
...
...
@@ -73,7 +73,7 @@ CV_EXPORTS Mat estimateGlobalMotionRobust(
class
CV_EXPORTS
MotionEstimatorBase
{
public:
public:
virtual
~
MotionEstimatorBase
()
{}
virtual
void
setMotionModel
(
MotionModel
val
)
{
motionModel_
=
val
;
}
...
...
@@ -200,7 +200,7 @@ private:
std
::
vector
<
Point2f
>
pointsPrevGood_
,
pointsGood_
;
};
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
class
CV_EXPORTS
KeypointBasedMotionEstimatorGpu
:
public
ImageMotionEstimatorBase
{
public:
...
...
modules/videostab/include/opencv2/videostab/optical_flow.hpp
浏览文件 @
2f409055
...
...
@@ -46,7 +46,7 @@
#include "opencv2/core/core.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp"
#endif
...
...
@@ -99,7 +99,7 @@ public:
OutputArray
status
,
OutputArray
errors
);
};
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
class
CV_EXPORTS
SparsePyrLkOptFlowEstimatorGpu
:
public
PyrLkOptFlowEstimatorBase
,
public
ISparseOptFlowEstimator
{
...
...
modules/videostab/include/opencv2/videostab/wobble_suppression.hpp
浏览文件 @
2f409055
...
...
@@ -48,7 +48,7 @@
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/log.hpp"
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp"
#endif
...
...
@@ -119,7 +119,7 @@ private:
Mat_
<
float
>
mapx_
,
mapy_
;
};
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
class
CV_EXPORTS
MoreAccurateMotionWobbleSuppressorGpu
:
public
MoreAccurateMotionWobbleSuppressorBase
{
public:
...
...
modules/videostab/src/global_motion.cpp
浏览文件 @
2f409055
...
...
@@ -621,7 +621,7 @@ Mat ToFileMotionWriter::estimate(const Mat &frame0, const Mat &frame1, bool *ok)
KeypointBasedMotionEstimator
::
KeypointBasedMotionEstimator
(
Ptr
<
MotionEstimatorBase
>
estimator
)
:
ImageMotionEstimatorBase
(
estimator
->
motionModel
()),
motionEstimator_
(
estimator
)
{
{
setDetector
(
new
GoodFeaturesToTrackDetector
());
setOpticalFlowEstimator
(
new
SparsePyrLkOptFlowEstimator
());
setOutlierRejector
(
new
NullOutlierRejector
());
...
...
@@ -686,11 +686,11 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1,
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
KeypointBasedMotionEstimatorGpu
::
KeypointBasedMotionEstimatorGpu
(
Ptr
<
MotionEstimatorBase
>
estimator
)
:
ImageMotionEstimatorBase
(
estimator
->
motionModel
()),
motionEstimator_
(
estimator
)
{
CV_Assert
(
gpu
::
getCudaEnabledDeviceCount
()
>
0
);
CV_Assert
(
gpu
::
getCudaEnabledDeviceCount
()
>
0
);
setOutlierRejector
(
new
NullOutlierRejector
());
}
...
...
@@ -720,7 +720,7 @@ Mat KeypointBasedMotionEstimatorGpu::estimate(const gpu::GpuMat &frame0, const g
detector_
(
grayFrame0
,
pointsPrev_
);
// find correspondences
optFlowEstimator_
.
run
(
frame0
,
frame1
,
pointsPrev_
,
points_
,
status_
);
optFlowEstimator_
.
run
(
frame0
,
frame1
,
pointsPrev_
,
points_
,
status_
);
// leave good correspondences only
gpu
::
compactPoints
(
pointsPrev_
,
points_
,
status_
);
...
...
modules/videostab/src/inpainting.cpp
浏览文件 @
2f409055
...
...
@@ -241,7 +241,7 @@ public:
for
(
int
dx
=
-
rad
;
dx
<=
rad
;
++
dx
)
{
int
qx0
=
x
+
dx
;
int
qy0
=
y
+
dy
;
int
qy0
=
y
+
dy
;
if
(
qy0
>=
0
&&
qy0
<
mask0
.
rows
&&
qx0
>=
0
&&
qx0
<
mask0
.
cols
&&
mask0
(
qy0
,
qx0
))
{
...
...
@@ -325,7 +325,7 @@ public:
MotionInpainter
::
MotionInpainter
()
{
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
setOptFlowEstimator
(
new
DensePyrLkOptFlowEstimatorGpu
());
#else
CV_Error
(
CV_StsNotImplemented
,
"Current implementation of MotionInpainter requires GPU"
);
...
...
@@ -374,7 +374,7 @@ void MotionInpainter::inpaint(int idx, Mat &frame, Mat &mask)
// warp frame
frame1_
=
at
(
neighbor
,
*
frames_
);
frame1_
=
at
(
neighbor
,
*
frames_
);
if
(
motionModel_
!=
MM_HOMOGRAPHY
)
warpAffine
(
...
...
@@ -532,7 +532,7 @@ void completeFrameAccordingToFlow(
if
(
x1
>=
0
&&
x1
<
frame1
.
cols
&&
y1
>=
0
&&
y1
<
frame1
.
rows
&&
mask1_
(
y1
,
x1
)
&&
sqr
(
flowX_
(
y0
,
x0
))
+
sqr
(
flowY_
(
y0
,
x0
))
<
sqr
(
distThresh
))
{
{
frame0
.
at
<
Point3_
<
uchar
>
>
(
y0
,
x0
)
=
frame1
.
at
<
Point3_
<
uchar
>
>
(
y1
,
x1
);
mask0_
(
y0
,
x0
)
=
255
;
}
...
...
modules/videostab/src/optical_flow.cpp
浏览文件 @
2f409055
...
...
@@ -60,7 +60,7 @@ void SparsePyrLkOptFlowEstimator::run(
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
SparsePyrLkOptFlowEstimatorGpu
::
SparsePyrLkOptFlowEstimatorGpu
()
{
CV_Assert
(
gpu
::
getCudaEnabledDeviceCount
()
>
0
);
...
...
@@ -135,7 +135,7 @@ void DensePyrLkOptFlowEstimatorGpu::run(
flowX_
.
download
(
flowX
.
getMatRef
());
flowY_
.
download
(
flowY
.
getMatRef
());
}
#endif //
#if
HAVE_OPENCV_GPU
#endif // HAVE_OPENCV_GPU
}
// namespace videostab
}
// namespace cv
modules/videostab/src/wobble_suppression.cpp
浏览文件 @
2f409055
...
...
@@ -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
)
{
CV_Assert
(
motions_
&&
stabilizationMotions_
);
...
...
samples/android/CMakeLists.txt
浏览文件 @
2f409055
...
...
@@ -4,6 +4,8 @@
# ----------------------------------------------------------------------------
add_custom_target
(
opencv_android_examples
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-declarations
)
add_subdirectory
(
15-puzzle
)
add_subdirectory
(
face-detection
)
add_subdirectory
(
image-manipulations
)
...
...
samples/cpp/videostab.cpp
浏览文件 @
2f409055
...
...
@@ -215,7 +215,7 @@ public:
outlierRejector
=
tblor
;
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
if
(
gpu
)
{
KeypointBasedMotionEstimatorGpu
*
kbest
=
new
KeypointBasedMotionEstimatorGpu
(
est
);
...
...
@@ -256,7 +256,7 @@ public:
outlierRejector
=
tblor
;
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
if
(
gpu
)
{
KeypointBasedMotionEstimatorGpu
*
kbest
=
new
KeypointBasedMotionEstimatorGpu
(
est
);
...
...
@@ -341,7 +341,7 @@ int main(int argc, const char **argv)
return
0
;
}
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
if
(
arg
(
"gpu"
)
==
"yes"
)
{
cout
<<
"initializing GPU..."
;
cout
.
flush
();
...
...
@@ -419,7 +419,7 @@ int main(int argc, const char **argv)
{
MoreAccurateMotionWobbleSuppressorBase
*
ws
=
new
MoreAccurateMotionWobbleSuppressor
();
if
(
arg
(
"gpu"
)
==
"yes"
)
#if HAVE_OPENCV_GPU
#if
def
HAVE_OPENCV_GPU
ws
=
new
MoreAccurateMotionWobbleSuppressorGpu
();
#else
throw
runtime_error
(
"OpenCV is built without GPU support"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录