## 2 Materials and Methods
### Automated Feature Inference and Extraction from Non-Etched Metallographic Microstructures  
The second challenge tackled in this study involves the reliable extraction of graphite nodules from non-etched metallographic images, which is a prerequisite for any automated analysis of ductile iron microstructures. The more accurate the nodule segmentation, the better the performance of later stages, such as morphological classification, dimensional measurement, and quality grading. In fact, mechanical properties strongly depend on nodule count, size, and shape; therefore, their accurate measurement allows for a more accurate interpretation. When there is low contrast in non-etched samples, the segmentation process becomes more difficult. In response to this challenge, several authors have reported effective solutions. [PERSON] et al. [50] introduced a robust algorithm that outperforms classical thresholding, while [PERSON] et al. [15] released open-source Python 3.11 code that detects nodules and calculates nodularity. [PERSON] et al. [7] combined pre-processing, segmentation, and classification in a single framework to reduce operator bias. Level-set techniques proposed by [PERSON] et al. [51] further improve boundary definition and geometric accuracy, and [PERSON] et al. [52] showed that carefully tuning the edge detection still yields reliable masks when guided by metallurgical expertise. Once the nodules are segmented, they must be categorized by shape, size, and integrity to reflect solidification conditions and inoculation efficiency. Manual grading under ISO 945-1 (International Organization for Standardization) or ASTM A247 (American Society for Testing and Materials) is inconsistent, so ML alternatives have emerged. [PERSON] al. [53] trained support vector machines (SVMs) on circularity, roundness, and aspect ratio (AR) to meet ASTM criteria, whereas ANNs have predicted nodule size distributions and modularity indices from similar descriptors [52]. More recently, [PERSON] et al. [54] proposed a tiered taxonomy aligned with UNE-EN ISO 945-4 [6], underscoring the need for harmonized standards in image-based graphite classification. The third phase includes measuring a group of morphometric characteristics for every categorized nodule. These attributes are essential for evaluating nodular quality, determining nodularity indices, and analyzing the metallurgical background of the material. The key measurements are as follows:  
* Circularity, which is a classic standard in particle analysis and is widely used in the literature to characterize the shape of graphite nodules. According to UNE EN ISO 945-4 [6], circularity is one of the accepted parameters for determining whether a nodule is spheroidal or not. In addition, it is used in multiple studies to discriminate between round and irregular particles [50; 53]. * AR is key to identifying elongated or deformed nodules, which have important implications for fatigue and fracture toughness. Although not all formal standards (such as ISO 945-4) include it directly, many industrial implementations and scientific publications consider it as a parameter to support roundness and circularity. [PERSON] et al. [7] use AR thresholds to enforce automatic sorting decisions. In addition, [PERSON] et al. [50] integrated AR as a key feature in CNNs applied to nodular castings. * Roundness indicates the degree of smoothness of the edges and the general regularity of the form. It is explicitly used in standards and technical literature to classify the shape of nodules. UNE EN ISO 945-4 [6] defines ranges of roundness to classify morphologies; for instance, spheroidal nodules typically have a roundness \(\geq\) 0.6. This is also widely used in scientific works, like in the previously cited [PERSON] et al. [7]. * Feret's diameter is a standard particle size measurement in image analysis and is used in standards such as ASTM A247 [55] and ISO 945-1 [4] to measure the diameter of nodules. [PERSON] et al. [15] and [PERSON] et al.