Find Local Maxima
Find local maxima in matrices
Libraries:
Computer Vision Toolbox /
Statistics
Description
The Find Local Maxima block finds the local maxima in a given input matrix. The block finds the local maxima of values within a region specified by the neighborhood size. The block compares the values in the search region to a user-specified threshold and identifies a value that is greater than or equal to the threshold as the local maximum. After finding the local maximum, the block sets all the matrix values in the neighborhood, including the maximum value, to zero. This step ensures that subsequent searches do not include this maximum. The process repeats until the block either finds all valid maxima or the specified number of local maxima.
The threshold and the neighborhood size must be chosen such that the block detects only the true local maxima and eliminates false peaks.
The input to this block can also be a Hough matrix generated from the Hough Transform block. The Find Local Maxima block outputs the one-based [x y] coordinates of the detected local maxima. The data sent to all input ports must be the same data type.
Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Extended Capabilities
Version History
Introduced before R2006a