37 #include <Eigen/Eigenvalues> 61 using Tensor = Eigen::Matrix<T, 3, 3>;
63 using Field = Eigen::Matrix< Tensor, Eigen::Dynamic, 1>;
64 using Tensors = Eigen::Matrix< Tensor, Eigen::Dynamic, 1>;
77 enum Encoding : std::uint8_t {
ZERO,
UBALL,
BALL,
SBALL,
UPLATE,
PLATE,
SPLATE,
USTICK,
STICK,
SSTICK,
AWARE_TENSOR};
123 void ballVote(
const DP& pts,
bool doKnn =
true);
127 void cfvote(
const DP& pts,
bool doKnn =
true);
151 return std::pow(std::cos(theta), 8);
159 static inline T diabolo(
const T s,
const T c,
const T k,
const T sigma)
169 static inline T eta(
const T vv,
const T sigma,
const T vvn)
171 return cij(vv, sigma) * (1. - vvn * vvn);
174 static inline T cij(
const T vv,
const T sigma)
176 return std::exp(-
std::pow(vv, 2) / sigma);
static T radial(const T z)
constexpr T pow(const T base, const std::size_t exponent)
static const char encoding[]
void stickVote(const DP &pts, bool doKnn=true)
typename NNS::IndexMatrix IndexMatrix
void encode(const DP &pts, Encoding encoding=Encoding::UBALL)
TensorVoting(T sigma_=T(0.2), std::size_t k_=50)
Eigen::Matrix< T, 3, 3 > Matrix33
PM::DataPoints DataPoints
Eigen::Matrix< SparseTensor, Eigen::Dynamic, 1 > SparseTensors
void plateVote(const DP &pts, bool doKnn=true)
Eigen::Matrix< Tensor, Eigen::Dynamic, 1 > Field
typename PM::Vector Vector
static T angular(const T theta)
SparseTensors sparsePlate
typename PM::Matrix Matrix
static T eta(const T vv, const T sigma, const T vvn)
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
void refine(const DP &pts)
void disableBallComponent()
typename DP::InvalidField InvalidField
SparseTensors sparseStick
Eigen::Matrix< T, 3, 3 > Tensor
Functions and classes that are dependant on scalar type are defined in this templatized class...
Eigen::Matrix< Index, Eigen::Dynamic, Eigen::Dynamic > IndexMatrix
Eigen::Matrix< Tensor, Eigen::Dynamic, 1 > Tensors
Eigen::Matrix< T, 4, 1 > SparseTensor
static T sradial(const T z)
static T cij(const T vv, const T sigma)
Eigen::Matrix< T, 3, 1 > Vector3
void cfvote(const DP &pts, bool doKnn=true)
An exception thrown when one tries to access features or descriptors unexisting or of wrong dimension...
typename PM::DataPoints DP
static T diabolo(const T s, const T c, const T k, const T sigma)
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector over ScalarType.
typename NNS::Index Index
void computeKnn(const DP &pts)
void vote(const DP &pts)
Voting methods.
void ballVote(const DP &pts, bool doKnn=true)