Skip to Main Content
Most of the existing algorithms in rectification of geometric distortions in document images are for Latin texts. These algorithms are time consuming and show error for the skew angles greater than 40 degrees. Also they can't remove both skew and perspective simultaneously. In this paper, we propose an algorithm that rectifies perspective and skew in Farsi document images in a wide range of angles with an acceptable accuracy. The proposed algorithm is applied in gray-scale images. First, we use a local thresholding method to extract the binary image adoptively from the degraded gray-scale document image. Then, skew angle of the image is detected and it is rectified by rotation. Finally, we correct perspective in skewed document image with perspective transformation. The proposed algorithm can be applied in Latin and Farsi document images with any skew angles and perspective distortions. The experimental results confirm the effectiveness of the proposed method.