Bag-of-features method for object recognition