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
d84ab09a
Commit
d84ab09a
authored
Sep 18, 2013
by
hbristow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated documentation
parent
1dd017e9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
16 deletions
+32
-16
README.md
modules/matlab/README.md
+20
-9
build_info.py
modules/matlab/generator/build_info.py
+2
-1
cvmex.py
modules/matlab/generator/cvmex.py
+2
-1
gen_matlab.py
modules/matlab/generator/gen_matlab.py
+4
-1
mxarray.hpp
modules/matlab/include/opencv2/matlab/mxarray.hpp
+4
-4
No files found.
modules/matlab/README.md
View file @
d84ab09a
...
...
@@ -124,9 +124,8 @@ opencv/modules/matlab (this module)
*
`CMakeLists.txt`
(main cmake configuration file)
*
`README.md`
(this file)
*
`compile.cmake`
(the cmake
help
script for compiling generated source code)
*
`compile.cmake`
(the cmake script for compiling generated source code)
*
`generator`
(the folder containing generator code)
*
`jinja2`
(the binding templating engine)
*
`filters.py`
(template filters)
*
`gen_matlab.py`
(the binding generator control script)
*
`parse_tree.py`
(python class to refactor the hdr_parser.py output)
...
...
@@ -135,7 +134,6 @@ opencv/modules/matlab (this module)
*
`mxarray.hpp`
(C++ OOP-style interface for Matlab mxArray
*
class)
*
`bridge.hpp`
(type conversions)
*
`map.hpp`
(hash map interface for instance storage and method lookup)
*
`io`
(FileStorage interface for .mat files)
*
`test`
(generator, compiler and binding test scripts)
...
...
@@ -262,28 +260,41 @@ File Reference
**gen_matlab.py**
gen_matlab has the following call signature:
gen_matlab.py --hdrparser path/to/hdr_parser/dir
gen_matlab.py --jinja2 path/to/jinja2/engine
--hdrparser path/to/hdr_parser/dir
--rstparser path/to/rst_parser/dir
--moduleroot path/to/opencv/modules
--modules
core imgproc highgui etc
--modules
[
core imgproc highgui ...
]
--extra namespace=/additional/header/to/parse
--outdir /path/to/place/generated/src
**build_info.py**
build_info has the following call signature:
build_info.py --os operating_system_string
--arch bitness processor
--compiler id version
build_info.py --jinja2 path/to/jinja2/engine
--os operating_system_string
--arch
[
bitness processor
]
--compiler
[
id version
]
--mex_arch arch_string
--mex_script /path/to/mex/script
--cxx_flags
-list -of -flags -to -passthrough
--cxx_flags
[
-list -of -flags -to -passthrough
]
--opencv_version version_string
--commit commit_hash_if_using_git
--modules core imgproc highgui etc
--configuration Debug/Release
--outdir path/to/place/build/info
**cvmex.py**
cvmex.py, the custom compiler generator, has the following call signature:
cvmex.py --jinja2 path/to/jinja2/engine
--opts
[
-list -of -opts
]
--include_dirs
[
-list -of -opencv_include_directories
]
--lib_dir opencv_lib_directory
--libs
[
-lopencv_core -lopencv_imgproc ...
]
--flags
[
-Wall -opencv_build_flags ...
]
--outdir /path/to/generated/output
**parse_tree.py**
To build a parse tree, first parse a set of headers, then invoke the parse tree to refactor the output:
...
...
modules/matlab/generator/build_info.py
View file @
d84ab09a
...
...
@@ -25,7 +25,8 @@ def substitute(build, output_dir):
if
__name__
==
"__main__"
:
"""
Usage: python build_info.py --os os_version_string
Usage: python build_info.py --jinja2 /path/to/jinja2/engine
--os os_version_string
--arch [bitness processor]
--compiler [id version]
--mex_arch arch_string
...
...
modules/matlab/generator/cvmex.py
View file @
d84ab09a
...
...
@@ -26,7 +26,8 @@ def substitute(cv, output_dir):
if
__name__
==
"__main__"
:
"""
Usage: python cvmex.py --opts [-list -of -opts]
Usage: python cvmex.py --jinja2 /path/to/jinja2/engine
--opts [-list -of -opts]
--include_dirs [-list -of -opencv_include_directories]
--lib_dir opencv_lib_directory
--libs [-lopencv_core -lopencv_imgproc ...]
...
...
modules/matlab/generator/gen_matlab.py
View file @
d84ab09a
...
...
@@ -130,7 +130,8 @@ class MatlabWrapperGenerator(object):
if
__name__
==
"__main__"
:
"""
Usage: python gen_matlab.py --hdrparser /path/to/hdr_parser/dir
Usage: python gen_matlab.py --jinja2 /path/to/jinja2/engine
--hdrparser /path/to/hdr_parser/dir
--rstparser /path/to/rst_parser/dir
--moduleroot /path/to/opencv/modules
--modules [core imgproc objdetect etc]
...
...
@@ -147,6 +148,8 @@ if __name__ == "__main__":
definitions
gen_matlab.py requires the following inputs:
--jinja2 the path to the Jinja2 templating engine
e.g. ${CMAKE_SOURCE_DIR}/3rdparty
--hdrparser the path to the header parser directory
(opencv/modules/python/src2)
--rstparser the path to the rst parser directory
...
...
modules/matlab/include/opencv2/matlab/mxarray.hpp
View file @
d84ab09a
...
...
@@ -379,10 +379,10 @@ public:
*
* e.g.
* {
* MxArray A
<double>(5, 5);
// allocates memory
* MxArray B
<double>(5, 5);
// ditto
* plhs[0] = A; // not allowed!!
* plhs[0] = A.releaseOwnership(); // makes explicit that ownership is being released
* MxArray A
= MxArray::Matrix<double>(5, 5);
// allocates memory
* MxArray B
= MxArray::Matrix<double>(5, 5);
// ditto
* plhs[0] = A;
// not allowed!!
* plhs[0] = A.releaseOwnership();
// makes explicit that ownership is being released
* } // end of scope. B is released, A isn't
*
*/
...
...
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