Learning by correlation for computer vision applications: from Kernel methods to deep learning