Geological Image Analysis Software - GIAS v2


The GIAS GUI can be described in three parts - the upper panel (in green) which allows files to be loaded in, controls the input paramters and sets the unit size and the name of the output files. The Image Analysis panel graphically outputs the details of the given image, including the area, orientation, perimeter and number of objects analysed. The Nearest Neighbor (NN) panel computes and graphs the statistical distribution of the distances between objects, allowing the user to test the distribution for randomness or four other statistical models.

Input Panel
The input panel consists of the four main areas - the display axis, Input Parameters, Detection Parameters and the Outputs. These can be used to input data and control the parameters used when processing the image or NN Centroid List. Results can be output and saved to a separate text file for graphing and analysis with other packages.

Display Axes
The Display Axis initially shows the GIAS logo. When a file or image is loaded, it is displayed in this area to allow the user to ensure they have the correct file. No image processing takes place within the file, so the input image is not altered in any way.


The input panel area consists of four buttons and three tick boxes. The user can load in three types of data using the Load Image button
  1.  An 8-bit gray level image (e.g. vesicles image). Note the larger the image, the longer the software will take to run (and the more memory required to do so). If an image is loaded, the Image Analysis panel and the Nearest Neighbor panels will be updated. The application assumes by default that an image will be loaded. Click on Load Image to open a file browsing panel to find the required file. If the file does not have white background with dark vesicles, the user can Invert Input Image polarity, to reverse the black/white pixel settings. The image to be processed appears in the Display Axis. The following formats are recommended: *.tif, *.jpg.

  2. An image with white pixels indicating the centroid positions of features to be analysed. Choose the NN Input Image tick-box before clicking on Load Image to select this type of input. Only the Nearest Neighbor panel will be active. The image to be processed appears in the Display Axis. (Note due to the resolution and scaling of the input image for display purposes, the white pixels might not be visible)

  3. A two column (space or tab-delimited) list of the x- and y- positions of feature centroids. Choose the NN Centroid List tick-box  before clicking on Load Image to select this type of input..Only the Nearest Neighbor panel will be active. A two-pixel wide  'image' will appear in the Display Axis to show that the data has been loaded. 
  • Once the Image or List has been input, click on Process >> to begin analysis of the data.
  • When the graphs have been drawn, the results can be saved to Tab-Delimited files, whose names begin with the string entered in the Output text box, using Save Results.
  • Finally, to exit the application, use the Quit button.

Detection Parameters
The parameters associated with the image to be processed can be altered to remove large or small pixel objects for graphing or analysis reasons. The Process >> button must be clicked each time one of these parameters is changed, to update the graphs and output data.
  1. The Minimum Object Area textbox defines objects with area size smaller than this number ( in pixels) which are to be ignored. For example, objects which have an area of 1 pixel  may be spurious noise pixels, while it might be desirable to have objects with at least 3x3 (=9) pixels in order to define a vesicle. Note that the Minimum Object Area is defined in pixels in order to remove any confusion related to the actual pixel units.
  2. The Maximum Object Area textboxdefines objects with area size larger than this number ( in pixels) which are to be ignored. Often, an image may have a few very large objects, which dominate the statistical analysis. By removing the larger objects, data displayed histograms and other graphs may become more manageable. Setting the value in the box to 'Max' includes all of the objects in the analysis.
  3. The Black/White Threshold Levelallows the user to define the black/white cutoff threshold in Digital Number units (0-255). The default value is 250, meaning that pixels with values above this number are set to white, while pixels with a value less than this are set to black. This option is present because the input image is converted from an 8-bit  gray level image to a binary image for processing.
  4. Normalised Poisson Area: This option allows the user to define the minimum area resolution for use in the Normalised Poisson Model (see the Nearest Neighbor Panel Help). Pixel Units are used in the textbox.
Remember, the Process >> must be clicked to implement any adjusted detection parameters.

The Output area controls the name of the output files, the units of the input image or list of data and whether the pixels touching the boundary are used in the process for Nearest Neighbor and Image Analysis.
  1. The user can change the filename of the output files by entering text into the green text box (and pressing the Enter/Return key when finished). The output consists of one or two files depending on the input. 
    • If the user inputs an image which is processed and outputs data to the Image Analysis and Nearest Neighbor panels, then two output files are created - one for each panel. 
    • If the user inputs an NN image or NN Centroid List, then only one output file is created, giving the Nearest Neighbor outputs.
  2. The Pixel Size can be defined in units of microns, millimetres or metres. Type the pixel size (i.e. one dimension) into the green text box and select the appropriate unit. If only the pixel area is known, then this can be entered, though the pixel shape will be assumed to be approximately square for processing purposes.
  3. Ignore Boundary Objects: For the purposes of Image and Nearest Neighbor analysis, objects that touch the boundaries  should not be used, as their maximum properties are unknown (e.g. we see only a minimum extent). These objects are ignored by default. To include them in the Image analysis, uncheck the tick-box. They will still be ignored in the Nearest Neighbor analysis, as they may have a nearest neighbor just beyond the boundary of the image.
The File Outputs to the the CSV file can be imported directly into an EXCEL or OpenOffice Calc spreadsheet for additional graphing or analysis. All the calculated values and statistics from the application are output to this files. See the example output files for further details.

Image Analysis Panel
The Image Analysis panel consists of the four graphical areas (area histogram, perimeter graphs, eccentricity histogram and an orientation rose diagram) and a text summary of the statistical properties of the image. It is only active if the input data is an image file (i.e. not an NN image or NN Centroid List). Note that previously processed data is stored in memory until it is overwritten.

The Image Analysis Panel  uses the regionprops function within the MATLAB Image Processing toolbox calculates the following key properties of each object: area, centroid position, perimeter, eccentricity, orientation, equal-area circle equivalent diameter and a list of pixels positions within each vesicle.
The pixel list is used to determine which objects are in contact with the image edge and the equal area circle diameters are used to calculate object radii. The eccentricity and orientation are calculated by fitting an ellipse about the object. The angle between the major axis of the ellipse and the x-axis of the image defines the orientation

All graphs are for visualisation purposes only. You cannot export any of the figures directly (other than screenshot capture). The data to reproduce the graphs can be saved to a spreadsheet-readable text file.

Area Histogram
The Area Histogram outputs the binned frequency of image object areas. The bin size defaults to 10 equally-spaced bins. All updates take place immediately.
However, depending on the distribution of the object areas, the user can change the bin size by selecting Custom and entering the required bin size (which are correctly scaled). The starting and ending size bins on the X axis can be chaged by selecting Custom and typing in the green boxes marked 'Min' and 'Max'. If you do not do this correctly, the Custom box will flash the word 'Value >' to remind you to enter the required values.
The Y axis can be displayed in either Linear or Logarithmic spacing. When the Log button is clicked, the bars of the histogram become single points. The Maximum frequency displayed on the Y axis can also be clipped. 
To reset the values to Default, click on the Bin Size: Default button. In the Y Axis (green) text box, type 'Max' to reset the frequency axis.

Perimeter Graphs
There are three graph options to choose from within the Perimeter option. The perimeter is the length about each object. Circular pixels will have the shortest possible perimeter for their area. Elongate, crennellated, agglomerated or convex shaped objects will have a perimeter that is longer than that of an circular object with equivalent area. All units are correctly scaled.
  1. The user can choose to view a Histogram of the Perimeter lengths. This is a logarithmic x-axis graph and has no options to change the bin sizes or spacing.
  2. A graph of Perim. vs. Equal-Area Circ. can be drawn which compares the perimeter of the pixels in each object with the expected perimeter of a circular object with equal area. A one-to-one ratio would suggest all the objects have a circular shape. A black dashed line shows this ratio - points deviating from this line indicate that the objects are not circular.
  3. The Equal-Area Circ. Rad. plot gives a histogram of the radius of equivalent equal area circles. This can be used in addition to the other two graphs to decide the circularity of the objects.

Eccentricity Histogram
The eccentricity histogram outputs the binned frequency of object eccentricity. A circle has an eccentricity of 0, while an ellipse has an eccentricity greater than 0 and less strictly than 1. Eccentricity is deduced by fitting a major and minor axis to the each object. Note that elongate small objects will tend to have a eccentricity.

Orientation Rose Diagram
The orientation of each object is calculated as the angle offset of the major axis of the object counterclockwise  from the x-axis of the input image. The maximum extent can be between +90 and -90 degrees. An ideally circular object has an orientation of 0 degrees.
The rose diagram is shown with an additional 180 degrees added on (to avoid the petals overlying the frequency numbers). Hence an orientation of 210 degrees is equivalent to +30 degrees. The angles and frequencies are correctly output to the CSV file.

Statistical Summary
The statistical outputs are shown in the top right corner of the Image Analysis tab. The Abundance metric shows the percentage ratio of black pixels (objects) to white pixels (background).
The other statistical properties are minimum, maximum, mean etc of the area, perimeter, eccentricity and orientation. These can be selected by clicking the appropriate button. All the data is output to the CSV file.

Nearest Neighbor Panel
The Nearest Neighbor panel consists of the four graphical areas (Distance histogram, R and c statistical graphs, Skew vs. kurtosis plot) and a text summary of the statistical properties of five different fitting models. It is always active (i.e. input data is an image file, an NN image or NN Centroid List). Note that previously processed data is stored in memory until it is overwritten. This application is primarily written to test the object distance distribution for spatial randomness or other types of organisation, to examine if there are underlying processes which may be influencing the placement of the objects.

Objects may exhibit a spatial organization along a continuum that includes three classes
  1.  Regular spacing, which in an extreme sense manifests in an equal distance between all objects;
  2.  Random distributions, where the location of each object is independent of all other objects; and 
  3.  Aggregated distributions, which in an end-member scenario results in objects being tightly clustered within a single group.
By examining the NN distances, such models can be tested.
NN distances are determined by calculating the Euclidean distance between each interior object and all other objects within the dataset, including the vertices of the surrounding convex hull. The results for each interior point are sorted in ascending order to identify the minimum NN distance and calculate the actual mean NN distance.

All graphs are for visualisation purposes only. You cannot export any of the figures directly (other than screenshot capture). The data to reproduce the graphs can be saved to a spreadsheet-readable text file.

For further details on the techniques and analysis, see the manuscript submitted to Computers and Geosciences.

Note, there is a quick tutorial pdf, HTML help files and three example images and dataset with expected output included in the downloadable preparsed psuedocode.