gives a binary image in which white pixels correspond to the zero crossings in image.


treats values in image that are smaller in absolute value than delta as zero.


gives a binary sparse array in which 1 corresponds to zero crossings in array.

Details and Options

  • CrossingDetect finds pixels with positive values that have at least one negative neighbor.
  • CrossingDetect is typically used in edge-detection algorithms based on second derivatives.
  • CrossingDetect will only find zero crossings when applied to images of a real type.
  • For color images, CrossingDetect operates on the intensity averaged over all channels.
  • CrossingDetect works with 3D as well as 2D images, and also with arrays of rank 1, 2, or 3.
  • CrossingDetect takes a CornerNeighbors option. The default setting is CornerNeighbors->True.
  • Using the option setting CornerNeighbors->None, CrossingDetect operates on the dual grid whose pixels correspond to the corners in the original image, thereby reducing the dimensions of the resulting image by one pixel.


open all close all

Basic Examples  (2)

Zero crossings of a list:

Click for copyable input

Find a contour line in an elevation raster:

Click for copyable input

Scope  (1)

Options  (2)

Applications  (2)

Properties & Relations  (2)

Possible Issues  (1)

Introduced in 2010
Updated in 2014