hough_transform.h

Go to the documentation of this file.
00001 //
00002 // stuart meikle Tue Mar  7 16:12:54 2000
00003 //
00004 
00005 
00006 // today: i'll define the hough transform as being a double image. 
00007 // in theory it could be any kind of image, so you might want to change
00008 // this class to template<typename T> as some point
00009 
00010 
00011 
00012 #ifndef HOUGH_TRANSFORM_H
00013 #define HOUGH_TRANSFORM_H
00014 
00015 #include <boost/numeric/ublas/vector.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include "object.h"
00018 #include "image.h"
00019 #include "line.h"
00020 #include "angle.h"
00021 
00022 namespace mimas {
00029 class hough_transform : public image<double>
00030 {
00031  private:
00032   int calcGaussBoxSize( double sigma, double accuracy );
00033 
00034   //stumeikle Sun May 26 11:29:24 2002
00035   //adding some functionality to speed up plotting of points
00036    boost::shared_ptr< image< double > > bell_curve;    
00037 
00038  public:
00039    typedef boost::numeric::ublas::vector< double > Vector;
00040    typedef boost::numeric::ublas::vector< int > IntVector;
00041   hough_transform(void)
00042   {
00043     //nothing to do. the underlying image still needs to be initialised in the
00044     //usual manner
00045     // bell_curve=NULL;
00046   }
00047 
00048   //hough transform like functions
00049   void  addGaussPoint( const IntVector &posn, double weight, double sigma, double precision );
00050   void  addGaussLine(  line line, double weight, double sigma, double precision );
00051   void  addSlopedGaussLine( line line, double weight, double sigma, double precision );
00052   bool  lineHitsPoint( const IntVector &point, line line, double sigma, double precision ); 
00053   void  makeAngleEntry(angle a, double sigma, double prec );
00054   void  normalize(void);
00055   angle getAngle( void );
00056   
00057   void  initFastGauss( double sigma, double precision );
00058   void  addGaussPointFast( const IntVector &posn );//, double weight );
00059   void  addGaussLineFast( line line, double weight );
00060 };
00061 
00062 };
00063 
00064 #endif
00065 

[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, ...