Measurement and visualisation of grain size variation using Matlab: Point-sampled linear intercept length method



The most commonly reported microstructural measure in literature is the average grain size. In addition to measurement of average grain size, other material specific factors such as differences in phase structure and grain size distribution need to be considered. For heterogeneous materials such as welded low-alloy steel joints, the grain size distribution is of particular interest since it has been shown to influence the mechanical properties. Improved grain size measurement methods are thus required to enhance the understanding between grain size distribution and mechanical properties.

This code is an implementation of thepoint-sampled linear intercept length methods published in Refs. [1-2], utilising the functionalities of Matlab image processing toolbox. The code measures the volume-weighted average grain size, visualizes the spatial grain size variation, and displays moving averages of the grain size in horizontal and vertical directions. For more details, refer to the two publications [1-2], and WIKI page [3] given below. For the line-sampled linear intercept method (ASTM E1382 compliant) refer to the following zenodo entry:


Open pointsampled_intercept_length_v2i.mPre-process the grain boundary maps according to the instructions on in Ref. [3]. Two example grain boundary maps are provided, one extracted from HKL Channel 5 software, the other post-processed from an optical micrograph. Note that grain boundaries must have a thickness larger than 1 pixel, otherwise measurements will bleed through gaps in the boundaries.Check the parameters set at sections 'Input data', 'Output settings' and 'Linear intercept parameters'. Typical parameters are set as default.Run the code (F5).For statistical analysis use the distribution fitting toolbox 'dfittool', variable descriptions are given in the beginning of the code.


Matlab's image processing toolbox and statistics toolbox

Published under GNU GPL v3 License.

For further information, refer to the following articles and the Wiki page:

[1] Materials Science and Engineering: A, 2014; 592: 28-39,[2] Welding in the World. 2016; 60: 673-678.[3] Aalto University Wiki -

Revision history:

v2i: First version uploaded to Zenodo, originally published in October 2016.

The title and description of this software correspond with the situation when the software metadata was imported to ACRIS. The most recent version of metadata is available in the original repository.
Koska saatavilla2021

Dataset Licences

  • Other

Siteeraa tätä