Sparse coding and dictionary learning with class-specific group sparsity