## 4 Discussion
### Technical Features of the Method
However, the analysis of the sole bright-field images may be limited by the fact that neither collagen fiber color nor brightness are uniform (i.e., thicker fibers appear deep red and thin fibers appear bright pink and are more difficult to detect), which may hinder the proper definition of thresholds. An alternative approach was implemented by [PERSON] et al. [10], who used color threshold analysis on dark-field images to reveal the structure of collagen fibers of different dimensions. Of note, the algorithm controlled for the mix in color associated with fiber density and classified the segmented collagen into its constituent parts (thick or thin fibers) for the resolution of complex collagen configurations and improved visualization. In our algorithm, we did not distinguish collagen densities, but combined the information of red, blue, and green colors by an average approach. Our approach quantified the overall content of different types of fibers, but not their distinction. In order to detect different collagen types, our approach may be slightly modified by converting the birefringent signal, given in RGB, to hue formulation and finding appropriate thresholds for different fibrosis population in the color spectrum. Alternatively, information on collagen patterns may be obtained post-detection, submitting the extracted mask to algorithm for spatial pattern extraction. In its seminal work, [PERSON] et al. [9] used both dark-field and bright-field images for the quantification of collagen, but the approach implied hardware manipulation during image acquisition. Blue-filtered bright-field images were used to detect the muscle tissue, which was then subtracted from the polarized image, where both muscle and collagen appear bright. However, the brightness of muscle in the bright-field image needed to be adjusted by manual manipulation of the microscope lamp. As concerns the correction of artifacts, previous algorithms introduced the possibility of manual corrections of staining artifacts by the user [15]. However, to our knowledge, our approach is the first that tried to correct, through a modeling framework, artifactual variability related to sample preparation and experimental set-up. In the case of sample thickness, the correction was directly performed by the software using transmittance information from the tissue images. In particular, the analysis was based on the transmittance of the red channel to limit the variability effects related to the picrosirius red stain. Picrosiriusred stain may be differently absorbed by samples depending on experimental variability, tissue characteristics, and collagen content, which may result in variations of the attenuation coefficient \(\mu_{(r)}\). Being the least affected by red stain, the red channel should be less exposed to these effects, although some residual variability may be present. In our test set, we showed our approach to work for optical thickness up to 0.5. It is worth to notice that the corrective term in our algorithm may not be able to compensate for very thick samples, where collagen spatial distribution may change across depth. In the presence of thick samples, the collagen signal may be intrinsically damped due to signal average across different layers and extrinsically reduced by the quadratic dependence in Equation (14), resulting in a less-detectable signal. In the case of the non-uniform luminosity, an additional procedural step was required (i.e., the acquisition of a white image). The step was of limited impact for the whole acquisition chain, because it was performed only once at the beginning of the acquisition session of a full stack of images. However, as shown in the representative example of Figure 3, the correction for nonuniform illumination was relevant to grant the automatic segmentation of the tissue area from the background, since it significantly reduced the spread of the pixel values in the luminal space and their overlap with tissue values.