Implementation of RGB and Grayscale Images in Plant Leaves Disease Detection – Comparative Study
Total Page:16
File Type:pdf, Size:1020Kb
ISSN (Print) : 0974-6846 Indian Journal of Science and Technology, Vol 9(6), DOI: 10.17485/ijst/2016/v9i6/77739, February 2016 ISSN (Online) : 0974-5645 Implementation of RGB and Grayscale Images in Plant Leaves Disease Detection – Comparative Study K. Padmavathi1* and K. Thangadurai2 1Research and Development Centre, Bharathiar University, Coimbatore - 641046, Tamil Nadu, India; [email protected] 2PG and Research Department of Computer Science, Government Arts College (Autonomous), Karur - 639007, Tamil Nadu, India; [email protected] Abstract Background/Objectives: Digital image processing is used various fields for analyzing differentMethods/Statistical applications such as Analysis: 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, RGBResults/Finding: images and the comparative result is given. We examined and analyzed the Grayscale and RGB images using image techniques such as pre processing, segmentation, clustering for detecting leaves diseases, In detecting the infected leaves, color becomes an level.important Conclusion: 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 RGB image has given better clarity and noise free image which is suitable for infected leaf detection than GrayscaleKeywords: image. Comparison, Grayscale Images, Image Processing, Plant Leaves Disease Detection, RGB Images, Segmentation 1. Introduction 2. Grayscale Image: Grayscale image is a monochrome image or one-color image. It contains brightness Images are the most important data for analysation of information only and no color information. Then image processing applications. Various types of images grayscale data matrix values represent intensities. The are used for data analysiss The digital image I(r,c) is rep- typical image contains 8 bit/pixel allows the image to resented as a two dimensional array of data, where the represent (0-255) different brightness (gray) levels. data of each co-ordinate at point (r,c) corresponds to the 3. Indexed Image: An indexed image consists of an array brightness of the image at that point. and a colormap matrix. The pixel values in the array In digital image, a pixel is a smallest unit of image that are direct indices into a colormap. The colormap can be controlled and addressable by coordinates and the matrix is an m-by-3 array which is contained float- intensity of each pixel is variable. They are represented in ing-point values in the range [0,1]. Each row specifies a 2-D matrix. the red, green, and blue components of a single color. The Different types of digital images are: An indexed image uses direct mapping of pixel values to colormap values. 1. Binary Image: Binary image is the simplest type of 4. RGB Image: RGB image does not use a color map and image and has two values, black and white or ‘0’ and an image is represented by three color component ‘1’. The binary image is referred to as a 1 bit/pixel image intensities such as red, green, and blue.RGB image because it takes only one binary digit to represent each uses 8-bit monochrome standard and has 24 bist/pixel pixel. where 8 bist for each color (red, green and blue). *Author for correspondence Implementation of RGB and Grayscale Images in Plant Leaves Disease Detection – Comparative Study 2. Related Works 3.2 Image Pre-processing Digital image processing is a technique which is used and 3.2.1 Image Filtering implemented in various areas of biology. It helps to identify Median filter is a nonlinear smoothing filter which is used and analyse the problem1. Plant leaves diseases detection to remove impulsive noise and reduce blurring of edges of and diagnostic method is a scientific method. The photo- plant diseased leaves. The median filter takes each pixel in graphic images are used to implement in the leaves disease the image and evaluates at its nearby neighbours to decide detection process. The photographic digital images are whether or not it is representatives of its surroundings. It is transferred into a particular form2. The Image pre-pro- replacing the pixel value with the median of neighbouring cessing is a method, used to transfer the original images pixel value; it replaces it with the median of those values. into another form. In plant leaves disease detection, cap- The pattern of neighbours is called “Window” which tured photographic images are used. There are noises in slides pixel by pixel over the whole image. The median the images, the regions of interest in the image is not clear is calculated by first sorting all the pixel values from the or other interference appears in the image3. The image pre- window and replacing the pixel being considered with the processing is used to get clear, noiseless enhanced leaves median pixel value. Median in a neighbour is not affected images. This enhanced images are used to leaves diseases by individual noise spikes. detection and analysation process. Various types of images are used in image pre-processing. The selection of image 3.2.2. Image segmentation type differs based on the processing area, implementation The proposed segmentation method uses enhanced of mathematical calculation and application. Generally, SRM using patches and labels. This evaluates the pixel plant leaves image color and texture are an unique features, values within a region and grouped together based on 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. RGB Image Pre-Processing 3.1 RGB Image Representation In the RGB model, each color represents the basic color Figure 2. Filtered image using Median Filter. 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 correspond- ing 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 3. Noise Removal using Red, Green and Blue Figure 1. RGB pixel representation. Channel. 2 Vol 9 (6) | February 2016 | www.indjst.org 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 Pre- Processing 4.1 Grayscale Image Representation Figure 4. Mutiscale segmentation – RGB Image. 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 repre- sented 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 The captured diseased leaves image is in RGB image. Figure 5. Edge Detection of 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 the merging and produces results as a smaller list. This of the color image. First get the values of three primary is the process of segmentation based on color mapping colors (Red, Green and Blue) and encodes this linear and clustering (for patching and labeling). The plant intensity values using the gamma expansion. The gamma diseased leaf image is mapped and patched depending expansion is: on colors and the regions were labeled using clustering. Further, the segmented regions were separated by delet- Crgb ing other regions which are identified by labels. Thus the Crgb <= 0.04045 12.92 plant leaf image is processed by patching and labeling for Clinear = (Crgb + 0.065) segmentation. C> 0.04045 1.065 rgb Color Mapping: The proposed enhanced SRM is used for image segmentation under patching. The algorithm Here, C is RGB primaries which has the range from evaluates the pixel values within a region and grouped srgb 0 to 1 and C is the linear-intensity value which also together based on the merging criteria. The plant leaves linear has the range from 0 to 1. Then the luminance of the out- input image is applied for color mapping, depend on the put image is obtained using weighted sum of the three color it forms are grouped of pixels and replaces minor- linear intensity values. The conversion is obtained using ity colors by majority colors. Nine different levels of color the function: space threshold are applied as Q values for segmentation grouping of pixel, merging to form patches and color y = f(x) mapping. Here, x is the original input data and y is the converted Clustering: Clustering is a collection of similar values output data. The function f(x) converts RGB values to in matrix or similar colored maps. Using color mapping, grayscale values using weighted sum of the R, G, and B the mapped regions are grouped and forming a cluster components: which is called labelling. Depend on the segmented map regions or grouped regions the labels are occurred. By f(x) = 0.2989 ∗ R + 0.5870 ∗ G + 0.1140 ∗ B Vol 9 (6) | February 2016 | www.indjst.org 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.