2004-06-24 11:08:31 +02:00
2004-09-07 01:49:39 +02:00
VCGLib http://vcg.sf.net o o
Visual and Computer Graphics Library o o
_ O _
2005-01-24 16:46:48 +01:00
Copyright(C) 2005-2006 \/)\/
2004-09-07 01:49:39 +02:00
Visual Computing Lab http://vcg.isti.cnr.it /\/|
ISTI - Italian National Research Council |
\
2007-05-11 12:32:52 +02:00
Metro 4.07 2007/05/11
2004-09-22 01:52:51 +02:00
All rights reserved.
2004-09-07 01:49:39 +02:00
2004-06-24 11:08:31 +02:00
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
for more details.
2004-09-07 01:49:39 +02:00
--- Synopsis ---
2004-06-24 11:08:31 +02:00
Metro is a tool designed to evaluate the difference between two triangular meshes.
Metro adopts an approximated approach based on surface sampling and point-to-surface distance computation.
2004-09-22 01:52:51 +02:00
Please, when using this tool, cite the following reference:
2004-06-24 11:08:31 +02:00
2005-01-24 16:46:48 +01:00
2004-06-24 11:08:31 +02:00
P. Cignoni, C. Rocchini and R. Scopigno
"Metro: measuring error on simplified surfaces"
Computer Graphics Forum, Blackwell Publishers, vol. 17(2), June 1998, pp 167-174
2005-01-24 16:46:48 +01:00
Available at http://vcg.sf.net
2004-06-24 11:08:31 +02:00
2004-09-22 01:52:51 +02:00
You can find some sample mesh to test in the 'Metro Sample dataset' package downloadable from sourceforge.
2004-06-24 11:08:31 +02:00
For any question about this software please contact:
Paolo Cignoni ( p.cignoni@isti.cnr.it )
2004-09-07 01:49:39 +02:00
--- General Info ---
2004-06-24 11:08:31 +02:00
2004-09-07 01:49:39 +02:00
Metro is a tool designed to evaluate the difference between two triangular meshes.
Metro adopts an approximated approach based on surface sampling and point-to-surface distance computation.
2004-06-24 11:08:31 +02:00
Three different surface sampling methods are implemented:
* Montecarlo sampling (pick k random samples in the interior of each face)
* Subdivision sampling (recursively subdivide each face along the longest edge and choose the sample in the center of each cell)
* Similar Triangles sampling (subdivide each face F in k polygons similar to F and sample the face in correspondence with the vertices of these polygons, internal to F)
Note that the three methods described above are used to sample only the interior of each face.
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.
2005-10-03 01:11:00 +02:00
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.
2004-09-07 01:49:39 +02:00
--- Basic usage ---
2004-06-24 11:08:31 +02:00
Metro is a command-line tool which allows the user to select among different sampling schemes.
A list of the command-line parameters accepted by the tool is shown in the following.
Usage: Metro file1 file2 [opts]
2005-01-24 16:46:48 +01:00
where "file1" and "file2" are the input meshes in PLY, OFF or STL format, and opts can be:
2004-06-24 11:08:31 +02:00
2005-10-03 01:11:00 +02:00
-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
2005-11-12 07:43:20 +01:00
-H Use an Hashed Uniform Grid as Search Structure
2007-05-11 12:32:52 +02:00
-O Use an Octree as Search Structure
2005-11-12 07:43:20 +01:00
2005-11-17 01:58:28 +01:00
The -C option is useful in combination with -c option for creating a set of
meshes with a coherent coloring scheme.
2005-11-12 07:43:20 +01:00
It sets how the errors are mapped into color according to the following formula,
let e be the error and ColorRamp be a R->RGB function mapping 0..1 values
into a smooth RedYellowGreenCyanBlue ramp:
e=Clamp(e,min,max);
VertexColor = ColorRamp( (e-min)/(max-min) );
2005-11-17 01:58:28 +01:00
The Histogram files saved by the -h option contains two column of numbers
e_i and p_i; p_i denotes the fraction of the surface having an error
between e_i and e_{i+1}. The sum of the second column values should give 1.