{'fraction_non_alphanumeric': 0.023166023166023165, 'fraction_numerical': 0.019305019305019305, 'mean_word_length': 4.51595744680851, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Pixel Probability Based Estimation of Skew Angle for Text Images

The document reader reads the data from text document image for optical character recognition. If the image is rotated, it will not work properly. Some document images have a few degree of skew angle which creates difficulties in many other applications, so it is necessary to find out the skew angle of the digitalized document. This paper proposed an algorithm to automatically determine the skew angle of a text document image and produce a de-skewed image. The algorithm is based on the ratio of probability of the two binary pixels with the fact that rotated image matrix has higher order as compared to original image matrix and the ratio of probability of black pixels and white pixels changes. The algorithm is tested on more than 525 images taken from the IAM handwriting database [9] and on images generated by our self, for skew angle from -45° to +45° with 0.1° angle increment and found good angle estimation with mean error -0.0667° and variance = 1.3165°.