signal-processing

Swift FFT - Complex split issue

心不动则不痛 提交于 2019-12-03 00:53:13
I am trying to perform FFT on an audio file to find frequency using the Accelerate framework. I have adapted code (probably wrong) from this question: Spectrogram from AVAudioPCMBuffer using Accelerate framework in Swift Although, the magnitudes from ' spectrum ' are either ' 0 ', ' inf ' or ' nan ', and the ' real ' and ' imag ' components of the complex split print similar results; indicating that this is the cause of the problem as: ' magnitude = sqrt(pow( real ,2)+pow( imag ,2) '. Correct me if i'm wrong, but I think the rest of the code is ok. Why am I receiving these results and how can

MATLAB 'spectrogram' params

坚强是说给别人听的谎言 提交于 2019-12-03 00:34:55
问题 I am a beginner in MATLAB and I should perform a spectral analysis of an EEG signal drawing the graphs of power spectral density and spectrogram. My signal is 10 seconds long and a sampling frequency of 160 Hz , a total of 1600 samples and have some questions on how to find the parameters of the functions in MATLAB, including: pwelch (x, window, noverlap, nfft, fs); spectrogram (x, window, noverlap, F, fs); My question then is where to find values ​​for the parameters window and noverlap I do

FFT Pitch Detection for iOS using Accelerate Framework?

家住魔仙堡 提交于 2019-12-03 00:25:34
I have been reading up on FFT and Pitch Detection for a while now, but I'm having trouble piecing it all together. I have worked out that the Accelerate framework is probably the best way to go with this, and I have read the example code from apple to see how to use it for FFTs. What is the input data for the FFT if I wanted to be running the pitch detection in real time? Do I just pass in the audio stream from the microphone? How would I do this? Also, after I get the FFT output, how can I get the frequency from that? I have been reading everywhere, and can't find any examples or explanations

Learning Digital Signal Processing [closed]

我的梦境 提交于 2019-12-03 00:16:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . What are some good resources for learning about DSP (including the mathematics and algorithms necessary for actually understanding these resources)? Let's assume that my math skills are rusty from lack of use as well, so a roadmap along the lines of: Stats refresher Calculus refresher Solid newbie explanation of

Fastest method for calculating convolution

谁说胖子不能爱 提交于 2019-12-03 00:08:49
Anybody know about the fastest method for calculating convolution? Unfortunately the matrix which I deal with is very large (500x500x200) and if I use convn in MATLAB it takes a long time (I have to iterate this calculation in a nested loop). So, I used convolution with FFT and it is faster now. But, I am still looking for a faster method. Any idea? chappjc If your kernel is separable, the greatest speed gains will be realized by performing multiple sequential 1D convolutions. Steve Eddins of MathWorks describes how to take advantage of the associativity of convolution to speed up convolution

iOS - High pass filter equation for accelerometer

好久不见. 提交于 2019-12-02 21:24:52
Could someone explain how one arrives at the equation below for high pass filtering of the accelerometer values? I don't need mathematical derivation, just an intuitive interpretation of it is enough. #define kFilteringFactor 0.1 UIAccelerationValue rollingX, rollingY, rollingZ; - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { // Subtract the low-pass value from the current value to get a simplified high-pass filter rollingX = (acceleration.x * kFilteringFactor) + (rollingX * (1.0 - kFilteringFactor)); rollingY = (acceleration.y *

Cross Correlation and FFT in C# for Voice Authentication

依然范特西╮ 提交于 2019-12-02 21:21:04
问题 This is similar question to the other questions but not a duplicate one. However, I am still not able to get the correct result. I am basically trying to record two Wav files (1 - Base File 2 -Temp File) and then convert that to byte and pass to Aforge FFT and then the Correlation. There are few confusion. When I record the file I am ussing 44100 Khz with 16 bit. Therefore I believe it will return 44100 bytes per second. FFT accepts bytes in power of 2, So I am passing 16384 bytes at a time

Fast 2D convolution for DSP

爷,独闯天下 提交于 2019-12-02 21:14:47
I want to implement some image-processing algorithms which are intended to run on a beagleboard . These algorithms use convolutions extensively. I'm trying to find a good C implementation for 2D convolution (probably using the Fast Fourier Transform). I also want the algorithm to be able to run on the beagleboard's DSP, because I've heard that the DSP is optimized for these kinds of operations (with its multiply-accumulate instruction). I have no background in the field so I think it won't be a good idea to implement the convolution myself (I probably won't do it as good as someone who

Android Accelerometer filtering?

独自空忆成欢 提交于 2019-12-02 20:58:35
I saw many examples about filtering Accelermeter's values, to cancel out the gravity (High-pass filter). But most of them were 1st order one, which is said to be simple, but laggy and not the best one (though I know nothing about the filters or DSP). Somebody in here said that there exists the better solution used in DSP to sense the motion. Regretfully I can't even imagine what it would be, as I am completely outsider to the field. I hope somebody could tell at least the type of filters that can be used when dealing with the sensor. Of course, even brief introduction to the specific algorithm

how to read VBR audio in novacaine (as opposed to PCM)

最后都变了- 提交于 2019-12-02 20:52:36
问题 The creator of novacaine offered example code where audio data is read from a a file and fed to a ring buffer. When the file reader is created though, the output is forced to be PCM: - (id)initWithAudioFileURL:(NSURL *)urlToAudioFile samplingRate:(float)thisSamplingRate numChannels:(UInt32)thisNumChannels { ... // We're going to impose a format upon the input file // Single-channel float does the trick. _outputFormat.mSampleRate = self.samplingRate; _outputFormat.mFormatID =