Binary Image Library
Functions
C:/Users/Malcolm/Documents/temp/binaryimagelibrary/distancetransform.c File Reference
#include <stdlib.h>
#include <math.h>

Functions

float * euclideandistancetransform (unsigned char *binary, int width, int height)
 
int * edt_saito (unsigned char *binary, int width, int height)
 

Detailed Description

Calculates the distance transform of an image using Saito's method

Saito's exact EDT - a Euclidean distance transfrom that returns exact results.

Function Documentation

static int * edt_saito ( unsigned char *  binary,
int  width,
int  height 
)

Distance transform.

Parameters
[in]binary- the binary image
width- image width
height- image height
Returns
Square of Euclidean distance transform.

Final implementation by R. Fabbri, slightly adjusted by Malcolm McLean based on two independent implementations by O. Cuisenaire and J. C. Torelli.

PAPER T. Saito and J.I. Toriwaki, "New algorithms for Euclidean distance transformations of an n-dimensional digitised picture with applications", Pattern Recognition, 27(11), pp. 1551-1565, 1994

A nice overview of Saito's method may be found at: Chapter 2 of "Distance transformations: fast algorithms and applications to medical image processing", Olivier Cuisenaire's Ph.D. Thesis, October 1999, Université catholique de Louvain, Belgium.