A method for aligning a camera sensor by a user to significant data which is text data or barcode lines to be recognized comprising the steps of: a) capturing an image of the significant data by means of the camera sensor; b) adapting contrast, compensating shade and processing an adaptive binarization of the image to obtain an artifact reduced image; c) edge and line filtering of the artifact reduced image to obtain an edge and line enhanced image; d) processing a transformation of the edge and line enhanced image by means of a robust algorithm for predominant alignment line angle detection of the significant data contained in the image in respect to a horizontal line of the camera sensor, such as to obtain a predominant alignment line, the predominant alignment line angle representing the inclination of the predominant alignment line in respect to the horizontal line; e) determining image sections which contain most likely significant data lines, comprising the following sub-steps: - detecting significant data lines which are substantially in alignment with the predominant alignment line; - determining distances between adjacent significant data lines; and - determining the image sections with equally distant adjacent significant data lines; f) selecting a representative image section of the determined image sections with the highest likelihood of containing significant data; g) generating an user feedback signal dependent on the predominant alignment line angle; h) capturing a following image of the significant data by means of the camera sensor; i) detecting and tracking the representative image section within the following image; j) determining the predominant alignment line angle from the representative image section in the following image by applying steps b) to d), and g). a) capturing an image of the significant data by means of the camera sensor; b) adapting contrast, compensating shade and processing an adaptive binarization of the image to obtain an artifact reduced image; c) edge and line filtering of the artifact reduced image to obtain an edge and line enhanced image; d) processing a transformation of the edge and line enhanced image by means of a robust algorithm for predominant alignment line angle detection of the significant data contained in the image in respect to a horizontal line of the camera sensor, such as to obtain a predominant alignment line, the predominant alignment line angle representing the inclination of the predominant alignment line in respect to the horizontal line; e) determining image sections which contain most likely significant data lines, comprising the following sub-steps: - detecting significant data lines which are substantially in alignment with the predominant alignment line; - determining distances between adjacent significant data lines; and - determining the image sections with equally distant adjacent significant data lines; - detecting significant data lines which are substantially in alignment with the predominant alignment line; - determining distances between adjacent significant data lines; and - determining the image sections with equally distant adjacent significant data lines; f) selecting a representative image section of the determined image sections with the highest likelihood of containing significant data; g) generating an user feedback signal dependent on the predominant alignment line angle; h) capturing a following image of the significant data by means of the camera sensor; i) detecting and tracking the representative image section within the following image; j) determining the predominant alignment line angle from the representative image section in the following image by applying steps b) to d), and g).