1. A method of processing data comprised in a digital input image by a processor, said method comprising the acts of: calculating a first discrete transform of a first data set by the processor; calculating a second discrete transform of a second data set adjacent to the first set by the processor; calculating an overall discrete transform of a data set corresponding to the concatenation of the first and the second set by the processor; determining a predicted maximum frequency based on the transformed data resulting from the first transform and the second transform by the processor and based on a threshold value, wherein the threshold value is a function of a number of pixels belonging to the first data set and the second data set; determining a real maximum frequency based on the transformed data resulting from the overall transform by the processor; and detecting a grid by a comparison between the real maximum frequency and the predicted maximum frequency for a portion of the digital input image.