DS_FIND_CENTROID(3)

EXPERIMENTAL_FUNC
ds_find_centroid - Find the centroid inside an ellipse.

SYNOPSIS
#include <karma_ds.h>

flag ds_find_centroid

(CONST char *image, unsigned int type, double *background, flag *inverted, uaddr xlen, CONST uaddr *xoffsets, double *xpos, uaddr xradius, uaddr ylen, CONST uaddr *yoffsets, double *ypos, uaddr yradius)

DESCRIPTION
This routine will search for the centroid of an object inside a specified ellipse. The background (median) value is computed for an annulus outside the ellipse. The annulus is 10% larger than the ellipse.

image
    The image data.

type
    The type of the image data.

background
    The background value is written here. This may be NULL.

inverted
    The value TRUE will be written here if the image values are inverted (i.e. the object of interested is in a local minimum rather than a maximum).

xlen
    The horizontal image width.

xoffsets
    The array of horizontal byte offsets

xpos
    The horizontal data pixel position. The original value must be a reasonable approximation. This is modified to the centroid position.

xradius
    The horizontal radius of the ellipse.

ylen
    The vertical image width.

yoffsets
    The array of vertical byte offsets

ypos
    The vertical data pixel position. The original value must be a reasonable approximation. This is modified to the centroid position.

yradius
    The vertical radius of the ellipse.

RETURN VALUE
TRUE on succes, else FALSE.

Multi-threading Level
Unsafe.

NOTE
(0.0, 0.0) corresponds to the centre of the first pixel.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/