Diff of /trunk/contrib/brl/bbas/vsph/vsph_segment_sphere.h [r36627] .. [r36628]  Maximize  Restore

  Switch to side-by-side view

--- a/trunk/contrib/brl/bbas/vsph/vsph_segment_sphere.h
+++ b/trunk/contrib/brl/bbas/vsph/vsph_segment_sphere.h
@@ -9,7 +9,7 @@
 class vsph_segment_sphere
 {
  public:
-  vsph_segment_sphere(vsph_unit_sphere const& usph, double sigma, double c, int min_size) : seg_valid_(false),usph_(usph),sigma_(sigma), c_(c), min_size_(min_size), num_ccs_(0){}
+  vsph_segment_sphere(vsph_unit_sphere const& usph, double c, int min_size,double sigma, bool dosmoothing  ) : seg_valid_(false),usph_(usph),sigma_(sigma), c_(c), min_size_(min_size), num_ccs_(0),dosmoothing_(dosmoothing){}
   // === accessors ==-
   double sigma() const {return sigma_;}
   double c() const {return c_;}
@@ -18,18 +18,26 @@
   const vcl_map<int,  vcl_vector<int> >& regions() const {return regions_;}
   // === process methods ===
   void set_data(vcl_vector<double> data){data_ = data;}
-  void smooth_data();
   void segment();
   bool extract_region_bounding_boxes();
   const vcl_map<int, vsph_sph_box_2d>& region_boxes() const {return bboxes_;}
   vcl_vector<double> region_data() const;
   vcl_vector<vcl_vector<float> > region_color() const;
+
+  //: function to compute mean of the pixels in a region using the oringal values of the spherical segment
+  double region_mean(int id);
+  //: function to compute median of the pixels in a region using the oringal values of the spherical segment
+  double region_median(int id);
+
  private:
+  void smooth_data();
+
   bool seg_valid_;
   vsph_unit_sphere usph_;
   double sigma_;
   double c_;
   int min_size_;
+  bool dosmoothing_;
   //: spherical "image" data
   vcl_vector<double> data_;
   vcl_vector<double> smooth_data_;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks