Contrib module is added to java wrappers; fixed algorithm initialisation for python bindings

This commit is contained in:
Andrey Kamaev
2012-07-05 07:58:40 +00:00
parent b1eba01afb
commit 620d122fc2
5 changed files with 52 additions and 6 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ if(NOT ANDROID OR NOT PYTHON_EXECUTABLE OR ANDROID_NATIVE_API_LEVEL LESS 8)
endif()
set(the_description "The java bindings")
ocv_add_module(java BINDINGS opencv_core opencv_imgproc OPTIONAL opencv_objdetect opencv_features2d opencv_video opencv_highgui opencv_ml opencv_calib3d opencv_photo opencv_nonfree)
ocv_add_module(java BINDINGS opencv_core opencv_imgproc OPTIONAL opencv_objdetect opencv_features2d opencv_video opencv_highgui opencv_ml opencv_calib3d opencv_photo opencv_nonfree opencv_contrib)
ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/generator/src/cpp")
# get list of modules to wrap
@@ -18,6 +18,10 @@
# include "opencv2/ml/ml.hpp"
#endif
#ifdef HAVE_OPENCV_CONTRIB
# include "opencv2/contrib/contrib.hpp"
#endif
extern "C" {
JNIEXPORT jint JNICALL
@@ -40,6 +44,9 @@ JNI_OnLoad(JavaVM* vm, void* )
#ifdef HAVE_OPENCV_ML
init &= cv::initModule_ml();
#endif
#ifdef HAVE_OPENCV_CONTRIB
init &= cv::initModule_contrib();
#endif
if(!init)
return -1;