{'fraction_non_alphanumeric': 0.019852941176470587, 'fraction_numerical': 0.0, 'mean_word_length': 5.450236966824645, '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 CANNY algorithm for uneven lighting image based on minimum intra-class variance and nonlinear visual perception characteristic

When the traditional CANNY algorithm is applied for edge detection, thresholds are needed to filter candidate edge points after non-maximal suppression. But at present, thresholds are set by experience and the optimal choice is obtained by repeated tests and comparisons. In addition, the choice of current thresholds does not take characteristics of uneven lighting images into account. In some special environments, such as the underground coal-mine, this disadvantage would lead to two adverse aspects, emergence of unreal edges and loss of real edges. Aiming at these problems, this paper analyzed characteristics of uneven lighting image and proposed a novel definition of gradient, non-uniform gradient, based on the nonlinear visual perception characteristic. Then we give an adaptive clustering algorithm for calculating two thresholds based on the minimum intra-class variance theory. The clustering feature of the algorithm is a non-uniform gradient histogram, so that the selection of two thresholds is associated with both gray scale and gradient of the image. Theoretical and experimental results show that the algorithm has the brightness, contrast adaptation and correctness, and conform to the people's perception.