Performs a principal component analysis (PCA) on a set of head-related transfer functions (HRTFs). It's set up to reconstruct 128-pt HRTF's from the UC Davis CIPIC dataset from 1 (128x data reduction) base to 128 bases (no data reduction), but you can change the code to accommodate different FFT sizes, databases, decompositions, etc.
- Download this repository.
- Download the CIPIC dataset from the UC Davis website. Navigate to the "Full Database Download" section and download the .zip file (~170MB).
- Unzip the file into the repository.
- Make sure the HRTF directory paths point to the "standard_hrir_database/" folder in the CIPIC dataset. This needs to be checked in project_run.m (line 9, input.directory) and hrtf_load.m (line 12, input.dir).
- Run run_project.m and resolve any runtime fixes that I may have forgotten.
Note: This project takes a while to run. It took about 10 minutes in total, of which 7 minutes were spent reconstructing the HRTFs and calculating loss functions, on my personal laptop (Intel i5-5300 4CPU @ 2.30GHz; 12GB RAM). It also spits out five plot figures.
Note: There is functionality to load the anthropomorphic data from CIPIC, but it is not used in the project.
My write-up could be found in this repo. It explains the photos below.