Euclid
Geometry Processing and Shape Analysis in C++
Histogram

Measure histograms. More...

Functions

template<typename DerivedA , typename DerivedB , typename T = typename DerivedA::Scalar, typename = std::enable_if_t<std::is_same_v<typename DerivedA::Scalar, typename DerivedB::Scalar>>>
Euclid::l1 (const Eigen::ArrayBase< DerivedA > &d1, const Eigen::ArrayBase< DerivedB > &d2)
 L1 distance.
 
template<typename DerivedA , typename DerivedB , typename T = typename DerivedA::Scalar, typename = std::enable_if_t<std::is_same_v<typename DerivedA::Scalar, typename DerivedB::Scalar>>>
Euclid::l2 (const Eigen::ArrayBase< DerivedA > &d1, const Eigen::ArrayBase< DerivedB > &d2)
 L2 distance.
 
template<typename DerivedA , typename DerivedB , typename T = typename DerivedA::Scalar, typename = std::enable_if_t<std::is_same_v<typename DerivedA::Scalar, typename DerivedB::Scalar>>>
Euclid::chi2 (const Eigen::ArrayBase< DerivedA > &d1, const Eigen::ArrayBase< DerivedB > &d2)
 Chi-squared distance. More...
 
template<typename DerivedA , typename DerivedB , typename T = typename DerivedA::Scalar, typename = std::enable_if_t<std::is_same_v<typename DerivedA::Scalar, typename DerivedB::Scalar>>>
Euclid::chi2_asym (const Eigen::ArrayBase< DerivedA > &d1, const Eigen::ArrayBase< DerivedB > &d2)
 Asymmetric chi-squared distance. More...
 

Detailed Description

Histograms are commonly used as shape descriptors. This package contains functions to compute distances between histograms.

Function Documentation

template<typename DerivedA , typename DerivedB , typename T = typename DerivedA::Scalar, typename = std::enable_if_t<std::is_same_v<typename DerivedA::Scalar, typename DerivedB::Scalar>>>
T Euclid::chi2 ( const Eigen::ArrayBase< DerivedA > &  d1,
const Eigen::ArrayBase< DerivedB > &  d2 
)

\(D(d_1, d_2) = 2\sum_i \frac{(d1(i) - d2(i))^2}{(d1(i) + d2(i))}\)

template<typename DerivedA , typename DerivedB , typename T = typename DerivedA::Scalar, typename = std::enable_if_t<std::is_same_v<typename DerivedA::Scalar, typename DerivedB::Scalar>>>
T Euclid::chi2_asym ( const Eigen::ArrayBase< DerivedA > &  d1,
const Eigen::ArrayBase< DerivedB > &  d2 
)

\(D(d_1, d_2) = \sum_i \frac{(d1(i) - d2(i))^2}{d1(i)}\)