00001 #ifndef SLAP_TOOL_H 00002 #define SLAP_TOOL_H 00003 00004 #include <boost/numeric/ublas/vector.hpp> 00005 #include <boost/shared_ptr.hpp> 00006 #include <cmath> 00007 #include "line.h" 00008 #include "image.h" 00009 #include "edge_string.h" 00010 #include "edge_string_op.h" 00011 00012 namespace mimas { 00035 class slap_tool 00036 { 00037 private: 00038 double anglesigma; 00039 //use this to simplify parameter lists 00040 00041 public: 00042 typedef string_el_ptr_list::iterator string_it; 00043 typedef boost::numeric::ublas::vector< double > Vector; 00044 00051 slap_tool(void) 00052 { 00053 anglesigma = M_PI/32.0; 00054 } 00055 00056 slap_tool( double d ) 00057 { 00058 anglesigma = d; 00059 } 00060 00066 line_ptr_list findStraightLines( edge_string_ptr_list& es_list ); 00067 00068 private: 00069 //the rest of the functions are internal to the tool, and shouldn't need to be 00070 //touched i imagine. 00071 line_ptr_list poly_strings( edge_string_ptr_list& es_list, double thres ); 00072 line_ptr_list poly_string( edge_string& es , double thres ); 00073 void poly_prox( string_it start_it, string_it end_it, double thres, 00074 line_ptr_list& result ); 00075 00076 }; 00077 }; 00078 00079 #endif