contrib/oxl/osl/osl_fit_lines_params.h
Go to the documentation of this file.
00001 #ifndef osl_fit_lines_params_h_
00002 #define osl_fit_lines_params_h_
00003 // .NAME osl_fit_lines_params - The parameter mixin for Charlie's FitLines
00004 // .INCLUDE osl/osl_fit_lines_params.h
00005 // .FILE osl_fit_lines_params.cxx
00006 //
00007 // .SECTION Author:
00008 //             Joseph L. Mundy - December 1997
00009 //             GE Corporate Research and Development
00010 
00011 class osl_fit_lines_params
00012 {
00013  public :
00014   osl_fit_lines_params(unsigned int min_fit_length = 10,
00015                        bool use_sq_fit = true,
00016                        double threshold = 0.3,
00017                        double theta = 5.0,
00018                        bool dc_only = false,
00019                        bool incremtl = true,
00020                        unsigned int ignore_end_edgels = 3);
00021 
00022   // Check parameters for consistency
00023   bool SanityCheck();
00024 
00025   //The parameter members
00026   unsigned int min_fit_length_;   // Minimum number of pixels to fit lines to
00027   bool use_square_fit_;
00028   double threshold_;    // RMS fitting distance threshold
00029   double theta_;          // Lines must be within theta to be merged
00030   bool dc_only_;           // Set to 1 to prevent refit to non-dc's
00031   bool incremtl_;          // Set to 0 to use simple (PAB) fit
00032   unsigned int ignore_end_edgels_;  // Number of (often garbage) edgels to ignore from the
00033   // start and end of a segment when fitting a line
00034 };
00035 
00036 #endif // osl_fit_lines_params_h_