---
name: "VistaIOZeroCrossings"
section: "3"
platform: "linux"
package: "libvistaio-dev"
version: "1.2.19-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/VistaIOZeroCrossings"
---

# VistaIOZeroCrossings(3)

mark zero crossings in an image

## NAME

VistaIOZeroCrossings - 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 Representation | Destination Representation |
| **VistaIOBit** | *not supported* |
| **VistaIOUByte** | *not supported* |
| **VistaIOSByte** | **VistaIOUByte** |
| **VistaIOShort** | **VistaIOLong** |
| **VistaIOLong** | **VistaIOLong** |
| **VistaIOFloat** | **VistaIOFloat** |
| **VistaIODouble** | **VistaIODouble** |

## RETURN VALUES

**VistaIOZeroCrossings returns the destination image if successful and**  **NULL** **otherwise.**

## SEE ALSO

**VistaIOCanny**(3), **VistaIOLinkImage**(3), [**VistaIOImage**(3)](/VistaIOImage/3.md),

## 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 \<lowe@cs.ubc.ca\>, Art Pope \<pope@cs.ubc.ca\>**

**Adaption to vistaio: Gert Wollny \<gw.fossdev@gmail.com\>**
