Keywords

1 Introduction

India is an agricultural country where majority of the population income depends mainly upon farming. Agriculture contributes as a large source of employment and source of earnings through exports. The plants, fruits and even medicinal herbs offer serviceable benefactions to the human race. Though farmers have wide range of options of sowing crops, yet a degradable performance is observed when the agricultural output is affected by various diseases [1]. It is estimated that 35–45% of the crop production is lost due to untimely detection of diseases in plant leaflets. Though most of the observations are strictly based upon the physical examination of the leaves, this leads to extensive delay in time and treatment [2]. Such approaches also produced results with low accuracy greatly affecting the economic growth of our country as well as a significant income drop in the income of the farmers [3]. With the advent of the technology and latest techniques, the detection of diseases in plants has been automated to improve food security [4]. These solutions have proved to as early and timely detection approaches with better accuracy than manual interventions [5, 6]. This paper helps to introduce techniques of image processing for detection of diseases in different plants.

2 Related Work

In this section, different methods of detection of plant diseases have been discussed using various image processing techniques.

In 2015, Rama Krishnan et al. [2] used the backpropagation algorithm for detecting the diseases in groundnut leaflets. Though colored images gave a higher accuracy, but limited diseases were detected. Padol et al. [4] used K-means clustering approach for detecting diseases in grape leaves in 2016. Though Support Vector Machine (SVM) was also used to classify the unhealthy leaves, the scope of accuracy improvement was also limited. Shaikh et al. [5] used Bi-level Thresholding technique with Gray-level Co-occurrence Matrix (GLCM) in Hidden Markov Model (HMM) for detecting diseases in citrus plant leaves. The results proved good accuracy in classifying and extracting the diseased parts. Kshir Sagar et al. [6] used MATLAB for implementing Multi-SVM and K-means algorithms for extracting feature from diseases of plants and fruits utilizing GLCM. Gandhi et al. [7] contributed solutions for detecting diseases in more than 150 crops using convolutional neural networks with Deep Learning approach in 2019. The model worked well with mobile and laptop mode but still required a physical intervention of farmers for image capturing. In 2020, Rama Thunnisa et al. [8] and Gomathy et al. [9] used SVM and clustering approaches, respectively, to detect diseases in vegetable plants. Saktidasan et al. [10] also used combination of Principal Component Analysis (PCA) and SVM with K-means algorithm to obtain better results. Singh et al. [11] to used latest approaches of Random Forest classifiers and Deep Learning for early plant disease detection with large datasets. But still, a limited accuracy was achieved in the results. A brief review of the recent work done is given below in Table 1.

Table 1 Brief review of work done

3 Requirement of Hardware and Software

3.1 Components

  • ESP-32 Microcontroller.

  • Soil Moisture Sensor.

  • DHT11 Temperature and Humidity Sensor.

  • Submersible 3-6 V DC Pump.

3.2 Software Utilized

  • Blynk application.

  • Arduino IDE.

  • MATLAB.

4 Working

The circuit details of the project and its layout are shown in Figs. 1 and 2, respectively. The basic steps of the suggested methodology are given in Fig. 3. The flow description for the implementation steps is also shown in Fig. 4.

Fig. 1
A circuit diagram comprises E S P 32 W R O O M 32, soil moisture sensor, D H T 11, relay, submersible 3 to 6 volts D C water pump, and 6 volts battery.

Circuit details

Fig. 2
A schematic flow diagram describes the steps to first click an image, then upload the image to MATLAB and process, followed by image processing, segmentation, k-means, and classification into disease detected and no disease detected. Water the plants based on the results.

Schematic representation

Fig. 3
A flow diagram presents the steps involved in the methodology of the detection of plant diseases. They are image acquisition, image preprocessing, image segmentation, feature extraction, training, classification, and recognition.

Suggested methodology

Fig. 4
A flow diagram involves the following steps. Capture an image, image processing, image segmentation, applying the k-mean algorithm, and image classification. If the leaf has a disease, do not water the plant. If the leaf is healthy, water the plant after checking soil moisture and humidity.

Flow description of Implementation steps

These steps are explained as:

4.1 Acquiring the Image

First of all, colored images of the leaflets were taken through a high-resolution mobile camera. These were uploaded to a folder [13, 21, 22].

4.2 Initialization of the Image

This step is difficult as it is highly prone to noisy effects. The image is curtailed into size 256 × 256 using the Otsu technique of thresholding. This helps in classifying the given pixels into twin categories.

4.3 Segmenting the Image

The information in the colored images is divided into three characteristics, namely ‘L’, ‘a’ and ‘b’, relating to light, red or green and blue or yellow values. After this conversion, K-means algorithm was utilized to segment the image into three clusters [5, 6, 14], as follows:

  1. (a)

    The given data were assigned a number for cluster. Here K = 3.

  2. (b)

    The mean was selected.

  3. (c)

    The length amidst the points of data and mean were calculated utilizing Euclidean distance (utilizing the maximum distance as the criteria).

  4. (d)

    The points of data nearer to the mean must be unchanged.

  5. (e)

    The points of data closer to the mean value must be moved to adjoining cluster [9].

4.4 Extraction of Features

Each cluster selected in the previous step is utilized for extracting the features. The colored or RGB images are converted into grayscale digital images to express the intensity of the leaf diseases in the range 0–1. Only a limited number of pixels are selected that are necessary and adequate to characterize the entire segment of an image. The contrived area within the histogram of data or the image is used to indicate its frequency of occurrence. The affected area (in %) in an image relates to the ratio of the region of plant disease to the total area of the leaf used and reflects the image quality of the healthy plants. A GLCM was used to describe the steadiness of an image using the dimensional connection from the pixels of the image. Features like such as contrast, energy, homogeneity, correlation, mean and skewness were reclaimed from the matrix [14]. These are given as:

  1. (1)

    Contrast estimates the extremity between a picture element and its adjoining pel over a proper image. For a constant image, the value is zero.

  2. (2)

    Energy quantifies the level of fidelity between squared elements totalized in a matrix with levels amidst zero and one. For a constant image the value is one.

  3. (3)

    Homogeneity weighs the level of affinity amidst the pixels. For a constant image, the value is one.

  4. (4)

    Correlation evaluates the relationship amidst a pel value with its nearby values betwixt −1 and 1. [15].

  5. (5)

    Mean estimates the average of the samples over a finite number of samples.

  6. (6)

    Skewness is a measure of lack of symmetry.

4.5 Classification

Fig. 5
A diagram of the S V M classifier has dark dots on the left of the 3 oblique lines and circles on the right of the lines. These dots and circles are labeled support vectors, the middle line is labeled hyperplane, and the distance between the sidelines is labeled margin.

Support Vector Machine classifier [10]

SVM has been used as a two-fold classifier for classifying the consistency in different pattern acknowledgement applications. The notion of SVM is to generate a hyper-plane betwixt sets of data for indicating the classes they belong to [14]. Specimens nearer to the brink are chosen for resolution of the hyper-plane, as shown in Fig. 5.

For the experiment, a collection of normal and abnormal leaflets of Sigonia, Bhindi (Abelmoschus esculentus), Brinjal (Solanum melongena) and Karela (Momordica charantia) plants were taken. These are shown in Figs. 6 and 7, respectively, and denoted as plants P1, P2, P3, P4 and P5. Generally, the plants are affected by common diseases, such as Alternaria alternata, Anthracnose, Bacterial blight and Cercospora leaf spot. For detecting the most diseased plants, a mean of all pretentious areas was calculated for each plant to discriminate between the normal and damaged leaves in terms of accuracy of the algorithm used. The results helped to automatically water the healthy plants through the Blynk app software in the plant health tracking system once the soil parameters are checked using hardware components.

Fig. 6
11 photographs of healthy leaves of different plants such as Sigonia, Bhindi, Brinjal, and Karela.

Normal leaflets

Fig. 7
11 photographs of diseased leaves of different plants such as Sigonia, Bhindi, Brinjal, and Karela.

Damaged leaflets

The complete project images are shown in Figs. 8a–d.

Fig. 8
5 photographs. A and B have the prototype of the project model which comprises a 6 volts battery, E S P 32 microcontroller, temperature and humidity sensor, relay module, and soil moisture sensor. C, D, and E have the placement of sensors in a flowerpot.

ad Complete project images

5 Results

Highly pretentious diseased areas in plants were observed utilizing the k-mean clustering approach with SVM. The moisture, temperature and humidity parameters of the soil were continuously checked through the hardware components. The Blynk app successfully displayed the alerts for automatic watering of the plants. The detection of plant diseases with desirable accuracy is given in Table 2.

Table 2 Accuracy (in %) of the project for detecting diseases upon various abnormal leaves of plants

A brief comparison of the proposed technique with the existing methods is also summarized in Table 3 below.

Table 3 Comparison of accuracy (in %) of the proposed technique with the existing techniques

6 Conclusion

A nominal board utilizing sensors for detecting the real-time diseases in plants is introduced in the paper. A majority of common diseases in plants have been detected by the proposed technique with high accuracy. The technique currently limits the results obtained only from a few plants. Also, manual intervention of farmers is necessary for acquiring the images for calculating the detection accuracy.

However, the scope of the utility can be extended to other crops, fruits or vegetables also with the possibility of identification of more diseases utilizing better algorithms. The manual process of capturing the images may also be mechanized to extend the benefits of the proposed solution to a large part of the society and the country.