1. Method for geometrical transformation of a deformed image comprising text by searching text-lines in the image, comprising the steps of: a) performing an initial analysis to evaluate if there is enough text-like structures in the image to perform the transformation, b) identifying connected pixels probably forming characters, and identifying words and c) based on the transformation points, transforming the image or a part of the image comprising the text to an image where the text lines are straight and parallel, wherein the transformation points are identified as intersections between staff lines and connected pixels.