

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 all close allBasic Examples (3)
See Also
Related Guides
History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0)
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
BibTeX
@misc{reference.wolfram_2025_maxdetect, author="Wolfram Research", title="{MaxDetect}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MaxDetect.html}", note=[Accessed: 07-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_maxdetect, organization={Wolfram Research}, title={MaxDetect}, year={2014}, url={https://reference.wolfram.com/language/ref/MaxDetect.html}, note=[Accessed: 07-August-2025]}