mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
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
|
||||
#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)
|
||||
list(SORT __ocvmodules)
|
||||
foreach(mod ${__ocvmodules})
|
||||
|
@ -12,8 +12,8 @@ class MatlabWrapperGenerator(object):
|
||||
name = os.path.splitext(os.path.basename(file))[0]
|
||||
ns[name] = parser.parse(file)
|
||||
|
||||
print ns['imgproc']
|
||||
# cleanify the parser output
|
||||
print ns['ml']
|
||||
parse_tree = ParseTree()
|
||||
parse_tree.build(ns)
|
||||
print parse_tree
|
||||
|
@ -49,7 +49,7 @@ class Translator(object):
|
||||
def translate(self, defn):
|
||||
# --- class ---
|
||||
# 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)
|
||||
# --- function ---
|
||||
# functions either need to have input arguments, or not uppercase names
|
||||
@ -100,8 +100,9 @@ class Translator(object):
|
||||
return name.split(' ')[-1].split('.')[-1]
|
||||
|
||||
def translateClassName(self, name):
|
||||
name = name.split(' ')[-1]
|
||||
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<int> vector_int;
|
||||
typedef std::vector<float> vector_float;
|
||||
typedef std::vector<unsigned char> vector_uchar;
|
||||
|
||||
|
||||
void conditionalError(bool expr, const std::string& str) {
|
||||
@ -178,6 +179,11 @@ public:
|
||||
vector_Point toVectorPoint() { return vector_Point(); }
|
||||
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 --------------------------------------
|
||||
Bridge& operator=(const cv::Scalar& obj) { return *this; }
|
||||
cv::Scalar toScalar() { return cv::Scalar(); }
|
||||
|
Loading…
Reference in New Issue
Block a user