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
3a39a178
Commit
3a39a178
authored
9 years ago
by
Patrik Huber
Browse files
Options
Downloads
Patches
Plain Diff
Renamed CameraParameters to RenderingParameters, improved documentation
parent
fb556283
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/fitting/nonlinear_camera_estimation.hpp
+12
-10
12 additions, 10 deletions
include/eos/fitting/nonlinear_camera_estimation.hpp
with
12 additions
and
10 deletions
include/eos/fitting/nonlinear_camera_estimation.hpp
+
12
−
10
View file @
3a39a178
...
...
@@ -51,10 +51,12 @@ struct Frustum
* @brief Represents a set of estimated model parameters (rotation, translation) and
* camera parameters (viewing frustum).
*
* Strictly speaking, the estimated rotation and translation are not camera parameters, they
* are the values that transform the model from model-space to camera-space, so they are the
* inverse of the camera position.
* The camera frustum describes the size of the viewing plane of the camera.
* The estimated rotation and translation transform the model from model-space to camera-space,
* and, if one wishes to use OpenGL, can be used to build the model-view matrix.
* The parameters are the inverse of the camera position in 3D space.
*
* The camera frustum describes the size of the viewing plane of the camera, and
* can be used to build an OpenGL-conformant orthographic projection matrix.
*
* Together, these parameters fully describe the imaging process of a given model instance
* (under an orthographic projection).
...
...
@@ -62,11 +64,11 @@ struct Frustum
* The rotation values are given in radians and estimated using the RPY convention.
* Yaw is applied first to the model, then pitch, then roll (R * P * Y * vertex).
*/
struct
Camera
Parameters
struct
Rendering
Parameters
{
float
r_x
;
//
p
itch
float
r_y
;
//
y
aw.
p
ositive means subject is looking left (we see
his/
her right cheek).
float
r_z
;
//
roll
float
r_x
;
//
P
itch
.
float
r_y
;
//
Y
aw.
P
ositive means subject is looking left (we see her right cheek).
float
r_z
;
//
Roll. Positive means the subject's right eye is further down than the other one (he tilts his head to the right).
float
t_x
;
float
t_y
;
Frustum
frustum
;
...
...
@@ -97,7 +99,7 @@ struct CameraParameters
* @param[in] height Height of the image (or viewport).
* @return The estimated model and camera parameters.
*/
Camera
Parameters
estimate_orthographic_camera
(
std
::
vector
<
cv
::
Vec2f
>
image_points
,
std
::
vector
<
cv
::
Vec4f
>
model_points
,
int
width
,
int
height
)
Rendering
Parameters
estimate_orthographic_camera
(
std
::
vector
<
cv
::
Vec2f
>
image_points
,
std
::
vector
<
cv
::
Vec4f
>
model_points
,
int
width
,
int
height
)
{
using
cv
::
Mat
;
assert
(
image_points
.
size
()
==
model_points
.
size
());
...
...
@@ -121,7 +123,7 @@ CameraParameters estimate_orthographic_camera(std::vector<cv::Vec2f> image_point
// 'parameters' contains the solution now.
Frustum
camera_frustum
{
-
1.0
f
*
aspect
*
parameters
[
5
],
1.0
f
*
aspect
*
parameters
[
5
],
-
1.0
f
*
parameters
[
5
],
1.0
f
*
parameters
[
5
]
};
return
Camera
Parameters
{
static_cast
<
float
>
(
parameters
[
0
]),
static_cast
<
float
>
(
parameters
[
1
]),
static_cast
<
float
>
(
parameters
[
2
]),
static_cast
<
float
>
(
parameters
[
3
]),
static_cast
<
float
>
(
parameters
[
4
]),
camera_frustum
};
return
Rendering
Parameters
{
static_cast
<
float
>
(
parameters
[
0
]),
static_cast
<
float
>
(
parameters
[
1
]),
static_cast
<
float
>
(
parameters
[
2
]),
static_cast
<
float
>
(
parameters
[
3
]),
static_cast
<
float
>
(
parameters
[
4
]),
camera_frustum
};
};
}
/* namespace fitting */
...
...
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