Development and Application of an Intelligent Virtual Instrument for Corrosion Characterization in Metallic Materials by Computer Vision, Colorimetry and Fuzzy Logic in the Metalworking Industry of Mexico
Abstract
1. Introduction
- Technological Fragmentation: Many advanced systems focus on a single method—either texture or color exclusively—and often require multiple proprietary software platforms, thereby increasing integration complexity and cost [6].
- Decision-Making Rigidity: Most systems rely on fixed thresholds or statistical analyses that struggle to handle the inherent ambiguity and uncertainty of early-stage corrosion, where color and roughness boundaries are non-binary.
- Computer Vision and Advanced Colorimetry: Analyzing the color spectrum of corroded metals and surface alterations.
- Roughness Analysis: Using gray-level histograms and texture feature extraction to quantify surface deterioration.
- Fuzzy Logic: Employing an intelligent inference engine for decision-making under uncertainty, overcoming the rigidity of traditional binary thresholds and characterizing corrosion more precisely than human optical inspection [10].
2. Materials and Methods
- 3.
- Noise Reduction (Preprocessing): To ensure data integrity, captured images undergo noise attenuation using the Undecimated Wavelet Transform via the LabVIEW Denoise function. A Daubechies (db02) wavelet at level 4 was selected to remove Gaussian white noise, configured with the SURE threshold rule and Single-level rescaling method.
- 4.
- Region of Interest (ROI) Selection: The system enables the user to define a specific area for inspection. Using the IMAQ Convert ROI to Rectangle VI, the user-defined descriptor is converted into a coordinate rectangle, and the selected sub-image is extracted and saved in JPG format for analysis.
- 5.
- Color Spectrum Analysis: The ROI is processed using the IMAQ ColorLearn VI, which employs Deep Learning algorithms to extract color features. The color spectrum is mapped in the HSL space (Hue, Saturation, Luminance), divided into sectors and bins according to sensitivity. This generates an array representing the percentage of pixels associated with dominant hues.
- 6.
- Roughness Quantification: The system computes the gray-level histogram of the processed image. The Standard Deviation (σ) of this histogram is utilized as a proxy for surface roughness; a higher deviation indicates greater contrast variation typical of corroded textures. If the deviation is negligible, the system may discard the image as non-corroded at this early stage.
- 7.
- Color Matching: The IMAQ ColorMatch VI compares the chromatic content of the sample against a library of pre-defined standard patterns (reference images of pristine and corroded metals). This function quantifies the correspondence between the input spectrum and the reference spectra.
- Roughness Threshold: Analysis of 50 reference images (25 clean, 25 incipient corrosion), previously characterized via non-contact optical profilometry, revealed that a gray-level histogram Standard Deviation > 10 served as a consistent inflection point. This value showed a Pearson correlation coefficient > 0.85 with expert visual assessment and was adopted as the empirical threshold for the ‘Low’ membership function of the ‘Roughness’ variable.
- Color Thresholds: Similarly, color spectrum match percentages (0–100%) were mapped from qualitative expert interpretations (e.g., “Low Match” vs. “High Match”) to quantitative ranges to define the trapezoidal membership functions.
- Input Variables:
- ○
- Color: Three trapezoidal membership functions (Low, Medium, High) covering a range of 0–100 (match percentage).
- ○
- Roughness: Three trapezoidal membership functions (Low, Medium, High) covering a range of 0–50 (standard deviation values).
- Output Variable:
- ○
- Result: Three trapezoidal membership functions (No Corrosion, Potential Corrosion, Corrosion) ranked 0–10, where 10 indicates high corrosion probability.
- IF Color IS High AND Roughness IS Low THEN Result IS No Corrosion.
- IF Color IS Low AND Roughness IS High THEN Result IS Corrosion.
3. Results
- False Positive Rate (FPR): 2.5%. This indicates a low incidence of Type I errors (unnecessary inspections), where non-corroded samples are incorrectly flagged.
- False Negative Rate (FNR): 1.4%. This exceptionally low rate is critical, as it minimizes the risk of Type II errors (accepting defective material). This demonstrates the system’s reliability for quality control, as it rarely ignores actual corrosion instances.
- Visual Matching: Figure 2 presents the visual comparison between standard pattern images and test samples. It demonstrates that high chromatic similarity (>95%) remains consistent in detecting different corrosion types (both uniform and pitting) on carbon steel.
- Roughness Analysis: Figure 3 illustrates the differentiation capability based on the gray-level histogram. The non-corroded image (Figure 3a) presented a Standard Deviation (σ) of 4.20, confirming a uniform surface. In contrast, the corroded image (Figure 3b) showed a σ of 26.33, indicating high contrast and significant surface roughness.
4. Discussion
- Operational Cost Reduction: By operating on the LabVIEW platform with accessible vision hardware, the system eliminates dependency on expensive traditional NDT methods and the constant need for expert personnel for routine inspections.
- Factory Implementation: The system is designed for seamless integration into production lines. The digital microscope can be mounted on a fixed inspection station or a robotic arm (controlled via LabVIEW) to automatically capture images and transmit a binary diagnosis (Corrosion/No Corrosion) to a SCADA system in under 2 s. This enables immediate sorting and facilitates material traceability.
- Resolution Constraints: Limitations in the resolution of the captured images influenced the detection of micro-scale pitting corrosion.
- Future Recommendations: Future iterations should incorporate image acquisition devices with higher resolution for digitization. Additionally, the integration of an illumination normalization module is recommended to ensure system robustness under the variable lighting conditions typical of real-world factory environments.
5. Conclusions
- Environmental Sensitivity: The inference engine exhibits sensitivity to drastic changes in ambient lighting, as the membership functions were calibrated under controlled laboratory conditions.
- Optical Resolution: The resolution of the digital microscope used imposed constraints on the ability to classify micro-scale pitting corrosion with absolute certainty, indicating a need for higher pixel density for fine texture analysis.
- Hardware and Algorithmic Enhancement: Integrating higher-resolution image acquisition devices and employing Advanced Deep Learning techniques (such as Convolutional Neural Networks) to improve automatic defect segmentation. This will facilitate finer detection of pitting and micro-cracks.
- Environmental Robustness: Developing an illumination normalization module based on image preprocessing algorithms to render the system immune to the variable lighting conditions typical of real-world factory environments.
- Rule Base Expansion: Expanding the fuzzy logic rule base to include additional environmental input variables—such as temperature and relative humidity—to evolve the system into a more comprehensive predictive diagnostic model.
6. Patents
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Kusmierek, E.; Chrzescijanska, E. Atmospheric corrosion of metals in industrial city environment. Data Brief 2015, 3, 149–154. [Google Scholar] [CrossRef] [PubMed]
- Medeiros, F.N.; Ramalho, G.L.; Bento, M.P.; Medeiros, L.C. On the evaluation of texture and color features for nondestructive corrosion detection. Eurasip J. Adv. Signal Process. 2010, 2010, 817473. [Google Scholar] [CrossRef]
- Hoang, N.-D.; Tran, V.-D. Image Processing-Based Detection of Pipe Corrosion Using Texture Analysis and Metaheuristic-Optimized Machine Learning Approach. Comput. Intell. Neurosci. 2019, 2019, 8097213. [Google Scholar] [CrossRef] [PubMed]
- Fajardo, J.I.; Paltán, C.A.; López, L.M.; Carrasquero, E.J. Textural analysis by means of a gray level co-occurrence matrix method. Case: Corrosion in steam piping systems. Mater. Today Proc. 2021, 49, 149–154. [Google Scholar] [CrossRef]
- Pidaparti, R.M.; Hinderliter, B.; Maskey, D. Evaluation of Corrosion Growth on SS304 Based on Textural and Color Features from Image Analysis. ISRN Corros. 2013, 2013, 376823. [Google Scholar] [CrossRef]
- Feliciano, F.F.; Leta, F.R.; Mainier, F.B. Texture digital analysis for corrosion monitoring. Corros. Sci. 2015, 93, 138–147. [Google Scholar] [CrossRef]
- Zhou, L.; Zhang, L.; Konz, N. Computer Vision Techniques in Manufacturing. IEEE Trans. Syst. Man Cybern. Syst. 2022, 53, 105–117. [Google Scholar] [CrossRef]
- Hryniewicz, P.; Banaś, W.; Gwiazda, A.; Foit, K.; Sękala, A.; Kost, G. Technological process supervising using vision systems cooperating with the LabVIEW vision builder. IOP Conf. Ser. Mater. Sci. Eng. 2015, 95, 012086. [Google Scholar] [CrossRef]
- Ramos, R.; Valdez-Salas, B.; Zlatev, R.; Wiener, M.S.; Rull, J.M.B. The discrete wavelet transform and its application for noise removal in localized corrosion measurements. Int. J. Corros. 2017, 2017, 7925404. [Google Scholar] [CrossRef]
- Ramos, I.R.; Valdez, S.B.; Zlatev, K.R.; Schorr, W.M.; Carrillo, B.M.; Stoytcheva, M.S.; Garcia, I.R.; Martinez, M.M. A Virtual Instrument for Quantitative Assessment of Pitting Corrosion. Anti-Corros. Methods Mater. 2014, 61, 287–292. [Google Scholar] [CrossRef]
- ASTM G1-03; Standard Practice for Preparing, Cleaning, and Evaluating Corrosion Test Specimens. ASTM International: West Conshohocken, PA, USA, 2003.
- ASTM D1654-08; Standard Test Method for Evaluation of Painted or Coated Specimens Subjected to Corrosive Environments. ASTM International: West Conshohocken, PA, USA, 2008.
- Das, A.; Dorafshan, S.; Kaabouch, N. Autonomous Image-Based Corrosion Detection in Steel Structures Using Deep Learning. Sensors 2024, 24, 3630. [Google Scholar] [CrossRef] [PubMed]
- Huang, J.; Xu, Y.; Wang, Q.; Wang, Q.; Liang, X.; Wang, F.; Zhang, Z.; Wei, W.; Zhang, B.; Huang, L.; et al. Foundation models and intelligent decision-making: Progress, challenges, and perspectives. Innovation 2025, 6, 100948. [Google Scholar] [CrossRef] [PubMed]



Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Curiel, M.; Irigoyen, R.A.R.; Martínez, J.R.S.; Osuna, P.M.D.; Paz-Delgadillo, J.M. Development and Application of an Intelligent Virtual Instrument for Corrosion Characterization in Metallic Materials by Computer Vision, Colorimetry and Fuzzy Logic in the Metalworking Industry of Mexico. Technologies 2026, 14, 93. https://doi.org/10.3390/technologies14020093
Curiel M, Irigoyen RAR, Martínez JRS, Osuna PMD, Paz-Delgadillo JM. Development and Application of an Intelligent Virtual Instrument for Corrosion Characterization in Metallic Materials by Computer Vision, Colorimetry and Fuzzy Logic in the Metalworking Industry of Mexico. Technologies. 2026; 14(2):93. https://doi.org/10.3390/technologies14020093
Chicago/Turabian StyleCuriel, Mario, Rogelio A. Ramos Irigoyen, Juan Ricardo Salinas Martínez, P. M. D. Osuna, and Judith M. Paz-Delgadillo. 2026. "Development and Application of an Intelligent Virtual Instrument for Corrosion Characterization in Metallic Materials by Computer Vision, Colorimetry and Fuzzy Logic in the Metalworking Industry of Mexico" Technologies 14, no. 2: 93. https://doi.org/10.3390/technologies14020093
APA StyleCuriel, M., Irigoyen, R. A. R., Martínez, J. R. S., Osuna, P. M. D., & Paz-Delgadillo, J. M. (2026). Development and Application of an Intelligent Virtual Instrument for Corrosion Characterization in Metallic Materials by Computer Vision, Colorimetry and Fuzzy Logic in the Metalworking Industry of Mexico. Technologies, 14(2), 93. https://doi.org/10.3390/technologies14020093

