Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
5bc55a04
Commit
5bc55a04
authored
Jun 27, 2013
by
hbristow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now building all functions (not classes) in core, imgproc, ml and highgui
parent
bb56ac4a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+1
-1
gen_matlab.py
modules/matlab/generator/gen_matlab.py
+1
-1
parse_tree.py
modules/matlab/generator/parse_tree.py
+3
-2
bridge.hpp
modules/matlab/include/bridge.hpp
+6
-0
No files found.
cmake/OpenCVModule.cmake
View file @
5bc55a04
...
...
@@ -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
}
/m
l"
"
${
__path
}
/highgui"
"
${
__path
}
/m
atlab"
)
if
(
__ocvmodules
)
list
(
SORT __ocvmodules
)
foreach
(
mod
${
__ocvmodules
}
)
...
...
modules/matlab/generator/gen_matlab.py
View file @
5bc55a04
...
...
@@ -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
...
...
modules/matlab/generator/parse_tree.py
View file @
5bc55a04
...
...
@@ -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
''
...
...
modules/matlab/include/bridge.hpp
View file @
5bc55a04
...
...
@@ -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
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment