Implementation of RGB and Grayscale Images in Plant Leaves

Indian Journal of Science and Technology, Vol 9(6), DOI: 10.17485/ijst/2016/v9i6/77739, February 2016
ISSN (Print) : 0974-6846
ISSN (Online) : 0974-5645
Implementation of RGB and Grayscale Images in
Plant Leaves Disease Detection – Comparative Study
K. Padmavathi1* and K. Thangadurai2
Research and Development Centre, Bharathiar University, Coimbatore - 641046, Tamil Nadu, India;
[email protected]
2
PG and Research Department of Computer Science, Government Arts College (Autonomous), Karur - 639007,
Tamil Nadu, India; [email protected]
1
Abstract
Background/Objectives: Digital image processing is used various fields for analyzing different applications such as
­medical sciences, biological sciences. Various image types have been used to detect plant diseases. This work is ­analyzed
and compared two types of images such as Grayscale, RGB images and the comparative result is given. Methods/Statistical
Analysis: We examined and analyzed the Grayscale and RGB images using image techniques such as pre processing,
­segmentation, clustering for detecting leaves diseases, Results/Finding: In detecting the infected leaves, color becomes an
important feature to identify the disease intensity. We have considered Grayscale and RGB images and used median ­filter
for image enhancement and segmentation for extraction of the diseased portion which are used to identify the ­disease
level. Conclusion: RGB image has given better clarity and noise free image which is suitable for infected leaf detection than
Grayscale image.
Keywords: Comparison, Grayscale Images, Image Processing, Plant Leaves Disease Detection, RGB Images, Segmentation
1. Introduction
Images are the most important data for analysation of
image processing applications. Various types of images
are used for data analysiss The digital image I(r,c) is represented as a two dimensional array of data, where the
data of each co-ordinate at point (r,c) corresponds to the
brightness of the image at that point.
In digital image, a pixel is a smallest unit of image that
can be controlled and addressable by coordinates and the
intensity of each pixel is variable. They are represented in
a 2-D matrix.
The Different types of digital images are:
1. Binary Image: Binary image is the simplest type of
image and has two values, black and white or ‘0’ and
‘1’. The binary image is referred to as a 1 bit/pixel image
because it takes only one binary digit to represent each
pixel.
*Author for correspondence
2. Grayscale Image: Grayscale image is a monochrome
image or one-color image. It contains brightness
information only and no color information. Then
grayscale data matrix values represent intensities. The
typical image contains 8 bit/pixel allows the image to
­represent (0-255) different brightness (gray) levels.
3. Indexed Image: An indexed image consists of an array
and a colormap matrix. The pixel values in the array
are direct indices into a colormap. The colormap
matrix is an m-by-3 array which is contained floating-point values in the range [0,1]. Each row specifies
the red, green, and blue components of a single color.
An indexed image uses direct mapping of pixel values
to colormap values.
4. RGB Image: RGB image does not use a color map and
an image is represented by three color component
intensities such as red, green, and blue.RGB image
uses 8-bit monochrome standard and has 24 bist/pixel
where 8 bist for each color (red, green and blue).
Implementation of RGB and Grayscale Images in Plant Leaves Disease Detection – Comparative Study
2. Related Works
Digital image processing is a technique which is used and
implemented in various areas of biology. It helps to identify
and analyse the problem1. Plant leaves diseases detection
and diagnostic method is a scientific method. The photographic images are used to implement in the leaves disease
detection process. The photographic digital images are
transferred into a particular form2. The Image pre-processing is a method, used to transfer the original images
into another form. In plant leaves disease detection, captured photographic images are used. There are noises in
the images, the regions of interest in the image is not clear
or other interference appears in the image3. The image preprocessing is used to get clear, noiseless enhanced leaves
images. This enhanced images are used to leaves diseases
detection and analysation process. Various types of images
are used in image pre-processing. The selection of image
type differs based on the processing area, implementation
of mathematical calculation and application. Generally,
plant leaves image color and texture are an unique features,
which are used to detect and analyse the diseases and their
level3.This paper considers Grayscale and RGB images of
infected plant leaf detection and analysation and gives the
solution which is suited for the disease occurrence.
3.2 Image Pre-processing
3.2.1 Image Filtering
Median filter is a nonlinear smoothing filter which is used
to remove impulsive noise and reduce blurring of edges of
plant diseased leaves. The median filter takes each pixel in
the image and evaluates at its nearby neighbours to decide
whether or not it is representatives of its surroundings. It is
replacing the pixel value with the median of neighbouring
pixel value; it replaces it with the median of those values.
The pattern of neighbours is called “Window” which
slides pixel by pixel over the whole image. The median
is calculated by first sorting all the pixel values from the
window and replacing the pixel being considered with the
median pixel value. Median in a neighbour is not affected
by individual noise spikes.
3.2.2. Image segmentation
The proposed segmentation method uses enhanced
SRM using patches and labels. This evaluates the pixel
values within a region and grouped together based on
3. RGB Image Pre-Processing
3.1 RGB Image Representation
In the RGB model, each color represents the basic color
components Red, Green, and Blue. RGB color images are
represented in the RGB color model as red, green and
blue using 8-bit monochrome standard. The corresponding RGB color image has 24 bit/pixel – 8 bit for each color
band (red, green and blue). The RGB color represents to
referring to arrow or column as a vector, it can be referred
as a single pixel red, green and blue values as a color pixel
vector -(R,G,B). The color space representation is:
Figure 1. RGB pixel representation.
2
Vol 9 (6) | February 2016 | www.indjst.org
Figure 2. Filtered image using Median Filter.
Figure 3. Noise Removal using Red, Green and Blue
Channel.
Indian Journal of Science and Technology
K. Padmavathi and K. Thangadurai
using Density-based clustering approach, pixels in a
color image will be grouped into different clusters, and
these clusters form the final segmented regions of the
image.
4. Grayscale Image PreProcessing
Figure 4. Mutiscale segmentation – RGB Image.
4.1 Grayscale Image Representation
Grayscale images are represented by intensity values.
Grayscale images have many shades of gray in between
black and white. The intensity of a pixel value is represented within a given range between 0 and 1(minimum
and maximum) and in between varying range shades of
gray which ranges is between 0 and 255. The image pixels
are stored in binary, quantized form.
4.2 RGB Image to Grayscale Image
Conversion
Figure 5. Edge Detection of RGB Image.
the merging and produces results as a smaller list. This
is the process of segmentation based on color mapping
and clustering (for patching and labeling). The plant
diseased leaf image is mapped and patched depending
on colors and the regions were labeled using clustering.
Further, the segmented regions were separated by deleting other regions which are identified by labels. Thus the
plant leaf image is processed by patching and labeling for
­segmentation.
Color Mapping: The proposed enhanced SRM is used
for image segmentation under patching. The algorithm
evaluates the pixel values within a region and grouped
together based on the merging criteria. The plant leaves
input image is applied for color mapping, depend on the
color it forms are grouped of pixels and replaces minority colors by majority colors. Nine different levels of color
space threshold are applied as Q values for segmentation
grouping of pixel, merging to form patches and color
mapping.
Clustering: Clustering is a collection of similar values
in matrix or similar colored maps. Using color mapping,
the mapped regions are grouped and forming a cluster
which is called labelling. Depend on the segmented map
regions or grouped regions the labels are occurred. By
Vol 9 (6) | February 2016 | www.indjst.org
The captured diseased leaves image is in RGB image.
So it is necessary to convert from RGB to Grayscale for
Grayscale Image pre-processing. This method matches
the luminance of the grayscale image to the luminance
of the color image. First get the values of three primary
colors (Red, Green and Blue) and encodes this linear
intensity values using the gamma expansion. The gamma
expansion is:
C linear
C rgb

C rgb <= 0.04045

12.92
=
 (C rgb + 0.065) C > 0.04045
rgb

1.065
Here, Csrgb is RGB primaries which has the range from
0 to 1 and Clinear is the linear-intensity value which also
has the range from 0 to 1. Then the luminance of the output image is obtained using weighted sum of the three
linear intensity values. The conversion is obtained using
the function:
y = f(x)
Here, x is the original input data and y is the converted
output data. The function f(x) converts RGB values to
grayscale values using weighted sum of the R, G, and B
components:
f(x) = 0.2989 ∗ R + 0.5870 ∗ G + 0.1140 ∗ B
Indian Journal of Science and Technology
3
Implementation of RGB and Grayscale Images in Plant Leaves Disease Detection – Comparative Study
4.3.2 Image Segmentation
The proposed Grayscale image segmentation also uses
enhanced SRM using patches and labels. The result of the
segmentation and clustering process is:
(a)
(b)
Figure 6. (a) color image. (b) Grayscale image.
Figure 7. Filtered Grayscale image using Median Filter
5. Experiment Results
In plant leaf disease detection, we have taken two different types of images for processing and getting the results
for both processes. RGB image pre-processing has given
better results than Grayscale image pre-processing. The
color of plant leaves is important for analysis. Because
changed with the color is a major indicator of plant leaves
diseases. This can be used and measured for diseases level
easily.
6. Conclusion
Figure 8. Mutiscale segmentation – Grayscale Image.
In detecting the infection on leaves, Image Pre-processing
is a reliable and efficient way to identify a disease condition. It involves a collection of techniques that are used to
improve the quality and visual appearance of an image.
Plant leaves color and texture feature extraction are very
important for disease analysis. This paper has considered
and analysed two different types of images such as grayscale and RGB color images. According to the experiments
result, RGB image has given better results than Grayscale
image. RGB image has given clear, noise free image which
is better suited for human or machine interpretation.
7. References
Figure 9. Edge Detection of Grayscale Image.
4.3 Image Pre-processing
4.3.1 Image filtering
Median Filter is used for removing the noise. This implementation process is same as color image processing. The
result of this process is:
4
Vol 9 (6) | February 2016 | www.indjst.org
1. Arivazhagan S, Shebiah RN, Ananthi S, Varthini SV.
Detection of unhealthy region of plant leaves and classification of plant leaf diseases using texture features. Agric Eng
Int: CIGR Journal. 2013 Mar; 15(1):211–17.
2. Anami BS, Pujari JD, Yakkundimath R. Identification and
classification of normal and affected agriculture/horticulture produce based on combined color and texture feature
extraction. International Journal of Computer Applications
in Engineering Sciences. 2011 Sep; 1(3):356–60. ISSN:
2231-4946.
3. Badnakhe MR, Deshmukh PR. An Application of
K-Means Clustering and Artificial Intelligence in Pattern
Recognition for Crop Diseases. International Conference
on Advancements in Information Technology with workshop of ICBMG 2011, IPCSIT IACSIT Press, Singapore.
2011; 20:134–8.
Indian Journal of Science and Technology
K. Padmavathi and K. Thangadurai
4. Maini R, Aggarwal H. A Comprehensive Review of Image
Enhancement Techniques. Journal of Computing. 2010
Mar; 2(3):8–13. ISSN 2157-9617.
5. Arunpriya C, Thanamani AS. Fuzzy inference system algorithm of plant classification for tea leaf recognition. Indian
Journal of Science and Technology. 2015 Apr; 8(s7):179–84.
6. Mundhada SO, Shandilya VK. Spatial and transformation
domain techniques for image enhancement. International
Journal of Engineering Science and Innovative Technology.
2012 Nov; 1(2):213–16.
7. Rajput S, Suralkar SR. Comparative Study of Image
Enhancement Techniques. International Journal of
Computer Science and Mobile Computing - A Monthly
Journal of Computer Science and Information Technology.
2013 Jan; 2(1):11–21. ISSN 2320–088X – IJCSMC.
8. Hwang H, Haddad R. Adaptive Median Filters: New
Algorithms and Results. IEEE Trans Image Processing.
1995; 4(4):499–502.
9. Ananthi S, Varthini SV. Detection and Classification Of
Plant Leaf Diseases. International Journal of Research in
Engineering and Applied Sciences. 2012; 2(2):868–74.
ISSN: 2249-3905.
10. Sukassini. MP, Velmurugan T. A Survey on the Analysis
of Segmentation Techniques in Mammogram Images.
Indian Journal of Science and Technology. 2015 Sep;
8(s22):IPL0259.
11. Bedi SS, Khandelwal R. Various image enhancement techniques- A critical review. International Journal of Advanced
Research in Computer and Communication Engineering.
2013 Mar; 2(3):1605–09. ISSN (Print): 2319-5940, ISSN
(Online): 2278-1021.
12. Singh H, Sodhi JS. Image Enhancement using Sharpen
Filters. International Journal of Latest Trends in Engineering
and Technology (IJLTET). 2013 Mar; 2(s2):84–94.
13. Zhang M, Meng Q, Zhang M. Citrus canker detection based
on leaf images analysis. The 2nd International Conference
on Information Science and Engineering, IEEE, Hangzhou.
2011; 3584–87.
14. Patidar P, Srivastava S, Gupta M, Nagawat AK. Image denoising by various filters for different noise. International
Journal of Computer Applications. 2010 Nov; 9(4):45–50.
(0975 – 8887).
15. Grundland M, Dodgson NA. Decolorize, fast, contrast enhancing, color to grayscale conversion.
Computer Laboratory, University of Cambridge. 2007;
40(11):2891–96.
16. Kumar T, Verma K. A theory based on conversion of RGB
image to gray image. International Journal of Computer
Applications. 2010 Sep; 7(2):7–10. (0975 – 8887).
17. Bala R, Braun KM. Color to grayscale conversion to maintain discriminability. Xerox Innovation Group, 800 Phillips
Rd, 128-27E, Webster, NY 14580. 2003.
Vol 9 (6) | February 2016 | www.indjst.org
18. Ghaiwat SN, Arora P. Detection and classification of plant
leaf diseases using image processing techniques: A review.
International Journal of Recent Advances in Engineering
and Technology (IJRAET). ISSN (Online): 2347–2812.
2014; 2(3):1–7.
19. Krishnan M, Sumitha MG. A novel algorithm for detecting Bacterial Leaf Scorch (BLS) of shade trees using image
processing. Communications (MICC). 2013 IEEE Malasia
International Conference, IEEE Publication, kuala Lumpur.
2013. p. 474–8.
20. Dhaygude SB, Kumbhar NP. Agriculture plant leaf disease
detection using image processing. International Journal
of Advanced Research in Electrical, Electronics and
Instrumentation Engineering. 2013 Jan; 2(1):599–602.
21. Narvekar PR, Kumbhar MM, Patil SN. Grape Leaf Diseases
Detection and Analysis using SGDM Matrix Method.
International Journal of Innovative Research in Computer
and Communication Engineering. 2014 Mar; 2(3):3365–72.
ISSN (Online): 2320-9801, ISSN (Print): 2320-9798.
22. Ren X, Malik J. Learning a classification model for segmentation. Proceedings of 9th IEEE ICCV, Nice, France, 2003
Oct; 1:10–7.
23. Felzenszwalb P, Huttenlocher D. Efficient graph-based image
segmentation. Int J Comput Vis. 2004; 59(2):167–81.
24. Grady L. Random walks for image segmentation. IEEE Trans
Pattern Anal Mach Intell. 2006 Nov; 28(11):1768–83.
25. Sinop AK, Grady L. A seeded image segmentation framework unifying graph cuts and random walks which yields a
new algorithm. Proceedings of IEEE ICCV, Rio de Janeiro.
2007 Oct; 1–8.
26. Yang W, Cai J, Zheng J, Luo J. User-friendly interactive
image segmentation through unified combinatorial user
inputs. IEEE Trans Image Process. 2010; 19(9):2470–79.
27. Xiang S, Pan C, Nie F, Zhang C. Turbo Pixel segmentation using eigen-images. IEEE Trans. Image Process. 2010;
19(11):3024–34.
28. Patz T, Preusser T. Segmentation of stochastic images with
a stochastic random walker method. IEEE Trans Image
Process. 2012 May; 21(5):2424–33.
29. Fulkerson B, Vedaldi A, Soatto S. Class segmentation
and object localization with superpixel neighborhoods.
International Conference on Computer Vision (ICCV),
Kyoto. 2009. p. 670–77.
30. Yang Y, Hallman S, Ramanan D, Fawlkes C. Layered Object
Detection for Multi-Class Segmentation. In Computer
Vision and Pattern Recognition (CVPR), San Francisco.
2010; 3113–20.
31. Ning J, Zhang L, Zhang D, Wu C. Interactive image segmentation by maximal similarity based region merging.
Elsevier, Pattern Recognition. 2010; 43(2):445–56.
32. Tang J. A color image segmentation algorithm based on
region growing. 2010 2nd International Conference on
Indian Journal of Science and Technology
5
Implementation of RGB and Grayscale Images in Plant Leaves Disease Detection – Comparative Study
Computer Engineering and Technology (ICCET), Chengdu.
2010; 6:V6-634–637.
33. Varshney S, Rajpal S, Purwar N R. Comparitive study of
image segmentation techniques and object matching using
segmentation. Methods and Models in Computer Science,
Delhi. 2009; 1–6.
34. Wang Z, Yang M. A fast clustering algorithm in image
segmentation. Computer Engineering and Technology
(ICCET). Chengdu. 2010; 592–94.
35. Chen Q, Xue B, Sun Q, Xia. Interactive image segmentation based on object contour feature image. 2010 17th IEEE
International Conference on Image Processing (ICIP),
Hong Kong. 2010 Sep. p. 3605–08.
36. Xia Y, Feng D. A General Image Segmentation Model and its
Application. 2009 ICIG ‘09 Fifth International Conference
on Image and Graphics, Xi’an Shanxi. 2009 Sep. p. 227–31.
37. Shirakawa S, Nagao T. Evolutionary image segmentation based on multiobjective clustering. Evolutionary
Computation, 2009. CEC ‘09. IEEE Congress on Trondheim.
2009 May. p. 2466–73.
6
Vol 9 (6) | February 2016 | www.indjst.org
38. Hirakawa S, Nagao T. Evolutionary image segmentation based
on multiobjective clustering. 2009 CEC ‘09 IEEE Congress on
Evolutionary Computation, Trondheim. 2009 May; 2466–73.
39. Gonzalez RC, Woods RE, Eddins SL. Digital Image
Processing using MATLAB. Second edition, Pearson
Education, 2007.
40. Pratt W K. Digital Image Processing. Fourth Edition, A
John Wiley & Sons Inc. Publication, 2007.
41. Kalechman M. Practical MATLAB-Basics for Engineers.
Special Indian Edition, CRC Press, 2008.
42. Ghosh SK. Digital Image Processing. Narosa Publishing
House Pvt. Ltd, 2013.
43. Gonzalez RC, Woods RE. Digital Image Processing. Second
Edition, Prentice-Hall, 2002.
44. Sangwin S, Horne R. The Color Image Processing
Handbook. Chapman & Hall, 1998.
45. Jayaraman S, Esakkirajan S, Veerakumar T. Digital Image
Processing. Tata McGraw Hill Education Pvt. Ltd, 2012.
46. Felzenszwalb PF, Huttenlocher DP. Efficient Graph Based
Image Segmentation. 2004; 59(2):167–81.
Indian Journal of Science and Technology