Now building all functions (not classes) in core, imgproc, ml and highgui
This commit is contained in:
parent
bb56ac4ae6
commit
5bc55a042e
@ -313,7 +313,7 @@ macro(ocv_glob_modules)
|
|||||||
|
|
||||||
# TODO: Undo this change to build all modules
|
# TODO: Undo this change to build all modules
|
||||||
#file(GLOB __ocvmodules RELATIVE "${__path}" "${__path}/*")
|
#file(GLOB __ocvmodules RELATIVE "${__path}" "${__path}/*")
|
||||||
file(GLOB __ocvmodules RELATIVE "${__path}" "${__path}/core" "${__path}/imgproc" "${__path}/matlab")
|
file(GLOB __ocvmodules RELATIVE "${__path}" "${__path}/core" "${__path}/imgproc" "${__path}/ml" "${__path}/highgui" "${__path}/matlab")
|
||||||
if(__ocvmodules)
|
if(__ocvmodules)
|
||||||
list(SORT __ocvmodules)
|
list(SORT __ocvmodules)
|
||||||
foreach(mod ${__ocvmodules})
|
foreach(mod ${__ocvmodules})
|
||||||
|
@ -12,8 +12,8 @@ class MatlabWrapperGenerator(object):
|
|||||||
name = os.path.splitext(os.path.basename(file))[0]
|
name = os.path.splitext(os.path.basename(file))[0]
|
||||||
ns[name] = parser.parse(file)
|
ns[name] = parser.parse(file)
|
||||||
|
|
||||||
print ns['imgproc']
|
|
||||||
# cleanify the parser output
|
# cleanify the parser output
|
||||||
|
print ns['ml']
|
||||||
parse_tree = ParseTree()
|
parse_tree = ParseTree()
|
||||||
parse_tree.build(ns)
|
parse_tree.build(ns)
|
||||||
print parse_tree
|
print parse_tree
|
||||||
|
@ -49,7 +49,7 @@ class Translator(object):
|
|||||||
def translate(self, defn):
|
def translate(self, defn):
|
||||||
# --- class ---
|
# --- class ---
|
||||||
# classes have 'class' prefixed on their name
|
# classes have 'class' prefixed on their name
|
||||||
if 'class' in defn[0]:
|
if 'class' in defn[0].split(' ') or 'struct' in defn[0].split(' '):
|
||||||
return self.translateClass(defn)
|
return self.translateClass(defn)
|
||||||
# --- function ---
|
# --- function ---
|
||||||
# functions either need to have input arguments, or not uppercase names
|
# functions either need to have input arguments, or not uppercase names
|
||||||
@ -100,8 +100,9 @@ class Translator(object):
|
|||||||
return name.split(' ')[-1].split('.')[-1]
|
return name.split(' ')[-1].split('.')[-1]
|
||||||
|
|
||||||
def translateClassName(self, name):
|
def translateClassName(self, name):
|
||||||
|
name = name.split(' ')[-1]
|
||||||
parts = name.split('.')
|
parts = name.split('.')
|
||||||
return parts[1] if len(parts) == 3 else ''
|
return parts[-2] if len(parts) > 1 and not parts[-2] == 'cv' else ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ typedef std::vector<cv::Mat> vector_Mat;
|
|||||||
typedef std::vector<cv::Point> vector_Point;
|
typedef std::vector<cv::Point> vector_Point;
|
||||||
typedef std::vector<int> vector_int;
|
typedef std::vector<int> vector_int;
|
||||||
typedef std::vector<float> vector_float;
|
typedef std::vector<float> vector_float;
|
||||||
|
typedef std::vector<unsigned char> vector_uchar;
|
||||||
|
|
||||||
|
|
||||||
void conditionalError(bool expr, const std::string& str) {
|
void conditionalError(bool expr, const std::string& str) {
|
||||||
@ -178,6 +179,11 @@ public:
|
|||||||
vector_Point toVectorPoint() { return vector_Point(); }
|
vector_Point toVectorPoint() { return vector_Point(); }
|
||||||
operator vector_Point() { return toVectorPoint(); }
|
operator vector_Point() { return toVectorPoint(); }
|
||||||
|
|
||||||
|
// ------------------------ vector_uchar -------------------------------------
|
||||||
|
Bridge& operator=(const vector_uchar& obj) { return *this; }
|
||||||
|
vector_uchar toVectorUchar() { return vector_uchar(); }
|
||||||
|
operator vector_uchar() { return toVectorUchar(); }
|
||||||
|
|
||||||
// -------------------------- Scalar --------------------------------------
|
// -------------------------- Scalar --------------------------------------
|
||||||
Bridge& operator=(const cv::Scalar& obj) { return *this; }
|
Bridge& operator=(const cv::Scalar& obj) { return *this; }
|
||||||
cv::Scalar toScalar() { return cv::Scalar(); }
|
cv::Scalar toScalar() { return cv::Scalar(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user