Compare two spectrograms in iOS

I draw spectrograms using the aurio touch code sample provided by apple. Now I want to compare two spectrograms in iOS to make sure they are the same. Can two spectrograms be compared using the Accelerate view?

If possible, does anyone know how to compare two spectrograms? If not, is there any other algorithm or library that iOS can use to compare spectrograms?

+5
source share
3 answers

What you are looking for is called cross-correlation. It is not directly related to spectrograms, but is based on the same mathematics that allows you to draw spectrograms (Fourier transform). Here is the answer to DSP file sharing: How to implement cross-correlation to prove that the two audio files are similar? which covers the basics of implementing this.

+7
source

The frame Acceleratewill only help you with low-level things, such as vector and matrix arithmetic, Fourier transforms, etc. What you need to do is figure out how to compare the two spectrograms (whatever you mean when comparing) with a pencil and paper (or just your head if you're talking about), and then implement it in code using frameworks such as Accelerate.

+2

vDSP has all the building blocks to perform cross-correlation and convolution that you will need to implement.

https://developer.apple.com/library/mac/#documentation/Accelerate/Reference/vDSPRef/Reference/reference.html

+1
source

All Articles