# A Machine Vision-Based Algorithm for Color Classification of Recycled Wool Fabrics
## 2 Materials and Methods
### Definition of a Set of Color Classes  
The company pickers (i.e., the experts who sort fabrics based on their color) typically use a two-phase selection process to classify plain, colored fabrics. First, the clothing is arranged into color \"families\" (such as red, blue, and white), and each family's members are then further categorized into color classes. For the current work, the catalog provided by an Italian textile company operating in Prato was used to show the viability of the proposed method. This dataset consisted of a target set of 40 fabric samples made of recycled wool, representing all the target colors offered to company customers. Each sample represented a particular color class belonging to a color family. Ten overall color families made up the used catalog, as shown in Table 1 (i.e., the total number of classes is 40). Figure 1 shows the four different classes for families \"pink,\" \"red,\" and \"blue.\"When a new fabric composed of regenerated wool was conferred to the company, the textile experts were required to classify it within one of the aforementioned classes. A fabric sample must be classified in one of the catalog's families before being assigned to a class, even if there are notable differences between the fabric sample color and one of the colored samples in the catalog. This guarantee that classification is achieved according to textile experts' criteria. To train a PNN-based color sorting system, it was necessary to collect and properly pre-process a relevant number of fabric samples to be categorized in one of the color classes (and families) of the catalog. In order to create a training dataset that can represent nearly all of the regenerated wool sample colors, 800 fabrics of various colors were gathered. The fabrics were chosen to cover the full spectrum of the catalog's colors as evenly as possible, with more closely related classes reflecting more similarly the catalog colors.  
The company expert staff then classified these fabrics within the aforementioned color families and classes. Such a process is typically not error-free; accordingly, it was necessary to solicit the blind opinions of five pickers in order to minimize classification errors. This time-consuming operation, called \"re-picking,\" required continuous revision during the entire process since a fabric was effectively classified only when at least 4 out of 5 pickers agreed upon the class and the possible fifth picker classified the fabric in a contiguous class.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Families**} & \multirow{2}{*}{**Family**} & \multirow{2}{*}{**Classes**} & **\# of Fabrics** & **\# of Fabrics** & **\# of Fabrics for** \\  & & & **Composing** & **Composing** & **End Family** \\  & & & **the Target** & **the Training** & **(Training Set)** \\  & & & **Set** & **Set** & **(Training Set)** \\ \hline White & 1 & 1, 2, 3, 4 & 4 & 82 & 20, 18, 21, 23 \\ Beige & 2 & 5, 6, 7, 8 & 4 & 78 & 17, 22, 21, 18 \\ Brown & 3 & 9, 10, 11, 12 & 4 & 84 & 21, 19, 21, 23 \\ Orange & 4 & 13, 14, 15, 16 & 4 & 76 & 17, 19, 20, 21 \\ Pink & 5 & 17, 18, 19, 20 & 4 & 77 & 18, 18, 21, 20 \\ Red & 6 & 21, 22, 23, 24 & 4 & 85 & 23, 20, 20, 22 \\ Violet & 7 & 25, 26, 27, 28 & 4 & 81 & 19, 18, 23, 21 \\ Blue & 8 & 29, 30, 31, 32 & 4 & 90 & 23, 21, 22, 24 \\ Green & 9 & 33, 34, 35, 36 & 4 & 75 & 17, 21, 18, 18 \\ Gray and & 10 & 37, 38, 39, 40 & 4 & 72 & 16, 15, 20, 21 \\ black & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Families and classes provided by the catalog.  
Figure 1: Four different classes for families “pink,” “red,” and “blue.”  
Table 1 lists the overall number of samples for each color class and family in which the training set was classified.