Harnessing sparse representation for image restoration and advanced classification with deep dictionary learning