Go to the documentation of this file.00001 #include "osl_fit_lines_params.h"
00002 #include <vcl_iostream.h>
00003
00004
00005
00006 osl_fit_lines_params::osl_fit_lines_params(unsigned int min_fit_len,
00007 bool use_sqr,
00008 double thresh,
00009 double th,
00010 bool dc,
00011 bool inc,
00012 unsigned int ignore_end_edgels)
00013 : min_fit_length_(min_fit_len)
00014 , use_square_fit_(use_sqr)
00015 , threshold_(thresh)
00016 , theta_(th)
00017 , dc_only_(dc)
00018 , incremtl_(inc)
00019 , ignore_end_edgels_(ignore_end_edgels)
00020 {}
00021
00022
00023 bool osl_fit_lines_params::SanityCheck()
00024 {
00025 bool valid = true;
00026
00027 if (min_fit_length_ < 3) {
00028 vcl_cerr << "ERROR: Min fit length too short: "<< min_fit_length_<<" < 3\0";
00029 valid = false;
00030 }
00031
00032 if (threshold_ > 1.0) {
00033 vcl_cerr << "ERROR: Fit error is quite large: " << threshold_ << " > 1\0";
00034 valid = false;
00035 }
00036
00037 if (theta_ > 15) {
00038 vcl_cerr << "ERROR: Value of angle tolerance is too large: "
00039 << theta_ << " > 15\0";
00040 valid = false;
00041 }
00042 return valid;
00043 }