Color Image Processing of Weed Classification: A

0 downloads 0 Views 337KB Size Report
processing with specific application on weed classification task. The task of ... Introduction ... Ex-C = 0. 3. Feature Extraction. Choosing concise and compact.
Proceedings of the International Conference on Electrical Engineering and Informatics Institut Teknologi Bandung, Indonesia June 17-19, 2007

B-66

Color Image Processing of Weed Classification: A comparison of two Feature Extraction Technique Kamarul Hawari Ghazali 1*, Mohd. Marzuki Mustafa 2, Aini Hussain 2 1

Faculty of Electrical and Electronic Engineering, Universiti Malaysia Pahang Bandar MEC, Gambang Kuantan, Pahang, Malaysia 2 Depertment of Electrical, Electronic and Systems Engineering Faculty of Engineering, Universiti Kebangsaan Malaysia 43600 UKM Bangi, Malaysia.

It is a common practice in most image recognition applications to convert color images to gray scale prior to analysis. By doing so, the original colored image will lose its color features which may be critical especially when the recognition is based on the color information. It is not so critical if the image recognition task is based on other contexts such as shape or texture. In this paper, we address the issue of color image processing with specific application on weed classification task. The task of classifying weed according to its classes as either narrow or broad type can be best performed based on the texture context. This can be done either in gray scale or color (RGB) mode. Typically, the gray scale mode is adopted in which the original colored weed images of RGB values are converted to gray scale. In this work, we intend to show that by combining both color and texture information of the weed images, higher classification accuracy can be afforded. Color filtering algorithm was implemented in the preprocessing task involving the technique known as the extracted green color. Following the color filtering algorithm implementation, the images were subjected to two types of feature extraction techniques namely the FFT and gray level co-occurrence matrix (GLCM). Next, we perform classification and compare the performance of color based processing against grayscale processing using the GLCM and FFT based feature vectors.

1. Introduction While herbicides have undoubtedly enabled farmers to increase crop yields by eliminating competition from weeds, these substances have potential to cause damage to the health of humans and other living organisms. Nevertheless, herbicides are still the primary method of weed control in mechanized agriculture (1), (2), (3). The quantities of herbicide applied may be reduced using a sitespecific precision-farming approach (4) rather than the conventional method of applying herbicide uniformly across the field. The challenge of precision approach is to equip the farmer with adequate and affordable information and control technology. The basic elements required to operate a precision herbicide sprayer are 1) Image processing to recognize weed; and 2) a processing unit as well as mechanical structure of spraying system. In short, the solution to this precision approach is by using machine vision. In machine vision for weed control, digital images of weeds are used in the detection to distinguish weeds type to permit application of different chemicals at specific spot, instead of spraying everywhere in the field. For instance, in (5), machine vision

* Email: [email protected]

ISBN 978-979-16338-0-2

has been used to show the shape features to discriminate between corn and weeds. In (6), they used geometric invariants and statistical methods to design and test plant and weed classifier. The main objective of the research presented in this paper was to develop robust and efficient methodology to classify weed according to its type which we have categorized as either narrow or broad weed. These types of weed are commonly found in oil palm plantation. The proposed methodology involves processing color images of the weed which contain the 3 dimensional (3D) pixel values of red, green and blue (RGB). Color edge detection was used in (7) and it was proven that better result was obtained over grayscale edge detection. In this paper, 3D-RGB color image has been successfully segmented using Excess Color (Ex-C) filter. One of the main characteristic of weed image is that green is the dominant color. Therefore Ex-C filter can be used as a noise removal tool to remove the color red and blue. As a result, the processed image only contains green intensity value. Color segmentation is an efficient approach as the target object can be easily categorized in color distribution. In this case, the target is green and we have assumed that the intensity pixel values of red and blue as noise to the input process. Two image preprocessing techniques were considered and implemented namely, the

607

Proceedings of the International Conference on Electrical Engineering and Informatics Institut Teknologi Bandung, Indonesia June 17-19, 2007

B-66

proposed color segmentation and the typical gray scale conversion. Subsequently, the preprocessed images were subjected to two feature extraction algorithms. The algorithms are gray level co-occurrence matrix (GLCM) and fast Fourier transforms (FFT).

approximation of a probability table. This process is called matrix normalization. Normalization involves dividing the square matrix by the sum of the values, where i and j are coordinates of the co-occurrence matrix space.

2. Preprocessing Image Typically, preprocessing algorithms are implemented to improve/enhance the original image so that it can increase the chances for success of subsequent processes. Preprocessing typically deals with techniques for enhancing contrast, removing noise and converting the original 3D image to 2D pixel values. In basic image processing, we will find that the first stage of pre processing is to process the image in gray scale level. Unfortunately, converting color images to gray scale will result in the loss of their color features. In principle the human eyes response faster and more accurately to what is happening in a scene if it is in color. As such, it can be stated that color is helpful in making many objects “stand out” when they would be subdued or even hidden in a gray-tone image. In the weed target object, background features of the image should be eliminated to extract only the green pixel values of the weed. The extraction of color features of green can be implemented by using the following formula.

(2) Subsequently, from the normalization matrix one can obtain diagonal elements and elements at lines parallel to the diagonal. The diagonal elements represents pixel pairs with no gray level difference (0,0; 1,1; 2,2) as shown in Figure 1. Then the elements at line parallel to the diagonal are pixel pairs with a difference of only one gray level and so on (0,1; 1,2; 1,0; 2,1). The farther away from the diagonal, the greater the difference is between the pixel gray levels. 0,0 1,0 2,0

0,2 1,2 2,2

Figure 1. Matrix framework for diagonal elements 3.2 Fast Fourier Transform

Ex-C = 2 * G – R – B (1) provided that if (G