Class-wise dictionary learning for hyperspectral image classification