## 3 The Proposed Algorithm
### Phase II: Perceptual Color Correction (PCC)  
Inspired by [PERSON] et al.'s method of color transfer between images [PERSON] et al. (2018), we proposed an adjustable scheme for the phase of perceptual color correction. The original color transfer imposed the color characteristics of the example image on the target image through a simple statistical analysis. Using \(l\alpha\beta\) color space [PERSON] et al. (2018), it can minimize the correlations between the channels of many natural scenes. In the \(l\alpha\beta\) color space, \(l\) is the achromatic channel, \(\alpha\) is the yellow-blue channel, and \(\beta\) is the red-green channel. In the color transfer method, both the source and reference images are first converted to the \(l\alpha\beta\) color space. Then, the ratio of the standard deviations of the two images is used to average and scale the data in each channel. Finally, the average of the reference image of each channel is added to the scaled data and then converted back to the RGB color space. The procedure for this process in the \(l\alpha\beta\) space is given as the following Equations (5)-(7):  
\[l =\frac{\sigma_{Reference}^{l}}{\sigma_{Source}^{l}}(l_{Source}-\mu_{Source }^{l})+\mu_{Reference}^{l}, \tag{5}\] \[\alpha =\frac{\sigma_{Reference}^{\alpha}}{\sigma_{Source}^{\alpha}}(\alpha _{Source}-\mu_{Source}^{\alpha})+\mu_{Reference}^{\alpha},\] (6) \[\beta =\frac{\sigma_{Reference}^{\beta}}{\sigma_{Source}^{\beta}}(\beta_{ Source}-\mu_{Source}^{\beta})+\mu_{Reference}^{\beta}. \tag{7}\]  
During our perceptual color correction phase, no reference image was available. Therefore, we improved this method to a single image color correction method:  
\[l=\lambda_{1}(l_{in}-\mu_{lin})+\mu_{lin}, \tag{8}\] \[\alpha=\lambda_{2}(\alpha_{in}-\mu_{ain})+\mu_{ain},\] (9) \[\beta=\lambda_{2}(\beta_{in}-\mu_{gin})+\mu_{gin}, \tag{10}\]  
where \(\lambda_{1}\), \(\lambda_{2}\), and \(\lambda_{3}\) are user adjustment parameters. \(l_{in}\), \(\alpha_{in}\), and \(\beta_{in}\) are the values of the input color in \(l\alpha\beta\) space, \(\mu_{lin}\), \(\mu_{ain}\), and \(\mu_{gin}\) are averages for each channel. The specific effects of the tongue image and the range of user parameters will be discussed later.  
The range of each adjustable parameter is determined by a collection of tongue images that are captured under open lighting conditions. We capture tongue images at different times of the day, say 9:00 a.m., 1:00 p.m. and 6:00 p.m., and calculate the mean and variance of each channel in \(l\alpha\beta\) color space for the collected images. The range of each channel is used to ensure that the adjusted parameters are reasonable.  
One could immediately think of the question of why we don't exploit the color transfer scheme for objective color correction. Actually, the mean and standard deviation of the image depends on the content. Therefore, in addition to efficiency in perceptual color correction, content in the image, such as textual and objects, will also cause changes in the mapping function. Therefore, it is not suitable for objective color correction.  
In practice, we capture an image of the tongue in the consultation room, and doctors can adjust the image to their personal preferences and make the image look like it was captured in the room instead of the imaging system. We get a set of parameters that can be used to adjust the captured image. Please note that we only need to save the output corrected image and three perceptual parameters of the first phase. Perceptually corrected images can be easily restored from stored tongue images and their parameters.