Fibers segmentation and analysis plugin
The fibers analysis plugin is designed to detect, separate, and analyze fibers in 2D and 3D. It is accessible via one dedicated button, inside the menu bar of IPSDK Explorer.
Fibers plugin button inside IPSDK Explorer
Input selection
The plugin window contains two dropdown menus at the top left corner to select input images and binary input images of fibers to process. Only binary images will appear inside the first dropdown list. For the input images list, both grayscale and RGB formats are supported, for individual 2D images, and 3D images.
Input images selection via dropdown lists
When using a binary image as input, the pre process and the binarization sections can't be accessed inside the plugin, considering the detection of the fibers is already done.
Input binary image selection via dropdown list
- Note
- Input images must be loaded inside IPSDK Explorer to be selected inside the dropdown lists.
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,
- Binarization corrections,
- Separation,
- Reconnection,
- Reconstruction,
- Measures.
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, and sometimes at the left of the method name, 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 fiber detection.
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 3.
Binarization
This step converts the pre-processed image into a binary mask highlighting the fibers.
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 fibers 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.
Interactive 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 fibers using the smart segmentation method and extracting the class 1
Besides the smart segmentation algorithm, the macro-based binarization can be usefull for very complex images binarization.
Binarization corrections
Binarization corrections refine the binary image by cleaning up artifacts and enhancing the detection of fibers.
Available operations are :
- Remove small holes, a function that removes small holes of a given size.
- Remove small shapes, a function that removes shapes depending on a unit and a given size (depends on the image calibration).
Each operation is optional and configurable.
Here's an example of binarization result using the corrections functions inside the plugin :
Binary image cleaning using remove small holes (size 5) and remove small shapes (size 200)
Separation
Fiber segmentation is performed here to label individual fibers for further analysis.
This section implements 5 different methods :
- Pruning size : Removes the barbs of the skeleton for each fibers,
- Dilation triple points : Detects triple points connexion in the skeletons and applies a dilation to separate them,
- Approximation polyline : Number of pixels of gap between two lines that will determine whereas the fiber should be cut into smaller fibers or not,
- Skeleton min size : Removes the fibers of which the skeleton is under the minimum size,
- Max curvature : Separates the fibers with an angle above the max curvature.
Fiber separation
Here's multiple examples of the different methods with different parameters.
Method name | Parameters value | Image example |
Approximation polyline | 1 |
|
4 |
|
Skeleton min size | 5 |
|
10 |
|
Max curvature | 10 |
|
25 |
|
Reconnection
Additional parameters can be used here to reconnect the labeled fibers that are not connected.
This section implements the reconnection of fibers using 3 parameters :
- The Angle tolerance parameter reconnects fibers based on the angle given.
- The Distance tolerance parameter, reconnects fibers based on the distance given. This parameter helps connecting fibers crossing each others without cutting them in smaller fibers.
- The Curved fibers checkbox parameter, offers a better reconnection for curved fibers.
Here is an example of fibers reconnection :
Fibers reconnection using an angle tolerance of 30, and a distance tolerance of 20
Here's examples of the angle tolerance method with different parameters.
Angle tolerance | Distance tolerance | Example |
25 | 25 |
|
90 | 25 |
|
Reconstruction
This section performs the reconstruction of segmented fibers using 4 different parameters.
The parameters are :
- The Lengthen polygon method, completes the ends of polygons if borders are not correct.
- The Remove border method, removes the fibers touching the borders of the image.
- The Min size segment parameter, removes fibers under the min size segment value given.
- The Fill mask parameter, fills the fibers and makes it thicker depending on the threshold image.
- Mean thickness : Thickness size used to fill the fibers.
- Note
- The lengthen polygon, remove border and fill mask methods are optional, uncheck the checkboxes to disable them.
Here is an example of fibers reconstruction :
Fibers reconstruction using lengthen polygon method, the remove border method, a min size segment of 15, and thickening the fibers with a mean tickness of 5
Measures
This section provides analysis of the segmented fibers.
The available measures are :
- Length,
- Thickness,
- Orientation,
- Barycenter,
- Endpoints.
Architecture of the measures process section
The preview button gives a peak of the results inside IPSDK Explorer.
A set of quantitative measurements is available within this section.
- You can select the measurements of interest by checking the corresponding boxes in the list.
- For some measurements, it is possible to generate an histogram or a cumulative histogram to better visualize the distribution of values.
The sieves used for histogram computation are selectable (via dropdown) and editable using the
button.
Sieves can also be customized under Settings → Sieves → Preferences.
Sieves can be created and edited inside the sieves edition window
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 :