Skip to content

Performs a principal component analysis (PCA) on a set of head-related transfer functions (HRTFs).

License

Notifications You must be signed in to change notification settings

alextongue/hrtf-pca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HRTF PCA

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.

Instructions

  1. Download this repository.
  2. Download the CIPIC dataset from the UC Davis website. Navigate to the "Full Database Download" section and download the .zip file (~170MB).
  3. Unzip the file into the repository.
  4. 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).
  5. 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.

Pictures

My write-up could be found in this repo. It explains the photos below.

Some ITD and IID slices

Preprocessing done to HRTF's (colloquially Directional Transfer Functions, or DTFs

Covariance and correlation matrices of the mean-subtracted HRTFs

The first five orthogonal bases that can be used to decompose HRTFs

A reconstruction of an HRTF and loss functions

About

Performs a principal component analysis (PCA) on a set of head-related transfer functions (HRTFs).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages