Skip to content

Image Cleaning

A segmented image usually holds pore space that no fluid can reach from outside the sample, and specks of solid that hang in the pore space attached to nothing. Both are real features of the voxels, but neither can take part in transport through the sample, and the floating solid is often a segmentation artefact. Image Cleaning removes them with two connected-component filters from PoreSpy.1

  • Method connected-component labelling of the pore space and of the solid, with face connectivity
  • Backend PoreSpy, on CPU
  • Changes pore clusters that span no pair of opposite faces become solid; solid clusters that touch no face become pore
  • How to run it Image Cleaning in the User guide

The two filters

Both label clusters of voxels joined through shared faces (6-connectivity in 3D), the same links the transport solvers exchange flux across.

Filter What it keeps What it changes
Fill Invalid Pores Pore clusters that span the image, touching both opposite faces along at least one axis Every other pore cluster becomes solid: closed pores that touch no face, and dead-end clusters that touch some faces without connecting a pair of opposite ones
Trim Floating Solid Solid clusters that touch at least one face of the image Every solid cluster that touches no face becomes pore

When both are chosen, invalid pores are filled first, then floating solid is trimmed.

Each filter run through PoreStore's own code on a 100³ synthetic sample, shown on the middle slice. Left: a sample with little pore space, porosity 0.15; every pore cluster that doesn't span the image is filled. Right: a sample with little solid, porosity 0.85; every solid cluster that touches no face becomes pore. Clusters are found in 3D, so whether one is kept can depend on connections outside the slice.

Effect on porosity and transport

Both filters change the porosity \(\varphi\), on purpose.

  • Total and connected porosity. \(\varphi\) counts every pore voxel. Closed and dead-end pores add to it but carry no flow and no diffusive flux, so they raise the tortuosity factor without changing the effective diffusivity. Filling them moves the image from total porosity towards connected (effective) porosity, and lowers \(\tau\) accordingly.
  • Spanning along any axis. A cluster is kept if it spans the image along at least one axis. A cluster that spans only along X is still a dead end for transport along Y or Z.
  • Floating solid. Solid with no support is physically impossible in a rigid sample, so trimming it mostly corrects segmentation noise. It raises porosity slightly.
  • Boundary effects. Whether a cluster touches a face depends on where the image was cropped. A pore that leaves the sample through a lateral face is kept as spanning only if it also reaches the opposite face; in a small image, real through-pores can be filled because the crop cut them.

The numbers on the image page are measured again after cleaning, so the change in porosity is a direct measure of how much pore space was disconnected.

References


  1. J. T. Gostick et al., "PoreSpy: A Python toolkit for quantitative analysis of porous media images," Journal of Open Source Software 4 (2019) 1296. doi:10.21105/joss.01296 ↩