{'fraction_non_alphanumeric': 0.022851919561243144, 'fraction_numerical': 0.002742230347349177, 'mean_word_length': 4.951086956521739, '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}}
Constrained nonlinear restoration of JPEG compressed low-resolution text from gray scale images using a Gibbs-Markov random field prior

In this paper, we present a new technique for the restoration of low-resolution grayscale text from JPEG- compressed images. An initial evaluation of the JPEG image is performed, using the histogram and co-occurrence matrix, to estimate the distribution of the uncompressed pixels. The results of this estimation are used to create a 2D Gibbs- Markov random field (GMRF) to model the text. Cliques and energy potentials are formed to properly represent text-like images. The sum of clique energy potentials is calculated to measure how well each given JPEG 8 X 8 block of data matches the prior Gibbs-Markov model. The given quantized JPEG discrete cosine transform (DCT) coefficients, combined with the known JPEG quantization matrix, provide a constrained range for the DCT coefficients of the restored image. Using nonlinear optimization techniques, the image is found which is the best combination of the prior GMRF model and the given DCT coefficients.