NAME

centroid - perform threshold operations on image

PROTOTYPE

unitptr centroid( int dx, int dy, unitptr host)

ARGUMENTS

int dx
width in pixels of source image
int dy
height in pixels of source image
unitptr host
host unit for newly created instance

RETURN VALUE:

unitptr u
pointer to newly created unit

INTERFACE OF CREATED UNIT:

X_in[dx*dy]:
(packed input field) pixel values of source image
X_out[2]:
(output field 0) 2d centroid vector

EXECUTION:


    X_out[0] = sum_xy x * X_in(x,y)/sum_xy X_in(x,y)
    X_out[1] = sum_xy y * X_in(x,y)/sum_xy X_in(x,y)

DESCRIPTION:

Creates unit that computes center of gravity X_out of a gray level image of dx*dy pixels at input field X_in.

FILE:

nst_pixel

SEE ALSO:

combine

FILE

/local/homes/rhaschke/nst7/man/../o.linx86//../foldersrc/nst_pixel.c