Start » Filter Reference » Histogram » Histogram Metrics » HistogramDistance
Module: | FoundationBasic |
---|
Computes the numeric distance between two histograms.
Name | Type | Description | |
---|---|---|---|
inHistogram1 | Histogram | First input histogram | |
inHistogram2 | Histogram | Second input histogram | |
inDistanceMeasure | DistanceMeasure | Measure of distance | |
outDistance | Double | Output distance value |
Description
The operation computes the approximate difference between two histograms using the selected distance measure.
- If the inDistanceMeasure is set to MeanError then the resulting outDistance is the average difference between corresponding bins of the histograms.
- If the inDistanceMeasure is set to MeanSquaredError then the resulting outDistance is the average squared difference between corresponding bins of the histograms.
Examples
Remarks
- inHistogram1 and inHistogram2 must have the same BinSizes, otherwise an error with appropriate description occurs.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty histograms on input in HistogramDistance. |
DomainError | Inconsistent histogram bin sizes / domains in HistogramDistance. |
DomainError | Not supported DistanceMeasure in HistogramDistance. |
Complexity Level
This filter is available on Basic Complexity Level.
See Also
- ImageHistogram – Computes the histogram of the image pixel values.