peaks2 - find peaks in 2D data without additional toolbox

Find peaks in 2D data just as with Matlab's 'findpeaks' function
686.0 次下载
更新时间 2023/4/12

查看许可证

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.

引用格式

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. 检索来源 .

MATLAB 版本兼容性
创建方式 R2020a
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

启发作品: Mobile Phone Astrometry Explorer

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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