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
37c74e38
Commit
37c74e38
authored
Feb 24, 2015
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python support
parent
45712302
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
42 additions
and
58 deletions
+42
-58
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+10
-16
CMakeLists.txt
modules/calib3d/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/core/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/features2d/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/flann/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/highgui/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/imgcodecs/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/imgproc/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/java/CMakeLists.txt
+2
-2
CMakeLists.txt
modules/objdetect/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/photo/CMakeLists.txt
+1
-1
common.cmake
modules/python/common.cmake
+12
-24
CMakeLists.txt
modules/shape/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/stitching/CMakeLists.txt
+2
-1
CMakeLists.txt
modules/superres/CMakeLists.txt
+2
-1
CMakeLists.txt
modules/video/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/videoio/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/videostab/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/viz/CMakeLists.txt
+1
-1
No files found.
cmake/OpenCVModule.cmake
View file @
37c74e38
...
@@ -24,22 +24,6 @@
...
@@ -24,22 +24,6 @@
# OPENCV_MODULE_${the_module}_WRAPPERS - list of wrappers supporting this module
# OPENCV_MODULE_${the_module}_WRAPPERS - list of wrappers supporting this module
# HAVE_${the_module} - for fast check of module availability
# HAVE_${the_module} - for fast check of module availability
# Module layout:
# <module>
# ├── doc - docs
# ├── include
# │ └── opencv2
# │ └── <module> - sub headers
# ├── misc
# │ ├── java - additional files for java wrapper
# │ └── python - additional files for python wrapper
# ├── perf - perfomance tests
# ├── samples - sample code
# ├── src - sources
# ├── test - accuracy tests
# └── tutorials - tutorials
# To control the setup of the module you could also set:
# To control the setup of the module you could also set:
# the_description - text to be used as current module description
# the_description - text to be used as current module description
# OPENCV_MODULE_TYPE - STATIC|SHARED - set to force override global settings for current module
# OPENCV_MODULE_TYPE - STATIC|SHARED - set to force override global settings for current module
...
@@ -77,6 +61,7 @@ foreach(mod ${OPENCV_MODULES_BUILD} ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MOD
...
@@ -77,6 +61,7 @@ foreach(mod ${OPENCV_MODULES_BUILD} ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MOD
unset
(
OPENCV_MODULE_
${
mod
}
_PRIVATE_REQ_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_PRIVATE_REQ_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_PRIVATE_OPT_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_PRIVATE_OPT_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_LINK_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_LINK_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_WRAPPERS CACHE
)
endforeach
()
endforeach
()
# clean modules info which needs to be recalculated
# clean modules info which needs to be recalculated
...
@@ -112,6 +97,15 @@ macro(ocv_add_dependencies full_modname)
...
@@ -112,6 +97,15 @@ macro(ocv_add_dependencies full_modname)
endforeach
()
endforeach
()
unset
(
__depsvar
)
unset
(
__depsvar
)
# hack for python
set
(
__python_idx
)
list
(
FIND OPENCV_MODULE_
${
full_modname
}
_WRAPPERS
"python"
__python_idx
)
if
(
NOT __python_idx EQUAL -1
)
list
(
REMOVE_ITEM OPENCV_MODULE_
${
full_modname
}
_WRAPPERS
"python"
)
list
(
APPEND OPENCV_MODULE_
${
full_modname
}
_WRAPPERS
"python2"
"python3"
)
endif
()
unset
(
__python_idx
)
ocv_list_unique
(
OPENCV_MODULE_
${
full_modname
}
_REQ_DEPS
)
ocv_list_unique
(
OPENCV_MODULE_
${
full_modname
}
_REQ_DEPS
)
ocv_list_unique
(
OPENCV_MODULE_
${
full_modname
}
_OPT_DEPS
)
ocv_list_unique
(
OPENCV_MODULE_
${
full_modname
}
_OPT_DEPS
)
ocv_list_unique
(
OPENCV_MODULE_
${
full_modname
}
_PRIVATE_REQ_DEPS
)
ocv_list_unique
(
OPENCV_MODULE_
${
full_modname
}
_PRIVATE_REQ_DEPS
)
...
...
modules/calib3d/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Camera Calibration and 3D Reconstruction"
)
set
(
the_description
"Camera Calibration and 3D Reconstruction"
)
ocv_define_module
(
calib3d opencv_imgproc opencv_features2d WRAP java
)
ocv_define_module
(
calib3d opencv_imgproc opencv_features2d WRAP java
python
)
modules/core/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"The Core Functionality"
)
set
(
the_description
"The Core Functionality"
)
ocv_add_module
(
core PRIVATE_REQUIRED
${
ZLIB_LIBRARIES
}
"
${
OPENCL_LIBRARIES
}
"
ocv_add_module
(
core PRIVATE_REQUIRED
${
ZLIB_LIBRARIES
}
"
${
OPENCL_LIBRARIES
}
"
OPTIONAL opencv_cudev
OPTIONAL opencv_cudev
WRAP java
)
WRAP java python
)
if
(
HAVE_WINRT_CX
)
if
(
HAVE_WINRT_CX
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/ZW"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/ZW"
)
...
...
modules/features2d/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"2D Features Framework"
)
set
(
the_description
"2D Features Framework"
)
ocv_define_module
(
features2d opencv_imgproc opencv_ml opencv_flann OPTIONAL opencv_highgui WRAP java
)
ocv_define_module
(
features2d opencv_imgproc opencv_ml opencv_flann OPTIONAL opencv_highgui WRAP java
python
)
modules/flann/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Clustering and Search in Multi-Dimensional Spaces"
)
set
(
the_description
"Clustering and Search in Multi-Dimensional Spaces"
)
ocv_define_module
(
flann opencv_core
)
ocv_define_module
(
flann opencv_core
WRAP python
)
modules/highgui/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"High-level GUI and Media I/O"
)
set
(
the_description
"High-level GUI and Media I/O"
)
ocv_add_module
(
highgui opencv_imgproc opencv_imgcodecs opencv_videoio OPTIONAL opencv_androidcamera
)
ocv_add_module
(
highgui opencv_imgproc opencv_imgcodecs opencv_videoio OPTIONAL opencv_androidcamera
WRAP python
)
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# CMake file for highgui. See root CMakeLists.txt
# CMake file for highgui. See root CMakeLists.txt
...
...
modules/imgcodecs/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Image codecs"
)
set
(
the_description
"Image codecs"
)
ocv_add_module
(
imgcodecs opencv_imgproc WRAP java
)
ocv_add_module
(
imgcodecs opencv_imgproc WRAP java
python
)
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# CMake file for imgcodecs. See root CMakeLists.txt
# CMake file for imgcodecs. See root CMakeLists.txt
...
...
modules/imgproc/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Image Processing"
)
set
(
the_description
"Image Processing"
)
ocv_define_module
(
imgproc opencv_core WRAP java
)
ocv_define_module
(
imgproc opencv_core WRAP java
python
)
modules/java/CMakeLists.txt
View file @
37c74e38
...
@@ -20,13 +20,13 @@ set(JAVA_INSTALL_ROOT "sdk/java")
...
@@ -20,13 +20,13 @@ set(JAVA_INSTALL_ROOT "sdk/java")
set
(
JNI_INSTALL_ROOT
"sdk/native"
)
set
(
JNI_INSTALL_ROOT
"sdk/native"
)
# get list of modules to wrap
# get list of modules to wrap
message
(
STATUS
"Wrapped in java:"
)
#
message(STATUS "Wrapped in java:")
set
(
OPENCV_JAVA_MODULES
)
set
(
OPENCV_JAVA_MODULES
)
foreach
(
m
${
OPENCV_MODULES_BUILD
}
)
foreach
(
m
${
OPENCV_MODULES_BUILD
}
)
if
(
";
${
OPENCV_MODULE_
${
m
}
_WRAPPERS
}
;"
MATCHES
";java;"
AND HAVE_
${
m
}
)
if
(
";
${
OPENCV_MODULE_
${
m
}
_WRAPPERS
}
;"
MATCHES
";java;"
AND HAVE_
${
m
}
)
string
(
REPLACE
"opencv_"
""
m
${
m
}
)
string
(
REPLACE
"opencv_"
""
m
${
m
}
)
list
(
APPEND OPENCV_JAVA_MODULES
${
m
}
)
list
(
APPEND OPENCV_JAVA_MODULES
${
m
}
)
message
(
STATUS
"
\t
opencv_
${
m
}
"
)
#
message(STATUS "\topencv_${m}")
endif
()
endif
()
endforeach
()
endforeach
()
...
...
modules/objdetect/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Object Detection"
)
set
(
the_description
"Object Detection"
)
ocv_define_module
(
objdetect opencv_core opencv_imgproc opencv_ml OPTIONAL opencv_highgui WRAP java
)
ocv_define_module
(
objdetect opencv_core opencv_imgproc opencv_ml OPTIONAL opencv_highgui WRAP java
python
)
modules/photo/CMakeLists.txt
View file @
37c74e38
...
@@ -4,4 +4,4 @@ if(HAVE_CUDA)
...
@@ -4,4 +4,4 @@ if(HAVE_CUDA)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations
)
endif
()
endif
()
ocv_define_module
(
photo opencv_imgproc OPTIONAL opencv_cudaarithm opencv_cudaimgproc WRAP java
)
ocv_define_module
(
photo opencv_imgproc OPTIONAL opencv_cudaarithm opencv_cudaimgproc WRAP java
python
)
modules/python/common.cmake
View file @
37c74e38
# This file is included from a subdirectory
# This file is included from a subdirectory
set
(
PYTHON_SOURCE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../"
)
set
(
PYTHON_SOURCE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../"
)
set
(
candidate_deps
""
)
ocv_add_module
(
${
MODULE_NAME
}
BINDINGS
)
foreach
(
mp
${
OPENCV_MODULES_PATH
}
${
OPENCV_EXTRA_MODULES_PATH
}
)
file
(
GLOB names
"
${
mp
}
/*"
)
foreach
(
m IN LISTS names
)
if
(
IS_DIRECTORY
${
m
}
)
get_filename_component
(
m
${
m
}
NAME
)
list
(
APPEND candidate_deps
"opencv_
${
m
}
"
)
endif
()
endforeach
(
m
)
endforeach
(
mp
)
# module blacklist
ocv_list_filterout
(
candidate_deps
"^opencv_cud(a|ev)"
)
ocv_list_filterout
(
candidate_deps
"^opencv_matlab$"
)
ocv_list_filterout
(
candidate_deps
"^opencv_ts$"
)
ocv_list_filterout
(
candidate_deps
"^opencv_adas$"
)
ocv_list_filterout
(
candidate_deps
"^opencv_tracking$"
)
ocv_list_filterout
(
candidate_deps
"^opencv_bioinspired$"
)
ocv_list_filterout
(
candidate_deps
"^opencv_java$"
)
ocv_list_filterout
(
candidate_deps
"^opencv_contrib_world$"
)
ocv_add_module
(
${
MODULE_NAME
}
BINDINGS OPTIONAL
${
candidate_deps
}
)
ocv_module_include_directories
(
ocv_module_include_directories
(
"
${
PYTHON_INCLUDE_PATH
}
"
"
${
PYTHON_INCLUDE_PATH
}
"
...
@@ -30,8 +9,18 @@ ocv_module_include_directories(
...
@@ -30,8 +9,18 @@ ocv_module_include_directories(
"
${
PYTHON_SOURCE_DIR
}
/src2"
"
${
PYTHON_SOURCE_DIR
}
/src2"
)
)
# get list of modules to wrap
# message(STATUS "Wrapped in ${MODULE_NAME}:")
set
(
OPENCV_PYTHON_MODULES
)
foreach
(
m
${
OPENCV_MODULES_BUILD
}
)
if
(
";
${
OPENCV_MODULE_
${
m
}
_WRAPPERS
}
;"
MATCHES
";
${
MODULE_NAME
}
;"
AND HAVE_
${
m
}
)
list
(
APPEND OPENCV_PYTHON_MODULES
${
m
}
)
# message(STATUS "\t${m}")
endif
()
endforeach
()
set
(
opencv_hdrs
""
)
set
(
opencv_hdrs
""
)
foreach
(
m
IN LISTS OPENCV_MODULE_opencv_
${
MODULE_NAME
}
_DEPS
)
foreach
(
m
${
OPENCV_PYTHON_MODULES
}
)
list
(
APPEND opencv_hdrs
${
OPENCV_MODULE_
${
m
}
_HEADERS
}
)
list
(
APPEND opencv_hdrs
${
OPENCV_MODULE_
${
m
}
_HEADERS
}
)
endforeach
(
m
)
endforeach
(
m
)
...
@@ -39,7 +28,6 @@ endforeach(m)
...
@@ -39,7 +28,6 @@ endforeach(m)
ocv_list_filterout
(
opencv_hdrs
".h$"
)
ocv_list_filterout
(
opencv_hdrs
".h$"
)
ocv_list_filterout
(
opencv_hdrs
"cuda"
)
ocv_list_filterout
(
opencv_hdrs
"cuda"
)
ocv_list_filterout
(
opencv_hdrs
"cudev"
)
ocv_list_filterout
(
opencv_hdrs
"cudev"
)
ocv_list_filterout
(
opencv_hdrs
"opencv2/objdetect/detection_based_tracker.hpp"
)
set
(
cv2_generated_hdrs
set
(
cv2_generated_hdrs
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_include.h"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_include.h"
...
...
modules/shape/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Shape descriptors and matchers."
)
set
(
the_description
"Shape descriptors and matchers."
)
ocv_define_module
(
shape opencv_core opencv_imgproc opencv_video
)
ocv_define_module
(
shape opencv_core opencv_imgproc opencv_video
WRAP python
)
modules/stitching/CMakeLists.txt
View file @
37c74e38
...
@@ -5,4 +5,5 @@ if(HAVE_CUDA)
...
@@ -5,4 +5,5 @@ if(HAVE_CUDA)
endif
()
endif
()
ocv_define_module
(
stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect
ocv_define_module
(
stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect
OPTIONAL opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_cudalegacy opencv_xfeatures2d
)
OPTIONAL opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_cudalegacy opencv_xfeatures2d
WRAP python
)
modules/superres/CMakeLists.txt
View file @
37c74e38
...
@@ -5,4 +5,5 @@ endif()
...
@@ -5,4 +5,5 @@ endif()
set
(
the_description
"Super Resolution"
)
set
(
the_description
"Super Resolution"
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4127 -Wundef -Wshadow
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4127 -Wundef -Wshadow
)
ocv_define_module
(
superres opencv_imgproc opencv_video
ocv_define_module
(
superres opencv_imgproc opencv_video
OPTIONAL opencv_videoio opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_cudaoptflow opencv_cudacodec
)
OPTIONAL opencv_videoio opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_cudaoptflow opencv_cudacodec
WRAP python
)
modules/video/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Video Analysis"
)
set
(
the_description
"Video Analysis"
)
ocv_define_module
(
video opencv_imgproc WRAP java
)
ocv_define_module
(
video opencv_imgproc WRAP java
python
)
modules/videoio/CMakeLists.txt
View file @
37c74e38
set
(
the_description
"Media I/O"
)
set
(
the_description
"Media I/O"
)
ocv_add_module
(
videoio opencv_imgproc opencv_imgcodecs OPTIONAL opencv_androidcamera WRAP java
)
ocv_add_module
(
videoio opencv_imgproc opencv_imgcodecs OPTIONAL opencv_androidcamera WRAP java
python
)
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# CMake file for videoio. See root CMakeLists.txt
# CMake file for videoio. See root CMakeLists.txt
...
...
modules/videostab/CMakeLists.txt
View file @
37c74e38
...
@@ -5,4 +5,4 @@ if(HAVE_CUDA)
...
@@ -5,4 +5,4 @@ if(HAVE_CUDA)
endif
()
endif
()
ocv_define_module
(
videostab opencv_imgproc opencv_features2d opencv_video opencv_photo opencv_calib3d
ocv_define_module
(
videostab opencv_imgproc opencv_features2d opencv_video opencv_photo opencv_calib3d
OPTIONAL opencv_cudawarping opencv_cudaoptflow opencv_videoio
)
OPTIONAL opencv_cudawarping opencv_cudaoptflow opencv_videoio WRAP python
)
modules/viz/CMakeLists.txt
View file @
37c74e38
...
@@ -4,7 +4,7 @@ endif()
...
@@ -4,7 +4,7 @@ endif()
include
(
${
VTK_USE_FILE
}
)
include
(
${
VTK_USE_FILE
}
)
set
(
the_description
"Viz"
)
set
(
the_description
"Viz"
)
ocv_define_module
(
viz opencv_core
${
VTK_LIBRARIES
}
)
ocv_define_module
(
viz opencv_core
${
VTK_LIBRARIES
}
WRAP python
)
if
(
APPLE AND BUILD_opencv_viz
)
if
(
APPLE AND BUILD_opencv_viz
)
ocv_target_link_libraries
(
opencv_viz
"-framework Cocoa"
)
ocv_target_link_libraries
(
opencv_viz
"-framework Cocoa"
)
...
...
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