A Study of Lighting Models for Automatic Detection of Regions of Interest and Surface Defects in Cast Metal Parts

Abstract

This paper investigates the influence of ultraviolet (UV) lighting configurations on the automatic detection of Regions of Interest (ROIs) and the visual identification of surface defects in cast metal parts. A meticulous experimental setup was devised employing four UV light bars arranged in a rectangle, with varying combinations of active light sources. The study utilized the OpenCV library to automate the detection of mounting holes (ROIs) on the cast metal parts. Additionally, a visual inspection was carried out to ascertain the visibility of surface defects under different lighting configurations. The findings revealed a significant enhancement in both ROI detection efficiency and defect visibility as the number of active UV light sources increased. A comparative analysis illustrated the distinct impact of each lighting configuration on the visibility and detectability of critical features on the cast metal parts. This research underscores the importance of optimized lighting conditions in advancing automated inspection systems within the metal casting industry, laying a solid foundation for further exploration into advanced lighting models and sophisticated computer vision algorithms to bolster industrial inspection processes.

Share and Cite:

Kyriakides, G. and Daskalakis, A. (2023) A Study of Lighting Models for Automatic Detection of Regions of Interest and Surface Defects in Cast Metal Parts. Open Access Library Journal, 10, 1-11. doi: 10.4236/oalib.1110833.

1. Introduction

1.1. Background

The quality control process in metal casting industries is pivotal for ensuring the production of high-quality parts that meet the required specifications [1] . There are many factors that can affect the quality of a final part, some of which may vary between different alloys [2] . Among the various steps involved in quality control, the inspection of surface defects and the identification of regions of interest (ROIs) on cast metal parts are critical for maintaining a high standard of quality [3] . Traditional inspection methods, often manual or semi-automatic, are time-consuming and subject to human error [4] . With the advent of computer vision and machine learning technologies, automatic inspection systems have emerged as promising solutions for enhancing the accuracy and efficiency of quality control processes [5] . Lighting plays a crucial role in computer vision-based inspection systems, affecting the visibility of surface features and defects [6] . Different lighting models, including ultraviolet (UV) lighting, have been proposed to enhance the ability of these systems to detect surface defects and ROIs accurately [3] .

1.2. Problem Statement

While there has been significant progress in computer vision algorithms for automatic inspection, the exploration of optimal lighting models to accentuate the features and defects on cast metal parts is relatively uncharted. The conventional lighting setups might not provide sufficient contrast or highlight the micro-defects effectively, making it imperative to investigate alternative lighting models, particularly under UV lighting, which can provide better defect discernibility.

1.3. Objectives

The primary aim of this study is to investigate the effect of various UV lighting configurations on the automatic detection of ROIs and surface defects in cast metal parts. The objectives of this study are as follows:

1) To design and set up an experimental environment with a specific arrangement of UV light bars.

2) To evaluate different lighting configurations concerning their efficacy in highlighting surfaces.

3) To implement and assess various computer vision algorithms under different UV lighting.

4) To compare the performance of the proposed lighting models with conventional models in terms of detection accuracy and computation efficiency.

1.4. Significance of the Study

By optimizing the lighting model, this research aims to enhance the accuracy and efficiency of automatic defect detection, which in turn can lead to substantial cost savings and quality improvements in manufacturing processes [3] . Furthermore, the insights gained from this study will be instrumental in the development of a more advanced and reliable automatic inspection system.

2. Literature Review

2.1. Automatic Detection Techniques in Industrial Inspection

In the field of surface inspection, previous work has focused on the development of light modeling techniques to improve the accuracy and efficiency of defect detection. Castillon et al. [7] proposed a novel underwater 3D scanner model using a biaxial MEMS mirror. The study aimed to counteract the distortion in the scanning pattern introduced by the mirror and double refraction process in underwater robotics. The authors developed a model that takes into account the distortion introduced by the flat viewports used for both the laser and the camera [8] . This model was tested in a water tank to reconstruct objects and planes and assess the sensor’s accuracy.

Furthermore, previous work has explored the use of deep learning-based object detection techniques for industrial inspection. Jang et al. [9] proposed an intelligent image-based railway inspection system using deep learning-based object detection and image comparison. The system aimed to automate the inspection of railway infrastructure to avoid unreliable manual observation by humans. Similarly, Tao et al. [10] developed an automatic metallic surface defect detection and recognition system using convolutional neural networks. The system accurately localized and classified defects appearing in input images captured from real industrial environments.

Automatic detection techniques have been widely used in industrial inspection to improve efficiency and accuracy. Pang et al. [11] presented an automated optical inspection system for solder paste based on 2.5D visual images. The system utilized a hybrid structure of FNN-based and RBF-based models to accurately detect defects on solder paste surfaces. Additionally, Essid et al. [12] developed a machine vision framework for the efficient detection and classification of manufacturing defects in metal boxes. They used an autoencoder deep neural network architecture to classify and localize defects with high accuracy.

In the field of semiconductor manufacturing, Yu et al. [13] proposed a method for automatic inspection of defects in semiconductor images using the FAST-MCD method and neural networks. The method classified images into different types and detected defects by estimating the parameters of the inlier distribution. Similarly, Valencia et al. [14] developed a visual inspection system for defects in commercial eggs using classical image processing approaches and deep learning approaches. The system aimed to replace manual inspection, which is time-consuming and prone to human error.

2.2. Challenges in Surface Defect Detection in Cast Metals

Surface defect detection in cast metals poses several challenges that need to be addressed. Iwata et al. [15] investigated the effects of solidification behavior during filling on surface defects in aluminum alloy die casting. They found that reducing the die filling velocity can reduce the entrapment of air or gases in the molten metal, but it can also increase surface defects such as surface folds and cold shut. Similarly, the same authors in another paper [2] studied the change in molten metal pressure and its effect on defects in aluminum alloy die castings. They observed that a rapid drop in temperature due to a decrease in flow velocity can lead to cold shut defects.

Another challenge in surface defect detection is the detection of defects on highly specular surfaces. Dawda et al. [16] focused on the inspection of highly specular surfaces using laser and stereo cameras. They developed a simple and accurate 3D measurement technique for the inspection of reflective surface objects. Additionally, Smith et al. [17] proposed the virtual point light source model for the practical realization of photometric stereo for dynamic surface inspection. This model enables the inspection of surface defects that were previously considered difficult or impossible to detect using conventional imaging techniques.

In summary, previous work in surface inspection has focused on developing models to counteract distortion and improve accuracy. Automatic detection techniques, such as deep learning-based object detection and image processing approaches, have been used in industrial inspection to improve efficiency and accuracy. Challenges in surface defect detection in cast metals include the optimization of die filling velocity, the detection of defects on highly specular surfaces, and the development of techniques for dynamic surface inspection.

3. Methodology

3.1. Lighting Sources

The methodology used in this study included the use of ultraviolet lights by BeamZ, specifically the BUV123 LED UV BAR light source (12 leds, 3 Watts each) as well as the BUV83 light source (8 leds, 3 Watts each). Ultraviolet lights were chosen because of their ability to enhance the visibility of certain defects on metal surfaces. In addition, we employed an Allied Vision Mako G-503 PoE camera. The camera offers high resolution (2592 × 1944 pixels), excellent sensitivity and low noise performance. This makes it suitable for applications that require high-quality imaging in harsh lighting conditions. The camera’s wide dynamic range ensures that both light and dark areas within an image are properly exposed, allowing for better visualization of details throughout the scene. The experimental setup consists of four UV light bars, with each bar placed at one of the four edges of the xy plane. This configuration was aimed at providing uniform and directional lighting for capturing images of metal parts.

The specific light sources used were selected based on their favorable characteristics, such as high-intensity UV delivery, wide beam angle, and controlled on/off operation. Each UV bar was placed at a constant distance from the metal part, ensuring stable lighting conditions throughout the experiment. The placement of the UV rods on the edges of the xy plane allowed full illumination of the metal part from multiple angles, minimizing shading effects.

The camera and lights were mounted on an aluminum frame. The bars with 12 LEDs were placed at a shallower angle (30 degrees) while the bars with 8 LEDs were placed at a slightly steeper angle (45 degrees, Figure 1). Therefore, we use an oblique lighting model with mixed source angles, as it provides the most advantages in our specific application (mainly circular regions of interest and surface defects).

3.2. Data Collection

The data collection procedure comprised of two pivotal steps, primarily aimed at obtaining high-quality images under various lighting configurations for further analysis.

3.2.1. Camera Calibration

Initially, the camera used for capturing images of the cast metal parts was meticulously calibrated to account for radial distortion and projection errors, which are common in imaging systems. A standard calibration pattern was employed, and corresponding software tools [18] were utilized to estimate and correct the intrinsic and extrinsic parameters of the camera. This step was crucial for ensuring that the captured images were geometrically accurate and free from distortions that could potentially affect the subsequent analysis.

3.2.2. Image Acquisition

Following the calibration, images of the cast metal parts were captured under different lighting configurations. The UV light bars were systematically switched on in all possible combinations of 1, 2, 3, and 4 bars to explore the impact of varying UV lighting conditions on the visibility of surface defects and regions of interest (ROIs). For each lighting configuration, several images were captured to ensure a diverse dataset. This process yielded a rich dataset comprising multiple views of the cast metal parts under varying lighting conditions, thereby providing a substantial basis for evaluating the effectiveness of different light models in highlighting the surface defects and ROIs.

Figure 1. The experimental setup.

The comprehensive data collection procedure ensured that the dataset was robust and adequately representative of different lighting conditions, thus setting a strong foundation for the ensuing analysis and evaluation of light models for automatic defect detection and ROI identification in cast metal parts. Through meticulous camera calibration and systematic image acquisition under various UV lighting configurations, the dataset was prepared with a high degree of precision, ensuring the reliability of the results obtained in the subsequent stages of this study.

3.3. Detecting ROIs and Defects

In order to evaluate the effect of different lighting conditions in the detection of Regions of Interest (ROIs) on the cast metal parts, we employed computer vision techniques and visual inspection.

3.3.1. ROI Detection

The detection of mounting holes, which are considered as ROIs in this context, was carried out using the SimpleBlobDetector feature from the OpenCV library in Python [19] . SimpleBlobDetector is adept at identifying blobs in images based on certain attributes such as color, size, and shape. The detector parameters were fine-tuned to accurately identify the mounting holes on the cast metal parts.

3.3.2. Surface Defect Detection

While automated techniques are desirable for defect detection, due to the complex nature of the surface defects on the cast metal parts, a visual inspection approach was adopted for this study. The following steps were taken to document and assess the visibility of surface defects under different UV lighting configurations. A thorough visual inspection of the images was conducted by experienced inspectors to identify and mark the surface defects. The identified defects were documented, and their visibility under various lighting configurations was assessed.

4. Results

In this section, we present and discuss the findings from our image analysis, conducted under varying UV lighting configurations. The primary focus is on evaluating the visibility of Regions of Interest (ROIs) and surface defects on cast metal parts.

4.1. ROI Detection

The application of SimpleBlobDetector from the OpenCV library proved effective in accurately identifying the mounting holes on the cast metal parts. The precise tuning of parameters ensured the effective identification of ROIs across all lighting configurations.

A graphical representation (Figure 2) illustrates the average number of ROIs detected with 1, 2, 3, and 4 UV light bars switched on. It is evident from the graph that the number of detected ROIs increased with the number of UV light bars switched on, signifying a direct correlation between the lighting configurations and the efficacy of ROI detection.

4.2. Surface Defect Visibility

The visibility of surface defects was thoroughly examined through a manual inspection of images across different UV lighting configurations. It was discerned that the ease of defect detection improved with the increment in the number of active UV light bars. Each configuration, with 1, 2, 3, and 4 UV light bars switched on, demonstrated a distinct enhancement in the visibility of surface defects.

Sample images illustrating the visibility of defects under each lighting configuration are presented below (Figure 3). These images clearly depict the progressive enhancement in defect visibility as the number of active UV light bars increased.

Figure 2. The average number of ROIs detected for each specific number of active light sources.

Figure 3. Defect visibility for different number of light sources. The white semicircles correspond to the active light sources

It was particularly noted that the configuration with all four UV light bars switched on provided the most conducive lighting condition for surface defect detection. The increased illumination and varying angles of light incidence accentuated the surface irregularities, rendering the defects more discernible. Conversely, the configuration with only one UV light bar switched on yielded the least visibility of surface defects, underscoring the significant impact of lighting on defect detectability.

4.3. Comparative Analysis of Lighting Configurations

Upon analyzing the data, it was observed that the visibility of both ROIs and surface defects substantially improved with an increase in the number of UV light bars switched on. The combination of all four UV light bars switched on rendered the highest visibility and contrast, markedly enhancing the detection efficacy of both ROIs and surface defects. On the other hand, configurations with only a single UV light bar switched on exhibited the least contrast, rendering defect detection relatively challenging.

The comparative analysis of different lighting configurations aimed at understanding the relationship between the UV lighting conditions and the detectability of both ROIs and surface defects. An extensive comparison was carried out by analyzing images captured under all 15 possible combinations of active light sources. These configurations are meticulously illustrated in Figure 4, where each configuration is represented by an image. In each image, an active light source is indicated by a white semicircle at the corresponding edge of the image.

Figure 4. All possible combinations of active light sources, indicated with white semicircles. Starting from top left: images 1 - 4 have one light source, images 5 - 10 have two light sources, images 11 - 14 have three light sources and image 15 (last) has 4 light sources.

5. Limitations

While this study provides valuable insights into the influence of UV lighting configurations on the automatic detection of Regions of Interest (ROIs) and the visual identification of surface defects on cast metal parts, several limitations should be acknowledged. The investigation solely focused on indirect UV lighting. The results and conclusions drawn are specifically applicable to this lighting modality. Other lighting modalities, such as direct lighting or the use of visible or infrared light, were not considered and may yield different outcomes concerning defect visibility and ROI detection efficacy. Furthermore, the inspection of surface defects was conducted visually without leveraging automated defect detection algorithms. This manual inspection might encompass subjective judgments, potentially leading to inconsistencies in defect identification across different lighting configurations. These limitations delineate the scope of the current study and suggest avenues for future research, which could include expanding the investigation to other lighting modalities and employing automated defect detection algorithms.

6. Conclusions

In this study, the role of ultraviolet (UV) lighting configurations in enhancing the automatic detection of Regions of Interest (ROIs) and surface defects on cast metal parts was thoroughly explored. The experimental setup entailed varying combinations of active UV light sources, revealing a significant improvement in the visibility of surface defects and the detection efficiency of ROIs as the number of active UV light bars increased.

The comparative analysis of different lighting configurations furnished a deeper understanding of how tailored lighting conditions can significantly influence the performance of computer vision-based inspection systems. The detailed illustration of all 15 possible combinations of active UV light sources provided a comprehensive overview of the correlation between the lighting configurations and the visibility of critical features on the cast metal parts. It substantiates the necessity of optimized lighting conditions in advancing the capabilities of automated inspection systems within the metal casting industry. It also lays a solid groundwork for future research aimed at developing advanced lighting models, and exploring sophisticated computer vision algorithms to bolster the accuracy and robustness of automatic inspection mechanisms.

The insights derived from this research could greatly contribute to the broader objective of elevating the quality control standards within the metal casting sector. By enhancing the reliability and efficiency of automated inspection processes, this investigation aids in propelling the industry closer to achieving superior operational efficiency and product quality, thus making a notable contribution to the body of knowledge in the realm of automated industrial inspection.

Acknowledgements

This work has been co-financed by the European Union and Greek national funds through the Operational Program Competitiveness, Entrepreneurship and Innovation, under the call “RESEARCH―CREATE―INNOVATE” (project code: T2EDK-04162).

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] Robinson, S.L. and Miller, R.K. (1989) Automated Inspection and Quality Assurance. CRC Press, Boca Raton.
[2] Iwata, Y., Dong, S., Sugiyama, Y. and Iwahori, H. (2014) Change in Molten Metal Pressure and Its Effect on Defects of Aluminum Alloy Die Castings. Materials Transactions, 55, 311-317. https://doi.org/10.2320/matertrans.F-M2013838
[3] Zhang, Y. and Zhang, J. (2018) A Review on Computer Vision-Based Defect Detection and Quality Evaluation in the Field of Manufacturing. Journal of Intelligent Manufacturing, 29, 787-805.
[4] Cui, W., Zhang, Y., Zhang, X., Li, L. and Liou, F. (2020) Metal Additive Manufacturing Parts Inspection Using Convolutional Neural Network. Applied Sciences, 10, 545. https://doi.org/10.3390/app10020545
[5] Campbell, F.C. (2013) Inspection of Metals: Understanding the Basics. ASM International, Almere. https://doi.org/10.31399/asm.tb.imub.9781627083058
[6] Martínez, S.S., Vázquez, C.O., García, J.G. and Ortega, J.G. (2017) Quality Inspection of Machined Metal Parts Using an Image Fusion Technique. Measurement, 111, 374-383. https://doi.org/10.1016/j.measurement.2017.08.002
[7] Castillon, M., Palomer, A., Forest, J. and Ridao, P. (2021) Underwater 3D Scanner Model Using a Biaxial Mems Mirror. IEEE Access, 9, 50231-50243. https://doi.org/10.1109/ACCESS.2021.3069189
[8] Palomer, A., Ridao, P., Forest, J. and Ribas, D. (2019) Underwater Laser Scanner: Ray-Based Model and Calibration. IEEE/ASME Transactions on Mechatronics, 24, 1986-1997. https://doi.org/10.1109/TMECH.2019.2929652
[9] Jang, J., Shin, M., Lim, S., Park, J., Kim, J. and Paik, J. (2019) Intelligent Image-Based Railway Inspection System Using Deep Learning-Based Object Detection and Weber Contrast-Based Image Comparison. Sensors, 19, Article 4738. https://doi.org/10.3390/s19214738
[10] Tao, X., Zhang, D., Ma, W., Liu, X. and Xu, D. (2018) Automatic Metallic Surface Defect Detection and Recognition with Convolutional Neural Networks. Applied Sciences, 8, Article 1575. https://doi.org/10.3390/app8091575
[11] Pang, G. and Chu, M.-H. (2009) Automated Optical Inspection of Solder Paste Based on 2.5D Visual Images. 2009 International Conference on Mechatronics and Automation, Changchun, 09-12 August 2009. https://doi.org/10.1109/ICMA.2009.5246351
[12] Essid, O., Laga, H. and Samir, C. (2018) Automatic Detection and Classification of Manufacturing Defects in Metal Boxes Using Deep Neural Networks. PLOS ONE, 13, e0203192. https://doi.org/10.1371/journal.pone.0203192
[13] Yu, J., Han, S. and Lee, C.-O. (2023) Defect Inspection in Semiconductor Images Using Fast-Mcd Method and Neural Network. The International Journal of Advanced Manufacturing Technology, 129, 1547-1565. https://doi.org/10.1007/s00170-023-12287-z
[14] Valencia, Y.M., Majin, J.J., Taveira, V.B., Salazar, J.D., Stivanello, M.E., Ferreira, L. and Stemmer, M.R. (2021) A Novel Method for Inspection Defects in Commercial Eggs Using Computer Vision. The International Archives of the Photogrammetry Remote Sensing and Spatial Information Sciences, XLIII-B2-2021, 809-816. https://doi.org/10.5194/isprs-archives-XLIII-B2-2021-809-2021
[15] Iwata, Y., Dong, S., Sugiyama, Y. and Iwahori, H. (2013) Effects of Solidification Behavior During Filling on Surface Defects of Aluminum Alloy Die Casting. Materials Transactions, 54, 1944-1950. https://doi.org/10.2320/matertrans.F-M2013819
[16] Dawda, A. and Nguyen, M. (2021) Comparison of Red Versus Blue Laser Light for Accurate 3D Measurement of Highly Specular Surfaces in Ambient Lighting Conditions. In: Nguyen, M., Yan, W.Q. and Ho, H. Eds., Geometry and Vision: First International Symposium, Springer, New York, 300-312. https://doi.org/10.1007/978-3-030-72073-5_23
[17] Smith, L. and Smith, M. (2005) The Virtual Point Light Source Model the Practical Realisation of Photometric Stereo for Dynamic Surface Inspection. In: Roli, F. and Vitulano, S., Eds., Image Analysis and Processing—ICIAP 2005, Lecture Notes in Computer Science, Springer, Berlin, Heidelberg, 495-502. https://doi.org/10.1007/11553595_61
[18] Vo, N.T., Atwood, R.C. and Drakopoulos, M. (2015) Radial Lens Distortion Correction with Sub-Pixel Accuracy for X-Ray Micro-Tomography. Optics Express, 23, 32859- 32868. https://doi.org/10.1364/OE.23.032859
[19] Bradski, G. and Kaehler, A. (2008) Learning OpenCV: Computer Vision with the OpenCV Library. O’Reilly Media, Inc., Sebastopol, CA.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.