difference measure
#include "dip_math.h"
dip_Error dip_IDivergence ( in1, in2, mask, out )
binary, integer, float
Calculates the I-divergence between each pixel value of in1 and in2. Optionally the mask image can be used to exclude pixels from the calculation by setting the value of these pixels in mask to zero.
The I-Divergence is defined as: I(x,y) = x ln(x/y) - (x - y) and is divied by the number of pixels. It is the -log of a possion distribution p(x,y)=e^(-y)/x!-y^x with the stirling approximation for ln x!. For x=0, the stirling approximation would fail, y is returned.
Data type | Name | Description |
dip_Image | in1 | First input, Data:x |
dip_Image | in2 | Second input, Model:y |
dip_Image | mask | Mask |
dip_Image | out | Output |
Why Least Squares and Maximum Entropy? An axiomatic approach to inference for linear inverse problems , I. Csiszar, The Annals of Statistics, 19, 2032-2066, 1991.
MeanError, MeanSquareError, RootMeanSquareError, MeanAbsoluteError, LnNormError
DIPlib on-line documentation | Function reference | Global function index