A robust sparse representation algorithm based on adaptive joint dictionary