Method and device for detecting surface defects of an automotive part envelope
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-27
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]本发明提供一种汽车零部件封件表面瑕疵的检测方法及装置,用于至少解决在曲面反光目标检测中因镜面反射、遮挡与失焦导致有效覆盖不足且缺陷定位量测不稳定的问题
Smart Images

Figure CN122550466A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision and intelligent inspection technology, and in particular to a method and apparatus for detecting surface defects in automotive parts. Background Technology
[0002] In the quality system of automobile manufacturing, the surface quality of appearance and sealing-related components directly affects assembly consistency, durability, and after-sales quality stability. Production line cycle time requires high-throughput and traceability inspections. Traditional methods, primarily relying on manual visual inspection, are susceptible to human fatigue, experience differences, and fluctuations in lighting conditions, making missed detections and misjudgments difficult to avoid. Existing visual inspection solutions mostly employ single-view or limited-view imaging. When dealing with curved structures and reflective materials, specular reflection, occlusion, and defocusing lead to insufficient effective coverage. Simultaneously, geometric inconsistencies between viewpoints increase the deviation in defect location and dimensional measurement, making it difficult to form a stable automatic judgment closed loop, thus affecting quality control and process traceability capabilities. Summary of the Invention
[0003] This invention provides a method and apparatus for detecting surface defects of automotive parts, which at least solves the problems of insufficient effective coverage and unstable defect location measurement caused by specular reflection, occlusion and defocus in the detection of curved reflective targets.
[0004] In a first aspect, the present invention provides a method for detecting surface defects in automotive component seals, comprising the following steps:
[0005] Obtain camera calibration parameters, establish the mapping relationship between the sealed coordinate system, the unfolded coordinate system, and the multi-angle images to the unfolded coordinate system, and collect multi-angle images of the sealed document to form a multi-angle image set;
[0006] A multi-angle image set is mapped to an unfolded coordinate system, and a specular reflection mask, an occlusion mask, and a blur mask are generated based on the mapped multi-angle image set. The mapped multi-angle image set is then fused based on the specular reflection mask, the occlusion mask, and the blur mask to generate an unfolded image and a coverage confidence map.
[0007] Based on the coverage confidence map, the reshoot area is determined and reshoot images are acquired. The reshoot images are then used to update the unfolded image and the coverage confidence map until the coverage confidence map meets the preset coverage integrity condition.
[0008] Based on the unfolded image, the defect region is segmented to obtain the defect boundary. Based on the geometric mapping relationship, the defect boundary is reverse-mapped from the unfolded coordinate system to the package coordinate system to obtain the defect location and size measurement results. Based on the coverage confidence map, the reliability level is determined, and the detection result including the defect boundary, defect location, size measurement results and reliability level is output.
[0009] Optionally, mapping the multi-angle image set to the unfolded coordinate system includes: performing distortion correction on the multi-angle image set based on the camera calibration parameters, and performing coordinate transformation and resampling on the multi-angle image set based on the correspondence between the envelope coordinate system and the unfolded coordinate system.
[0010] Optionally, the generation of a specular reflection mask, an occlusion mask, and a blur mask based on the mapping of the multi-angle image set includes: detecting brightness saturation regions in the multi-angle image set, mapping the multi-angle image set to the unfolded coordinate system based on the mapping relationship, determining specular reflection regions based on brightness differences at the same unfolded coordinate position, and marking the specular reflection regions as the specular reflection mask; mapping the multi-angle image set to the unfolded coordinate system based on the mapping relationship, marking the positions of pixels without mapping as the occlusion mask; and evaluating the sharpness of the multi-angle image set to determine low-sharp regions, and marking the low-sharp regions as the blur mask.
[0011] Optionally, the fusion of the multi-angle image set based on the specular reflection mask, the occlusion mask, and the blur mask includes: removing pixels marked by the specular reflection mask, the occlusion mask, and the blur mask in the unfolded coordinate system, determining the weighted fusion weights, and performing weighted fusion on the pixels not marked by the specular reflection mask, the occlusion mask, and the blur mask to generate the unfolded image.
[0012] Optionally, the coverage confidence map includes the source view identifier and pixel confidence of each pixel in the unfolded coordinate system, and the pixel confidence is determined based on the marking results of the specular reflection mask, the occlusion mask and the blur mask.
[0013] Optionally, determining the reshoot area based on the coverage confidence map includes: extracting connected regions in the coverage confidence map where the pixel confidence is lower than a preset pixel confidence condition as the reshoot area, and determining the reshoot observation direction corresponding to the reshoot area based on the envelope coordinate system, the unfolded coordinate system, and the mapping relationship, wherein the preset pixel confidence condition is used to characterize the local coverage requirement of the preset coverage integrity condition.
[0014] Optionally, acquiring the retaken images includes: determining a retaken image acquisition posture sequence based on the retaken image observation direction, and acquiring the retaken images according to the retaken image acquisition posture sequence.
[0015] Optionally, obtaining the defect boundary by segmenting the defect region based on the unfolded image includes: performing convolutional neural network processing on the unfolded image to generate a defect probability map, and extracting the defect boundary based on the defect probability map.
[0016] Optionally, determining the reliability level based on the coverage confidence map includes: determining the reliability level based on the pixel confidence level of the coverage confidence map and the pixel probability value of the defect probability map, and outputting the source view identifier corresponding to the defect boundary in the detection result.
[0017] A second aspect of the present invention provides an apparatus for detecting surface defects in automotive component seals, used to implement the method for detecting surface defects in automotive component seals described in the first aspect, the apparatus comprising:
[0018] The calibration acquisition module is used to acquire camera calibration parameters, establish the mapping relationship between the sealed coordinate system, the unfolded coordinate system and the multi-angle images to the unfolded coordinate system, and acquire multi-angle images of the sealed document to form a multi-angle image set.
[0019] The mask fusion module is used to map a set of multi-angle images to an unfolded coordinate system, and generate a specular reflection mask, an occlusion mask and a blur mask based on the mapped set of multi-angle images. The module fuses the mapped set of multi-angle images based on the specular reflection mask, the occlusion mask and the blur mask to generate an unfolded image and a coverage confidence map.
[0020] The reshooting and updating module is used to determine the reshooting area based on the coverage confidence map and acquire reshooting images, and use the reshooting images to update the unfolded image and the coverage confidence map until the coverage confidence map meets the preset coverage integrity condition;
[0021] The detection output module is used to segment the defect area based on the unfolded image to obtain the defect boundary, and to reverse map the defect boundary from the unfolded coordinate system to the package coordinate system based on the geometric mapping relationship to obtain the defect location and size measurement results; to determine the reliability level based on the coverage confidence map, and to output the detection result including the defect boundary, defect location, size measurement results and reliability level.
[0022] A third aspect of the present invention provides an apparatus comprising: one or more processors; a storage device for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting surface defects of automotive component seals as described in the first aspect.
[0023] A fourth aspect of the present invention provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the method for detecting surface defects of automotive component seals as described in the first aspect.
[0024] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows:
[0025] By employing multi-angle image-to-unfolded coordinate system mapping techniques, geometric alignment and comparability of curved targets on a unified plane are achieved. Through joint removal of specular reflection masks, occlusion masks, and blur masks, along with pixel-level weighted fusion techniques, the interference from highlights, occlusion, and defocusing is suppressed, generating a coverage confidence map suitable for decision-making. By using a closed-loop technique for determining and updating supplementary shooting areas based on the coverage confidence map, targeted completion of insufficiently covered areas is achieved. Through convolutional neural network segmentation and package coordinate system measurement techniques, stable extraction of defect boundaries and traceable size measurement are achieved. Finally, through a reliability level output technique driven by the coverage confidence map, interpretable and verifiable detection results are achieved. Attached Figure Description
[0026] Figure 1 A flowchart illustrating a method for detecting surface defects in automotive component seals provided by this invention;
[0027] Figure 2 The present invention provides a structural block diagram of a device for detecting surface defects in automotive parts seals.
[0028] Figure 3 This is a schematic diagram of the structure of a device provided in Embodiment 5 of the present invention. Detailed Implementation
[0029] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0030] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0032] Surface defects refer to localized abnormal appearances and morphological changes formed on the surface of components during processing, handling, assembly, and cleaning. These include discrete defects such as scratches, indentations, cracks, pits, particle adhesion, and coating discontinuities, as well as continuous abnormalities such as uneven surface texture and localized gloss abnormalities. The visual presentation of these defects is often simultaneously affected by the material's reflective properties, the surface geometry, and the direction of incident illumination. The same defect may exhibit boundary drift, contrast reversal, or be masked by highlights under different viewing angles, making it difficult to obtain stable and consistent judgment criteria based solely on a single image. Therefore, visual inspection of surface defects requires establishing a unified, alignable, and fusionable representation among multi-view information, and the ability to assess coverage adequacy and result reliability even in the presence of specular reflection, occlusion, and defocusing interference. This leads to a detection method and device centered on surface unfolding, mask suppression, coverage confidence, and re-enhancing closed-loop technology.
[0033] Please see Figure 1 The method for detecting surface defects of automotive parts seals provided in this embodiment includes steps S11 to S14.
[0034] S11. Obtain camera calibration parameters, establish the mapping relationship between the sealing coordinate system, the unfolding coordinate system, and the multi-angle images to the unfolding coordinate system, and collect multi-angle images of the sealing to form a multi-angle image set.
[0035] The inspection station is equipped with a multi-camera array or a single camera in conjunction with a turntable or robotic arm to achieve imaging of the sealed package from different perspectives. Camera calibration involves capturing multiple frames using a calibration board to determine the focal length, principal point, distortion coefficients, and extrinsic parameters of the camera relative to the fixture, forming the camera calibration parameters. The sealed package coordinate system uses the fixture positioning reference surface and positioning pins to determine the origin and axis, serving as a unified spatial reference for images from various perspectives. The unfolded coordinate system is defined as the coordinates of the sealed package surface after unfolding to a two-dimensional plane. Each unfolded coordinate corresponds to a position on the sealed package surface. An unfolding mapping table can be generated based on the sealed package CAD mesh, or the surface mesh can be reconstructed and unfolded after the initial acquisition through multi-view matching. Based on the camera extrinsic parameters and the unfolding mapping table, the correspondence between multi-angle image pixels and unfolded coordinates is established and stored as lookup table data. Exposure and light source states are synchronously controlled during acquisition to obtain a set of multi-angle images and their acquired metadata.
[0036] Mapping a multi-angle image set to an unfolded coordinate system includes: performing distortion correction on the multi-angle image set based on camera calibration parameters, and performing coordinate transformation and resampling on the multi-angle image set based on the correspondence between the envelope coordinate system and the unfolded coordinate system.
[0037] Before fusion and defect analysis, the multi-angle image set undergoes geometric consistency processing to ensure that the same surface position has consistent coordinates on the unfolding plane from different viewpoints. Distortion correction is performed based on camera calibration parameters. For each pixel in each image, the distortion coefficients are used to restore the distorted pixel coordinates to ideal imaging coordinates, resulting in a distortion-corrected image. After distortion correction, back-projection calculations from image pixels to the package coordinate system are performed using camera extrinsic parameters: for each pixel, a spatial ray originating from the camera's optical center is determined based on the camera imaging model. This ray intersects with the package surface model or the reconstructed surface mesh to obtain the 3D position of the package surface corresponding to that pixel. The 3D position of the package surface is then mapped to the unfolding coordinate position through the correspondence between the package coordinate system and the unfolding coordinate system, thereby establishing the pixel correspondence between the distortion-corrected image and the unfolding plane.
[0038] Coordinate transformation and resampling are performed using the unfolded coordinates as the target grid. Specifically, a corresponding envelope surface position is generated for each target pixel on the unfolded plane, and the sampling position in the distortion-corrected image at each viewpoint is retrieved. When the sampling position falls between pixel grids, bilinear interpolation is used to obtain the grayscale or color value of the unfolded pixel. When the sampling position exceeds the effective range of the viewpoint or falls into an invisible area, the unfolded pixel is recorded as a null value or a default value for subsequent occlusion detection and reshoot decisions. To ensure that edge textures are not overly smoothed, a light edge-preserving filter can be applied to the distortion-corrected image before interpolation, and local sharpening is performed after resampling to suppress the edge softening caused by interpolation.
[0039] To facilitate implementation and accelerate the process, the correspondence between "unfolded coordinates and image sampling coordinates for each viewpoint distortion correction" can be pre-calculated offline as lookup table data. Online, only the sampling coordinates need to be read according to the unfolded pixel index and interpolation sampling needs to be completed, thus meeting the production line cycle time requirements. After distortion correction, coordinate transformation, and resampling, images from different viewpoints are unified to the same unfolded coordinate grid. Subsequent generation of specular reflection masks, occlusion masks, and blur masks, as well as pixel fusion, can all be compared and fused at the same position on the unfolded plane, reducing false differences introduced by perspective differences and lens distortion, and improving the stability of multi-view information convergence and the consistency of defect boundary positioning.
[0040] S12. Map the multi-angle image set to the unfolded coordinate system, and generate a specular reflection mask, an occlusion mask, and a blur mask based on the mapped multi-angle image set. Based on the specular reflection mask, the occlusion mask, and the blur mask, fuse the mapped multi-angle image set to generate an unfolded image and a coverage confidence map.
[0041] After the multi-angle image set is remapped to the unfolded coordinate system, three types of masks and fusion results are generated using the unfolded coordinate system as a unified comparison space. The specular reflection mask detects bright, saturated pixels at the unfolded coordinate positions and confirms this by combining cross-viewpoint brightness abrupt changes, marking the corresponding pixels as specular reflection areas. The occlusion mask statistically analyzes whether there are valid sample values at the unfolded coordinate positions in each viewpoint mapping and combines this with viewpoint visibility judgment, marking locations without valid sample values as occluded areas. The blur mask calculates a sharpness index for each viewpoint mapping map, marking locations with insufficient sharpness as blurry areas. During fusion, candidate pixels not marked by the three types of masks are collected for each unfolded coordinate position, weighted according to sharpness and viewpoint visibility, and a weighted sum is used to obtain the pixel value of the unfolded image. The coverage confidence map records the number of candidate pixels, cumulative weights, and source viewpoint identifiers within the unfolded coordinate system, used to characterize the sufficiency and reliability of coverage at that location, providing a basis for subsequent re-enhancing area determination.
[0042] Generating a specular reflection mask includes: detecting brightness saturation regions in a multi-angle image set, mapping the multi-angle image set to an unfolded coordinate system based on mapping relationships, determining specular reflection regions based on brightness differences at the same unfolded coordinate position, and marking the specular reflection regions as specular reflection masks; generating an occlusion mask includes: mapping the multi-angle image set to an unfolded coordinate system based on mapping relationships, and marking the positions of pixels that have not been mapped as occlusion masks; generating a blur mask includes: evaluating the sharpness of the multi-angle image set to determine low-sharp regions, and marking the low-sharp regions as blur masks.
[0043] After mapping a collection of multi-angle images to an unfolded coordinate system, cross-viewpoint comparisons can be performed on the same surface location on the unfolded plane, thereby generating specular reflection masks, occlusion masks, and blur masks. The generation of the specular reflection mask first involves performing brightness saturation detection on each viewpoint map, marking pixels with brightness close to the sensor's upper limit and exhibiting a sudden increase in local gradient as candidate highlights. Then, using the unfolded coordinate position as an index, the brightness values at the same unfolded coordinate position from multiple viewpoints are aggregated. If a significant brightness difference exists at this position across different viewpoints, and the highlight only appears in some viewpoints, then this position is determined to be a specular reflection area and written into the specular reflection mask. This method utilizes the characteristic that specular reflection changes significantly with the viewing angle, enabling the differentiation between highlights caused by oil films and polishing scratches and real material textures.
[0044] The occlusion mask is generated based on valid sampling information during the mapping process. During mapping, for each unfolded coordinate position, it is recorded whether a valid sampling value is obtained from each viewpoint. If no valid sampling value is obtained from any viewpoint, the unfolded coordinate position is directly marked as an occlusion region. If valid sampling values are missing only in some viewpoints, the missing markers corresponding to the missing viewpoints are recorded as occlusion warning information, which is used to remove candidate pixels from the missing viewpoints during subsequent pixel fusion. This strategy binds occlusion determination to the geometric mapping process, avoiding complex occlusion inference in the original image space and facilitating engineering implementation.
[0045] The generation of the blur mask is based on sharpness evaluation. For each viewpoint map, a sharpness index is calculated within a local window. The sharpness index can be the mean absolute value of the Laplacian operator response or gradient energy. Locations with low sharpness indices are marked as low-sharp regions. To reduce noise-induced false positives, connected component filtering and morphological closing operations are performed on low-sharp regions to obtain spatially continuous blurred regions, which are then written into the blur mask. The blur mask is used to eliminate areas where textures are indistinguishable due to motion jitter, defocusing, or reflections, preventing false defects from forming after fusion.
[0046] After the three types of masks are generated, subsequent pixel fusion only gathers candidate pixels at locations not marked by specular reflection, occlusion, and blurring masks, prioritizing candidate pixels with higher clarity and from effective sampling viewpoints, thereby improving the texture consistency and detectability of the unfolded image. By establishing unified rejection rules for specular reflection, occlusion, and blurring within the unfolded coordinate system, the effective coverage ratio can be increased without increasing hardware complexity, and a direct basis can be provided for determining reshoot areas.
[0047] The multi-angle image set for fusion mapping includes: removing pixels marked by specular reflection masks, occlusion masks, and blur masks in the unfolded coordinate system, determining weighted fusion weights, and weighted fusion of pixels not marked by specular reflection masks, occlusion masks, and blur masks to generate an unfolded image.
[0048] When performing pixel fusion within the unfolded coordinate system, candidate pixels obtained from viewpoint mapping are first aggregated using the unfolded coordinate position as the index. Any position marked as invalid by specular reflection mask, occlusion mask, or blur mask is excluded from the candidate pixel set; simultaneously, positions that did not obtain valid sample values during the mapping process are directly considered invalid. Fusion weights are calculated for the remaining candidate pixels, determined jointly by the sharpness score and the viewpoint quality score: the sharpness score can be obtained from the gradient energy or Laplacian response intensity of the candidate pixel's neighborhood, reflecting the discernibility of texture edges; the viewpoint quality score can be determined by the normalized distance from the candidate pixel's sampling position to the image center, used to suppress unstable textures caused by distortion and vignetting at image edges. After weight normalization, the candidate pixels are weighted and summed to obtain the fused pixel value of the unfolded image at that unfolded coordinate position.
[0049] Weighted fusion can be performed using the following calculation expression:
[0050] To expand the coordinate system position The pixel values of the unfolded image at that location; To expand the coordinate position; The number of perspectives participating in the integration; For the first Each perspective is located at the coordinate position. Candidate pixel values at; For the first Each perspective is located at the coordinate position. The fusion weight at the location; To prevent tiny constants with a denominator of zero.
[0051] To support subsequent re-enhancing image determination, a coverage confidence map is generated simultaneously. This map records the number of valid candidate pixels, the sum of fusion weights, and the source viewpoint identifier with the highest weight at each unfolded coordinate position. When the number of valid candidate pixels is zero or the sum of fusion weights is low, this position appears as an under-covered area in the coverage confidence map. Through the processing chain of "mask culling + weighted fusion + coverage recording," the damage to texture consistency caused by specular reflection, occlusion, and blurring can be suppressed without changing the hardware structure, improving the detectability of the unfolded image and providing a directly executable basis for re-enhancing updates.
[0052] The overlay confidence map includes the source view identifier and pixel confidence of each pixel in the unfolded coordinate system. The pixel confidence is determined based on the labeling results of specular reflection mask, occlusion mask and blur mask.
[0053] The coverage confidence map is used to characterize the available observation sources and confidence levels of each pixel location within the unfolded coordinate system, facilitating subsequent re-enhancing area determination and reliability level assessment. The coverage confidence map contains at least two types of fields: source view identifier and pixel confidence level. The source view identifier records the main contributing viewpoint for fusion corresponding to the unfolded coordinate location, which can be determined by the candidate viewpoint with the highest weight during the weighted fusion process. When multiple valid candidate pixels exist at the unfolded coordinate location and their weights are close, the identifiers of the top two weighted views can also be recorded, facilitating the priority selection of adjacent views during re-enhancing.
[0054] Pixel confidence is determined based on the labeling results of specular reflection masks, occlusion masks, and blurry masks, and is consistent with the rule of "whether a pixel can be used for defect detection". Specifically, at the unfolded coordinate position, if any of the specular reflection mark, occlusion mark, or blurry mark exists, the pixel confidence at that unfolded coordinate position is set to a low confidence state; when none of the three types of masks are labeled and at least one valid candidate pixel exists, the pixel confidence at that unfolded coordinate position is set to a high confidence state. To enhance the differentiation of boundary cases, priorities can be further subdivided within the low confidence state: occlusion mark corresponds to "no usable observation", specular reflection mark corresponds to "observation with high light pollution", and blurry mark corresponds to "observation with insufficient sharpness". These three can trigger different processing rules in the reshoot strategy and reliability output. This subdivision can be achieved by encoding different discrete levels for pixel confidence. The number and values of the encoded levels can be pre-set and fixed into the device configuration according to the production line data quality control requirements.
[0055] The generation of the coverage confidence map and the fusion of the unfolded image are performed simultaneously, avoiding repeated data traversal. For each unfolded coordinate position, it is first determined whether to enter the candidate set based on three types of masks. Then, the source view identifier is determined in the candidate set, and the pixel confidence score is written based on the mask marking result. In this way, the coverage confidence map and the unfolded image are strictly aligned in space. Subsequent extraction of the supplementary imaging area only requires a connected component search on the coverage confidence map to locate the under-covered area. At the same time, the source view identifier can be used to trace the source of the results when outputting the detection results, which is convenient for verification and quality traceability. By directly mapping the mask determination to the pixel confidence score, the coverage confidence map can express the usable observation quality in a simple and interpretable way, enabling the detection device to maintain stable coverage assessment and reliable result expression even when facing specular reflection, occlusion, and blur interference.
[0056] S13. Determine the reshoot area based on the coverage confidence map and acquire reshoot images. Update the unfolded image and coverage confidence map using the reshoot images until the coverage confidence map meets the preset coverage integrity conditions.
[0057] Based on the coverage confidence map, connected regions with low pixel confidence are extracted. A list of replacement areas is generated according to the area and spatial distribution of the connected regions, and a replacement viewing angle is determined for each replacement area. The replacement viewing angle is selected based on the source view identifier and missing view information in the coverage confidence map. The turntable or robotic arm is driven to adjust the package to the corresponding posture, and ring light or side light is switched during the imaging of the replacement area to reduce the impact of highlights. After acquiring the replacement image, distortion correction, unfolding mapping, mask generation, and pixel fusion are performed. Only the unfolded image pixels corresponding to the replacement area are replaced, and the source view identifier and pixel confidence of the coverage confidence map are updated simultaneously. This process is repeated until the proportion of high-confidence pixels in the coverage confidence map is not less than a preset ratio and the area of low-confidence connected regions is not higher than a preset upper limit, thus satisfying the preset coverage integrity condition.
[0058] Determining the reshoot area includes: extracting connected regions in the coverage confidence map whose pixel confidence is lower than the preset pixel confidence condition as the reshoot area, and determining the reshoot observation direction corresponding to the reshoot area based on the envelope coordinate system, the unfolded coordinate system and the mapping relationship. The preset pixel confidence condition is used to characterize the local coverage requirements of the preset coverage integrity condition.
[0059] The re-shooting area is determined within the unfolded coordinate system, using the coverage confidence map as input. Each unfolded coordinate position in the coverage confidence map has a pixel confidence score. When the pixel confidence score is lower than a preset pixel confidence score condition, it indicates that the observation at that position is affected by specular reflection, occlusion, or blurring, making it difficult to use as a stable detection basis. The preset pixel confidence score condition is used to reflect the local requirements of coverage integrity and can form a corresponding relationship with the preset coverage integrity condition. For example, the preset coverage integrity condition requires that the proportion of sufficiently covered areas within the unfolded coordinate system reaches a set target, while the preset pixel confidence score condition is used to determine whether a single position is included in the sufficiently covered area.
[0060] During the extraction of replacement regions, the coverage confidence map is first binarized, and pixels with a confidence level lower than a preset confidence level are marked as insufficiently covered pixels. Then, connected component analysis is performed in the unfolded coordinate system, aggregating spatially adjacent insufficiently covered pixels into connected regions, which are then used as replacement regions. To avoid minor noise triggering replacement, area filtering and boundary smoothing are performed on the connected regions to obtain a stable set of replacement regions. For each replacement region, the geometric center and minimum bounding rectangle in the unfolded coordinate system are calculated for subsequent pose planning.
[0061] The determination of the observation direction for reshooting depends on the envelope coordinate system, the unfolded coordinate system, and the mapping relationship. For several representative points within the reshooting area, the position of the envelope surface and the surface normal direction are calculated based on the correspondence between the unfolded coordinate system and the envelope coordinate system. Combining the camera calibration parameters and the source view identifiers of the existing viewpoints, candidate viewpoints that can form smaller incident angle deviations and have effective sampling are selected as the priority reshooting viewpoints. When the reshooting area is caused by specular reflection, the observation direction is further deflected based on the priority reshooting viewpoint, so that the angle between the camera line of sight and the surface normal avoids the original highlight direction. When the reshooting area is caused by occlusion, the observation direction prioritizes the lateral viewpoint that can improve visibility. When the reshooting area is caused by blurring, the observation direction maintains the original effective viewpoint direction and is combined with shortening the exposure time or increasing the shutter speed to suppress motion blur. After the observation direction for reshooting is determined, it can be directly converted into the turntable angle or the posture of the robotic arm end effector, so that the reshooting image acquisition, unfolding mapping, mask generation, and fusion update form a closed loop, thereby meeting the coverage integrity requirements within a limited number of reshoots.
[0062] Acquiring supplementary images includes: determining the supplementary image acquisition posture sequence based on the supplementary image observation direction, and acquiring supplementary images according to the supplementary image acquisition posture sequence.
[0063] The re-image acquisition takes the re-image observation direction as input, which characterizes the direction of the camera's optical axis in the package coordinate system during imaging. The re-image acquisition posture characterizes the camera's spatial position and orientation relative to the package, and together with the light source's working state, constitutes the imaging conditions for a re-image. The re-image acquisition posture sequence is generated by the posture planning unit: first, the re-image observation direction is converted into the camera target orientation, and combined with the calibration of the camera to the fixture in the package coordinate system, the target pose of the camera in the workstation coordinate system is obtained; when the workstation uses a turntable, the target pose is decomposed into the turntable rotation angle and the camera's fixed posture, resulting in a set of turntable angle sequences; when the workstation uses a robotic arm, the set of joint angles is obtained through inverse kinematics, and the solution with the minimum motion cost is selected from the solution set that satisfies joint limits, velocity constraints, and collision avoidance constraints to form the posture sequence. To suppress local specular occlusion caused by specular reflection, small-angle perturbations are introduced near the target pose, generating multiple adjacent observation postures around the re-image observation direction, and sorting them according to the principle of the shortest displacement between adjacent postures to reduce motion time and positioning error. During data acquisition, the controller sequentially drives the turntable or robotic arm to each posture in the posture sequence. After confirming the correct position via encoder or joint feedback and achieving brief stabilization, the camera is triggered for exposure. Simultaneously, the light source controller switches between ring light, side light, or coaxial light modes to match the reflection characteristics of the re-captured area. Each re-captured image simultaneously records camera exposure parameters, light source status, posture number, and timestamp, serving as metadata for subsequent unfolding, mapping, and fusion updates. By transforming the re-capture observation direction into an executable re-capture posture sequence and implementing position confirmation and light source linkage during acquisition, the effective coverage and texture discernibility of the re-captured area can be improved without adding additional sensors, reducing repeated re-captures caused by highlights, occlusions, and blurring.
[0064] S14. Based on the unfolded image, segment the defect area to obtain the defect boundary. Based on the geometric mapping relationship, reverse map the defect boundary from the unfolded coordinate system to the package coordinate system to obtain the defect location and size measurement results. Based on the coverage confidence map, determine the reliability level and output the detection results including the defect boundary, defect location, size measurement results and reliability level.
[0065] After the unfolded image is generated, defect region segmentation is performed. A trained convolutional neural network can be used to output a defect probability map from the unfolded image. Thresholding and connected component filtering are then applied to the defect probability map to obtain defect regions, and edge extraction is used to obtain defect boundaries. To reduce fragmentation caused by texture noise, opening and closing operations and hole filling can be performed on the defect regions to ensure continuous defect boundaries. Dimensional measurements are performed in the package coordinate system. The pixel points of the defect boundary in the unfolded coordinate system are inverted to their positions on the package surface. The length, width, and area of the defect are calculated, and their position coordinates on the package surface are output. The reliability level is given by the coverage confidence map. The pixel confidence of the defect boundary neighborhood is statistically analyzed. If the defect boundary coverage is sufficient and the source viewpoint consistency is good, it is judged as high reliability; if the defect boundary has insufficient coverage or low-confidence pixel clusters, it is judged as low reliability and a review is prompted. The detection results include defect boundaries, dimensional measurement results, reliability level, and source viewpoint identifiers.
[0066] Defect region segmentation based on unfolded images includes: processing the unfolded image using a convolutional neural network to generate a defect probability map, and extracting defect boundaries based on the defect probability map.
[0067] In one implementation, an image is unwound and input into a convolutional neural network (CNN) to achieve pixel-level defect segmentation. The CNN can employ an encoder-decoder structure. The encoder extracts texture and edge features through multiple convolutions and downsampling, while the decoder restores spatial resolution through upsampling and fuses shallow detail features via skip connections, ensuring that the boundaries of minor scratches, indentations, and dirt remain clear at the output. Before inference, the unwound image undergoes brightness normalization and background suppression to reduce interference from uneven lighting and material textures on segmentation. When the unwound image resolution is large, sliding window cropping and probabilistic fusion in overlapping areas can be used to avoid loss of detail due to excessively large single inputs.
[0068] The convolutional neural network outputs a defect probability map, defined as a single-channel matrix of the same size as the unfolded image. The value at each position in the matrix represents the probability that the position belongs to a defect region. The defect probability map is thresholded to obtain a binary defect mask. Then, isolated noise regions are removed through connected component analysis, and morphological closing operations and hole filling are performed on the defect mask to form continuous defect regions. Defect boundaries are extracted from the processed defect mask. This can be achieved by contour tracking to obtain closed boundary curves, or by using edge operators to calculate the boundary set of the defect mask and smoothing it. To facilitate subsequent size measurement and result traceability, defect boundaries are stored as point sequences in the unfolded coordinate system, retaining the positional probability statistics corresponding to the defect probability map. This information is used to indicate the confidence level of boundaries when low-confidence coverage locations appear. Through these processes, defect regions and boundaries can be stably obtained on the unfolded plane, reducing the impact of material texture, residual highlights, and slight blurring on the segmentation results.
[0069] The reliability level generation process includes: determining the reliability level based on the pixel confidence level of the coverage confidence map and the pixel probability value of the defect probability map, and outputting the source view identifier corresponding to the defect boundary in the detection results.
[0070] The reliability level expresses the credibility of defect detection results in two dimensions: spatial coverage and segmentation confidence. This allows the production line to distinguish between "suspicious results requiring review" and "stable results that can be directly determined." The reliability level is generated using the pixel confidence of the coverage confidence map and the pixel probability values of the defect probability map as input, and statistics are performed around the defect boundary neighborhood. Specifically, a boundary neighborhood band is defined around the defect boundary, and the width of the boundary neighborhood band can be pre-configured based on the unfolded image resolution. Within the boundary neighborhood band, the pixel confidence distribution of the coverage confidence map is extracted, and the proportion of high-confidence pixels and the length of low-confidence connected segments are calculated to determine whether the defect boundary mainly falls within a sufficiently covered area. Simultaneously, within the same boundary neighborhood band, the pixel probability distribution of the defect probability map is extracted, and the average defect probability and minimum defect probability within the boundary neighborhood band are calculated to determine whether there are significant uncertainties in the segmentation results.
[0071] Reliability levels can be implemented using discrete level coding. High reliability corresponds to "the proportion of high-confidence pixels within the boundary neighborhood meets coverage requirements and the overall defect probability is higher than the segmentation stability requirement"; medium reliability corresponds to "coverage meets requirements but the defect probability has local troughs" or "the defect probability is stable but the coverage has small areas of low-confidence segments"; low reliability corresponds to "the existence of continuous low-confidence regions within the boundary neighborhood" or "the overall defect probability is low and fluctuates significantly." This discrete judgment rule can be solidified into configurable thresholds and logical conditions, facilitating engineering implementation under different encapsulation materials and lighting configurations.
[0072] To enable result traceability, the inspection results output source view identifiers corresponding to the defect boundaries. These source view identifiers are derived from the main contributing viewpoints recorded at the defect boundary points in the coverage confidence map. During output, source view identifiers can be written point-by-point into the defect boundary point sequence, or the defect boundaries can be segmented and statistically analyzed to output the main source view identifier for each segment. Using these source view identifiers, reviewers can quickly locate the corresponding area in the original viewpoint image, achieving visual backtracking of defect boundaries. Simultaneously, when the reliability level is low, the source view identifiers and the low-confidence type of the coverage confidence map can trigger re-shooting or manual re-inspection processes, thereby achieving an interpretable quality control closed loop without adding complex model interpretation mechanisms.
[0073] Please see Figure 2This disclosure also provides a detection device for surface defects of automotive parts seals, used to implement a method for detecting surface defects of automotive parts seals. The device includes a calibration acquisition module 21, a mask fusion module 22, a re-shooting and updating module 23, and a detection output module 24.
[0074] The calibration acquisition module 21 is used to acquire camera calibration parameters, establish the mapping relationship between the sealing coordinate system, the unfolding coordinate system and the multi-angle images to the unfolding coordinate system, and acquire multi-angle images of the sealing to form a multi-angle image set.
[0075] The mask fusion module 22 is used to map a set of multi-angle images to an unfolded coordinate system, and generate a specular reflection mask, an occlusion mask and a blur mask based on the mapped set of multi-angle images. The module fuses the mapped set of multi-angle images based on the specular reflection mask, the occlusion mask and the blur mask to generate an unfolded image and an overlay confidence map.
[0076] The reshooting and updating module 23 is used to determine the reshooting area based on the coverage confidence map and acquire reshooting images, and use the reshooting images to update the unfolded image and the coverage confidence map until the coverage confidence map meets the preset coverage integrity conditions.
[0077] The detection output module 24 is used to segment the defect area based on the unfolded image to obtain the defect boundary, and to reverse map the defect boundary from the unfolded coordinate system to the package coordinate system based on the geometric mapping relationship to obtain the defect location and size measurement results; to determine the reliability level based on the coverage confidence map, and to output the detection result including the defect boundary, defect location, size measurement results and reliability level.
[0078] The calibration acquisition module 21 consists of an imaging unit, optical components, calibration reference components, a motion and positioning mechanism, and a synchronous trigger interface in terms of hardware. The imaging unit includes an industrial camera and lens for acquiring calibration images and multi-angle images; the calibration reference components include a checkerboard calibration plate or a high-precision dot array plate for obtaining camera intrinsic parameters, distortion parameters, and extrinsic parameters; the motion and positioning mechanism includes a turntable or robotic arm and its encoder feedback for repeating positioning and recording posture in the package coordinate system; the synchronous trigger interface is used to realize hardware-level linkage of camera exposure, light source on / off, and motion positioning signals, thereby forming a reproducible set of multi-angle images and providing stable input for subsequent coordinate system establishment and mapping relationship calculation.
[0079] The mask fusion module 22 consists of an edge computing unit or industrial computer, an image acquisition card, and high-speed storage. It handles the caching of multiple images, geometric transformation, and pixel-level fusion calculations. The industrial computer or embedded GPU platform executes distortion correction, unfolding mapping, mask generation, and fusion algorithms. The image acquisition card or gigabit Ethernet port is used for data access from multiple cameras or high-speed cameras. High-speed solid-state storage is used to save the original viewpoint images, mapped images, and intermediate mask results, ensuring that backtracking and verification are still possible even under production line cycle times. The hardware configuration of this module focuses on bandwidth and computing power matching to ensure that the fusion output in the unfolded coordinate system and the generation of the coverage confidence map can be completed within a single-piece inspection cycle.
[0080] The supplementary imaging module 23 consists of a motion actuator, an attitude controller, a light source controller, and a supplementary imaging triggering link in hardware. Its purpose is to perform directional supplementary imaging for areas with insufficient coverage. The motion actuator can be a turntable or a robotic arm, used to adjust the package to the attitude corresponding to the supplementary imaging observation direction; the attitude controller receives the planning results of the supplementary imaging area and the observation direction, outputs the motion trajectory, and provides a positioning confirmation signal; the light source controller is used to switch the working mode of ring light, side light, or coaxial light during supplementary imaging to reduce highlights or enhance texture; the supplementary imaging triggering link binds the positioning signal to the camera trigger, ensuring a one-to-one correspondence between the supplementary image and the attitude information, thereby supporting iterative updates of the unfolded image and the coverage confidence map until the coverage integrity requirements are met.
[0081] The detection output module 24 consists of an inference computing unit, a result visualization and communication interface, and a measurement reference association unit in hardware. It is used to complete defect segmentation, dimensional measurement, and result publication. The inference computing unit can be a GPU industrial computer or an edge device with an AI accelerator. It is used to execute convolutional neural network inference and output defect probability maps and defect boundaries. The measurement reference association unit uses the previous calibration and attitude recording to back-calculate the unfolded coordinate position to the package coordinate system to realize dimensional measurement and position annotation. The communication interface includes Ethernet, IO, or fieldbus. It is used to output defect category, size, location, and reliability level to the production line MES or PLC. It can be optionally equipped with a display terminal to overlay and display defect boundaries, source view identification, and coverage confidence information to support online judgment and offline verification.
[0082] Based on the technical solution of the above embodiments, the mask fusion module 22 is specifically used to: perform distortion correction on the multi-angle image set based on the camera calibration parameters, and perform coordinate transformation and resampling on the multi-angle image set based on the correspondence between the envelope coordinate system and the unfolded coordinate system.
[0083] The mask fusion module 22 is specifically used for: detecting brightness saturation regions in the multi-angle image set, mapping the multi-angle image set to the unfolded coordinate system based on the mapping relationship, determining specular reflection regions based on brightness differences at the same unfolded coordinate position, and marking the specular reflection regions as the specular reflection mask; mapping the multi-angle image set to the unfolded coordinate system based on the mapping relationship, marking the positions of pixels without mapping as the occlusion mask; and evaluating the sharpness of the multi-angle image set to determine low-sharp regions, and marking the low-sharp regions as the blur mask.
[0084] The mask fusion module 22 is further configured to: remove pixels marked by the specular reflection mask, the occlusion mask and the blur mask in the unfolded coordinate system, determine the weighted fusion weight, and perform weighted fusion on the pixels not marked by the specular reflection mask, the occlusion mask and the blur mask to generate the unfolded image.
[0085] The overlay confidence map includes the source view identifier and pixel confidence score for each pixel in the unfolded coordinate system. The pixel confidence score is determined based on the labeling results of the specular reflection mask, the occlusion mask, and the blur mask.
[0086] The supplementary shooting update module 23 is specifically used to: extract connected regions in the coverage confidence map where the pixel confidence is lower than the preset pixel confidence condition as the supplementary shooting region, and determine the supplementary shooting observation direction corresponding to the supplementary shooting region based on the envelope coordinate system, the unfolded coordinate system and the mapping relationship, wherein the preset pixel confidence condition is used to characterize the local coverage requirement of the preset coverage integrity condition.
[0087] The reshooting update module 23 is also used to: determine the reshooting acquisition posture sequence based on the reshooting observation direction, and acquire the reshooting image according to the reshooting acquisition posture sequence.
[0088] The detection output module 24 is further configured to: perform convolutional neural network processing on the unfolded image to generate a defect probability map, and extract defect boundaries based on the defect probability map; and determine the reliability level based on the pixel confidence of the coverage confidence map and the pixel probability value of the defect probability map, and output the source view identifier corresponding to the defect boundary in the detection result.
[0089] The detection device for surface defects of automotive parts seals provided in this embodiment of the invention can execute the detection method for surface defects of automotive parts seals provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0090] Figure 3 This is a schematic diagram of the structure of a device provided in Embodiment 5 of the present invention, as shown below. Figure 3 As shown, the device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the device can be one or more. Figure 3 Taking a processor 70 as an example; the processor 70, memory 71, input device 72, and output device 73 in the device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0091] The memory 71, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for detecting surface defects in automotive component seals in this embodiment of the invention. The processor 70 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 71, thereby realizing the aforementioned method for detecting surface defects in automotive component seals.
[0092] The memory 71 may primarily include a program storage area and a data storage area. The program storage area may store application programs required for operating the device and at least one function; the data storage area may store data created based on the use of the terminal. Furthermore, the memory 71 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 71 may further include memory remotely located relative to the processor 70, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0093] Input device 72 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 73 may include display devices such as a display screen.
[0094] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a method for detecting surface defects in automotive component seals.
[0095] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the method for detecting surface defects of automotive parts provided in any embodiment of the present invention.
[0096] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0097] It is worth noting that in the embodiments of the multidimensional data stream processing device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0098] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for detecting surface defects in automotive component seals, characterized in that, Includes the following steps: Obtain camera calibration parameters, establish the mapping relationship between the sealed coordinate system, the unfolded coordinate system, and the multi-angle images to the unfolded coordinate system, and collect multi-angle images of the sealed document to form a multi-angle image set; A multi-angle image set is mapped to an unfolded coordinate system, and a specular reflection mask, an occlusion mask, and a blur mask are generated based on the mapped multi-angle image set. The mapped multi-angle image set is then fused based on the specular reflection mask, the occlusion mask, and the blur mask to generate an unfolded image and a coverage confidence map. Based on the coverage confidence map, the reshoot area is determined and reshoot images are acquired. The reshoot images are then used to update the unfolded image and the coverage confidence map until the coverage confidence map meets the preset coverage integrity condition. Based on the unfolded image, the defect region is segmented to obtain the defect boundary. Based on the geometric mapping relationship, the defect boundary is reverse-mapped from the unfolded coordinate system to the package coordinate system to obtain the defect location and size measurement results. Based on the coverage confidence map, the reliability level is determined, and the detection result including the defect boundary, defect location, size measurement results and reliability level is output.
2. The method of claim 1, wherein, The step of mapping the multi-angle image set to the unfolded coordinate system includes: Distortion correction is performed on the multi-angle image set based on the camera calibration parameters, and coordinate transformation and resampling are performed on the multi-angle image set based on the correspondence between the envelope coordinate system and the unfolded coordinate system.
3. The method of claim 1, wherein, The generation of specular reflection masks, occlusion masks, and blur masks based on the mapping-based multi-angle image set includes: Brightness saturation region detection is performed on the multi-angle image set, and the multi-angle image set is mapped to the unfolded coordinate system based on the mapping relationship. Then, the specular reflection region is determined according to the brightness difference at the same unfolded coordinate position, and the specular reflection region is marked as the specular reflection mask. After mapping the multi-angle image set to the unfolded coordinate system based on the mapping relationship, the positions of pixels that have not been mapped are marked as the occlusion mask; The sharpness of the multi-angle image set is evaluated to identify low-resolution regions, and these low-resolution regions are marked as the blur mask.
4. The method of claim 1, wherein, The multi-angle image set based on the fusion of the specular reflection mask, the occlusion mask, and the blur mask includes: Within the unfolded coordinate system, pixels marked by the specular reflection mask, the occlusion mask, and the blur mask are removed. Weighted fusion weights are determined, and pixels not marked by the specular reflection mask, the occlusion mask, and the blur mask are weighted and fused to generate the unfolded image.
5. The method of claim 4, wherein, The coverage confidence map includes the source view identifier and pixel confidence score of each pixel in the unfolded coordinate system. The pixel confidence score is determined based on the marking results of the specular reflection mask, the occlusion mask, and the blur mask. The determination of the reshoot area based on the coverage confidence map includes: In the coverage confidence map, connected regions with pixel confidence scores lower than a preset pixel confidence score condition are extracted as the reshoot regions. The reshoot observation direction corresponding to the reshoot regions is determined based on the envelope coordinate system, the unfolded coordinate system, and the mapping relationship. The preset pixel confidence score condition is used to characterize the local coverage requirements of the preset coverage integrity condition.
6. The method of claim 5, wherein, Acquiring the retaken images includes: The reshooting posture sequence is determined based on the reshooting observation direction, and the reshooting images are acquired according to the reshooting posture sequence.
7. The method of claim 5, wherein, The step of segmenting the defect region based on the unfolded image to obtain the defect boundary includes: The unfolded image is processed by a convolutional neural network to generate a defect probability map, and defect boundaries are extracted based on the defect probability map; The process of determining the reliability level based on the coverage confidence map includes: The reliability level is determined based on the pixel confidence level of the coverage confidence map and the pixel probability value of the defect probability map, and the source view identifier corresponding to the defect boundary is output in the detection result.
8. An apparatus for detecting surface defects of an automobile part package, for carrying out the method for detecting surface defects of an automobile part package according to any one of claims 1 to 8, characterized by The device includes: The calibration acquisition module is used to acquire camera calibration parameters, establish the mapping relationship between the sealed coordinate system, the unfolded coordinate system and the multi-angle images to the unfolded coordinate system, and acquire multi-angle images of the sealed document to form a multi-angle image set. The mask fusion module is used to map a set of multi-angle images to an unfolded coordinate system, and generate a specular reflection mask, an occlusion mask and a blur mask based on the mapped set of multi-angle images. The module fuses the mapped set of multi-angle images based on the specular reflection mask, the occlusion mask and the blur mask to generate an unfolded image and a coverage confidence map. The reshooting and updating module is used to determine the reshooting area based on the coverage confidence map and acquire reshooting images, and use the reshooting images to update the unfolded image and the coverage confidence map until the coverage confidence map meets the preset coverage integrity condition; The detection output module is used to segment the defect area based on the unfolded image to obtain the defect boundary, and to reverse map the defect boundary from the unfolded coordinate system to the package coordinate system based on the geometric mapping relationship to obtain the defect location and size measurement results; to determine the reliability level based on the coverage confidence map, and to output the detection result including the defect boundary, defect location, size measurement results and reliability level.
9. An apparatus, comprising: The device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting surface defects of automotive component seals as described in any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the method for detecting surface defects of automotive component seals as described in any one of claims 1-7.