Building descriptive and discriminative visual codebook for large-scale image applications