{'fraction_non_alphanumeric': 0.020761245674740483, 'fraction_numerical': 0.0, 'mean_word_length': 5.2, '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}}
Color-to-Gray Conversion Based on Boundary Points

Color-to-gray conversion is popularly used in black and white printing and other image processing tasks. In this paper, we propose an adaptive linear weighting algorithm based on the boundary points to realize decolorization. First, we develop a new algorithm for the boundary points detection of the color image by Sobel operator. Secondly, the linear parametric model with a discrete searching algorithm is employed to get the optimal grayscale image, which is aiming at maximally preserving the boundary points of the color image. Finally, we linearly stretch all the gray values of the optimal grayscale image into all the grayscale intensities. Experimental results show that the proposed algorithm obtains a good performance compared with several state-of-the-art methods both qualitatively and quantitatively.