VistaIOZeroCrossings(3) mark zero crossings in an image

SYNOPSIS

#include <vistaio.h>
VistaIOImage VistaIOZeroCrossings (src, dest, band)

VistaIOImage src, dest; VistaIOBand band;

ARGUMENTS

src
Specifies the source image in which zero crossings are to be located.
dest
May specify a destination image to contain the results, or NULL to indicate that a new destination image should be created.
band
May specify a particular band of the source image to be processed, or may be the constant VistaIOAllBands to indicate that all bands of the source image should be processed.

DESCRIPTION

VistaIOZeroCrossings marks the zero crossings of an image. It examines pixels of the source image, src, and sets destination pixels according to whether they correspond to zero crossings. If a destination pixel does not lie on a zero crossing, it is set to zero. If it does, it is set to the gradient of the zero crossing. The gradient is simply computed as the magnitude of the difference between pixels on each side of the zero crossing.

If the dest argument is NULL, VistaIOZeroCrossings creates a destination image with the appropriate properties. Otherwise, dest specifies an existing destination image to be used.

The destination image is smaller than the source image by one row and one column. It has either the same number of bands as the source image (if band is VistaIOAllBands), or a single band (if band specifies a particular band). Its pixel representation depends on that of the source image as defined by the following table:

Source RepresentationDestination Representation

VistaIOBitnot supported
VistaIOUBytenot supported
VistaIOSByteVistaIOUByte
VistaIOShortVistaIOLong
VistaIOLongVistaIOLong
VistaIOFloatVistaIOFloat
VistaIODoubleVistaIODouble

RETURN VALUES

VistaIOZeroCrossings returns the destination image if successful and NULL otherwise.

NOTES

VistaIOZeroCrossings labels the destination image as a gradient image by giving it the attributes ncomponents: 1 and component_interp: gradient.

DIAGNOSTICS

``Band band referenced in image of nbands band(s).''
The band argument is invalid given the number of bands in src.
``Source image has unsigned pixels.''
How can an image of unsigned pixels have zero crossings? Such source images are not supported.
``Destination image has dest_nbands bands; src_nbands expected.''
A destination image was specified but it has the wrong number of bands. If band is VistaIOAllBands, the destination image must have the same number of bands as the source image. Otherwise, it must have a single band.
``Destination image has dest_prop property; src_prop expected.''
Property is one of ``pixels'', ``rows'', or ``columns''. A destination image was specified but it does not have the same pixel representation, number of rows, and number of columns as the source image.

AUTHORS

David Lowe <[email protected]>, Art Pope <[email protected]>

Adaption to vistaio: Gert Wollny <[email protected]>