This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

ContourDetect

ContourDetect[image]
gives a binary image in which white pixels correspond to the zeros and zero crossings in image.
ContourDetect
treats values in image that are smaller in absolute value than delta as zero.
  • ContourDetect finds pixels with zero value as well as pixels with positive values that have at least one negative neighbor.
  • For color images, ContourDetect operates on the intensity averaged over all channels.
  • ContourDetect[m] finds zeros and zero crossings in a numerical matrix m, returning a sparse array.
  • ContourDetect effectively chops values smaller in magnitude than delta.
  • ContourDetect 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, ContourDetect 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.
Find zeros and zero crossings in a real-valued image:
Find values below a given threshold:
Find zeros and zero crossings in a real-valued image:
In[1]:=
Click for copyable input
Out[1]=
 
Find values below a given threshold:
In[1]:=
Click for copyable input
Out[1]=
Find zeros and zero crossings in a matrix:
Find a thick contour of a blurred object:
This operates on the dual grid:
Find a contour line in an elevation raster:
Find flat regions in an image by detecting the zero contour of its second derivative:
When converting a real-valued image to type "Byte", all negative values will be clipped to zero:
Illustrate the effect of the LoG filter:
New in 8