Commit 00db5a69 authored by Andrey Kamaev's avatar Andrey Kamaev

More granular build of Java API: it is now possible to build Java wrappers only…

More granular build of Java API: it is now possible to build Java wrappers only for the subset of OpenCV modules
parent 8dc28473
...@@ -98,6 +98,8 @@ macro(ocv_add_module _name) ...@@ -98,6 +98,8 @@ macro(ocv_add_module _name)
endif() endif()
set(OPENCV_MODULE_${the_module}_DESCRIPTION "${the_description}" CACHE INTERNAL "Brief description of ${the_module} module") set(OPENCV_MODULE_${the_module}_DESCRIPTION "${the_description}" CACHE INTERNAL "Brief description of ${the_module} module")
set(OPENCV_MODULE_${the_module}_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Location of ${the_module} module sources") set(OPENCV_MODULE_${the_module}_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Location of ${the_module} module sources")
unset(OPENCV_MODULE_${the_module}_REQ_DEPS CACHE)
unset(OPENCV_MODULE_${the_module}_OPT_DEPS CACHE)
#create option to enable/disable this module #create option to enable/disable this module
option(BUILD_${the_module} "Include ${the_module} module into the OpenCV build" ON) option(BUILD_${the_module} "Include ${the_module} module into the OpenCV build" ON)
......
This diff is collapsed.
//
// This file is auto-generated, please don't edit!
//
#include <jni.h> #include <jni.h>
#ifdef DEBUG #ifdef DEBUG
...@@ -10,6 +6,9 @@ ...@@ -10,6 +6,9 @@
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, MODULE_LOG_TAG, __VA_ARGS__)) #define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, MODULE_LOG_TAG, __VA_ARGS__))
#endif // DEBUG #endif // DEBUG
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
#include "opencv2/highgui/highgui_c.h" #include "opencv2/highgui/highgui_c.h"
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui.hpp"
using namespace cv; using namespace cv;
...@@ -452,3 +451,4 @@ JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1delete ...@@ -452,3 +451,4 @@ JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1delete
} // extern "C" } // extern "C"
#endif // HAVE_OPENCV_HIGHGUI
\ No newline at end of file
...@@ -180,7 +180,7 @@ void vector_Point3d_to_Mat(vector<Point3d>& v_point, Mat& mat) ...@@ -180,7 +180,7 @@ void vector_Point3d_to_Mat(vector<Point3d>& v_point, Mat& mat)
mat = Mat(v_point, true); mat = Mat(v_point, true);
} }
#ifdef HAVE_OPENCV_FEATURES2D
//vector_KeyPoint //vector_KeyPoint
void Mat_to_vector_KeyPoint(Mat& mat, vector<KeyPoint>& v_kp) void Mat_to_vector_KeyPoint(Mat& mat, vector<KeyPoint>& v_kp)
{ {
...@@ -206,6 +206,7 @@ void vector_KeyPoint_to_Mat(vector<KeyPoint>& v_kp, Mat& mat) ...@@ -206,6 +206,7 @@ void vector_KeyPoint_to_Mat(vector<KeyPoint>& v_kp, Mat& mat)
mat.at< Vec<double, 7> >(i, 0) = Vec<double, 7>(kp.pt.x, kp.pt.y, kp.size, kp.angle, kp.response, kp.octave, kp.class_id); mat.at< Vec<double, 7> >(i, 0) = Vec<double, 7>(kp.pt.x, kp.pt.y, kp.size, kp.angle, kp.response, kp.octave, kp.class_id);
} }
} }
#endif
//vector_Mat //vector_Mat
...@@ -239,6 +240,7 @@ void vector_Mat_to_Mat(std::vector<cv::Mat>& v_mat, cv::Mat& mat) ...@@ -239,6 +240,7 @@ void vector_Mat_to_Mat(std::vector<cv::Mat>& v_mat, cv::Mat& mat)
} }
} }
#ifdef HAVE_OPENCV_FEATURES2D
//vector_DMatch //vector_DMatch
void Mat_to_vector_DMatch(Mat& mat, vector<DMatch>& v_dm) void Mat_to_vector_DMatch(Mat& mat, vector<DMatch>& v_dm)
{ {
...@@ -264,6 +266,7 @@ void vector_DMatch_to_Mat(vector<DMatch>& v_dm, Mat& mat) ...@@ -264,6 +266,7 @@ void vector_DMatch_to_Mat(vector<DMatch>& v_dm, Mat& mat)
mat.at< Vec<double, 4> >(i, 0) = Vec<double, 4>(dm.queryIdx, dm.trainIdx, dm.imgIdx, dm.distance); mat.at< Vec<double, 4> >(i, 0) = Vec<double, 4>(dm.queryIdx, dm.trainIdx, dm.imgIdx, dm.distance);
} }
} }
#endif
void Mat_to_vector_vector_Point(Mat& mat, vector< vector< Point > >& vv_pt) void Mat_to_vector_vector_Point(Mat& mat, vector< vector< Point > >& vv_pt)
{ {
...@@ -278,6 +281,7 @@ void Mat_to_vector_vector_Point(Mat& mat, vector< vector< Point > >& vv_pt) ...@@ -278,6 +281,7 @@ void Mat_to_vector_vector_Point(Mat& mat, vector< vector< Point > >& vv_pt)
} }
} }
#ifdef HAVE_OPENCV_FEATURES2D
void Mat_to_vector_vector_KeyPoint(Mat& mat, vector< vector< KeyPoint > >& vv_kp) void Mat_to_vector_vector_KeyPoint(Mat& mat, vector< vector< KeyPoint > >& vv_kp)
{ {
vector<Mat> vm; vector<Mat> vm;
...@@ -329,6 +333,7 @@ void vector_vector_DMatch_to_Mat(vector< vector< DMatch > >& vv_dm, Mat& mat) ...@@ -329,6 +333,7 @@ void vector_vector_DMatch_to_Mat(vector< vector< DMatch > >& vv_dm, Mat& mat)
} }
vector_Mat_to_Mat(vm, mat); vector_Mat_to_Mat(vm, mat);
} }
#endif
void Mat_to_vector_vector_char(Mat& mat, vector< vector< char > >& vv_ch) void Mat_to_vector_vector_char(Mat& mat, vector< vector< char > >& vv_ch)
{ {
......
#include <jni.h> #include <jni.h>
#include "opencv2/opencv_modules.hpp"
#include "opencv2/core/core.hpp" #include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "features2d_manual.hpp" #include "features2d_manual.hpp"
void Mat_to_vector_int(cv::Mat& mat, std::vector<int>& v_int); void Mat_to_vector_int(cv::Mat& mat, std::vector<int>& v_int);
void vector_int_to_Mat(std::vector<int>& v_int, cv::Mat& mat); void vector_int_to_Mat(std::vector<int>& v_int, cv::Mat& mat);
...@@ -41,12 +40,15 @@ void vector_Point3d_to_Mat(std::vector<cv::Point3d>& v_point, cv::Mat& mat); ...@@ -41,12 +40,15 @@ void vector_Point3d_to_Mat(std::vector<cv::Point3d>& v_point, cv::Mat& mat);
void vector_Vec4f_to_Mat(std::vector<cv::Vec4f>& v_vec, cv::Mat& mat); void vector_Vec4f_to_Mat(std::vector<cv::Vec4f>& v_vec, cv::Mat& mat);
void vector_Vec6f_to_Mat(std::vector<cv::Vec6f>& v_vec, cv::Mat& mat); void vector_Vec6f_to_Mat(std::vector<cv::Vec6f>& v_vec, cv::Mat& mat);
#ifdef HAVE_OPENCV_FEATURES2D
void Mat_to_vector_KeyPoint(cv::Mat& mat, std::vector<cv::KeyPoint>& v_kp); void Mat_to_vector_KeyPoint(cv::Mat& mat, std::vector<cv::KeyPoint>& v_kp);
void vector_KeyPoint_to_Mat(std::vector<cv::KeyPoint>& v_kp, cv::Mat& mat); void vector_KeyPoint_to_Mat(std::vector<cv::KeyPoint>& v_kp, cv::Mat& mat);
#endif
void Mat_to_vector_Mat(cv::Mat& mat, std::vector<cv::Mat>& v_mat); void Mat_to_vector_Mat(cv::Mat& mat, std::vector<cv::Mat>& v_mat);
void vector_Mat_to_Mat(std::vector<cv::Mat>& v_mat, cv::Mat& mat); void vector_Mat_to_Mat(std::vector<cv::Mat>& v_mat, cv::Mat& mat);
#ifdef HAVE_OPENCV_FEATURES2D
void Mat_to_vector_DMatch(cv::Mat& mat, std::vector<cv::DMatch>& v_dm); void Mat_to_vector_DMatch(cv::Mat& mat, std::vector<cv::DMatch>& v_dm);
void vector_DMatch_to_Mat(std::vector<cv::DMatch>& v_dm, cv::Mat& mat); void vector_DMatch_to_Mat(std::vector<cv::DMatch>& v_dm, cv::Mat& mat);
...@@ -55,6 +57,7 @@ void vector_vector_KeyPoint_to_Mat(std::vector< std::vector< cv::KeyPoint > >& v ...@@ -55,6 +57,7 @@ void vector_vector_KeyPoint_to_Mat(std::vector< std::vector< cv::KeyPoint > >& v
void Mat_to_vector_vector_DMatch(cv::Mat& mat, std::vector< std::vector< cv::DMatch > >& vv_dm); void Mat_to_vector_vector_DMatch(cv::Mat& mat, std::vector< std::vector< cv::DMatch > >& vv_dm);
void vector_vector_DMatch_to_Mat(std::vector< std::vector< cv::DMatch > >& vv_dm, cv::Mat& mat); void vector_vector_DMatch_to_Mat(std::vector< std::vector< cv::DMatch > >& vv_dm, cv::Mat& mat);
#endif
void Mat_to_vector_vector_char(cv::Mat& mat, std::vector< std::vector< char > >& vv_ch); void Mat_to_vector_vector_char(cv::Mat& mat, std::vector< std::vector< char > >& vv_ch);
void vector_vector_char_to_Mat(std::vector< std::vector< char > >& vv_ch, cv::Mat& mat); void vector_vector_char_to_Mat(std::vector< std::vector< char > >& vv_ch, cv::Mat& mat);
......
#ifndef __OPENCV_FEATURES_2D_MANUAL_HPP__ #ifndef __OPENCV_FEATURES_2D_MANUAL_HPP__
#define __OPENCV_FEATURES_2D_MANUAL_HPP__ #define __OPENCV_FEATURES_2D_MANUAL_HPP__
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_FEATURES2D
#include "opencv2/features2d/features2d.hpp" #include "opencv2/features2d/features2d.hpp"
namespace cv namespace cv
...@@ -10,6 +13,7 @@ class CV_EXPORTS_AS(FeatureDetector) javaFeatureDetector : public FeatureDetecto ...@@ -10,6 +13,7 @@ class CV_EXPORTS_AS(FeatureDetector) javaFeatureDetector : public FeatureDetecto
{ {
public: public:
#if 0 #if 0
//DO NOT REMOVE! The block is required for sources parser
CV_WRAP void detect( const Mat& image, CV_OUT vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const; CV_WRAP void detect( const Mat& image, CV_OUT vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
CV_WRAP void detect( const vector<Mat>& images, CV_OUT vector<vector<KeyPoint> >& keypoints, const vector<Mat>& masks=vector<Mat>() ) const; CV_WRAP void detect( const vector<Mat>& images, CV_OUT vector<vector<KeyPoint> >& keypoints, const vector<Mat>& masks=vector<Mat>() ) const;
CV_WRAP virtual bool empty() const; CV_WRAP virtual bool empty() const;
...@@ -152,6 +156,7 @@ class CV_EXPORTS_AS(DescriptorMatcher) javaDescriptorMatcher : public Descriptor ...@@ -152,6 +156,7 @@ class CV_EXPORTS_AS(DescriptorMatcher) javaDescriptorMatcher : public Descriptor
{ {
public: public:
#if 0 #if 0
//DO NOT REMOVE! The block is required for sources parser
CV_WRAP virtual bool isMaskSupported() const; CV_WRAP virtual bool isMaskSupported() const;
CV_WRAP virtual void add( const vector<Mat>& descriptors ); CV_WRAP virtual void add( const vector<Mat>& descriptors );
CV_WRAP const vector<Mat>& getTrainDescriptors() const; CV_WRAP const vector<Mat>& getTrainDescriptors() const;
...@@ -245,6 +250,7 @@ class CV_EXPORTS_AS(DescriptorExtractor) javaDescriptorExtractor : public Descri ...@@ -245,6 +250,7 @@ class CV_EXPORTS_AS(DescriptorExtractor) javaDescriptorExtractor : public Descri
{ {
public: public:
#if 0 #if 0
//DO NOT REMOVE! The block is required for sources parser
CV_WRAP void compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const; CV_WRAP void compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
CV_WRAP void compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, CV_OUT vector<Mat>& descriptors ) const; CV_WRAP void compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, CV_OUT vector<Mat>& descriptors ) const;
CV_WRAP virtual int descriptorSize() const; CV_WRAP virtual int descriptorSize() const;
...@@ -326,6 +332,7 @@ class CV_EXPORTS_AS(GenericDescriptorMatcher) javaGenericDescriptorMatcher : pub ...@@ -326,6 +332,7 @@ class CV_EXPORTS_AS(GenericDescriptorMatcher) javaGenericDescriptorMatcher : pub
{ {
public: public:
#if 0 #if 0
//DO NOT REMOVE! The block is required for sources parser
CV_WRAP virtual void add( const vector<Mat>& images, CV_WRAP virtual void add( const vector<Mat>& images,
vector<vector<KeyPoint> >& keypoints ); vector<vector<KeyPoint> >& keypoints );
CV_WRAP const vector<Mat>& getTrainImages() const; CV_WRAP const vector<Mat>& getTrainImages() const;
...@@ -411,6 +418,7 @@ public: ...@@ -411,6 +418,7 @@ public:
}; };
#if 0 #if 0
//DO NOT REMOVE! The block is required for sources parser
enum enum
{ {
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be created (Mat::create). DRAW_OVER_OUTIMG = 1, // Output image matrix will not be created (Mat::create).
...@@ -441,4 +449,6 @@ CV_EXPORTS_AS(drawMatches2) void drawMatches( const Mat& img1, const vector<KeyP ...@@ -441,4 +449,6 @@ CV_EXPORTS_AS(drawMatches2) void drawMatches( const Mat& img1, const vector<KeyP
} //cv } //cv
#endif // HAVE_OPENCV_FEATURES2D
#endif // __OPENCV_FEATURES_2D_MANUAL_HPP__ #endif // __OPENCV_FEATURES_2D_MANUAL_HPP__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment