# ABANICCO: A New Color Space for Multi-Label Pixel Classification and Color Analysis
## 5 Methods
### Fuzzy Color Space Formalization and Color Naming  
As described in the previous section, using the angle bisectors on the double AB histogram, we were able to successfully detect and separate different chromogens, accurately segmenting the detected colors. In this Section, to approach the goal of defining an unbiased continuous space for color naming and classification, we applied the principles of fuzzy models applied to multi-labeling systems: in this way, we used trapezoidal heterogeneous membership functions to represent fuzzy colors. Namely, we defined areas of absolute chromogen certainty as the points lying on top of the previously established bases. Moving away from the pure bases, the membership degree to them decreased as we defined increasing gradients of membership for the colors on both sides. The approach was inspired by [8; 39; 40; 41; 42; 48; 49]. We defined the set of membership functions using polar coordinates, as shown in Figure 1B, and trapezoidal piecewise polynomials, to maintain continuity, simplifying the problem and matching the geometric angular analysis. For the angular membership, linear piecewise functions were fitted for each color class, so that they would output 1 when the angle of the pixel was in the middle (or peak) of the color class, 0.5 in the boundaries, and 0 when over the peak of the next or previous color class, as given by  
\[f(\theta,a,b,c,d,e,g)=\left\{ \begin{array}{ll}0&\text{if }\theta\leq a,\\ \frac{\theta-a}{2(b-a)}&\text{if }a<\theta<b,\\ \frac{\theta-2b+c}{2(c-b)}&\text{if }b<\theta<c,\\ 1&\text{if }c<\theta<d,\\ \frac{\theta-2e+d}{2(d-e)}&\text{if }d<\theta<e,\\ \frac{\theta-g}{2(e-g)}&\text{if }e<\theta<g,\\ 0&\text{if }\theta\geq g,\end{array} \right. \tag{1}\]  
where \(a\) was the peak for the previous color class, \(b\) and \(e\) were the angles corresponding to the boundaries, \(c\) and \(d\) were the angles adjacent to the peak of that color class, and \(g\) corresponded to the peak of the next color class. This was done using the geometric knowledge learned from the AB reduced space. The radius membership functions were created to differentiate between achromatic (scale of grays), near-achromatic (brown), and pure colors. The function defining the achromatic area was modeled with two linear splines, as given in  
\[f_{Achromatic}(r,r_{1})=\left\{ \begin{array}{ll}1&\text{if }r\leq r_{1},\\ 0&\text{if }r>r_{1}.\end{array} \right. \tag{2}\]  
while three linear splines were used to define the near-achromatic area:  
\[f_{\text{Near-}Achromatic}(r,r_{1},r_{2},r_{3})=\left\{ \begin{array}{ll}0& \text{if }r\leq r_{1},\\ 1&\text{if }r_{1}<r<r_{2}\,^{\prime},\\ \frac{r-r_{3}}{r_{2}^{\prime}-r_{3}}&\text{if }r_{2}^{\prime}<r<r_{3},\\ 0&\text{if }r\geq r_{3},\end{array} \right. \tag{3}\]and the chromatic area:  
\[f_{Cluromatic}(r,{r_{2}}^{\prime},r_{3})= \begin{cases}0&\text{if }r\leq{r_{2}}^{ \prime},\\ \frac{r-{r_{2}}^{\prime}}{{r_{2}}^{\prime}-{r_{3}}}&\text{if }{r_{2}}^{\prime}<r<{r_{3}},\\ 1&\text{if }r\geq{r_{3}}.\end{cases}  \tag{4}\]  
In the above equations, \(r_{1}\) is the Critical Achromatic Radius, \({r_{2}}^{\prime}\) is the Critical Near-Achromatic Radius, and \(r_{3}\) is the Modified Critical Chromatic Radius, obtained from the skeletonized histogram. It can be seen from Figure 2 that, while the splines for the near-achromatic and achromatic areas showed a similar logic to the angular membership functions--with a clear gradient between the two classes--that was not the case for the achromatic area. To account for this, the Critical Achromatic Radius (\(r_{1}\)) was used, as defined in the previous section: all colors with radii lower than \(r_{1}\) were classified as achromatic. However, the Critical Near-Achromatic Radius (\(r_{2}\)) was used as the point at which the membership function would output 0.5 for near-achromatic and chromatic.