Go to the documentation of this file.00001 #ifndef gaussian_point_2d_h_
00002 #define gaussian_point_2d_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "bugl_uncertainty_point_2d.h"
00014 #include <vnl/vnl_matrix_fixed.h>
00015 #include <vgl/vgl_point_2d.h>
00016
00017 template<class T>
00018 class bugl_gaussian_point_2d : public bugl_uncertainty_point_2d<T>
00019 {
00020 vnl_matrix_fixed<T, 2, 2> sigma_;
00021 vnl_matrix_fixed<T, 2, 2> sigma_inv_;
00022 T det_;
00023 public:
00024 bugl_gaussian_point_2d() : bugl_uncertainty_point_2d<T>() {}
00025 bugl_gaussian_point_2d(vgl_point_2d<T> const& p, vnl_matrix_fixed<T, 2, 2> const& s)
00026 : bugl_uncertainty_point_2d<T>(p) { set_covariant_matrix(s); }
00027 bugl_gaussian_point_2d(T x, T y, vnl_matrix_fixed<T, 2, 2> const& s)
00028 : bugl_uncertainty_point_2d<T>(x, y) { set_covariant_matrix(s); }
00029 ~bugl_gaussian_point_2d() {}
00030
00031 vnl_matrix_fixed<T, 2, 2> get_covariant_matrix() const { return sigma_; }
00032 void set_covariant_matrix(vnl_matrix_fixed<T, 2, 2> const& s);
00033
00034
00035 T prob_at(vgl_point_2d<T> const& p) const;
00036 };
00037
00038 #define BUGL_GAUSSIAN_POINT_2D_INSTANTIATE(T) extern "please include bugl/gaussian_point_2d.txx first"
00039
00040 #endif