Estimation of weeds leaf cover using image analysis and its relationship with fresh biomass yield of maize under field conditions Asif Ali1, Jens.C. Streibig, Svend Christensen and Christian Andreasen2 Department of Agriculture and Ecology, Faculty of Life Sciences, University of Copenhagen, Højbakkegaard Allé 13, DK 2630 Taastrup, Denmark, 1e-mail: asif@life.ku.dk, 2e-mail:can@life.ku.dk Abstract. In order to reduce herbicide application an intelligent sprayer boom is being developed. It only sprays with herbicides if the weed infestation exceeds a certain weed control threshold. The estimation of leaf cover of weeds through image analysis is a prerequisite for the weed management model of the intelligent sprayer boom. Destructive and human perception methods of leaf cover estimation are laborious and practically not feasible to implement in a real time system. An alternative method is developed in the image analysis program “ImageJ”. The relationship between fresh biomass yield of maize and the leaf cover of weeds at the fourth and sixth leaf stages was analysed. Weeds were grown in maize under field conditions in Denmark. Chenopodium album was the most dominant species. Our data showed that yield loss was linearly related to leaf cover of weeds and may be used in the decision algorithm for the intelligent sprayer boom. Key words: Decision support system, weed leaf cover, yield loss prediction, image analysis, site specific weed management. 1 Introduction Reducing herbicide inputs is a major objective in modern agriculture. The extensive use of herbicides has raised concerns about environmental safety, conservation of biodiversity on farmland (Krebbs et al., 1999; Andreasen and Stryhn, 2008), and has increased the occurrence of herbicide resistant weed biotypes (Heap, 1997). As a general practice, a significant amount of herbicides is applied preemergence regardless of the potential weed flora. Weeds often grow in patches and there exists a significant ratio of patches where weeds occur at very low densities. With a precise site-specific application of herbicides, their excessive usage can be avoided (Christensen et al., 2009). Defining the threshold for weed control is fundamental to a weed management strategy. An economic threshold for weeds may be defined as the weed population at which the cost of control is equal to the value of crop yield attributable to that control ___________________________________ Copyright ©by the paper’s authors. Copying permitted only for private and academic purposes. In: M. Salampasis, A. Matopoulos (eds.): Proceedings of the International Conference on Information and Communication Technologies for Sustainable Agri-production and Environment (HAICTA 2011), Skiathos, 8-11 September, 2011. 41 (Cousens, 1987). There are great savings by choosing thresholds and only spray those parts of the field where weeds appear (Hagger et al., 1983). The effect of weed infestation on crop yield can be determined by weed density, but Spitters and Aerts (1983) suggested that the relationship between relative area of crop and weeds and the yield loss can give better prediction than a relationship based on weed density (Kropff and Spitters, 1991). Other studies also demonstrate how leaf area estimations can be used to predict yield loss (Kropff and Spitters, 1991).There are various methods to estimate weed intensity for example visual inspection (Braun- Blanquet, 1927), stand counts (Greig-Smith, 1984) and frequency analysis (Raunkiær, 1934; Andreasen et al., 1996). The image based and spectroscopic based crop-weed detections are advanced techniques used for site-specific weed management (Karan Singh et al., 2011). The estimation of weed intensity through image analysis is one of the new methods (Chen et al., 2002). In this method, green pixels of weeds are separated from ground pixels and counted. The counting of green pixels gives an estimation of leaf cover of weeds. At the moment a research project focuses on developing an “Intelligent sprayer boom”. The concept of the "Intelligent sprayer boom” is to apply treatment non- uniformly. The sprayer boom will be equipped with cameras to take images from unit cells and apply treatment accordingly in “real time”. The decision algorithm for spraying in maize is based on estimation of the number of green pixels of weeds per area between the crop rows. The cameras detect the weeds, the software detects the weed pixels and the sprayer applies the herbicides if the weed control threshold is exceeded. The potential to save herbicides especially at the second spraying time in the season is perhaps 90%. In 2010, an experiment in a maize field was done under Danish cropping conditions to find leaf cover of weeds by using image analysis and the relationship between weed leaf cover and fresh biomass of maize yield was developed in order to estimate the weed control threshold. , given the complexity of the management systems involved in Integrated Crop Protection, 2 Material & Methods 2.1 Experimental layout The maize field experiment was carried out from May to September 2010 and conducted at the research farm in Taastrup, Denmark (55°40'10 N; 12°18'32 E). There were many different weeds species in the field but the most dominant species was Chenopodium album L. We selected 16 adjacent pairs of plots of size 3 x 3 m2 from patches of different weed densities. One part of the pair of plots was sprayed and the other was kept unsprayed. The crop rows were 75 cm apart corresponding to six maize rows in a plot. There was sufficient space between the crop rows to take pictures and estimating weed cover. Both weeds and maize plants were at 4-6 leaves stages or larger. Six pictures from the unsprayed part of a plot were taken in the first week of July 2010 with a digital camera (Cannon EOS 400D). 42 2.2 Estimation of weed leaf cover The leaf cover of weeds was estimated by counting the number of green pixels. Each image was taken at a height of 65 cm, covering an area of 24 x 36 cm2. The crop was harvested and the fresh biomass from each line was measured in kilogram at the second week of September 2011. The infestation of weeds was average of the six pictures for each plot. The fresh maize biomass was correlated with leaf cover of weeds through regression analysis. The effect of various percentages of weed cover on the yield was estimated. 2.3 Statistical data analysis The relationship between per cent leaf cover of weeds and fresh biomass was analysed in R (version 12.2.2), a free software environment for statistical computing and graphics. The data consisted of per cent leaf cover of mixed weed species and fresh biomass per meter crop line. The fresh biomass yield in kg was correlated with leaf cover of weeds through regression analysis. The effect of various percentages of weed intensity on the yield was estimated. 2.4 Analysis of the images All pictures were processed with a public domain java based image processing software “ImageJ”. We have made necessary changes in a macro written by Landini (2009) in “ImageJ” by including various operations and plugins for subtracting background and counting weed green pixels. The image was split into hue, saturation and brightness by using “HSB Stack” splitter. Green leaf cover and background were segmented. When we adjust the hue values in colour threshold, all background pixels disappear. The brightness image represents the background in the image and we removed shadows by adjusting brightness thresholds. The results of hue saturation and brightness images obtained in segmentation step were combined by image calculator “AND create” operation. There were some unwanted background pixels left after colour thresholding for which we used median filter. The filtering process reduced noise and improved the segmentation result of the image in binary format. This operation worked on pixel by pixel for selected regions and removed noise preserving boundaries. The rest of the noise pixels which were left due to debris and soil loams were further removed by the “analysing particle” plugin. The binary format of the processed image contained only the vegetation pixels of the weeds. These pixels were counted to estimate percentage leaf cover from each plot. 3 Results & Discussion The mask obtained from image processing indicated that weeds were separated clearly from the background and the shadow was also removed (Figs. 1 & 2). C. album covered most of the area. At harvest time, it was the most dominant weed species. 43 IMG_1574.jpg Mask of IMG_1574.jpg Fig. 1. A sample image (left) and the processed result of the image (right) covering 24 x 36 cm2 ground area. The sunlight shadow was removed by choosing brightness threshold. The image was taken from the plot with relatively low weed intensity. IMG_1530.jpg Mask of IMG_1530.jpg Fig. 2. A sample image (left) and the processed result (right) taken from a plot with relatively high weed density. Chenopodium album plants covered larger part of the image than other weed species (e.g. Poa annua, Veronica persica). Table1. The number of green pixels counted from the sample images (Figs.1 & 2) by the image analysis program and the percentage of weed leaf cover. Fig. Label Green Non-green Percentage leaf cover 1 IMG_1574.jpg 767540 9310156 7.62 2 IMG_1530.jpg 2610806 7466890 25.9 44 3.1 Linear regression of crop yield on percentage weed leaf cover The regression analysis showed that there exist a significant slope, m, (-0.04 ± 0.003), of the linear relationship (p<0.001) (Fig. 3) and the intercept was 5.02 ± 0.11. The negative slope of the line represents unit decrease in yield with unit increase in percent leaf cover. The intercept of the regression line indicates maximum yield at zero percentage of weed leaf cover. There is no significant difference in the observed weed free yield (4.95 kg per meter crop row) and the estimated yield (5.01 per meter crop row) at zero percentage of leaf cover. Mathematically the linear relation between crop yield and weed leaf cover is given by following equation. y = mx+c (1) where y is the crop yield, m is the slope of the regression line, x is the weed leaf cover and c is maximum yield at zero weed leaf cover. Equation (1) can be used to calculate the yield for any percentage of leaf cover. For x= 10 % leaf cover the yield is 4.61 Kgs. The threshold value corresponding to other percentages can be determined from the equation (1). Fig 3: The relationship between percentage of weed coverage (pixels) and yield (fresh biomass in kg per meter maize row). The slope of the regression line is - 0.04 and the intercept is 5.01 (p<0.001). The common weed species were Atriplex patula L., Cirsium arvense (L.) Scop., Fallopia convolvulus (L.) Å. Löve, Lamium amplexicaule L., Poa annua L., Taraxacum sp. and many other species. The most dominant species was C. album. It attained heights of 100-120 cm at harvest time. The other species were either at low ratio or suppressed by C. album or the crop late in the growing season. 45 The relationship between weed density and yield loss has been described by hyperbolic or sigmoidal models. Many researchers have found that the relationship is well described by a sigmoidal curve (Zimdal, 1980; Spitters and Aerts 1983). Cousens (1985) suggested the hyperbolic relationship. The sigmoidal and hyperbolic models have non negative asymptotic yield for high densities. There is no consensus in literature whether the relation is sigmoidal or hyperbolic. We have found a linear relationship between weed leaf cover and crop yield in our experiment. The linear curve is embodied by sigmoidal curve as a special case. In the linear relationship the lower weed densities can give better relation between leaf cover and yield but the larger densities may predict negative yield which is biologically meaningless. The share in leaf area at canopy closure time can determine competitive strength of species, when interplant competition starts (Spitters and Aerts, 1983). Kropff and Spitters (1991) derived a mathematical model in which the leaf area of a weed species was taken as fraction of total leaf area index of all species. The leaf area estimation taken at early growth stages can give information about the competition ability. The faster crops grow early in the season, the better competition ability do they have. The same is the case for weed species. We have observed in field trials that leaf areas of C. album was considerable larger than the less competitive species (Fig. 2). In practice, weeds of the same species differ in size partly because weeds emerge in flushes and germinate from different depth and partly because of genetic variation. The linear relationship in leaf cover and yield can be different for different crops and different weed species. There are many factors which influence the effect of weeds on crop yield. One of these factors is the relative time of emergence (Kropff and Spitters, 1991). Weeds that emerge earlier, relative to the crop, cause greater yield loss by reducing the availability of resources such as light, water and nutrients (Hall et. al., 1992; Kropff and Van Laar, 1993). Other factors which influence the competition ability are field fertility, soil type, presence and type of tillage, year to year variations in weather and abiotic conditions. Jensen (1991) investigated the size of a number of weeds and observed that weed competition ability varies with soil type, climate and farming system. It was concluded by Kropff (1993) that for practical purposes, simple relationships are needed to predict yield loss. For a successful weed management model, the site specific information on weed distribution, weed species composition and coverage and effect on crop yield should be integrated (Christensen et al., 2009). 3.3 Weed control threshold From the regression analysis we can estimate crop yield relative to all percentage of weed leaf cover. This estimation can be used to suggest an economic threshold. The economic threshold depends upon many factors associated with competitiveness of the species and priorities of the farmer. The farmer is given the option to select his priorities regarding contamination and market price of the crop. The spraying costs and crop yield must also be considered. 46 The selection of threshold changes from crop to crop depends upon many factors like harvesting costs, grain yield, contamination, spray dose, seed bank. In a field, there are certain areas where weed densities are low and weed control is not economically appropriate. In some areas there is a tradeoff between yield loss and spray effects; for instance in order to avoid spray effects yield loss may be tolerated; If a farmer wants maximum yield, then he may choose the lowest level of weed coverage as a threshold; Farmers may accept some weeds to support the biodiversity and farmland wild life. The selection of threshold is based on weed management strategy and it is up to the farmer to define the level where weeds can not be tolerated. In the case of the “intelligent sprayer” the selection of a minimum threshold should be kept flexible so that farmer can make his own choice and implement weed control strategy on yearly basis. He may consider the recommendations of experts and market requirements. 3.4 Yield loss prediction based on leaf cover In field conditions same number of leaf cover can give different yield loss because of various influential factors. Therefore yield loss estimate cannot be given a fixed number. However, a certain range or percentage can be found which covers the effect of other factors. Yield loss prediction based on leaf cover is novel and an ongoing research area. Various models have been developed to relate relative leaf area of weeds and crops at early growth stages with the yield loss. Leaf area estimations should be done at the early growth stages for example when weeds have about two permanent leaves which is the stage when herbicides should be applied if necessary. The economic weed control threshold determined from these models can be integrated with the weed management model used for the intelligent sprayer boom. 3.5 Side effects of non-uniform spraying Often late emerging weeds do not strongly influence the yield loss. Some weed species in winter wheat, growing under favorable conditions, have no effect on crop yield (Lotz et al., 1990). But if these weeds are left uncontrolled, then they may increase the seed bank in the soil and become a problem in the future. In such situations it makes sense to reduce the weed seed production. In the “intelligent spraying boom” project, it is the intention to apply herbicides when a certain weed coverage, expressed in number of pixels, is exceeded. In that case we can ignore the effect of an increase in the soil seed bank, because the area which is left unsprayed and where weed seed are produced may be treated in the following year. In crops grown in rows the other solution of this problem is to spray the whole field in the beginning. This may be necessary in maize fields where the crop is a weak competitor against weeds but later in the season at the second spraying time, we only spray the weed infested spots. Conclusion 47 Estimation of leaf cover through image analysis is a feasible way to estimate weed pressure and it is easy to implement in real time intelligent patch spraying. The yield loss in maize field was linearly correlated with leaf cover of weeds in the early stage of development (4 to 6 permanent leaf stage) where C. album was a dominant weed. Weed control threshold can be selected based on the linear correlation. The procedure can be extended to find the effect of very low weed densities on yield. References Andreasen, C., Stryhn, H., and Streibig, J.C. (1996) Decline of the flora in Danish arable fields. Journal of Applied Ecology, 33, p. 619-626. Andreasen, C. and Stryhn, H. (2008) Increasing weed flora in Danish arable fields and its importance for biodiversity. Weed Research, 48 (1), p. 1–9. Braun-Blanquet, J. (1927) Pflanzensoziologie, Wien: Springer. Chen, Y., Chao, K., and Kim, M. S. (2002) Machine vision technology for agricultural applications. Computers and Electronics in Agriculture, 36 (2-3), p. 173- 191. Christensen, S., Søgaard, H.T., Kudsk, P., Nørremark M., Lund, I., Nadimi, E.S. and Jørgensen, R. (2009) Site-specific weed control technologies. Weed Research 49 (3), p. 233-241. Cousens, R. (1985) An empirical model relating crop yield to weed and crop density and a statistical comparison with other models. The Journal of Agricultural Science, p.105. Cousens, R. (1987) Theory and reality of weed control thresholds. Plant Protection Quarterly, 2, p.1320. Greig-Smith, P. (1984) Quantitative plant ecology. 3rd ed., Oxford: Blackwell. Hall, M.R., Swanton, C.J. and Anderson, G.N. (1992) The critical period of weed control in grain corn (Zea mays L.). Weed Science 40, p. 441-447. Haggar, R.J., Stent, C.J. and Isaac, S. (1983) A prototype hand-held patch sprayer for killing weeds, activated by spectral differences in crop/weed canopies. Journal of Agriculture Engineering Research, 28, p. 349-58. Heap, I. M. (1997) The occurrence of herbicide-resistant weeds worldwide. Pesticide Science, 51, p 235-243. 48 Jensen, P.K. (1991) Weed size hierarchies in Denmark. Weed Research, 31 (1), p. 1– 7. Karan Singh, Agrawal, K.N. and Bora, G.C. (2011) Advanced techniques for weed and crop identification for site specific weed management. Biosystems Engineering, 109, p.52-64. Krebbs, J.R., Wilson, J.D., Bradbury, R.B., and Siriwardena, G.M., (1999). The second silent spring? Nature, 400, p. 611–612. Kropff, M.J. and Spitters, C.J.T. (1991) A simple-model of crop loss by weed competition from early observations on relative leaf-area of the weeds. Weed Research, 31, p. 97-105. Kropff, M.J., Lotz, L.A.P. and Weaver S.E. (1993) Practical applications. Modelling Crop–Weed Interactions, CAB International, p. 150. Kropff, M. J. and Van Laar, H.H. (1993) Modelling crop-weed interactions. Wallingford, Oxon, Great Britain: CAB International, p. 274. Landini, G. (2009) Auto threshold (ImageJ). http://pacific.mpi- cbg.de/wiki/index.php/Auto _Threshold. Lotz L.A.P, Kropff M.J. and Greonevled, R.M.W.(1990) Modeling weed competition and yield losses to study the effect of omission of herbicides in winter wheat. Netherlands Journal of Agriculture Science, 38 (4), p. 711-718. Raunkiær, C.(1934) The life forms of plants and statistical plant geography. Oxford:Clarendon. Spitters, C.J.T. and Aerts, R.(1983) Simulation of competition for light and water in crop weed associations. Aspects of Applied Biology, 4, p. 467-484. Zimdahl, R.L. (1980) Weed-crop competition: a review. International Plant Protection Center, Oregon State University. 49