(matt): need to pass RC mapping as parameter
(matt): need to pass in frequency as a parameter
(Matt) make perc configurable
Matt Perform foreground/background clustering with k-means