with each channel being separately computed from the corresponding index from src and the one-
dimensional lookup table.
cv::magnitude()
void cv::magnitude(
cv::InputArray x,
cv::InputArray y,
cv::OutputArray dst
);
cv::magnitude() essentially computes the radial part of a Cartesian-to-polar conversion on a two-
dimensional vector field. In the case of cv::magnitude(), this vector field is expected to be in the
form of two separate single channel arrays. These two input array should have the same size. (If you have a
single two-channel array, cv::split() will give you separate channels.) Each element in dst is
computed from the corresponding elements of x and y as the Euclidian norm of the two (i.e., the square
root of the sum of the squares of the corresponding values).
cv::Mahalanobis()
cv::Size cv::mahalanobis(
cv::InputArray vec1,
cv::InputArray vec2,
cv::OutputArray icovar
);
cvMahalanobis() computes the value:
The Mahalanobis distance is defined as the vector distance measured between a point and the center of a
Gaussian distribution; it is computed using the inverse covariance of that distribution as a metric. See
Figure 3-2. Intuitively, this is analogous to the z-score in basic statistics, where the distance from the center
of a distribution ...