Enhancement of Wheat Leaf Images Using Fuzzy-Logic Based Histogram Equalization to Recognize Diseases

The detection of diseases affecting wheat is very important as it relates to the issue of food security, which poses a serious threat to human life. Recently, farmers have heavily relied on modern systems and techniques for the control of the vast agricultural areas. Computer vision and data processing play a key role in detecting diseases that affect plants, depending on the images of their leaves. In this article, Fuzzylogic based Histogram Equalization (FHE) is proposed to enhance the contrast of images. The fuzzy histogram is applied to divide the histograms into two subparts of histograms, based on the average value of the original image, then equalize them freely and independently to conserve the brightness of the image. The proposed method was evaluated using two well-known parameters: Mean Square Error (MSE) and Peak Signal to Noise Ratio (PSNR). The best results were reflected by MSE = 0.071 and PSNR =39.58 for the Mildew Powdery disease. It is impressive to recognize that the proposed method yielded clear positive outcomes through producing better contrast enhancement while preserving the details of the original image, as confirmed by the subjective metrics.

resizing, and image converting to threshold value, reaching a recognition accuracy of 91%. Abbas et al. [11] used the segmentation methodology to determine the percentage of affected areas in maize leaves. Their methodology relied on image classification by K-Means clustering along with image segmentation using Color Threshold, and then estimating the affected area by calculating the number of white pixels and dividing it by the number of total pixels.

Wheat Diseases Analysis and Symptoms
In this section, we describe the common infections that influence wheat and their symptoms.

Leaf Rust
The main attribute of leaf rust contagions is small orange structure sores [12]. These contagions are most common on leaves; it appears on the cover of the leaf and expands from the bottom of the leaf surface to the stem node. Lesions induced by leaf corrosion are usually smaller and rounder and cause less tearing of the leaf structure than those triggered by stem rust [12].

Figure1-Leaf Rust [12] Powdery Mildew
Indications of powdery mildew include white contagious outgrowths on leaves and leaf sheaths ( Figure-2). It does not stop there, but glumes and awns will also be covered by infections, depending on the seriousness of the disease. The infection growth is often confined to the outer surfaces of plants and it can be effectively cleaned by touching the affected area with fingers. Fungal growth lesions may be dark brown or blended with white fungus growth (cottony) [12].  [12].

Tan Spot
The side symptoms of tan spot are small dark colored spots that grow to wind up tan curve-shaped or elliptical lesions with a yellow surrounding (Figure-3). Often, there is a small, dark brown spot in the center of the lesion [13]. The injuries frequently converge as they develop, bringing about expansive segments of influenced tissue. Eventually, the old leaves begin to die.

The Proposed Method
This paper proposes Wheat Leaf Disease Image Enhancement (WLDIE), which used to examine the effects of diseases on wheat leaves. The information of WLDIE based on the images of wheat leaves taken by a digital camera. WLDIE is consisting of four phases: image acquisition, preprocessing, enhancement, and then quality measurement. Figure

Image Acquisition
Making images for plant leaves was achieved by capturing pictures using a digital camera with appropriate resolution for that scene and then saving them in RGB format. Three common types of wheat leaf diseases were selected from the international maize and wheat organization website (CIMMYT) [12], which included Leaf Rust, Powdery Mildew, and Tan Spot.

Pre-processing
To remove unwanted parts, noise from images and improve their quality, two procedures adopted including:

Image Cropping
The image that captured through a digital camera contains about 30% of the infected plant leaf information. The remaining 70% of the information is not important because it represents the background that occupies a volume of memory space, it also effects on the desired results of this operation. In order to provide space in the storage and speed in processing, it is imperative to crop the uninteresting regions of the image. There are two common methods that can be used to crop the image. The first is by using the command imcrop (I) that uses the interactive cropping tool, where (I) is the inserted image which needs to be cropped. This method provides a high degree of flexibility and allows the user to crop any required part of the image, as shown in Fig. 5. Therefore, this method recommended because it is more flexible for the user and there will be no need to worry about losing any important information in the image that may be necessary to detect the disease.

Image Enhancement
Pre-processing Image Aquisition The second method relies on specifying the area points to be cropped, that contain the coordinates x 1 , x 2 , y 1 , and y 2 . This method depends on the pre-selection of the unwanted part by determining the coordinates of those parts, where a cropping operation cannot be edited without the object's coordinates. Thus, this method is not useful, mostly because it requires that all images be 100% of equal size.

Image Denoising
Image denoising is the way to reconstruct an original image and remove the noise from it. Removing noise is a prerequisite operation in the image-processing field. It is known that the median filter has the ability to remove the noise type of "salt and pepper". In addition, it is considered as the basis for the most advanced image filtering applications, such as pattern recognition, object segmentation, and medical imaging. Therefore, in this work, the median filter was adopted for removing noise.

Image Enhancement
The phase of image improvement is one of the most important proceedings for specialists in many of the applied fields, because it contributes to the diagnosis of the accurate contents and details of the image. Therefore, wheat disease images were improved using three different methods.

Histogram Equalization
Histogram Equalization (HE) is a simplest and easiest histogram modelling technique known. In the HE method, the resultant image is often flat or nearly flat, i.e. it contains a uniform distribution of intensity. In other words, the intensity of the image becomes more uniform, with better contrast and more detailed image of bright or dark regions. Thus, the contrast of the resulted image is enhanced. The histogram equalization formula is expressed in equation (1) while its working steps are shown in algorithm 1.
where CDF min represents the minimum non-zero value of the Cumulative Distribution Function (CDF), and (M × N) represents the size of image that has a width of M and a height of N.

Fuzzy Histogram Equalization
Fuzzy histogram equalization (FHE) is proposed to enhance the contrast of images. FHE consists of two procedures; firstly, computing a fuzzy histogram depending on the set theory to address the gray level values to the best. Secondly, dividing the fuzzy histogram found in the first procedure into two   (2) and its working steps are described in algorithm 2: represents the triangular fuzzy membership function defined as: ] is the support of the membership function.

Contrast Stretching
Contrast Stretching (CS) is a simple technique for enhancing images. It is a piecewise linear function that increases the dynamic range of the gray levels. The principal goal of improvement is to process the color image so that the result is more favourable than the initial image for any application. Stretching contrast can be calculated as in equation (4) and its working steps are Illustrated in algorithm 3: where I(r, c) potential is the major grey-level in the image I(r, c), and I(r, c) min is the tiniest greylevel in the image I(r, c). MAX and MIN indicate the maximum and minimum possible gray level values for an 8-bit grayscale image, which are usually 0and 255, respectively.

Image Quality Measurement
For destroyed images that are damaged due to a certain type of noise, there is no simple quantitative measure for removing noise optimally. Certainly, the resultant image after the filtration process is not perfect. Therefore, the overall visual quality must be tested. MSE gives an indication of the performance of the filter operation [14,15]. The resulting image error can be determined by the difference between the original and reconstructed pixel values, as follows: The MSE is ready by taking the total of the squared differences divided by the size of image, as in the following:

Results and Discussion
The study is focused on images of three types of wheat diseases, two images for each type. The first row of Figure-7 shows the original images, while the second row of shows the original images after being cropped.   In this paper, the methods of enhancement were tested by the subjective metrics assessment depending on the values of mean squared error and peak signal-to-noise ratio. As is well known, MSE measures the difference between two samples, such as original -enhanced or originaldistorted, etc. According to earlier reports [16,17], whenever this value is near zero, the model is close to the ideal state and vice versa. The exact is opposite in relation to PSNR, as it is inversely proportional to MSE. While, typical values of PSNR are between 30 and 50 dB when image elements are 8-bit. In other words, the higher value indicates the best level [17,18].
From Tables-(1, 2), it is clear that the fuzzy histogram equalization method resulted in very good images for Orange Rust a2 and Mildew Powdery b2 diseases, where it was observed that the PSNR values were within the range of typical values, as marked with bold font (30.4005, 39.5861 and 32.9116) in Table-1. While, the histogram equalization showed undesired results and the contrast stretching method resulted in acceptable outcomes. In the same context, the metric of quality evaluation (MSE) also proved the efficiency of the proposed method, based on its values which are marked by the bold font in Table-2. As for Tan spot disease images, the results were similar using both fuzzy histogram equalization and contrast stretching, with a simple preference for the first method. Whereas, the histogram equalization method produced the worst results. Although the results of the images of Mildew disease are not much different from the previous ones, they are slightly better for the fuzzy histogram equalization, whereas the histogram equalization remained of reduced quality.

Conclusions
Pre-processing is a necessary process to optimize the image to be ready for analysis and optimization and thus obtain the suitable results. The cropping process is an important procedure to reduce the unnecessary information, thus saving both memory space and time for processing. From the subjective and objective measures, it was clear that the Fuzzy Histogram Equalization (FHE) is the best method in most cases; the Contrast Stretching (CS) gave acceptable results, while Histogram Equalization (HE) was the worst method.