## 2 Methodology
### Feature Extraction Preprocessing with Fast Fourier Transform  
Fast Fourier Transform (FFT) is used in image preprocessing for the easy detection of abrupt changes in images, such as the presence of anthracose in leaves. The image is considered as a signal described in a two-dimensional spatial domain. Abrupt changes in images are mainly considered as high-frequency signals. As a result, image representation in the frequency domain is a powerful tool for the detection of such changes, so that they can be enhanced or removed, depending on the required task. Moreover, applying filters to images in the frequency domain is computationally faster than to do the same in the spatial domain. Similar applications of the FFT combined with ML algorithms have been tested in image classification applications of different domains with promising results [26].  
FFT is applied on an anthracose-infected leaf image (Figure 4a) and decomposes the signal into its periodic components in order to produce their frequencies. After the implementation of FFT the image is converted from the spatial domain to the frequency domain. Each point represents a specific frequency contained in the original image. After the FFT application, the image is shifted in such a way that the DC-component \(F\)(0,0), which corresponds to the average brightness, is displayed in the center of the image.  
The next step is to calculate the magnitude of the Fourier Transform, as it contains most of the information of the image structure. More specifically, if the magnitude changes abruptly, the signal is  
Figure 4: Fast Fourier transform (FFT) steps where: (**a**) the original image; (**b**) is analyzed into a magnitude spectrum; (**c**) into a modulated spectrum; (**d**) and finally into the feature-rich image.  
\begin{table}
\begin{tabular}{c c|c c} \hline \hline  & **Confusion** & \multicolumn{2}{c}{**Predicted**} \\  & **Matrix** & **Anthracnose** & **Healthy** \\ \hline True &
\begin{tabular}{c} Anthracnose \\ Healthy \\ \end{tabular} & & \\ \hline \hline \end{tabular}
\end{table}
Table 3: The confusion matrix template.  
considered to be high frequency. Figure 4b shows the magnitude spectrum after the implementation of FFT with the pixels in the center of the image representing its low frequencies. In general, anthracose is considered as an abrupt change, and is consisted of high frequencies. As a result, a high pass filter which allows only high frequencies should be implemented. Since the low frequencies are near the center of the Fourier image, a radius around the center is determined, and all the frequency components within that radius are constricted. For that reason, each image gets multiplied by the Gaussian high pass filter where a smooth cut off process is used. The cut off frequency is considered to be equal to the standard deviation \(\sigma\) in the frequency domain, and is equal to 0.3.  
The magnitude spectrum after the use of the filter where the low frequencies were successfully removed, is shown in Figure 4c. Finally, the inverse Fourier transform was implemented in order to obtain the original image without low frequencies, as it is shown in Figure 4d.  
The choice of simple FFT over wavelet transforms or more advanced techniques is because the time domain is irrelevant to the particular problem. The photographed leaves have no temporal information, therefore we need only to focus on the frequency precision, and FFT is the most appropriate method for this application [27].