## 3 Results
### Comparison of Methods Used for Digital Image Processing  
To validate the performance of both methods, it is necessary to verify that the characterization of the metallographic image is correct and provides detailed information to the ANN to achieve the efficient classification and recognition of the patterns present in AISI 304 stainless steel. According to [38], the ratio of the true and false predictions specific to each characterization method is determined by the following performance measures: sensitivity, specificity, and accuracy, using Equations (36)-(38), respectively. \[\mathrm{Sensitivity}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}} \tag{36}\]  
\[\mathrm{Specificity}=\frac{\mathrm{TN}}{\mathrm{TN}+\mathrm{FP}} \tag{37}\]\[\text{Accuracy}=\frac{\text{TP}+\text{TN}}{\text{TP}+\text{FP}+\text{FN}+\text{TN}} \tag{38}\]  
where TP (true positive), FP (false positive), TN (true negative), FN (false negative). The probability of not incurring a type II error, (1-\(\beta\)), is known as the power of the test, equivalent to the sensitivity. The sensitivity is equivalent to the proportion of cases where a certain corrosion pattern is present in the stainless steel and the developed methodology correctly classifies and recognizes this pattern in the microstructure of the metallographic image (true positive rate). The probability of not making a type I error, (1-\(\alpha\)), is known as the efficiency of the test, equivalent to the specificity. The specificity is the proportion of events where a certain corrosion pattern is evaluated in the stainless steel and the proposed methodology does not classify a pattern that does not exist in the microstructure of the metallographic image, diagnosing that the corrosion pattern does indeed not exist in that image (true negative rate). The degree of accuracy of a test is defined as the proportion of cases where the result is correct [39]. The results of the performance of the phase congruence and GLCM methods applied for the characterization of the three types of metallographic patterns present in the microstructure of AISI 304 stainless steel are shown in Tables 9 and 10. The results obtained suggest that both ANN topologies developed efficiently perform the task of classification and recognition of intergranular corrosion in stainless steel when using the phase congruency and GLCM characterization methods. However, the architecture using the GLCM characterization method requires more neurons in the hidden layer and iterations to achieve the allowed error. The phase congruency method generates a larger characterization vector; however, the convergence time in its architecture is shorter compared to the ANN topology used in the GLCM method. Regarding the characterization capacity, it is important to highlight that the GLCM method establishes only an analysis related to the texture in the metallographic image since it focuses on local variations, the probability of occurrence, and the uniformity and closeness of the distribution between pairs of pixels. On the other hand, phase congruency correctly detects features at all angles and is invariant to contrast and illumination. In the application case reviewed, the illumination and position are not noise factors because there is already a standardized process for image capture with the inverted microscope. However, in any other application case where there is variation in the illumination, the sensitivity, specificity, and accuracy results would compromise this because it is a factor in establishing the gray scale in the image. To compare the results obtained by the multilayer perceptron ANN, two other classification mechanisms were developed. First, support vector machines (SVMs) were built, and as a second step, the Fuzzy ARTMAP ANN was used. For both classifiers, the same training and test sets used in the multilayer perceptron ANN were used; see Table 4. It should be noted that the selection of the SVM and Fuzzy ARTMAP ANN classification models was