Version 4.06, Added possibility of using three different search structures UG Hash and AABB

This commit is contained in:
Paolo Cignoni 2005-10-02 23:11:00 +00:00
parent a66d132c9c
commit 283e6b822d
3 changed files with 68 additions and 22 deletions

32
apps/metro/history.txt Normal file
View File

@ -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

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $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 Revision 1.15 2005/04/04 10:36:36 cignoni
Release 4.05 Release 4.05
Added saving of Error Histogram 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 save a mesh with error as per-vertex colour and quality\n"\
" -C # # Set the min/max values used for color mapping\n"\ " -C # # Set the min/max values used for color mapping\n"\
" -L Remove duplicated and unreferenced vertices before processing\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" "\n"
"Default options are to sample vertexes, edge and faces by taking \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" "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 // print program info
printf("-------------------------------\n" printf("-------------------------------\n"
" Metro V.4.05 \n" " Metro V.4.06 \n"
" http://vcg.isti.cnr.it\n" " http://vcg.isti.cnr.it\n"
" release date: "__DATE__"\n" " release date: "__DATE__"\n"
"-------------------------------\n\n"); "-------------------------------\n\n");
@ -182,7 +187,7 @@ int main(int argc, char**argv)
if(argv[i][0]=='-') if(argv[i][0]=='-')
switch(argv[i][1]) switch(argv[i][1])
{ {
case 'H' : flags |= SamplingFlags::HIST; break; case 'h' : flags |= SamplingFlags::HIST; break;
case 'v' : flags &= ~SamplingFlags::VERTEX_SAMPLING; break; case 'v' : flags &= ~SamplingFlags::VERTEX_SAMPLING; break;
case 'e' : flags &= ~SamplingFlags::EDGE_SAMPLING; break; case 'e' : flags &= ~SamplingFlags::EDGE_SAMPLING; break;
case 'f' : flags &= ~SamplingFlags::FACE_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 'c': flags |= SamplingFlags::SAVE_ERROR; break;
case 'L': CleaningFlag=true; break; case 'L': CleaningFlag=true; break;
case 'C': ColorMin=float(atof(argv[i+1])); ColorMax=float(atof(argv[i+2])); i+=2; 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]); default : printf(MSG_ERR_INVALID_OPTION, argv[i]);
exit(0); exit(0);
} }
i++; i++;
} }
if(!(flags & SamplingFlags::USE_HASH_GRID) && !(flags & SamplingFlags::USE_AABB_TREE) )
flags |= SamplingFlags::USE_STATIC_GRID;
// load input meshes. // load input meshes.
OpenMesh(argv[1],S1); OpenMesh(argv[1],S1);
OpenMesh(argv[2],S2); OpenMesh(argv[2],S2);

View File

@ -6,10 +6,9 @@
Visual Computing Lab http://vcg.isti.cnr.it /\/| Visual Computing Lab http://vcg.isti.cnr.it /\/|
ISTI - Italian National Research Council | ISTI - Italian National Research Council |
\ \
Metro 4.05 04/05/2005 Metro 4.06 2005/10/03
All rights reserved. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 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, 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. 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 --- --- Basic usage ---
Metro is a command-line tool which allows the user to select among different sampling schemes. 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: where "file1" and "file2" are the input meshes in PLY, OFF or STL format, and opts can be:
-v disable vertex sampling -v disable vertex sampling
-e disable edge sampling -e disable edge sampling
-f disable face sampling -f disable face sampling
-u does not ignore unreferred vertices and sample also unreferenced vertices -u ignore unreferred vertices
(useful for sampling point clouds against meshes) -sx set the face sampling mode
-sx set the face sampling mode where x can be:
where x can be: -s0 montecarlo sampling
-S0 montecarlo sampling -s1 subdivision sampling
-S1 subdivision sampling -s2 similar triangles sampling (Default)
-S2 similar triangles sampling (Default) -n# set the required number of samples (overrides -A)
-n# set the required number of samples (overrides -a) -a# set the required number of samples per area unit (overrides -N)
-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 save computed error as vertex colour and quality in two ply files -C # # Set the min/max values used for color mapping
-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
-L Remove duplicated and unreferenced vertices before processing to avoid -h write files with histograms of error distribution
-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