A Discriminative Framework for Texture and Object Recognition Using Local Image Features