Skew detection in document images
Résumé
Skew angle in a document image is estimated using operators known from mathematical morphology. Skew angle in a document image is estimated by run-length smoothing the image and then producing a plurality of eroded run-length-smoothed images. The run-length-smoothed image is eroded using a linear structuring element oriented at each of a plurality of different angles. The angle of the linear structuring element which produces an eroded image having the greatest surface area is designated as the skew angle. A plurality of run-length-smoothed images may be produced, each generated by smoothing the document image using a linear structuring element oriented at a respective different angle. Then each run-length smoothed image is eroded using a linear structuring element oriented at the corresponding angle.