Abstract
The idea of applying integer Reversible Colour Transform to increase compression ratios in lossless image compression is a well-established and widely used practice. Although various colour transformations have been introduced and investigated in the past two decades, the process of determining the best colour scheme in a reasonable time remains an open challenge. For instance, the overhead time (i.e. to determine a suitable colour transformation) of the traditional colour selector mechanism can take up to 50% of the actual compression time. To avoid such high overhead, usually, one pre-specified transformation is applied regardless of the nature of the image and/or correlation of the colour components. We propose a robust selection mechanism capable of reducing the overhead time to 20% of the actual compression time. It is postulated that implementing the proposed selection mechanism within the actual compression scheme such as JPEG-LS can further reduce the overhead time to 10%. In addition, the proposed scheme can also be extended to facilitate network-based compression–decompression mechanism over distributed systems.
Keywords
Introduction
Natural images are known to exhibit a strong correlation between their primary colour components. This relation is an indication that similar information is present in more than one colour component. Similar relation can be observed in artificial colour images since they are made to mimic natural images. It is a common practice in image compression applications such as JPEG-20001 and Extended JPEG-LS
2
to apply an integer reversible colour transform to decorrelate colour components. For instance, a computationally inexpensive colour transformation scheme can be applied prior to the actual compression process (e.g. Red, Green and Blue (RGB)
Starosolski 6 validated this characteristic assumption and showed that depending upon the nature of images, it is possible to determine a particular colour transformation that can produce better compression ratios than others. Unfortunately, classifying the image in real-time for compression remains a challenging research problem. Furthermore, additional external variables such as lighting condition and use of flash can change the correlation of colour components. Therefore, a robust automatic colour selection mechanism is needed to determine the optimal colour transform in real-time. Strutz 7 proposed an automatic colour selector (ACS) mechanism that applies a series of predefined transformations on RGB components followed by calculating the joint entropy of each colour scheme. The colour space with the lowest entropy is presumed to be the best colour decorrelation mechanism for compression. Unfortunately, the overhead of employing a series of predefined transformations on the complete image is yet again a time-consuming task and results in degrading the performance of the overall compression scheme.
Unfortunately, the overhead of the colour selection process is directly proportional to the size of the provided image and the number of transformations to be tested. For instance, applying a single forward colour transform on a standard image of size 4310 × 2870 pixels captured from a standard DSLR camera can take approximately
In recent research, 8 Starosolski 6 revisited and discussed the effects of employing reversible denoising for reversible colour transformation in predictive lossless image compression. Similarly, a hybrid technique employing prediction stage as well as Discrete Wavelet Transform (DWT) is introduced in Starosolski 9 which is shown to produce promising results. Applications of lossless image compression along with stenography were explored by AbdelWahab et al. 10
One of the main motivations behind a proposed module comes from the fact that sensitive images such as medical and space imagery are usually stored onto a decentralized network storage for decentralized access to multiple computers. Since such network-based storage capabilities are inherently expensive and scarce than local storage, an efficient compression/decompression mechanism followed by storage can efficiently utilize the storage capabilities. Hence, the proposed mechanism is designed to achieve higher compression with low computational overhead.
The remainder of this article is organized as follows. The Literature Review discusses the role and workings of colour space transformations followed by the respective technical workings of some standard colour transformation techniques. The Methodology section outlines the working of baseline technique followed by the quantitative metric(s) which are presumed to correlate with the overall compression of the system followed by the detailed workings of the proposed method. The Evaluation section provides information regarding datasets, experimental setup and comparative results of the proposed system with the baseline method.
Literature review
In digital image compression, irrelevant information is usually exploited to achieve higher compression ratios while retaining relevant information in the image. For instance, the human eye is more sensitive to detect changes in brightness than colour information (also referred to as chromatic information in literature). To exploit this chromatic and achromatic imbalance in a fruitful fashion, YCbCr colour space 11 was constructed in which Y component (also known as luma component) contains the brightness of the pixels. Contrarily, Cb and Cr are chromatic components in the colour space which contains blue and red component information relative to green component, respectively. Based on the aforementioned observation of chromatic and achromatic sensitivity, both Cb and Cr components can be quantized aggressively to achieve higher compression ratios for lossy image compression algorithms and television systems. In digital transmission and storage, YCbCr colour space is commonly referred to as YUV colour space. Several variants of YCbCr colour space have been developed and employed over the years, one notable of them Irreversible multiple Component transformation (ICT) is used in JPEG2000 for lossy compression 12 ; however, a typical forward and backward conversion from RGB to YCbCr is presented in equation (1). The purpose of introducing a well-known colour space conversion is to establish how human colour vision is exploited; for a comprehensive description, readers are referred to Gegenfurtner and Kiper 13
To compress images in lossless fashion, the colour space transformation needs to be integer reversible. Unfortunately, YCbCr in the traditional form is not integer reversible due to the multiplication of RGB values with floating-point numbers. The reversibility of components can be achieved by modifying the transformation function and expanding the dynamic range of the colour space components by additional bits 14 and is expressed in equation (2). In principle, a component’s dynamic range can be defined as the number of bits used to represent pixel intensities for this component. It may seem counter-intuitive that increasing the dynamic range requires more bits than usual but the entropy coding stage takes care of this coding redundancy efficiently since Cu and Cv components contain subtracted values from the green channel
Another lifting-based transformation (YCoCg-R) was introduced and included in JPEG-XR’s recent standard 15 which was formalized based on KLT transformation characteristics of the Kodak image set. 16 The procedure of applying YCoCg-R transformation for forward and backward is explained in Table 1 where ceiling functions are used to ensure integer reversibility for lossless image compression. In principle, the luma component Y of YCoCg-R is represented by the same number of bits as RGB; however, the dynamic range of Co and Cg components is 1 bit greater.
Integer-reversible colour space conversions.
RGB: Red, Green and Blue.
In some cases, the dynamic range expansion is not permissible or restricted due to channel or storage constraints. Modular variants of reversible colour transforms are used in place of original colour space transformation which is usually slightly computationally expensive and results in non-optimal compression ratios. For instance, modular variant of equation (2) (included in JPEG-LS extended standard as mRCT in ISO/IEC 144952 and ITU-T.8702) can be constructed as equation (3)
Starosolski 6 argued and proposed that chromatic difference-based low-complexity transformations which are inspired by human vision can achieve relatively similar compression ratios. He introduced LDgEb transformation where three core components are Luma, Difference and Excess (L = (R + G)/2, Dg = R − G and Eb = B − L, respectively). Similarly, in RDgDb instead of Luma component, Red component is used along with Dg and Db components which contain chromatic differences of Green, Blue and Red components which is shown in Table 1. Finally, Starosolski experimented with the Luma component instead of using chromatic R component and hence, LDgDb transformation can be easily constructed which is hybrid between vision-based and YCbCr transformation.
Every aforementioned colour space transformation contains some variant of luma component which was used to facilitate lossy image compression by exploiting irrelevant information (i.e. which cannot be distinguished by the human eye). However, in lossless compression, calculation of luma component is usually a computationally expensive task and can be skipped altogether by directly employing primary colour subtraction in the transformation. Such direct transformations are faster inherently and exploit another human vision mechanism and are explained in detail in Starosolski. 6 For the sake of completion, consider a natural colour image with their respective R, G and B colour component histogram, as shown in Figure 1. It can be observed positively that the red and green channels follow similar distributions and if the red channel is stored, a difference of red and green (commonly written as Dg) can be used instead of storing green channel. Similarly, a difference can be stored instead of the blue channel (either red or green channel can be used to formulate Db). Such RDgDb reversible colour transformations (RCTs) have the potential to exploit redundancy while being computationally inexpensive, however, their efficiency is roughly proportional to choosing a correct dominant colour (in the case of RDgDb it is R). To effectively determine which dominant colour is best for increasing the coding redundancy, a computer algorithm needs to apply or analyse histogram distribution of the complete image efficiently which is yet again a challenging problem to tackle.

Colour image17 with colour component RGB histogram that represents the correlation between RGB components where the horizontal axis in Figure 1(b) represents gray-levels and vertical axis represents the frequency of occurrences.
Methodology
This section briefly introduces the baseline colour selection procedure by Strutz 7 followed by comprehensive details of the proposed mechanism from Rajput and Boerner. 18
ACS
Keeping the importance and positive contribution of colour selection on the compression ratios of images by Strutz,7,19 it is concluded with strong evidence that the addition of the colour selection mechanism in the pre-processing stage is the necessary module for both resource-limited and general applications. Strutz proposed an Automatic Colour transformation Selection (referred to as ACS in the upcoming text) mechanism which uses the relation of available information content with the minimum achieved bitrate. However, the calculation of information content for each colour space transformation is achieved by calculating prediction-error
where
Finally,

A simplified version of ACS.
Proposed method
Unlike ACS by Strutz, a new colour selection mechanism namely Iterative Colour Selector (ICS) is proposed in which relatively smaller region of interests (ROIs) are processed iteratively with RCT and the fast variant of JPEG-LS compressor 20 to determine a suitable colour transformation. The complete process is designed to utilize the parallel processing architecture of the modern central processing units (CPUs) to ensure that the processing overhead of the selection mechanism is kept as low as possible. Figure 3 shows a block diagram of the compression/decompression pipeline in which ICS is integrated with JPEG-LS compression scheme to achieve better compression ratios.

Overall design of the proposed compression/decompression pipeline on the sample image (lena). 21
In principle, edges are usually defined as abrupt transitions between grey levels in localized image regions. Similarly, region(s) that contains comparatively fine detail can also contain similar variations in bright and dim grey levels (or chromatic components in case of colour images). Such abrupt changes caused by either edges or fine detail can be detected by analysing the higher values of sigma in any ROI. Furthermore, such areas with higher grey-level variations are relatively harder to process in predictive lossless compression systems. Contrarily, smoother regions are easier to predict and the efficiency of predictive lossless image compression algorithms is directly correlated to these regions. Therefore, the ROI selection mechanism selects one or more regions and estimates the best suitable colour transformation in these localized regions. Hence, this statistical analysis mechanism is implemented in the proposed algorithm.
The working principle of the ICS is subdivided into two distinct modules namely ROI selector and iterative compressor. During the quantitative evaluation phase, it was observed that smooth and highly correlated regions of the image are mainly responsible for facilitating higher compression ratios. Therefore, the ROI selector module selects multiple portions of the image in which colour components are both highly correlated and contain relatively fewer edges and/or sharp features. Selected ROIs are then compressed iteratively by employing RCT followed by the fast variant of JPEG-LS. 20 Detailed workings of both modules are presented in upcoming sections.
ROI selection module
In order to perform a robust statistical analysis of the given image to isolate ROIs having smooth profiles, the image
The standard deviation values of each colour component (i.e.
The calculated

ROI selection mechanism.
Iterative transform selector
This module picks a colorSpace from the provided list (see Table 1) and applies forward conversion on
In principle, the list of RCT can virtually accommodate all available integer RCTs to be applied on
The output of ITS module is an integer number bestColor which identifies the colour space which achieved the best compression ratio. This integer value is needed at the time of decompression such that appropriate backward conversion can be applied. Unfortunately, JPEG-LS does not store metadata and therefore, the value of bestColor is appended into the filename of the output file.
Evaluation
To evaluate the performance of the proposed automatic selector with high-resolution images, a prototype implementation of Figure 3 has been implemented in C++ programming language. Similarly, a highly optimized CPU-based implementation of Strutz 7 is also implemented to provide comparative analysis. It is worth mentioning that the implementation of ACS is also designed to utilize multi-threaded CPU architecture to avoid biased processing results. The following standard image datasets containing high-resolution 24-bit colour images have been tested for compression and processing time:
Lossless Photo Compression Benchmark (LPCB), 22
Image Compression Benchmark (ICB) dataset, 23
École Polytechnique Fédérale de Lausanne (EPFL). 24
Table 2 summarizes the characteristics of each image dataset in a tabular form for the convenience of readers.
Image dataset characteristics.
LPCB: Lossless Photo Compression Benchmark; ICB: Image Compression Benchmark; EPFL: École Polytechnique Fédérale de Lausanne.
Table 3 provides quantitative results which highlight the low processing overhead of the proposed selection mechanism. Similarly, Table 4 highlights the overall compression ratios achieved by applying JPEG-LS, JPEG-LS with ACS and JPEG-LS with proposed colour selector. It can be observed that the proposed ICS is more than two times faster than ACS while achieving similar compression ratios. Furthermore, the process of adding new colour transformation in ACS is tedious and complex especially if desired components are not included previously, whereas adding additional colour transformation is simple and does not affect the processing time seriously. For instance, adding the support to check RGB
Comparison of overhead processing time of RCT selection with actual JPEG-LS compression in milliseconds (ms).
RCT: Reversible Color Transform; ACS: automatic colour selector; ICS: iterative colour selector; LPCB: lossless photo compression benchmark; EPFL: École Polytechnique Fédérale de Lausanne; ICB: image compression benchmark.
Comparison of compressed size with and without RCT selection module in kilobytes (kb).
RCT: reversible color transform; ACS: automatic colour selector; ICS: iterative colour selector; LPCB: lossless photo compression benchmark; EPFL: École Polytechnique Fédérale de Lausanne; ICB: image compression benchmark; CR: compression ratio(size) of schemes.
All experimentation was carried out on a machine having the following specifications:
Intel Core i7-4790.
8 GB RAM.
Ubuntu 16.04 Operating System.
After extensive quantitative evaluation, it was observed that almost half of the processing time by the prototype implementation is caused by storing the transformed image onto hard drive followed by passing the name and location of the stored image to the actual compression scheme (i.e. JPEG-LS in our case). It is postulated that the overhead time can be further reduced by implementing the proposed selection and conversion module within the JPEG-LS.
Conclusions and future work
A novel low computational complexity colour space transformation mechanism was proposed which is designed to be inherently extendable to accommodate various colour transformations on-demand. With the help of quantitative evaluations, it was demonstrated that statistically similar compression ratios are achieved by employing the proposed mechanism by the additional marginal overhead of the actual compression while the traditional method is prone to introduce significant overhead. The proposed selection mechanism can be extended to accommodate per-channel entropies as well at the time of region-of-interest selection, this addition is expected to incorporate efficient approximation and hence increase the overall compression ratios. As discussed in this research that an inherent integration of the proposed module within the compression/decompression pipeline can further reduce the processing overhead in both local and network storage. However, exploration in these directions is currently under investigation and implementation phase and findings will be published in future.
Footnotes
Handling Editor: Yanjiao Chen
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship and/or publication of this article.
