Online learning of sparse dictionaries