Perspective projection transformation. More...
#include <vcsl_perspective.h>
Public Member Functions | |
virtual | ~vcsl_perspective () |
virtual bool | is_invertible (double time) const |
Is `this' invertible at time `time'? Never !. | |
virtual bool | is_valid () const |
Is `this' correctly set ?. | |
void | set_static (double new_focal) |
Set the focal in meters of a static perspective projection. | |
void | set_focal (list_of_scalars const &new_focal) |
Set the focal variation along the time in meters. | |
list_of_scalars | focal () const |
Return the focal variation along the time in meters. | |
virtual vnl_vector< double > | execute (const vnl_vector< double > &v, double time) const |
Image of `v' by `this'. | |
virtual vnl_vector< double > | inverse (const vnl_vector< double > &v, double time) const |
Image of `v' by the inverse of `this'. | |
vcl_vector< double > | beat () const |
Return the list of time clocks. | |
unsigned int | duration () const |
Return the time duration. | |
vcl_vector< vcsl_interpolator > | interpolators () const |
Return the list of interpolators. | |
bool | valid_time (double time) const |
Is `time' between the two time bounds ?. | |
int | matching_interval (double time) const |
Return the index of the beat inferior or equal to `time'. | |
void | set_beat (vcl_vector< double > const &new_beat) |
Set the list of time clocks. | |
void | set_interpolators (vcl_vector< vcsl_interpolator > const &i) |
Set the list of interpolators. | |
void | set_static () |
Empty the time clock and interpolators, thereby making the transf static. | |
double | lsi (double v0, double v1, int index, double time) const |
Linear interpolation on scalar values. | |
vnl_vector< double > | lvi (const vnl_vector< double > &v0, const vnl_vector< double > &v1, int index, double time) const |
Linear interpolation on vnl_vectors. | |
vnl_matrix< double > | lmi (const vnl_matrix< double > &m0, const vnl_matrix< double > &m1, int index, double time) const |
Linear interpolation on vnl_matrices. | |
vnl_quaternion< double > | lqi (const vnl_quaternion< double > &v0, const vnl_quaternion< double > &v1, int index, double time) const |
Linear interpolation on quaternions. | |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Protected Member Functions | |
double | focal_value (double time) const |
Compute the parameter at time `time'. | |
Protected Attributes | |
list_of_scalars | focal_ |
Angle variation along the time. | |
vcl_vector< double > | beat_ |
List of time clocks. | |
vcl_vector< vcsl_interpolator > | interpolator_ |
Private Member Functions | |
vcsl_perspective () |
Perspective projection transformation.
This is a perspective projection from a 3D cartesian coordinate system to a 2D cartesian coordinate system, parametrized by the focal expressed in meters. The projection is along the z axis. The center of the projection is the origin of the 3D frame. The projection plane is in the half-space z<0.
Definition at line 26 of file vcsl_perspective.h.
vcsl_perspective::vcsl_perspective | ( | ) | [inline, private] |
Definition at line 34 of file vcsl_perspective.h.
virtual vcsl_perspective::~vcsl_perspective | ( | ) | [inline, virtual] |
Definition at line 38 of file vcsl_perspective.h.
vcl_vector<double> vcsl_spatial_transformation::beat | ( | ) | const [inline, inherited] |
Return the list of time clocks.
Definition at line 62 of file vcsl_spatial_transformation.h.
unsigned int vcsl_spatial_transformation::duration | ( | ) | const [inline, inherited] |
Return the time duration.
Definition at line 65 of file vcsl_spatial_transformation.h.
vnl_vector< double > vcsl_perspective::execute | ( | const vnl_vector< double > & | v, |
double | time | ||
) | const [virtual] |
Image of `v' by `this'.
REQUIRE: is_valid() REQUIRE: v.size()==3 Pure virtual function of vcsl_spatial_transformation
Implements vcsl_spatial_transformation.
Definition at line 30 of file vcsl_perspective.cxx.
list_of_scalars vcsl_perspective::focal | ( | ) | const [inline] |
Return the focal variation along the time in meters.
Definition at line 67 of file vcsl_perspective.h.
double vcsl_perspective::focal_value | ( | double | time | ) | const [protected] |
Compute the parameter at time `time'.
Definition at line 66 of file vcsl_perspective.cxx.
vcl_vector<vcsl_interpolator> vcsl_spatial_transformation::interpolators | ( | ) | const [inline, inherited] |
Return the list of interpolators.
Definition at line 68 of file vcsl_spatial_transformation.h.
vnl_vector< double > vcsl_perspective::inverse | ( | const vnl_vector< double > & | v, |
double | time | ||
) | const [virtual] |
Image of `v' by the inverse of `this'.
REQUIRE: is_valid() REQUIRE: is_invertible(time) and v.size()==2 The first pre-condition is never true. You can not use this method Pure virtual function of vcsl_spatial_transformation
Implements vcsl_spatial_transformation.
Definition at line 54 of file vcsl_perspective.cxx.
bool vcsl_perspective::is_invertible | ( | double | time | ) | const [virtual] |
Is `this' invertible at time `time'? Never !.
REQUIRE: valid_time(time) Pure virtual function of vcsl_spatial_transformation
Implements vcsl_spatial_transformation.
Definition at line 9 of file vcsl_perspective.cxx.
virtual bool vcsl_perspective::is_valid | ( | ) | const [inline, virtual] |
Is `this' correctly set ?.
Virtual function of vcsl_spatial_transformation
Reimplemented from vcsl_spatial_transformation.
Definition at line 51 of file vcsl_perspective.h.
vnl_matrix< double > vcsl_spatial_transformation::lmi | ( | const vnl_matrix< double > & | m0, |
const vnl_matrix< double > & | m1, | ||
int | index, | ||
double | time | ||
) | const [inherited] |
Linear interpolation on vnl_matrices.
Definition at line 91 of file vcsl_spatial_transformation.cxx.
vnl_quaternion< double > vcsl_spatial_transformation::lqi | ( | const vnl_quaternion< double > & | v0, |
const vnl_quaternion< double > & | v1, | ||
int | index, | ||
double | time | ||
) | const [inherited] |
Linear interpolation on quaternions.
Definition at line 118 of file vcsl_spatial_transformation.cxx.
double vcsl_spatial_transformation::lsi | ( | double | v0, |
double | v1, | ||
int | index, | ||
double | time | ||
) | const [inherited] |
Linear interpolation on scalar values.
Definition at line 50 of file vcsl_spatial_transformation.cxx.
vnl_vector< double > vcsl_spatial_transformation::lvi | ( | const vnl_vector< double > & | v0, |
const vnl_vector< double > & | v1, | ||
int | index, | ||
double | time | ||
) | const [inherited] |
Linear interpolation on vnl_vectors.
Definition at line 66 of file vcsl_spatial_transformation.cxx.
int vcsl_spatial_transformation::matching_interval | ( | double | time | ) | const [inherited] |
Return the index of the beat inferior or equal to `time'.
REQUIRE: valid_time(time)
Definition at line 19 of file vcsl_spatial_transformation.cxx.
void vcsl_spatial_transformation::set_beat | ( | vcl_vector< double > const & | new_beat | ) | [inline, inherited] |
Set the list of time clocks.
Definition at line 106 of file vcsl_spatial_transformation.h.
void vcsl_perspective::set_focal | ( | list_of_scalars const & | new_focal | ) | [inline] |
Set the focal variation along the time in meters.
Definition at line 64 of file vcsl_perspective.h.
void vcsl_spatial_transformation::set_interpolators | ( | vcl_vector< vcsl_interpolator > const & | i | ) | [inline, inherited] |
Set the list of interpolators.
Definition at line 109 of file vcsl_spatial_transformation.h.
void vcsl_perspective::set_static | ( | double | new_focal | ) |
Set the focal in meters of a static perspective projection.
Definition at line 19 of file vcsl_perspective.cxx.
void vcsl_spatial_transformation::set_static | ( | ) | [inherited] |
Empty the time clock and interpolators, thereby making the transf static.
Definition at line 41 of file vcsl_spatial_transformation.cxx.
bool vcsl_spatial_transformation::valid_time | ( | double | time | ) | const [inherited] |
Is `time' between the two time bounds ?.
Definition at line 9 of file vcsl_spatial_transformation.cxx.
vcl_vector<double> vcsl_spatial_transformation::beat_ [protected, inherited] |
List of time clocks.
Definition at line 144 of file vcsl_spatial_transformation.h.
list_of_scalars vcsl_perspective::focal_ [protected] |
Angle variation along the time.
Definition at line 94 of file vcsl_perspective.h.
vcl_vector<vcsl_interpolator> vcsl_spatial_transformation::interpolator_ [protected, inherited] |
Definition at line 145 of file vcsl_spatial_transformation.h.