{'fraction_non_alphanumeric': 0.024, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 5.169014084507042, '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 foreground-background separation algorithm for image compression

Many bitmap documents are composed by the superposition of layers with pictures and text. These documents do not compress well using image compression algorithms such as JPEG-2000, because text introduces sharp edges on top of the smooth surfaces typically found in natural images. Similarly, compression algorithms for text facsimiles, such as JBIG2, are not suited for color or gray level images. In this paper the SLIm system for separating text and line drawing from background images, in order to compress both more effectively is proposed. This approach differ from previous ones such as DjVu, Tiff-FX, and MRC, by being extremely simple and fast, while yielding close to state-of-the-art compression performance. Results show that the SLIm compression performance is attractive for many applications.