The correlation method for image recognition