Image segmentation analysis is the process of analysing shapes and areas in images; specifically their boundaries. It has applications in medical imaging [1, 2], machine vision , and ecological studies  amongst others.
This software is designed to calculate similarity coefficients for different segmentations of the same image, to analyse the performance of segmentation algorithms or human raters. Six different coefficient types can be calculated, as described later, along with segment centroids and the distances between them.
The software was originally produced to calculate similarity coefficients in a study  of human rater segmentation of the cross section of the brachial plexus on an ultrasound image (Figure 1). Segments are denoted by the application of colour; the use of different colours allows multiple segments to be defined in each image.
The software provides a GUI for the selection of files, coefficient type, and segment colour, and for the display of results. A ‘fuzziness’ option allows the software to consider segments where the colours do not match exactly, although this must be used with caution as it can result in unwanted parts of the image being included in the segment analysed. Diagnostic information is given in the form of a segment pixel count and percentage of the image; also the original images are converted to two-colour representations where everything not included in the segment analysed is blanked out.
It is used by selecting files (with the “Select Files” button), and choosing the colour which represents the segment to be analysed by clicking within the image. Then select the similarity coefficient to be used from the drop-down, and click “Calculate”. The results are displayed (Figure 2) on the right along with the centroid distance, and can be copied and pasted into a spreadsheet for further analysis. Diagnostic information is displayed on the left side including the number of pixels considered to be part of the segment in each image, and the location of the segment centroid.
Implementation and architecture
The software was implemented in Visual BASIC .NET 10.0. The algorithms for similarity coefficient calculation were taken from Fleiss’ “Statistical methods for rates and proportions” . The coefficients calculated are:
- Sørensen-Dice Coefficient
- Jaccard Coefficient
- Proportional Agreement
- Cohen’s Kappa
- Goodman & Kruskal’s Gamma
- Rogot-Goldberg Agreement
A unit test of the algorithms using the examples given by Fleiss  is built into the code and runs on startup – if there is any disagreement with Fleiss’ results then this is reported with the name of the test which has failed. This is only intended to prevent any accidental altering of the algorithms during source code editing.
For each image analysed, the number of pixels included within the segment, the percentage of the total image, and the position of the calculated centroid, is displayed to help assure the user that the software has analysed the correct segment. After an analysis run, the images are updated to show which parts the software has analysed as part of the segment which the user can check to ensure analysis has proceeded as expected.
Simple example images are also included so that users can test the software’s output for themselves. Functional testing using these images, and a set of segmented ultrasound images, was conducted on Windows 7 (SP1) using .NET v4.0.
Windows XP SP3 and above.
Linux/OSX: The Mono migration analyser finds no issues but there is a report that Mono 3.0.6 on Linux (Debian Jessie) was unable to run the software.
Visual Basic .NET 10.0.
Additional system requirements
None beyond requirements of operating system and dependencies.
.NET 4.0 or equivalent (eg Mono 2.8).
List of contributors
Licence: BSD 2-Clause
Publisher: Tom Lawton
Date published: 06/10/2017 15:53 (Version 8)
(3) Reuse potential
This software calculates a range of similarity coefficients on image segmentations. It was originally designed for use in medical radiology but could be used anywhere that image segmentation analysis is required – including object detection/machine vision, ecology/habitat analysis, and social geography. Similarity coefficients have been used in medicine [1, 2] to report whether algorithms and human operators agree on an image analysis (such as which parts of the image constitute a bone or other anatomical structure); in ecology they have been used to compare animal and plant habitats  by considering each habitat as a segment on a picture map.
It can use as input any image file understood by .NET 4.0, and gives results in a form which can be easily copied to a spreadsheet for further analysis. Reuse potential of the compiled software is therefore high.
Reuse of the source code is likely limited to the implementation of the similarity coefficient calculations (in the ‘CalculateMaths’ function).