Detects local maxima (peaks) in a 2D image above a specified intensity threshold, neighborhood, and optionally filters peaks by prominence
Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
A very fast local maxima (peak detector) for 2D images using morphological maximum filtering. Ideal for video analysis when used in a loop.
User can define intensity threshold, local neighborhood and optionally filters peaks by prominence.
USAGE:
Example 1 (defult): locs = Fast_peaks2D(Img, thresh, kernel_size)
Example 2 (with prominence): locs = Fast_peaks2D(Img, thresh, kernel_size, min_prom)
Example 3 (for multiple frames):
locs = [];
for i = 1:numel(img(1,1,:))
li = Fast_peaks2D(img(:,:,i), LAFM_thresh, 1);
li = [li, i*ones(numel(li(:,1)),1)];
locs = [locs; li];
end
INPUTS:
Img - 2D image (grayscale, numeric matrix) for peak detection.
thresh - Intensity threshold; only peaks above this value are considered.
kernel_size - Size of the local neighborhood used for maximum filtering (in pixels).
min_prom - (Optional) Minimum required prominence of peaks. Peaks with lower prominence are discarded.
OUTPUT:
locs - Nx4 array where each row represents a detected peak:
[x_position, y_position, peak_height, prominence]
If min_prom is not provided, prominence is set to zero.
ISSUE: Over picks peaks on featureless or uniform regions
NOTES:
- The function uses morphological maximum filtering and optional prominence filtering.
- Edge pixels (within 2 pixels of the image boundary) are excluded from detection.
- Prominence is computed as the vertical distance to the lowest point along the path to the nearest higher neighboring peak. Prominence calculations slow the code down.
Cita come
George Heath (2026). Very fast 2D local maxima (https://it.mathworks.com/matlabcentral/fileexchange/181437-very-fast-2d-local-maxima), MATLAB Central File Exchange. Recuperato .
Riconoscimenti
Ispirato da: NanoLocz - AFM Image Analysis Platform
Informazioni generali
- Versione 1.0.1 (2,1 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
