0% found this document useful (0 votes)
35 views14 pages

Conference Paper 05 12

This paper presents a method for plant disease segmentation and severity detection using Canny edge detection and HSV color segmentation to classify leaf regions into healthy, rust, and scab categories. The approach involves preprocessing leaf images to remove backgrounds, generating multi-class masks, and training deep learning models for accurate disease detection. The proposed solution aims to improve agricultural productivity by enabling early detection and targeted treatments for plant diseases.

Uploaded by

godan32794
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views14 pages

Conference Paper 05 12

This paper presents a method for plant disease segmentation and severity detection using Canny edge detection and HSV color segmentation to classify leaf regions into healthy, rust, and scab categories. The approach involves preprocessing leaf images to remove backgrounds, generating multi-class masks, and training deep learning models for accurate disease detection. The proposed solution aims to improve agricultural productivity by enabling early detection and targeted treatments for plant diseases.

Uploaded by

godan32794
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Plant Disease Segmentation and Severity

Detection using Canny Edge Detection

Yash Kaushik1, Atul Kumar2, Vagarth Verma3, Yashvi Agarwal4 and Santosh Kumar
Upadhyay5
1,2,3,4,5
Computer Sciences and Engineering Ajay Kumar Garg Engineering College Ghaziabad, India
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Abstract: Agriculture isa the most crucial part of a country’s economy thus it becomes
very important to introduce new technologies in this field to get better outcomes. The
yield highly depends on the health of crops and their treatment. Various technologies
have been introduced to detect diseases on leaves. This paper will discuss how to
segment multiple diseases on a leaf so that they can be detected and then cured. This
begins with pre-processing on the leaf using canny edgea detection to remove the
background and masking the image. Masks are classified into healthy, rust and scab. The
generated masks are combined into a single multi mask as- background=0, healthy=1,
rust=2, scab=3. Now this processed data is used for training and validation for models.
Canny edge detection algorithm is used here for segmentation. It uses convolutional and
pooling layers for pixel wise segmentation of diseased regions. It helps to identify
multiple disease patterns on the leaf. This algorithm works on every pixel that belongs to
one of the predefined classes. The model has a fixed number of epochs with a batch size
for which it has been trained. Thus, quantitative analysis can be done which can predict
severity of the disease and what measures to be taken to cure it.
Keywords: Canny edge detection· Segmentation · Plant disease · Scab ·
Rust · Mask image

1. Introduction
To ensure food and minimize crop losses, the early detection of plant disease is necessary.
The main problem faced by traditional manual inspection methods is that it is time
consuming and prone to human errors. It may also require domain expertise [14,15]. In
recent years, there have been advancements in deep learning and computer vision to
facilitate precise agriculture techniques and early detection [2][3][4] strategies by using
automated plant disease detection [5][6][7] and segmentation [18]. Advancement of
machine learning helps researchers to solve different agricultural issues like crop
recommendation [22][23], yield prediction [24][25], and disease detection [26]. This
research focuses mainly on using modern day image processing techniques and deep
learning-based segmentation models in order to detect, identify and classify infected regions
[8] on the plant leaf. This study focuses on traditional methods in computer vision (such as
edge detection and color-based segmentation) [17] in order to perform multi class
segmentation. The multi class masks are being generated by preprocessing the leaf images
which includes background removal and these help the model in learning to differentiate
between healthy parts and parts affected by rust and scab diseases. The scab disease is
caused by numerous fungi and pathogens, but in apple plant, the primary source of scab
infection is Venturia inadequacies. The dark and velvety spots that appears on stem, fruit or
leaves suggests the presence of the fungi infection. The infected area appeared to be a little
elevated and cracked over a period of time. The premature or yellowing of the leaves also
suggests the presence of the scab infection in the plant. The scab infection causes reduction
in the quality of the fruit of the plant and if not treated properly could reduce the
photosynthetic ability of the plant. This disease is spring season dominated disease and
found in cold and moist conditions. The spreading agents includes wind, rain and infected
debris. The rust disease on the contrary is caused by rust fungi that belongs to species like
Puccinia or Uromyces genus. The orange, red or brown pustules on the lower side of the
stems or the leaves suggests the presence of the rust fungi on the plant. Over period of time,
the leaves may become yellow and may also wither. If the infection is severe, the plants
yield drops and plants become weak. This leads to economic losses. If the infection persists
for long period of time, the productivity and vigor of plants reduces. This leads to drop in
quality and quantity of yield. Rust dominates in humid conditions with moderate to high
temperatures. The spreading agents that accelerate the spread includes windborne spores
which can affect large areas within short period of time. The preprocessing part uses Canny
edge detection [1] to isolate the leaf regions and HSV-based color segmentation to isolate
key features of the infected area. These preprocessing steps ensure that the model receives
high quality of input for further processing thus facilitating more accurate infected area
segmentation. The rough edges of the stuck healthy umbrella cover, rust and the scab
regions are all united to present a single multi class mask. The Canny edge detection
technique is being used on this high-quality input dataset to give segmented images as a
result, where each pixel belongs to a specific type of class: healthy, rust, scab or
background pixels. Comparison between scab and rust is shown in table 1. In order to
segment the leaf into three classes, which are healthy, rust diseased and scab diseased
leaves, the HSV, that is, hue, saturation and value color space is utilized. This paper states
the methodology details for preprocessing the images of plant leaves, generating the multi-
class masks and training a segmentation model based on deep learning for disease
segmentation. The approach proposed in this paper provides a scalable solution towards
plant disease diagnosis automation and has the potential to enable early detection and target
oriented treatments and thus improving agricultural productivity significantly. By providing
demonstration of the applications of above-mentioned techniques, this research aims at
providing a contribution to growing work on the field of integrating computer vision
techniques with machine learning to provide precision in agriculture, providing a
foundation for further advancements in automated plant health monitoring systems.

Table 1. Comparison between Scab and Rust diseases.

Aspects Scab Rust

Primary Target Leaves, fruits, stems Leaves, stems, and sometimes


flowers
Symptoms Velvety dark spots, deformities Reddish pustules, leaf
discoloration
Spread Rain, wind, plant debris Airborne spores, humid
conditions
Management Fungicides, resistant varieties Fungicides, crop rotation,
resistant varieties
2. Literature Review

Edge detection techniques including Canny edge detection [1] and its variants are explored
for its applications in plant disease detection automation. The study shows how effective is
the algorithm in detecting boundaries and areas having high intensity, thus helping in tasks
including leaf disease segmentation and infected area classification. However there still
exists challenges in handling overlapping regions or regions having low contrast and direct
classification without proper segmenting the infected areas which sometimes leads to
reduced accuracy because of false results. The integration of edge detection with machine
learning and deep learning frameworks shows potential but still requires further
improvements for proper applicability in real world

Rice Crop Diseases, and Pest Detection Using Edge Detection Techniques and
Convolution Neural Network. P. Muruganandam et al. [9] discussed about how edge
detection methods along with CNN are used to detect pests and diseases in rice crops. The
study was unable to increase the CNN model’s accuracy in complex situations.

Leaf Classification and Identification Using Canny Edge Detector and SVM Classifier.
Salman et al.[10] use Canny Edge detection variants and studied the use of Canny edge
detection algorithm variants and studied the modified Canny edge detection algorithm in
domains such as leaf classification. It differentiated the sharp boundaries or areas with high
intensity that highlights the boundaries. But the result in overlapping areas or areas having
low contrast were not apt.

Leaf Disease Detection using Image processing. Suja Radha et al.[11] discussed the use of
machine learning classifiers. The study focused on the use of the classifiers like SVM and
Random Forest in classification of disease. The classification relies mainly on features that
are extracted from the leaf. These includes the color, texture and pattern on the leaves. The
study directly classifies without doing proper segmentation which lead to the generation of
false results.

Determinations of Common Maize Disease Detection Using Gray-Level Segmentation, and


Edge-Detection Technique. D. J. M. Bonifacio et al.[12] utilized gray-level segmentations to
the maize diseases to determine the edge detection method. Nevertheless, the established
models still need to be effectively generalized across different types of maize diseases.

Computer-aideda, Agriculture Developmenta for Crop Disease Detection by Segmentation


and Classification Using Deep Learning. N. Raj et al.[13] talked about the application of
deep learning architectures for segmentation and classification in crop disease detection in
Computer-aided, Agricultures Development for Crop Disease Detection by Segmentation
and Classification Using Deep Learnings . More research is required to confirm the model’s
suitability and effectiveness in real- world scenarios.

D. Zhang et al. [14] discussed the use of image processing techniques for detecting rust
through multispectral imaging in soyabean plants. They collected the images of the leaves
that have been infected by the rust disease. Thereafter, they applied segmentation on those
images to extract out the infected areas that represented the region of interest and used this
segmentation to calculate the severity of the infection on the plant leaves.
Tian Y. et al. [15] discussed about the use of hyperspectral imaging in order to detect the
infected cucumber leaves infected due to pseudoperonospora cubensis . The study further
demonstrated that this technique can differentiate between healthy and infected regions on
the leaves with higher efficiency. This helped in early detection and early treatment.

Murali Krishnan et al. [16] worked on detecting infected area on leaf infected by bacterial
leaf scorch(BLS) caused by bacteria known as Xylella fastidiosa and used K-means
clustering for segmenting out the infected areas on leaves as region of interest. This proved
to be a non-destrtuctive approach.

3. Methodology
The project methodology comprises an orderly procedure in devising, testing and
implementing the deployed solution for leaf disease detection and leaf disease
segmentation. This strategy uses advanced image processing techniques such as Canny
Edge Detection and HSV color segmentation to locate and measure diseased areas of a
single leaf. The steps involved are as follows:
3.1. Dataset Overview This dataset is from competition that targets multi-class
classification of apple leaf diseases. It has reasonably clear pictures of the leaves
categorized into healthy leaves, those with scab, those with rust, or leaves with
several diseases. The meta files provided include train.csv (source of labels for
training), test.csv (source of labels for evaluation), and an empty submission
template.
3.2. Exploratory Data Analysis (EDA)
Class Imbalance Based on the observation, Carys[21] and her colleagues
suspected about the classes, specifically in multiple diseases class where not
enough instances were found. Some methods such as resampling or data
augmentation were attempted for the purpose of dataset balancing.
Image Features RBG histograms, distribution of pixel intensity values, color
transformation such as HSV were analyzed to see patterns specific to the target
diseases.
3.3. Preprocessing Phase
Background Removal as a preprocessing step, the Canny Edge Detection tool is
used to remove the background focusing only on the leaf region: The input image
is converted to black and white to ease the process of detecting outlines. A
Gaussian Blur was applied to include some noise and enhance the accuracy of the
edge detection mechanisms. Canny Edge Detection is employed to bring out
abrupt changes in the intensity of pixels. To cover the background, contours
around the perimeter of the edges are located and circles drawn around the edges.
Bitwise operations were applied over the image of the leaf region that has
shadow.
The Canny edge flowgraph is as shown in fig 1.
Fig. 1. Cannya Edge Detection Flowchart

3.4. Color Segmentation Disease Mask Generation


In order to segment the leaf into three classes, which are healthy, rust diseased and
scab diseased leaves, the HSV, that is, hue, saturation and value color space is
utilized. For all three classes, the following ranges are set for the HSV values for
healthy leaves light green: [25*40*40] to [85*255*255]. For leaves with rust,
orange: [5*50*50] to [20*255*255]. For scab affected regions dark red brown:
[0*50*50] to [10*255*255].
3.5. Multi-Class Mask Creation
The rough edges of the stuck healthy umbrella cover, rust and the scab regions are
all united to present a single multi class mask, in which:
1st Class Represents the areas that were healthy.
2nd Class The regions which were affected by rust.
3rd Class Scab affected regions[19].
3.6. Determining Disease Severity:
Rust and scabs are both rated depending on their coverage area in proportion to the
entire leaf area: Count all of the non-zero pixels that represent the leaf area’s total.
Count all pixels that are corresponding to the rust region (class 2) and the scab
region (class 3). Determine the total leaf area that is covered by both rust and scab
as a percentage:
Rust Severity = Rust Area × 100 / Total Area

Scab Severity = Scab Area × 100 / Total Area

3.7. Deployment and Visualization

The image processing pipeline consists of multiple branches and is capable of


delivering the following results: A processed image without the noise. A disease
mask with three regions of interest such as healthy, rust, and scab regions. A
graphical view depicting the rust and scab percentages in the form of a bar plot.
The final output is the image of a leaf with areas of interest superimposed on it.
Preprocessed image is shown in fig 2

4. Proposed Solution

4.1. Overview
The proposed solution addresses the challenge of detection of multiple diseases on
a single leaf such as rust and scab while also being able to identify the healthy
regions. This is achieved through the integration of Canny Edge Detection to
eliminate backgrounds and HSV color segmentation in order to classify the leaf
into healthy, rust, and scab regions. Furthermore, actionable information is given as
the levels of severity of the rust and scab diseases are also measured.

4.2. Image Preprocessing Canny Edge Detection


Canny Edge Detection [20] in this instance carries out the preliminary step of drone
flight aimed imaging objects and prepares for disease mapping in a three-drone
system. The process involves three interrelated tasks: edge detection, con- tour
tracing, and masking which results in isolating the leaf region and omitting
extraneous material especially noise or background. This stage of the research
confirms the lack of non-leaf material when it comes to disease segmentation and
only the leaf portion is focused on.

Fig. 2. Preprocessed Image

4.3. Disease Segmentation in Using HSV Color Space


The solution employs per leaf-based approach and employs HSV color
segmentation for region assistance: Healthy regions are of light green hues, Rust
regions are of orange hues, and Scab regions usually are of dark red brown for the
scab distal regions. For each category, binary masks are generated and later merged
into a multi-class mask. This unified mask allows to classify the identified regions
in the following way: Class 1 – contains healthy regions, Class 2 – depicts rust
regions, and Class 3 – shows scab regions.
4.4. Calculating Disease Severity
Determine the total leaf area that is covered by both rust and scab as a percentage:

Rust Severity = Rust Area × 100 / Total Area

Scab Severity = Scab Area × 100 / Total Area

4.5. Standing Out in the Crowd


On practical terms while comparing to the traditional approaches this
recommended solution has its own benefits. Background elimination: Leaf
background image is identified by Canny Edge Detection without additional
trimming. Decentralization: Centralized processing or third-party oracles are
unnecessary reducing or eliminating inefficiency altogether. Accurate measurement
of severity: The amount of rust and scab is calculable to take action. Good
visualization: Illustrating damaged and undamaged portions to facilitate problem
assessment in situ on the leaf. Moving forward on these gaps, the solution proposes
a new, standards compliant, easy to understand and most importantly a scalable
procedure for the task of leaf disease detection and segmentation as shown in fig 3.
Fig. 3. Proposed Solution

5. Results and Discussion


A comprehensive analysis on pixel values of the particular images and after several trials we have
the results.

5.1. Pixel Analysis

The very first step was to analyze the pixel value. We calculated the mean values
of the red, green, blue and total pixel intensities for all the images in the datasets
to analyze color intensity distribution. This part helps to aggregates color-based
metrics for statistical insights

5.2. Preprocessed Image

The preprocessing involves using Canny Edge Detection that helps to detect leaf
edges and removal of the background.

Version 1 In this first attempt we directly create the mask as a white canvas and
fills the contours. With no extra description or segregations were done as shown in
fig 4.
Fig. 4. Version 1

Version 2 From the first attempt the functionality is similar but there is logical
segregation which is more explicit as shown in fig 5.

Fig. 5. Version 2

5.3. Mask Image

The color segmentation which is HSV color segmentation technique effectively


generates masks for each category healthy, rust and scab regions using
predefined color ranges. Class 1 Healthy region(green), Class 2 Rust-affected
regions(orange) and Class 3 Scab-affected regions(red).

5.4. Disease Severity

Rust and Scab severities are expressed in percentage of total leaf area as shown
in fig 6. The simulated result is shown in fig 7.

Rust Severity Percentage of leaf area which is injured with rust.


Scab Severity Percentage of area affected with scab respectively. These
parameters provide useful quantitative information on the level of the disease,
which is beneficial for making agricultural decisions.

Fig. 6. Disease Severity

Fig. 7. Simulated Result


5.5. Visualization

The color segmentation which is HSV color segmentation technique effectively


generates masks for each category healthy, rust and scab regions using predefined
color ranges and provide a bar graph which shows disease severity [19] as shown in
fig 8.

Fig. 8. A Bar Graph

6. Conclusion

The paper talks about automated detection and segmentation of multiple disease in plants
and leaves classified as scab and rust specifically. The methodology includes computer
vision techniques such a s canny edge detection, HSV based color segmentation techniques.
It generates high quality mask images that classify pixels into healthy, rust, scab and
multiple. These provide foundation for using deep learning segmentation models by which
the disease accuracy and severity can be detected.

It is highly important to detecta the diseases at an early stage for maintaining the health of
the plants. It is equally essential to be able to detect multiple disease and their severity to
find its treatment and cure. The technique is to merge image processing and machine
learning to generate accurate diagnosis for plant disease and to be able to work on efficient
solution. The result demonstrates the potential of this technique and improving agriculture
sector.
References

1. Tian, Y., & Zhang, L. (2012). Study on the methods of detecting cucumber downy mildew
using hyperspectral imaging technology. ScienceDirect, 11(5), 743–750.
2. Upadhyay, S. K., & Kumar, A. (2021). Early-stage brown spot disease recognition in paddy
using image processing and deep learning techniques. Traitement du Signal, 38(6), 1755–
1766. https://doi.org/10.18280/ts.380619
3. Upadhyay, S. K., & Kumar, A. (2022). A novel approach for rice plant diseases
classification with deep convolutional neural network. International Journal of Information
Technology, 14, 185–199. https://doi.org/10.1007/s41870-021-00817-5
4. Rukhsar, & Upadhyay, S. K. (2022). Rice leaves disease detection and classification using
transfer learning technique. 2022 2nd International Conference on Advance Computing and
Innovative Technologies in Engineering (ICACITE), 2151–2156.
https://doi.org/10.1109/ICACITE53722.2022.9823596
5. Upadhyay, S. K., & Kumar, A. (2022). An accurate and automated plant disease detection
system using transfer learning-based Inception V3 model. 2022 2nd International
Conference on Advance Computing and Innovative Technologies in Engineering
(ICACITE), 1144–1151. https://doi.org/10.1109/ICACITE53722.2022.9823559
6. Rukhsar, & Upadhyay, S. K. (2022). Deep transfer learning-based rice leaves disease
diagnosis and classification model using InceptionV3. 2022 International Conference on
Computational Intelligence and Sustainable Engineering Solutions (CISES), 493–499.
https://doi.org/10.1109/CISES54857.2022.9844374
7. Upadhyay, S. K., & Kumar, A. (2023). Automatic recognition and classification of tomato
leaf diseases using a transfer learning model. Future Farming: Advancing Agriculture with
Artificial Intelligence, 1(23). https://doi.org/10.2174/9789815124729123010005
8. Upadhyay, S., Jain, J., & Prasad, R. (2024). Early blight and late blight disease detection in
potato using EfficientNetB0. International Journal of Experimental Research and Review,
38, 15–25. https://doi.org/10.52756/ijerr.2024.v38.002
9. Muruganandam, P., Tandon, V., & Baranidharan, B. (2022). Rice crop diseases and pest
detection using edge detection techniques and convolutional neural network. In J. C. Bansal,
A. Engelbrecht, & P. K. Shukla (Eds.), Computer Vision and Robotics. Algorithms for
Intelligent Systems. Springer, Singapore.
10. Salman, A., Semwal, A., Bhatt, U., & Thakkar, V. M. (2017). Leaf classification and
identification using Canny edge detector and SVM classifier. 2017 International Conference
on Inventive Systems and Control (ICISC), Coimbatore, India.
11. Radha, S. (2017). Leaf disease detection using image processing. Journal of Chemical and
Pharmaceutical Sciences.
12. Bonifacio, D., Pascual, A. M. E., Caya, M. V. C., & Fausto, J. C. (2020). Determination of
common maize (Zea mays) disease detection using gray-level segmentation and edge-
detection technique. 2020 IEEE 12th International Conference on Humanoid,
Nanotechnology, Information Technology, Communication and Control, Environment, and
Management (HNICEM).
13. Raj, N., Perumal, S., Singla, S., Sharma, G. K., Qamar, S., & Chakkaravarthy, A. P. (2022).
Computer-aided agriculture development for crop disease detection by segmentation and
classification using deep learning architectures. Computers and Electrical Engineering, 103,
108357.
14. Cui, D., Zhang, Q., Li, M., Hartman, G. L., & Zhao, Y. (2010). Image processing methods
for quantitatively detecting soybean rust from multispectral images. ScienceDirect, 22(4),
186–193.
15. Tian, Y., & Zhang, L. (2012). Study on the methods of detecting cucumber downy mildew
using hyperspectral imaging technology. ScienceDirect, 11(5), 743–750.
16. Krishnan, M., & Sumithra, M. G. (2013). A novel algorithm for detecting bacterial leaf
scorch (BLS) of shade trees using image processing. IEEE 11th Malaysia International
Conference on Communications.
17. Radha, S. (2017). Leaf disease detection using image processing. Journal of Chemical and
Pharmaceutical Sciences.
18. Katyal, V., & Aviral. Leaf vein segmentation using odd Gabor filters and morphological
operations.
19. Devaraj, A., Rathan, K., Jaahnavi, S., & Indira, K. (2019). Identification of plant disease
using image processing technique. International Conference on Communication and Signal
Processing.
20. Sannakki, S. S., Rajpurohit, V. S., & Birje, S. J. (n.d.). Comparison of different leaf edge
detection algorithms using fuzzy mathematical morphology. International Journal of
Innovations in Engineering and Technology (IJIET).
21. Christine Kaeser-Chen, Fruit Pathology, Maggie, and Sohier Dane authored the Plant
Pathology 2020 - FGVC7 dataset, released in 2020.
22. Upadhyay, S. K. and Vikas, "Intelligent Crop Recommendation using Machine
Learning," 2024 International Conference on Automation and Computation (AUTOCOM),
Dehradun, India, 2024, pp. 330-335, doi: 10.1109/AUTOCOM60220.2024.10486182
23. Upadhyay, S. K, Upadhyay, H., Tripathi, H., Rawat, K. P. and Sharma, L. (2024). Smart
Crop Recommendation for Modern Farming using Machine Learning, 1st International
Conference on Advanced Computing and Emerging Technologies (ACET), Ghaziabad, India,
2024, pp. 1-7, doi: 10.1109/ACET61898.2024.10730582.
24. Upadhyay, S. K., Kushwaha, P. and Garg, P. (2024). A Machine Learning Approach for
Predicting Crop Yield in Precision Agriculture, International Conference on Automation
and Computation (AUTOCOM), Dehradun, India, 2024, pp. 289-294, doi:
10.1109/AUTOCOM60220.2024.10486160.
25. Upadhyay, S. K., Kushwaha, P., Garg, P.,Pandey, M. N. and Kumar, M. (2024). Predictive
Insights in Precision Agriculture: Leveraging Deep Learning for Crop Yield Estimation,
IEEE International Conference on Smart Power Control and Renewable Energy
(ICSPCRE), Rourkela, India, 2024, pp. 1-6, doi: 10.1109/ICSPCRE62303.2024.10675180.
26. Upadhyay, S.K., Singh, R., Kumar, A., Sagar, N. (2024). Rice Leaves Disease Detection
Mechanism Using VGG16 Deep Learning Architecture. In: Bhattacharya, A., Dutta, S.,
Dutta, P., Samanta, D. (eds) Innovations in Data Analytics. ICIDA 2023. Lecture Notes in
Networks and Systems, vol 1005. Springer, Singapore. https://doi.org/10.1007/978-981-97-
4928-7_17

You might also like