4.1. Features Overview
The system proposed was compared to existing packages providing GEOBIA functionality: OTB, InterIMAGE and eCognition. A comparison of some of the features available in each of the packages are outlined in Table 2
. Like RSGISLib, OTB does not provide all of the features required for a GEOBIA system, so it must be combined with another package. Combining the segmentation in OTB with a spatial database (e.g., PostGIS, spatiallite) to store the attributes of each object is one way of creating a complete GEOBIA system, in particular as the large-scale segmentation in OTB produces a vector output. Similarly, a spatial database could be used with RSGISLib instead of a RAT. One of the main advantage of a RAT over storing vectors in spatial database is that pixel-in-polygon operations can be performed very quickly, making operations, such as attributing objects with statistics from an image, very fast.
All systems offer the ability to perform rule-based classification. However, only eCognition and InterIMAGE are able to use membership functions to define rules; currently, this feature is not available in RSGISLib or OTB, although the implementation would be possible. A key different between packages is the interface: both InterIMAGE and eCognition are designed to be operated from a GUI and use the concept of “projects”. Although many of the functions in OTB are available through the Montverdi GUI or in QGIS through Sextante, using a GUI is not required, and the features can be accessed through a command line interface or Python bindings. In the system proposed, all of the functionality required for analysis is accessed through Python with only the GUI element (TuiView) used for data visualization and rule development, rather than analysis. Although different users may find that a GUI and “projects”-based workflow fits there specific requirements better, there are a number of advantages to a workflow based on Python scripts. Python scripts can be easily shared between users and can be used with standard version control tools (e.g., git, mercurial) to track changes made by multiple users. Applying the same processing chain to multiple images is possible with Python, as image names can be passed in as variables, making applying the same process to all images within, for example, the same directory possible using a similar script as that used to process a single image. When performing GEOBIA on an HPC, Python scripts are easy to run through job scheduling tools.
Both InterIMAGE and eCognition were designed from the ground up to be complete systems for GEOBIA. In contrast, the system proposed comprises a number of libraries, which are combined using Python, to produce a GEOBIA system. Although there are advantages to a complete system (e.g., a consistent interface, only a single program to install), the flexibility to pick and chose the best features from different packages, not limited to the ones described here, is seen as a key benefit of the system proposed and allows new algorithms to be built on top of the existing framework. Combining a number of programs, each performing a specific task, is similar to the UNIX philosophy of writing programs, which do one thing well and work with other programs.
4.2. Segmentation Comparison
Segmentation is a key component in the GEOBIA processing chain. To evaluate the segmentation performance of the algorithm of Shepherd et al.
], available in RSGISLib in relation to other packages, two test datasets were used: a 1000 × 1000 pixel, four-band, eight-bit near-infrared aerial photograph covering savanna woodland in California and a mosaic of two Landsat 8 scenes comprising seven bands with 8700 × 13,000 pixels (16-bit) covering a larger area in California and designed to test the segmentation performance over a larger dataset. The images were converted to GeoTIFF format, and overviews were generated to speed up the display. For each package, the segmentation was timed and the number of segments reported.
To compare the performance of the segmentation implementation, as RSGISLib is supported on UNIX-like platforms, eCognition is only available for Windows, and the latest binaries for InterIMAGE are only available for Windows, tests were performed using virtual machines set up with different operating systems, but the same system parameters: Quad-code 3.1 GHz i5 processor with 3 GB of RAM allocated. The amount of RAM was deliberately kept low to determine how the systems coped with images larger than the amount of available RAM, a key consideration when dealing with very large datasets. For Windows tests, Windows XP (InterIMAGE) and Windows 7 (64 bit; eCognition) were installed; for Linux tests, Ubuntu 12.04 was installed. InterIMAGE version 1.41 was used, and Windows binaries were downloaded from Laboratório de Visão Computacional (LVC). Version 9.0 of eCognition was used. The latest stable build of OTB (Version 3.2.0) was installed from the “ubuntugis” repository, as described on the OTB website. The latest version of RSGISLib (2.1.773), RIOS (1.3.0), KEA (1.4.1) and TuiView (1.1.0 beta) were installed under Linux from the source. Due to the differences in operating systems, linked libraries, compilation options, etc., the timings for each test should be seen as an indication of the “real-world” performance of each package, rather than a rigorous comparison of algorithm performance.
For OTB, the default “meanshift” algorithm was used, with all of the parameters left at the default. The large segmentation option, which produces a vector output, was used. For eCognition, the multi-resolution segmentation algorithm was used with the default scale factor of 10. For InterIMAGE, the “Baatz Segmenter” was used, with the scale parameter set to 20, as recommended in the InterIMAGE documentation. For RSGISLib, the default parameters of 60 clusters with a minimum object size of 100 pixels were used.
The segmentation time and number of segments generated by each algorithm are provided in Table 3
. The fastest segmentation for the aerial photograph was eCognition. However, for both eCognition and InterIMAGE, the segmentation time did not include the time to set up a project, import the data and export the segmentation. For RSGISLib, the time also includes normalizing the data, which is considered part of the segmentation algorithm. InterIMAGE was not able to segment the mosaic of two Landsat images, which exceeded the maximum supported image size. Segmenting the Landsat mosaic was not possible using eCognition on the test machine, as the algorithm relies on having sufficient RAM to process in memory. To evaluate the number of segments, a different machine was used, with a much larger amount of RAM (16 GB); the segmentation ran through successfully on this machine. As part of the segmentation in OTB, the image was split into tiles; each tile was processed on a separate thread, then the tiles were merged. For the small scene, the increased overhead meant that OTB was slower than eCognition and RSGISLib. However, for processing the large Landsat mosaic, OTB was the fastest package, as it was able to use all four cores of the test machine. Both RSGISLib and eCognition are able to utilize multiple cores by processing using tiles, but this is not considered part of the core segmentation algorithm.
The segmentation results for a subset of the aerial photography are shown in Figure 4
. The results for InterIMAGE and eCognition were similar, with eCognition producing more segments. This similarity was expected, as both packages use the Baatz and Schäpe [25
] segmentation algorithm, with a smaller scale parameter used in eCognition. The results for OTB and RSGISLib were similar, although more segments were produced in RSGISLib for both scenes.
The Landsat mosaic included regions without data (set to zero) outside the image footprints, both RSGISLib and OTB ignored these areas in the segmentation, while eCognition attempted to segment them. As with the aerial photography, both RSGISLib and OTB produced similar results, with RSGISLib again producing more segments. Compared to eCognition, there was more variation in object size in the segmentations produced from OTB and RSGISLib. The variation in object size was particularly evident in the Landsat mosaic, which comprised a number of large water bodies, for which both OTB and RSGISLib produced a single object, whereas eCognition split them into a number of smaller objects
It should be noted that in these tests, only the default/recommended parameters were used. In Shepherd et al.
], it was shown that by optimizing the parameters of both RSGISLib and eCognition to maximize the segmentation quality metric of Johnson and Xie [26
], similar results were obtained from both algorithms. Therefore, it is important that the parameters of any segmentation algorithm are chosen to give the best results based on the available imagery and application.