peaks2 - find peaks in 2D data without additional toolbox

Find peaks in 2D data just as with Matlab's 'findpeaks' function
686 téléchargements
Mise à jour 12 avr. 2023

Afficher la licence

Fast and effective 2D peak finding algorithm returning peak locations and values. Accepts 2D arrays as an input (for instance, image acquired with a camera from some optics experiment). Various filters can be selected such as the minimal absolute value or threshold above the immediate surroundings etc.
It mimicks the same syntax as Matlab's own 'findpeaks' function but does not require any additional Matlab toolbox, just the base program.
MinPeakHeight, Threshold and MinPeakDistance parameters are accepted, just like in the original 'findpeaks' function:
● MinPeakHeight simply filters out those peaks lower than this absolute value;
● Threshold only retains those peaks higher than its immediate neighbors by the specified threshold value;
● MinPeakDistance specifies the minimal Cartesian circle around which weaker peaks are 'shadowed' and removed;
● as of this moment, peak prominence is not implemented yet.
The idea behind the algorithm is simple yet effective. The 2D peak finding algorithm works by comparing each point to its immediate surroudings (all 8 points around: left, rihgt, top, bottom etc.) in an vectorised fashion. This guarantees minimal execution time. A point is considered as a peak if it is strictly greater than its immediate neighbors all around.

Citation pour cette source

Kristupas Tikuišis (2024). peaks2 - find peaks in 2D data without additional toolbox (https://www.mathworks.com/matlabcentral/fileexchange/113225-peaks2-find-peaks-in-2d-data-without-additional-toolbox), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2020a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Remerciements

A inspiré : Mobile Phone Astrometry Explorer

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.1.3

In the new MinPeakDistance filter, the final peak list was not updated. Now corrected.

1.1.2

Minimal polishing of the description

1.1.1

The code cleaned a bit, no other real changes

1.1

MinPeakDistance functionality added

1.0.3

Updated image

1.0.2

Updated description

1.0.1

I simply updated the description of the function, as well as proper tagging. No code change this time.

1.0.0