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

CrossingDetect[image, delta]
treats values in image that are smaller in absolute value than delta as zero.

Details and OptionsDetails 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 works with images of arbitrary type.
  • CrossingDetect will only find zero crossings when applied to images of type .
  • For color images, CrossingDetect operates on the intensity averaged over all channels.
  • CrossingDetect[m] finds zero crossings in a numerical matrix m, returning a sparse array.
  • CrossingDetect[m, delta] effectively chops values smaller in magnitude than delta.
  • CrossingDetect by default treats all eight pixels surrounding a given pixel as adjacent.
  • The option setting CornerNeighbors->False treats only the four pixels in the coordinate directions as adjacent.
  • 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.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Detect edges by finding zero crossings in a second derivative image:

Click for copyable input

Find a contour line in an elevation raster:

Click for copyable input

Find zero crossings in a matrix:

Click for copyable input
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »