An automatic object-based method for optimal thresholding in UAV images: Application for vegetation detection in herbaceous crops J. Torres-Sánchez , F. López-Granados, J.M. Peña Institute for Sustainable Agriculture, IAS-CSIC, P.O. Box 4084, 14080 Córdoba, Spain article info Article history: Received 28 July 2014 Received in revised form 27 March 2015 Accepted 28 March 2015 Keywords: OBIA Unsupervised classification Image segmentation Segmentation parameters Remote sensing Unmanned aerial vehicle abstract In precision agriculture, detecting the vegetation in herbaceous crops in early season is a first and crucial step prior to addressing further objectives such as counting plants for germination monitoring, or detect- ing weeds for early season site specific weed management. The ultra-high resolution of UAV images, and the powerful tools provided by the Object Based Image Analysis (OBIA) are the key in achieving this objective. The present research work develops an innovative thresholding OBIA algorithm based on the Otsu’s method, and studies how the results of this algorithm are affected by the different segmentation parameters (scale, shape and compactness). Along with the general description of the procedure, it was specifically applied for vegetation detection in remotely-sensed images captured with two sensors (a conventional visible camera and a multispectral camera) mounted on an Unmanned Aerial Vehicle (UAV) and acquired over fields of three different herbaceous crops (maize, sunflower and wheat). The tests analyzed the performance of the OBIA algorithm for classifying vegetation coverage as affected by different automatically selected thresholds calculated in the images of two vegetation indices: the Excess Green (ExG) and the Normalized Difference Vegetation Index (NDVI). The segmentation scale parameter affected the vegetation index histograms, which led to changes in the automatic estimation of the optimal threshold value for the vegetation indices. The other parameters involved in the segmentation procedure (i.e., shape and compactness) showed minor influence on the classification accuracy. Increasing the object size, the classification error diminished until an optimum was reached. After this optimal value, increasing object size produced bigger errors. Ó 2015 Elsevier B.V. All rights reserved. 1. Introduction In precision agriculture, detecting the vegetation in herbaceous crops in early season is a first and crucial step prior to addressing further objectives such as counting plants for germination monitoring, or detecting weeds for early season site specific weed management. Discrimination of the crop plants in their first stages of development needs images at very high spatial resolution, often in the order of mm or very few cm (Hengl, 2006; López-Granados, 2011). Also it is required that the images can be taken at the optimal moment for the desired purpose. The most suitable tool for accomplishing both requirements is the Unmanned Aerial Vehicle (UAV); UAVs flying at low altitudes (maximum altitude allowed in the Spanish law for UAVs is 120 m) allow acquiring images with very high spatial resolution (VHSR), and the low time required for launching an unmanned aerial mission makes it possi- ble to take images just at the required moment. Furthermore, it has been demonstrated that vegetation indices (VI) calculated from UAV images are suitable for vegetation detection in herbaceous crops (Torres-Sánchez et al., 2014). VIs are the product of arithmetic operations performed with spectral information from the radiation reflected by the vegetation, and these operations enhance the spectral difference between classes. VHSR images represent a challenge for classification because, unlike in lower resolution images, single pixels no longer capture the characteristics of the classification targets. Additionally, these images show higher intra-class spectral variability (Aplin, 2006; Woodcock and Strahler, 1987). For dealing with this spectral vari- ability a new paradigm has emerged in recent years, the Object Based Image Analysis (OBIA) (Blaschke, 2010). OBIA works with groups of homogeneous and contiguous pixels (called objects), which reduces the intra-class spectral variability caused by crown textures, gaps, and shadows. The basic idea of this process is to first group spatially adjacent pixels into spectrally homogeneous objects, and then conducting the classification using objects as the minimum processing units. Several studies (Addink et al., 2007; Dra ˇgut ß et al., 2010; Karl and Maurer, 2010; Moffett and http://dx.doi.org/10.1016/j.compag.2015.03.019 0168-1699/Ó 2015 Elsevier B.V. All rights reserved. Corresponding author. Tel.: +34 957499218. E-mail address: jtorres@ias.csic.es (J. Torres-Sánchez). Computers and Electronics in Agriculture 114 (2015) 43–52 Contents lists available at ScienceDirect Computers and Electronics in Agriculture journal homepage: www.elsevier.com/locate/compag