Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

deltametric

Delta Metric


Description

Computes the discrepancy between two sets A and B according to Baddeley's delta-metric.

Usage

deltametric(A, B, p = 2, c = Inf, ...)

Arguments

A,B

The two sets which will be compared. Windows (objects of class "owin"), point patterns (objects of class "ppp") or line segment patterns (objects of class "psp").

p

Index of the L^p metric. Either a positive numeric value, or Inf.

c

Distance threshold. Either a positive numeric value, or Inf.

...

Arguments passed to as.mask to determine the pixel resolution of the distance maps computed by distmap.

Details

Baddeley (1992a, 1992b) defined a distance between two sets A and B contained in a space W by

Δ(A,B) = [ (1/|W|) * integral of |min(c, d(x,A))-min(c, d(x,B))|^p dx ]^(1/p)

where c ≥ 0 is a distance threshold parameter, 0 < p ≤ Inf is the exponent parameter, and d(x,A) denotes the shortest distance from a point x to the set A. Also |W| denotes the area or volume of the containing space W.

This is defined so that it is a metric, i.e.

  • Δ(A,B)=0 if and only if A=B

  • Δ(A,B)=Δ(B,A)

  • Δ(A,C) ≤ Δ(A,B) + Δ(B,C)

It is topologically equivalent to the Hausdorff metric (Baddeley, 1992a) but has better stability properties in practical applications (Baddeley, 1992b).

If p=Inf and c=Inf the Delta metric is equal to the Hausdorff metric.

The algorithm uses distmap to compute the distance maps d(x,A) and d(x,B), then approximates the integral numerically. The accuracy of the computation depends on the pixel resolution which is controlled through the extra arguments ... passed to as.mask.

Value

A numeric value.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

References

Baddeley, A.J. (1992a) Errors in binary images and an L^p version of the Hausdorff metric. Nieuw Archief voor Wiskunde 10, 157–183.

Baddeley, A.J. (1992b) An error metric for binary images. In W. Foerstner and S. Ruwiedel (eds) Robust Computer Vision. Karlsruhe: Wichmann. Pages 59–78.

See Also

Examples

X <- runifrect(20)
  Y <- runifrect(10)
  deltametric(X, Y, p=1,c=0.1)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.