vdsp

Linear resampling datapoints captured at fluctuating time intervals, to flxed time intervals, in swift

早过忘川 提交于 2019-12-08 04:32:46
问题 I want to linearly interpolate some metrics that are captured at times that fluctuate, to fixed timing intervals. let original_times:[Double] = [0.0,1.3,2.2,3.4,4.2,5.5,6.6,7.2,8.4,9.5,10.0] let metric_1:[Double] = [4,3,6,7,4,5,7,4,2,7,2] let wanted_times:[Double] = [0,1,2,3,4,5,6,7,8,9,10] //linearly resample metric_1 (with corresponding sampling times 'original_times') to fixed time interval times 'wanted_times' Accelerate offers vDSP_vlint but I'm struggling to figure out how to implement

Linear resampling datapoints captured at fluctuating time intervals, to flxed time intervals, in swift

北慕城南 提交于 2019-12-07 00:17:26
I want to linearly interpolate some metrics that are captured at times that fluctuate, to fixed timing intervals. let original_times:[Double] = [0.0,1.3,2.2,3.4,4.2,5.5,6.6,7.2,8.4,9.5,10.0] let metric_1:[Double] = [4,3,6,7,4,5,7,4,2,7,2] let wanted_times:[Double] = [0,1,2,3,4,5,6,7,8,9,10] //linearly resample metric_1 (with corresponding sampling times 'original_times') to fixed time interval times 'wanted_times' Accelerate offers vDSP_vlint but I'm struggling to figure out how to implement it for my application. func vDSP_vlint(_ __A: UnsafePointer<Float>, _ __B: UnsafePointer<Float>, _ __IB

C versus vDSP versus NEON - How could NEON be as slow as C?

戏子无情 提交于 2019-12-05 19:44:18
How could NEON be as slow as C? I have been trying to build a fast Histogram function that would bucket incoming values into ranges by assigning them a value - which is the range threshold they are closest to. This is something that would be applied to images so it would have to be fast (assume an image array of 640x480 so 300,000 elements) . The histogram range numbers are multiples (0,25,50,75,100) . Inputs would be float and final outputs would obviously be integers I tested the following versions on xCode by opening a new empty project (no app delegate) and just using the main.m file. I

Fast Fourier transforms on GPU on iOS

£可爱£侵袭症+ 提交于 2019-12-05 05:18:00
I am implementing compute intensive applications for iOS (i.e., iPhone or iPad) that heavily use fast Fourier transforms (and some signal processing operations such as interpolations and resampling). What are the best libraries and API that allows for running FFTs on iOS? I have briefly looked into Apple Metal as well as Apple vDSP. I wasn't sure that vDSP utilizes GPUs although it seems to be highly parallelized and utilizes SIMD. Metal seems to allow to access GPU for compute intensive apps, but I am not able to find libraries for FFT and basic signal processing operations (something like

iOS FFT Draw spectrum

寵の児 提交于 2019-12-03 03:20:08
问题 I've read these question: Using the Apple FFT and Accelerate Framework How do I set up a buffer when doing an FFT using the Accelerate framework? iOS FFT Accerelate.framework draw spectrum during playback They all describe how to setup fft with the accelerate framework. With their help I was able to setup fft and get a basic spectrum analyzer. Right now, I'm displaying all values I got from the fft. However, I only want to show 10-15, or a variable number, of bars respreseting certain

iOS FFT Draw spectrum

左心房为你撑大大i 提交于 2019-12-02 16:52:16
I've read these question: Using the Apple FFT and Accelerate Framework How do I set up a buffer when doing an FFT using the Accelerate framework? iOS FFT Accerelate.framework draw spectrum during playback They all describe how to setup fft with the accelerate framework. With their help I was able to setup fft and get a basic spectrum analyzer. Right now, I'm displaying all values I got from the fft. However, I only want to show 10-15, or a variable number, of bars respreseting certain frequencies. Just like the iTunes or WinAmp Level Meter. 1. Do I need to average magnitude values from a range

Using IOS Accelerate Framework for 2D Signal Processing on Non-Power-of-Two images?

左心房为你撑大大i 提交于 2019-11-28 23:29:42
//EDIT... I'm editing my question slightly to address the issue of working specifically with non-power-of-two images. I've got a basic structure that works with square grayscale images with sizes like 256x256 or 1024x1024, but can't see how to generalize to arbitrarily sized images. The fft functions seem to want you to include the log2 of the width and height, but then its unclear how to unpack the resulting data, or if the data isn't just getting scrambled. I suppose the obvious thing to do would be to center the npot image within a larger, all black image and then ignore any values in those

Cepstral Analysis for pitch detection

柔情痞子 提交于 2019-11-28 02:55:50
I'm looking to extract pitches from a sound signal. Someone on IRC just explained to me how taking a double FFT achieves this. Specifically: take FFT take log of square of absolute value (can be done with lookup table) take another FFT take absolute value I am attempting this using vDSP I can't understand how I didn't come across this technique earlier. I did a lot of hunting and asking questions; several weeks worth. More to the point, I can't understand why I didn't think of it. I am attempting to achieve this with vDSP library. It looks as though it has functions to handle all of these

Using IOS Accelerate Framework for 2D Signal Processing on Non-Power-of-Two images?

て烟熏妆下的殇ゞ 提交于 2019-11-27 14:48:35
问题 //EDIT... I'm editing my question slightly to address the issue of working specifically with non-power-of-two images. I've got a basic structure that works with square grayscale images with sizes like 256x256 or 1024x1024, but can't see how to generalize to arbitrarily sized images. The fft functions seem to want you to include the log2 of the width and height, but then its unclear how to unpack the resulting data, or if the data isn't just getting scrambled. I suppose the obvious thing to do

Cepstral Analysis for pitch detection

牧云@^-^@ 提交于 2019-11-27 05:02:28
问题 I'm looking to extract pitches from a sound signal. Someone on IRC just explained to me how taking a double FFT achieves this. Specifically: take FFT take log of square of absolute value (can be done with lookup table) take another FFT take absolute value I am attempting this using vDSP I can't understand how I didn't come across this technique earlier. I did a lot of hunting and asking questions; several weeks worth. More to the point, I can't understand why I didn't think of it. I am