Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
51db81c6
Commit
51db81c6
authored
Feb 05, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated documentation
parent
2812014e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
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