From 4679fecf834338d6a0798b95befc08ee3c93fe93 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 4 Apr 2005 10:47:26 +0000 Subject: [PATCH] Release 4.05 Added saving of Error Histogram --- apps/metro/readme.txt | 3 ++- apps/metro/sampling.h | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/metro/readme.txt b/apps/metro/readme.txt index 16f566bc..86d407d6 100644 --- a/apps/metro/readme.txt +++ b/apps/metro/readme.txt @@ -6,7 +6,7 @@ Visual Computing Lab http://vcg.isti.cnr.it /\/| ISTI - Italian National Research Council | \ - Metro 4.04 25/01/2005 + Metro 4.05 04/05/2005 All rights reserved. @@ -79,3 +79,4 @@ where "file1" and "file2" are the input meshes in PLY, OFF or STL format, and op -c save computed error as vertex colour and quality in two ply files -C # # Set the min/max values used for color mapping (useful for taking snapshot with coherent color ramp) -L Remove duplicated and unreferenced vertices before processing to avoid + -H write files with histograms of error distribution \ No newline at end of file diff --git a/apps/metro/sampling.h b/apps/metro/sampling.h index 498647e4..506f9a19 100644 --- a/apps/metro/sampling.h +++ b/apps/metro/sampling.h @@ -24,6 +24,10 @@ History $Log: not supported by cvs2svn $ +Revision 1.15 2005/01/26 22:45:34 cignoni +Release 4.04 +final updates for gcc compiling issues + Revision 1.14 2005/01/24 15:37:14 cignoni updated from MinDistPoint to Closest (and removed some warnings) @@ -68,6 +72,7 @@ instantiate GridStaticPtr on the simplexClass template. //#include "min_dist_point.h" #include #include +#include #include #include #include @@ -131,7 +136,7 @@ private: int Flags; // results -// Hist hist; + Histogram hist; unsigned long n_total_samples; unsigned long n_total_area_samples; unsigned long n_total_edge_samples; @@ -174,7 +179,7 @@ public : unsigned long GetNVertexSamples() {return n_total_vertex_samples;} double GetNSamplesPerAreaUnit() {return n_samples_per_area_unit;} unsigned long GetNSamplesTarget() {return n_samples_target;} -// Hist &GetHist() {return hist;} + Histogram &GetHist() {return hist;} void SetFlags(int flags) {Flags = flags;} void ClearFlag(int flag) {Flags &= (flag ^ -1);} void SetParam(double _n_samp) {n_samples_target = _n_samp;} @@ -268,8 +273,8 @@ float Sampling::AddSample(const Point3x &p ) RMS_dist += dist*dist; // L_2 n_total_samples++; - //if(Flags & HIST) - // hist.Add((float)fabs(dist)); + if(Flags & SamplingFlags::HIST) + hist.Add((float)fabs(dist)); return (float)dist; } @@ -577,8 +582,8 @@ void Sampling::Hausdorff() // set bounding box bbox = S2.bbox; dist_upper_bound = /*bbox_factor * */bbox.Diag(); - //if(Flags & HIST) - // hist.SetRange(0.0, dist_upper_bound, n_hist_bins); + if(Flags & SamplingFlags::HIST) + hist.SetRange(0.0, dist_upper_bound/100.0, n_hist_bins); // initialize sampling statistics. n_total_area_samples = n_total_edge_samples = n_total_vertex_samples = n_total_samples = n_samples = 0;