# Moving Object Tracking and Its Application to an Indoor Dual-Robot Path
## 2 Image Processing
### Fuzzy Color Histogram Classification  
Color image segmentation using fuzzy classification is a pixel-based segmentation method [27]. A pixel is assigned a specific color by the fuzzy system; any given pixel is then classified according to the segments it lies in. Color classification can recognize all colors from the image and define the  
Figure 1: (**a**) RGB image and (**b**) hue, saturation, and lightness (HSL) image.  
specific color. To define the specific color, a color spectrum is used to decide the threshold of hue, saturation, and lightness. When we have established the environmental background color with known samples, after training the webcam can automatically capture non-sample colored objects. In this study we used this method to detect desired doors and objects. An example is shown in Figure 2, where these blocks are in different colors. If we need to find a non-defined color, we must first establish the known pattern color. The hue value, saturation value, and lightness value are all preset. In Figure 2, a red frame is used to circle detected blocks in the image frame. The red object is the unknown object. Then the threshold is applied, as shown in Table 1. The values of the known color are put into the fuzzy rules.  
The proposed fuzzy color classification system has three inputs and one output. H, S, and L are inputs of the fuzzy system, and the data points are the values of its H, S, and L. H fuzzy sets are Orange, Yellow, Green, Blue, Purple, Object, and Object 1. S fuzzy sets are S (somber), G (gray), P (pale), D (dark), and DP (deep). L fuzzy sets are Li (light), LU (luminous), M (medium), and B (bright). Output EO is the turning pixel for environment background or objects, fuzzy sets are EB (Environment Background), OB1 (Object 1), and OB (Object). Fuzzy rules are shown as follows, and the fuzzy sets are shown in Figure 3. The undefined object color (Red) is classified as shown in Figure 4 and the values are shown in Table 2.  
Rule 1: If H is Orange and S is S and L is Li, then EO is EB.  
Rule 2: If H is Yellow and S is S and L is Li, then EO is EB.  
Rule 3: If H is Green and S is S and L is Li, then EO is EB.  
Rule 4: If H is Blue and S is S and L is Li, then EO is EB.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Color** & **Hue Value** & **Saturation Value** & **Lightness Value** \\ \hline Orange & 17 & 185 & 155 \\ Yellow & 43 & 255 & 226 \\ Green & 52 & 120 & 192 \\ Blue & 128 & 196 & 192 \\ Purple & 213 & 116 & 110 \\ \hline \end{tabular}
\end{table}
Table 1: The known pattern color values.  
Figure 2: Blocks in different colors.  
Rule 5: If H is Purple and S is S and L is Li, then EO is EB.  
Rule 6: If H is Object and S is S and L is Li, then EO is EB.  
Rule 7: If H is Object 1 and S is G and L is LU, then EO is EB.  
Rule 8: If H is Orange and S is G and L is LU, then EO is EB.  
Rule 9: If H is Yellow and S is G and L is LU, then EO is EB.  
...  
Rule 136: If H is Green and S is DP and L is B, then EO is EB.  
Rule 137: If H is Blue and S is DP and L is B, then EO is EB.  
Rule 138: If H is Purple and S is DP and L is B, then EO is EB.  
Rule 139: If H is Other 1 and S is DP and L is B, then EO is OB1.  
Rule 140: If H is Other and S is DP and L is B, then EO is OB.  
Figure 4: Fuzzy color classifications.  
Figure 3: Fuzzy sets of color classification system.