Go to the documentation of this file.00001 #ifndef mfpf_mr_point_finder_builder_h_
00002 #define mfpf_mr_point_finder_builder_h_
00003
00004
00005
00006
00007
00008 #include <mfpf/mfpf_point_finder_builder.h>
00009 #include <vgl/vgl_fwd.h>
00010 #include <vcl_cassert.h>
00011 #include <vcl_iosfwd.h>
00012
00013 class vimt_image_pyramid;
00014 class mfpf_mr_point_finder;
00015 class mfpf_pose;
00016
00017
00018
00019
00020 class mfpf_mr_point_finder_builder
00021 {
00022 protected:
00023
00024
00025 vcl_vector<mfpf_point_finder_builder*> builders_;
00026
00027
00028 void delete_all();
00029
00030 public:
00031
00032
00033 mfpf_mr_point_finder_builder();
00034
00035
00036 mfpf_mr_point_finder_builder(const mfpf_mr_point_finder_builder&);
00037
00038
00039
00040 mfpf_mr_point_finder_builder& operator=(const mfpf_mr_point_finder_builder&);
00041
00042
00043 virtual ~mfpf_mr_point_finder_builder();
00044
00045
00046 unsigned size() const { return builders_.size(); }
00047
00048
00049 const mfpf_point_finder_builder& builder(unsigned L) const
00050 { assert (L<builders_.size()); return *builders_[L]; }
00051
00052
00053 mfpf_point_finder_builder& builder(unsigned L)
00054 { assert (L<builders_.size()); return *builders_[L]; }
00055
00056
00057 void set_n_levels(unsigned n);
00058
00059
00060 void set(const vcl_vector<mfpf_point_finder_builder*>& builders);
00061
00062
00063
00064
00065
00066
00067 void set(const mfpf_point_finder_builder& builder,
00068 unsigned n, double step0, double scale_step);
00069
00070
00071
00072
00073
00074
00075
00076 void set_size_and_levels(
00077 const mfpf_point_finder_builder& builder0,
00078 double wi, double wj,
00079 double scale_step,
00080 int min_n_samples,
00081 int max_n_samples,
00082 double base_pixel_width=1.0);
00083
00084
00085
00086
00087
00088 void set_region_size(double wi, double wj);
00089
00090
00091
00092
00093 unsigned image_level(unsigned i,
00094 const vgl_vector_2d<double>& u,
00095 const vimt_image_pyramid& im_pyr) const;
00096
00097
00098
00099 void clear(unsigned n_egs);
00100
00101
00102 void get_sample_vector(const vimt_image_pyramid& image_pyr,
00103 const vgl_point_2d<double>& p,
00104 const vgl_vector_2d<double>& u,
00105 unsigned L,
00106 vcl_vector<double>& v);
00107
00108
00109 void add_example(const vimt_image_pyramid& image_pyr,
00110 const vgl_point_2d<double>& p,
00111 const vgl_vector_2d<double>& u);
00112
00113
00114 void build(mfpf_mr_point_finder&);
00115
00116
00117 short version_no() const;
00118
00119
00120 virtual vcl_string is_a() const;
00121
00122
00123 virtual void print_summary(vcl_ostream& os) const;
00124
00125
00126 virtual void b_write(vsl_b_ostream& bfs) const;
00127
00128
00129 virtual void b_read(vsl_b_istream& bfs);
00130 };
00131
00132
00133 vcl_ostream& operator<<(vcl_ostream& os,const mfpf_mr_point_finder_builder& b);
00134
00135
00136 void vsl_b_write(vsl_b_ostream& bfs, const mfpf_mr_point_finder_builder& b);
00137
00138
00139 void vsl_b_read(vsl_b_istream& bfs, mfpf_mr_point_finder_builder& b);
00140
00141 #endif // mfpf_mr_point_finder_builder_h_