#include <vpgl_interpolate.h>
Public Member Functions | |
| ~vpgl_interpolate () | |
Static Public Member Functions | |
| static vnl_double_3x3 | logR (vnl_double_3x3 const &R) |
| the log of a rotation matrix. | |
| static vnl_double_3x3 | expr (vnl_double_3x3 const &r) |
| the exponential form of a rotation Lie algebra element. | |
| static vnl_double_3x3 | A (vnl_double_3x3 const &r) |
| the "A" matrix in the exp operator for Special Euclidean 3-d (SE3). | |
| static vnl_double_3x3 | Ainv (vnl_double_3x3 const &r) |
| the inverse A matrix for log operator on Special Euclidean 3-d (SE3). | |
| static vcl_vector< vnl_double_3x3 > | interpolateR (vnl_double_3x3 R0, vnl_double_3x3 R1, unsigned n_between) |
| Interpolate between two rotation matrices, R0 and R1. | |
| static void | interpolateRt (vnl_double_3x3 R0, vnl_double_3 t0, vnl_double_3x3 R1, vnl_double_3 t1, unsigned n_between, vcl_vector< vnl_double_3x3 > &Rintrp, vcl_vector< vnl_double_3 > &tintrp) |
| Interpolate both R and t at the specified intervals. | |
| static bool | interpolate (vpgl_perspective_camera< double > const &cam0, vpgl_perspective_camera< double > const &cam1, unsigned n_between, vcl_vector< vpgl_perspective_camera< double > > &cams) |
| Interpolate between two perpspective cameras with the same K given that cam0 = K[R0|t0], cam1 = K[R1|t1]. | |
| static vnl_double_3x3 | interpolateR (double alpha, vnl_double_3x3 R0, vnl_double_3x3 R1) |
| Linearly interpolate (or extrapolate if abs(alpha) > 1) a rotation. | |
| static bool | interpolate_next (vpgl_perspective_camera< double > const &prev, vpgl_perspective_camera< double > const &curr, double const &rel_step_size, vpgl_perspective_camera< double > &next) |
| Interpolate the next perpspective camera with the same K given. | |
Private Member Functions | |
| vpgl_interpolate () | |
| constructor private - static methods only. | |
Definition at line 20 of file vpgl_interpolate.h.
| vpgl_interpolate::~vpgl_interpolate | ( | ) |
| vpgl_interpolate::vpgl_interpolate | ( | ) | [private] |
constructor private - static methods only.
| vnl_double_3x3 vpgl_interpolate::A | ( | vnl_double_3x3 const & | r | ) | [static] |
the "A" matrix in the exp operator for Special Euclidean 3-d (SE3).
Let r be as above. Then
1 - cos(|r|) |r| - sin(|r|)
A = I + ------------ r + -------------- r*r
|r|*|r| |r|*|r|*|r|
Definition at line 71 of file vpgl_interpolate.cxx.
| vnl_double_3x3 vpgl_interpolate::Ainv | ( | vnl_double_3x3 const & | r | ) | [static] |
the inverse A matrix for log operator on Special Euclidean 3-d (SE3).
Let r be as above. Then
1 2*sin(|r|)-|r|*(1+cos(|r|)
Ainv = I + - r + -------------------------- r*r
2 2 |r|*|r|*sin(|r|)
Definition at line 90 of file vpgl_interpolate.cxx.
| vnl_double_3x3 vpgl_interpolate::expr | ( | vnl_double_3x3 const & | r | ) | [static] |
the exponential form of a rotation Lie algebra element.
sin(|r|) 1-cos(|r|)
exp(r) = I + --------- r ----------- r*r
|r| |r|*|r|
where r is a skew-symmetric matric matrix formed from a vector, v as,
_ _
| 0 -vz vy |
r = | vz 0 -vx | ,and |r| = |v|. Note this norm is different from
| -vy vx 0 | the Frobenius norm of r as a 3x3 matrix.
- -
Definition at line 54 of file vpgl_interpolate.cxx.
| bool vpgl_interpolate::interpolate | ( | vpgl_perspective_camera< double > const & | cam0, |
| vpgl_perspective_camera< double > const & | cam1, | ||
| unsigned | n_between, | ||
| vcl_vector< vpgl_perspective_camera< double > > & | cams | ||
| ) | [static] |
Interpolate between two perpspective cameras with the same K given that cam0 = K[R0|t0], cam1 = K[R1|t1].
The interpolation produces cameras on uniform intervals in Lie distance
Definition at line 167 of file vpgl_interpolate.cxx.
| bool vpgl_interpolate::interpolate_next | ( | vpgl_perspective_camera< double > const & | prev, |
| vpgl_perspective_camera< double > const & | curr, | ||
| double const & | rel_step_size, | ||
| vpgl_perspective_camera< double > & | next | ||
| ) | [static] |
Interpolate the next perpspective camera with the same K given.
Definition at line 215 of file vpgl_interpolate.cxx.
| vcl_vector< vnl_double_3x3 > vpgl_interpolate::interpolateR | ( | vnl_double_3x3 | R0, |
| vnl_double_3x3 | R1, | ||
| unsigned | n_between | ||
| ) | [static] |
Interpolate between two rotation matrices, R0 and R1.
Lie group theory can be used to find a two-point interpolation of rotation with respect to a parameter s, where 0<= s <=1 The solution is:
R(s) = R0*exp(s r) where r = log(transpose(R0).R1)
for more details, see F. C. Park, B. Ravani,"Smooth invariant interpolation of rotations," ACM Transactions on Graphics, Vol. 16, No. 3, July 1997, pp. 277-295.
Definition at line 108 of file vpgl_interpolate.cxx.
| vnl_double_3x3 vpgl_interpolate::interpolateR | ( | double | alpha, |
| vnl_double_3x3 | R0, | ||
| vnl_double_3x3 | R1 | ||
| ) | [static] |
Linearly interpolate (or extrapolate if abs(alpha) > 1) a rotation.
Using the Lie algebra about R0, the interpolated rotation = R0 + alpha*(R1 - R0)
Definition at line 126 of file vpgl_interpolate.cxx.
| void vpgl_interpolate::interpolateRt | ( | vnl_double_3x3 | R0, |
| vnl_double_3 | t0, | ||
| vnl_double_3x3 | R1, | ||
| vnl_double_3 | t1, | ||
| unsigned | n_between, | ||
| vcl_vector< vnl_double_3x3 > & | Rintrp, | ||
| vcl_vector< vnl_double_3 > & | tintrp | ||
| ) | [static] |
Interpolate both R and t at the specified intervals.
Definition at line 137 of file vpgl_interpolate.cxx.
| vnl_double_3x3 vpgl_interpolate::logR | ( | vnl_double_3x3 const & | R | ) | [static] |
the log of a rotation matrix.
phi
log(R) = --------- (R - transpose(R))
2*sin(phi)
where 1 + 2*cos(phi) = Trace(R)
Definition at line 12 of file vpgl_interpolate.cxx.
1.7.5.1