{'fraction_non_alphanumeric': 0.01517706576728499, 'fraction_numerical': 0.003372681281618887, 'mean_word_length': 5.416216216216216, '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}}
A new approach for fast line detection based on combinatorial optimization

In this paper we present a new algorithm for detecting lines in digital images. The algorithm is based on a general combinatorial optimization approach for estimating piecewise linear models that we introduced previously (Mattavelli et al., 1997). A linear system is constructed with the coordinates of all contour points in the image as coefficients and the line parameters as unknowns. The resulting linear system is then partitioned into a close-to-minimum number of consistent subsystems using a greedy strategy based on a thermal variant of the perceptron algorithm. While the partition into consistent subsystems yields the classification of the corresponding image points into a close-to-minimum number of lines, the solution of each subsystem provides the parameters of those lines. An extensive comparison with the standard Hough transform and the randomized Hough transform shows the considerable advantages of our combinatorial optimization approach in terms of memory requirements, time complexity, robustness with respect to noise, and quality of the solution regardless of the parameter settings.