GuidosToolbox: universal digital image object analysis

ABSTRACT The increased availability of mapped environmental data calls for better tools to analyze the spatial characteristics and information contained in those maps. Publicly available, user-friendly and universal tools are needed to foster the interdisciplinary development and application of methodologies for the extraction of image object information properties contained in digital raster maps. That is the overarching goal of GuidosToolbox, which is a set of customized, thematically grouped raster image analysis methodologies provided in a graphical user interface and for all popular operating systems. The Toolbox contains a wide selection of dedicated algorithms and tools, which are complemented by batch-processing and pre- and post-processing routines, all designed to objectively describe and quantify various spatial properties of image objects in digital raster data. While first developed for the analysis of remote sensing data in environmental applications, the Toolbox now provides a generic framework that is applicable to image analysis at any scale and for any kind of digital raster data.


Introduction
In the past decades, human activities have imposed increasing pressure on our environment (Steffen et al., 2004). Urbanization, land conversion to agriculture and large-scale monocultures, deforestation, climate change and the increased amount of fires and pest outbreaks are just a few examples highlighting the urgent need for a systematic landscape-monitoring scheme to support efficient mitigation measures (Carpenter et al., 2006). Spaceborne observations are now widely available, providing essential and harmonized information for different thematic questions, across political boundaries, and at multiple scales (O'Neill et al., 1997;Turner et al., 2007). They are a cost-efficient and consistent data source suitable for mapping and monitoring landscape changes (Rose et al., 2014;Roy et al., 2014). However, understanding the observed changes requires knowledge of a variety of landscape attributes such as composition, pattern and connectivity (Chetkiewicz et al., 2006;Gustafson, 1998;Lausch et al., 2015;Turner, 2005). Some of these attributes are often obvious to the human eye, but automated methods and tools are required when using those data to monitor, quantify and compare the impacts of human activities on our environment in a consistent way over large regions (Riitters, Wickham, Vogelmann, & Jones, 2000). Knowledge of the patterns of change and not just the locations of change is a prerequisite for sustainable, multifunctional landscape management, as well as the design of effective resource management policies (Pickett & Cadenasso, 1995).
This paper describes a free software package that provides an integrative framework for a series of generic digital image analysis schemes tailored to locate, measure and create maps of essential image pattern and object attributes in a universal and consistent way. The Graphical User Interface for the Description of Objects and their Shapes Toolbox (GuidosToolbox) provides user-friendly access to a variety of dedicated morphological spatial analysis procedures (Soille, 1994(Soille, , 2004, 2007bVogt et al., 2007a), which are not available in any other software. Additional routines, similar to those provided in other free software, such as QGIS [http://qgis.org/en/site/], GRASS [http://grass.osgeo. org/], GDAL [http://www.gdal.org/], R [https:// www.r-project.org/], Conefor Torné, 2009) andFRAGSTATS (McGarigal, Cushman, &Ene, 2012), have been fine-tuned to provide direct answers for end users in a variety of thematic application fields, requiring the analysis of image attributes such as pattern, fragmentation, connectivity and change. The provision of GuidosToolbox as a stand-alone application in a self-contained directory allows for maximum portability: it is easy to use the application from an external USB-drive. GuidosToolbox can be installed without administrator rights on the three main operating systems, permitting use of the software even in restricted computing environments. We anticipate this brief introduction will encourage readers to examine the related documentation included in the software and further detailed in the optional workshop material.

Program description
GuidosToolbox is structured in four pillars (see Figure 1) with pillar 3 containing custom containers for specific thematic applications and other pillars containing generic image processing tasks. Pillar 1 (File) contains a series of GUI-driven routines to read and export images in various data formats, including setting up kml-formatted raster image overlays for display in Google Earth (examples and instructions for visualization can be found at http://forest.jrc.ec.europa.eu/download/data/googleearth-overlays/). This kml option enhances the interpretation of the results by fusing it to the additional data layers provided within the Google Earth desktop application. In addition to analyzing individual images, the Batch menu entry provides a GUI-driven setup for automated processing of a series of images. Batch processing options include most routines from pillar 3 (Image Analysis).
Pillar 2 (General Tools) provides a series of routines for preprocessing including recoding, thresholding, byte-shifting and projecting GeoTiff images to WGS84 to set up Google Earth raster image overlays. The next set of tools address generic digital image processing tasks including a series of filters for convolution, equalization, thresholding, edge detection and a small morphological toolbox to illustrate the effect of different types and structuring elements of morphological operators. The last set of tools contains external software packages to facilitate further analysis in the field of geospatial data processing using the geospatial libraries GDAL (Warmerdam, 2009). Upon startup, GuidosToolbox will add a launcher to QGIS, a free and powerful GIS application, if it is present on the user's system. Pillar 4 (Help) provides access to the following GuidosToolbox-related information: a detailed user manual; a dedicated guide to the Morphological Spatial Pattern Analysis (MSPA) input requirements, processing settings and output features; links to the project homepage and program news; information about and installation of the optional GuidosToolbox workshop material containing additional information, sample data and exercises; and options to check for and install updates.
Pillar 3 (Image Analysis) is the core of the GuidosToolbox software collection, featuring custom routines grouped in a modular structure to address specific thematic aspects of image processing. All routines within these thematic containers are unique to GuidosToolbox and not available in any other image processing software. For maximum applicability on any kind of digital image analysis, all routines are based on geometric principles exclusively. To facilitate the interpretation of the results, the user can apply custom grouping of the pixel values to highlight low, medium and high value ranges for a variety of attributes. The following sections describe the thematic containers in Pillar 3.

Pattern
Concepts of mathematical morphology are widely used in digital image analysis (Soille, 2004) and they form the foundation of GuidosToolbox. A custom sequence of morphological operators provides a generic and universal pattern analysis framework named MSPA ). MSPA conducts a segmentation on a binary image to detect and localize mutually exclusive morphometric feature classes describing the shape, connectivity and spatial arrangement of image objects on a categorical map (see Figure 2).
A set of moving window routines (Riitters, O'Neill, & Jones, 1997, 2002 allows for quantifying aggregation, contagion, texture and deriving the landscape mosaic Wickham & Norton, 1994), which is a tripolar classification of a location accounting for the relative proportions of three (land cover) classes in a window surrounding that location.

Network
A unique feature of MSPA is the automatic detection of connecting pathways between core areas of image objects. Once found, the logical next point of interest is to rank those detected pathways with respect to their relative importance of each component, node and link in a given network. This task is achieved by applying concepts and metrics of graph theory (Saura & Rubio, 2010;Saura, Vogt, Velázquez, Hernando, & Tejera, 2011a). In addition, GuidosToolbox provides custom tools to set up dedicated input files for additional detailed investigations of network properties within a graph-theory application, i.e. the Conefor software package (Saura & Torné, 2009) available at http://www.conefor.org

Fragmentation
The routines in this section use holistic and purely geometric concepts such as spatial entropy and contagion to quantify spatial heterogeneity and to provide normalized per-pixel values on a map as well as a summary index for the entire image. The methodologies in this section were Figure 2. The GuidosToolbox software interface showing a selection of thematic containers in Pillar 3 (Image Analysis) and the MSPA pattern analysis in the viewport illustrating different morphological feature classes of a forest map: Small Core areas (dark green); large Core areas (green); Core area boundaries (Edge/externalblack, Perforation/internalblue); connecting pathways between different Core areas (Bridgered) and returning back to the same Core area (Loopyellow); isolated forest patches and too small to contain Core area (Isletbrown); and Branches (orange). The MSPA Settings and class statistics are summarized in the left column of the interface. developed specifically to go beyond describing fragmentation as perceived by faunal species and instead providing quantitative, normalized measures as well as spatial details for various aspects of fragmentation. Further details on these methodologies are explained in Vogt (2015) and GOFC-GOLD (2017).

Distance
The routines in this section will create maps of objects of interest and showing the Euclidean distance map inside and outside those objects. This type of analysis may be further pursued to illustrate the Influence Zones of each object and to derive the pairwise proximity between neighboring image objects. The concept of Influence Zones could be of interest to map potential areas of risk for insect diseases. Proximity may be used to locate close encounters of existing objects for the establishment of costefficient reconnecting pathways in restoration planning.

Cost
Cost analysis can be seen as a generalized distance analysis where the pixels along a given path are counted by a weighted sum of resistance and distance along the path. Here, we use the concept of generalized geodesy via geodesic time (Soille, 1994): We start with two maps, a resistance map showing the normalized value of resistance for each pixel, and a marker map showing the location and extent of the start object. With these two maps, we then calculate the travel time from the start object boundaries to arrive at any other pixel in the map, resulting in the cost map for the start object. When repeating the same process for a target object, the two cost maps can then be added to a combined cost map for travelling from the start to the target object. The least cost path between start and target object is the skeleton of the pixels having the minimum cost value in the combined cost map. An animated sequence illustrating this idea is provided at the project homepage: http:// forest.jrc.ec.europa.eu/download/software/guidos/ The Reconnect module provides an interactive interface to detect and investigate a minimum cost path between any two user-selectable image objects. The potential efficiency of such a path is then quantified by the price (number of pixels to establish this path) in relation to the connected area gained in the network by creating that path, with the connectivity gain quantified as the increase in the value of the ECA metric (ECA=Equivalent Connected Area, see Saura, Mouton, & Rodríguez-Freire, 2011b). The Reconnect module may also be used in conservation programs to detect important stepping stones between existing habitat patches.

Objects
The routines in this section are dedicated to describe individual image object attributes. One option is to label objects for a predefined minimum size and 8-or 4-connectivity. Contortion measures the degree of regularity of a given image object. Its value is derived by following the object perimeter and counting the number of changes in the x-and y-directions. In raster data, regularly shaped objects such as buildings and agricultural fields will have low contortion values, while natural objects are more likely to be non-regular with higher contortion values.

Change
A custom morphological change analysis (Seebach, Strobl, Vogt, Mehl, & San-Miguel-Ayanz, 2013) is available, with the focus to neglect spurious changes and provide essential change areas of loss and gain only. Besides the spatial distribution of the change areas, this methodology will also calculate the elasticity value (Riitters, Wickham, Costanza, & Vogt, 2015), which is the ratio of the percent change in interior area to the overall percent change. For example, in the case of forest loss, larger elasticity indicates changes with relatively proportion of loss of interior forest creating larger fragmenting effects.

Application examples
All image analysis schemes in GuidosToolbox are based on geometric principles only. This choice was taken in order to set up a generic, neutral analysis framework, which can be applied to any kind of digital data and at any scale or spatial resolution. This section provides some examples to illustrate the additional benefit of the GuidosToolbox-specific image analysis schemes in a variety of thematic applications. Additional examples can be found in the workshop material.
One of the key components in GuidosToolbox is the spatial pattern analysis MSPA . MSPA detects and describes the morphometric aspects of the foreground objects on a categorical map. The result is a copy of the input map, where the foreground objects are segmented into a set of mutually exclusive morphometric feature classes. In short, this process can be applied to detect and measure protrusions into intact areas, distinguish between core areas and boundaries, and in particular to automatically find connecting pathways. Figure 2 shows MSPA of a forest map highlighting several morphometric aspects and a statistical summary of the forest patches in a given landscape. This type of information may be useful in forest inventories, landscape and conservation studies designed to protect connecting pathways (Bridges) and guarantee the integrity of the forest network. In addition to connecting pathways, the MSPAdetected perforations are of key interest in biodiversity applications, such as species-specific habitat assessment schemes. Since perforations are holes in otherwise core habitat, they strongly alter habitat quality by introducing edge effects deeper into previously core habitat. In contrast to commonly used landscape indices, the MSPA map product provides the additional benefit to find and provide the geographic location of local hot spots in connecting pathways, perforations, intact habitat areas and other forest patch attributes. Figure 3 shows a global MSPA forest map saved as a Google Earth image overlay. This image format may be used to display any geospatial information obtained from GuidosToolbox together with the additional data layers available from the Google Earth interface. The image overlay archive can be directly provided to the end user or stored on a web-server. The user can then load the archive into Google Earth and interactively browse to any part in the world and visualize the corresponding forest pattern distribution via the Transparency slider in the left panel of the Google Earth desktop application. Additional examples are available at http://forest.jrc. ec.europa.eu/download/data/google-earth-overlays/.
The images in Figure 4 illustrate the benefit of using a purely geometric assessment framework, applicable to any scale and thematic nature of the input data. Since any kind of digital data can be analyzed, we illustrate the automatic detection of connecting pathways on the classic example of a maze. The top row shows a photograph of a maze having an entry and an exit point in the outer surrounding white area. The MSPA will map this outer area as core and detect the searched connecting pathway as a loop reconnecting back to the same core area. The bottom row shows examples of pattern analysis on macroscopic images of zooplankton. Here, MSPA was used to investigate the presence and proportions of MSPA pattern classes (corresponding to e.g. maxillipeds, antennae) of different type and evolution stages in zooplankton image data. The results were then ingested into a machine-learning algorithm for automatic identification of key zooplankton taxa in the Canadian Arctic (Schmid, Aubry, Grigor, & Fortier, 2016).
By analogy to describing structural features on a structural map, MSPA can equally be applied to functional maps and then locate functional patterns. This concept was demonstrated through the analysis of a species movement (functional) map with the detection of stepping stones, represented as a functional connecting pathway .
A key issue in any graph-theoretic application is the preparation of the input data. Here, connectivity is defined by stipulating the actual structural or functional connections between different nodes, which is particularly difficult when dealing with images having a multitude of nodes. In many cases, a human interpreter will conduct this time-consuming and errorprone task. In this case, MSPA provides an automatic, reliable and repeatable methodology to set up the network description via the analogy of the MSPA pattern class: core representing network nodes and the MSPA class Bridge representing network links. This intersection of graph-theory and MSPA pattern analysis is mutually beneficial: The graph-theory input data can be set up reliably in an automatic way, and MSPA can take advantage of graph-theory algorithms, for example to provide a ranking of the importance of the MSPA-detected set of Bridges. This concept is demonstrated in Figure 5 by Saura et al. (2011a), highlighting the additional benefit of merging the two analysis frameworks for detecting and prioritizing conservation hot spots in the province of Segovia, Spain. The human impact on our landscape is a primary concern for landscape planning, climate change analysis and risk assessment studies. By analogy to the familiar soil triangle that classifies soil type based on the relative proportions of sand, silt and clay in a soil sample, land cover types can be decomposed into the three main components: Agriculture, Natural and Developed Wickham & Figure 5. Combining pattern and connectivity analysis for efficient forest conservation management in the province of Segovia, Spain: Detection and ranking of most important forest core areas (green) and connecting pathways (red). Norton, 1994). The relative proportion of these three components can then be investigated in a moving window analysis, which produces a map of human influences measured by the landscape mosaic type. The spatial dimension of the moving window can be set by the user and in this way, which essentially samples landscapes at higher or lower spatial frequencies and allows the user to visualize the landscape mosaic at different spatial scales. This is illustrated in Figure 6, where the landscape mosaic has been calculated on the same input data but with moving window sizes of 1 × 1 km and 10 × 10 km. This feature may be used or interpreted to find dominant land cover types and human-natural interface zones at different spatial scales. Over time, or in simulation studies, this type of analysis has the potential to detect tipping points, where local landscapes change from one landscape mosaic type to another, and to visualize the geographic movement of shifting mosaics over time.
The increase in road networks, conversion to agriculture and human activity in general has led to increased landscape fragmentation. GuidosToolbox provides a set of different fragmentation assessment schemes, focusing on specific aspects of fragmentation (Vogt, 2015). In contrast to the usual species-specific assessment schemes, the GuidosToolbox provided routines have the advantage to provide spatially explicit, normalized, species-independent fragmentation indices. These attributes are mandatory in order to locate hot spots, measure fragmentation at different scales and places, as well as to measure changes in fragmentation over time. For example, in Figure 7, the normalized per-pixel indices of forest fragmentation are retrieved. Running the same analysis over the same area at a different time will immediately display hot spots of changes and quantify per-pixel changes. Quantification and mapping of changing fragmentation is of particular interest for decision and policy makers because it allows measuring the progress and/ or the success of land management programs and their impacts on our environment.
Landscape changes and fragmentation may have a strong impact on the permeability of the landscape for protected species and/or the accessibility of different habitat patches. Different types of land cover exhibit species-specific resistance values to traverse a given land cover . Cost analysis studies evaluate the aggregated resistance over space and/or along movement routes. A commonly known measure is the so-called least cost path, indicating the path of least aggregated resistance, equivalent to  the shortest travel time, between two habitat patches. Figure 8 shows a land cover map, the cost or travel time map distribution for a given start and target object, and the least cost path between the two. Within GuidosToolbox, the user can interactively set thresholds to group the cost map into zones of low, medium and high cost. The provision of the full cost map, instead of the least cost path only, and the cost grouping option allows for a richer, spatially explicit assessment. This feature is important for the evaluation of simulated or real local land cover changes and their impact on, for example, the movement capability of protected species, the spread potential of an insect disease, fire or pollination.

Discussion
The aim of GuidosToolbox is to provide a user-friendly interface to a series of geometric and hence fully generic tools, resulting in objective, quantitative measures and clearly defined morphometric feature classes. Generic applicability of all image analysis methodologies is the key idea behind the software development of GuidosToolbox. The focus on applying geometric concepts provides a framework for routines, which can be equally applied to any spatial resolution as well as any thematic kind of raster data. For example, the MSPA algorithm has already been applied in a wide variety of application fields. Figure 2 shows how MSPA can detect a structural connecting pathway in a maze puzzle, or helps at microscale in an automatic zooplankton identification model (Schmid et al., 2016). In addition to structural patterns, the same methodology describes functional movement patterns of squirrels . MSPA detected phase changes in neutral model analysis (2009;Riitters, Vogt, Soille, Kozak, & Estreguil, 2007). MSPA was used at continental scale to assess green infrastructure (Wickham, Riitters, Wade, & Vogt, 2010), to analyze the scale dependence of forest patterns (Ostapowicz, Vogt, Riitters, Kozak, & Estreguil, 2008) and to investigate European regions as providers of structural riparian corridors (Clerici & Vogt, 2012).
Fragmentation is a key aspect in landscape planning and forest management, but many approaches are purely descriptive and focused on individual faunal species, resulting in different species-specific assessments for the same landscape. In contrast, we use uniform morphometric concepts to measure the actual degree of landscape fragmentation in a generic way. This approach allows for highlighting areas of high fragmentation (hot spots), directly comparing different sites, but also to quantify and thus measure the progress and the outcome of political directives.
Contortion permits evaluating the degree of naturalness and the presence and impact of human activities in a given landscape. Methodologies to locate and measure the impact of human activity may constitute an important component to assess land cover change over large regions, to quantify direct and indirect measures of ecological conditions within human-dominated landscapes and to evaluate the effectiveness of environmental projects. These topics are often linked to planning scenarios in the field of environmental conservation and landscape restoration. Here, the GuidosToolbox provided assessment schemes -Influence Zones, Proximity and the Reconnect modulethat may be of use to highlight potential areas of interest in landscape management; simulate and compare different landscape planning schemes; evaluate the impact of climate change; or to locate, prioritize and evaluate sites for efficient restoration efforts.
Thus, the illustrated tools are potentially valuable as operational techniques capable of transferring scientific expertise to inform critical environmental challenges to national and international political agendas.

Conclusion
GuidosToolbox contains a variety of image processing routines designed to extract different types of information from digital raster data. All routines are based on geometric concepts only and thus provide maximum applicability to any kind of thematic data and at any spatial resolution. Additional pre-and post-processing routines, batch mode and command line utilities complement the tool set into a turnkey solution for visualization and quantitative analysis of individual images as well as in operational conditions.
The included manual and in particular the optional workshop material contains many details and examples to illustrate the usage and functionality of the built-in processing options. The modular structure of the toolbox should facilitate finding appropriate routines as well as including future innovative and interdisciplinary research methodologies into the exiting thematic containers. With this conceptual setup, GuidosToolbox can serve as an interesting addition to an existing GIS installation or as a stand-alone framework providing alternative universal analysis schemes in environmental modeling or any other field requiring digital image analysis.

Acknowledgments
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. MSPA and GGEO (Generalized Geodesic Distance Function, Soille 1994) was developed and programmed by Peter Vogt in collaboration with Pierre Soille. The concept of contortion was proposed by Pierre Soille. Kurt Riitters provided the code for the spatcon and recode package. Santiago Saura provided advice and implementation help for adapting and including some of the Conefor metrics into the assessment of the importance of MSPA connections (Bridges) and other connectivity analyses included in GuidosToolbox. Frank Warmerdam permitted inclusion of the excellent FWTools package in the Linux version of GuidosToolbox. Dario Simonetti provided advice and help with the GDAL implementation in the MS-Windows version of GuidosToolbox.

Disclosure statement
No potential conflict of interest was reported by the authors.