## 3 Material and Method
### Features Extraction and Fusion  
This is a helpful phase of an artificially intelligent, automated system based on ML. Color and texture features are helpful descriptors. Information about the color is obtained by using color features, whereas texture features provide texture analysis for the diseased leaves of the mango plant. In order to conduct the classification of diseases (powdery mildew, sooty mold) of the mango plant, color, shape, and texture features are extracted in this proposed method. The structure of the feature (color, shape, and texture) extraction is shown in Figure 4.  
The comprehensive explanation of each phase is as follows: preprocessed images are passed through the codebook and a segmented image is achieved in the training phase; the segmented image is used for feature extraction; and then color, shape, and texture features are extracted.  
Figure 4: Structure of feature extraction.  
Figure 3: Stepwise output of leaves: (**a**) healthy, (**b**) powdery mildew, and (**c**) sooty mold.  
Color Features: These are a significant resource for the detection and recognition of diseased/unhealthy parts of mango plants, as every mango plant leaf disease has a different color and shade. In this paper, the diseases on mango plant leaves are recognized or identified by the extraction of color features. As stated earlier, each disease has its own pattern and shading, so four types of color spaces are utilized to obtain the extracted colors. Features including RGB; hue, saturation, and variance (HSV); luminance, a, b component (LAB); hue, intensity, and saturation (HIS) are obtained from the mango leaf images. Different information is obtained along every channel. Therefore, the maximum information about the defective part of the mango leaf is obtained by applying color spaces. Color features are obtained by using the six types of different statistical metrics mentioned below from Equations (6)-(11). One vector, sized \(1\times 3000\), is used to combine these features for each channel. The statistical metrics are calculated by the following formulae:  
\[\overline{A}=(\sum{a_{i}})/n, \tag{6}\]  
\[\sigma=\frac{1}{n}\sqrt{\sum_{i=1}^{n}{(a_{i}-a^{\prime})^{2}}} \tag{7}\]  
\[V=\frac{1}{n}\sum_{i=1}^{n}{(a_{i}-a^{\prime})^{2}} \tag{8}\]  
\[Entropy=\sum_{i=1}^{c}-p_{i}\log_{2}p_{i} \tag{9}\]  
\[KR=n\frac{\sum_{i=1}^{n}{(A_{i}-A_{avg})^{4}}}{(\sum_{i=1}^{n}{(A_{i}-A_{avg}) ^{2}})^{2}} \tag{10}\]  
\[Skewness=\frac{\frac{1}{n}\sum_{i=1}^{n}{(a_{i}-a^{\prime})^{3}}}{(\frac{1}{n }\sum_{i=1}^{n}{(a_{i}-a^{\prime})^{2}})^{\frac{3}{2}}} \tag{11}\]  
where \(\overline{A}\) denotes the mean feature, \(\sigma\) denotes the standard deviation feature, \(V\) represents the variance feature, \(Entropy\) describes the entropy, \(KR\) represents the kurtosis feature, and \(Skewness\) indicates the skewness feature.  
Texture Features: Texture features alone cannot find identical images. Other features, such as color, work with texture features to segregate texture and non-texture features. To handle complications in image texture, an ancient but easy technique, local binary pattern (LBP), is implemented [36]. Hence, LBP was used in this research to extract texture features. Its description is mentioned below:  
\[LBP_{A,B}=\sum_{A=0}^{A-1}{F(g_{A}-g_{c})2^{A}},F(x)=\left\{\begin{array}{ ll}1\text{ {if}}\text{ {x}}\geq 0;\\ 0\text{ {otherwise}}\end{array}\right. \tag{12}\]  
In Equation (12), the value of a pixel is denoted by \(A\), the value of the radius by \(B\), the neighborhood point by \(g_{a}\), the center point by \(g_{c}\), and the binomial factor is denoted by \(2^{A}\). As a result, a \(1\times 800\) size vector was generated after extracting features from different channels and color spaces.