## 4 Discussion  
Remarkable advances have been made in the field of medical imaging in recent years thanks to the use of digitalized methods and, more recently, artificial intelligence [32; 33]. The problem of validating the existing models is that comparisons are made with the visual assessment performed by the pathologist, which is subject to variability [18]. Stereology allows for the three-dimensional quantitative evaluation of two-dimensional microscopic sections, based on a mathematical principle derived from stochastic geometry [34]. Although a time-consuming method requiring manual analysis of each test point, it remains the gold standard for obtaining quantitative data [28]. Although it was observed that the CVF determined by stereology shows a high correlation with the CVF determined by CIELAB-MATLAB(r) and with that determined by CIELAB-Python, statistically significant differences were observed between the groups, which is why the performance of the combined algorithm was further tested. The CVF, calculated as the average of the values generated by the two algorithms, was not significantly different from the CVF calculated by stereology. Considering that any quantitative assessment involves error, the Bland-Altman analysis aims to establish the degree of agreement between two quantitative methods, allowing comparability [35]. Besides the quantification of mean bias, the method involves the expression of the limits of agreement (LoA), an interval in which 95% of the measured differences are included [35]. The Bland-Altman analysis revealed a relatively small mean of the differences between the two methods (1.5%), which was not significant, considering that the line of equality was included in the 95% CI of the mean difference. However, the LoA were relatively large (95% LoA--15.4-18.3). Many image analysis programs have been developed over time, but ImageJ remains the most widely used [36], which is the reason why it was chosen as a second method for the validation of the results. A disadvantage of ImageJ is that low-contrast tissues can be difficult to assess [29], therefore three of the images were excluded from the study. A high correlation was also observed between the CVF determined by ImageJ and CIELAB-MATLAB(r) and CIELAB-Python, respectively, but still with significant differences between groups. The combined algorithm, however, showed a superior performance, with a mean bias of 0.9%, which was not significant (95% CI--1.2-2.9), and a narrower LoA than in the case of the comparison with stereology (95% LoA--11.2-13). Although the two proposed methods (MATLAB(r), Python) quantify the same parameter, they offer different results because they are based on different approaches. The fibrosis mini-region is manually selected by the user, which induces randomness based on expertise. Furthermore, in MATLAB(r) the selected region can have any shape, while in Python the selected region will always be a rectangle. In addition to the different working principles of the evaluated methods, the significant differences observed between the groups can also be caused by the management of the artifacts. In stereology, each test point is approached individually by the pathologist, while the algorithms implemented in Python or MATLAB(r) decide if a pixel represents fibrosis or not, depending on the color analysis. Computer-assisted quantification of myocardial fibrosis is not a new idea, but it is an under-investigated field. A semi-automatic method implemented in ImageJ, also based on the CIELAB system reported by [PERSON] et al. [37], shows a very high correlation with stereology. The method was tested on post-mortem myocardial tissue stained with picrosirius red. The researchers reported a significant reduction in the time needed for evaluation (22% of the time needed for stereology). Stereology was also used as a reference in the study performed by [PERSON] et al. [18], which tested the assessment of fibrosis on endomyocardial biopsies.