# Reversible Image Processing for Color Images with Flexible Control
## 2 Related Works
### Contrast Enhancement and Saturation Improvement Method for Color Images  
Our previously proposed method [13] for color images based on [12] enables CE and saturation improvement independently. Additionally, perfect reversibility can be ensured by embedding recovery information.  
This method uses the HSV color space to enable both CE and saturation improvement functions without hue distortion. The HSV color space consists of the hue (\(H\)), saturation (\(S\)), and brightness (\(V\)). The color space is classified under two types: the cylinder model [16] and cone model [17; 18]. The HSV components are generally given by  
\[H=\begin{cases}60\times\frac{G-B}{Max-Min}&\text{if }Max=R\\ 60\times\left(\frac{B-R}{Max-Min}+2\right)&\text{if }Max=G\\ 60\times\left(\frac{R-G}{Max-Min}+4\right)&\text{if }Max=B\\ notdefined&\text{if }Max=0,\end{cases} \tag{1}\]  
\[S_{cylinder}=\begin{cases}\frac{Max-Min}{Max}&\text{if }Max\
eq 0\\ 0&\text{if }Max=0,\end{cases} \tag{2}\]  
\[S_{cone}=Max-Min, \tag{3}\]  
\[V=Max, \tag{4}\]  
where \(Max\), \(Median\), and \(Min\) indicate the largest, middle, and smallest values in the RGB components, respectively. Note that the above variables are used as matrices in this paper. The method in [12] uses the cylinder model, where the saturation has fractional values with Equation (2). Thus, rounding errors arise by controlling the saturation. In comparison, our previous method uses the cone model. Since the saturation has integer values in the cone model with Equation (3), this method can reversibly improve the saturation without rounding errors.  
We give an outline of our previous method in Figure 1. The largest, middle, and smallest values in the \(R\), \(G\), and \(B\) components of each pixels are assigned to \(Max\), \(Median\), and \(Min\), respectively. First, the saturation is improved by decreasing the \(Min\) values (see Figure 1(I)). In the case that we would not like to improve the saturation, this function can be skipped. The contrast is then enhanced by applying the HS method [1] to the \(Max\)values (see Figure 1(II)). Next, we adjust the _Median_ values to avoid hue distortion (see Figure 1(III)). The _Max\({}^{\prime}\)_, _Median\({}^{\prime}\)_, and _Mint\({}^{\prime}\)_ values are further calibrated to maintain the magnitude relation among RGB components and turned back into \(R\), \(G\), and \(B\) values, respectively (see Figure 1(IV)). Finally, the recovery information, which is used to restore the raw image, is embedded into each color component by the prediction error expansion with histogram shifting (PEE-HS) method [19] (see Figure 1(V)). Accordingly, our previous method can conduct CE and saturation improvement reversibly and independently.  
Note that color space conversion from RGB to HSV is not used in this method. If a series of processes is applied in the HSV color space, then a number of rounding errors arise through the color space conversion. These rounding errors prevent us from perfectly recovering the raw images. Thus, the \(H\), \(S\), and \(V\) values are indirectly controlled using the _Max_, _Median_, and _Min_, and all functions in our previous method are practically carried out in the RGB color space.  
In the next section, we propose a novel reversible processing method for color images based on our previous method. The proposed method features both a sharpening and smoothing function and brightness increase and decrease function, along with the advantages of our previous method.