		Comp3DShapes
                ==============

A program for comparing 3D shapes given as 3D triangular surfaces.
Comp3DShapes uses signatures to describe vertices on a shape. Using
those signatures, a distance can be used to compare two vertices.
Those distances define a cost matrix between the vertices of the two
meshes to be compared. The optimal transport, either balanced or unbalanced,
is then used to compute a correspondence between the two meshes, as well
as a distance between them. This distance is a matric for the balanced
optimal transport, and only a divergence for the unbalanced optimal
transport.

Two types of signatures are available:
- LDSIFT, i.e. 3D SIFT descriptors
- WKS, for wave kernel signatures

If requested, the correspondence obtained based on the signature is then
refined by using the ambient space to compute the distances between vertices.

1) Installing Comp3DShapes
==========================

All libraries required by Comp3DShapes are provided in the distribution.
To compile, you need:
- a C++ compiler (usually g++)
- a Fortran compiler (usually gfortran)


2) Compiling Comp3DShapes
=========================

Go to the main directory in Comp3DShapes, and just type:

make

This should fully compile Comp3DShapes and put the executable Comp3DShapes.cpu inside the subdirectory
bin

3) Running Comp3Dshapes
========================

A typical run of Comp3DShapes, from the subdirectory examples, is

../bin/Comp3DShapes.cpu -i1 FILE1 -i2 FILE2 -d desc -m method -r flag_ref -o FILEOUT

where:

- FILE1 and FILE2 contain the two meshes to be compared (in OFF format)
- desc is the signature considered:
	0 for LDSIFT
        1 for WKS
- method is the optimal transport method considered:
        0 for balanced
        1 for unbalanced
- flag_ref indicates if refinement in ambient space should be performed
        0: no refinement (default; advised as refinement is very slow!)
        1: refinement
- FILEOUT

4) Testing Comp3DShapes
========================
Go into the example directory, such as

and then type:

../bin/Comp3DShapes.cpu -i1 cat00.off -i2 cat10.off -d 0 -m 0 -r 0

This should compare the two shapes cat00.off and cat10.off, using
LDSIFT as descriptors, and balanced optimal transport, with no refinement.
Your should find an OT distance of 334.358.


