1. A method providing geometrical transformation of a deformed image comprising text by searching text-lines in the image, comprising the steps of: a) performing an initial analysis evaluating if there are enough text-like structures in the image to perform the transformation; b) identifying connected pixels probably forming characters, and identifying words constituted by the identified connected pixels, identifying a probable local text line direction through each respective identified word; and listing the probable words in a table wherein respective entries of each identified word are associated with their respective positions in the deformed image of the text; and c) identifying transformation points as intersections between staff lines and connected pixels, wherein the staff lines are following the respective local text line directions of each respective identified word in the table, transforming the deformed image into an image where the text lines are straight and parallel.