MaxDetect
Details and Options

- MaxDetect[image] finds regional maxima.
- An extended maximum is a connected set of pixels with values greater than their surroundings.
- MaxDetect[image,h] effectively chops maxima of height h or less and returns all remaining constant regional maxima.
- MaxDetect[image] is equivalent to MaxDetect[image,0].
- MaxDetect works with binary, grayscale, and other images.
- MaxDetect works with 3D as well as 2D images, and also with data arrays of any rank.
- The following options can be given:
-
CornerNeighbors True whether to include corner neighbors Padding Automatic padding method to use - By default, for images black padding is used, and for data arrays, the minimum possible number is used so that the maxima at the boundary is always detected regardless of the range of data values.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Scope (1)Survey of the scope of standard use cases
Applications (6)Sample problems that can be solved with this function
Find the stars and stripes in the US flag:
In[1]:=1

✖
https://wolfram.com/xid/0pur46hnzq-naitfg
Use MaxDetect and MinDetect to find salt-and-pepper noise:
In[1]:=1

✖
https://wolfram.com/xid/0pur46hnzq-shcowa
In[1]:=1

✖
https://wolfram.com/xid/0pur46hnzq-n29cg
Detect bright stars and use them as a mask for inpainting:
In[1]:=1

✖
https://wolfram.com/xid/0pur46hnzq-im00t
Compute the ultimate erosion of objects in an image:
In[1]:=1

✖
https://wolfram.com/xid/0pur46hnzq-g2xp5w
Detect frequency peaks of a signal:
In[1]:=1

✖
https://wolfram.com/xid/0pur46hnzq-dshz3a
In[2]:=2

✖
https://wolfram.com/xid/0pur46hnzq-l2d8p2
In[3]:=3

✖
https://wolfram.com/xid/0pur46hnzq-wpv3q9
Wolfram Research (2010), MaxDetect, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxDetect.html (updated 2014).
Text
Wolfram Research (2010), MaxDetect, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxDetect.html (updated 2014).
CMS
Wolfram Language. 2010. "MaxDetect." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/MaxDetect.html.
APA
Wolfram Language. (2010). MaxDetect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MaxDetect.html