contrib/gel/pop/pop_projective.h

Go to the documentation of this file.
00001 // This is gel/pop/pop_projective.h
00002 #ifndef pop_projective_h_
00003 #define pop_projective_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief A projection of a point in 3d to a point in 2D.
00010 //        This models the intrinsic parameters of a pinhole camera.
00011 //
00012 // \author
00013 //            Peter Tu April 2003
00014 //            General Electric
00015 //
00016 //-------------------------------------------------------------------------------
00017 
00018 #include<pop/pop_object.h>
00019 #include<vnl/vnl_matrix_fixed.h>
00020 #include<pop/pop_transform.h>
00021 #include<pop/pop_geometric_object.h>
00022 
00023 //: A parameter that can be optimized
00024 class pop_projective:public pop_transform
00025 {
00026  public:
00027   //: constructor
00028   // We have an upper triangular 3 by 3 matrix
00029   // \verbatim
00030   // |a  s  u0|
00031   // |0  b  v0|
00032   // |0  0  1 |
00033   // \endverbatim
00034   // where a and b are the scaling of the image u and v axis.
00035   // s is the shear and (u0,v0) is the piercing point
00036   //
00037   // the params are a b s u0 v0
00038 
00039   pop_projective(vcl_vector<pop_parameter*> params,
00040                  pop_vertex *cs1, pop_vertex *cs2);
00041 
00042   //: destructor
00043   ~pop_projective();
00044 
00045   //: transform a geometric object
00046   virtual pop_geometric_object* transform(pop_geometric_object *obj);
00047 
00048   //: update the transform based on the parameters
00049   virtual void update();
00050 
00051  private:
00052   // use a simple matrix rep until I find a better class
00053   vnl_matrix_fixed<double,3,3>  trans_;
00054 };
00055 
00056 #endif // pop_projective_h_

Generated on Thu Jan 8 05:14:42 2009 for contrib/gel/pop by  doxygen 1.5.1