{'fraction_non_alphanumeric': 0.022, 'fraction_numerical': 0.0, 'mean_word_length': 5.809523809523809, '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}}
Perspective Rectification of Document Images Based on Morphology

Documents may suffer from perspective distortion when captured with hand-held digital cameras. A morphology based rectification method is proposed to recover fronto-parallel views of perspectively distorted documents images. Firstly we extend the nearest-neighbor (NN) clustering technique in document skew rectification to locate the horizontal vanishing point of the text plane. Secondly we partition the image into multiple overlapping blocks centered with the centroid of each connected component (CC), and propose a run-length opening algorithm (RLOA) to compute the local orientation of vertical character stroke (VSB), which is used to locate the document's vertical vanishing point. Finally, a three-step hierarchical rectification method is proposed to rectify the distorted images. Experiment results on various types of documents show that the proposed rectification method has achieved accurate recovery of document images