[][src]Function opencv::imgproc::compare_hist

pub fn compare_hist(
    h1: &dyn ToInputArray,
    h2: &dyn ToInputArray,
    method: i32
) -> Result<f64>

Compares two histograms.

The function cv::compareHist compares two dense or two sparse histograms using the specified method.

The function returns inline formula .

While the function works well with 1-, 2-, 3-dimensional dense histograms, it may not be suitable for high-dimensional sparse histograms. In such histograms, because of aliasing and sampling problems, the coordinates of non-zero histogram bins can slightly shift. To compare such histograms or more general sparse configurations of weighted points, consider using the #EMD function.

Parameters

  • H1: First compared histogram.
  • H2: Second compared histogram of the same size as H1 .
  • method: Comparison method, see #HistCompMethods