This is a minor change version of the original histogram of sparse codes code