Unifying discriminative visual codebook generation with classifier training for object category recognition