Object recognition in baggage inspection using adaptive sparse representations of X-ray images