{'fraction_non_alphanumeric': 0.03850446428571429, 'fraction_numerical': 0.027901785714285716, 'mean_word_length': 4.859477124183006, '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 Better Color Space Conversion Based on Learned Variances For Image Compression

Modern image coders, especially the lossy ones, encode the YCbCr channels separately.Processing the Y channel is always much more sophisticated than the Cb/Cr. The raw image retrieved from the camera sensor is of BayerRGB[1] or 3-color RGB[2] format, and the conversion between RGB and YCbCr format normally follows the ITU-R BT.601[4] standard, which essentially defines a fixed 3x3 space conversion matrix with offsets. The algorithm presented in this paper, however, learns a better color space conversion algorithm tailored for each image, squeezing more information into the Y channel before encoding. In order to achieve this goal, the principle component analysis (PCA)[6] algorithm has been trained, to find the image’s primary axes giving the highest variance. The PCA algorithm is carried out onto the AC values of each 16x16 pixel block (RGB values minus the block DC). During decoding, the least square method (LSM) is proposed, to estimate the optimal inverse conversion and to compensate for the coding noise. Overhead of the proposed algorithm is negligible 12 coefficients per image only, around 0.00019 bit per pixel for an image of size 2M bytes. The image after PCA conversion is coded by the latest H.266 codec running in INTRA mode, with a binary arithmetic coding engine as the entropy coder. Experiments on the CLIC2019’s valid dataset has shown a significant RGB-PSNR performance boost: 0.26db or 7.4% bitrate save@0.145bpp, and 1.2db/22.5%@1.0bpp. The choice on Cb/Cr axis and the channel range are also studied. The proposed algorithm also outperforms the YCoCg[5] conversion algorithm, and is more robust than the YCoCg/BT.601 algorithm. ∗The first two authors share first-authorship