contrib/brl/bseg/sdet/sdet_grid_finder_params.h
Go to the documentation of this file.
00001 // This is brl/bseg/sdet/sdet_grid_finder_params.h
00002 #ifndef sdet_grid_finder_params_h_
00003 #define sdet_grid_finder_params_h_
00004 //:
00005 // \file
00006 // \brief parameter mixin for sdet_grid_finder
00007 //
00008 // \author
00009 //    Joseph L. Mundy - April 30, 2003
00010 //    Brown University
00011 //
00012 //-----------------------------------------------------------------------------
00013 #include <gevd/gevd_param_mixin.h>
00014 #include <vcl_iosfwd.h>
00015 #include <vcl_vector.h>
00016 
00017 class sdet_grid_finder_params : public gevd_param_mixin
00018 {
00019  public:
00020   enum debug {NO_DEBUG=0,
00021               VANISHING_POINT,
00022               AFFINE_GROUP_BEFORE_SKEW_SCALE,
00023               AFFINE_GROUP_AFTER_SKEW_SCALE,
00024               TRANS_PERIM_LINES,
00025               AFFINE_GROUP_AFTER_TRANS};
00026 
00027   sdet_grid_finder_params(const int n_lines_x=11, const int n_lines_y=11,
00028                           const double spacing=53.34,
00029                           const int thresh=1, const float angle_tol=5,
00030                           bool verbose = false,
00031                           int debug_state = false);
00032 
00033   sdet_grid_finder_params(const sdet_grid_finder_params& old_params);
00034  ~sdet_grid_finder_params(){}
00035 
00036   bool SanityCheck();
00037   void get_debug_choices(vcl_vector<vcl_string>& choices);
00038   friend
00039     vcl_ostream& operator<<(vcl_ostream&, const sdet_grid_finder_params& gfp);
00040  protected:
00041   void InitParams(const int n_lines_x, const int n_lines_y,
00042                   const double spacing, const int thresh,
00043                   const float angle_tol,
00044                   bool verbose,
00045                   int debug_state);
00046  public:
00047   //
00048   // Parameter blocks and parameters
00049   //
00050 
00051   // Variables n_lines_x_ and n_lines_y_ appear to be backwards here,
00052   // with n_lines_x_ representing the number of grid lines you have as
00053   // you move in the Y direction, and vice versa.  This results in
00054   // many statements in the implementation of sdet_grid_finder that
00055   // appear to have an x/y mismatch.  Any development of these classes
00056   // should be tested on a non-square grid.  There may still be bugs in
00057   // sdet_grid_finder related to this issue.
00058 
00059   int n_lines_x_;  //!< number of horizontal grid lines
00060   int n_lines_y_;  //!< number of vertical grid lines
00061   double spacing_; //!< spacing between lines
00062   int thresh_;     //!< bin threshold for dominant orientation groups
00063   float angle_tol_;//!< angle tolerance for a dominant group
00064   bool verbose_;   //!< print informative debug output
00065   int debug_state_;//!< general purpose debug state
00066 };
00067 
00068 #endif // sdet_grid_finder_params_h_