Go to the documentation of this file.00001
00002 #ifndef brip_filter_bank_h_
00003 #define brip_filter_bank_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <vcl_vector.h>
00027 #include <vil/vil_image_view.h>
00028 #include <vil/vil_pyramid_image_view.h>
00029 #include <vcl_iostream.h>
00030
00031 class brip_filter_bank
00032 {
00033 public:
00034
00035 brip_filter_bank(): ni_(0), nj_(0),n_levels_(0), scale_ratio_(1.0),
00036 lambda0_(1.0f), lambda1_(1.0f), theta_interval_(0.0f),
00037 cutoff_ratio_(0.01f){}
00038
00039 brip_filter_bank(unsigned n_levels, double scale_range, float lambda0,
00040 float lambda1, float theta_interval, float cuttoff_ratio);
00041
00042
00043 brip_filter_bank(unsigned n_levels, double scale_range, float lambda0,
00044 float lambda1, float theta_interval, float cuttoff_ratio,
00045 vil_image_view<float> const& image);
00046
00047 ~brip_filter_bank() {}
00048
00049 void set_image(vil_image_view<float> const& image);
00050
00051 unsigned ni() const {return ni_;}
00052 unsigned nj() const {return nj_;}
00053 unsigned n_levels() const {return n_levels_;}
00054 double scale_ratio() const {return scale_ratio_;}
00055 float lambda0() const {return lambda0_;}
00056 float lambda1() const {return lambda1_;}
00057 float theta_interval() const {return theta_interval_;}
00058
00059 unsigned invalid_border() const;
00060
00061 vil_image_view<float>& response(unsigned int scale_level){
00062 return filter_responses_[scale_level];}
00063
00064 vcl_vector<vil_image_view<float> > responses() const{
00065 return filter_responses_;}
00066
00067 bool save_filter_responses(vcl_string const& dir) const;
00068 protected:
00069
00070 void construct_scale_pyramid();
00071 void compute_filter_responses();
00072
00073
00074 unsigned ni_, nj_;
00075 unsigned n_levels_;
00076 double scale_ratio_;
00077 float lambda0_;
00078 float lambda1_;
00079 float theta_interval_;
00080 float cutoff_ratio_;
00081 vil_pyramid_image_view<float> scale_pyramid_;
00082
00083 vcl_vector<vil_image_view<float> > filter_responses_;
00084 };
00085
00086 vcl_ostream& operator<<(vcl_ostream& s, brip_filter_bank const& r);
00087
00088 #endif // brip_filter_bank_h_