Automobile part defect detection method and detection system
By using high-resolution industrial cameras and lighting models to identify and optimize overexposure and shadow areas during automotive parts detection, the loss of image details caused by high reflection on metal surfaces is solved, and detection accuracy and image quality are improved.
Patent Information
- Application Number
- CN202510339938.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-22
AI Technical Summary
During the detection of automotive parts, the high reflection characteristics of the metal surface cause the light source to form overexposure or shadowed areas on the surface of the parts, resulting in the loss of local details of the image, affecting the accuracy of defect recognition.
By deploying high-resolution industrial cameras on the detection line to acquire image data, establish a lighting model to perform lighting analysis on the image, identify overexposure and shadow areas, and use different optimization methods to correct and optimize lighting for different areas to restore the original details of the image.
It improves image quality and detection accuracy, effectively solves the problem of reflective shadows, and improves the accuracy and reliability of defect detection.
Smart Images

Figure CN119863459A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and specifically to an automobile parts defect detection method and detection system. Background Art
[0002] The automotive manufacturing industry is one of the industries with the most stringent requirements on product quality. The quality of parts is directly related to the safety, reliability and service life of the vehicle. With the rapid development of intelligent manufacturing and automated production, the production speed of automotive parts has been greatly improved, but at the same time, higher requirements have been put forward for defect detection technology.
[0003] At present, defect detection of automotive parts mainly relies on image processing technology and machine learning algorithms. Common detection methods include defect recognition based on traditional image processing technology (such as edge detection and threshold segmentation), and target detection algorithms based on deep learning (such as Faster R-CNN and YOLO). In addition, some advanced methods have also introduced multimodal data fusion (such as combining optical images with infrared images) and three-dimensional reconstruction technology to improve detection accuracy. These methods can meet the needs of some scenarios to a certain extent.
[0004] However, in the actual application of existing technologies, there are still some problems, such as uneven illumination on the surface of parts and interference from reflections. Especially in the inspection process of metal parts, due to the high reflectivity of the metal surface, the light source on the production line can easily form overexposure or shadow areas on the surface of the parts, resulting in the loss of local details of the image, seriously affecting the accuracy of defect identification. Traditional image enhancement methods (such as histogram equalization) are difficult to dynamically adapt to complex lighting changes, and deep learning-based models also lack targeted design for reflection interference, resulting in a decrease in detection accuracy.
[0005] Therefore, it is necessary to provide an automobile parts defect detection method and detection system to solve the above problems.
[0006] It should be noted that the above information disclosed in this background technology section is only for understanding the background technology of the present application concept, and therefore, it may contain information that does not constitute the prior art. Summary of the invention
[0007] Based on the above problems existing in the prior art, the problem to be solved by the present application is: to provide a method and system for detecting defects in automotive parts, to solve and optimize the problem of reflective shadows appearing during the detection process of metal parts, and to improve the quality of defect detection.
[0008] The technical solution adopted by the present application to solve the technical problem is: a method and system for detecting defects in automobile parts, including: At least one acquisition device is deployed on the detection line, and the first image data acquired by the acquisition device is sent to the data processing center, wherein the acquisition device is a high-resolution industrial camera, and the received first image data is pre-processed to generate second image data; Establishing an illumination model, performing illumination analysis on the second image data generated after preprocessing, and identifying a first area and a second area, wherein the first area is an overexposed area, and the second area is a shadow area; After identifying overexposed and shadow areas, the image is corrected and optimized for lighting to restore the original details of the image; The quality of the repaired image is evaluated, and the peak signal-to-noise ratio and structural similarity indicators are used to quantify the image repair effect. After the evaluation is completed, defect analysis is performed.
[0009] During the implementation of the technical solution of the present application, a lighting model is established to perform lighting analysis on the second image data, and overexposed areas and shadow areas are identified. Then, different optimization methods are used for different areas to improve image quality and detection accuracy.
[0010] Furthermore, performing illumination analysis on the second image data generated after preprocessing further includes the following steps: obtaining the grayscale value of each image in the second image data to obtain brightness information; selecting the Lamport model as the basic model for illumination analysis to identify the first area and the second area, and calculating the intensity of the reflected light on the surface of the object by calculating the relationship between the grayscale value and the illumination intensity and combining the parameters of the Lamport model.
[0011] Furthermore, the identification of the first area includes the following steps: first perform a dynamic range analysis to define a dynamic range, then set a brightness threshold based on the dynamic range, define pixels exceeding the threshold as overexposed, and record their location information, and then summarize them after the identification is completed to obtain a distribution map of all overexposed areas.
[0012] Furthermore, the identification of the second area includes the following steps: first, a brightness contrast analysis is performed to analyze the brightness difference between a certain area and the surrounding areas. If the difference is large and the brightness is significantly lower than the global brightness, it can be determined as a shadow area; then, the Lamport model is used for further verification, combined with the calculation of the reflected light intensity, to accurately calibrate the shadow boundary to ensure the accuracy of the identification result; then, a statistical method is used to perform statistical analysis and clustering processing on the shadow area to determine the scope and distribution of the shadow area; finally, all identified shadow areas are summarized to generate a shadow area distribution map.
[0013] Furthermore, the statistical method uses a Gaussian model to estimate the brightness distribution of the image. If the brightness value of a certain area falls below the quantile of 1%, the area is determined to be a shadow area.
[0014] Furthermore, the illumination correction and optimization of the image include the following steps: respectively adjusting the local illumination of the first area and the second area, using different correction algorithms to reduce the brightness of the overexposed area and increase the brightness of the shadow area to ensure detail recovery; combining global illumination balance technology to optimize the overall image contrast to avoid local overexposure or darkness; using a multi-scale Retinex algorithm to perform multi-scale illumination adjustment on the image through illumination models of multiple scales; performing reflection suppression and shadow repair through deep learning to make the transition between the repaired area and the surrounding area natural, reduce traces of human intervention, and enhance the realism and clarity of the image.
[0015] Furthermore, when conducting quality assessment, a threshold range is set to automatically filter out images with poor restoration effects, and secondary optimization processing is performed to ensure that each image meets high-standard detection requirements, thereby improving the reliability and stability of the overall detection system.
[0016] An automobile parts defect detection system, comprising: A visual acquisition module, which is used to deploy at least one acquisition device on the inspection line, and send the first image data acquired by the acquisition device to the data processing center, wherein the acquisition device is a high-resolution industrial camera, and pre-process the received first image data to generate second image data; A defect area recognition module, used to establish an illumination model, perform illumination analysis on the second image data generated after preprocessing, and identify a first area and a second area, wherein the first area is an overexposed area and the second area is a shadow area; Image illumination correction and optimization module, which is used to correct and optimize the image illumination after identifying the overexposed and shadowed areas, and restore the original details of the image; The quality assessment and defect analysis module is used to evaluate the quality of the repaired image, using peak signal-to-noise ratio and structural similarity indicators to quantify the image repair effect, and perform defect analysis after the evaluation is completed.
[0017] The beneficial effect of the present application is that the present application provides an automobile parts defect detection method and detection system, which establishes a lighting model, performs lighting analysis on the second image data, identifies overexposed areas and shadow areas, and then uses different optimization methods for different areas to improve image quality and detection accuracy.
[0018] In addition to the above-described purposes, features and advantages, the present application also has other purposes, features and advantages. The present application will be further described in detail with reference to the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 This is a schematic diagram of the overall process of an automobile parts defect detection method in this application; Figure 2 This is a schematic diagram of the module structure of an automobile parts defect detection system in this application. DETAILED DESCRIPTION
[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0022] Embodiment 1: Figure 1 As shown, the present application provides a method for defect detection of automobile parts, which is applied to the defect detection process of automobile parts, especially the defect detection problem of metal parts, and optimizes the problems of shadows, overexposed areas, and local detail loss on the surface of parts caused by the reflection of the surface of metal parts during the detection process, thereby affecting the accuracy of defect recognition. The defect detection method specifically includes the following steps: Step 10: deploy at least one acquisition device on the detection line, and send the first image data acquired by the acquisition device to the data processing center, wherein the acquisition device is a high-resolution industrial camera, and pre-processes the received first image data to generate second image data; In this embodiment, the inspection environment for automobile parts is mainly an inspection line, that is, the image of the automobile parts is collected at a specific station on the inspection line, the surface of the parts is photographed by a high-resolution industrial camera, and the collected first image data is sent to a data processing center. Therefore, there is an information exchange channel between the acquisition device and the data processing center, such as a wireless transmission channel and a wired transmission channel, which is not limited in this embodiment; After the data processing center receives the first image data, it needs to be preprocessed because the collected original image may have problems such as random noise and uneven illumination. The preprocessing process includes denoising, contrast enhancement, filtering and other processes, so as to generate second image data with a quality greater than the first image data. The specific preprocessing method can refer to the existing technology and will not be described in detail in this embodiment. Step 20: Establishing an illumination model, performing illumination analysis on the second image data generated after preprocessing, and identifying a first area and a second area, wherein the first area is an overexposed area, and the second area is a shadow area; During the inspection of automotive parts, especially metal parts, overexposure and shadows are easily generated during image acquisition due to the strong surface reflection. Such overexposure and shadow areas will directly affect the subsequent defect identification and defect classification process. In order to distinguish these two areas, it is necessary to use an illumination model to analyze the illumination distribution of the image and accurately divide the overexposure and shadow areas through algorithms. Specifically, performing illumination analysis on the second image data generated after preprocessing further includes the following steps: Step 201: Obtain the grayscale value of each image in the second image data, so as to obtain brightness information; the brightness information in the image is usually represented by the grayscale value of each pixel or the brightness value of the RGB color channel. The brightness distribution of the image reflects the intensity and uniformity of the illumination. When obtaining the grayscale value of the image, it can be achieved by a color channel conversion method (for example, converting the RGB color channel into a grayscale value). The specific calculation method can refer to the prior art and will not be described in detail in this embodiment; Step 202: Selecting the Lamport model as the basic model for illumination analysis to identify the first region and the second region, wherein the Lamport model can effectively simulate the reflection characteristics of light on the surface of an object, and by calculating the relationship between the gray value and the illumination intensity and combining the parameters of the Lamport model, the intensity of the reflected light on the surface of the object is calculated; The identification of the first area includes the following steps: The first area is the overexposed area. Overexposure means that the brightness value of some areas in the image exceeds the maximum brightness range of the camera, resulting in loss of details or complete whitening. The key to identifying overexposed areas is to determine which areas have too high brightness through brightness threshold and physical lighting analysis, so as to mark these areas as overexposed areas. In specific operations, dynamic range analysis is first performed to define a dynamic range, and then a brightness threshold is set based on the dynamic range. Pixels that exceed the threshold are defined as overexposed, and their position information is recorded. After the identification is completed, they are summarized to obtain a distribution map of all overexposed areas. The identification of the second region comprises the following steps: The second area is the shadow area. The shadow is caused by objects blocking the light source, resulting in insufficient light intensity in some areas, resulting in low brightness. The shadow area usually presents low brightness and lacks details. The recognition of the shadow area depends on the analysis of brightness and the derivation of the physical illumination model. In the specific operation, a brightness comparison analysis is first performed. In the image, if the brightness value of a certain area is significantly lower than the average brightness value of the surrounding area, then this area may be a shadow area. For example, by analyzing the brightness difference between a certain area and the surrounding area, if the difference is large and the brightness is significantly lower than the global brightness, it can be determined as a shadow area; then, the Lamport model is used for further verification, combined with the calculation of the reflected light intensity, the shadow boundary is accurately calibrated to ensure the accuracy of the recognition result; then, a statistical method is used to perform statistical analysis and clustering processing on the shadow area to determine the range and distribution of the shadow area. For example, a Gaussian model is used to estimate the brightness distribution of the image. If the brightness value of a certain area falls in a lower percentile (for example, below the 1% percentile), the area can be determined as a shadow area and its location information is recorded; finally, all identified shadow areas are summarized to generate a shadow area distribution map; Step 30: After identifying the overexposed and shadow areas, perform lighting correction and optimization on the image to restore the original details of the image; After identifying the overexposed and shadowed areas, it is necessary to correct and optimize the illumination so that it can reflect the correct information of automotive parts, thereby improving the accuracy and efficiency of defect detection. Specifically, the illumination correction and optimization of the image includes the following steps: Step 301: performing local illumination adjustment on the first area and the second area respectively, using different correction algorithms to reduce the brightness of the overexposed area and increase the brightness of the shadow area to ensure detail recovery; Step 302: Combined with global illumination equalization technology, the overall image contrast is optimized to avoid partial overexposure or overdarkness; the global illumination equalization technology adjusts the histogram distribution of the image to equalize the global brightness, ensuring that the details of each part of the image are clearly visible while maintaining true color restoration, ultimately achieving an overall improvement in image quality; Step 303: using a multi-scale Retinex algorithm to perform multi-scale illumination adjustment on the image through illumination models of multiple scales. The multi-scale Retinex algorithm is suitable for complex illumination environments and can effectively eliminate the problem of uneven illumination, making the overall brightness distribution of the image more uniform. Step 304: Reflection suppression and shadow repair are performed through deep learning to make the transition between the repaired area and the surrounding area natural, reduce traces of human intervention, and improve the realism and clarity of the image. When performing image repair, repair traces are inevitable, so it is necessary to combine edge detection technology to accurately identify the boundaries of the repaired area to ensure that the repair effect is smooth and seamless. At the same time, the neural network model is used to intelligently fill in the detailed texture to further improve the naturalness and realism of the image, and finally achieve high-quality lighting correction and optimization.
[0023] Step 40: Performing a quality assessment on the repaired image, using peak signal-to-noise ratio and structural similarity indicators to quantify the image repair effect, and performing defect analysis after the assessment is completed; After the image is repaired, in order to more intuitively judge the repair quality, it is also necessary to quantify it. In this embodiment, the peak signal-to-noise ratio and structural similarity index are used to quantify the image repair effect. By comparing the peak signal-to-noise ratio and structural similarity score of the image before and after repair, the repair effect is evaluated to ensure the true restoration of image details and colors, meet the detection standard requirements, and improve the overall image quality. In addition, a threshold range can be set to automatically filter out images with poor repair effects, and perform secondary optimization processing to ensure that each image meets high-standard detection requirements, thereby improving the reliability and stability of the overall detection system; After quality assessment, defect identification can be performed through the evaluated image data, wherein the defect identification method can refer to common defect detection methods in the field, such as target detection algorithms based on deep learning, image feature extraction using convolutional neural networks, etc., which are not described in detail in this embodiment.
[0024] Embodiment 2: Figure 2 As shown, the present application also proposes an automobile parts defect detection system, which runs the defect detection method in the first embodiment, optimizes the poor detection effect caused by problems such as reflection and shadow easily generated by metal parts, and improves the defect recognition efficiency. Specifically, the defect detection system includes: A visual acquisition module, which is used to deploy at least one acquisition device on the inspection line, and send the first image data acquired by the acquisition device to the data processing center, wherein the acquisition device is a high-resolution industrial camera, and pre-process the received first image data to generate second image data; A defect area recognition module, used to establish an illumination model, perform illumination analysis on the second image data generated after preprocessing, and identify a first area and a second area, wherein the first area is an overexposed area and the second area is a shadow area; Image illumination correction and optimization module, which is used to correct and optimize the image illumination after identifying the overexposed and shadowed areas, and restore the original details of the image; The quality assessment and defect analysis module is used to evaluate the quality of the repaired image, using peak signal-to-noise ratio and structural similarity indicators to quantify the image repair effect, and perform defect analysis after the evaluation is completed.
[0025] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting defects in automobile parts, characterized in that: include: At least one acquisition device is deployed on the detection line, and the first image data acquired by the acquisition device is sent to the data processing center, wherein the acquisition device is a high-resolution industrial camera, and the received first image data is pre-processed to generate second image data; Establishing an illumination model, performing illumination analysis on the second image data generated after preprocessing, and identifying a first area and a second area, wherein the first area is an overexposed area, and the second area is a shadow area; After identifying overexposed and shadow areas, the image is corrected and optimized for lighting to restore the original details of the image; The quality of the repaired image is evaluated, and the peak signal-to-noise ratio and structural similarity indicators are used to quantify the image repair effect. After the evaluation is completed, defect analysis is performed.
2. The method for detecting defects in automobile parts according to claim 1, characterized in that: The illumination analysis of the second image data generated after preprocessing further includes the following steps: obtaining the grayscale value of each image in the second image data to obtain brightness information; selecting the Lamport model as the basic model for illumination analysis to identify the first area and the second area, and calculating the intensity of the reflected light on the surface of the object by calculating the relationship between the grayscale value and the illumination intensity and combining the parameters of the Lamport model.
3. The method for detecting defects in automobile parts according to claim 2, characterized in that: The identification of the first area includes the following steps: first perform a dynamic range analysis to define a dynamic range, then set a brightness threshold based on the dynamic range, define pixels exceeding the threshold as overexposed, and record their location information, and then summarize them after the identification is completed to obtain a distribution map of all overexposed areas.
4. The method for detecting defects in automobile parts according to claim 2, characterized in that: The identification of the second area includes the following steps: first, a brightness contrast analysis is performed to analyze the brightness difference between a certain area and the surrounding areas. If the difference is large and the brightness is significantly lower than the global brightness, it can be determined as a shadow area; then, the Lamport model is used for further verification, combined with the calculation of the reflected light intensity, to accurately calibrate the shadow boundary to ensure the accuracy of the identification results; then, a statistical method is used to perform statistical analysis and clustering processing on the shadow area to determine the scope and distribution of the shadow area; finally, all identified shadow areas are summarized to generate a shadow area distribution map.
5. The method for detecting defects in automobile parts according to claim 4, characterized in that: The statistical method uses a Gaussian model to estimate the brightness distribution of the image. If the brightness value of a certain area falls below the 1% quantile, the area is determined to be a shadow area.
6. The method for detecting defects in automobile parts according to claim 1, characterized in that: The illumination correction and optimization of the image includes the following steps: performing local illumination adjustment on the first area and the second area respectively, using different correction algorithms to reduce the brightness of the overexposed area and increase the brightness of the shadow area to ensure detail recovery; combining global illumination balance technology to optimize the overall image contrast and avoid local overexposure or darkness; using a multi-scale Retinex algorithm to perform multi-scale illumination adjustment on the image through illumination models of multiple scales; performing reflection suppression and shadow repair through deep learning to make the transition between the repaired area and the surrounding area natural, reduce traces of human intervention, and enhance the realism and clarity of the image.
7. The method for detecting defects in automobile parts according to claim 1, characterized in that: When conducting quality assessment, a threshold range is set to automatically filter out images with poor restoration effects, and secondary optimization processing is performed to ensure that each image meets high-standard detection requirements, thereby improving the reliability and stability of the overall detection system.
8. An automobile parts defect detection system, characterized in that: include: A visual acquisition module, which is used to deploy at least one acquisition device on the inspection line and send the first image data acquired by the acquisition device to a data processing center, wherein the acquisition device is a high-resolution industrial camera, and pre-process the received first image data to generate second image data; A defect area recognition module, used to establish an illumination model, perform illumination analysis on the second image data generated after preprocessing, and identify a first area and a second area, wherein the first area is an overexposed area and the second area is a shadow area; Image illumination correction and optimization module, which is used to correct and optimize the image illumination after identifying the overexposed and shadowed areas, and restore the original details of the image; The quality assessment and defect analysis module is used to evaluate the quality of the repaired image, using peak signal-to-noise ratio and structural similarity indicators to quantify the image restoration effect, and perform defect analysis after the evaluation is completed.
9. The automobile parts defect detection system according to claim 8, characterized in that: Used to implement the automobile parts defect detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
LBP (Local Binary Pattern) face recognition method for eliminating illumination evenness
CN104102907A
Image highlight compensation method based on optical parameter estimation
CN109978793A
Production defect identification method for electronic cigarette PCB
CN116993720A
New energy automobile part surface defect testing method based on computer vision
CN119091186A
Part size detection method based on image recognition
CN119625045A
Cited By
Aviation part warehouse-in and warehouse-out management system based on image processing
CN120047081A
Visual detection method and system for gluing road of automobile part
CN120539172A
Valve copper accessory quality control method based on machine vision
CN121414706A
Method for quality control of valve brass fittings based on machine vision
CN121414706B
Automobile part quality detection method and system based on machine learning
CN121544540A