- 博客(0)
- 收藏
- 关注
C++实现峰值检测,可根据阈值、峰值距离筛选峰值等同于matlab findpeak函数
C++实现峰值检测,可根据阈值、峰值距离筛选峰值等同于matlab findpeak函数
头文件如下
#ifndef __FINDPEAKS__
#define __FINDPEAKS__
#include <vector>
struct peak
{
int index;
float value;
};
bool comparePeaks(const peak& a, const peak& b);
bool compareIndex(const peak& a, const peak& b);
std::vector<peak>findPeaks(const std::vector<float>& src, int distance = 0, float threshold = 0);
#endif
2024-08-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人