DIPlib Documentation - ©1995-2013 Quantitative Imaging Group, Delft University of Technology.

# ProbabilisticPairCorrelation

Compute the probabilistic pair correlation function

## SYNOPSIS

`#include "dip_analysis.h"`

dip_Error dip_ProbabilisticPairCorrelation ( phases, mask, dist, probes, length, sampling, covariance )

## DATA TYPES

float

## FUNCTION

This function computes the probabilistic pair correlation function of the different phases in `phases`. Each image in the image array `phases` is treated as a separate phase. The function assumes, but does not check, that the values in these images are with the [0 1] range. Optionally a `mask` image can be provided to select which pixels in `object` should be used to compute the pair correlation. The `probes` variable specifies how many random point pairs should be drawn to compute the function. `Length` specifies the maximum correlation length. The correlation function can be computed using a random (`DIP_CORRELATION_ESTIMATOR_RANDOM`) or grid method (`DIP_CORRELATION_ESTIMATOR_GRID`), as specified by `sampling`. Finally `covariance` determines whether only the correlations (`DIP_FALSE`) or the covarianances (`DIP_TRUE`) have to be computed.

## ARGUMENTS

Data type | Name | Description
`dip_ImageArray` | `phases` | Phase image array
`dip_Image` | `mask` | Mask image
`dip_Distribution` | `dist` | Ouput distribution
`dip_int` | `probes` | Number of probes
`dip_int` | `length` | Maximum chord length
`dipf_CorrelationEstimator` | `sampling` | Samplings method
`dip_Boolean` | `covariance` | Compute covariance

## SEE ALSO

`PairCorrelation`, `ChordLength`