Now building all OpenCV functions
This commit is contained in:
parent
d6453cf051
commit
ef6327bb89
@ -41,12 +41,13 @@ if (IOS OR ANDROID OR NOT MATLAB_FOUND OR NOT PYTHONLIBS_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(the_description "The Matlab/Octave bindings")
|
set(the_description "The Matlab/Octave bindings")
|
||||||
ocv_add_module(matlab BINDINGS #TODO: does it actually NEED to depend on core?
|
ocv_add_module(matlab BINDINGS
|
||||||
OPTIONAL opencv_core
|
OPTIONAL opencv_core
|
||||||
opencv_imgproc opencv_ml opencv_highgui
|
opencv_imgproc opencv_ml opencv_highgui
|
||||||
opencv_objdetect #opencv_features2d TODO: Re-enable when Flann is in a compliant state
|
opencv_objdetect opencv_flann opencv_features2d
|
||||||
opencv_video opencv_photo
|
opencv_photo opencv_video opencv_videostab
|
||||||
#opencv_calib opencv_calib3d
|
opencv_calib opencv_calib3d
|
||||||
|
opencv_stitching opencv_superres
|
||||||
opencv_nonfree
|
opencv_nonfree
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@ class ParseTree(object):
|
|||||||
constants = []
|
constants = []
|
||||||
for defn in definitions:
|
for defn in definitions:
|
||||||
obj = babel.translate(defn)
|
obj = babel.translate(defn)
|
||||||
|
if obj is None:
|
||||||
|
continue
|
||||||
if type(obj) is Class or obj.clss:
|
if type(obj) is Class or obj.clss:
|
||||||
self.insertIntoClassTree(obj, class_tree)
|
self.insertIntoClassTree(obj, class_tree)
|
||||||
elif type(obj) is Function:
|
elif type(obj) is Function:
|
||||||
@ -54,7 +56,7 @@ class Translator(object):
|
|||||||
# --- operators! ---
|
# --- operators! ---
|
||||||
#TODO: implement operators: http://www.mathworks.com.au/help/matlab/matlab_oop/implementing-operators-for-your-class.html
|
#TODO: implement operators: http://www.mathworks.com.au/help/matlab/matlab_oop/implementing-operators-for-your-class.html
|
||||||
if 'operator' in defn[0]:
|
if 'operator' in defn[0]:
|
||||||
return self.translateFunction(defn)
|
return
|
||||||
# --- constant ---
|
# --- constant ---
|
||||||
elif convertibleToInt(defn[1]):
|
elif convertibleToInt(defn[1]):
|
||||||
return self.translateConstant(defn)
|
return self.translateConstant(defn)
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
#include "mex.h"
|
#include "mex.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
#include <opencv2/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
|
#include <opencv2/calib3d.hpp>
|
||||||
#include <ext/hash_map>
|
#include <ext/hash_map>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -17,6 +19,10 @@ typedef std::vector<float> vector_float;
|
|||||||
typedef std::vector<cv::String> vector_String;
|
typedef std::vector<cv::String> vector_String;
|
||||||
typedef std::vector<unsigned char> vector_uchar;
|
typedef std::vector<unsigned char> vector_uchar;
|
||||||
typedef std::vector<cv::Rect> vector_Rect;
|
typedef std::vector<cv::Rect> vector_Rect;
|
||||||
|
typedef std::vector<cv::KeyPoint> vector_KeyPoint;
|
||||||
|
typedef cv::Ptr<cv::StereoBM> Ptr_StereoBM;
|
||||||
|
typedef cv::Ptr<cv::StereoSGBM> Ptr_StereoSGBM;
|
||||||
|
typedef cv::Ptr<cv::FeatureDetector> Ptr_FeatureDetector;
|
||||||
|
|
||||||
|
|
||||||
void conditionalError(bool expr, const std::string& str) {
|
void conditionalError(bool expr, const std::string& str) {
|
||||||
@ -126,6 +132,21 @@ public:
|
|||||||
int toInt() { return 0; }
|
int toInt() { return 0; }
|
||||||
operator int() { return toInt(); }
|
operator int() { return toInt(); }
|
||||||
|
|
||||||
|
// --------------------------- Ptr_StereoBM --------------------------------------
|
||||||
|
Bridge& operator=(const Ptr_StereoBM& obj) { return *this; }
|
||||||
|
Ptr_StereoBM toPtrStereoBM() { return Ptr_StereoBM(); }
|
||||||
|
operator Ptr_StereoBM() { return toPtrStereoBM(); }
|
||||||
|
|
||||||
|
// --------------------------- Ptr_StereoSGBM --------------------------------------
|
||||||
|
Bridge& operator=(const Ptr_StereoSGBM& obj) { return *this; }
|
||||||
|
Ptr_StereoSGBM toPtrStereoSGBM() { return Ptr_StereoSGBM(); }
|
||||||
|
operator Ptr_StereoSGBM() { return toPtrStereoSGBM(); }
|
||||||
|
|
||||||
|
// --------------------------- Ptr_FeatureDetector --------------------------------------
|
||||||
|
Bridge& operator=(const Ptr_FeatureDetector& obj) { return *this; }
|
||||||
|
Ptr_FeatureDetector toPtrFeatureDetector() { return Ptr_FeatureDetector(); }
|
||||||
|
operator Ptr_FeatureDetector() { return toPtrFeatureDetector(); }
|
||||||
|
|
||||||
// --------------------------- vector_int ----------------------------------
|
// --------------------------- vector_int ----------------------------------
|
||||||
Bridge& operator=(const vector_int& obj) { return *this; }
|
Bridge& operator=(const vector_int& obj) { return *this; }
|
||||||
vector_int toVectorInt() { return vector_int(); }
|
vector_int toVectorInt() { return vector_int(); }
|
||||||
@ -141,6 +162,11 @@ public:
|
|||||||
vector_Rect toVectorRect() { return vector_Rect(); }
|
vector_Rect toVectorRect() { return vector_Rect(); }
|
||||||
operator vector_Rect() { return toVectorRect(); }
|
operator vector_Rect() { return toVectorRect(); }
|
||||||
|
|
||||||
|
// --------------------------- vector_KeyPoint ----------------------------------
|
||||||
|
Bridge& operator=(const vector_KeyPoint& obj) { return *this; }
|
||||||
|
vector_KeyPoint toVectorKeyPoint() { return vector_KeyPoint(); }
|
||||||
|
operator vector_KeyPoint() { return toVectorKeyPoint(); }
|
||||||
|
|
||||||
// --------------------------- vector_String ----------------------------------
|
// --------------------------- vector_String ----------------------------------
|
||||||
Bridge& operator=(const vector_String& obj) { return *this; }
|
Bridge& operator=(const vector_String& obj) { return *this; }
|
||||||
vector_String toVectorString() { return vector_String(); }
|
vector_String toVectorString() { return vector_String(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user