![]() |
Templates -- Meow
1.2.9
A C++ template contains kinds of interesting classes and functions
|
A photo projection is a kind of transformation that project point/vector to a flat photo. More...
#include "Transformations.h"
Public Member Functions | |
PhotoProjection (size_t dimension) | |
PhotoProjection (size_t dimension, Scalar const &f) | |
PhotoProjection (PhotoProjection const &p) | |
PhotoProjection & | copyFrom (PhotoProjection const &b) |
PhotoProjection & | referenceFrom (PhotoProjection const &b) |
Scalar | parameter (size_t i) const |
Same as focal() More... | |
Scalar | parameter (size_t i, Scalar const &s) |
Same as focal(s) More... | |
Scalar | focal () const |
Get the focal length. More... | |
Scalar | focal (Scalar const &f) |
Set the focal length. More... | |
size_t | dimension () const |
Get the dimension of this projection. More... | |
Matrix< Scalar > | transformate (Matrix< Scalar > const &x) const |
Project the input vector(s) onto the plane. More... | |
Matrix< Scalar > | jacobian (Matrix< Scalar > const &x) const |
Return the jacobian matrix (derivate by the input vector) of this projection. More... | |
Matrix< Scalar > | jacobian (Matrix< Scalar > const &x, size_t i) const |
Return the jacobian matrix (derivate by the focus length) of this projection. More... | |
PhotoProjection & | operator= (PhotoProjection const &b) |
Same as copyFrom(b) More... | |
Matrix< Scalar > | operator() (Matrix< Scalar > const &v) const |
Same as transformate(v) More... | |
![]() | |
virtual | ~Transformation () |
size_t | inputRows () const |
Return the number of rows of the input matrix. More... | |
size_t | inputCols () const |
Return the number of columns of the input matrix. More... | |
size_t | outputRows () const |
Return the number of rows of the output matrix. More... | |
size_t | outputCols () const |
Return the number of columns of the output matrix. More... | |
size_t | parameterSize () const |
Return the number of parameters. More... | |
virtual bool | inversable () const |
Return whether this transformation is inversable or not. More... | |
virtual Matrix< Scalar > | transformateInv (Matrix< Scalar > const &x) const |
Do the inverse transformation. More... | |
virtual Matrix< Scalar > | jacobianInv (Matrix< Scalar > const &x) const |
Return the jacobian matrix of the inverse transformation. More... | |
virtual Matrix< Scalar > | jacobianInv (Matrix< Scalar > const &x, size_t i) const |
Return the jacobian matrix of the inverse transformation. More... | |
Additional Inherited Members | |
![]() | |
Transformation (size_t inputRows, size_t inputCols, size_t outputRows, size_t outputCols, size_t psize) | |
Transformation (Transformation const &b) | |
Transformation & | copyFrom (Transformation const &b) |
Copy from the specified one. More... | |
Transformation & | referenceFrom (Transformation const &b) |
reference from the specified one More... | |
A photo projection is a kind of transformation that project point/vector to a flat photo.
Assume:
Then transformation is like below:
i.e. projecte the vector onto the plane .
Definition at line 325 of file Transformations.h.
|
inline |
Constructor, focal = 1
Definition at line 349 of file Transformations.h.
|
inline |
Constructor
Definition at line 357 of file Transformations.h.
|
inline |
Constructor, copy settings from another PhotoProjection.
Definition at line 365 of file Transformations.h.
|
inline |
Copy settings from another one
[in] | b | another one |
*this
Definition at line 374 of file Transformations.h.
|
inline |
Get the dimension of this projection.
Definition at line 427 of file Transformations.h.
|
inline |
|
inline |
Set the focal length.
[in] | f | New focal length |
Definition at line 419 of file Transformations.h.
|
inlinevirtual |
Return the jacobian matrix (derivate by the input vector) of this projection.
This method only allow a vector-like matrix be input. Assume:
Then the jacobian matrix is like below:
[in] | x | The input matrix. |
Reimplemented from meow::Transformation< Scalar >.
Definition at line 487 of file Transformations.h.
|
inlinevirtual |
Return the jacobian matrix (derivate by the focus length) of this projection.
This method only allow a vector-like matrix be input. Assume:
Then the jacobian matrix is like below:
[in] | x | The input matrix. |
[in] | i | Useless parameter |
Reimplemented from meow::Transformation< Scalar >.
Definition at line 525 of file Transformations.h.
|
inline |
Same as transformate(v)
Definition at line 543 of file Transformations.h.
|
inline |
Same as copyFrom(b)
Definition at line 536 of file Transformations.h.
|
inlinevirtual |
Same as focal()
Implements meow::Transformation< Scalar >.
Definition at line 394 of file Transformations.h.
|
inlinevirtual |
Same as focal(s)
Implements meow::Transformation< Scalar >.
Definition at line 401 of file Transformations.h.
|
inline |
Reference settings from another one
[in] | b | another one |
*this
Definition at line 385 of file Transformations.h.
|
inlinevirtual |
Project the input vector(s) onto the plane.
The equation of the plane is , where the
is the dimension of this projection and f is the focal length.
If the number of columns of the input matrix is larger than 1, this method will think that you want to transform multiple vector once and the number of columns of the output matrix will be the same of the number of columns of the input one.
[in] | x | The input matrix. |
Implements meow::Transformation< Scalar >.
Definition at line 448 of file Transformations.h.