Method for Classifying a Digital Image