You are here: Start » AVL.NET » AVL.HistogramIntersection

AVL.HistogramIntersection

Calculates normalized histogram intersection norm.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void HistogramIntersection
(
	AvlNet.Histogram inHistogram1,
	AvlNet.Histogram inHistogram2,
	out float outHistIntersection
)

Parameters

Name Type Range Default Description
inHistogram1AvlNet.HistogramFirst input histogram.
inHistogram2AvlNet.HistogramSecond input histogram.
outHistIntersectionfloat

Description

The operation computes the normalized histogram intersection defined as: \[\frac{ {\sum\limits_{j = 1}^n {\min \left( {inHistogram{1_j},inHistogram{2_j} } \right)} } }{ {\sum\limits_{j = 1}^n {inHistogram{2_j} } } }\]

Remarks

  • Data sets for the input histograms cannot be empty, otherwise an error with appropriate description occurs,
  • inHistogram1 and inHistogram2 must have the same BinSizes, otherwise an error with appropriate description occurs.

Errors

Error type Description
DomainError Input histogram formats are not the same in HistogramIntersection.
DomainError Negative value in a histogram in HistogramIntersection.
DomainError Empty histogram on input in HistogramIntersection.

See also