ncutSetting.h

00001 
00002 #ifndef NCUTSETTING_H
00003 #define NCUTSETTING_H 1
00004 
00005 namespace ncut
00006 {
00007 
00013 class Setting
00014 {
00015   public:
00016 
00017     // ncut segmentation parameters
00018     unsigned int ncut_tree_depth; 
00019     unsigned int number_of_eigenvectors; 
00021     unsigned int number_of_eigenvector_splittest_steps; 
00025     // element information gathering parameters
00026     unsigned int variation_bins; 
00028     double saturation_multiplier; 
00031     // similarity calculation parameters
00032     double intensity_weight; 
00034     double position_weight; 
00036     double intensity_falloff; 
00038     double distance_falloff; 
00040     int stretch_saturation; 
00042     // merge parameters
00043     int merge_segments; 
00044     double merge_threshold; 
00046     unsigned int minimum_segment_count; 
00048     int stretch_saturation_merge; 
00051     // segment splitting
00052     int connected_segments; 
00055     // segment identifier lookup parameters
00056     unsigned int segment_adult_age; 
00058     double segment_age_weight; 
00060     double min_segment_attach_similarity; 
00063     // delayed segment visualization
00064     unsigned int segment_delay; 
00067     // saturation stretching function (only used if either
00068     // stretch_saturation or stretch_saturation_merge is set to 1)
00069     double stretch_point0_x; 
00070     double stretch_point0_y; 
00071     double stretch_point1_x; 
00072     double stretch_point1_y; 
00073     double stretch_point2_x; 
00074     double stretch_point2_y; 
00075     double stretch_point3_x; 
00076     double stretch_point3_y; 
00078     // visualization parameters
00079     int visualisation_mode; 
00080     int drawTrace; 
00081     int drawCross; 
00082     int drawLine; 
00083     int tracelength; 
00088     Setting();
00089 
00094     Setting(const Setting& clone);
00095 
00101     virtual Setting& operator=(const Setting& clone);
00102 
00106     virtual ~Setting();
00107 };
00108 
00109 Setting::Setting()
00110   : // ncut segmentation paramters
00111     ncut_tree_depth(4),
00112     number_of_eigenvectors(2),
00113     number_of_eigenvector_splittest_steps(10),
00114 
00115     // element information gathering parameters
00116     variation_bins(100),
00117     saturation_multiplier(4.0),
00118 
00119     // similarity calculation parameters
00120     intensity_weight(1.0),
00121     position_weight(0.0),
00122     intensity_falloff(0.1),
00123     distance_falloff(0.1),
00124     stretch_saturation(0),
00125 
00126     // merge parameters
00127     merge_segments(1),
00128     merge_threshold(35.0),
00129     minimum_segment_count(2),
00130     stretch_saturation_merge(0),
00131 
00132     // segment splitting
00133     connected_segments(1),
00134 
00135     // segment identifier lookup parameters
00136     segment_adult_age(20),
00137     segment_age_weight(0.5),
00138     min_segment_attach_similarity(0.5),
00139 
00140     // delayed segment visualization
00141     segment_delay(3),
00142 
00143     // saturation stretching function (only used if either
00144     // stretch_saturation or stretch_saturation_merge is set to 1)
00145     stretch_point0_x(0.0),   stretch_point0_y(0.0),
00146     stretch_point1_x(3.0),   stretch_point1_y(1.0),
00147     stretch_point2_x(20.0),  stretch_point2_y(200.0),
00148     stretch_point3_x(255.0), stretch_point3_y(255.0),
00149 
00150     // visualization parameters
00151     visualisation_mode(0),
00152     drawTrace(0),
00153     drawCross(1),
00154     drawLine(1),
00155     tracelength(10)
00156 {
00157   return;
00158 }
00159 
00160 Setting::Setting(const Setting& clone)
00161   : // ncut segmentation parameters
00162     ncut_tree_depth(4),
00163     number_of_eigenvectors(2),
00164     number_of_eigenvector_splittest_steps(10),
00165 
00166     // element information gathering parameters
00167     variation_bins(100),
00168     saturation_multiplier(4.0),
00169 
00170     // similarity calculation parameters
00171     intensity_weight(1.0),
00172     position_weight(0.0),
00173     intensity_falloff(0.1),
00174     distance_falloff(0.1),
00175     stretch_saturation(0),
00176 
00177     // merge parameters
00178     merge_segments(1),
00179     merge_threshold(35.0),
00180     minimum_segment_count(2),
00181     stretch_saturation_merge(1),
00182 
00183     // segment splitting
00184     connected_segments(1),
00185 
00186     // segment identifier lookup parameters
00187     segment_adult_age(20),
00188     segment_age_weight(0.5),
00189     min_segment_attach_similarity(0.5),
00190 
00191     // delayed segment visualization
00192     segment_delay(3),
00193 
00194     // saturation stretching function (only used if either
00195     // stretch_saturation or stretch_saturation_merge is set to 1)
00196     stretch_point0_x(0.0),   stretch_point0_y(0.0),
00197     stretch_point1_x(3.0),   stretch_point1_y(1.0),
00198     stretch_point2_x(20.0),  stretch_point2_y(200.0),
00199     stretch_point3_x(255.0), stretch_point3_y(255.0),
00200 
00201     // visualization parameters
00202     visualisation_mode(0),
00203     drawTrace(0),
00204     drawCross(1),
00205     drawLine(1),
00206     tracelength(10)
00207 {
00208   *this = clone;
00209 }
00210 
00211 Setting& Setting::operator=(const Setting& clone)
00212 {
00213   // ncut segmentation paramters
00214   ncut_tree_depth = clone.ncut_tree_depth;
00215   number_of_eigenvectors = clone.number_of_eigenvectors;
00216   number_of_eigenvector_splittest_steps =
00217       clone.number_of_eigenvector_splittest_steps;
00218 
00219   // element information gathering parameters
00220   variation_bins = clone.variation_bins;
00221   saturation_multiplier = clone.saturation_multiplier;
00222 
00223   // similarity calculation parameters
00224   intensity_weight = clone.intensity_weight;
00225   position_weight = clone.position_weight;
00226   intensity_falloff = clone.intensity_falloff;
00227   distance_falloff = clone.distance_falloff;
00228   stretch_saturation = clone.stretch_saturation;
00229 
00230   // merge parameters
00231   merge_segments = clone.merge_segments;
00232   merge_threshold = clone.merge_threshold;
00233   minimum_segment_count = clone.minimum_segment_count;
00234   stretch_saturation_merge = clone.stretch_saturation_merge;
00235 
00236   // segment splitting
00237   connected_segments = clone.connected_segments;
00238 
00239   // segment identifier lookup parameters
00240   segment_adult_age = clone.segment_adult_age;
00241   segment_age_weight = clone.segment_age_weight;
00242   min_segment_attach_similarity = clone.min_segment_attach_similarity;
00243 
00244   // delayed segment visualization
00245   segment_delay = clone.segment_delay;
00246 
00247   // saturation stretching function (only used if either
00248   // stretch_saturation or stretch_saturation_merge is set to 1)
00249   stretch_point0_x = clone.stretch_point0_x;
00250   stretch_point0_y = clone.stretch_point0_y;
00251   stretch_point1_x = clone.stretch_point1_x;
00252   stretch_point1_y = clone.stretch_point1_y;
00253   stretch_point2_x = clone.stretch_point2_x;
00254   stretch_point2_y = clone.stretch_point2_y;
00255   stretch_point3_x = clone.stretch_point3_x;
00256   stretch_point3_y = clone.stretch_point3_y;
00257 
00258   // visualization parameters
00259   visualisation_mode = clone.visualisation_mode;
00260   drawTrace = clone.drawTrace;
00261   drawCross = clone.drawCross;
00262   drawLine = clone.drawLine;
00263   tracelength = clone.tracelength;
00264 
00265   return *this;
00266 }
00267 
00268 Setting::~Setting()
00269 {
00270   return;
00271 }
00272 
00273 }
00274 ncut::Setting ncut_Setting;
00275 
00276 
00277 #endif // NCUTSETTING_H

Generated on Thu Jun 22 14:47:20 2006 for ncut.kdevelop by  doxygen 1.4.6