用于查找局部最大值的 AC 库?
我正在尝试编写一个音频分析应用程序,我需要识别代表频谱图的二维数组中的局部最大值。 我已经有了一个开源库,可以使用快速傅里叶变换生成频谱图,但我想知道是否有人知道任何好的库可以帮助我实际找到最大值? 我不太确定要在谷歌上搜索什么——我能想到的最好的就是“数字图书馆”,但这并没有让我走得太远。
最好是用 C 语言,但我愿意接受其他建议。
I'm trying to write an audio analysis application, and I need to identify local maxima in a 2D array which represents a spectrogram. I've already got an open source library that can generate the spectrogram using Fast Fourier Transforms, but I was wondering if anybody knew of any good libraries to help me with actually finding the maxima? I'm not quite sure what to search Google for - the best I could think of was "numerical library" but that hasn't got me very far.
Preferably in C, but I'm open to other suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
寻峰是一个相当普遍的问题。 它已经在 SO 上讨论过一次,称为测量信号的峰值检测。
提供的答案包括几个可行的启发法。
当然,如果您需要严格性,我更喜欢我自己的答案,但ROOT是用 C++ 编写,几乎肯定对您的应用程序来说太重了,因此您需要删除您想要的代码...
Peak finding is a fairly general problem. It has already been discussed once on SO as Peak detection of measured signal.
The answers provided include several viable heuristics.
Of course, I prefer my own answer if you need rigor, but ROOT is written in c++, and is almost certainly too heavy for your application, so you'll need to strip out just the code you want...
GNU 科学图书馆具有一个多维最小化框架,可以很容易地实现最大化。 然而,它的设计目的只是返回一个最小值,而不是一堆不同的最小值。
The GNU Scientific Library features a multidimensional minimization framework that can be made to work for maximization easily enough. It's designed to only return a single minimum rather than a bunch of different minima, however.