Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Torenvliet
eos
Commits
df9b6393
Commit
df9b6393
authored
10 years ago
by
Patrik Huber
Browse files
Options
Downloads
Patches
Plain Diff
Changed function names to snake_case
parent
14ff9b6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/eos/morphablemodel/io/cvssp.hpp
+9
-9
9 additions, 9 deletions
include/eos/morphablemodel/io/cvssp.hpp
with
9 additions
and
9 deletions
include/eos/morphablemodel/io/cvssp.hpp
+
9
−
9
View file @
df9b6393
...
...
@@ -41,7 +41,7 @@ namespace eos {
/**
* Forward declarations
*/
std
::
vector
<
cv
::
Vec2f
>
load
I
somap
(
boost
::
filesystem
::
path
isomap
F
ile
);
std
::
vector
<
cv
::
Vec2f
>
load
_i
somap
(
boost
::
filesystem
::
path
isomap
_f
ile
);
/**
* Load a shape or color model from a .scm file containing
...
...
@@ -57,12 +57,12 @@ std::vector<cv::Vec2f> loadIsomap(boost::filesystem::path isomapFile);
*
* - The pcaBasis matrix stored in the file and loaded is the orthogonal PCA basis, i.e. it is not normalised by the eigenvalues.
*
* @param[in] model
F
ilename A binary .scm-file containing the model.
* @param[in] isomap
F
ile An optional path to an isomap containing texture coordinates.
* @param[in] model
_f
ilename A binary .scm-file containing the model.
* @param[in] isomap
_f
ile An optional path to an isomap containing texture coordinates.
* @return The Morphable Model loaded from the file.
* @throws ...
*/
MorphableModel
load
ScmM
odel
(
boost
::
filesystem
::
path
model
F
ilename
,
boost
::
filesystem
::
path
isomap
F
ile
=
boost
::
filesystem
::
path
())
MorphableModel
load
_scm_m
odel
(
boost
::
filesystem
::
path
model
_f
ilename
,
boost
::
filesystem
::
path
isomap
_f
ile
=
boost
::
filesystem
::
path
())
{
using
cv
::
Mat
;
if
(
sizeof
(
unsigned
int
)
!=
4
)
{
// note/todo: maybe use uint32 or similar instead? Yep, but still we could encounter endianness-trouble.
...
...
@@ -72,9 +72,9 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
std
::
cout
<<
"Warning: We're reading 8 Bytes from the file but sizeof(double) != 8. Check the code/behaviour."
<<
std
::
endl
;
}
std
::
ifstream
modelFile
(
model
F
ilename
.
string
(),
std
::
ios
::
binary
);
std
::
ifstream
modelFile
(
model
_f
ilename
.
string
(),
std
::
ios
::
binary
);
if
(
!
modelFile
.
is_open
())
{
std
::
string
msg
(
"Unable to open model file: "
+
model
F
ilename
.
string
());
std
::
string
msg
(
"Unable to open model file: "
+
model
_f
ilename
.
string
());
std
::
cout
<<
msg
<<
std
::
endl
;
throw
std
::
runtime_error
(
msg
);
}
...
...
@@ -214,8 +214,8 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
// Load the isomap with texture coordinates if a filename has been given:
std
::
vector
<
cv
::
Vec2f
>
texCoords
;
if
(
!
isomap
F
ile
.
empty
())
{
texCoords
=
load
I
somap
(
isomap
F
ile
);
if
(
!
isomap
_f
ile
.
empty
())
{
texCoords
=
load
_i
somap
(
isomap
_f
ile
);
if
(
shapeModel
.
get_data_dimension
()
/
3.0
f
!=
texCoords
.
size
())
{
std
::
string
errorMessage
(
"Error, wrong number of texture coordinates. Don't have the same number of texcoords than the shape model has vertices."
);
std
::
cout
<<
errorMessage
<<
std
::
endl
;
...
...
@@ -234,7 +234,7 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
* @return The 2D texture coordinates for every vertex.
* @throws ...
*/
std
::
vector
<
cv
::
Vec2f
>
load
I
somap
(
boost
::
filesystem
::
path
isomapFile
)
std
::
vector
<
cv
::
Vec2f
>
load
_i
somap
(
boost
::
filesystem
::
path
isomapFile
)
{
using
std
::
string
;
std
::
vector
<
float
>
xCoords
,
yCoords
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment