{'fraction_non_alphanumeric': 0.011904761904761904, 'fraction_numerical': 0.0, 'mean_word_length': 5.26595744680851, '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}}
Algorithms for approximating contours by linear sections

The known and newly proposed methods of piecewise-linear approximation of both closed and non-closed contours are investigated. There are considered the methods of contour approximation, which provide a given approximation accuracy in terms of the distance from each pixel of the contour to the corresponding approximating straight line. Two methods for detecting straight lines in a contour image are proposed, having a linear computational complexity that is a multiple of the number of pixels in the contours in a binary image.