contrib/mul/m23d/m23d_make_ortho_projection.h
Go to the documentation of this file.
00001 //:
00002 // \file
00003 // \author Tim Cootes
00004 // \brief Return 2 x 3 projection matrix based on viewing from angle (a,b)
00005 
00006 #ifndef m23d_make_ortho_projection_h_
00007 #define m23d_make_ortho_projection_h_
00008 
00009 #include <vnl/vnl_random.h>
00010 #include <vnl/vnl_matrix.h>
00011 
00012 //: Return 2 x 3 projection matrix based on viewing from angle (Ax,Ay,Az)
00013 //  If Ax=Ay=Az, then returns matrix (I|0)
00014 vnl_matrix<double> m23d_make_ortho_projection(double Ax, double Ay, double Az);
00015 
00016 //: Return projection matrix combination for ns shapes, nm modes
00017 //  Matrix is 2*ns x 3*(1+nm) in size
00018 //  The i,j-th sub matrix of size 2x3 corresponds to w_ij * P_i,
00019 //  where P_i is a projection matrix for shape i, and w_ij is the
00020 //  weight for the j-th shape basis.
00021 //
00022 // \param first_is_identity  When true, projection for first shape is scaled identity
00023 // \param basis_true         When true, w_ij=(i==j) if i<=nm (ie first shapes define a basis)
00024 vnl_matrix<double> m23d_make_ortho_projection(vnl_random& r,
00025                                               unsigned ns, unsigned nm=0,
00026                                               bool first_is_identity=false,
00027                                               bool basis_true=false);
00028 
00029 #endif // m23d_make_ortho_projection_h_
00030