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
df9b6393
Commit
df9b6393
authored
Jul 11, 2015
by
Patrik Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed function names to snake_case
parent
14ff9b6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
include/eos/morphablemodel/io/cvssp.hpp
include/eos/morphablemodel/io/cvssp.hpp
+9
-9
No files found.
include/eos/morphablemodel/io/cvssp.hpp
View file @
df9b6393
...
@@ -41,7 +41,7 @@ namespace eos {
...
@@ -41,7 +41,7 @@ namespace eos {
/**
/**
* Forward declarations
* Forward declarations
*/
*/
std
::
vector
<
cv
::
Vec2f
>
load
Isomap
(
boost
::
filesystem
::
path
isomapF
ile
);
std
::
vector
<
cv
::
Vec2f
>
load
_isomap
(
boost
::
filesystem
::
path
isomap_f
ile
);
/**
/**
* Load a shape or color model from a .scm file containing
* Load a shape or color model from a .scm file containing
...
@@ -57,12 +57,12 @@ std::vector<cv::Vec2f> loadIsomap(boost::filesystem::path isomapFile);
...
@@ -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.
* - 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] 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] isomap
_f
ile An optional path to an isomap containing texture coordinates.
* @return The Morphable Model loaded from the file.
* @return The Morphable Model loaded from the file.
* @throws ...
* @throws ...
*/
*/
MorphableModel
load
ScmModel
(
boost
::
filesystem
::
path
modelFilename
,
boost
::
filesystem
::
path
isomapF
ile
=
boost
::
filesystem
::
path
())
MorphableModel
load
_scm_model
(
boost
::
filesystem
::
path
model_filename
,
boost
::
filesystem
::
path
isomap_f
ile
=
boost
::
filesystem
::
path
())
{
{
using
cv
::
Mat
;
using
cv
::
Mat
;
if
(
sizeof
(
unsigned
int
)
!=
4
)
{
// note/todo: maybe use uint32 or similar instead? Yep, but still we could encounter endianness-trouble.
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
...
@@ -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
::
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
())
{
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
;
std
::
cout
<<
msg
<<
std
::
endl
;
throw
std
::
runtime_error
(
msg
);
throw
std
::
runtime_error
(
msg
);
}
}
...
@@ -214,8 +214,8 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
...
@@ -214,8 +214,8 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
// Load the isomap with texture coordinates if a filename has been given:
// Load the isomap with texture coordinates if a filename has been given:
std
::
vector
<
cv
::
Vec2f
>
texCoords
;
std
::
vector
<
cv
::
Vec2f
>
texCoords
;
if
(
!
isomap
F
ile
.
empty
())
{
if
(
!
isomap
_f
ile
.
empty
())
{
texCoords
=
load
Isomap
(
isomapF
ile
);
texCoords
=
load
_isomap
(
isomap_f
ile
);
if
(
shapeModel
.
get_data_dimension
()
/
3.0
f
!=
texCoords
.
size
())
{
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
::
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
;
std
::
cout
<<
errorMessage
<<
std
::
endl
;
...
@@ -234,7 +234,7 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
...
@@ -234,7 +234,7 @@ MorphableModel loadScmModel(boost::filesystem::path modelFilename, boost::filesy
* @return The 2D texture coordinates for every vertex.
* @return The 2D texture coordinates for every vertex.
* @throws ...
* @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
;
using
std
::
string
;
std
::
vector
<
float
>
xCoords
,
yCoords
;
std
::
vector
<
float
>
xCoords
,
yCoords
;
...
...
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