Object Recognition in X-ray Testing Using Adaptive Sparse Representations