Function opencv::core::mahalanobis
source · pub fn mahalanobis(
v1: &dyn ToInputArray,
v2: &dyn ToInputArray,
icovar: &dyn ToInputArray
) -> Result<f64>
Expand description
Calculates the Mahalanobis distance between two vectors.
The function cv::Mahalanobis calculates and returns the weighted distance between two vectors:
The covariance matrix may be calculated using the #calcCovarMatrix function and then inverted using
the invert function (preferably using the #DECOMP_SVD method, as the most accurate).
Parameters
- v1: first 1D input vector.
- v2: second 1D input vector.
- icovar: inverse covariance matrix.