Weight-based sparse coding for multi-shot person re-identification