Chord Length Distribution from Binary 2D Images
A chord is a line segment with every point in one of the two phases, and with its end points on the interface between the two phases [1]. Randomly oriented lines can be laid across each image, and the segments with uninterrupted intersections with either of two phases, p1 or p2, are tabulated. If you use this file in your research or for publication, please cite reference [2] below.
There are two considerations for this implementation:
1. Some directional anisotropy may be introduced by the method (randi) used to generate random lines.
2. Technically, chords touching the edge of the images should be removed; but I left them in to permit display of both phases from the sample images.
References:
[1] S. Torquato, 1993, J. Chem. Phys. 98, 6472.
[2] MacIver, M.R., Pawlik, M. 2017 Chem. Eng. Technol. 1–10, DOI:10.1002/ceat.201600523.
Cite As
M. Ryan MacIver (2024). Chord Length Distribution from Binary 2D Images (https://www.mathworks.com/matlabcentral/fileexchange/64909-chord-length-distribution-from-binary-2d-images), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Image Filtering >
Tags
Acknowledgements
Inspired by: geom2d, Bresenham optimized for Matlab
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.