Updated documentation
This commit is contained in:
parent
1dd017e9d0
commit
d84ab09ab7
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 ...]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user