The executable reads an input file, performs tensor voting with the user-defined
value for sigma2 and writes the resulting tensors to the output file.
The syntax is:
VotingND infile outfile sigma2
The input file is a text file that begins with an unsigned integer that
specifies the dimensionality of the space, followed by a list of un-oriented
points or tensors, or a mixture of both. An un-oriented point is represented by
its coordinates followed by a 0, such that a file containing un-oriented points
would look like this:
x1_1 x1_2 … x1_N 0
x2_1 x2_2 … x2_N 0
xM_1 xM_2 … xM_N 0
Where xi are the M points and xi_j, j=1..N are the coordinates of each point.
The number of points does not need to be specified. The points are encoded as
unit ball tensors with all eigenvalues equal to one and an orthonormal set of
Alternatively, one can input points with orientation information in the form
of tensors. In this case, the coordinates are followed by a 1 to indicate that
the point is associated with a tensor. Following the 1, the input file contains
the eigenvalues of the tensor in decreasing order and then the eigenvectors
starting from the one corresponding to the maximum eigenvalue. The input file
should be in the following form:
x1_1 x1_2 … x1_N 1
lambda1_1 lambda1_2… lambda1_N
e1_11 e1_12 … e1_1N
e1_N1 e1_N2 … e1_NN
xM_1 xM_2 … xM_N 1
lambdaM_1 lambdaM_2… lambdaM_N
eM_11 eM_12 … eM_1N
eM_N1 eM_N2 … eM_NN
Line feeds are actually ignored. They are included here for clarity. Also,
the code can read the 0 or 1 index in integer or floating form. If one wishes to
compute saliency values at locations that do not participate in the computation,
these should be associated with zero ball tensors. Such tensors have to be
provided in the second format as tensors with all eigenvalues equal to zero.
The output file is also a text file that contains the tensors accumulated
after voting at the input positions. It is always in the second format. It can
be used directly as input for a second pass of tensor voting, if so desired.
The final parameter is the square of the scale of the voting field which
effectively determines the size of the voting neighborhood and the degree of
smoothness. The scale should be set according to the dimensions of the input
space. A scale below 1.0 would probably result in no information propagation in
a space where the average distance between points is more than 10 units of
Since Euclidean distances are used when computing the magnitude of the votes
that are cast from point to point, the input coordinates may need to be scaled
in a way that ensures that the Euclidean distances between points are
meaningful. This functionality is not provided since it is problem-dependent.
Note: Our software contains the Approximate Nearest Neighbor (ANN) k-d tree
library (release 0.1) of the University of Maryland and Sunil Arya and David
Mount. We are grateful to the authors for making their software publicly
available. The license agreement of the ANN library is the following:
Copyright (c) 1997-1998 University of Maryland and Sunil Arya and David
Mount. All Rights Reserved.
This software and related documentation is part of the Approximate Nearest
Neighbor Library (ANN).
Permission to use, copy, and distribute this software and its documentation
is hereby granted free of charge, provided that:
(1) it is not a component of a commercial product, and
(2) this notice appears in all copies of the software and related documentation.
The University of Maryland (U.M.) and the authors make no representations
about the suitability or fitness of this software for any purpose. It is
provided "as is" without express or implied warranty.