00001 // This is gel/vifa/vifa_coll_lines_params.h 00002 #ifndef VIFA_COLL_LINES_PARAMS_H 00003 #define VIFA_COLL_LINES_PARAMS_H 00004 00005 //----------------------------------------------------------------------------- 00006 //: 00007 // \file 00008 // \brief Parameter mixin for collinearity tests. 00009 // 00010 // \author Roddy Collins, from DDB in TargetJr 00011 // 00012 // \date May 2001 00013 // 00014 // \verbatim 00015 // Modifications: 00016 // MPP Mar 2003, Ported to VXL 00017 // \endverbatim 00018 //----------------------------------------------------------------------------- 00019 00020 #include <vbl/vbl_ref_count.h> 00021 #include <vbl/vbl_smart_ptr.h> 00022 #include <vul/vul_timestamp.h> 00023 #include <gevd/gevd_param_mixin.h> 00024 00025 00026 //: Container holding parameters for collinearizing lines 00027 class vifa_coll_lines_params : public gevd_param_mixin, 00028 public vul_timestamp, 00029 public vbl_ref_count 00030 { 00031 float midpt_distance_; 00032 float angle_tolerance_; 00033 float discard_threshold_; 00034 float endpt_distance_; 00035 00036 public: 00037 //: Distance of midpoint of qualified edge segment to projected line. 00038 float midpt_distance() const { return midpt_distance_; } 00039 00040 //: Maximum angular difference (in degrees). 00041 float angle_tolerance() const { return angle_tolerance_; } 00042 00043 //: Minimum of supported to spanning length. 00044 float discard_threshold() const { return discard_threshold_; } 00045 00046 //: Endpoints within this distance are accepted no matter what the angular difference is. 00047 float endpt_distance() const { return endpt_distance_; } 00048 00049 //: Default constructor 00050 vifa_coll_lines_params(float midpt_distance = 1.0f, 00051 float angle_tolerance = 5.0f, 00052 float discard_threshold = 0.3f, 00053 float endpt_distance = 3.0f 00054 ); 00055 00056 //: Copy constructor 00057 vifa_coll_lines_params(const vifa_coll_lines_params& old_params); 00058 00059 //: Output contents 00060 void print_info(void); 00061 }; 00062 00063 00064 typedef vbl_smart_ptr<vifa_coll_lines_params> vifa_coll_lines_params_sptr; 00065 00066 00067 #endif // VIFA_COLL_LINES_PARAMS_H