Objective-C Peak Detection Accelerate Framework

筅森魡賤 提交于 2019-12-04 18:37:55
Tark

So you have a float array of camera light values generated every second that contains 30 samples. You want to know what is the peak value per second? Or ever? To calculate the maximum value in a vector using accelerate you can use the vDSP_maxv function.

Or are you trying to detect all of the peaks above a given threshold per second? In that case you can generate a vector containing the threshold value that is the same length as the vector to search peaks. Then you can use the vDSP_vmax function to find all values above this threshold.

If this is not good enough, there are many more sophisticated techniques for finding peaks in time series, some simple ones are discussed here:

Peak Detection in Time Series

I would probably try something like calculating the gradient and looking for 0 crossings with vDSP_nzcros.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!