IARRAY_FIND_CENTROID(3)

EXPERIMENTAL_FUNC
iarray_find_centroid - Find the centroid inside an ellipse.

SYNOPSIS
#include <karma_iarray.h>

flag iarray_find_centroid

(iarray array, double *background, flag *inverted, double *xpos, uaddr xradius, double *ypos, uaddr yradius)

DESCRIPTION
This routine will search for the centroid of an object inside a specified ellipse.

array
    The Intelligent Array.

inverted
    If TRUE the algorithms should search for a minimum, rather than a maximum.

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).

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.

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/