CrossingDetect

CrossingDetect[image]

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.

CrossingDetect[array,]

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.

Examples

open allclose all

Basic Examples  (2)

Zero crossings of a list:

Find a contour line in an elevation raster:

Scope  (1)

Find zero crossings of a 2D matrix:

Options  (2)

CornerNeighbors  (2)

Compute the crossing detect using 4- or 8-connectivity:

This operates on the dual grid:

Applications  (2)

Improved edge detection using the product of zero crossings and the first derivative of an image:

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

Properties & Relations  (2)

When computing zero crossing of data arrays, a binary SparseArray is returned:

Use Normal to expand the result:

The zero crossings of a LoG filtered image are closed contours:

Possible Issues  (1)

All data dimensions should be greater than 1 to construct the dual grid using CornerNeighbors->None:

Use CornerNeighborsAutomatic instead:

Wolfram Research (2010), CrossingDetect, Wolfram Language function, https://reference.wolfram.com/language/ref/CrossingDetect.html (updated 2014).

Text

Wolfram Research (2010), CrossingDetect, Wolfram Language function, https://reference.wolfram.com/language/ref/CrossingDetect.html (updated 2014).

CMS

Wolfram Language. 2010. "CrossingDetect." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/CrossingDetect.html.

APA

Wolfram Language. (2010). CrossingDetect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CrossingDetect.html

BibTeX

@misc{reference.wolfram_2024_crossingdetect, author="Wolfram Research", title="{CrossingDetect}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/CrossingDetect.html}", note=[Accessed: 05-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_crossingdetect, organization={Wolfram Research}, title={CrossingDetect}, year={2014}, url={https://reference.wolfram.com/language/ref/CrossingDetect.html}, note=[Accessed: 05-October-2024 ]}