Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
eos
Commits
c68ffec6
Commit
c68ffec6
authored
Feb 17, 2017
by
Patrik Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed mexFunction call to MEX_DISPATCH
This enables defining multiple functions per Matlab mex module
parent
71d5dc07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
matlab/+eos/+render/extract_texture.m
matlab/+eos/+render/extract_texture.m
+2
-2
matlab/+eos/+render/private/render.cpp
matlab/+eos/+render/private/render.cpp
+4
-1
No files found.
matlab/+eos/+render/extract_texture.m
View file @
c68ffec6
function
[
texturemap
]
=
extract_texture
(
mesh
,
rendering_params
,
image
,
...
function
[
texturemap
]
=
extract_texture
(
mesh
,
rendering_params
,
image
,
...
compute_view_angle
,
isomap_resolution
)
% EXTRACT_TEXTURE Extracts the texture from an image and returns the texture map.
% [ texturemap ] = EXTRACT_TEXTURE(mesh, rendering_params, image, ...
...
...
@@ -18,6 +18,6 @@ function [texturemap] = extract_texture(mesh, rendering_params, image, ...
if
(
~
exist
(
'compute_view_angle'
,
'var'
)),
compute_view_angle
=
false
;
end
if
(
~
exist
(
'isomap_resolution'
,
'var'
)),
isomap_resolution
=
512
;
end
[
texturemap
]
=
render
(
mesh
,
rendering_params
,
image
,
compute_view_angle
,
isomap_resolution
);
[
texturemap
]
=
render
(
'extract_texture'
,
mesh
,
rendering_params
,
image
,
compute_view_angle
,
isomap_resolution
);
end
matlab/+eos/+render/private/render.cpp
View file @
c68ffec6
...
...
@@ -25,6 +25,7 @@
#include "mexplus_eos_types.hpp"
#include "mexplus.h"
#include "mexplus/dispatch.h"
#include "opencv2/core/core.hpp"
...
...
@@ -33,7 +34,7 @@
using
namespace
eos
;
using
namespace
mexplus
;
void
mexFunction
(
int
nlhs
,
mxArray
*
plhs
[],
int
nrhs
,
const
mxArray
*
prhs
[])
MEX_DEFINE
(
extract_texture
)
(
int
nlhs
,
mxArray
*
plhs
[],
int
nrhs
,
const
mxArray
*
prhs
[])
{
// Check for proper number of input and output arguments:
if
(
nrhs
!=
5
)
{
...
...
@@ -63,3 +64,5 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
OutputArguments
output
(
nlhs
,
plhs
,
1
);
output
.
set
(
0
,
isomap
);
};
MEX_DISPATCH
;
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