Back to FabImage Library website
You are here: Start » Function Reference » Histogram » Histogram Metrics » HistogramIntersection

HistogramIntersection
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Calculates normalized histogram intersection norm.
Syntax
C++
C#
void fil::HistogramIntersection ( const fil::Histogram& inHistogram1, const fil::Histogram& inHistogram2, double& outHistogramIntersection )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inHistogram1 | const Histogram& | First input histogram | |
![]() |
inHistogram2 | const Histogram& | Second input histogram | |
![]() |
outHistogramIntersection | double& |
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
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty histogram on input in HistogramIntersection. |
DomainError | Input histogram formats are not the same in HistogramIntersection. |
DomainError | Negative value in a histogram in HistogramIntersection. |
See Also
- ImageHistogram – Computes the histogram of the image pixel values.