pgh.h

Go to the documentation of this file.
00001 //
00002 // pairwise histograms
00003 // stuart meikle
00004 // Tue Feb 22 11:57:51 2000
00005 //
00006 
00007 
00008 // lets define some structure here:
00009 // a hough transform is a form of image
00010 // a pairwise_gh is a form of hough transform
00011 
00012 #ifndef PGH_H
00013 #define PGH_H
00014 
00015 #include <boost/numeric/ublas/vector.hpp>
00016 #include <boost/smart_ptr.hpp>
00017 #include "erf.h"
00018 #include "hough_transform.h"
00019 #include "line.h"
00020 #include "object.h"
00021 #include "pgh_type.h"
00022 #include <list>
00023 
00024 //check:
00025 //all uses of pair_dist and pair_angle are modified
00026 //compare lines filters out window_r stuff properly
00027 
00028 namespace mimas {
00058 class pgh : public hough_transform
00059 {
00060     private:
00061   //pairwise specific parameters
00062   mm_erf    erfarray; 
00063           // I guess we don't need one of these
00064                 // for EVERY pairwise !! FIX!!!!@
00065 
00066     protected:
00067 
00068   //pairwise specific params
00069   pgh_type  pairs_type; 
00070   double    dbin_max, dbin_min; 
00071   double    dbin_size, dist_ramp; 
00072   int     num_abin;
00073   double    angle_sigma, abin_size; 
00074   double    *pair_dist, *real_pair_dist; 
00075   double    *pair_angle,*real_pair_angle; 
00076 
00077 
00078     public:
00079     typedef boost::numeric::ublas::vector< double > Vector;
00080   pgh(void);
00081   ~pgh(void);
00082   //typical pairwise functions
00083 
00084   // added by fbc, 11.10.01
00085   void  initialise( pgh_type newpairs_type, double newdbin_max, double newdbin_size,
00086             double newdist_ramp, int newnum_abin, double newangle_sigma);
00087 
00088   void  initialise( void );
00089 
00090   void  describeLine( const line &ref_line, const line_ptr_list &l);
00091 
00092   void  init_pairs_entry(void);
00093 
00094   bool    adjust_for_distance_ramp(   double *weight,  double *min_d,
00095                       double *max_d,double dbin_min,
00096                       double dist_ramp );
00097 
00098   void  build_normalized_pairwise(  const line &ref_line,
00099                                     const line_ptr_list& geom );
00100 
00101   void  compare_lines(const line &refline, const line &line);
00102 
00103   void  compare_lines_mirror(const line &l1, const line &l2);
00104 
00105   void  make_entry_mirror(  double min_d,double max_d,
00106                   double angle,double weight);
00107 
00108   void  make_entry_rotate(  double min_d, double max_d,
00109                 double angle, double weight);
00110 
00111   void  compare_lines_rotate( const line &l1, const line &l2);
00112 
00113   void  make_entry_directed(double min_d, double max_d,
00114                             double angle, double weight);
00115 
00116   void  make_entry_direct(  double min_d, double max_d,
00117                 double angle, double weight);
00118 
00119   void  compare_lines_directed( const line &l1, const line &l2);
00120 
00121   Vector dir_vec( const Vector &isct, const Vector &p1,
00122                    const Vector &p2 );
00123 
00124   void  get_pdist(  double *pdist,double pdmin,
00125             double pdmax, double bin_width,
00126             double ramp,  int *low_bin,
00127             int *high_bin);
00128 
00129   void  sqr_root_and_normalize(void);
00130 };
00131 
00133 typedef boost::shared_ptr< pgh > pgh_ptr;
00134 
00136 typedef std::list< pgh_ptr > pgh_ptr_list;
00137 
00138 }
00139 
00140 #endif
00141 

[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:17 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...