Figures
Abstract
Obtaining the traces and the characteristics of elongated structures is an important task in computer vision pipelines. In biomedical applications, the analysis of traces of vasculature, nerves or fibres of the extracellular matrix can help characterise processes like angiogenesis or the effect of a certain treatment. This paper presents an objective comparison of six existing methodologies (Edge detection, CT Fire, Scale Space, Twombli, U-Net and Graph Based) and one novel approach called Trace Ridges to trace biomedical images with fibre-like structures. Trace Ridges is a fully automatic and fast algorithm that combines a series of image-processing algorithms including filtering, watershed transform and edge detection to obtain an accurate delineation of the fibre-like structures in a rapid time. To compare the algorithms, four biomedical data sets with vastly distinctive characteristics were selected. Ground truth was obtained by manual delineation of the fibre-like structures. Three pre-processing filtering options were used as a first step: no filtering, Gaussian low-pass and DnCnn, a deep-learning filtering. Three distance error metrics (total, average and maximum distance from the obtained traces to the ground truth) and processing time were calculated. It was observed that no single algorithm outperformed the others in all metrics. For the total distance error, which was considered the most significative, Trace Ridges ranked first, followed by Graph Based, U-Net, Twombli, Scale Space, CT Fire and Edge Detection. In terms of speed, Trace Ridges ranked second, only slightly slower than Edge Detection. Code is freely available at github.com/youssefarafat/Trace_Ridges.
Citation: Arafat Y, Cuesta-Apausa C, Castellano E, Reyes-Aldasoro CC (2025) Fibre tracing in biomedical images: An objective comparison between seven algorithms. PLoS ONE 20(4): e0320006. https://doi.org/10.1371/journal.pone.0320006
Editor: Xiaohui Zhang, Bayer Crop Science United States: Bayer CropScience LP,UNITED STATES OF AMERICA
Received: April 25, 2024; Accepted: February 1, 2025; Published: April 10, 2025
Copyright: © 2025 Arafat et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All data and code are publicly available. - Second Harmonic Generation (SHG) images of tumour bearing mouse mammary glands (Bredfeldt JS, Liu Y, Pehlke CA, Conklin MW, Szulczewski JM, Inman DR, et al. Computational segmentation of collagen fibers from second-harmonic generation images of breast cancer. Journal of Biomedical Optics. 2014;19(1):016007. doi: 10.1117/1.JBO.19.1.016007 and, Liu Y, et al. Fibrillar Collagen Quantification With Curvelet Transform Based Computational Methods. Frontiers in Bioengineering and Biotechnology. 2020;8.) - Breast Cancer Biopsy (BCB) images of collagen (Wershof E, Park D, Barry DJ, Jenkins RP, Rullan A, Wilkins A, et al. A FIJI macro for quantifying pattern in extracellular matrix. Life Science Alliance. 2021;4(3). doi: 10.26508/lsa.202000880.) - Disease mimicking ECM (Grapa AI, Efthymiou G, Obberghen-Schilling EV, Blanc-Féraud L, Descombes X. A spatial statistical framework for the parametric study of fiber networks: Application to fibronectin deposition by normal and activated fibroblasts. Biological Imaging. 2023;3:e25. doi: 10.1017/S2633903X23000247.) - Fluorescently labelled Fibronectin images and Trace Ridges algorithm code available at https://github.com/youssefarafat/Trace_Ridges.
Funding: The author(s) received no specific funding for this work.
Competing interests: The authors have declared that no competing interests exist.
Introduction
The morphological features of cells and their surrounding environment have been studied with interest in cancer and other conditions [1]. However, it is now recognised that the microenvironment that surrounds these cells has considerable influence [2]. The extracellular matrix (ECM) plays a key role in the development of cancer [3–6] and other diseases [7]. The ECM provides essential structural support [8] to the cellular constituents of tissue. Every organ has a different ECM structure that serves its purpose. The ECM constantly changes its shape and remodels by a process known as ECM proteinases [9,10]. Despite this, the extracellular matrix (ECM) has received less attention [11] than other factors of the microenvironment like macrophages, soluble factors, or vasculature. This could be due to the complicated 3D network of the ECM [12,13], which is formed by many elements such as enzymes, glycoproteins, and collagen.
Whilst visual observation of the extracellular matrix structure can reveal interesting characteristics, it is far too difficult to compare two populations by just observing images. Structural characteristics of the ECM such as the length, distribution, shapes and orientation of the fibre-like structure of these glycoproteins could provide valuable information about the microenvironment or treatments if these were to be objectively analysed. Quantification of the fibres and their characteristics is required and for this purpose, a robust tracing algorithm that identifies individual fibre-like structures is necessary.
There have been many manual, semi-automatic and automatic methodologies proposed to delineate and trace elongated structures some of which are based on algorithms that can be considered more general as they can be applied in a context other than tracing, for instance, skeletonisation [14–16], watershed transform [17,18], medial axis transform [19–21], Scale Space [22,23] and even Edge Detection [24]. However, many of these methodologies have been proposed for tracing in specific applications, which may imply that these have been fine-tuned to the characteristics of the datasets being analysed, e.g., neuron tracing [25–27], retinal images [28–30], angiography [31–33], intravital vasculature observed with confocal, fluorescence or light microscopy [34–36], and extracellular matrix [37,38]. In addition, deep learning architectures like the well-known U-Net [39] have been widely used in image analysis and provided excellent results without the need of hand-crafted features or algorithm. Instead, a combination of pairs of data and labels can be used to train an architecture to perform a specific task, which for the purposes of this paper is the segmentation of fibre-like structures.
In this paper an objective comparison of algorithms that perform tracing of fibre-like structures is presented. Four types of datasets with vastly distinctive characteristics were selected to provide a wide variety of conditions of noise and strength of the fibre structures. The images were hand-delineated to create a ground truth for objective comparisons and to provide training data for the deep learning architecture. Five existing algorithms that have been previously used for similar applications were selected: Edge detection [24], CT Fire[40], Scale Space [22,23], Twombli [38], and Graph Based [41,42]. A U-Net [39] architecture was trained with pairs of patches of data and labels. In addition, a simple, yet quick and effective image processing-based tracing algorithm called Trace Ridges is proposed and compared with the other algorithms.
The main contributions of this work are the following:
- The objective comparison of seven fibre tracing methods. Each algorithm was tested in four images with vastly different characteristics. To analyse the effect of noise, three filtering approaches were applied as a pre-processing step for each of the algorithms. Three error metrics and computational processing time were extracted from each of the previous combinations.
- A new tracing pipeline called Trace Ridges was proposed. Trace ridges combines filtering, Watershed transforms, Edge detection and mathematical morphology to trace ridges in an image with fibre-like structures.
Materials and methods
Data sets
Four biological data sets with vastly distinctive characteristics were selected to compare the tracing algorithms (Fig 1). Three of the four data sets were selected as they had been used by the previously published algorithms and were freely available. Details of the data sets have been published previously, but a brief description for each will follow.
- Second Harmonic Generation (SHG) images of tumour bearing mouse mammary glands were published with the CT Fire algorithm [40,43] (Fig 1a). To obtain the images, in vivo acquisition was performed through a glass imaging window that was placed at proximity to palpable tumours inside the mammary glands of live 8 weeks old PyMT mice. The excitation wavelength of the SHG images was 890 nm while the emission filter was 445 nm with a 20nm bandwidth. The pulse length was roughly 100 fs. All the SHG images were verified using cellular autofluorescence from the coenzyme Flavin Adenine Dinucleotide, in slides they were verified by white light images of H&E. Images from this data set are clean and fibres are distinguishable from each other.
- Fluorescently labelled fibronectin images (Fig 1b). Fibronectin fibroblasts were cultivated on a gelatine coated surface bonded with glutaraldehyde, used to create the extracellular matrix. Fluorescent images were captured to observe the fibronectin expression. Fibres appear bright and have high intensity, background is darker with lower intensity. Image is available at github.com/youssefarafat/Trace_Ridges/blob/main/Fluorescent_ Fibronectin.
- Breast Cancer Biopsy (BCB) images of collagen (Fig 1c) were published with the Twombli algorithm [38]. The samples were stained with Picrosirius red. The slides were deparaffinised and hydrated prior to the application of Picrosirius red mixture for 60 minutes, after which the samples were rinsed twice in acetic acid followed by alcohol dehydration and mounting. Finally, slides are scanned using a Zeiss Axio Scan.Z1 at 10x magnification. This dataset was chosen as the images are stained with Picrosirius red, including variety to the previous monotone images. Fibres have a filamentous structure, which makes it unique.
- Disease mimicking ECM (DME) (Fig 1d) images of fibroblasts were published with the Graph based algorithm [42]. Normal resting fibroblasts were treated with TGF-B1 cytokine to activate the fibroblast in the tumour micro-environment. The Fibronectin rich matrice was created by exposing recombinant cFn to the Fibronectin null mouse embryo fibroblasts. The cultures finally are decellularised after 7 days. The resultant matrices are viewed with a confocal microscope after they are fluorescently stained, at a 10x/0.45 magnification. Images from this data set are noisy. Brightness variation is low.
Ground truth
Fibres on (Fig 1a–Fig 1a1d) were manually delineated to create the ground truth to be later used in a quantitative comparison.
Pre-processing of the data sets
Filtering data sets may reduce the levels of noise and thus improve subsequent steps in a pipeline.
The four data sets present very different noise characteristics, and three different filtering approaches were followed: No pre-processing filtering, low pass filtering with a Gaussian filter and a deep learning de-noising filtering [44]. It should be noted that some methodologies (e.g., Scale Space) include pre-processing steps themselves, but for consistency and ease of comparison all data sets were pre-processed in the same way before applying tracing algorithms.
Gaussian filtering.
A Gaussian filter removes noise and detail by combining the values of neighbouring pixels weighted with a Gaussian kernel to replace the original value of a pixel.
A Gaussian filter with a kernel size of 3×3 and a standard deviation value σ= was applied to all the images before applying the tracing algorithms.
DnCnn.
DnCnn [44] is a de-noising deep convolution neural network for noisy images. The model adopts residual learning to separate noise from noisy observations. Batch normalisation and residual learning are adopted to improve the de-noising performance. The DnCnn model can handle blind Gaussian de-noising with unknown noise level. The DnCnn model was trained using the images in (Fig 1). Each image was split into half, half was used for training and the other half was unseen. The images were converted to 2-D grayscale where needed as the model only accepts 2-D grayscale images. The model was trained with a learning rate of 0.001 and a batch size of 32.
Tracing algorithms
The following seven tracing algorithm were compared: Edge Detection (ED) [24], CT Fire (CTF) [40,43], Scale Space (SS) [22,23], Twombli (TW) [38], U-NET [39], Graph Based (GB) [41,42] and the proposed Trace Ridges (TR). They vary in their complexity and methodology with some leveraging filters as part of the pre-processing (GB with Gabor filters, CTF with Curvelet transform for image enhancement). U-Net utilises deep learning techniques. Trace Ridges employs Watershed [17] and Edge Detection for fibre tracing and uses morphological features for image refinement.
Edge Detection.
The Canny Edge Detection [24] extracts edges of objects in image by identifying changes in pixel intensities. It employs Gaussian filtering to reduce noise then applies non-maximum suppression to thin the edges. The thresholding process, also known as hysteresis, is performed to exclude or include edges. In this study, the Canny Edge Detection used a filter size of 2×2 to extract edges as proxies for the fibres. Subsequently, the edges were labelled and their metrics extracted.
CT Fire.
CT Fire [40,43] was developed to extract and quantify collagen fibres from SHG images. It utilises a curvelet transform (CT) [45] de-noising filter, with Gaussian filtering to remove noise. The curvelet filter represents the image as stacked elements following ridge lines and wavelets, with a frequency wrapping based de-noising technique. Curvelets commonly follow the rule in (Eq 1). The fibre extraction algorithm processes the binary image, with foreground pixels representing fibres. It computes a distance transform to determine the proximity of the foreground pixels to the nearest background pixel, identifies maximal ridges of the smoothed image, and generates nucleation points. After which fibres extend from each nucleation point based on trajectory, followed by removal of short branches.
Scale Space.
Scale Space [22,23] blurs an image across multiple scales to reveal its characteristics. Significant features emerge at lower scales, while finer details are visible at first scales and are progressively smoothed out. Scale Space treats an image as a series of Gaussian smoothed images, represented by the function f(x,y) and Gaussian g(x,y,t), where t denotes the width of the Gaussian filter. First and second derivatives of x and y dimensions are represented as
forming a matrix, dictating intensity changes in the image. For Scale Space, the collection of images is represented as L(x,y;t) and Gaussian kernel in (Eq 2). This method was implemented as seen in [36].
Twombli.
Twombli [38] a FIJI macro tool for quantifying fibre-like patterns. It employs existing techniques, including Ridge Detection [46] and AnaMorf [47]. Ridge Detection assesses first and second directional derivatives using Gaussian kernels to detect line points and extract line width with sub-pixel accuracy. Bias is reduced by inverting the Scale Space behaviour of the asymmetric line model. AnaMorf quantifies the structures identified. Twombli also incorporates OrientationJ to obtain the global alignment metric, determining the dominant direction of the fibrial structure. By analysing changes in intensity signal as a function of nearby pixel distances, Twombli constructs segmentation masks using fibre edges.
U-Net.
Properties:
U-Net [39] is a deep fully convolutional network widely applied in biomedical image segmentation. The architecture compromises of a contracting path for capturing fine details through convolutions, and a symmetric expanding path for accurate localisation. The segmentation map is generated via skip connections between contraction and expanding layers. The network’s architecture is symmetrical to the letter "U". U-Net requires minimal training data and can achieve high performance. The U-Net used in this comparative study (Fig 2) had a depth of 3, consisting of 46 layers, including encoder, bridge, decoder, convolution, softmax and segmentation layers, with skip connections linking the contracting and expanding paths.
U-Net Training: Initially, various training parameters were tested, including batch size (16 and 32), and learning rate (0.0001 and 0.001), to optimise training parameters and select the best-performing network. Each image from (Fig 1a–Fig 1d) was split into halves for training and testing. BCB Collagen image (Fig 1c) was complemented to highlight fibre features in white, and background in black. To increase the number of images for training, augmentation was employed. Augmentation techniques (Fig 3) included horizontal and vertical flipping, rotation by 90 degrees and addition of Gaussian noise. A total of 8910 images of size 32x32 were used for training. The U-Net was trained with a batch size of 16, learning rate of 0.0001 and the "adam" optimisation algorithm, for 15 epochs. Training duration was 15 minutes.
Graph based.
The Graph-based algorithm [41,42] combines fast discrete curvelet transform filters to detect curvilinear anisotropic objects, in combination with a fibre extraction algorithm. The algorithm uses Gabor filters to enhance fibres that have been observed with confocal microscopy. The algorithm offers flexibility by detecting various fibre elements at different frequencies and orientations, avoiding translation and rotation errors. The algorithm associates graph networks with fibre morphological skeletons, followed by fibre pruning and post-processing fibre re-connection. Two graph types are used to measure fibre properties: one representing fibre crosslinks or ends, and the other simplifying the first graph into a skeleton. These representations were used to extract geometrical and topological properties from the confocal images. Then, specific properties, e.g., orientation for Gabor and fibre length as graph parameters were used to relate to the physical properties of the fibres.
Trace Ridges.
In this paper, a methodology called Trace Ridges is proposed. The methodology combines Watershed transform and Edge detection. First, the Watershed is used to delineate ridges. The main ridges will correspond to the fibres to be traced, but in addition, minor ridges, product of the well-known over segmentation of watersheds [48,49], will appear as coming down from the main ridges. Then, the Edge detection process detects regions where there are sudden changes of intensity, i.e., close to the ridges, ideally one on each side of the centre line of the ridge. The intersection between the edges and watersheds is used to break those minor ridges that run down from a main ridge through the sides of the basins, thus separating them from the major ridges. In this way, the well-known problem of over-segmentation of Watershed is counteracted and the methodology prioritises longer ridges along the brighter sections of an image for cleaner results. The combination of these two steps of Trace Ridges is illustrated in (Fig 4a). The region contains three strong and bright ridges with a small noisier region highlighted with a green rectangle. The results of Watershed and Edge Detection are shown separately in (Fig 4b, 4c) and the overlap in (Fig 4d) where the edges are shown in red, and the watershed is shown in yellow. The points where the two overlap are shown as white. These points are discarded thus breaking the small watersheds and maintaining the main ridges. Next, the edges and small segments with a major axis length smaller than a threshold (5 pixels) are removed. Segments that lie within darker regions are also removed as it may be possible that there are watersheds in dark regions that are hardly visible and not of interest.
In some cases, a thicker ridge may produce two parallel watersheds with a very small hole in between. These cases are identified by their Euler characteristic [50]. Only very small holes are filled in, and then the resulting object is thinned, this process leaves a trace that runs through the position of that small hole.
Also, there are cases where Watershed will not detect a ridge, specifically when both sides of the ridge feed to a single basin surrounding it. Those cases are detected by using only Edge detection, filling in the space between the edges, and then thinning it to create a single line where the ridge is located. In some cases, Edge Detection results in only one edge for a ridge, these are discarded and treated as low level ridges or noise.
Finally, Trace Ridges discards small and curved fibres and keeps longer and straighter lines. In the case that Trace Ridges detects less than 100 fibres from the missed ridges. Trace Ridges retains from those ridges only those that have a major axis length above 15 pixels and a minor axis length less than 10 pixels. If the number of new fibres detected is higher, a stricter condition is applied whereby the fibres must have a major axis length of at least 25 pixels and the minor axis length must be less than 10 pixels.
Once all the fibres are detected, Trace Ridges combines the ridges detected with the combination of Watershed and Edge Detection as well as the missed ridges detected by Edge Detection, prioritising longer and brighter fibres.
Many morphological metrics can be extracted from the traced lines for instance, orientation, length, width, count, eccentricity, and mean intensities. Furthermore, the gaps between fibres can be calculated and from there, metrics such as gap area and largest gaps can be extracted.
Finally, three dimensional datasets are projected to two dimensions with a maximum intensity projection.
Quantitative comparison with distance metrics
Quantitative comparisons between the GT and results of the algorithms were calculated using distance metrics as has been previously reported [36]. It is important to highlight that traditional pixel-wise metrics such as accuracy, true/false positive rate, sensitivity, and specificity are not suitable for comparing traces against a ground truth. This is illustrated in (Fig 5), which shows three cases of lines that overlap in one single pixel and then extend from there in very different conditions. Whilst the cases are quite different, pixel-wise metrics would identify the same number of true positives, one, in all cases. Similarly, the true negatives (black pixels) could be similar and not useful to distinguish between cases. Pixel-wise metrics are useful with larger structures such as nuclei and cells where the comparison is between areas and not how far from each other the lines can be.
Calculation of the distance metrics has been previously described [36] but will be briefly here for completeness and illustrated with a simple example in (Fig 6) and the Second Harmonic Generation image in (Fig 7). First, a distance map from each of the set of traces to be compared was calculated (Fig 6b, Fig 6e) and (Fig 7b, 7e). Then the map of one set was multiplied by the opposite set. Thus, the traces that are further away from the traces from the opposite set will be in regions of higher distance and close to their opposites in regions of low distance (Fig 6c, Fig 6f) and (Fig 7c, Fig 7f).
From those two maps many metrics can be calculated, for instance, the average distance error per trace, maximum distance error per trace and total distance error.
Results and discussion
In this work, images of fibre-like structures were traced by seven different image processing algorithms and were filtered by three different methods. To compare and observe which method traces fibres better, four quantitative measurements were calculated: the total distance error, average distance error and maximum distance error, as well as computational time. The distance errors are measured by comparing how close the trace results of each algorithm were compared to the manually delineated ground truth.
Quantitative comparison of the algorithms
Total distance error.
The first analysis focuses on total distance errors, the accumulation of the distance errors from GT to algorithm trace generated by the distance maps, as explained. Qualitative results are summarised in Table 1, comparing algorithms with and without filtering. Filtering notably improves Edge Detection, Scale Space, Twombli, Graph Based, and Trace Ridges. DnCnn enhances Edge Detection, Scale Space, and Graph Based, while Gaussian filtering benefits Twombli and Trace Ridges. However, filtering worsens Scale Space with Gaussian and Twombli with DnCnn. U-Net and CT Fire exhibit increased errors post-filtering, likely due to U-Net training on non-filtered images and CT Fire’s inherent filtering. Notably, U-Net’s performance improved when DnCnn was used on the BCB and SHG images, while U-Net with DnCnn yielded larger errors for the other images, impacting its overall performance. Considering filtering + algorithm pairs as separate methods, U-Net without filtering performs best, followed by Graph Based with DnCnn, Trace Ridges with Gaussian filtering, Trace Ridges with DnCnn and Trace Ridges with no filtering. However, averaging total distance errors across all images regardless of filtering reveals Trace Ridges as the top-performing method, followed by Graph Based, U-Net, Twombli, Scale Space, CT Fire and Edge Detection.
Average distance error.
This quantitative metric calculates total errors divided by the number of traces to provide an average, as shown in Table 2. Filters enhance the performance of various methods including Edge Detection, CT Fire, Scale Space, Twombli, Graph based and Trace Ridges. However, filters do not improve U-Net’s values due to its training on non-filtered images. Notably DnCnn improves U-Net’s performance for the DME and BCB images, while Gaussian filtering benefits only the BCB image. Filtering yields consistent results for Edge Detection, with DnCnn slightly improving it. Both Gaussian and DnCnn filters significantly enhance CT Fire. Gaussian filtering marginally improves Scale Space, while DnCnn enhances it. Twombli’s results are improved by Gaussian filtering but worsened by DnCnn, in agreement with the total distance error metric. Filtering improves the Graph based method, with DnCnn yielding the best performance. Gaussian filtering improves Trace Ridges, but DnCnn slightly increases the value, impacting performance. Filtering + algorithm pairs are ranked, with Edge Detection + DnCnn performing best, followed by Edge Detection + no filter, Trace Ridges + Gaussian, Edge Detection + Gaussian and Twombli + Gaussian. Analysing averages per method, Edge Detection ranks highest, followed closely by Trace Ridges and Twombli. Edge Detection performs well due to the proximity of its traces to the GT, although it detects unwanted edges as fibres. Conversely, Trace Ridges, while achieving the best total distance error and the second-best average, is considered a more robust and accurate tracing method.
Maximum distance error.
This metric examines the maximum singular error in each image, as shown in Table 3. Filtering enhances the performance of Edge Detection, CT Fire, Scale Space, U-Net, Graph Based and Trace Ridges. Filtering hinders Twombli. Gaussian filtering produces comparable results to no filtering for Edge Detection, while DnCnn enhances results. CT Fire shows slight improvement with Gaussian and more significant improvement with DnCnn, both Gaussian and DnCnn improve Scale Space, with DnCnn yielding the lowest maximum error. Interestingly, Gaussian filtering improves U-Net but worsens with DnCnn filtering, DnCnn hinders the performance of U-Net on the SHG image, heavily impacting the average. For Graph based, DnCnn’s impact resembles that of no filtering, whereas Gaussian improves results, both Gaussian and DnCnn improve Trace Ridges, with Gaussian having a similar effect to DnCnn but slightly lesser. Among filtering + algorithm pairs, Graph based + Gaussian performs the best, followed by U-Net + Gaussian, U-Net + no filtering, Edge Detection + DnCnn and U-Net + DnCnn. Observing averages per method, U-Net achieves the best results, followed by Graph Based and Edge Detection. However, Trace Ridges does not perform as well in this metric due to its preference for brighter and longer fibres, resulting in higher singular maximum errors. While this metric provides insights, total and average distance errors are better indicators of algorithm robustness and accuracy.
Time.
The processing time for each trace of every algorithm with various filter combinations on each image was recorded and is presented in Table 4. Surprisingly, filtering improved the speed of every algorithm, with DnCnn consistently achieving the fastest results across all algorithms and filters. However, Edge Detection exhibited consistent speed with Gaussian and no filtering, and Gaussian filtering slowed down Scale Space. Each subsequent algorithm and filter pair in Table 4 generally performed better and faster, except for Graph Based with DnCnn, which outperformed Twombli. U-Net with DnCnn was faster than Trace Ridges with Gaussian or no filtering. Edge Detection was the fastest algorithm overall, followed closely by Trace Ridges, which is known for its efficiency. U-Net was ×3 slower than Trace Ridges, followed by Scale Space and CT Fire. Speed variations were significantly and heavily influenced by image noise levels, with noisier images (FF and DME) taking longer to process than less noisy images.
Visual assessment of the algorithms
A comparison between the results and the GT is presented in (Fig 8), (Fig 9), (Fig 10), (Fig 11), (Fig 12), (Fig 13), (Fig 14) and (Fig 15) with the GT in red, the results in blue. White lines correspond to pixels where the result of the algorithm and GT overlap, i.e., correct traces. It should be noted that in some cases a purple colour may be perceived, but this is an artefact when a blue line is remarkably close to a red line.
Second harmonic generation.
The SHG is a clear image, detected and missed fibres are easily identifiable. Edge Detection (Fig 8) consistently produces duplicate lines for each fibre. From (Fig 12), DnCnn application improves the tracing, increasing white regions compared to the original. CT Fire algorithm has demonstrated notable success on the original image (Fig 8) but struggles with filtered images, evidenced by decreased number of white lines regions (Fig 12), suggesting hindrance by filtering. Scale Space remains unaffected by filtering, showing consistent results (Fig 12). Scale Space does not perform well. Twombli exhibits sporadic traces and misses major fibres (Fig 8). Application of DnCnn appears to worsen Twombli’s performance (Fig 12). U-Net performs well, with significant white line regions (Fig 8). Filtering does not visibly affect U-Net’s segmentation. The Graph based method misses several fibres shown in red. It also detects spurious objects with DnCnn application (Fig 8). Trace Ridges shows the best visual performance, with the highest number of correct fibre regions (Fig 8). However, visually, Trace Ridges with DnCnn performs the worst amongst filter methods (Fig 12).
Fluorescent fibronectin.
For the Fluorescent Fibronectin image (Fig 9), several notable findings emerge. Despite the increased noise on the image as compared to the previous example (SHG), similar trends persist, that is, both CT Fire and Edge Detection generate a large number of traces, more than there are actual fibres. Filtering enhances Edge Detection (Fig 13), but degrades the results CT Fire. Scale Space and Trace Ridges yield fewer traces, with Scale Space detecting darker fibres and Trace Ridges favouring the bright ones. Trace Ridges exhibits fewer spurious lines (blue) and more white regions, indicative of its strict nature (Fig 13), showing improvement with image filtering. Graph based method and Twombli exhibit over-segmentation, visible as blue regions (Fig 9) and (Fig 13). Pre-filtering notably improves their performance. Conversely, U-Net’s results with filtered images are inaccurate, as it was trained on non-filtered images, yielding optimal results with the original image as is visible in (Figs 9 and 13).
Breast cancer biopsy.
For the BCB image, similar trends persist, with Edge Detection over-segmenting and producing inaccuracies, as seen in (Fig 10) and (Fig 14). However, pre-filtering results in cleaner images and reduces inaccuracies. CT Fire misses major fibres while detecting noise as spurious objects, evident in (Fig 10) and (Fig 14). Filtering enhances the algorithm’s performance, as observed in (Fig 14). Scale Space shows inaccuracies, detecting noise and spurious objects, contrary to its usual strict behaviour, as shown in (Fig 14). Filter application does not alter the results. Twombli shows notable performance, especially in detecting fibres at the top right corner in (Fig 14). Gaussian filtering improves Twombli, while DnCnn hinders its performance, causing loss of white lines. U-Net’s results are intriguing, with many white regions indicating accurate delineation (Fig 10). Filtering improves U-Net’s performance, reducing spurious objects, contrary to its behaviour on other images. Trace Ridges maintains strictness, yielding cleaner delineations (Fig 14), albeit missing some key fibres. Graph based algorithm performs similarly with Trace Ridges, with filtering reducing spurious elements (Fig 14).
Disease mimicking ECM.
A visual examination of the disease mimicking ECM (DME) image (Fig 11) reveals notable insights. By looking at the data image, both Gaussian and DnCnn filtering visibly enhance image clarity. Edge Detection does not perform well. The main drawback of Edge Detection is that there are two lines for each fibre. The results show many blue lines, where many fibres were detected that are not there. Filtering notably enhances Edge Detection’s performance, particularly evident in the ROI (Fig 15), where DnCnn offers the most significant improvement. CT Fire performed better than Edge Detection, it also presented spurious objects. Gaussian and DnCnn filtering resulted in more non-present traces; this is easily viewed in the ROI (Fig 15). Scale Space displays fewer traces, benefiting from its multi resolution capabilities, but may merge separate fibres occasionally. Gaussian and DnCnn filtering have increased the number of fibres, but the latter has resulted in the long fibres separating. Twombli yields mediocre results, segmenting non-existent fibres, yet outperforming certain algorithms. Filtering enhances Twombli’s delineation, with Gaussian filtering notably improving the algorithms performance, this is evident in the number of white lines in (Fig 15). However, DnCnn leads to spurious lines. U-Net performs well, especially on the original image, but shows degraded performance on filtered images due to training on non-filtered data. The Graph based algorithm demonstrates robust performance, further improved with filtering, as seen in (Fig 15), where DnCnn enhances accuracy and cleanliness. Trace Ridges, akin to Scale Space, exhibits fewer traces, deliberately separating intersecting fibres for improved accuracy. Filtering enhances Trace Ridges’ performance, particularly evident in (Fig 15).
Conclusions
In this paper we introduced Trace Ridges, a novel method for tracing fibre-like structures, compared against six existing methods (Edge Detection, CT Fire, Scale Space, Twombli, U-Net and Graph based) with three filtering options (no filtering, Gaussian filtering and DnCnn). Gaussian filtering is a traditional filtering technique that uses Gaussian kernels while DnCnn is a deep neural network. Images representing SHG of tumor bearing mouse mammary glands images, fluorescently labelled fibronectin images, Picrosirius red breast cancer collagen fibres images and disease mimicking ECM images. These images were used for evaluation, compromising both noisy and clean samples.
Manual ground truth delineations were created for each image and distance maps were used to quantify distance errors between the ground truth and algorithmic traces.
Trace Ridges exhibited the lowest total distance error, followed by Graph based and U-Net. Edge Detection achieved the lowest average distance error, attributed to its tendency to over-segment, thus its traces are always close to a fibre from the ground truth. Edge Detection was followed by Trace Ridges and Twombli. U-Net attained the lowest maximum distance error followed by Graph based and Edge Detection. Trace Ridges did not perform well in this metric as it favours brighter and longer fibres, so it is prone to have a higher singular maximum error.
Interestingly, filtering improved results for all algorithms except U-Net, which was trained on non-filtered patches. However, filtering enhanced U-Net’s performance specifically with the Breast Cancer Biopsy image.
Edge Detection was the fastest on average, followed by Trace Ridges and U-Net. Filtering generally expedited algorithms except for U-Net, although it improved processing time with the Breast Cancer Biopsy image.
Overall, Trace Ridges demonstrated superior performance, achieving the lowest total distance error, second-lowest average distance error, and second-fastest processing time. It offers rapid, automated tracing and extracts essential topological and morphological information, including fibre length, fibre count, orientation, circularity, and gap characteristics. Thus, Trace Ridges emerges as the preferred algorithm for tracing various fibre-like structures, including extracellular matrix and collagen fibres.
References
- 1. Hu M, Li M, Huang H, Lu C. Isolated cancer stem cells from human liver cancer: morphological and functional characteristics in primary culture. Clin Transl Oncol 2022;24(1):48–56. pmid:34169442
- 2. Fukumura D, Duda DG, Munn LL, Jain RK. Tumor microvasculature and microenvironment: novel insights through intravital imaging in pre-clinical models. Microcirculation 2010;17(3):206–25. pmid:20374484
- 3. Popova NV, Jücker M. The functional role of extracellular matrix proteins in cancer. Cancers (Basel) 2022;14(1):238. pmid:35008401
- 4. Winkler J, Abisoye-Ogunniyan A, Metcalf KJ, Werb Z. Concepts of extracellular matrix remodelling in tumour progression and metastasis. Nat Commun 2020;11(1):5120. pmid:33037194
- 5. Huang J, Zhang L, Wan D, Zhou L, Zheng S, Lin S, et al. Extracellular matrix and its therapeutic potential for cancer treatment. Signal Transduct Target Ther 2021;6(1):153. pmid:33888679
- 6. Walker C, Mojares E, Del Río Hernández A. Role of extracellular matrix in development and cancer progression. Int J Mol Sci 2018;19(10):3028. pmid:30287763
- 7. Iozzo RV, Gubbiotti MA. Extracellular matrix: the driving force of mammalian diseases. Matrix Biol. 2018;71–72:1–9. pmid:29625183
- 8. Frantz C, Stewart KM, Weaver VM. The extracellular matrix at a glance. J Cell Sci. 2010;123(Pt 24):4195–200. pmid:21123617
- 9. Lu P, Takai K, Weaver VM, Werb Z. Extracellular matrix degradation and remodeling in development and disease. Cold Spring Harb Perspect Biol 2011;3(12):a005058. pmid:21917992
- 10. Theocharis AD, Skandalis SS, Gialeli C, Karamanos NK. Extracellular matrix structure. Adv Drug Deliv Rev. 2016;97:4–27. pmid:26562801
- 11. Filipe EC, Chitty JL, Cox TR. Charting the unexplored extracellular matrix in cancer. Int J Exp Pathol 2018;99(2):58–76. pmid:29671911
- 12. Yue B. Biology of the extracellular matrix: an overview. J Glaucoma. 2014;23(8 Suppl 1):S20-3. pmid:25275899
- 13. Pompili S, Latella G, Gaudio E, Sferra R, Vetuschi A. The charming world of the extracellular matrix: a dynamic and protective network of the intestinal wall. Front Med (Lausanne). 2021;8:610189. pmid:33937276
- 14. Blum EK. The computation of eigenvalues and eigenvector of a completely continuous self-adjoint operator. J Comput Syst Sci 1967;1(4):362–70.
- 15. Blum H, Nagel RN. Shape description using weighted symmetric axis features. Pattern Recognition 1978;10(3):167–80.
- 16. Saha PK, Borgefors G, Sanniti di Baja G. A survey on skeletonization algorithms and their applications. Pattern Recognit Lett. 2016;76:3–12.
- 17.
Meyer SBF. The morphological approach to segmentation: the watershed transformation. In: Mathematical morphology in image processing. CRC Press; 1992. .
- 18. Meyer F. Topographic distance and watershed lines. Signal Processing 1994;38(1):113–25.
- 19. Fritsch DS, Pizer SM, Morse BS, Eberly DH, Liu A. The multiscale medial axis and its applications in image registration. Pattern Recognit Lett 1994;15(5):445–52.
- 20.
Preparata FP. The medial axis of a simple polygon. In: Mathematical foundations of computer science 1977. Berlin, Heidelberg: Springer; 1977. .
- 21. Wang S, Rosenfeld A, Wu AY. A medial axis transformation for grayscale pictures. IEEE Trans Pattern Anal Mach Intell 1982;4(4):419–21. pmid:21869057
- 22. Lindeberg T. Feature detection with automatic scale selection. Int J Comp Vision. 1998;30(2):79–116.
- 23. Lindeberg T. Edge detection and ridge detection with automatic scale selection. Int J Comp Vision. 1998;30(2):117–54.
- 24. Canny J. A computational approach to edge detection. IEEE Trans Pattern Anal Mach Intell. 1986;8(6):679–98. pmid:21869365
- 25. Meijering E. Neuron tracing in perspective. Cytometry A 2010;77(7):693–704. pmid:20583273
- 26. Acciai L, Soda P, Iannello G. Automated neuron tracing methods: An updated account. Neuroinformatics. 2016;14(4):353–67.
- 27. Liu Y, Wang G, Ascoli GA, Zhou J, Liu L. Neuron tracing from light microscopy images: automation, deep learning and bench testing. Bioinformatics 2022;38(24):5329–39. pmid:36303315
- 28. Delibasis KK, Kechriniotis AI, Tsonos C, Assimakis N. Automatic model-based tracing algorithm for vessel segmentation and diameter estimation. Comput Methods Programs Biomed 2010;100(2):108–22. pmid:20363522
- 29. Mahadevan V, Narasimha-Iyer H, Roysam B, Tanenbaum HL. Robust model-based vasculature detection in noisy biomedical images. IEEE Trans Inf Technol Biomed 2004;8(3):360–76. pmid:15484442
- 30. Valiente-Soriano FJ, Salinas-Navarro M, Di Pierdomenico J, García-Ayuso D, Lucas-Ruiz F, Pinilla I, et al. Tracing the retina to analyze the integrity and phagocytic capacity of the retinal pigment epithelium. Sci Rep 2020;10(1):7273. pmid:32350384
- 31. Koziński M, Mosinska A, Salzmann M, Fua P. Tracing in 2D to reduce the annotation effort for 3D deep delineation of linear structures. Med Image Anal. 2020;60:101590. pmid:31841949
- 32. Yuanzhi Cheng, Xin Hu, Ji Wang, Yadong Wang, Tamura S. Accurate vessel segmentation with constrained B-snake. IEEE Trans Image Process 2015;24(8):2440–55. pmid:25861085
- 33. Wei W, Zhang Q, Rayner SG, Qin W, Cheng Y, Wang F, et al. Automated vessel diameter quantification and vessel tracing for OCT angiography. J Biophotonics 2020;13(12):e202000248. pmid:32857462
- 34. Abdul-Karim M-A, Al-Kofahi K, Brown EB, Jain RK, Roysam B. Automated tracing and change analysis of angiogenic vasculature from in vivo multiphoton confocal image time series. Microvasc Res 2003;66(2):113–25. pmid:12935769
- 35. Barber PR, Vojnovic B, Ameer-Beg SM, Hodgkiss RJ, Tozer GM, Wilson J. Semi-automated software for the three-dimensional delineation of complex vascular networks. J Microsc. 2003;211(Pt 1):54–62. pmid:12839551
- 36. Reyes-Aldasoro CC, Björndahl MA, Akerman S, Ibrahim J, Griffiths MK, Tozer GM. Online chromatic and scale-space microvessel-tracing analysis for transmitted light optical images. Microvasc Res 2012;84(3):330–9. pmid:22982542
- 37. Wu J, Voytik-Harbin SL, Filmer DL, Hoffman CM, Yuan B, Chiang C-S, et al. Modeling ECM fiber formation: structure information extracted by analysis of 2D and 3D image sets. SPIE Proceedings. 2002;4621:52.
- 38. Wershof E, Park D, Barry DJ, Jenkins RP, Rullan A, Wilkins A, et al. A FIJI macro for quantifying pattern in extracellular matrix. Life Sci Alliance 2021;4(3):e202000880. pmid:33504622
- 39. Ronneberger O, Fischer P, Brox T. U-net: convolutional networks for biomedical image segmentation. In: Navab N, Hornegger J, Wells WM, Frangi AF, editors. Medical image computing and computer-assisted intervention – MICCAI 2015. Cham: Springer; 2015. p. 234–41.
- 40. Bredfeldt JS, Liu Y, Pehlke CA, Conklin MW, Szulczewski JM, Inman DR, et al. Computational segmentation of collagen fibers from second-harmonic generation images of breast cancer. J Biomed Opt 2014;19(1):16007. pmid:24407500
- 41.
Grapa AI. Characterization of fibronectin networks using graph-based representations of the fibers from 2D confocal images [PhD thesis]. Universite Cote d’Azur. Nice, France; 2020.
- 42. Grapa A-I, Efthymiou G, Van Obberghen-Schilling E, Blanc-Féraud L, Descombes X. A spatial statistical framework for the parametric study of fiber networks: application to fibronectin deposition by normal and activated fibroblasts. Biol Imaging. 2023;3:e25. pmid:38510171
- 43. Liu Y, et al. Fibrillar collagen quantification with curvelet transform based computational methods. Front Bioeng Biotechnol. 2020;8.
- 44. Zhang K, Zuo W, Chen Y, Meng D, Zhang L. Beyond a Gaussian denoiser: residual learning of deep CNN for image denoising. IEEE Trans Image Process 2017;26(7):3142–55. pmid:28166495
- 45. Candès E, Demanet L, Donoho D, Ying L. Fast discrete curvelet transforms. Multiscale Model Simul 2006;5(3):861–99.
- 46. Steger C. An unbiased detector of curvilinear structures. IEEE Trans Pattern Anal Machine Intell 1998;20(2):113–25.
- 47. Barry DJ, Williams GA, Chan C. Automated analysis of filamentous microbial morphology with AnaMorf. Biotechnol Prog 2015;31(3):849–52. pmid:25864556
- 48. Frucci M. Oversegmentation reduction by flooding regions and digging watershed lines. Int J Patt Recogn Artif Intell 2006;20(01):15–38.
- 49. Frucci M, Baja GS di. Oversegmentation reduction in watershed-based grey-level image segmentation. IJSISE 2008;1(1):4.
- 50.
Pratt W. Digital image processing. Wiley; 1978. Available from: https://www.amazon.co.uk/Digital-Image-Processing-William-Pratt/dp/0471018880