- Research
- Open Access
- Published:

# A novel RGB Fourier transform-based color space for optical microscopic image processing

*Robotics and Biomimetics*
**volume 1**, Article number: 16 (2014)

## Abstract

This paper presents an IF_{1}F_{2} color space for describing colors in microscopic images. Unlike the classical color spaces that treat the R, G, and B (RGB) components of a pixel’s color as independent elements, the proposed color space treats RGB as a sampled spectral signal, called a RGB signal. Then, based on the Fourier spectrum analysis of the RGB signal, the 1-D discrete Fourier transform is introduced to describe the color features of microscopic images. *K*-means clustering experiments on two microscopic image datasets validate the superiority of the proposed IF_{1}F_{2} color space compared with the classical RGB and HSV (hue, saturation, and value) color spaces.

## Background

Color image processing is one of the hot topics in image processing and computer vision. To effectively represent colors, various color spaces have been presented in the literature, such as the RGB (R, G, and B) color space, the HSV (hue, saturation, and value) color space, the CIELAB color space, and the YCbCr color space. A detailed survey of these color spaces can be found in [1]. In recent years, a number of new methods have also been proposed for describing colors more effectively. Chengjun Liu and Jian Yang [2] introduced the independent component analysis (ICA) into the analysis of color features and proposed an ICA-based color space. Margarita Bratkova et al. developed an oRGB color space [3] based on the opponent color theory. Ingmar Lissner and Philipp Urban derived a perception-based color space [4] that has high perceptual uniformity. For color image processing algorithms, it is of vital importance to select the optimal color space [1],[2],[5]-[7]. However, most existing color spaces, such as the RGB color space and the HSV color space, are application dependent. Once the image varies, the used color space may decrease its performance. In microscopic image processing, such as the cervical cell image segmentation, most algorithms are still based on classical color spaces, which cannot best describe the color features of microscopic images [8],[9],[7],[10]-[13]. In the existing studies of how to effectively represent colors, we found that few methods analyze colors from the frequency domain. Therefore, we investigate colors in microscopic images based on the frequency analysis of the R, G, and B components of pixels’ colors in this paper.

Color images are generally stored in the format of the RGB color space. Through linear or nonlinear transforms, the RGB color space can be transformed to other classical color spaces. However, these classical color spaces mostly treat the R, G, and B components as three independent elements. In this paper, on contrary to classical color spaces, we treat the R, G, and B components as a sequence of a spectral signal, called a RGB signal. Then, based on the methodology of frequency spectrum analysis in the signal processing area, we combine the characteristics of 1-D discrete Fourier transform [14] with the color features of microscopic images and propose a RGB Fourier transform-based color space, namely an IF_{1}F_{2} color space, to describe colors of microscopic images. In this color space, similar colors have uniform data distributions whereas different colors have obviously different data distributions.

## Methods

Color can be represented by a combination of tristimuli R (red), G (green), and B (blue) [1]. Actually, the R, G, and B components are obtained from three separate color filters, namely red filter *S*_{R}, green filter *S*_{G}, and blue filter *S*_{B}, according to the equations below:

where *P*(*λ*) is the light radiance with the wavelength *λ*.

From Equation 1, we may find that the R, G, and B components are not independent but actually correlated with each other. Unlike many existing classical color spaces that treat the R, G, and B as independent elements, we treat them as a sequence of a sampled spectral signal that has three samples with the value of R, G, and B in order. In the area of signal processing, we know that similar signals have a similar Fourier frequency spectrum [14]. Consequently, if we treat the R, G, and B as signal samples, similar colors in the image may have a similar signal frequency spectrum, whereas different colors have a different signal frequency spectrum. Then, the next question is how to describe the color features (the intensity and the chromatic information) based on the Fourier frequency spectrum? We know that in the RGB color space, the gray level (without chromatic information) from black to white is represented by R = G = B = {0 ~ 255} [1]. To some extent, the chromatic information is caused by the difference between R, G, and B. When the R, G, and B components are arranged into a sequence and become a signal, the high frequency component of the signal’s Fourier transform can describe the difference between R, G, and B. Inspired by this idea, we introduce the 1-D discrete Fourier transform into the color feature analysis of microscopic images as follows.

Assume that a pixel’s RGB value is (*r*, *g*, *b*), then (*r*, *g*, *b*) is arranged into a sequence *s*, where *s*(0) = *r*, *s*(1) = *g*, *s*(2) = *b*. We assume *s* to be a sampled signal, which has three samples with the value *r*, *g*, and *b*, respectively. We name this signal a RGB signal. According to the definition of 1-D discrete Fourier transform (DFT) [14], the DFT of *s* is:

where *X* is called the RGB Fourier transform of the pixel’s color.

Then, the proposed color space is constituted of three components:

where *X*(0) is the low frequency (zero frequency) component of *X* and *X*(2) is the high frequency component of *X. μ* is a scaling parameter used to scale *I* into a proper numerical range for specific image processing applications, abs(*X*(0)) is the complex magnitude of *X*(0), real(*X*(2)) is the real part of *X*(2), and imag(*X*(2)) is the imaginary part of *X*(2). Since the RGB signal only has three samples, we use 3-point DFT to calculate its discrete Fourier spectrum. For a 3-point DFT, *X*(1) and *X*(2) both belong to the high frequency components. The magnitudes of *X*(1) and *X*(2) are equivalent, while their phases are different. Therefore, we can either choose *X*(1) or *X*(2) as the chromatic component of the proposed color space. If two colors are slightly different, the major difference between them may be caused by how the RGB values of each color vary. In the methodology of frequency spectrum analysis, the high frequency component of a signal’s Fourier spectrum represents the differences between the signal’s samples, and these differences, to some extent, describe how the signal’s samples vary. Therefore, we use the high frequency component of the RGB signal to describe the color features of microscopic images in this paper.

Then, we construct a vector **F** = [*F*_{1},*F*_{2}], and then *I* and F are the intensity component and the chromatic component of the proposed color space, respectively. This new color space is called an IF_{1}F_{2} color space. We use a color cervical cell image as an example to analyze the characteristics of different colors in the IF_{1}F_{2} color space. In Figure 1, the second column shows the RGB signals. Each RGB signal corresponds to a sampled pixel’s color (as the arrow shows in Figure 1) in the cell image. The data distribution map in the middle part of Figure 1 shows the data distribution of vector **F** corresponding to each RGB signal in the second column. We can find that, for similar colors, the data distribution of vector **F** is concentrated, whereas for different colors, the data distribution of vector **F** is dispersed. In addition, we also provide the data distribution map of the chromatic components (the H and S components) in the HSV color space concerning the same pixels in the left cell image, as shown in the right part of Figure 1. To make fair comparisons, we rescaled the H and S values to the same range as that of the values in vector **F**. We can see that the data distributions of H and S are not as concentrated as that of vector **F** for the red points in Figure 1.

In addition, we provide the color vector field of a cervical cell image to further demonstrate the effectiveness of the IF_{1}F_{2} color space, as shown in Figure 2. In the color vector field of the image, each point corresponds to one image pixel and the vector on that point corresponds to the color vector **F** of that pixel. From Figure 2, we may observe that the vectors within the cell region are similar, whereas the vectors in the cell region are obviously different from those in the background region.

## Results and discussion

Our experiments focused on validating the superiority of the proposed IF_{1}F_{2} color space over the classical RGB and HSV color spaces for describing the color features of microscopic images. Because *K*-means algorithm is a widely used clustering algorithm, which can merge data points with high similarity into the same class and split data points with low similarity into different classes, we adopted *K*-means clustering algorithm to make rough segmentation of the cell images and test the discriminating power of different color spaces.

Two optical microscopic image datasets including the Herlev dataset [15] containing 100 normal cervical cell images (Dataset 1) and the single-cell cervical smear image dataset of our lab containing 100 images (Dataset 2) have been tested. The cell images of our lab were acquired by an automatic microscopic image acquisition system with a CCD camera (DA-HENG, Beijing, China), an optical microscope (Olympus CX31, Olympus Corporation, Shinjuku-ku, Japan), and a 40× magnification lens.

In each cell image, there are typically two kinds of pixels: the pixels in the cell region (with approximately red or blue color) and the pixels in the background (with approximately white color). The aim of the rough segmentation is to split the pixels into two classes: the cell (foreground) and the background. The colors of the pixels within the same region (the cell or the background) are similar, whereas the major difference between the cell and the background pixels is caused by the chromatic components of pixels’ colors. Therefore, we chose the chromatic components of the HSV and IF_{1}F_{2} color spaces as the input feature vector to the *K*-means algorithm. For the RGB color space, because there are no chromatic components of the RGB space, we chose all the R, G, and B components. Since the color difference between the nuclei and the cytoplasm is mainly caused by the intensity contrast, whereas their chromatic components are similar, they are supposed to be within the same class.

We employed the same metric, ZSI (Zijdenbos similarity index) [16], as used in [8] to test the accuracy of the rough segmentation results in different color spaces. The ZSI is defined as

where *A*_{1} is the set of ground truth foreground pixels, *A*_{2} is the set of segmented foreground pixels, and #{} is the number of pixels in the set. This index is similar to the Dice [17] similarity coefficient in the literature. The ground truth cell regions are manually segmented by an expert cytopathologist. The ZSI results of the IF_{1}F_{2} color space and the other two color spaces are provided in Table 1 and Figure 3.

Figure 4 shows several rough segmentation results. The first three cell images are from Dataset 1, and the other images are from Dataset 2. We can find that the foreground regions (black) of the clustering results in the IF_{1}F_{2} color space are more approximated to the real cell regions than the RGB and HSV color spaces. Many pixels are classified into the wrong class in the RGB and HSV color spaces. In Table 1, we can find that the ZSI for our method has a mean larger than 0.89 and standard deviation smaller than 0.06, which indicates that the accuracy of the rough segmentation results in the IF_{1}F_{2} color space is higher than that in the other two color spaces. This demonstrates that the discriminating power of the IF_{1}F_{2} color space is higher than that of the other two classical color spaces. Because the high frequency component of the RGB signal’s Fourier spectrum is, to some extent, the reflection of the difference between the R, G, and B, it may be more suitable for describing colors of the microscopic images than classical color spaces. From Table 1 and Figure 4, it can be found that the performance of the proposed IF_{1}F_{2} color space is better than that of the other two color spaces.

## Conclusions

In conclusion, we proposed a novel color space for describing colors of the microscopic images in this paper. On contrary to classical color spaces, we treat the R, G, and B components as a sampled spectral signal. Based on the Fourier spectrum analysis of the signal, we propose a RGB Fourier transform-based color space, namely IF_{1}F_{2} color space. *K*-means clustering results of two microscopic image datasets show that the performance of the proposed IF_{1}F_{2} color space is better than that of the classical RGB and HSV color spaces. The proposed IF_{1}F_{2} color space may be also useful for other kinds of color images and the relative automatic medical systems.

In this paper, we treat the R, G, and B components of a pixel’s color as a sampled signal. Since this signal only has three samples, we use 3-point DFT to calculate its discrete Fourier transform. For a 3-point DFT, the Fourier transform is just expended to the second order. However, we think that higher orders of the Fourier transform may be useful for specific applications, and we will investigate this topic in our future work.

## Authors’ information

TG is a Ph.D. student at National University of Defense Technology, China. He received his master’s degree in information and communication engineering from National University of Defense Technology in 2009. His research interests include computer vision and image processing.

DZ received his Ph.D. degree in information and communication engineering from National University of Defense Technology, China, in 2000. He is currently a professor at National University of Defense Technology. His major research interests include computer vision and image processing.

CX is a Ph.D. student at National University of Defense Technology, China. He received his master’s degree in information and communication engineering from National University of Defense Technology in 2011. His research interests include computer vision and image processing.

YL received his Ph.D. degree in mathematical engineering and information physics from the University of Tokyo, Japan, in 1992. He is currently a professor at the Chinese University of Hong Kong, China. His research interests include visual servoing, robotics, and automatic control. He is a fellow of IEEE.

## References

Cheng H, Jing X, Sun Y, Wang J: Color image segmentation: advances and prospects.

*Pattern Recogn*2001, 34(12):2259–2281. 10.1016/S0031-3203(00)00149-7Liu C, Yang J: ICA color space for pattern recognition.

*IEEE Trans Neural Netw*2009, 20(2):248–257. 10.1109/TNN.2008.2005495Bratkova M, Boulos S, Shirley P: oRGB: a practical opponent color space for computer graphics.

*IEEE Comput Graph Appl*2009, 29(1):42–55. 10.1109/MCG.2009.13Lissner I, Urban P: Toward a unified color space for perception-based image processing.

*IEEE Trans Image Process*2012, 21(3):1153–1168. 10.1109/TIP.2011.2163522Asmare MH, Asirvadam VS, Iznita L:

*Color space selection for color image enhancement applications. Paper presented at the 2009 international conference on signal acquisition and processing, Kuala Lumpur, Malaysia, 3–5 Apr 2009*. 2009.Jiao C, Gao M, Shi Y:

*Color image segmentation in a novel dynamic color space. Paper presented at the proceedings of the 7th world congress on intelligent control and automation, Chongqing, China, 25–27 June 2008*. 2008.Zhang C, Wang P:

*A new method of color image segmentation based on intensity and Hue clustering. Paper presented at the proceedings of the 15th international conference on pattern recognition, Barcelona, Spain, 3–7 Sept 2000*. 2000.Li K, Lu Z, Liu W, Yin J: Cytoplasm and nucleus segmentation in cervical smear images using radiating GVF snake.

*Pattern Recogn*2012, 45(4):1255–1264. 10.1016/j.patcog.2011.09.018Plissiti ME, Nikou C, Charchanti A: Automated detection of cell nuclei in Pap smear images using morphological reconstruction and clustering.

*IEEE Trans Inf Technol Biomed*2011, 15(2):233–241. 10.1109/TITB.2010.2087030Genctav A, Aksoy S, Onder S: Unsupervised segmentation and classification of cervical cell images.

*Pattern Recogn*2012, 45(12):4151–4168. 10.1016/j.patcog.2012.05.006Plissiti ME, Nikou C, Charchanti A:

*Accurate localization of cell nuclei in Pap smear images using gradient vector flow deformable models. Paper presented at the proceedings of 3rd international conference on bio-inspired signals and systems (BIOSIGNALS 2010), Valencia, Spain, 20–23 Jan 2010*. 2010.Plissiti ME, Nikou C, Charchanti A:

*Watershed-based segmentation of cell nuclei boundaries in Pap smear images. Paper presented at the proceedings of the IEEE/EMBS Region 8 international conference on information technology applications in biomedicine, Corfu, Greece, 3–5 Nov 2010*. 2010.Plissiti ME, Nikou C, Charchanti A: Combining shape, texture and intensity features for cell nuclei extraction in Pap smear images.

*Pattern Recogn Lett*2011, 32(6):838–853. 10.1016/j.patrec.2011.01.008Lathi BP:

*Signal processing linear systems*. Oxford University Press, New York; 1998.Jantzen J, Dounias G:

*Analysis of Pap-smear image data. Paper presented at the proceedings of the nature-inspired smart information systems 2nd annual symposium, Tenerife, Spain, 29 Nov–1 Dec 2006*. 2006.Zijdenbos A, Dawant B, Margolin R, Palmer A: Morphometric analysis of white matter lesions in MR images: method and validation.

*IEEE Trans Med Imaging*1994, 13(4):716–724. 10.1109/42.363096Dice LR: Measures of the amount of ecologic association between species.

*Ecology*1945, 26(3):297–302. 10.2307/1932409

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

TG carried out the study of the proposed color space, participated in the programming of the experiments, and drafted the manuscript. DZ carried out the study of using color vector field for analyzing the effectiveness of the proposed color space. CX performed the statistical analysis in the experiments. YL conceived of the study and helped to draft the manuscript. All authors read and approved the final manuscript.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0), which permits use, duplication, adaptation, distribution, and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Guan, T., Zhou, D., Xu, C. *et al.* A novel RGB Fourier transform-based color space for optical microscopic image processing.
*Robot. Biomim.* **1**, 16 (2014). https://doi.org/10.1186/s40638-014-0016-1

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s40638-014-0016-1

### Keywords

- RGB color space
- HSV color space
- Fourier transform
- K-means