vgl_norm_trans_3d.h
Go to the documentation of this file.
1 // This is core/vgl/algo/vgl_norm_trans_3d.h
2 #ifndef vgl_norm_trans_3d_h_
3 #define vgl_norm_trans_3d_h_
4 //:
5 // \file
6 // \brief The similarity transform that normalizes a 3-d point set
7 //
8 // Algorithms to compute projective transformations require that
9 // the data be conditioned by insuring that the center of gravity
10 // of the point set is at the origin and the standard deviation
11 // is isotropic and unity.
12 //
13 // \verbatim
14 // Modifications
15 // Created August 14, 2004 - J.L. Mundy
16 // \endverbatim
17 
18 #include <iosfwd>
19 #include <vnl/vnl_matrix_fixed.h>
20 #include <vgl/vgl_homg_point_3d.h>
21 #ifdef _MSC_VER
22 # include <vcl_msvc_warnings.h>
23 #endif
25 
26 template <class T>
27 class vgl_norm_trans_3d: public vgl_h_matrix_3d<T>
28 {
29  public:
30 
31  // Constructors/Initializers/Destructors-------------------------------------
32 
35  vgl_norm_trans_3d(vnl_matrix_fixed<T,4,4> const& M);
36  vgl_norm_trans_3d(const T* t_matrix);
37  vgl_norm_trans_3d(std::istream& s);
38  vgl_norm_trans_3d(char const* filename);
40 
41  // Operations----------------------------------------------------------------
42 
43  //: compute the normalizing transform
44  bool compute_from_points(std::vector<vgl_homg_point_3d<T> > const& points);
45 
46  protected : // --- Utility functions -----------------------------------------
47 
48  static bool scale_xyzroot2(std::vector<vgl_homg_point_3d<T> > const& in,
49  T& radius);
50 
51  static void center_of_mass(std::vector<vgl_homg_point_3d<T> > const& points,
52  T& cx, T& cy, T& cz);
53 };
54 
55 #define VGL_NORM_TRANS_3D_INSTANTIATE(T) extern "please include vgl/algo/vgl_norm_trans_3d.hxx first"
56 
57 #endif // vgl_norm_trans_3d_h_
point in projective 3D space
vgl_norm_trans_3d()
Default constructor.
Represents a homogeneous 3D point.
Definition: vgl_fwd.h:9
~vgl_norm_trans_3d()
Destructor.
bool compute_from_points(std::vector< vgl_homg_point_3d< T > > const &points)
compute the normalizing transform.
A class to hold a 3-d projective transformation matrix and to perform common operations using it e....
Definition: vgl_algo_fwd.h:12
static bool scale_xyzroot2(std::vector< vgl_homg_point_3d< T > > const &in, T &radius)
static void center_of_mass(std::vector< vgl_homg_point_3d< T > > const &points, T &cx, T &cy, T &cz)
4x4 3D-to-3D projectivity