3D Porosities detection and analysis module
The 3D Porosimetry [1] module is designed to detect, segment and analyze porosities of materials in 3D. It is accessible via one dedicated button, inside the menu bar of IPSDK Explorer.
Porosity module button inside IPSDK Explorer
Input selection
The module window contains a dropdown menu at the top left corner to select an input image to process. Both grayscale and RGB formats are supported, for individual 3D images or sequences of 3D images.
3d Image selection via dropdown list
- Note
- Input images must be loaded inside IPSDK Explorer to be selected inside the dropdown list.
Configuration management
The second dropdown menu appearing on the right corner allows to choose and reload previously saved configurations. The special entry "..." refers to the last auto-saved configuration made during the last preview.
At the bottom left, the parameters savings, and at the top right corner, the parameters importation and management
Buttons | Description |
| Apply the settings to the different processing sections |
| Delete the current setting selected in the list |
| Import saved settings |
| Export saved settings |
| Save current configuration |
| Reset all the settings to default values |
Configuration buttons
The checkbox Keep images for next process is an optional setting that allows to keep processed images in memory for the next process, and therefore gain some time during computations. When this option is checked, the last previewed image will be saved in memory, reducing redundant computations.
To save the current configuration :
- Enter a name for the parameter set, on the entry field at the bottom left corner,
Click the
button to save the current configuration.
Module Section Structure
The core of the plugin window includes seven distinct and collapsible processing sections :
- Pre Process,
- Binarization,
- Morphological Operations,
- Separation,
- Post Process,
- Measures,
- Output Images.
Each processing section is made up of individual functions.
Each line is described as follows :
- The method name or operation type appears on the left,
- The parameters are displayed in the middle,
- A checkbox on the right allows to enable or disable the function,
An
button at the far right displays a preview of the function’s effect inside IPSDK Explorer's viewer.
Here is an example with the pre process section :
Architecture of a process section
Pre Process
This section is intended to enhance image quality before the detection of the porosities.
It includes:
- Color Mode : Selects a specific color channel (for grayscale or color-based processing).
- Filters : Used to denoise or smooth the image.
- Smart Shading Correction : Corrects and normalizes grayscale intensity variations.
- Remove Points : Removes bright or/and dark artifacts caused by acquisition noise (e.g., dust or uneven lighting).
Here's an example of pre processing :
Pre process of a grey level image by applying a median of size 2.
Binarization
This step converts the pre-processed image into a binary mask highlighting the porosities.
This section includes 5 thresholding methods, with 3 classical algorithms :
And also two advanced options :
- Smart segmentation model,
- Macro-based binarization.
Parameters vary depending on the chosen method. The documentation of each function is accessible through Explorer function sections, using the
button.
Here is an example of a binarization using the Simple threshold method :
Binarization of porosities using the simple threshold method.
The simple threshold method allows to select a threshold manually by entering a minimum and a maximum value inside the entry fields, or by clicking the
button.
After clicking the edit button, a new window opens allowing to choose a threshold using the double slider at the bottom of the window.
Simple threshold window
When using the smart segmentation method, a pre-trained model is needed. The documentation shows how to build a smart segmentation model here.
The smart segmentation option allows to select a pre-trained model and to choose the model classes to use for the binarization.
- Note
- The trained model relies on the pre-processed image as input; therefore, any changes to the pre-processing steps afterward may cause the model to malfunction or deliver inaccurate results.
The
button can be used to refresh the models list, in case the model doesn't appear in the list.
Here is an example of binarization using the smart segmentation method :
Binarization of porosities using the smart segmentation method
Besides the smart segmentation algorithm, the macro-based binarization can be usefull for very complex images binarization.
Morphological Operations
Morphological operations refine the binary image by cleaning up artifacts and enhancing the separation of porosities.
Available operations are :
- Fill Holes, with 2 functions to removes holes with a given size.
- Closing, a function that connects nearby objects or small discontinuities, and fills small holes or gaps within objects.
- Opening, a function that smooths object contours by eliminating small protrusions or spikes, removing small objects or details in the process, but usefull to preserve the general shape of larger objects.
Each operation is optional and configurable.
Here's an example of small objects removal using the morphological operations inside the module :
Binary image cleaning using holes filling and morphological opening (size 1)
Separation
A segmentation is performed here to label individual porosities for further analysis.
Three different segmentation methods are available :
- Classic watershed : based on distance map computation and watershed algorithms [2], allows to separate objects with similar sizes and with rather circular shapes,
- Adaptive watershed : allows to separate more complex objects with various sizes and shapes,
- Connected components : detects connected regions in binary images, depending on the neighboring and assigns each as a label.
Only one method can be selected at a time.
Porosity segmentation using the connected component algorithm
Post Process
Additional cleaning of the labeled result can be performed here using a set of post-processing tools.
This section implements 4 different methods :
- The Border kill method, that removes objects touching the borders of the image,
- The Fill holes method, that fills holes inside a label,
- The remove small shapes method, that removes shapes depending on a unit and a given size (depends on the image calibration),
- The remove big shapes method, that removes the largest shapes in the image.
Here is an example of post process :
Post process of a label image using the border kill method and the remove small shapes method
Measures
This section provides quantitative analysis of the segmented porosities.
It is divided in two different parts :
- A list of measures on the right pane,
- A list of selected measures on the left pane.
Architecture of the measures process section
Measures selection
The right pane lists all available measurements.
Measures are separated in 2 different categories and again in multiple sub-categories
- Click the arrow to collapses a category,
Click the
button to add a measurement to the left pane,
Click the
button to remove it.
The preview button gives a peak of the results inside IPSDK Explorer.
Selected Measures
Once a measure is added, they appear on the left side with the possibility to compute two histograms by clicking the checkboxes.
- For each measurement added, it is possible to compute :
- an histogram,
- a cumulative histogram.
- You can also select a sieve (via dropdown) to define histogram bins.
Or remove a measure using the
button.
Sieves can be customized under Settings → Sieves → Preferences.
Sieves can be created and edited inside the sieves edition window
Output Images
This section defines the type of output results (label images, binary masks, overlays, etc.) to compute and save.
Output type | Description | Example |
Label image | Returns a label image of the segmented porosities |
|
Color image | Returns the label image as a RGB image |
|
Merge input and color image | Returns the input image blended with the label image in overlay |
|
Input image with contours | Returns the input image blended with the contours of the labels in overlay |
|
- Note
- The blending ratio value of the overlay output option can be changed, as well as the contour size value of the contours image output.
Saving and Launching Analyses
At the bottom right, three buttons control the execution of the analyses :
: launches the analysis and displays the result in Explorer (no saving).
: executes the analysis and saves the results.
: applies the analysis to a batch of images.
Here's an example of display inside IPSDK Explorer when launching an analysis :
The
button, at the bottom right, shows the python code for the current analysis pipeline. This code can be saved as a python script, or edited as a macro.
References
[1] https://en.wikipedia.org/wiki/Porosimetry
[2] https://en.wikipedia.org/wiki/Watershed_(image_processing)