Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
51db81c6
Commit
51db81c6
authored
Feb 05, 2016
by
Davis King
Browse files
Updated documentation
parent
2812014e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
dlib/matlab/example_mex_function.cpp
dlib/matlab/example_mex_function.cpp
+11
-3
No files found.
dlib/matlab/example_mex_function.cpp
View file @
51db81c6
...
...
@@ -24,6 +24,14 @@ using namespace std;
- a dlib::array2d containing any kind of scalar value.
- a dlib::vector containing any kind of scalar value.
- a dlib::point
- matrix_colmajor or fmatrix_colmajor
These are just typedefs for matrix containing double or float and using a
column major memory layout. However, they have the special distinction
of being fast to use in mex files since they sit directly on top of
MATLAB's built in matrices. That is, while other types of arguments copy
a MATLAB object into themselves, the matrix_colmajor and fmatrix_colmajor
do no such copy and are effectively zero overhead methods for working on
MATLAB's matrices.
- RGB color images
- dlib::array2d<dlib::rgb_pixel> can be used to represent
...
...
@@ -51,9 +59,9 @@ using namespace std;
// arguments to return outputs. Finally, mex_function() must have no
// more than 10 arguments.
void
mex_function
(
const
matrix
<
double
>
&
x
,
const
matrix
<
double
>
&
y
,
matrix
<
double
>
&
out1
,
const
matrix
_colmajor
&
x
,
const
matrix
_colmajor
&
y
,
matrix
_colmajor
&
out1
,
double
&
out2
,
double
some_number
)
...
...
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