From 283e6b822d89ec6bd67f10797d8c8de1a77f7acd Mon Sep 17 00:00:00 2001 From: cignoni Date: Sun, 2 Oct 2005 23:11:00 +0000 Subject: [PATCH] Version 4.06, Added possibility of using three different search structures UG Hash and AABB --- apps/metro/history.txt | 32 ++++++++++++++++++++++++++++++++ apps/metro/metro.cpp | 19 +++++++++++++++---- apps/metro/readme.txt | 39 +++++++++++++++++++++------------------ 3 files changed, 68 insertions(+), 22 deletions(-) create mode 100644 apps/metro/history.txt diff --git a/apps/metro/history.txt b/apps/metro/history.txt new file mode 100644 index 00000000..5aff6afa --- /dev/null +++ b/apps/metro/history.txt @@ -0,0 +1,32 @@ + + VCGLib http://vcg.sf.net o o + Visual and Computer Graphics Library o o + _ O _ + Copyright(C) 2005-2006 \/)\/ + Visual Computing Lab http://vcg.isti.cnr.it /\/| + ISTI - Italian National Research Council | + \ + Metro 4.06 2005/10/03 + All rights reserved. + +2005/10/03 Release 4.06 +Changed the core for distance computation. +Current version uses the lib flexible search structures. +Now the comparison can be done exploiting a static uniform grid, +a hashed grid or a hierarchy of AA box. + +2005/04/04 Release 4.05 +Added saving of Error Histogram + +2005/01/26 Release 4.04 +Gcc compiling issues +Moved to the library core the code for computing min distance froma a point to a mesh using a uniform grid. +Slightly faster. + +2005/01/03 Release 4.03 +Better ply compatibility, and improved error reporting + +2004/11/29 Release 4.02 +removed bug in printing Hausdorf distance, +removed bug in command line parsing, +upgraded import mesh library to support off format diff --git a/apps/metro/metro.cpp b/apps/metro/metro.cpp index b100de52..478a01bc 100644 --- a/apps/metro/metro.cpp +++ b/apps/metro/metro.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.16 2005/09/16 11:52:14 cignoni +removed wrong %v in vertex number printing + Revision 1.15 2005/04/04 10:36:36 cignoni Release 4.05 Added saving of Error Histogram @@ -117,8 +120,10 @@ void Usage() " -c save a mesh with error as per-vertex colour and quality\n"\ " -C # # Set the min/max values used for color mapping\n"\ " -L Remove duplicated and unreferenced vertices before processing\n"\ - " -H write files with histograms of error distribution\n"\ - + " -h write files with histograms of error distribution\n"\ + " -G Use a static Uniform Grid as Search Structure (default)\n"\ + " -A Use an AxisAligned Bounding Box Tree as Search Structure\n"\ + " -H Use an Hashed Uniform Grid as Search Structure\n"\ "\n" "Default options are to sample vertexes, edge and faces by taking \n" "a number of samples that is approx. 10x the face number.\n" @@ -164,7 +169,7 @@ int main(int argc, char**argv) // print program info printf("-------------------------------\n" - " Metro V.4.05 \n" + " Metro V.4.06 \n" " http://vcg.isti.cnr.it\n" " release date: "__DATE__"\n" "-------------------------------\n\n"); @@ -182,7 +187,7 @@ int main(int argc, char**argv) if(argv[i][0]=='-') switch(argv[i][1]) { - case 'H' : flags |= SamplingFlags::HIST; break; + case 'h' : flags |= SamplingFlags::HIST; break; case 'v' : flags &= ~SamplingFlags::VERTEX_SAMPLING; break; case 'e' : flags &= ~SamplingFlags::EDGE_SAMPLING; break; case 'f' : flags &= ~SamplingFlags::FACE_SAMPLING; break; @@ -202,12 +207,18 @@ int main(int argc, char**argv) case 'c': flags |= SamplingFlags::SAVE_ERROR; break; case 'L': CleaningFlag=true; break; case 'C': ColorMin=float(atof(argv[i+1])); ColorMax=float(atof(argv[i+2])); i+=2; break; + case 'A': flags |= SamplingFlags::USE_AABB_TREE; printf("Using AABB Tree as search structure\n"); break; + case 'G': flags |= SamplingFlags::USE_STATIC_GRID; printf("Using static uniform grid as search structure\n"); break; + case 'H': flags |= SamplingFlags::USE_HASH_GRID; printf("Using hashed uniform grid as search structure\n"); break; default : printf(MSG_ERR_INVALID_OPTION, argv[i]); exit(0); } i++; } + if(!(flags & SamplingFlags::USE_HASH_GRID) && !(flags & SamplingFlags::USE_AABB_TREE) ) + flags |= SamplingFlags::USE_STATIC_GRID; + // load input meshes. OpenMesh(argv[1],S1); OpenMesh(argv[2],S2); diff --git a/apps/metro/readme.txt b/apps/metro/readme.txt index 86d407d6..39026c11 100644 --- a/apps/metro/readme.txt +++ b/apps/metro/readme.txt @@ -6,10 +6,9 @@ Visual Computing Lab http://vcg.isti.cnr.it /\/| ISTI - Italian National Research Council | \ - Metro 4.05 04/05/2005 + Metro 4.06 2005/10/03 All rights reserved. - This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,6 +54,8 @@ Note that the three methods described above are used to sample only the interior A different scheme is used to sample vertices and edges: vertices are sampled in the straightforward manner, while edges are sampled by uniformly interleaving samples along each edge. +Three different Spatial indexing structures can be used to find the closest point to a sample, a Statically Allocated Uniform Grid, a Hashed Uniform Grid and a Hierarchy of axis aligned bounding boxes. + --- Basic usage --- Metro is a command-line tool which allows the user to select among different sampling schemes. @@ -64,19 +65,21 @@ Usage: Metro file1 file2 [opts] where "file1" and "file2" are the input meshes in PLY, OFF or STL format, and opts can be: - -v disable vertex sampling - -e disable edge sampling - -f disable face sampling - -u does not ignore unreferred vertices and sample also unreferenced vertices - (useful for sampling point clouds against meshes) - -sx set the face sampling mode - where x can be: - -S0 montecarlo sampling - -S1 subdivision sampling - -S2 similar triangles sampling (Default) - -n# set the required number of samples (overrides -a) - -a# set the required number of samples per area unit (overrides -n) - -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 + -v disable vertex sampling + -e disable edge sampling + -f disable face sampling + -u ignore unreferred vertices + -sx set the face sampling mode + where x can be: + -s0 montecarlo sampling + -s1 subdivision sampling + -s2 similar triangles sampling (Default) + -n# set the required number of samples (overrides -A) + -a# set the required number of samples per area unit (overrides -N) + -c save a mesh with error as per-vertex colour and quality + -C # # Set the min/max values used for color mapping + -L Remove duplicated and unreferenced vertices before processing + -h write files with histograms of error distribution + -G Use a static Uniform Grid as Search Structure (default) + -A Use an Axis Aligned Bounding Box Tree as Search Structure + -H Use an Hashed Uniform Grid as Search Structure \ No newline at end of file