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
9bce6d98
Commit
9bce6d98
authored
Jan 28, 2017
by
Patrik Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made most variables const in matlab-fitting bindings
parent
64bea854
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
matlab/+eos/+fitting/private/fitting.cpp
matlab/+eos/+fitting/private/fitting.cpp
+18
-18
No files found.
matlab/+eos/+fitting/private/fitting.cpp
View file @
9bce6d98
...
@@ -55,18 +55,18 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
...
@@ -55,18 +55,18 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
}
}
InputArguments
input
(
nrhs
,
prhs
,
12
);
InputArguments
input
(
nrhs
,
prhs
,
12
);
auto
morphablemodel_file
=
input
.
get
<
string
>
(
0
);
const
auto
morphablemodel_file
=
input
.
get
<
string
>
(
0
);
auto
blendshapes_file
=
input
.
get
<
string
>
(
1
);
const
auto
blendshapes_file
=
input
.
get
<
string
>
(
1
);
auto
landmarks_in
=
input
.
get
<
Eigen
::
MatrixXd
>
(
2
);
const
auto
landmarks_in
=
input
.
get
<
Eigen
::
MatrixXd
>
(
2
);
auto
mapper_file
=
input
.
get
<
string
>
(
3
);
const
auto
mapper_file
=
input
.
get
<
string
>
(
3
);
auto
image_width
=
input
.
get
<
int
>
(
4
);
const
auto
image_width
=
input
.
get
<
int
>
(
4
);
auto
image_height
=
input
.
get
<
int
>
(
5
);
const
auto
image_height
=
input
.
get
<
int
>
(
5
);
auto
edgetopo_file
=
input
.
get
<
string
>
(
6
);
const
auto
edgetopo_file
=
input
.
get
<
string
>
(
6
);
auto
contour_lms_file
=
input
.
get
<
string
>
(
7
);
const
auto
contour_lms_file
=
input
.
get
<
string
>
(
7
);
auto
model_cnt_file
=
input
.
get
<
string
>
(
8
);
const
auto
model_cnt_file
=
input
.
get
<
string
>
(
8
);
auto
num_iterations
=
input
.
get
<
int
>
(
9
);
const
auto
num_iterations
=
input
.
get
<
int
>
(
9
);
auto
num_shape_coeffs
=
input
.
get
<
int
>
(
10
);
const
auto
num_shape_coeffs
=
input
.
get
<
int
>
(
10
);
auto
lambda
=
input
.
get
<
double
>
(
11
);
const
auto
lambda
=
input
.
get
<
double
>
(
11
);
if
(
landmarks_in
.
rows
()
!=
68
)
{
if
(
landmarks_in
.
rows
()
!=
68
)
{
mexErrMsgIdAndTxt
(
"eos:fitting:argin"
,
"Given landmarks must be a 68 x 2 vector with ibug landmarks, in the order from 1 to 68."
);
mexErrMsgIdAndTxt
(
"eos:fitting:argin"
,
"Given landmarks must be a 68 x 2 vector with ibug landmarks, in the order from 1 to 68."
);
...
@@ -80,12 +80,12 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
...
@@ -80,12 +80,12 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
// Load everything:
// Load everything:
const
auto
morphable_model
=
morphablemodel
::
load_model
(
morphablemodel_file
);
const
auto
morphable_model
=
morphablemodel
::
load_model
(
morphablemodel_file
);
auto
blendshapes
=
morphablemodel
::
load_blendshapes
(
blendshapes_file
);
const
auto
blendshapes
=
morphablemodel
::
load_blendshapes
(
blendshapes_file
);
core
::
LandmarkMapper
landmark_mapper
(
mapper_file
);
co
nst
co
re
::
LandmarkMapper
landmark_mapper
(
mapper_file
);
auto
edge_topology
=
morphablemodel
::
load_edge_topology
(
edgetopo_file
);
const
auto
edge_topology
=
morphablemodel
::
load_edge_topology
(
edgetopo_file
);
auto
contour_landmarks
=
fitting
::
ContourLandmarks
::
load
(
contour_lms_file
);
const
auto
contour_landmarks
=
fitting
::
ContourLandmarks
::
load
(
contour_lms_file
);
auto
model_contour
=
fitting
::
ModelContour
::
load
(
model_cnt_file
);
const
auto
model_contour
=
fitting
::
ModelContour
::
load
(
model_cnt_file
);
boost
::
optional
<
int
>
num_shape_coefficients_to_fit
=
num_shape_coeffs
==
-
1
?
boost
::
none
:
boost
::
optional
<
int
>
(
num_shape_coeffs
);
const
boost
::
optional
<
int
>
num_shape_coefficients_to_fit
=
num_shape_coeffs
==
-
1
?
boost
::
none
:
boost
::
optional
<
int
>
(
num_shape_coeffs
);
// Now do the actual fitting:
// Now do the actual fitting:
core
::
Mesh
mesh
;
core
::
Mesh
mesh
;
...
...
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