Brown Spot Disease Severity Level Detection using Binary-RGB Image Masking

Agriculture is known as one of the main factor for a growth of a country. Paddy plantation is the most widely planted crop in Malaysia. The rice produced is the main food source to Malaysian’s people and source of income to this country as well. However, a disease known as Brown Spot (BS) attacks the paddy plants and threats their quality. This disease caused by bipolar fungus, which represent by the development of an oval, dark brown to purplish-brown spot on leaf. This disease observed as among the hazardous disease that may result in degradation of paddy production. Brown Spot disease could spread through airborne spores from plant to plant on the field. In this research, a system that could help people, especially farmers, to detect the disease at early stage is developed. The real image capture at paddy field is processed in the MATLAB software with image enhancement, background removal as well as binary and RGB image masking process. To determine the Brown Spot area, pixel intensity between the infected and noninfected areas is calculated. The severity level table developed by Horsfall and Heuberger is then used as reference to classify the severity level of Brown Spot disease. A GUI is created to detect the Brown Spot disease automatically. From the study conducted, the accuracy of Brown Spot detection is approximately 89% accurate compared to manual evaluation by plant pathology. Keywords—Brown spot; image enhancement; binary image; RGB image; masking process


I. INTRODUCTION
Over many years, Malaysia has grown-up its economy through agriculture sector. Agriculture has a significant economic contribution [1], with paddy being the third most widely cultivated crop. Rice produced by paddy, is the main source Malaysian and gain profit to the country [2]. Thus, a lot of efforts have been done to ensure a high quality and quantity production of this crop [3].
Farmers need to take a good care of their paddy growth in order to ensure the production of a good rice quality. However, paddy is very vulnerable as it often threatened by various pest and disease such as leaf folders, stem borer, plant hopper, Brown Spot (BS) disease [4], Bacterial Leaf Blight (BLB) diseases and Leaf Blast (LB) diseases [5].
Brown Spot (BS) disease (see Fig. 1) is caused by the bipolar fungus, making development of an oval, dark brown to purplish-brown spots on leaf. Brown Spot is considered as one of the most severe conditions [6] of paddy plants and can affect paddy leaves by as much as 50 to 90 per cent of the yield product. Brown Spot can quickly spread by airborne spores from plant to plant in the field. It occurs when the contaminated seeds are sown at a prevailing low temperature of 18-22˚C [7] [8].
Brown Spot disease is a fungal disease that affects the development of rice plants, killing young seeds and reduces their quality. This disease may manifest itself at any stage of crop development [9] but is most severe at full crop maturation. Brown Spot disease is easily identifiable by its characteristic oval to circular form and size of a sesame seed on the surface of the paddy leaf. Typically, the colour is yellow-brown with dark brown patches [10].

II. LITERATURE REVIEW
Plant diseases provide a broad scientific field of study in agriculture and emphasize the biological features of diseases. Today, detecting plant diseases is challenging and requires particular care. Fungal infections, bacteria, viruses, and nematodes produce spots on leaves or stems, brown or black lesions, death of lower leaves, yellowing of lower leaves, and black specks [11]. Each disease has its technique of prevention. Standard techniques used include cultural tradition [12], disease resistance cultivars, and chemical usage.
Previously, researcher in [13][14] has developed a system that can detect disease on leaf automatically by using image processing techniques. This, in turn, it allows farmers to recognize the diseases at an early stage and provides valuable knowledge to monitor the crop condition. www.ijacsa.thesai.org Image acquisition, image pre-processing, image segmentation, feature extraction, and classification are the image processing stages required for Brown Spot disease diagnosis used in [15][16][17]. These processes are done on the captured image of infected plants. The diagnosis of plant diseases is usually based on the presence of different colors [18], shapes [19] and abnormalities on plants leaves [20].
The present technique on detecting plant diseases is via professional observation using their bare eyes [21]. To do so, a big team of specialists is required, which is very expensive especially when the number of farms is enormous. At the same time, the farmers do not have enough facilities [22] to do so. In addition, because of this, the expense of consulting experts is often high and time consuming.
In [23], the researcher discusses the detection of two diseases known as Leaf Spot and Leaf Blotch. The procedure used is by divide the process into several stages using image processing techniques. The first step was to convert RGB image to HSI colour space, which retains just the hue component for further processing. The disease part on the leaf is then extracted using K-Means segmentation. After that, the resulting image is analysed for feature extraction using GLCM texture analysis. The output is then used to train and classify a multi-class SVM classifier.
Colour is always the most important element in image processing [24] and serves as an important indication for class identification. Digital image processing produces objective colour measures that are very useful for early lesion detection. The pixel in a colour image is often represented in RGB space, where the colour of each pixel is defined as a triplet (R, G, B), where R, G, and B correspond to Red, Green, and Blue, respectively [25]. The colours in the defect area of the images were analysed to determine the stage of the disease. At this stage, diseases can be categorised into their level according to their condition, from early to the worst stages [2] [26].
Based on these previous researches, it can be seen that the image processing has widely being used in detecting the paddy diseases. Hence, this study is conducted to propose another enhanced technique named Binary-RGB image masking technique to detect Brown Spot disease.

III. METHODOLOGY
The Brown Spot (BS) disease detection start with image acquisition, followed by image enhancement using histogram equalization, background removal, image masking, obtaining the pixel value of segmented RGB image and masked image and determination of Brown Spot Disease based on Disease Severity Scale developed by Horsfall and Heuberger [27] (refer Fig. 2).
The process of the analysis begins with taking pictures of paddy plants that are infected by Brown Spot disease at paddy plot in Malaysian Agricultural Research and Development Institute (MARDI) Seberang Perai using a 24 Megapixel camera with an Optical Image Stabilizer (OIS). The process begins with taking pictures of paddy leaves with a distance of approximately 30 cm. The quality of the images is then enhanced by using histogram equalization technique. It followed with background removal process to eliminate the similar colour characteristics of the image background with the disease that infected the leaves (see Fig. 3). Then, the Brown Spot disease on a leaf is detected by using a masking concept. The procedure starts with masking the segmented RGB image with a segmented binary image. The resulted masked image will show the presence of Brown Spot on the image sample.
As can be seen in Fig. 3(d), the background of an image is successfully removed, leaving the Region of Interest (ROI) with Brown Spot spotted on the leaf. The Brown Spot disease spot are detected after a masking process is applied. To get the pixel of Brown Spot disease, all pixel except black pixel value from a segmented RGB image are then subtracted with the non-black pixel value form by masked image. The resulting value shows the affected area of the Brown Spot disease (see Fig. 4).
This step is continued by obtaining the pixel value for the non-black pixel of the segmented RGB image and masked image. After that, the Brown Spot severity level on the paddy leaf is determined by calculating the lesion and leaf area ratio. The equations used to express this process are as below: (1) or (2) Where; S is severity extent, Ad is diseases leaf area, Al is total leaf area, Pd is total pixel in diseased area, Pl is total pixel of leaf.  The severity level of the infected area is classified according to the Disease Severity Scale developed by Horsfall and Heuberger as shown in Table I.

IV. ANALYSIS
To get a high quality images, it is essential to pre-process the collected images. In this study, the Histogram Equalization technique is used to improve the image quality. In this technique, there are two parameters used which are "Radius" and "Amount" value. The "Radius" value is used to control the region's edge pixel dimension. The greater the value, the broader is the region around the edge. While a lower value narrows the region around the edge. Besides, the "Amount" value function is used to increase the contrast of the sharpened pixels. Therefore, with a larger value of 'Amount', the brightness of the image will increase.
As shown in Fig. 5, there are some changes happen in the histograms of the Red, Green, and Blue channels between the original and enhanced images. The x-axis indicates the tonal scales, while the y-axis indicates the number of pixels in an image. If the pixel's value on the X-axis is close to 0, it indicates that the pixel has a darker black colour. While if its value near to 255, that certain pixel is merely get a lighter colour or white.
By using Histogram Equalization technique the most common intensity pixel values are efficiently spreads out the while stretching the image's intensity range. This technique, in particular, is resulting in an improved image intensity as well as image quality of the Region of Interest (ROI), which in this instance is the paddy leaf.
As for example, the peak value of blue channel is at 50, while the green channel is on range of 0-50, and red channel is on the range of 0 to 250. After the Histogram Equalization process, the pixel intensity value is being stretched out to it closes contrast value. As for the pixel value of blue channel, the colour pixel of 50 changes from 8000 to 7000, where the colour pixel of this channel is stretched out to its near intensity range. For green channel, the colour pixel is spreading towards 0 which indicate the image at the certain pixel will become darker. At the red channel, the colour pixel is spreading more towards the 250 where it"s resulting to a brighter pixel. This will increases the image contrast when its data is represented by close contrast values.
(IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 12, No. 9, 2021 551 | P a g e www.ijacsa.thesai.org The image background on enhanced image is then removed and keep only the object of interest, which is the paddy leaves. Then, the affected area on the paddy leaf is detected by subtracting the segmented RGB image with the masked image. The output of two different sample can be seen in Fig. 6 and Fig. 7. In this technique, it is compulsory to get the total pixels of leaf and the total pixel of Brown Spot affected area first. To get the pixel value of the Brown Spot affected area, the non-black pixel is obtained from masked image while for total pixel of leaf is obtained from subtracting the non-black pixel of masked image and the not black pixel of binary image.
In order to obtain the Region of Interest (ROI), the value of the non-black pixel for the segmented RGB image and segmented binary image is calculated. Here, the Horsfall and Heuberger method [15], is applied to calculate the severity level of the Brown Spot disease on the paddy leaf. The equation for Horsfall and Heuberger method is as follows: Where; B is the non-black pixel of the segmented RGB image, K is the non-black pixel of the masked image, (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 12, No. 9, 2021 552 | P a g e www.ijacsa.thesai.org For example, for sample image in Fig. 6, the non-black pixel value of segmented RGB image is 64966, while nonblack pixel value of masked image is 16728. So, the calculated affected area is; Based on the Disease Severity Scale, if the percentage obtained is in the range of 26%-50%, the sample image is classified as affected with Brown Spot disease at Level 2. Since the sample image as in Figure 6 is calculated to have an affected percentage of 32.39% so, it fall under Brown Spot severity Level 2.
As for image sample in Fig. 7, the non-black pixel value of segmented RGB image is 47501, while non-black pixel value of masked image is 36981. So, the calculated affected area is; These image samples are also being forwarded to Plant Pathology for a manual evaluation. The manual observation shows that sample image in Fig. 6 was 30% effected by Brown Spot. While for sample image in Fig. 7, it was manually evaluated as 20% effected with Brown Spot. Table II shows the result of Brown Spot area percentage by using system calculation and the manual evaluation by plant patology on five collected samples. While Table III shows the Brown Spot severity level by using system calculation and the manual evaluation.
As can be seen in Table II, the result of Brown Spot area percentage by using system calculation and manual evalution are sigltly different but still tolarable. The precision in detecting the Brown Spot disease by using proposed system is about 89%. Although the percentage area of Brown Spot detected on image sample are different, but the severity level by using system calculation and manual evaluation are the same.
To ease the process so that the layman can use the proposed system, a GUI as shown in Fig. 8 is developed. Here, the user need to load the original image to the system. Then, the system will automatically shows the enhanced image, segmented RGB image, segmented binary image and masked image. At the same time, the non-black pixel value of the RGB and masked image, the percentage of disease severity and its severity level is calculated and the result will be appear in the table of severity level box. The reset button is also available to clear all the input data as preparation to receive a new image sample.

V. CONCLUSION
This project is intended to help people, especially farmers who work in the agriculture sector. Instead of using too many pesticides that could affect people"s health, early detection of the disease should help get rid of the disease before it gets worse and endanger the paddy"s quality. Therefore, by using the proposed technique, it will help the farmer to classify the severity level of Brown Spot disease and it may assist the farmers in the early detection of the Brown Spot disease before it spread widely in the paddy field.