00001
00004 #ifndef __EQUIVALENT_PRESERVE_EDGE_HH__
00005 #define __EQUIVALENT_PRESERVE_EDGE_HH__
00006
00007 #include "equivalent_mont_jolion.hh"
00008 #include "vertex_data_color.hh"
00009 #include "border_data_deriche.hh"
00010
00012 class equivalent_preserve_edge: public equivalent_mont_jolion
00013 {
00014 private:
00015
00016 double grey_threshold;
00017
00018 double grad_threshold;
00019 public:
00021 equivalent_preserve_edge(const vertex_data_color &v, const border_data_deriche &b):equivalent_mont_jolion(v, b),grey_threshold(220)
00022 {
00023 grad_threshold=0.9*(((border_data_deriche *)b_data)->give_max_gradient());
00024 }
00026 bool lambda(int,vertex,vertex,dart,dart);
00029 double value(vertex);
00032 double interest(int,vertex,vertex,dart,dart);
00033
00034
00035 double give_grey_threshold()
00036 {
00037 return grey_threshold;
00038 }
00039 double give_grad_threshold()
00040 {
00041 return grad_threshold;
00042 }
00043 double set_grey_threshold(const double &d)
00044 {
00045 return grey_threshold=d;
00046 }
00047 double set_grad_ratio(const double &d)
00048 {
00049 return grad_threshold=d*(((border_data_deriche *)b_data)->give_max_gradient());
00050 }
00051 };
00052
00053 #endif // __EQUIVALENT_PRESERVE_EDGE_HH__