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

NeighbourListMakeChamfer

Get list of neighbours based on Chamfer metric

SYNOPSIS

#include "dip_neighbourlist.h"

dip_Error dip_NeighbourListMakeChamfer ( pixelsize, maxdistance, coords, distance, resources )

FUNCTION

A list coords is created with the relative coordinates to the neighbours of a pixel in an pixelsize->size-dimensional image. Here, neighbours are all pixels within a maxdistance distance. pixelsize gives the size of a pixel, and hence controls the size of the neighbourhood with maxdistance. Anisotropic pixel grids are supported. distance contains the distance to each of the neighbours in coords.

Distances between two pixels are taken to be the Euclidean distance. There are better metrics described in the literature for small neighbourhoods, that yield a more isotropic measure when compounded over longer distances. These are not implemented in this function.

coords and distance are allocated and tracked in resources.

ARGUMENTS

Data typeNameDescription
dip_FloatArraypixelsizePhysical dimensions of the pixels
dip_intmaxdistanceMaximum distance to which select neighbours
dip_CoordinateArray *coordsOutput neighbour coordinates
dip_FloatArray *distanceOutput distances to neighbours
dip_ResourcesresourcesResources tracking structure. See ResourcesNew

SEE ALSO

NeighbourListMake, NeighbourListMakeChamfer, NeighbourListMakeImage, NeighbourListToIndices, NeighbourIndicesListMake

DIPlib on-line documentation | Function reference | Global function index