K means filters are working

Also adding some helper functions from CCRNN codes and nyu toolbox