ZHANG Jian-hua, KONG Fan-tao, WU Jian-zhai, HAN Shu-qing, ZHAI Zhi-fen
1 Agricultural Information Institute, Chinese Academy of Agricultural Sciences/Key Laboratory of Agricultural Big Data, Ministry of Agriculture, Beijing 100081, P.R.China
2 Chinese Academy of Agricultural Engineering, Beijing 100125, P.R.China
Abstract In order to improve the image segmentation performance of cotton leaves in natural environment, an automatic segmentation model of diseased leaf with active gradient and local information is proposed. Firstly, a segmented monotone decreasing edge composite function is proposed to accelerate the evolution of the level set curve in the gradient smooth region.Secondly, canny edge detection operator gradient is introduced into the model as the global information. In the process of the evolution of the level set function, the guidance information of the energy function is used to guide the curve evolution according to the local information of the image, and the smooth contour curve is obtained. And the main direction of the evolution of the level set curve is controlled according to the global gradient information, which effectively overcomes the local minima in the process of the evolution of the level set function. Finally, the Heaviside function is introduced into the energy function to smooth the contours of the motion and to increase the penalty function ?(x) to calibrate the deviation of the level set function so that the level set is smooth and closed. The results showed that the model of cotton leaf edge profile curve could be obtained in the model of cotton leaf covered by bare soil, straw mulching and plastic film mulching,and the ideal edge of the ROI could be realized when the light was not uniform. In the complex background, the model can segment the leaves of the cotton with uneven illumination, shadow and weed background, and it is better to realize the ideal extraction of the edge of the blade. Compared with the Geodesic Active Contour (GAC) algorithm, Chan-Vese (C-V)algorithm and Local Binary Fitting (LBF) algorithm, it is found that the model has the advantages of segmentation accuracy and running time when processing seven kinds of cotton disease leaves images, including uneven lighting, leaf disease spot blur, adhesive diseased leaf, shadow, complex background, unclear diseased leaf edges, and staggered condition.This model can not only conduct image segmentation of cotton leaves under natural conditions, but also provide technical support for the accurate identification and diagnosis of cotton diseases.
Keywords: local binary fitting model, natural environment, cotton, disease leaves, image segmentation
In the process of diseases diagnosis based on computer vision, the accurate image segmentation of crop diseased leaves is critical, which is the key step and foundation of damage identification diagnosis (Yuanet al. 2013; Renet al. 2016). In the natural environment, plant leaf image acquisition is easily affected by many factors including complex background, weather changes, shooting angle,and so on, which makes acquisition images have characters of various contents, uneven illumination, shadow, and partial occlusions. Thus the following image segmentation becomes difficult, and easily results in under-segmentation or over segmentation (Bocket al. 2010; Barbedoet al.2016; Wanget al. 2016). At the same time, during the growing process of crops, crop leaves are easily affected by contamination, diseases, insect pests and lack of nutrition,which cause disease spots on crop leaves surface, pests spots, stripes, fold, crimp and necrosis. These areas are often similar with the image of a background such as soil,straw or plastic, causing the target boundary unclear, making the plant leaves segmentation accuracy cannot meet the required demand (Ilea and Whelan 2011; Barbedoet al.2013, 2015; Liuet al. 2016). How to effectively conduct image segmentation of crops leaves in natural environment need to be solved urgently.
Aiming at the image segmentation study of leaves in the natural conditions, Zhenget al. (2009) applying algorithm of Mean-shift and Back Propagation Neural Network (BPNN)conducts image segmentation to vegetable leaves of different plant types, lighting condition and soil type. The segmentation results are good, but this method has long processing time and is not suitable for practical application. Wanget al.(2013) designs a segmentation method of single plant leaf under complex background based on the method of Otsu(Wanget al. 2010) and Canny (Biswas and Sil 2012). Kruseet al. (2014) applies the average method of Latent Dirichlet Allocation (LDA) andKto separate the disease spot area. This method separates effectively the disease spot and makes a measurement, but the background of images dealt are simple,and it is not suitable for field. Tianet al. (2014) developed the colorful image segmentation of wheat disease combining with Principal Component Analysis (PCA) and Gaussian mixture model, and effectively solved the segmentation problem of wheat rust spot. Zhanget al. (2015) develops the complex background image segmentation of wheat leaf disease applying theK-means in L*a*b* color space. This method can effectively remove the background of soil, weed, shades and so on, but the precision of segmentation need to be improved.Fanget al. (2014) conducted matching-segmentation to cucumber diseased leaves based on templates for the shape context, but the representativeness of matching templates was not enough without totally considering some factors when matching. Wuet al. (2014) conducted image segmentation to green plant based on improved mean shift algorithm.The performance of this method was unsatisfied when the image background was green weed. So the efficiency of this method needs to be improved. Wuet al. (2014) conducted image segmentation of crops diseases fusing texture, gray and distance characteristics and combining graph cuts theory. The segmentation results were satisfied, but the background was simple and this method was not suitable for field conditions. Renet al. (2016) extracted more completed cucumber leaves using significant detection algorithm, but the segmentation performance of this method needs to be test by using other crops leaves.
Therefore, there is not a unified method for image segmentation of cotton disease leaf in natural conditions.The studies considering different diseases, weather conditions and background were few, especially on the uneven lighting condition, shadow and fuzzy border. This paper takes the cotton disease leaves as study object combining with global gradient and local information, and conducts automatic segmentation of crop disease leaves under natural conditions by the improving LBF model, in order to improve the natural environment segmentation accuracy of cotton disease leaves and the efficiency of the level set curve evolution.
From May to September in 2016, images of cotton disease leaves were collected under natural environment in cotton field of China Agricultural University. The cotton is the Bt transgenic cotton. There were four kinds of soil cover style of planting cotton including white mulch, black mulch, straw and bare soil. The images were captured during seedling stage,elongation stage, flowering stage and boll stage. In order to include various conditions of natural situations, we collected images both on sunny days and cloudy days. The collecting equipment was EOS 50D SLR Digital Camera made by Canon Company in China. Auto-focus mode was used. In order to make a balance between high image resolution and image processing speed, all the cotton leaves images were resized to 640×480 as a standard. The collected image of cotton leaf withPhylloヶicta gossypinais shown in Fig. 1.
Local Binary Fitting modelAiming at the problem of images being difficult to be segmented in intensity inhomogeneity with piecewise constant geodesic active contour model (PC model), Liet al. (2007) proposed LBF model on the basis of the PC model (Camargo and Smith 2009; Zhanget al. 2012; Phadikaret al. 2013). This model introduces local energy functional and replace PC model with integral on image area (Liet al. 2007). This method has a better segmentation results to intensity inhomogeneity,which is mainly contributed by the application of kernel functionK(Liet al. 2008). The kernel functionKsatisfies the following conditions:
Fig. 1 Cotton leaf with Phylloヶicta gossypina.
Fig. 2 Gaussian kernel function.
(1)K(–u)=K(u)
(2)K(u)≥K(v),if|u|<|v|, and lim|u|→∞K(u)=0
(3) ∫K(x)dx=1
The key of LBF model is the application of kernel functionKand its’ local character (Chan and Vese 2001; Brownet al.2012). In images, the definition of energy function of LBF model is as follows:
Where,Kis Gaussian kernel function, Ω1and Ω2stand for the inside and outside region of evolving curveC, respectively,f1(x) andf2(x) are the fitted value of inside and outside region of image evolving curveC,respectively,Iis initial images,λ1andλ2are two positive parameters, and |C| stands for the arc length of curveCfor smooth evolving curve. Gaussian kernel function isσof function is scale factor. Generally,σis positive number, the bigger the value, the larger the local area size. The Gaussian kernel function ofσ=1 is shown in Fig. 2.
Active contour model based on global gradient and local informationThe LBF model has a distinct advantage to the uneven grey level and low contrast image segmentation,but there are limits: (1) The LBF model only contains the kernel function of local features, but it lacks of global information feature consideration. It is very easy to reach the local minimum during the process of the level set function evolution; (2) the level set evolution curve is susceptible to noise (Bhoyar and Kakde 2010; Zhanget al. 2015).
To solve the above problems, this paper proposed the active contour model based on global gradient and local information. The image gradient which was regarded as global information was introduced into the model. It was taken as guidance information of energy function in the evolution process of the level set function, which could improve the borderline of the image and accelerate the evolution speed.
In the existing contour model based on edges,is usually adopted as gradient detection function (Bhogalet al. 2011; Jung and Kang 2015). It reaches maximum value whenh=0. In the collected cotton leaf images under the natural light condition, it is rare when the gradient is zero. Even in the smooth color area, the gradient would be greater than zero. This leads to the low evolution speed of gradient regional level set curve (Vese and Chan 2002).Therefore, a piecewise monotone decreasing the edge of the composite function was proposed:
Where,s=τ×max{|GI|2},(0, 0.1],Lis positive number and usually the interval isL[2, 5],Iis cotton leaves images.his gradient, andGis Canny edge detection operator gradient. Its formulas are as follows:
Normal numberLis the down factor of edge composite function, the smaller the value shows, the faster the convergences speed. From the decline trend of the differentLvalues of edge composite function in Fig. 3, differentLaffects the function of the rate of convergence. At the same time, it needs to achieve a good balance in the evolution of the edge and homogenous area. Therefore, this article selects 3 asL. WhenLof the function is 3, the edge composite function convergence is good than traditional function in this paper and the convergence speed is faster to ensure the edge will not leak as shown in Fig. 4. After the marginal complex function was introduced, the energy function of the model is:
At the same time, in this paper, model of energy function,Heaviside function is introduced to smooth active contour,and penalty function?(x) is added to adjust the deviation of the level set function. The energy function can be expressed as follows:
Fig. 3 The decreasing trend of L value of edge composite function. L is the down factor of edge composite function, g(h)is edge composite function, and h is gradient.
Fig. 4 The convergence of different edge composite functions.g(h) is edge composite function, and h is gradient.
Where,λ1,λ2,v, andμare positive coefficients;xandystand for the length and width of images, respectively;I(t)is the initial image;?(x) is the penalty function;Kσ(x–y) is Gaussian kernel function;σis the bandwidth of Gaussian kernel function;g(h) is edge composite function;f1(x) andf2(x) are the mean value of the inside and outside of the curve respectively, according to Euler-Lagrange method to calculate minimization, which can be represented as:
Among formula, the formulas ofe1(x) ande2(x) are:
In the gradient descent flow formula of the energy function, function of ?δε(?)g(h)(λ1e1?λ2e2) is to drive curve evolution, function ofis to keep the curve smooth, andthe item of internal energy.
Image segmentation of cotton leaf with diseaseBased on the active contour model of global gradient and local information, this paper conducted images segmentation of cotton diseased leaves in natural condition. Firstly, the color component of R, G, and B will pass the 5×5 template mean smoothing, and then to eliminate the effects of noise,a Cat combination of R, G, and B components will be used.Secondly, the images were transformed into a* component of L*a*b* color space to reduce the effect of fluctuation of light intensity. Finally, the image segmentation is conducted using the active contour model based on global gradient and local information. The flowchart of image segmentation of the cotton diseased leaves is shown in Fig. 5, and the detailed image segmentation processes are as follows:
(1) Read the color images of cotton diseased leaves and filter the image with 5×5 mean filter template filtering on the RGB component.
(2) Conduct Cat combination of filtered R, G, and B components.
(3) Transform the images into a* component of the color space of L*a*b*, extract a* component and obtain the twodimensional matrix.
(4) Define the level set and initialize the outline.
(5) Define the Gaussian kernel function, the Heaviside function andg(h) edge composite function.
(6)for n=1:IterNun.
(7) Calculatef1(x) andf2(x), respectively.
(8) Calculatee1(x) ande2(x).
(9) Calculate the gradient descent of the energy function
(12) Endfor.
(13) Extract the level set area.
(14) Obtain the results of the leaf segmentation of cotton disease.
Simulation of image segmentation for cotton diseased leaves in natural condition was conducted. The software platform is Matlab r2011a, Windows 10 version 64-bit operating system. The hardware platform is ThinkCentre PC(Lenovo Company, China). The processor is Intel (R) Core(TM) i5-370/3.2 GHz, and the internal storage is 8.0 GB.Image segmentation experiment of cotton diseased leaves included parameter optimization test and performance comparison test to verify the accuracy and efficiency of the image segmentation under natural conditions.
In order to optimize image segmentation model parameters,the optimization test was conducted to the main parameters initial contour shape of the model, initial contour radiusrand the bandwidthσof the Gaussian kernel function to reduce influences on the parameter set to cotton disease segmentation accuracy. The other main parameters are set as: number of iterations=200 times,ε=1.0,v=1.0,μ=0.002×225×225,λ1=λ2=1.
Test 1: the influences of initial contour shape to segmentation results. Four kinds of initial contour shape,including vertical rectangle, horizontal rectangle, square and circle were used to do initialization. The influence of different initial contour shapes on the segmentation results was tested, and the segmentation process was shown in Fig. 6. As shown in Fig. 6, seen from the segmentation process, the speeds of vertical rectangle, horizontal rectangle and square in the iteration and the convergence of cotton diseased leaves are slower during the segmentation process as shown in Fig. 6. It is easy to fall into local pits of the image background. The circular structure can iterate more quickly and match with cotton leaf edges. The initial contour of vertical rectangle, horizontal rectangle and square in the iteration, especially in 50 iterations and 100 iterations, the level set evolution is uneven; the zero level set cannot evolve quickly to cotton leaf target edges as shown in the three-dimension figure of level set evolution during segmentation process. However, due to similar to cotton leaf, circular structure initial contour can evolve to the target contour edge rapidly. Therefore, the circle was selected as the initial contour of the level set.
Fig. 5 Flowchart of cotton diseased leaves image segmentation. R, red; G, green; B, blue.
Fig. 6 The segmentation process of different shape initial contour. A, the three-dimensional evolution process of initial contour and the level set of horizontal rectangle. B, the three-dimensional evolution process of initial contour and the level set of vertical rectangle. C, the three-dimensional evolution process of initial contour and the level set of square. D, the three-dimensional evolution process of initial contour and the level set of circle.
Test 2: the influences of the initial contour radiusRto segmentation results. Different circle radius r needs to be tested when circle is selected as the initial contour of level set, such asR=105,R=150,R=190,R=230. Initial contour radius r segmentation and the results of level set threedimension evolution are shown in Fig. 7. WhenR=105 andR=150, the initial contour of cotton leaves is relatively smaller and a certain distance between the initial contour and the target edge exists as shown in Fig. 7. The curve convergence speed is slow. The result of three-dimensional level set evolution indicated that curve was easily restricted by local minimum values. WhenR=230, the local area of the background was easily to be identified as the target edge by the level set curve. WhenR=190 and the level set curve was iterated 200 times, the level set curve match with the leaf edges well and the segmentation performance is the best among these radii. Therefore,R=190 was selected as the initial contour size.
Test 3: the influences of Gaussian kernel function bandwidthσto segmentation results. Gaussian kernel function determines the smooth extent of the curve. The bigger bandwidthσ, the smoother level set curve. The influence ofσon segmentation results were analyzed by settingσas 1, 3, 6, 9, and 12, respectively. The results after 200 times iteration are shown in Fig. 8. Different bandwidthσaffected segmentation results greatly as shown in Fig. 8.Whenσ=1, due to the bandwidth is too small, the level set curve is only partially changed on the initial circular contour.Whenσ=3, parts of the curve partially reached the target edge, but there was still a section of the leaf apex that was not well enclosure and it’s under segmentation. Whenσ=6 andσ=9, the level set curve could reach the leaf edge.Whenσ=12, the level set curve evolves to the leaves edge,but it segment the interior local points, which caused over segmentation.
The processing time of 200 times iteration with different bandwidthσwas different. As shown in Fig. 9, whenσ=1,the running time is 10.85 s. Whenσ=12, the running time is 109.11 s. It is shown that operating time will increase exponentially with the incensements of bandwidthσ.Although the greater the bandwidthσis, the smoother the curve is, but considering both the segmentation performance and running time, the segmentation performance is the best whenσ=6, the running time is 37.40 s, which is more relatively reasonable compared with other values.Therefore,σ=6 is selected as the bandwidth of Gaussian kernel function.
Fig. 7 Initial contour radius R segmentation and level set three-dimension evolution results.
Fig. 8 The segmentation results of different Gaussian kernel bandwidth σ values.
To evaluate the performance of the proposed algorithm,different cotton disease images captured in natural condition with both simple and complex background were processed. Circle was selected as the initial contour of the level set. The radiusR=190, the bandwidth of the Gaussian kernel functionσ=6. Other parameters are:ε=1.0,v=1.0,μ=0.002×225×225,λ1=λ2=1.
Leaf segmentation is conducted on cotton images captured under single background. The common background of soil, mulch and straw in cotton field were selected. As shown in Fig. 10, when the background is bare soil, the level set is circular distribution on the original image at the beginning of iteration, and with the increase of iteration times, the level set curve gradually converges to the edge of the target diseased leaves. The iteration of level set is ended at 165 times iteration. The level set covered the target leaf edge well. The diseased leaves and background are well segmented. The segmentation results indicated that the segmentation model had better segmentation result with bare soil background. When the background is mulch, the color of element deficiency leaves is similar to the color of mulch. At the same time, although there is still a local soil on black mulch surface and leaves have interior holes, the level set completely overlap the diseased leaves edges. This model has a better segmentation effect to mulch background. When the background is straw, diseased leaves of incision and holes is in the center of image. With the increase of the iteration times, the level set overlap the diseased leaf edges well. Therefore, as shown in Fig. 10,under three single background conditions of the bare soil cover, straw cover and mulch cover, this algorithm gets the smooth closed contour curve of cotton leaf edges, and can realize the leaves segmentation.
Fig. 9 Running time of segmentation calculation of different Gaussian kernel bandwidth σ values.
Fig. 10 Cotton leaf segmentation of single background. A, bare soil background. B, mulch background. C, straw background.
Fig. 11 The cotton leaves segmentation of the uneven lighting background. A, bare soil background. B, mulch background. C,straw background.
The leaf segmentation test is carried out aiming at the uneven lighting. Cotton images with three different degree of uneven lighting condition were selected to conduct image segmentation. As shown in Fig. 11, three cotton images leaves have been infected by diseases parts of the image were illuminated by a strong light, and local areas were not illuminated, which caused the gray level of background uneven. Meantime, local areas of diseased leaves were illuminated. Parts of the leaf area were not illuminated,which causes the lighting of target leaf area is uneven.The leaf was infected by diseases, and part of the leaf was not green, which made the segmentation even more difficult. The model iteration was stopped after 178 times iteration, and the level set curve eventually stopped at target boundaries, which effectively overcome the influence of uneven lighting. In Fig. 11-B, the lighting distribution is more uneven than the first image, but the region of interest(ROI) was well segmented after 186 times iteration. In Fig. 11-C, the ROI was also well segmented. Therefore,the above tests showed that this algorithm can overcome the influence of the uneven illumination and realize the ideal segmentation of the boundary of ROI.
Fig. 12 The cotton leaves segmentation of the complicated background. A, brown spot disease leaf with shadow, other cotton leaf background. B, spot disease leaf with uneven lighting condition and shadow and weed background. C, health leaf with weed background. D, red spider endangered leaf with uneven lighting condition and shadow background. E, anthrax disease leaf with uneven lighting condition and Leaf holes. F, blight disease leaf with staggered condition.
The leaf segmentation test is carried out aiming at the complicated background; images with uneven lighting,shadow, and weeds background are chosen to conduct cotton leaf segmentation with the model proposed in this paper. As shown in Fig. 12-A, there is not only the shadow but also other cotton leaves in the background. The color of brown disease spot is similar with the soil background at the same time. The segmentation results shows that the algorithm extracts the boundary of the leaves by 191 times iterations, but there existed over segmentation at two disease spots. As shown in Fig. 12-B, leaf’s surface was affected by uneven lighting. The image with uneven lighting was well segmented at 183 times iteration by the proposed algorithm. Meantime, there were shadows and weeds in the background and this algorithm achieved better segmentation result, only in the part of the cotton leaf with adhesion weeds,there was over segmentation. As shown in Fig. 12-C, there is a health cotton leaf with weeds in the background image,which was well segmented at 179 times iteration by the proposed algorithm. As shown in Fig. 12-D, in the uneven lighting, shadow and other cotton leaf background and red spider endangered leaf, after 213 times iterations, the leaf was completely segmented with this algorithm, and there are only two over segmentations. One is caused by a hole, the other is caused by neighboring cotton leaf, but they have little impact on the following extraction of disease spot. As shown in Fig. 12-E, in the uneven lighting, leaf holes and anthrax disease leaf, because the color of anthracnose is very similar to that of straw in the background, it leads to the unsatisfied segmentation result of disease spot around the leaf edge and one disease spot was not well segmented, but the segmentation results were satisfied on other diseased leaf areas. As shown in Fig. 12-F, there is a blight disease leaf with staggered condition image. After 224 times iterations,this leaf was mostly segmented with proposed algorithm.However, there is one under segmentation and two over segmentation in this segmentation, the under segmentation appears at the right corner of the leaf. Because the gradient inside the blade is larger than the blade edge gradient due to the disease texture, the level set function does not extend to the edge of the leaf. Two over segmentation are located in the upper and lower parts of the image, respectively.For diseased leaves intersects with other leaves, the edge gradient of the diseased leaves is smaller than that of the other leaves. Therefore, the level set regarded the edges of other leaves as targets and segmented.
Therefore, the results of leaf segmentation with complicated background showed that the proposed algorithm can realize the optimal extraction of leaf edge.
To validate the image segmentation performance of this model on uneven lighting, shadow and weak edges, seven cotton diseased leaf images under natural light condition were used as samples to conduct contrast test. The selected seven image samples of cotton diseased leaf under natural environment have characters of uneven lighting,leaf disease spot blur, adhesive diseased leaf, shadow,complex background, unclear diseased leaf edges, and staggered condition, respectively. Three kinds of classical segmentation model were chosen to compare with the proposed model in this paper, including the Geodesic Active Contour (GAC) model based on the edge, the fuzzy edge active contour model based on region (Chan-Vese,hereinafter referred to as: C-V model), and the Local Binary Fitting model (LBF model).
As shown in Fig. 13, because only the gradient was considered as the important feature of the level set energy contraction curve. It could make the level set curve iteration to local minimum values. The evolution curve moves towards the high contrast areas when the target approaches to the background color or grey level.Therefore, when uneven lighting and shadow have effects on cotton diseased leaf images, the GAC model tends to have unideal segmentation result. From cotton leaf image segmentation results of Fig. 13-A–G, the ROI was not segmented completely, except the adhesive diseased leaf and complex background. Because energy contraction of C-V model mainly relies on the characteristics of the global information, the model has better segmentation performance on the image made up of two regions with greatly different colors. However, for the natural environment cotton diseased leaf images shown in Fig. 13-A–G, influenced by solar angle change, other disease spot and weeds, the images contained the information of light intensity, shadow and complex background, which caused over segmentation and the segmentation accuracy was low. Due to considering the local information of images, cotton diseased leaf image segmentation results of the LBF model under the condition of natural light are better than that of GAC model and C-V model, especially in uneven lighting and shadow condition as shown in Fig. 13-A and D, respectively. Due to lack of global gradient information, the disadvantages of C-V model is that the segmentation result of images with unclear diseased leaf edge and staggered condition were not completed,however, a good segmentation is achieved for the major areas of the leaves, especially in the lesion area, as shown in Fig. 13-F and G. Overall, the proposed model is superior than the GAC model, C-V model and LBF model. It can overcome the influence of the uneven lighting, shadow,noise, complex background, fuzzy boundaries under natural conditions and staggered condition, and the segmentation performance is ideal.
In order to make the comparison more accurate, four segmentation models were tested from segmentation performance and running time. The method of relative difference was used to measure the accuracy of the segmentation results (Wanget al. 2013; Fuet al. 2015).Formula is as follows:
In the formula,S1is the standard segmentation pixel,andS2is the target pixels segmented by the algorithm.The smaller the value ofD(S1,S2), the closer the result of segmentation is to the result of the standard segmentation with small relative difference and high segmentation accuracy. Six standard images of cotton leafS1were manually segmented. Comparison results of the difference of cotton leaf segmentation in four models are shown in Table 1, and Comparison results of run time in four models is shown in Table 2.
Fig. 13 Comparison of leaf segmentation of cotton diseases. A, uneven lighting. B, leaf disease spot blur. C, adhesive diseased leaf. D, shadow. E, complex background. F, unclear diseased leaf edges. G, staggered condition. GAC, Geodesic Active Contour;C-V, Chan-Vese; LBF, Local Binary Fitting.
As shown in Table 1, the average relative difference degrees of GAC algorithm, C-V algorithm, LBF algorithm and proposed model dealing with seven cotton diseased leaf images under natural conditions are 51.94, 23.78, 20.16,and 5.64%, respectively. This model is superior to the other three kinds of models, especially, when dealing with uneven lighting, fuzzy disease spot, complex background,and unclear leaf edges and staggered condition. The advantage is obvious.
As shown in Table 2, the average running time of GAC algorithm, C-V algorithm, LBF algorithm, and the proposed model dealing with seven cotton diseased leaf images under natural conditions were 110.83, 63.99, 60.11, and 36.40 s,respectively. The running time of this model was only half of that of the other three models. Because the iteration times of level set energy function is relatively fewer than that of other three models when this model deals with the images with uneven lighting. For example, when deals with shadow images, segmentation was completed after 213 times iteration, which cost 34.11 s, whereas the GAC algorithm iterates 741 times, which cost 106.35 s, the C-V algorithm iterates 497 times which cost 66.27 s, the LBF algorithm iterate 453 times, which cost 58.66 s. Therefore,the running time of the proposed model is shorter than theother three kinds of models.
Table 1 Comparison results of the relative difference of cotton leaf segmentation in four models
Table 2 Comparison results of running time in four models
In this paper, the Active Contour model based on global gradient and local information was proposed, the image gradient as a global information was introduced into the sectional monotone decreasing edge compound function,which enable it to guide curve evolution flexibly according to image local information, obtain the smooth closed edge contour curve, and control the main direction of level set curve evolution on the basis of global gradient information to shrink inward or expand outward, which effectively overcome the phenomenon that it easily gets into local minimum in the process of level set function evolution. Heaviside function was introduced into energy function to smooth active contour. To calibrate the deviation of the level set function,the penalty function?(x) was added. The level set can obtain smooth and closed contour curve of the cotton diseased leaf edges. Therefore, this model not only can accurately extract the contour curve of general cotton diseased leaf targets,but also the segmentation of cotton diseased leaf for the weak edges and fuzzy edges were satisfied.
Parametric optimization test and segmentation of cotton diseased leaves were conducted to select the best model for cotton diseased leaf segmentation in natural condition based on the performance and running time of image segmentation. It is concluded that when the initial contour shape is round, the initial contour radiusRis 95 pixels,and the bandwidthσof the Gaussian kernel function is 6,the model is most suitable for segmentation of diseased leaves in natural conditions. For cotton images with single background, this model obtained the smooth closed contour curves of cotton diseased leaf edges in the single background of bare soil cover, straw cover, mulch cover and realize the leaf segmentation. In the leaf segmentation test aiming at uneven lighting conditions, the proposed algorithm can overcome the influence of uneven lighting, and realize the ideal segmentation of ROI. In the leaf segmentation test aiming at complex background, the model can segment cotton images with uneven lighting, shadow background and weed background and realize the ideal extraction of the leaf edges.
Compared with GAC algorithm, C-V algorithm and LBF algorithm, it is found that this model has obvious advantages to seven kinds of cotton disease leaves segmentation, including uneven lighting, leaf disease spot blur, adhesive diseased leaf, shadow, complex background,unclear diseased leaf edges, and staggered condition. The segmentation results were satisfied and the closed edge curves can be obtained. The average relative difference degrees of GAC algorithm, C-V algorithm, LBF algorithm and the model in this paper are 51.94, 23.78, 20.16 and 5.64%, respectively. The running time of GAC algorithm,C-V algorithm, LBF algorithm and the model in this paper are 110.83, 63.99, 60.11 and 36.40 s, respectively. Therefore,the segmentation accuracy and the running time of the model in this paper are better than the other three kinds of models, which showed obvious advantages especially in conditions of uneven lighting, shadow and fuzzy edges.
The proposed algorithm can be used to segment cotton leaves images under single background. However, for cotton leaves images with fuzzy edges and staggered condition, the segmentation performance of the proposed algorithm is better at the main lesion area than target leaf edges. Further study is necessary to improve the segmentation accuracy of cotton diseased leaf at target leaf edges. Meanwhile, the level set function of the model needs to iterate and it is time-consuming, how to reduce the times of iterations and shorten the running time needs to be investigated in field application.
Acknowledgements
This work is supported by the National Natural Science Foundation of China (31501229), the Chinese Academy of Agricultural Sciences Innovation Project (CAAS-ASTIP-2017-AII), and the Special Research Funds for Basic Scientific Research in Central Public Welfare Research Institutes, China (JBYW-AII-2017-05).
Journal of Integrative Agriculture2018年8期