Method of detecting an image of a grid in a digital image by extracting a number of features from the digital image and classifying extracted features in a classification algorithm, preferably implemented with support vector machines, which is trained with the same training features extracted from a number of reference images.