Introduction

The primary purpose of classifying a satellite image is to extract features of interest and prepare thematic maps. With the increase in spatial resolution of satellites, features of interest have also been redefined. For example, individual trees and buildings are gradually becoming features of interest unlike forests and urban areas in the past. Since features of interest are gradually becoming small, tone and texture alone may not produce desirable image classification accuracy. Object-based methods, which use shape, size and context in addition to tone and texture, have been shown to be useful for achieving higher classification accuracy in comparison to pixel-based methods (Akcay and Aksoy 2008; Blaschke 2010; Gholoobi and Kumar 2015; Kartikeyan et al. 1994; Laliberte et al. 2004; Pradhan et al. 2014). One of the pre-requisites for object-based image analysis (OBIA) is the creation of objects, which is defined as a group of homogeneous pixels in an image (Benz et al. 2004; Blaschke et al. 2006). Image segmentation by region growing techniques are mainly used to group pixels based on their homogeneity and create objects that can be used in OBIA (Pal and Pal 1993; Zhang et al. 2005). Multi-resolution segmentation (MRS) as implemented in eCognition software is a bottom up region merging technique and has been widely used for creation of objects for image classification (Benz et al. 2004; Ouma et al. 2008; Pradhan et al. 2014). MRS partitions an image into spatially continuous, mutually disconnected and homogeneous regions at various segmentation levels based on homogeneity criteria defined by the user (Blaschke 2010). Details of MRS algorithm are given by Baatz and Schäpe (2000). MRS has the advantage of considering several homogeneity criteria such as color, shape, compactness and smoothness during the creation of objects (Dragut et al. 2009; eCognition 2009; Ouma et al. 2008). However, the quality of objects created by MRS relies mostly on the choice of scale parameters by a series of trial and error approach and therefore, is a subject of great research interest in OBIA (Blaschke 2010; Hay and Castilla 2006).

In the context of OBIA, scale is defined as the level of aggregation and abstraction of pixels at which an object can be clearly described (Benz et al. 2004). Selection of a small scale value in MRS results in a large number of small sized objects and vice versa. Finding a scale value by unsupervised methods to optimally segment an image will reduce user intervention (Esch et al. 2008; Tian and Chen 2007). This is mainly done by applying techniques that aim at balancing the under- and over-segmentation. Espindola et al. (2006) observed that segmentation has two desirable properties: each of the resulting segments should be internally homogeneous and should be distinguishable from its neighbourhood. Therefore, a balance between under- and over-segmentation can be determined by combining a spatial autocorrelation indicator that detects homogeneity between regions and a variance indicator that expresses the overall homogeneity in the region (Espindola et al. 2006). Use of spatial autocorrelation for measurement of image segmentation quality particularly suits MRS, which produces closed regions (Espindola et al. 2006). However, the objective function proposed by Espindola et al. (2006) by combining spatial autocorrelation and variance indicated a single scale to classify the whole image which is unlikely to produce an accurate classification result since features on surface of the Earth are present on multiple scales depending upon their size, shape and association (Woodcock and Harward 1992).

One of the first significant works on objective selection of multiple scales for OBIA was done by Dragut et al. (2010). The Estimation of Scale Parameter (ESP) tool developed by Dragut et al. (2010) used local variance to find multiple scales in an image. ESP is a ready to use tool for estimation of multiple scales for MRS using eCognition software. However, major limitations of the ESP tool are the use of single band and non consideration of spatial autocorrelation indicator to determine multiple scales in an image. Also, the LV-ROC graph generated by the ESP tool shows several peaks and troughs which makes it difficult for an user to choose appropriate scales for image segmentation (Rau et al. 2014). Subsequently, the concept of objective function proposed by Espindola et al. (2006) was further developed by Martha et al. (2011) and Johnson and Xie (2011) to find out multiple optimal scales in an image. Martha et al. (2011) carried out MRS of an image for 50 different scales, and estimated the variance and spatial autocorrelation of objects created at each scale. Variance and spatial autocorrelation of objects were combined to develop a new plateau objective function (POF) which indicated definite multiple optimal scales in an image (Martha et al. 2011). POF is based on the concept that other objective function peaks in the POF curve are distinct and close to the maximum objective function value, and therefore, corresponds to locally optimum scales in the satellite image (panchromatic or multispectral; Martha et al. 2011, 2012). Similarly, Johnson and Xie (2011) carried out MRS for 25 different scales and proposed a new heterogeneity index (H) to further refine the under- and over-segmented regions and obtained multiple scales for an image. Ikokou and Smit (2013) have also used similar method proposed by Espindola et al. (2006) and Johnson and Xie (2011) to find out multiple optimal scales in an image to classify urban areas.

Recently, Dragut et al. (2014) reworked on the limitations of the ESP tool (Dragut et al. 2010) and developed ESP-2 tool to estimate multiple scales in multispectral images. The ESP-2 tool estimates three optimal scale parameters and segments the image into three levels for classification purpose. Segmentation of the image into three levels was broadly guided by the work carried out by Dragut and Eisank (2012) on hierarchical classification of landforms from elevation datasets. However, there may be multiple scales in an image, each related to presence and association of features of different shape and size in a landscape (Martha et al. 2011). Therefore, it may not be realistic to find three scales always in an image. Moreover, the ESP-2 tool may be relevant to a three-tier hierarchical classification approach for a regional geomorphology or land use/cover study (Martha et al. 2013), but difficult to apply to create segments for classification of high resolution images when the purpose is to identify small size features (e.g. road, building or tree).

This paper proposes development of a ready to use Optimum Scale Parameter Selector (OSPS) tool to find out multiple definitive optimum scale parameters in an image in an objective way for MRS using eCognition software. This tool consists of three modules which can be used for creation of representative objects by the MRS technique during feature extraction by OBIA. Effectiveness of the OSPS tool is tested in two areas with WorldView-2 and Resourcesat-2 LISS-IV Mx satellite data having different spatial and spectral resolutions.

Methodology

Development of optimal scale parameter selection tool as proposed in this paper is based on balancing under- and over-segmentation of any optical satellite image while applying the MRS technique. This involves calculation of intra-segment weighted variance as a measure of internal homogeneity, spatial autocorrelation (i.e. Moran’s I) as a measure of inter-segment heterogeneity and POF to find out statistically optimum definitive scale parameters (Martha et al. 2011).

The OSPS tool developed in the present study consists of three modules and helps the user to calculate weighted variance, Moran’s I and POF. The first module deals with the development of a routine for image segmentation in eCognition software to segment the image multiple times using different scale parameters. It creates a weighted variance text (.txt) file and shape (.shp) files as outputs corresponding to each scale. The role of second module is to find the spatial autocorrelation of objects derived with different scale parameters using ArcGIS software and generation of a text (.txt) file to store the Moran’s I values for all shape files. The third module finds optimum scales in the image from a plot generated using the two text files created in modules I and II. The methodology flowchart showing different modules of OSPS tool is given in Fig. 1.

Fig. 1
figure 1

Flowchart to estimate optimum scales in an image using OSPS tool

OSPS Module-I

The objective of OSPS Module-I is to calculate weighted variance of objects derived using multiple scale parameters. This involves multi-resolution segmentation of the image with a given scale parameter and then calculation of the weighted variance and repetition of this exercise using different scale parameters. A routine was developed in eCognition software to automatically segment the image for a given range of scale parameters defined by a user and export the result as a text file, which contains the weighted variance corresponding to each scale parameter. This module also export objects derived from segmentation with each scale parameter as shape (.shp) files with brightness as the object attribute information. These files were stored in a folder with each shape file leveled against the scale parameter and were used as inputs in OSPS Module-II to calculate spatial autocorrelation.

To segment the image in a range of scales, a while loop was implemented which terminates when the condition ‘current scale ≤maximum scale’ is satisfied. This was possible because the current scale increments by a step size, which is defined by the user. In this loop, segmentation at pixel level was done and then weighted variance was calculated for each scale.

The routine was converted into a customized algorithm using cognitive network language (CNL) within the eCognition software (Fig. 2). Users can specify the algorithm parameters such as shape, compactness, step size, minimum and maximum scale as shown in Fig. 2 and then execute the tool to calculate the weighted variance.

Fig. 2
figure 2

Graphic user interface (GUI) of the OSPS Module-I for calculation of the weighted variance

OSPS Module-II

The objective of this module is to calculate Moran’s I values of each shape (.shp) file generated by OSPS Module-I using ArcGIS software. This module was developed using Python 2.7, which is compatible with ArcGIS 10.1. This tool takes the input from the folder containing shape (.shp) files, which were generated using the previous module and stores the result in a text (.txt) file as defined by the user (Fig. 3). This tool was developed as an arctoolbox and can be readily used to execute OSPS Module-II (Fig. 3).

Fig. 3
figure 3

OSPS Module-II interface in ArcGIS

OSPS Module-III

This module plots scale versus objective function and calculates POF to determine optimum scale parameters that can be used to extract representative objects using MRS technique. This tool is also known as optimal scale visualizer since a user can visualize optimal scales out of a range of scales. We used Python for developing the plot tool since major softwares such as ArcGIS and GRASS GIS uses Python as their base platform by replacing the .Net platform. Python is also suitable as an extension language for customizable applications. The plot tool takes the two text files obtained from OSPS Modules I and II as input, and displays the output in a graph which annotates optimum scales with scale parameter values.

Matplotlib, a 2D graphics package mainly used in Python for application development, interactive scripting and publication quality image generation across user interfaces and operating systems, was used to develop this module. Additionally, we used few more packages such as Tkinter and numpy in the tool development. The tool searches a peak which is above the POF value and annotates them with respect to their scale values (Fig. 4). The peak is defined as the value which is greater than its immediate adjacent values. These peaks represent multiple optimal scales and are stored in a text (.txt) file at the location where the two input text (.txt) files were present. The plot tool is converted into an executable file using py2exe package. Therefore, it is independent of any platform.

Fig. 4
figure 4

Plot generated from OSPS Module-III showing optimum scales. The icons in bottom left of the plot give options such as zoom and save. Optimum scales are indicated by arrows

OSPS Tool Validation

To validate the OSPS tool, we selected two high resolution multispectral images (Table 1). Resourcesat-2 LISS-IV Mx data corresponds to an area in the Alaknanda river valley in the Uttarakhand state in northern part of India. Alaknanda river valley, being prone to occurrence of landslides, becomes an ideal location to validate the tool for object-based image classification, particularly since large number of studies has been carried out recently on the use of OBIA for detection of landslides (Behling et al. 2014; Lu et al. 2011; Martha et al. 2010, 2012; Rau et al. 2014; Stumpf and Kerle 2011; Van Den Eeckhaut et al. 2012).

Table 1 Description of satellite data used for OSPS tool validation

WordView-2 data corresponds to an area in the Uttar Pradesh state in northern part of India. This area has a mixed land cover consisting of urban, water, agriculture and plantation. The diverse land cover of the study area in Uttar Pradesh makes it a suitable location to validate the efficiency of the tool for a possible land use/land cover classification using OBIA.

Assessment of Segmentation Result

Quality of objects created using scale parameters selected by the OSPS tool was assessed by comparing the segmentation result with reference polygons prepared manually through image interpretation (Clinton et al. 2010; Dragut et al. 2014). Area-based segmentation goodness metrics such as over-segmentation (OS), under-segmentation (US), RMS of OS and US combined measures (D), area fit index (AFI) and quality rate (QR) proposed by Clinton et al. (Clinton et al. 2010) were used for the quantitative assessment of spatial match between the image objects and reference polygons. OS, US, D and QR ranges between 0 and 1, where 0 indicates total spatial match indicating a good segmentation. AFI = 0 means good segmentation. A positive and negative value of AFI indicates over segmentation and under segmentation, respectively.

Results and Discussion

The basic purpose of image segmentation is to derive representative objects, which can outline features of interest sufficiently to apply class discrimination criteria. In this study, we tested the efficiency of the OSPS tool to create representative objects. Validation of the tool was carried out in two different areas using datasets listed in Table 1. Results are discussed below.

Validation in a Landslide Affected Area

Resourcesat-2 LISS-IV Mx data were used to create objects for landslides. Accurate detection of landslides aid early response in disaster management activities and subsequent landslide susceptibility and hazard assessment (van Westen et al. 2008). Landslide affected areas appear bright in post-event satellite images due to loss of vegetation and exposure of fresh rock and soil. Also, landslides mostly occur as linear objects with linearity extended in the downslope direction. If landslides are outlined properly, then spectral criteria such as NDVI, shape criteria such as length/width ratio and morphometric criteria such as slope and flow direction can be applied to successfully classify them (Martha et al. 2010). The optimum scales obtained using the OSPS tool for the Resourcesat-2 LISS-IV Mx image are shown in Fig. 5.

Fig. 5
figure 5

Optimum scales (9, 13 and 23) in the Resourcesat-2 image of a landslide affected area

We segmented the image using optimum scale parameters shown in Fig. 5 and assessed the accuracy of the segmentation results by comparing objects with manually mapped reference polygons using segmentation goodness metrics explained in “Assessment of Segmentation Result” section. Segmentation using scale parameter 23 was able to create objects, which could outline landslides completely (Fig. 6b). However, scale value 23 over-segmented some of the bigger landslides present in this area. Creation of a single object corresponding to a landslide is an ideal requirement since spectral, shape and morphometric properties of landslides can be defined well to accurately detect them. However, eCognition software offers an opportunity to implement merge and resegmentation algorithms within the same ruleset to create meaningful objects for landslides (Refer Fig. 8 in Martha et al. 2011). Therefore, spectral criteria such as NDVI can be used initially to classify objects obtained using scale value 23 as probable landslides and then can be merged to create one meaningful object for each landslide so that shape and morphometric criteria can be used subsequently to detect them (Martha et al. 2010). This helps to minimise over-segmentation of landslides while giving an opportunity to detect maximum number of landslides from an image. Similarly, small landslides, which could not be created as objects using scale parameter 23, were outlined using scale values 13 and 9 (Fig. 6c, d).

Fig. 6
figure 6

Validation of the segmentation result in a landslide affected area. a Resourcesat-2 LISS-IV Mx image showing landslides as bright linear features, b objects created for large landslides using scale parameter 23, c objects created for medium landslides using scale parameter 13 and d objects created for small landslides using scale parameter 9. Landslides those could be outlined as objects are highlighted with yellow arrows

Results of the segmentation goodness metrics are shown in Table 2. Balance of under and over segmentation was good for small landslides (D = 0.27). However, AFI i.e. the spatial match of the segmentation results is better for large and medium landslides in comparison to small landslides. AFI is negative for small landslides since over segmentation is less in comparison to under segmentation (Lucieer and Stein 2002).

Table 2 Goodness of segmentation results obtained for Resourcesat-2 image using OSPS tool

Validation in a Semi-Urban Area

The main objective of image classification using a high resolution satellite data is the extraction of small size features of interest which are generally not detectable in moderate or coarse resolution satellite images. In this study, we used a 2 m spatial resolution WorldView-2 multispectral image to find optimum scales using OSPS tool to create representative objects for buildings, roads, agricultural field, water bodies and trees. Outlining of these features as objects will help application of spectral, shape and size criteria for feature extraction using OBIA.

Six scale parameter values were obtained from the OSPS tool (Fig. 7). We segmented the WorldView-2 image with these scale parameters and assessed the accuracy of segmentation results. Figure 8 shows that scale parameters obtained from the OSPS tool were able to segment the WorldView-2 image for various features such as roads, agricultural fields, water bodies, buildings and trees.

Fig. 7
figure 7

Graph showing optimum scale parameters (5, 7, 24, 27, 36 and 42) obtained using OSPS tool from WorldView-2 image covering a semi-urban area

Fig. 8
figure 8

Validation of segmentation result in a semi-urban area. a WorldView-2 image showing various features in the study area, b objects created for road using scale parameter 42, c objects created for agriculture field using scale parameter 36, d objects created for water bodies using scale parameter 27, e objects created for buildings using scale parameter 24, f1 and f2 objects created for trees using scale parameter 7 and 5. Reference features such as building, agricultural land, tree and water body are shown with olive green polygons

Objects created by these scale parameters were compared with reference polygons created manually for ground features. Segmentation result assessment metrics of the WorldView-2 image are given in Table 3. Best segmentation result was achieved for agriculture fields with D as 0.15, indicating a good balance between under- and over-segmentation. AFI for water bodies is 0.03 which indicates a good spatial match between objects created by scale parameter 27 and reference polygons and is comparable to the AFI for water bodies (0.06) obtained by the ESP-2 tool (Dragut et al. 2014). However, the segmentation goodness metrics for objects related to buildings obtained by the OSPS tool (AFI = -0.28, OS = 0.17, US = 0.31, D = 0.25) are better than the ESP-2 tool (AFI = 0.72, OS = 0.78, US = 0.22, D = 0.57) (Dragut et al. 2014). Segmentation goodness result (D = 0.30) for trees obtained using scale parameter 7 is better in comparison to the segmentation result (D = 0.38) obtained using scale parameter 5 (Table 3). Therefore, scale parameter 7 should be used for accurate identification of trees. Road, although created as a single linear object using scale parameter 42, showed a high D value in comparison to other features (Table 3). A previous study by Tian and Chen (2007) on optimisation of multi-scale segmentation also showed lower value of goodness of segmentation for road in comparison to other features such as building and sports field.

Table 3 Goodness of segmentation results obtained for the WorldView-2 image using OSPS tool

Conclusions

Selection of scale parameter is a key requirement for image segmentation techniques such as MRS implemented in eCognition software. In this study, we developed a ready to use OSPS tool for unsupervised selection of multiple scale parameters in an image using MRS technique. The OSPS tool consists of three modules. OSPS Module-I was implemented using CNL language in eCognition software and mainly calculates the weighted variance. OSPS Module-II performs spatial autocorrelation and calculates the Moran’s I value, and was developed as an arctoolbox using Python script which is compatible with ArcGIS 10.1 and its subsequent versions. OSPS Module-III is a plot tool which generates multiple optimum scales in an image, and was developed using Matplotlib, Tkinter and numpy.

The efficiency of OSPS tool to extract representative objects at multiple levels was validated with two high resolution satellite images having different spatial and spectral resolutions. The optimum scale parameters obtained from OSPS tool for the Resourcesat-2 LISS-IV Mx image covering a landslide affected areas could outline landslides of different sizes as objects. Although, OSPS tool could create objects for landslides, some of the large landslides were over-segmented. Over-segmentation in a landslide detection routine using OBIA is better since it can be dealt through merging and resegmentation processes in eCognition software that can be part of an overall detection approach (Martha et al. 2010, 2011). Similarly, multiple scales obtained from WorldView-2 image using the OSPS tool could create representative objects for buildings, trees, water bodies, roads and agricultural fields. Scales in an image are not limited and depend on the landscape as well as size of various features. OSPS tool could bring out inherent multiple optimum scales in an image (three for a landslide affected area and six for a semi-urban area) which will help knowledge-based characterisation of landscape features in an efficient manner. However, linking of scale parameters to features of interest was done through visual assessment.