{'fraction_non_alphanumeric': 0.019559902200488997, 'fraction_numerical': 0.0, 'mean_word_length': 4.978102189781022, '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}}
KNN-based color line model for image matting

Image matting is the extraction of a foreground object from an image and determination of the transparency of each pixel. Matting is inherently an ill-posed and underconstrained problem. Therefore, some assumptions need to be made to solve it. Recent methods that provide a closed-form solution to this problem are based on the assumption of either local smoothness or the nonlocal principle, but they cannot always produce satisfactory matting results. In this paper, we propose a K-nearest neighbors (KNN)-based color line model that combines and preserves the advantages of both the above assumptions. The experimental matting results indicate that they are of comparable or higher quality than those obtained by the existing methods based on the above two assumptions.