Public Member Functions | Private Member Functions | Private Attributes
TriTensor Class Reference

#include <TriTensor.h>

List of all members.

Public Member Functions

 TriTensor ()
 Default constructor.
 TriTensor (const TriTensor &)
 Copy constructor.
 TriTensor (const double *tritensor_array)
 Construct a TriTensor from a linear array of doubles.
 TriTensor (const PMatrix &P1, const PMatrix &P2, const PMatrix &P3)
 Construct from 3 projection matrices.
 TriTensor (const PMatrix &P2, const PMatrix &P3)
 Construct from 2 projection matrices, as described in set.
 TriTensor (const vnl_matrix< double > &T1, const vnl_matrix< double > &P2, const vnl_matrix< double > &P3)
 Construct from 3 matrices.
 ~TriTensor ()
 Destructor.
TriTensoroperator= (const TriTensor &)
 Assignment.
bool operator== (TriTensor const &p) const
double & operator() (unsigned int i1, unsigned int i2, unsigned int i3)
double operator() (unsigned int i1, unsigned int i2, unsigned int i3) const
void set (unsigned int i1, unsigned int i2, unsigned int i3, double value)
void set (const double *vec)
void set (const vnl_matrix< double > &tvector)
 Convert from 27x1 matrix.
void convert_to_vector (vnl_matrix< double > *tvector) const
 Convert T to 27x1 matrix. Out is assumed to have been appropriately resized.
void set (const PMatrix &P1, const PMatrix &P2, const PMatrix &P3)
 Construct from 3 projection matrices.
void set (const PMatrix &P2, const PMatrix &P3)
 Construct from 2 projection matrices, P2 and P3.
void set (const vnl_matrix< double > &T1, const vnl_matrix< double > &T2, const vnl_matrix< double > &T3)
 Construct from 3 T matrices.
vgl_homg_point_2d< double > image1_transfer (vgl_homg_point_2d< double > const &point2, vgl_homg_point_2d< double > const &point3, vgl_homg_point_2d< double > corrected[]=0) const
 For the specified points in image 2/3, return the transferred point in image 1.
vgl_homg_point_2d< double > image2_transfer (vgl_homg_point_2d< double > const &point1, vgl_homg_point_2d< double > const &point3, vgl_homg_point_2d< double > corrected[]=0) const
vgl_homg_point_2d< double > image3_transfer (vgl_homg_point_2d< double > const &point1, vgl_homg_point_2d< double > const &point2, vgl_homg_point_2d< double > corrected[]=0) const
HomgPoint2D image1_transfer (HomgPoint2D const &point2, HomgPoint2D const &point3, HomgPoint2D corrected[]=0) const
HomgPoint2D image2_transfer (HomgPoint2D const &point1, HomgPoint2D const &point3, HomgPoint2D corrected[]=0) const
 For the specified points in image 1/3, return the transferred point in image 2.
HomgPoint2D image3_transfer (HomgPoint2D const &point1, HomgPoint2D const &point2, HomgPoint2D corrected[]=0) const
 For the specified points in image 1/2, return the transferred point in image 3.
vgl_homg_point_2d< double > image1_transfer_qd (vgl_homg_point_2d< double > const &point2, vgl_homg_point_2d< double > const &point3) const
 For the specified points in image 2/3, return the transferred point in image 1.
vgl_homg_point_2d< double > image2_transfer_qd (vgl_homg_point_2d< double > const &point1, vgl_homg_point_2d< double > const &point3) const
 For the specified points in image 1/3, return the transferred point in image 2.
vgl_homg_point_2d< double > image3_transfer_qd (vgl_homg_point_2d< double > const &point1, vgl_homg_point_2d< double > const &point2) const
 For the specified points in image 1/2, return the transferred point in image 3.
HomgPoint2D image1_transfer_qd (const HomgPoint2D &point2, const HomgPoint2D &point3) const
HomgPoint2D image2_transfer_qd (const HomgPoint2D &point1, const HomgPoint2D &point3) const
HomgPoint2D image3_transfer_qd (const HomgPoint2D &point1, const HomgPoint2D &point2) const
vgl_homg_point_2d< double > image1_transfer (vgl_homg_point_2d< double > const &point1, vgl_homg_line_2d< double > const &line2) const
vgl_homg_point_2d< double > image2_transfer (vgl_homg_point_2d< double > const &point1, vgl_homg_line_2d< double > const &line3) const
vgl_homg_point_2d< double > image3_transfer (vgl_homg_point_2d< double > const &point2, vgl_homg_line_2d< double > const &line3) const
HomgPoint2D image1_transfer (HomgPoint2D const &point1, HomgLine2D const &line2) const
HomgPoint2D image2_transfer (HomgPoint2D const &point1, HomgLine2D const &line3) const
HomgPoint2D image3_transfer (HomgPoint2D const &point2, HomgLine2D const &line3) const
vgl_homg_line_2d< double > image1_transfer (vgl_homg_line_2d< double > const &line2, vgl_homg_line_2d< double > const &line3) const
 For the specified lines in image 2/3, return the transferred line in image 1.
vgl_homg_line_2d< double > image2_transfer (vgl_homg_line_2d< double > const &line2, vgl_homg_line_2d< double > const &line3) const
 For the specified lines in image 2/3, return the transferred line in image 1.
vgl_homg_line_2d< double > image3_transfer (vgl_homg_line_2d< double > const &line2, vgl_homg_line_2d< double > const &line3) const
 For the specified lines in image 1/2, return the transferred line in image 3.
HomgLine2D image1_transfer (const HomgLine2D &line2, const HomgLine2D &line3) const
HomgLine2D image2_transfer (const HomgLine2D &line2, const HomgLine2D &line3) const
HomgLine2D image3_transfer (const HomgLine2D &line2, const HomgLine2D &line3) const
vgl_h_matrix_2d< double > get_hmatrix_31 (vgl_homg_line_2d< double > const &line2) const
 Return the planar homography between views 3 and 1 induced by line 2.
vgl_h_matrix_2d< double > get_hmatrix_21 (vgl_homg_line_2d< double > const &line3) const
 Return the planar homography between views 2 and 1 induced by line 3.
HMatrix2D get_hmatrix_31 (const HomgLine2D &line2) const
HMatrix2D get_hmatrix_21 (const HomgLine2D &line3) const
bool get_epipoles (vgl_homg_point_2d< double > &e2, vgl_homg_point_2d< double > &e3) const
 Return epipoles e2 and e3, from image 1 into images 2 and 3 respectively.
bool get_epipoles (HomgPoint2D *e2, HomgPoint2D *e3) const
bool compute_epipoles () const
 Compute and cache the two epipoles from image 1.
HomgPoint2D get_epipole_12 () const
 Return epipole12.
HomgPoint2D get_epipole_13 () const
 Return epipole13.
FMatrix get_fmatrix_13 () const
 Return F13, the fundamental matrix between images 1 and 3.
FMatrix get_fmatrix_12 () const
 Return F12, the fundamental matrix between images 1 and 2.
FMatrix compute_fmatrix_23 () const
const FManifoldProjectget_fmp12 () const
 Return a manifold-projector for the Fundamental matrix between 1 and 2.
const FManifoldProjectget_fmp23 () const
 Return a manifold-projector as above, between 2 and 3.
const FManifoldProjectget_fmp13 () const
 Return a manifold-projector as above, between 1 and 3.
void compute_P_matrices (const vnl_double_3 &x, double alpha, double beta, PMatrix *P2, PMatrix *P3) const
 Compute one of the family of P matrix triplets consistent with this T.
void compute_P_matrices (const vnl_double_3 &x, double alpha, PMatrix *P2, PMatrix *P3) const
void compute_P_matrices (const vnl_double_3 &x, PMatrix *P2, PMatrix *P3) const
void compute_P_matrices (PMatrix *P2, PMatrix *P3) const
void compute_P_matrices (vgl_p_matrix< double > &P2, vgl_p_matrix< double > &P3) const
void compute_caches ()
void clear_caches ()
void get_constraint_lines_image3 (vgl_homg_point_2d< double > const &p1, vgl_homg_point_2d< double > const &p2, vcl_vector< vgl_homg_line_2d< double > > &lines) const
void get_constraint_lines_image2 (vgl_homg_point_2d< double > const &p1, vgl_homg_point_2d< double > const &p3, vcl_vector< vgl_homg_line_2d< double > > &lines) const
void get_constraint_lines_image1 (vgl_homg_point_2d< double > const &p2, vgl_homg_point_2d< double > const &p3, vcl_vector< vgl_homg_line_2d< double > > &lines) const
void get_constraint_lines_image3 (HomgPoint2D const &p1, HomgPoint2D const &p2, vcl_vector< HomgLine2D > *lines) const
void get_constraint_lines_image2 (HomgPoint2D const &p1, HomgPoint2D const &p3, vcl_vector< HomgLine2D > *lines) const
void get_constraint_lines_image1 (HomgPoint2D const &p2, HomgPoint2D const &p3, vcl_vector< HomgLine2D > *lines) const
TriTensor postmultiply (unsigned tensor_axis, const vnl_matrix< double > &M) const
 Contract Tensor axis tensor_axis with first component of Matrix M.
TriTensor premultiply (unsigned tensor_axis, const vnl_matrix< double > &M) const
 Contract Tensor axis tensor_axis with second component of Matrix M.
TriTensor postmultiply1 (const vnl_matrix< double > &M) const
 Compute $ S_{ijk} = T_{pjk} M_{pi} $.
TriTensor postmultiply2 (const vnl_matrix< double > &M) const
 Compute $ S_{ijk} = T_{ipk} M_{pj} $.
TriTensor postmultiply3 (const vnl_matrix< double > &M) const
 Compute $ S_{ijk} = T_{ijp} M_{pk} $.
TriTensor premultiply1 (const vnl_matrix< double > &M) const
 Compute $ S_{ijk} = M_{ip} T_{pjk} $.
TriTensor premultiply2 (const vnl_matrix< double > &M) const
 Compute $ S_{ijk} = M_{jp} T_{ipk} $.
TriTensor premultiply3 (const vnl_matrix< double > &M) const
 Compute $ S_{ijk} = M_{kp} T_{ijp} $.
vnl_double_3x3 dot1 (const vnl_double_3 &v) const
 Compute ${ M}_{jk} = T_{ijk} v_i$.
vnl_double_3x3 dot2 (const vnl_double_3 &v) const
 Compute ${ M}_{ik} = T_{ijk} v_j$.
vnl_double_3x3 dot3 (const vnl_double_3 &v) const
 Compute ${ M}_{ij} = T_{ijk} v_k$.
vnl_double_3x3 dot1t (const vnl_double_3 &v) const
 Compute ${ M}_{kj} = T_{ijk} v_i$. (The transpose of dot1).
vnl_double_3x3 dot2t (const vnl_double_3 &v) const
 Compute ${ M}_{ki} = T_{ijk} v_j$.
vnl_double_3x3 dot3t (const vnl_double_3 &v) const
 Compute ${ M}_{ji} = T_{ijk} v_k$.
bool check_equal_up_to_scale (const TriTensor &that) const
 Check that another trifocal tensor is equal to this one up to scale.
TriTensor condition (const vnl_matrix< double > &line_1_denorm, const vnl_matrix< double > &line_2_norm, const vnl_matrix< double > &line_3_norm) const
 C123 are line conditioning matrices.
TriTensor decondition (const vnl_matrix< double > &line_1_norm, const vnl_matrix< double > &line_2_denorm, const vnl_matrix< double > &line_3_denorm) const

Private Member Functions

void delete_caches () const

Private Attributes

vbl_array_3d< double > T
const HomgPoint2De12_
const HomgPoint2De13_
const FManifoldProjectfmp12_
const FManifoldProjectfmp13_
const FManifoldProjectfmp23_

Detailed Description

Definition at line 49 of file TriTensor.h.


Constructor & Destructor Documentation

TriTensor::TriTensor ( )

Default constructor.

Definition at line 59 of file TriTensor.cxx.

TriTensor::TriTensor ( const TriTensor that)

Copy constructor.

Definition at line 74 of file TriTensor.cxx.

TriTensor::TriTensor ( const double *  tritensor_array)

Construct a TriTensor from a linear array of doubles.

The doubles are stored in ``matrix'' order, with the last index increasing fastest.

Definition at line 68 of file TriTensor.cxx.

TriTensor::TriTensor ( const PMatrix P1,
const PMatrix P2,
const PMatrix P3 
)

Construct from 3 projection matrices.

Definition at line 80 of file TriTensor.cxx.

TriTensor::TriTensor ( const PMatrix P2,
const PMatrix P3 
)

Construct from 2 projection matrices, as described in set.

Definition at line 89 of file TriTensor.cxx.

TriTensor::TriTensor ( const vnl_matrix< double > &  T1,
const vnl_matrix< double > &  P2,
const vnl_matrix< double > &  P3 
)

Construct from 3 matrices.

Definition at line 97 of file TriTensor.cxx.

TriTensor::~TriTensor ( )

Destructor.

Definition at line 115 of file TriTensor.cxx.


Member Function Documentation

bool TriTensor::check_equal_up_to_scale ( const TriTensor that) const

Check that another trifocal tensor is equal to this one up to scale.

Finds largest component of this, scales both tritensors so that this component is one, and checks that fronorm of difference is small. Prints a message if not.

Definition at line 2116 of file TriTensor.cxx.

void TriTensor::clear_caches ( )
void TriTensor::compute_caches ( )
bool TriTensor::compute_epipoles ( ) const

Compute and cache the two epipoles from image 1.

Definition at line 1892 of file TriTensor.cxx.

FMatrix TriTensor::compute_fmatrix_23 ( ) const

Definition at line 1986 of file TriTensor.cxx.

void TriTensor::compute_P_matrices ( const vnl_double_3 &  x,
double  alpha,
double  beta,
PMatrix P2,
PMatrix P3 
) const

Compute one of the family of P matrix triplets consistent with this T.

Definition at line 2027 of file TriTensor.cxx.

void TriTensor::compute_P_matrices ( const vnl_double_3 &  x,
double  alpha,
PMatrix P2,
PMatrix P3 
) const [inline]

Definition at line 176 of file TriTensor.h.

void TriTensor::compute_P_matrices ( const vnl_double_3 &  x,
PMatrix P2,
PMatrix P3 
) const [inline]

Definition at line 179 of file TriTensor.h.

void TriTensor::compute_P_matrices ( PMatrix P2,
PMatrix P3 
) const [inline]

Definition at line 182 of file TriTensor.h.

void TriTensor::compute_P_matrices ( vgl_p_matrix< double > &  P2,
vgl_p_matrix< double > &  P3 
) const [inline]

Definition at line 185 of file TriTensor.h.

TriTensor TriTensor::condition ( const vnl_matrix< double > &  line_1_denorm,
const vnl_matrix< double > &  line_2_norm,
const vnl_matrix< double > &  line_3_norm 
) const

C123 are line conditioning matrices.

The ${\tt C}_{123}$ are line transformation matrices.

If C * l = lhat, and l1 = T l2 l3, then lhat1 = That lhat2 lhat3

If ${\tt C}_{v} l_v = \hat l_v$ describes the transformation of each image plane under a planar homography, and $l_1 = T l_2 l_3$ describes the action of this TriTensor, then this routine computes $\hat T$ such that $\hat l_1 = \hat T \hat l_2 \hat l_3$.

Specifically $\hat T = T.\mbox{decondition}(C_1^{-1}, C_2, C_3)$ is the transformed tensor. Note that unless transfer is via Hartley-Sturm, the deconditioned tensor will not be covariant with the conditioned one.

Definition at line 676 of file TriTensor.cxx.

void TriTensor::convert_to_vector ( vnl_matrix< double > *  tvector) const

Convert T to 27x1 matrix. Out is assumed to have been appropriately resized.

Definition at line 131 of file TriTensor.cxx.

TriTensor TriTensor::decondition ( const vnl_matrix< double > &  line_1_norm,
const vnl_matrix< double > &  line_2_denorm,
const vnl_matrix< double > &  line_3_denorm 
) const

Definition at line 683 of file TriTensor.cxx.

void TriTensor::delete_caches ( ) const [private]

Definition at line 121 of file TriTensor.cxx.

vnl_double_3x3 TriTensor::dot1 ( const vnl_double_3 &  v) const

Compute ${ M}_{jk} = T_{ijk} v_i$.

Definition at line 470 of file TriTensor.cxx.

vnl_double_3x3 TriTensor::dot1t ( const vnl_double_3 &  v) const

Compute ${ M}_{kj} = T_{ijk} v_i$. (The transpose of dot1).

Definition at line 503 of file TriTensor.cxx.

vnl_double_3x3 TriTensor::dot2 ( const vnl_double_3 &  v) const

Compute ${ M}_{ik} = T_{ijk} v_j$.

Definition at line 481 of file TriTensor.cxx.

vnl_double_3x3 TriTensor::dot2t ( const vnl_double_3 &  v) const

Compute ${ M}_{ki} = T_{ijk} v_j$.

Definition at line 514 of file TriTensor.cxx.

vnl_double_3x3 TriTensor::dot3 ( const vnl_double_3 &  v) const

Compute ${ M}_{ij} = T_{ijk} v_k$.

Definition at line 492 of file TriTensor.cxx.

vnl_double_3x3 TriTensor::dot3t ( const vnl_double_3 &  v) const

Compute ${ M}_{ji} = T_{ijk} v_k$.

Definition at line 525 of file TriTensor.cxx.

void TriTensor::get_constraint_lines_image1 ( vgl_homg_point_2d< double > const &  p2,
vgl_homg_point_2d< double > const &  p3,
vcl_vector< vgl_homg_line_2d< double > > &  lines 
) const

Definition at line 1398 of file TriTensor.cxx.

void TriTensor::get_constraint_lines_image1 ( HomgPoint2D const &  p2,
HomgPoint2D const &  p3,
vcl_vector< HomgLine2D > *  lines 
) const

Definition at line 1623 of file TriTensor.cxx.

void TriTensor::get_constraint_lines_image2 ( vgl_homg_point_2d< double > const &  p1,
vgl_homg_point_2d< double > const &  p3,
vcl_vector< vgl_homg_line_2d< double > > &  lines 
) const

Definition at line 1060 of file TriTensor.cxx.

void TriTensor::get_constraint_lines_image2 ( HomgPoint2D const &  p1,
HomgPoint2D const &  p3,
vcl_vector< HomgLine2D > *  lines 
) const

Definition at line 1228 of file TriTensor.cxx.

void TriTensor::get_constraint_lines_image3 ( vgl_homg_point_2d< double > const &  p1,
vgl_homg_point_2d< double > const &  p2,
vcl_vector< vgl_homg_line_2d< double > > &  lines 
) const

Definition at line 692 of file TriTensor.cxx.

void TriTensor::get_constraint_lines_image3 ( HomgPoint2D const &  p1,
HomgPoint2D const &  p2,
vcl_vector< HomgLine2D > *  lines 
) const

Definition at line 864 of file TriTensor.cxx.

HomgPoint2D TriTensor::get_epipole_12 ( ) const

Return epipole12.

Definition at line 1959 of file TriTensor.cxx.

HomgPoint2D TriTensor::get_epipole_13 ( ) const

Return epipole13.

Definition at line 1966 of file TriTensor.cxx.

bool TriTensor::get_epipoles ( vgl_homg_point_2d< double > &  e2,
vgl_homg_point_2d< double > &  e3 
) const

Return epipoles e2 and e3, from image 1 into images 2 and 3 respectively.

Definition at line 1934 of file TriTensor.cxx.

bool TriTensor::get_epipoles ( HomgPoint2D e2,
HomgPoint2D e3 
) const

Definition at line 1946 of file TriTensor.cxx.

FMatrix TriTensor::get_fmatrix_12 ( ) const

Return F12, the fundamental matrix between images 1 and 2.

Definition at line 1973 of file TriTensor.cxx.

FMatrix TriTensor::get_fmatrix_13 ( ) const

Return F13, the fundamental matrix between images 1 and 3.

Definition at line 1980 of file TriTensor.cxx.

const FManifoldProject * TriTensor::get_fmp12 ( ) const

Return a manifold-projector for the Fundamental matrix between 1 and 2.

The projector is cached until the next time T is changed.

Definition at line 1995 of file TriTensor.cxx.

const FManifoldProject * TriTensor::get_fmp13 ( ) const

Return a manifold-projector as above, between 1 and 3.

Definition at line 2003 of file TriTensor.cxx.

const FManifoldProject * TriTensor::get_fmp23 ( ) const

Return a manifold-projector as above, between 2 and 3.

Definition at line 2011 of file TriTensor.cxx.

vgl_h_matrix_2d< double > TriTensor::get_hmatrix_21 ( vgl_homg_line_2d< double > const &  line3) const

Return the planar homography between views 2 and 1 induced by line 3.

Definition at line 456 of file TriTensor.cxx.

HMatrix2D TriTensor::get_hmatrix_21 ( const HomgLine2D line3) const

Definition at line 462 of file TriTensor.cxx.

vgl_h_matrix_2d< double > TriTensor::get_hmatrix_31 ( vgl_homg_line_2d< double > const &  line2) const

Return the planar homography between views 3 and 1 induced by line 2.

Definition at line 444 of file TriTensor.cxx.

HMatrix2D TriTensor::get_hmatrix_31 ( const HomgLine2D line2) const

Definition at line 450 of file TriTensor.cxx.

vgl_homg_point_2d< double > TriTensor::image1_transfer ( vgl_homg_point_2d< double > const &  point2,
vgl_homg_point_2d< double > const &  point3,
vgl_homg_point_2d< double >  corrected[] = 0 
) const

For the specified points in image 2/3, return the transferred point in image 1.

Definition at line 260 of file TriTensor.cxx.

HomgPoint2D TriTensor::image1_transfer ( HomgPoint2D const &  point2,
HomgPoint2D const &  point3,
HomgPoint2D  corrected[] = 0 
) const

Definition at line 274 of file TriTensor.cxx.

vgl_homg_point_2d<double> TriTensor::image1_transfer ( vgl_homg_point_2d< double > const &  point1,
vgl_homg_line_2d< double > const &  line2 
) const
HomgPoint2D TriTensor::image1_transfer ( HomgPoint2D const &  point1,
HomgLine2D const &  line2 
) const
vgl_homg_line_2d< double > TriTensor::image1_transfer ( vgl_homg_line_2d< double > const &  line2,
vgl_homg_line_2d< double > const &  line3 
) const

For the specified lines in image 2/3, return the transferred line in image 1.

Definition at line 366 of file TriTensor.cxx.

HomgLine2D TriTensor::image1_transfer ( const HomgLine2D line2,
const HomgLine2D line3 
) const

Definition at line 382 of file TriTensor.cxx.

vgl_homg_point_2d< double > TriTensor::image1_transfer_qd ( vgl_homg_point_2d< double > const &  point2,
vgl_homg_point_2d< double > const &  point3 
) const

For the specified points in image 2/3, return the transferred point in image 1.

Definition at line 343 of file TriTensor.cxx.

HomgPoint2D TriTensor::image1_transfer_qd ( const HomgPoint2D point2,
const HomgPoint2D point3 
) const

Definition at line 352 of file TriTensor.cxx.

vgl_homg_point_2d<double> TriTensor::image2_transfer ( vgl_homg_point_2d< double > const &  point1,
vgl_homg_point_2d< double > const &  point3,
vgl_homg_point_2d< double >  corrected[] = 0 
) const
HomgPoint2D TriTensor::image2_transfer ( HomgPoint2D const &  point1,
HomgPoint2D const &  point3,
HomgPoint2D  corrected[] = 0 
) const

For the specified points in image 1/3, return the transferred point in image 2.

Definition at line 241 of file TriTensor.cxx.

vgl_homg_point_2d<double> TriTensor::image2_transfer ( vgl_homg_point_2d< double > const &  point1,
vgl_homg_line_2d< double > const &  line3 
) const
HomgPoint2D TriTensor::image2_transfer ( HomgPoint2D const &  point1,
HomgLine2D const &  line3 
) const
vgl_homg_line_2d< double > TriTensor::image2_transfer ( vgl_homg_line_2d< double > const &  line2,
vgl_homg_line_2d< double > const &  line3 
) const

For the specified lines in image 2/3, return the transferred line in image 1.

Definition at line 403 of file TriTensor.cxx.

HomgLine2D TriTensor::image2_transfer ( const HomgLine2D line2,
const HomgLine2D line3 
) const

Definition at line 413 of file TriTensor.cxx.

vgl_homg_point_2d< double > TriTensor::image2_transfer_qd ( vgl_homg_point_2d< double > const &  point1,
vgl_homg_point_2d< double > const &  point3 
) const

For the specified points in image 1/3, return the transferred point in image 2.

Definition at line 320 of file TriTensor.cxx.

HomgPoint2D TriTensor::image2_transfer_qd ( const HomgPoint2D point1,
const HomgPoint2D point3 
) const

Definition at line 329 of file TriTensor.cxx.

vgl_homg_point_2d<double> TriTensor::image3_transfer ( vgl_homg_point_2d< double > const &  point1,
vgl_homg_point_2d< double > const &  point2,
vgl_homg_point_2d< double >  corrected[] = 0 
) const
HomgPoint2D TriTensor::image3_transfer ( HomgPoint2D const &  point1,
HomgPoint2D const &  point2,
HomgPoint2D  corrected[] = 0 
) const

For the specified points in image 1/2, return the transferred point in image 3.

Transfer is via optimal backprojection.

Definition at line 222 of file TriTensor.cxx.

vgl_homg_point_2d<double> TriTensor::image3_transfer ( vgl_homg_point_2d< double > const &  point2,
vgl_homg_line_2d< double > const &  line3 
) const
HomgPoint2D TriTensor::image3_transfer ( HomgPoint2D const &  point2,
HomgLine2D const &  line3 
) const
vgl_homg_line_2d< double > TriTensor::image3_transfer ( vgl_homg_line_2d< double > const &  line2,
vgl_homg_line_2d< double > const &  line3 
) const

For the specified lines in image 1/2, return the transferred line in image 3.

Definition at line 425 of file TriTensor.cxx.

HomgLine2D TriTensor::image3_transfer ( const HomgLine2D line2,
const HomgLine2D line3 
) const

Definition at line 435 of file TriTensor.cxx.

vgl_homg_point_2d< double > TriTensor::image3_transfer_qd ( vgl_homg_point_2d< double > const &  point1,
vgl_homg_point_2d< double > const &  point2 
) const

For the specified points in image 1/2, return the transferred point in image 3.

Definition at line 295 of file TriTensor.cxx.

HomgPoint2D TriTensor::image3_transfer_qd ( const HomgPoint2D point1,
const HomgPoint2D point2 
) const

Definition at line 305 of file TriTensor.cxx.

double& TriTensor::operator() ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3 
) [inline]

Definition at line 82 of file TriTensor.h.

double TriTensor::operator() ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3 
) const [inline]

Definition at line 83 of file TriTensor.h.

TriTensor & TriTensor::operator= ( const TriTensor that)

Assignment.

Definition at line 106 of file TriTensor.cxx.

bool TriTensor::operator== ( TriTensor const &  p) const [inline]

Definition at line 79 of file TriTensor.h.

TriTensor TriTensor::postmultiply ( unsigned  tensor_axis,
const vnl_matrix< double > &  M 
) const

Contract Tensor axis tensor_axis with first component of Matrix M.

Contract tensor axis tensor_axis with first component of matrix $M$.

That is: For tensor_axis = 1, Compute T_ijk = T_pjk M_pi For tensor_axis = 2, Compute T_ijk = T_ipk M_pj For tensor_axis = 3, Compute T_ijk = T_ijp M_pk

That is, where $S$ is the result of the operation:

  • For tensor_axis = 1, compute $S_{ijk} = T_{pjk} M_{pi}$
  • For tensor_axis = 2, compute $S_{ijk} = T_{ipk} M_{pj}$
  • For tensor_axis = 3, compute $S_{ijk} = T_{ijp} M_{pk}$

Definition at line 543 of file TriTensor.cxx.

TriTensor TriTensor::postmultiply1 ( const vnl_matrix< double > &  M) const

Compute $ S_{ijk} = T_{pjk} M_{pi} $.

Definition at line 574 of file TriTensor.cxx.

TriTensor TriTensor::postmultiply2 ( const vnl_matrix< double > &  M) const

Compute $ S_{ijk} = T_{ipk} M_{pj} $.

Definition at line 589 of file TriTensor.cxx.

TriTensor TriTensor::postmultiply3 ( const vnl_matrix< double > &  M) const

Compute $ S_{ijk} = T_{ijp} M_{pk} $.

Definition at line 604 of file TriTensor.cxx.

TriTensor TriTensor::premultiply ( unsigned  tensor_axis,
const vnl_matrix< double > &  M 
) const

Contract Tensor axis tensor_axis with second component of Matrix M.

Contract tensor axis tensor_axis with second component of matrix $M$.

That is: For tensor_axis = 1, Compute T_ijk = M_ip T_pjk For tensor_axis = 2, Compute T_ijk = M_jp T_ipk For tensor_axis = 3, Compute T_ijk = M_kp T_ijp

That is, where $S$ is the result of the operation:

  • For tensor_axis = 1, compute $S_{ijk} = M_{ip} T_{pjk}$
  • For tensor_axis = 2, compute $S_{ijk} = M_{jp} T_{ipk}$
  • For tensor_axis = 3, compute $S_{ijk} = M_{kp} T_{ijp}$

Definition at line 561 of file TriTensor.cxx.

TriTensor TriTensor::premultiply1 ( const vnl_matrix< double > &  M) const

Compute $ S_{ijk} = M_{ip} T_{pjk} $.

Definition at line 619 of file TriTensor.cxx.

TriTensor TriTensor::premultiply2 ( const vnl_matrix< double > &  M) const

Compute $ S_{ijk} = M_{jp} T_{ipk} $.

Definition at line 634 of file TriTensor.cxx.

TriTensor TriTensor::premultiply3 ( const vnl_matrix< double > &  M) const

Compute $ S_{ijk} = M_{kp} T_{ijp} $.

Definition at line 649 of file TriTensor.cxx.

void TriTensor::set ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3,
double  value 
)
void TriTensor::set ( const double *  vec)
void TriTensor::set ( const vnl_matrix< double > &  tvector)

Convert from 27x1 matrix.

Definition at line 139 of file TriTensor.cxx.

void TriTensor::set ( const PMatrix P1,
const PMatrix P2,
const PMatrix P3 
)

Construct from 3 projection matrices.

Definition at line 150 of file TriTensor.cxx.

void TriTensor::set ( const PMatrix P2,
const PMatrix P3 
)

Construct from 2 projection matrices, P2 and P3.

The first is assumed to be the canonical [I | 0].

Definition at line 176 of file TriTensor.cxx.

void TriTensor::set ( const vnl_matrix< double > &  T1,
const vnl_matrix< double > &  T2,
const vnl_matrix< double > &  T3 
)

Construct from 3 T matrices.

Definition at line 194 of file TriTensor.cxx.


Member Data Documentation

const HomgPoint2D* TriTensor::e12_ [mutable, private]

Definition at line 56 of file TriTensor.h.

const HomgPoint2D* TriTensor::e13_ [mutable, private]

Definition at line 57 of file TriTensor.h.

const FManifoldProject* TriTensor::fmp12_ [mutable, private]

Definition at line 59 of file TriTensor.h.

const FManifoldProject* TriTensor::fmp13_ [mutable, private]

Definition at line 60 of file TriTensor.h.

const FManifoldProject* TriTensor::fmp23_ [mutable, private]

Definition at line 61 of file TriTensor.h.

vbl_array_3d<double> TriTensor::T [private]

Definition at line 53 of file TriTensor.h.


The documentation for this class was generated from the following files: