## 2 Technology Background  
### Color Transfer  
Blood smear images are sampled with microscopic imaging systems. Given the different lighting conditions, varied dyeing time, unstable smear thickness, and different physical qualities of subjects, the color of blood smear image is changed in practice. Most of the published methods only work in databases constructed under strictly controlled conditions. By contrast, in practical application, the blood images to be detected do not always have good color consistency. Therefore, color adjustment for blood smear images is needed. This paper proposed a color adjustment method based on color transfer and k-means clustering, and this method will be discussed in the following sections. The color transfer method will also be introduced.  
In 2001, [PERSON] _et al._ proposed the color transfer method between images [21]. This method is a general color correction method. The main idea of the method is to bring the color characters of one image to another image according to their mean value and standard deviation in Lab color model. In this paper, a standard template image that can be segmented accurately is chosen. The remaining images were then transformed according to the color characters of the template image. The algorithm can be elaborated into the following steps:  
1. Transform the RGB color space of the input image and the template image to Lab color space.
2. Compute the mean value and standard deviation of the input image and the template image in Lab color space.
3. Subtract the mean value from all the pixels according to the following equation: \[\begin{cases}l^{\prime}=l-\bar{l}\\ a^{\prime}=a-\bar{a},\\ b^{\prime}=b-\bar{b}\end{cases}\] (1) where \(l\), \(a\), \(b\) denote the L, a, b components of each pixel; \(\bar{l}\), \(\bar{a}\), \(\bar{b}\) denote the mean value of the L, a, b components; \(l^{\prime}\), \(a^{\prime}\), \(b^{\prime}\) denote the resultant value of each pixel after subtraction.
4. Scale the pixel points of each color component of the synthetic image by factors determined by the ratio of respective standard deviations: \[\begin{cases}l^{\prime\prime}=\frac{\sigma_{\rm t}^{a}}{\sigma_{\rm t}^{a}}l ^{\prime}\\ a^{\prime\prime}=\frac{\sigma_{\rm t}^{a}}{\sigma_{\rm s}^{a}}a^{\prime},\\ b^{\prime\prime}=\frac{\sigma_{\rm b}^{b}}{\sigma_{\rm s}^{b}}b^{\prime}\end{cases}\] (2) where \(\sigma_{\rm t}^{l}\), \(\sigma_{\rm t}^{a}\), \(\sigma_{\rm t}^{b}\) denote the standard deviation of the L, a, b components of the template image; \(\sigma_{\rm s}^{a}\), \(\sigma_{\rm s}^{a}\), \(\sigma_{\rm s}^{b}\) denote the standard deviation of the L, a, b components of the input image; \(l^{\prime\prime}\), \(a^{\prime\prime}\), \(b^{\prime\prime}\) denote the resultant value of each pixel.
5. Transform the Lab color space of the resultant image to RGB color space.  
Through the steps above, the color characters of the template image are transferred to the input image, and the synthetic image possesses the color features that are beneficial to WBC segmentation. The template image, the input image and the synthetic image based on the color transfer method are shown in Figure 1.  
Figure 1: **(a)** Template image; **(b)** Input image; **(c)** Synthetic image.