An automotive casting defect detection system and method
Patent Information
- Application Number
- CN202611138015.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]为解决上述现有技术依赖刚性射线扫描与二维静态阈值分割,无法自适应复杂金属表面的高频反光干扰与三维形态畸变,导致缺陷深度特征丢失并引发较高误报与漏检的技术问题,本发明在如下的多个方面中提供方案
[0010]本发明通过执行多视角随形贴合扫描与多模态传感器同步触发,有效克服了传统固定相机在复杂深腔结构中容易产生视觉盲区的局限。该操作在物理源头保证了二维表面纹理与三维空间深度的同步获取,为后续的跨模态特征融合与缺陷精确剥离提供了无遮挡的底层基础数据支持。
Smart Images

Figure CN123008795A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive casting defect detection technology. More specifically, this invention relates to an automotive casting defect detection system and method. Background Technology
[0002] In modern automotive manufacturing, the quality of core castings such as the chassis and rear compartment directly determines the safety performance and mechanical load-bearing capacity of the entire vehicle. With the rapid development of lightweighting and integrated die-casting processes, castings are becoming increasingly large in size and have complex spatial curved surface structures. Accurate, high-speed automated non-destructive testing of defects such as porosity, sand holes, cracks, and internal shrinkage cavities on the surface of these large and complex castings is a core means to prevent defective parts from flowing into downstream assembly lines and to avoid catastrophic fracture accidents. To ensure the effectiveness of the defect detection system, it is necessary to achieve multi-dimensional digital reconstruction of the complex curved surface casting morphology, dynamic stripping of high-frequency reflective noise, and closed-loop quantitative assessment of the severity of defect morphology.
[0003] In related technologies, for example, Chinese patent document CN218824014U discloses a defect detection device for automotive rear compartment castings. This device involves constructing a lead-lined inspection chamber in a workshop, using a mechanical mechanism to feed the casting into the chamber, and then scanning and imaging the casting using a C-arm equipped with an X-ray source. Another conventional approach relies on immersing the casting in a fluorescent penetrating solution, followed by irradiation with ultraviolet light and threshold segmentation and template matching using a fixed-view 2D industrial camera. Under ideal offline static sampling conditions, these solutions can achieve two-dimensional defect determination for some standard castings.
[0004] However, analysis of the performance of existing technologies under complex industrial production line conditions reveals that this configuration, which relies on heavy-duty radiation protection or chemical penetrant testing combined with two-dimensional vision, suffers from inflexible adaptation failures and three-dimensional feature distortion. Firstly, X-ray lead-lined inspection is subject to radiation safety constraints, and the relatively rigid physical trajectory of large C-arms easily creates blind spots in irregularly shaped deep cavities such as car trunks, leading to slow inspection cycles. Furthermore, traditional two-dimensional vision algorithms for fluorescent liquid penetrant testing are prone to falling into a fixed-constant trap when dealing with strong reflective spots on metal casting surfaces, differences in machining roughness, and factory markings. Two-dimensional images cannot capture the depth and volume information of defects, causing the system to misjudge harmless surface watermarks or legitimate characters as cracks, or miss deep, hidden micro-shrinkage cavities. Secondly, the severity of actual casting defects exhibits a non-linear evolution; the lethality of pores of the same size appearing in non-stressed areas is drastically different from that in high-stress load-bearing areas. Existing technologies use a single, fixed geometric size threshold as the criterion for scrapping, lacking a joint closed-loop optimization of the spatial distortion morphology of defects and the global stress thermogram of castings. This results in the detection system often being in an unbalanced state of high false alarm rate or missed detection of fatal defects, failing to meet the requirements of the modern automotive industry for high cycle time, zero missed detection, and intelligent flexible sorting. Summary of the Invention
[0005] To address the technical problem that existing technologies rely on rigid X-ray scanning and two-dimensional static threshold segmentation, which cannot adapt to high-frequency reflection interference and three-dimensional morphological distortion on complex metal surfaces, resulting in the loss of defect depth features and causing high false alarms and missed detections, this invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides a method for detecting defects in automotive castings, comprising: S1: Import the standard 3D model of the casting and the stress distribution cloud map of the casting, and extract the theoretical contour features of the casting; S2: Perform multi-view conformal scanning on the theoretical contour features of the casting, and collect the 2D texture sequence and the measured 3D point cloud of the casting; Based on the 2D texture sequence and the measured 3D point cloud of the casting, obtain the multimodal feature matrix of the casting; Combine the pixel brightness features in the 2D texture sequence of the casting to obtain the reflection noise suppression weight; S3: Based on the theoretical contour features and the measured 3D point cloud of the casting, perform rigid registration and Boolean difference stripping to obtain the casting purity. Defect point cloud: Extract the measured volume of the casting defect, the inward penetration depth of the defect, and the opening area of the defect surface from the pure defect point cloud of the casting, and calculate the three-dimensional distortion index of the defect; Perform multi-scale feature fusion inference based on the multi-modal feature matrix of the casting and the reflection noise suppression weight to obtain the casting defect confidence level; S4: Based on the mechanical sensitivity of the defect spatial coordinates in the stress distribution cloud map of the casting, perform nonlinear integration based on the local stress load weight, the casting defect confidence level, and the three-dimensional distortion index of the defect to obtain the casting damage index and output the sorting control signal.
[0007] By collecting cross-modal data of 3D point clouds and 2D textures, and combining the computing power model to calculate the optical reflection noise suppression weight, the high-frequency reflection noise interference on the surface of complex metal castings is effectively eliminated from the underlying physical optics level. Secondly, the present invention performs spatial rigid registration and Boolean difference between the scanned data and the theoretical model, and performs pixel-level separation of the factory characters that are easily confused with real defects and the conventional rough structure, extracting a pure 3D defect point cloud. Finally, by constructing a 3D distortion index of defects that includes defect volume and inward penetration depth, and performing nonlinear fusion optimization with deep learning confidence and casting stress distribution cloud map, the fixed logic of a single size threshold determining scrapping is broken.
[0008] Preferably, the theoretical contour features of the casting are extracted, including: Import the standard 3D model of the automobile chassis casting to be tested, and simultaneously extract the corresponding casting stress distribution cloud map from the finite element analysis database; call the 3D mesh analysis algorithm to extract the triangular facet normal vectors and vertex coordinates of the surface of the standard 3D model of the casting; based on the triangular facet normal vectors and vertex coordinates of the surface of the standard 3D model of the casting, construct the theoretical contour features of the casting that characterize the ideal appearance of the casting.
[0009] Preferably, the acquisition of the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting includes: Based on the theoretical contour features of the casting, a multi-view conformal fitting scan is performed to generate a conformal scanning trajectory for the robotic arm. The flexible detection robotic arm is driven to run along the conformal scanning trajectory, and the multi-frequency polarization camera and three-dimensional structured light scanner mounted at the end are triggered simultaneously to collect the two-dimensional texture sequence of the casting, as well as the measured three-dimensional point cloud of the casting generated by the structured light calculation.
[0010] This invention effectively overcomes the limitation of traditional fixed cameras in complex deep cavity structures by performing multi-view conformal scanning and synchronous triggering with multimodal sensors, thus avoiding visual blind spots. This operation ensures the synchronous acquisition of two-dimensional surface texture and three-dimensional spatial depth at the physical source, providing unobstructed underlying data support for subsequent cross-modal feature fusion and precise defect removal.
[0011] Preferably, obtaining the multimodal feature matrix of the casting includes: Extract the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting, perform a cross-modal space mapping and alignment algorithm, transform and map the obtained two-dimensional pixel coordinates, and append them to the three-dimensional space vertex attributes to perform data stitching, and output a multimodal feature matrix of the casting containing color channels and spatial coordinates.
[0012] This invention effectively breaks down the data isolation between heterogeneous sensors by executing a cross-modal spatial mapping alignment algorithm to fuse independent two-dimensional pixel features into three-dimensional vertex attributes. This operation enables the system to simultaneously evaluate shallow color gradient anomalies and deep volume distortions at the same physical coordinate point, solving the problem of missed detection of complex defects that can easily occur when analyzing single-modal data in isolation, and improving the information dimensionality of the feature matrix.
[0013] Preferably, obtaining the reflective noise suppression weights includes: The average brightness of local pixels is extracted from the two-dimensional texture sequence of the casting as the local reference scattered light intensity, and the standard deviation of the brightness of local pixels is extracted as the local high-frequency reflection deviation. At the same time, the surface roughness of the casting, which reflects the surface unevenness, is extracted from the measured three-dimensional point cloud of the casting. Based on the local reference scattered light intensity, the local high-frequency reflection deviation and the surface roughness of the casting, adaptive optical noise reduction normalization is performed to obtain the reflection noise suppression weight.
[0014] This invention combines local scattered light intensity, reflection deviation, and surface roughness to obtain a reflection noise suppression weight, constructing a dynamic penalty mechanism that fluctuates with light intensity at the underlying physical optics level. This operation effectively identifies and suppresses specular reflection artifacts caused by metal cutting surfaces or processing oil stains, eliminates optical noise pollution caused by abrupt changes in highlight edges, and prevents false alarms that are easily generated by traditional fixed brightness threshold segmentation in metal surface detection.
[0015] Preferably, obtaining a pure defect point cloud of the casting includes: Perform spatial rigid registration, and rotate and translate the measured 3D point cloud of the casting in a six-degree-of-freedom space to approximate the theoretical contour features of the casting. After the registration error converges, perform 3D Boolean difference stripping on the two to filter out the overlapping legal geometric structures and output the pure defect point cloud of the casting with the remaining abnormal protrusions or depressions.
[0016] This invention performs spatial rigid registration and three-dimensional Boolean difference stripping to accurately remove legitimate geometric topologies that conform to the design intent within the spatial domain. This operation effectively eliminates geometric interference caused by conventional structural undulations such as factory characters and processing textures, and extracts topological residuals that characterize anomalies. While compressing the search space for subsequent computing power, it also reduces the engineering judgment bias of misjudging normal structural protrusions as dangerous bulges.
[0017] Preferably, the calculation of the three-dimensional distortion index of the defect includes: Based on the pure defect point cloud of the casting, the measured volume of the casting defect, the inward penetration depth of the defect, and the opening area of the defect surface are extracted by three-dimensional volume integration and spatial geometric projection, respectively. Based on the above three, a three-dimensional geometric morphology risk amplification algorithm is executed to calculate the three-dimensional distortion index of the defect.
[0018] Preferably, obtaining the confidence level of casting defects includes: The deep learning inference engine deployed on the main control device is invoked to extract the multimodal feature matrix of the casting, the reflection noise suppression weight, and the pure defect point cloud of the casting. The multi-scale feature fusion neural network algorithm is executed, and the reflection noise suppression weight is injected into the network as an attention penalty layer to perform dimensionality reduction suppression on the high reflection area. The pure point cloud is combined to perform multi-level extraction and inference, and output the casting defect confidence for the suspected defect area.
[0019] Preferably, obtaining the casting damage index and outputting a sorting control signal includes: Extract the casting stress distribution cloud map, and query the local stress load weight corresponding to the defect in the casting stress distribution cloud map based on the defect spatial coordinates; extract the casting defect confidence level and the defect three-dimensional distortion index; call the multi-dimensional risk nonlinear penalty operator, and perform nonlinear integration using the local stress load weight, casting defect confidence level, and defect three-dimensional distortion index to output the casting damage index; extract the casting damage index and the pre-acquired heavy scrap warning threshold. When the casting damage index is greater than or equal to the heavy scrap warning threshold, it is marked as an irreparable scrap and a rejection command is sent to the back-end material handling robot arm. When the casting damage index is lower than the heavy scrap warning threshold, a closed-loop sorting control signal is finally output to guide the physical actions of the automated production line on site.
[0020] Secondly, the present invention provides an automotive casting defect detection system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned automotive casting defect detection method is implemented.
[0021] By adopting the above technical solution, a computer program for detecting defects in automotive castings is generated and stored in a memory, so that it can be loaded and executed by a processor. A terminal device can then be made based on the memory and processor for convenient use.
[0022] The beneficial effects of this invention are as follows: It breaks through the engineering limitations of traditional automotive casting defect detection, which heavily relies on manual lighting and single-modal judgment, and constructs a full-lifecycle intelligent detection and closed-loop sorting system covering multimodal spatial data acquisition and storage, adaptive reduction of reflective noise, three-dimensional morphological differential stripping, and global stress joint optimization. In the early stage of production line deployment, this invention relies on the dual guarantee of flexible robotic arms and multimodal alignment algorithms to endow the vision system with strong adaptive fitting scanning capabilities for irregular curved surfaces and high anti-reflective toughness against metals, avoiding the high costs associated with building large lead rooms. During the automated production line operation, this invention changes the fixed geometric size one-size-fits-all filtering mode, and through depth monitoring and extraction of the morphological distortion index of three-dimensional defects in the depth dimension, and combined with the physical stress distribution of the casting for secondary evaluation, it accurately captures high-risk fatal defects that cause internal deep stress concentration even with tiny openings. This not only intercepts potential fracture hazards in the downstream assembly process, but also achieves, on a macro level, the anti-false alarm characteristics of automotive casting inspection under the interference of complex high reflective surfaces and the reliable interception of fatal shrinkage cavities in irregular deep cavity structures. The unity of these two opposing mechanical and optical requirements lays a solid foundation for the underlying safety of modern automotive lightweight manufacturing. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating a method for detecting defects in automotive castings according to the present invention; Figure 2 This is a schematic illustration. Detailed Implementation
[0024] This invention discloses a method for detecting defects in automotive castings, referring to... Figure 1 This includes steps S1-S4: S1: Extract the theoretical contour features of the casting.
[0025] It is important to note that in the automated defect detection of complex automotive castings, establishing an accurate spatial digital reference is a fundamental prerequisite for subsequent morphological comparison. Without a standard theoretical reference system, the system will be unable to distinguish normal design features such as flange holes and stiffeners from actual material defects. Traditional detection methods often rely on comparison with standard parts or manual framing of areas. These methods lack rigorous three-dimensional topological mathematical definitions. When faced with minute machining tolerances or complex free-form surfaces, standard parts are prone to mechanical alignment errors, causing the system to misjudge normal structural fluctuations as geometric anomalies. This invention directly introduces the three-dimensional standard model and force cloud diagram from the design stage. By extracting theoretical spatial contour features based on the normal vectors of triangular facets and vertex coordinates, the system constructs an ideal mathematical reference base in digital space, effectively avoiding physical deformation errors in entity comparison. As the initialization stage of the entire defect detection process, this invention lays the foundation for the spatial coordinate system. Its output theoretical contour provides rigidly constrained comparison anchor points for subsequent Boolean difference stripping operations, ensuring that the spatial registration algorithm has theoretically accurate target parameters.
[0026] Specifically, the standard 3D model of the casting and the stress distribution cloud map of the casting are imported to extract the theoretical contour features of the casting, including: Import the standard 3D model of the automobile chassis casting to be tested, and simultaneously extract the corresponding casting stress distribution cloud map from the finite element analysis database; call the 3D mesh analysis algorithm to extract the triangular facet normal vectors and vertex coordinates of the surface of the standard 3D model of the casting; based on the triangular facet normal vectors and vertex coordinates of the surface of the standard 3D model of the casting, construct the theoretical contour features of the casting that characterize the ideal appearance of the casting.
[0027] It should be noted that the standard 3D model of the casting refers to the ideal digital 3D solid file generated during the design phase of the casting; the stress distribution cloud map of the casting characterizes the degree of structural stress concentration in each region when the casting is subjected to the rated load of the whole vehicle; the theoretical contour features of the casting characterize the ideal surface geometry topology without any machining errors, porosity, or cracks, and extracting these features aims to provide rigid comparison anchors for subsequent defect difference calculations. The 3D mesh analysis algorithm can be summarized at the operational level as a 3D spatial geometric feature extraction algorithm. In this invention, it can specifically adopt a topology traversal extraction algorithm based on the Half-Edge data structure. Executing this algorithm aims to extract the basic normal vectors and coordinate boundaries of the 3D mesh surface, providing a spatial reference.
[0028] Thus, the theoretical profile features of the casting, which characterize the ideal appearance of the casting, were obtained.
[0029] S2: Obtain the weight for suppressing reflective noise.
[0030] It should be noted that large castings such as automobile chassis possess complex spatial topologies, including deep cavities, chamfers, and intersecting surfaces, posing significant hardware challenges in acquiring high-fidelity surface morphology data. Conventional visual inspection systems typically employ fixed-position industrial cameras or rigid single-axis slides. Such hardware layouts are limited by fixed viewing angles and depths of field, failing to penetrate the complex internal cavities of the casting or conform to undulating contours, thus creating blind spots. Furthermore, they often only acquire two-dimensional images, losing the depth information needed to assess volumetric defects. This invention utilizes a multi-degree-of-freedom flexible robotic arm equipped with multi-modal sensors to perform multi-view conformal scanning. Guided by the theoretical contour features of the casting, the robotic arm dynamically adjusts its posture to remain perpendicular to the normal of the casting surface, effectively breaking the spatial field-of-view constraints of fixed cameras. By simultaneously acquiring two-dimensional textures and three-dimensional point clouds, it achieves blind-spot-free capture of full-spectrum morphological data.
[0031] Specifically, multi-view conformal scanning is performed on the theoretical contour features of the casting to acquire the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting, including: Based on the theoretical contour features of the casting, a multi-view conformal fitting scan is performed to generate a conformal scanning trajectory for the robotic arm. The flexible detection robotic arm is driven to run along the conformal scanning trajectory, and the multi-frequency polarization camera and three-dimensional structured light scanner mounted at the end are triggered simultaneously to collect the two-dimensional texture sequence of the casting, as well as the measured three-dimensional point cloud of the casting generated by the structured light calculation.
[0032] It should be noted that the two-dimensional texture sequence of the casting refers to a set of surface grayscale and color distribution images continuously captured under polarized light source illumination; the measured three-dimensional point cloud of the casting refers to a set of discrete sampling points containing absolute spatial XYZ coordinates. In this invention, the multi-view conformal fitting scan can specifically employ a six-axis spatial envelope difference interpolation algorithm based on normal vector constraints. This algorithm aims to guide the flexible robotic arm to maintain an optical detection posture perpendicular to the normal of the complex curved surface of the casting, eliminating the deep cavity detection blind zone from a physical source. The multi-view conformal fitting scan uses 16 evenly distributed viewpoints, with an interval of 22.5° between adjacent viewpoints, and a scanning distance of... The scanning step size is 5mm to ensure that the entire surface of the casting is covered without blind spots, and the point cloud density reaches 100 points / mm². The multi-frequency polarization camera and the 3D structured light scanner are synchronously triggered by hardware with a time difference of less than 1ms, ensuring that the 2D texture and 3D point cloud correspond accurately at the same physical moment.
[0033] Thus, the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting were obtained.
[0034] It should be noted that real casting defects exhibit polymorphism in the physical dimension. Shallow cracks have strong color gradient changes but lack depth, while deep shrinkage cavities, accompanied by large volume defects, may not have obvious color differences. Isolated analysis of single-modal data will lead to the omission of defect features. Traditional detection architectures generally place 2D images and 3D point clouds in parallel independent processing streams. This isolated processing mechanism cannot perform feature-level fusion of planar texture anomalies and spatial depth distortions under the same physical coordinate system. The system cannot collaboratively utilize the complementary advantages of heterogeneous sensors, and is prone to missed detection when facing complex multidimensional defects. This invention implements a cross-modal spatial mapping alignment algorithm. By calling the calibration matrix to perform spatial projection transformation on the 2D pixel coordinates, the system constructs a unified multimodal feature matrix that has both depth parameters and color attributes at any discrete spatial coordinate point. This breaks the data isolation between heterogeneous sensors and realizes the full-dimensional characterization of physical anomalies.
[0035] Preferably, based on the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting, a multimodal feature matrix of the casting is obtained, including: Extract the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting, perform a cross-modal space mapping and alignment algorithm, transform and map the obtained two-dimensional pixel coordinates, and append them to the three-dimensional space vertex attributes to perform data stitching, and output a multimodal feature matrix of the casting containing color channels and spatial coordinates.
[0036] It should be noted that the multimodal feature matrix of the casting represents a composite tensor matrix that simultaneously possesses depth indentation and color gradient features at the same physical coordinate point. The purpose of constructing this matrix is to break the information silos of a single sensor. In this invention, the cross-modal space mapping alignment algorithm can specifically adopt the RGB-D pixel-level spatial stitching algorithm based on the rigid body transformation matrix. The execution of this algorithm aims to align the optical distortion of the two-dimensional plane with the volume distortion of the three-dimensional space in the physical coordinate system. The cross-modal space mapping uses Zhang's calibration method to obtain the extrinsic parameter matrix of the multi-frequency polarization camera and the three-dimensional structured light scanner. The calibration is completed through a 12×9 checkerboard calibration board, and the calibration error is less than 0.05 pixels, ensuring the accurate alignment of the two-dimensional texture and the three-dimensional point cloud.
[0037] Thus, the multimodal feature matrix of the casting was obtained.
[0038] It should be noted that after metal castings undergo cutting or grinding processes, uneven diffuse and specular reflections occur on the surface. These high-intensity localized reflective spots create significant abrupt edge noise in the visual system, interfering with the feature extraction of real defect edges. Traditional image processing techniques often use global brightness threshold truncation or simple morphological opening and closing operations to handle reflections. Such static linear mechanisms are relatively fragile and often fail to effectively suppress localized high highlights, or they may erase real micro-defects in the high-brightness areas while suppressing highlights, leading to false alarms on normal metal surfaces. This invention constructs a penalty mechanism that dynamically responds to light intensity fluctuations by calculating the constraint relationship between local reference scattered light intensity, high-frequency reflective deviation, and surface roughness, distinguishing between real defects that absorb light and optical artifacts that cause specular reflection. As a protective barrier focused on filtering optical noise, this invention processes texture and point cloud data collected from the front end. The calculated reflective noise suppression weights serve as a directional damping factor, injected into the subsequent deep learning network as an attention penalty layer, prompting computational resources to shield non-defective high-brightness interference areas and preventing the spread of low-level optical noise to high-level logical reasoning.
[0039] Preferably, the reflective noise suppression weights are obtained by combining the pixel brightness features in the two-dimensional texture sequence of the casting, including: The average brightness of local pixels is extracted from the two-dimensional texture sequence of the casting as the local reference scattered light intensity, and the standard deviation of the brightness of local pixels is extracted as the local high-frequency reflection deviation. At the same time, the surface roughness of the casting, which reflects the surface unevenness, is extracted from the measured three-dimensional point cloud of the casting. Based on the local reference scattered light intensity, the local high-frequency reflection deviation and the surface roughness of the casting, adaptive optical noise reduction normalization is performed to obtain the reflection noise suppression weight.
[0040] It should be noted that the term "local" refers to the spherical envelope space of the object's nearest neighbor region, centered on a specific spatial sampling point and divided according to a set spatial radius in the three-dimensional point cloud. The surface roughness of the casting refers to the roughness of the micro-morphology quantitatively characterized by the calculation of the root mean square deviation of the orthogonal perpendicular distances from all discrete points in the spatial neighborhood to the reference fitting plane within the spherical envelope space of the object's nearest neighbor region, constructed using a least squares plane fitting algorithm. Existing technologies typically rely solely on the grayscale frequency changes of two-dimensional images to indirectly derive roughness, which is easily distorted by surface cutting oil stains or high-gloss residues. This invention directly calculates the point-surface residuals from the three-dimensional space of the object, eliminating the interference of optical artifacts. The reflective noise suppression weight represents the probability that the system determines the current local area to be a non-real defect, i.e., pure metal reflection. The calculation of this weight aims to provide attention bias for subsequent deep learning networks. The underlying computational logic involves constructing a dynamic penalty mechanism based on local light intensity fluctuation feedback. During computation, the algorithm uses the local baseline scattered light intensity as the numerator and the product of the local high-frequency reflection deviation and the surface roughness of the casting as the suppression denominator. When significant specular reflection occurs in a localized area of the casting due to processing oil or metal cutting surfaces, the light intensity deviation surges, causing a significant expansion of the denominator, ultimately lowering and converging the output suppression weight. Conversely, within actual roughness defects, light is absorbed, the reflection deviation is minimal, and the denominator approaches the compensation value of the underlying computational power, maintaining a high weight. This compensation value is a very small positive number, ranging from 0.001 to 0.01, preferably 0.005, to prevent computational anomalies where the denominator is zero, while ensuring sensitivity to low-reflectivity areas. This innovative mechanism effectively removes high-frequency reflection noise interference from complex metal surfaces at the underlying physical optics level, breaking the constant trap of traditional fixed threshold segmentation.
[0041] Thus, the reflection noise suppression weights used to evaluate the degree of reflection interference were obtained.
[0042] S3: Obtain the confidence level of casting defects.
[0043] It should be noted that automotive castings have numerous geometric topological structures on their surfaces that conform to the design intent, such as batch numbers, positioning bosses, and compliant machining lines. If these legitimate geometric features cannot be accurately stripped, the detection system will continuously mark normal structural undulations as geometrically abnormal point clouds. Traditional multidimensional detection algorithms often use global volume threshold judgment or simple plane fitting. When faced with complex free-form surfaces full of legitimate structural details, these methods lack sufficient spatial resolution and topological awareness, failing to distinguish between designed character protrusions and dangerous structural bulges, resulting in redundant optimization search space and classification bias. This invention implements spatial rigid registration and three-dimensional Boolean difference stripping operations. After accurately aligning the measured three-dimensional point cloud with the theoretical contour features of the casting in six degrees of freedom space, a subtraction operation is performed. The system directly eliminates all legitimate geometric structures, retaining only the pure topological residuals representing true anomalies.
[0044] Specifically, based on the theoretical contour features of the casting and the measured 3D point cloud of the casting, rigid registration and Boolean difference stripping are performed to obtain a clean defect point cloud of the casting, including: Perform spatial rigid registration, and rotate and translate the measured 3D point cloud of the casting in a six-degree-of-freedom space to approximate the theoretical contour features of the casting. After the registration error converges, perform 3D Boolean difference stripping on the two to filter out the overlapping legal geometric structures and output the pure defect point cloud of the casting with the remaining abnormal protrusions or depressions.
[0045] It should be noted that the pure defect point cloud of the casting represents the abnormal geometric residuals after removing non-defect structures such as legal factory characters and machining bosses; the spatial rigid registration, in this invention, can specifically adopt the iterative nearest point (Point-to-Plane ICP) registration method based on point-to-plane distance measurement, which aims to eliminate the cumulative error of mechanical coordinates during the robotic arm scanning process. The convergence threshold of spatial rigid registration is 0.1mm. When the average point-to-plane distance of the iterative nearest point algorithm is less than 0.1mm, the registration is considered complete; the three-dimensional Boolean difference stripping, in this invention, can specifically adopt voxel subtraction operation based on KD-tree neighbor search, which aims to directly strip physically legal contour features at the pixel level, reducing the computational search space for subsequent global optimization. The three-dimensional Boolean difference uses a voxel resolution of 0.5mm, which ensures the detection capability of small defects while taking into account computational efficiency.
[0046] Thus, a point cloud of pure defects in the casting was obtained.
[0047] It should be noted that the mechanical damage risk posed by casting defects is not simply linearly proportional to its surface area. Large-area shallow scratches may have no significant impact on structural strength, while shrinkage cavities with small surface openings that penetrate deep into the casting can cause catastrophic stress concentration and fracture. Existing conventional evaluation systems rely on two-dimensional surface area thresholds for scrapping decisions. This planar evaluation logic ignores the depth dimension and cannot calculate the volume loss and penetration depth of defects, leading to inaccurate judgments. Specifically, it may falsely report large but harmless surface flaws while dangerously overlooking deep, penetrating defects. This invention extracts three-dimensional geometric volume parameters to calculate the three-dimensional distortion index of defects, constructing a nonlinear geometric amplification model. The product of defect volume and penetration depth is used as the excitation term, and the opening area as the buffer term. This mathematical structure exponentially amplifies the risk of defects with large aspect ratios, bringing hidden structural hazards deep within the metal to the forefront at the data level. As a bridge connecting visual geometry and structural integrity, this invention directly consumes the pure defect point cloud of the casting generated in the previous step to extract high-precision volume parameters. The output three-dimensional distortion index is the core multiplier for subsequent calculation of the casting damage index, ensuring that deep penetrating defects occupy corresponding weight in the final quality rating.
[0048] Preferably, the measured volume of the casting defect, the inward penetration depth of the defect, and the surface opening area of the defect are extracted from the pure defect point cloud of the casting, and the three-dimensional distortion index of the defect is calculated, including: Based on the pure defect point cloud of the casting, the measured volume of the casting defect, the inward penetration depth of the defect, and the opening area of the defect surface are extracted by three-dimensional volume integration and spatial geometric projection, respectively. Based on the above three, a three-dimensional geometric morphology risk amplification algorithm is executed to calculate the three-dimensional distortion index of the defect.
[0049] It should be noted that the three-dimensional distortion index of the defect characterizes the degree of danger of the current defect causing stress concentration inside the casting in the depth dimension; the specific solution logic and calculation process of the three-dimensional geometric risk amplification algorithm includes the following stages: The first stage is the dimensionless geometric feature stage, where the calculation system obtains the measured volume of the casting defect and the inward penetration depth of the defect and performs multiplication to generate a geometric failure momentum scalar. Simultaneously, it obtains the opening area of the defect surface and performs addition and composition with the preset basic computing power compensation value to generate a topological anti-failure damping scalar. The basic computing power compensation value is a very small positive number, with a value of 0.001, which is used to avoid division by zero when the surface opening area is zero, while ensuring sensitivity to small opening defects; The second stage is nonlinear sensitivity remapping. In the initial stage, the geometrical damage momentum scalar is used as the dividend, and the topological damage resistance damping scalar is used as the divisor to perform quotient calculation, obtaining the initial geometrical distortion ratio. This initial geometrical distortion ratio is then input as the independent variable into a nonlinear exponential excitation operator to perform a basis power operation. When the defect is a pinhole-level constriction with a small surface opening and a large depth, the initial geometrical distortion ratio significantly exceeds the preset linear boundary due to the extremely small divisor and extremely large dividend. After the nonlinear exponential excitation operator, the final calculated three-dimensional distortion index of the defect exhibits a nonlinear logarithmic amplification, thereby forcibly increasing the numerical exposure gain of deep-seated defects. The third stage is the normalization and limiting stage, where the amplified value is dynamically mapped to converge to a preset standard limiting range. This operational mechanism effectively breaks the limitation of traditional two-dimensional vision relying solely on opening area for scrapping judgment, overcoming the technical bottleneck of three-dimensional deep distortion recognition at the algorithm execution level, and is a key mechanism for preventing false alarms in defects.
[0050] Thus, a three-dimensional distortion index for defects was obtained for assessing the degree of stress concentration risk.
[0051] It should be noted that assessing the probability that discrete geometric anomalies belong to real defects requires the system to handle nonlinear spatial and textural heterogeneous data. Traditional judgment models based on hard-coded rules lack sufficient nonlinear reasoning capabilities and cannot generalize to the unknown evolutionary patterns of defects in industrial environments with changing morphologies. Early automatic detection systems often used cascaded conditional logic or support vector machines based on design features. These shallow learning architectures face dimensionality limitations and weak generalization capabilities when processing high-dimensional fused point cloud and image data. Once they encounter novel, undefined defect morphologies or non-standard lighting perturbations, their classification accuracy drops. This invention utilizes a multi-scale feature fusion neural network. By injecting pre-acquired reflectivity suppression weights as a spatial attention bias layer into the model, the system dynamically suppresses irrelevant optical noise. Deep convolutional networks independently and collaboratively extract abstract hierarchical features from clean point clouds and multimodal matrices, outputting a nonlinear defect confidence probability scalar with high robustness and generalization ability. As a high-level node in the feature extraction flow, this invention integrates multimodal feature matrices, reflection suppression weights, and point clouds of casting purity defects. Through deep neural inference, this invention integrates optical, geometric, and noise resistance attributes into a single defect confidence scalar, providing a probabilistic basis for the final mechanical stress weighted fusion.
[0052] Preferably, based on the multimodal feature matrix of the casting and the reflection noise suppression weights, multi-scale feature fusion inference is performed to obtain the casting defect confidence level, including: The deep learning inference engine deployed on the main control device is invoked to extract the multimodal feature matrix of the casting, the reflection noise suppression weights, and the clean defect point cloud of the casting. A multi-scale feature fusion neural network algorithm is executed, injecting the reflection noise suppression weights as an attention penalty layer into the network to perform dimensionality reduction suppression on highly reflective areas. Combined with the clean point cloud, multi-level extraction and inference are performed to output the casting defect confidence score for suspected defect areas. The multi-scale feature fusion neural network adopts a two-stream architecture: the two-dimensional input is a 256×256×3 RGB image, and the three-dimensional input is a 1024×6 point cloud feature. The network contains 3 downsampling layers and 3 upsampling layers, ultimately outputting a defect confidence score between 0 and 1.
[0053] It should be noted that the casting defect confidence level represents a nonlinear probability scalar of the current region being determined by the deep learning model to be a real defect; the multi-scale feature fusion neural network algorithm can be summarized at the model architecture level as a heterogeneous data inference algorithm with an attention mechanism. In this invention, it can specifically employ a dual-stream convolutional neural network (DCNN) that incorporates a spatial attention bias mechanism for 3D point clouds and 2D features. This invention aims to utilize the feature extraction field of the neural network by suppressing the interference of weights, thereby focusing computing power on abnormally concave regions and avoiding the misjudgment of bright metallic reflective spots by traditional visual algorithms.
[0054] At this point, the confidence level of the casting defect was obtained.
[0055] S4: Obtain the casting damage index and output the sorting control signal.
[0056] It should be noted that in practical industrial applications, the same defect morphology can have different consequences depending on the mechanical region of the casting. Tiny pores on non-stressed edges are acceptable, while similar pores at the main suspension mounting point pose a safety hazard. Applying a globally uniform standard can lead to reduced yield or missed defects. Traditional visual inspection systems are disconnected from the field of mechanical engineering mechanics. Their judgment logic is based on visual or geometric severity, applying a uniform inspection standard to the entire surface of the casting. This judgment, detached from finite element analysis and actual working load conditions, cannot perform risk-level assessments, resulting in the incorrect scrapping of perfectly functional components. This invention introduces a multi-dimensional risk nonlinear penalty operator and integrates mechanical load data. By indexing local load weights in the finite element stress distribution cloud map using defect spatial coordinates, and performing a nonlinear combination with defect confidence and three-dimensional distortion index, the system imposes strict penalties on high-stress areas and provides elastic tolerance to low-stress areas, ensuring that the inspection standard aligns with engineering mechanics requirements.
[0057] Specifically, based on the mechanical sensitivity of the defect spatial coordinates in the stress distribution cloud map of the casting, and combined with the local stress load weight, the casting defect confidence level, and the defect three-dimensional distortion index, a nonlinear integration is performed to obtain the casting damage index, including: Extract the stress distribution cloud map of the casting. Based on the spatial coordinates of the defect, query the local stress load weight corresponding to it in the stress distribution cloud map of the casting. Extract the casting defect confidence level and the three-dimensional distortion index of the defect. Call the multi-dimensional risk nonlinear penalty operator, and perform nonlinear integration using the local stress load weight, the casting defect confidence level and the three-dimensional distortion index of the defect to output the casting damage index.
[0058] It should be noted that the local stress load weight characterizes the mechanical vulnerability and structural sensitivity of the physical coordinate point when subjected to external forces from the vehicle; the casting damage index integrates optical features, geometric distortion, and mechanical vulnerability, and is a decisive numerical scalar for assessing whether the casting is scrapped as a whole; the multidimensional risk nonlinear penalty operator can be summarized at the mathematical execution level as a multivariate weighted fusion evaluation algorithm, the specific execution logic of which is as follows: multiply the casting defect confidence level by the defect three-dimensional distortion index to obtain the basic risk scalar, and apply the local stress load weight as an exponent to the basic risk scalar, and finally output the casting damage index ranging from 0 to 1 through a nonlinear activation function; this invention aims to break the limitations of pure visual inspection, and achieve flexible adaptive judgment of defects in high-stress areas and tolerance of defects in low-stress areas by introducing stress redundancy verification in engineering design.
[0059] Thus, the casting damage index was obtained.
[0060] It should be noted that the ultimate goal of defect detection algorithms on automated production lines must be to translate them into discrete instructions executable by the physical equipment on-site. Continuously fluctuating risk indices lack direct guidance for the programmable logic controllers (PLCs) controlling the material handling robots, necessitating a conversion from digital risk assessment to deterministic physical sorting actions. Some systems directly output score values to simple comparator circuits. When the defect score hovers around the judgment threshold, conventional signal jitter can cause the output level to flip. This state oscillation can lead to logical conflicts in downstream sorting mechanisms, resulting in frequent start-stop cycles of the robotic arm and sorting errors on the production line. This invention employs a discrete state machine threshold judgment algorithm with a Schmitt trigger hysteresis interval. By comparing continuous casting damage indices with preset scrap thresholds, the system accurately maps the risk spectrum to independent quality level labels. The hysteresis mechanism effectively eliminates state oscillations at critical boundaries, ensuring that the generated control instructions are stable and unique.
[0061] Preferably, the sorting control signal is output according to the magnitude of the casting damage index, including: The casting damage index is extracted and compared with the pre-acquired heavy scrap warning threshold. A discrete state machine threshold determination is performed, and the difference between the two is compared. When the casting damage index is greater than or equal to the heavy scrap warning threshold, it is marked as an unrepairable scrap and a rejection instruction is sent to the back-end material unloading robot arm. When the casting damage index is lower than the heavy scrap warning threshold, a closed-loop sorting control signal is finally output to guide the physical actions of the automated production line on site.
[0062] It should be noted that the closed-loop sorting control signal refers to the sequence of actions that maps continuous digital features into discrete state tags and sends them to the underlying PLC automation equipment. Outputting this signal aims to complete the entire chain from data extraction to physical intervention. The severe scrap warning threshold refers to the water level at which the risk of physical damage to the casting reaches the upper limit of engineering tolerance, including an upper and lower threshold for severe scrap warning. Specifically, the discrete state machine threshold determination in this invention can employ a hard threshold grading method with a Schmitt trigger hysteresis interval. This method aims to construct an upper and lower hysteresis buffer enclosing the severe scrap warning threshold, ensuring that when the damage index fluctuates slightly near the critical water level, the state machine maintains the previous output state without frequent reversals. This invention aims to eliminate frequent false triggers or oscillations in the discharge robot arm state caused by defect index fluctuations under critical conditions, providing deterministic physical sorting instructions for industrial production lines. The severe scrap warning threshold ranges from 0.6 to 0.8, preferably 0.7. When the damage index is ≥0.7, it is judged as an irreparable defective product; when 0.5≤damage index<0.7, it is judged as a product awaiting re-inspection; and when the damage index<0.5, it is judged as a qualified product.
[0063] It should be noted that, Figure 2 This diagram illustrates the process of generating a multimodal feature matrix for castings, showcasing the cross-modal data fusion logic of 2D textures and 3D point clouds in this invention. The system simultaneously receives two independent raw data streams as input: one stream is a 2D texture sequence of the casting acquired by a multi-frequency polarization camera, containing 2D pixel coordinate information characterizing the surface color and texture features of the casting; the other stream is a measured 3D point cloud of the casting acquired by a 3D structured light scanner, containing 3D spatial vertex attributes characterizing the spatial geometry of the casting. Both data streams are synchronously input to the cross-modal fusion processing module. First, a coordinate system transformation mapping is performed, converting the 2D pixel coordinates to a 3D spatial coordinate system using a calibration matrix, achieving spatial alignment between 2D optical features and 3D geometric features. Then, a data stitching operation is performed, appending the aligned color channel attributes to the attribute list of the corresponding 3D spatial vertex, ultimately outputting a unified multimodal feature matrix for the casting. Each node of this feature matrix simultaneously contains spatial coordinate information and color channel information, achieving the fusion representation of shallow texture features and deep geometric features at the same physical point. This invention demonstrates the technical advantage of breaking the data isolation of heterogeneous sensors through a cross-modal space mapping alignment algorithm, and solves the problem of missing complex defects caused by isolated analysis of single-modal data in existing technologies. It provides a high-dimensional unified data foundation for subsequent calculation of reflection noise suppression weights, multi-scale feature fusion inference, and defect confidence assessment.
[0064] This completes a method for detecting defects in automotive castings.
[0065] This invention also discloses an automotive casting defect detection system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement an automotive casting defect detection method according to the present invention.
[0066] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0067] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A method for detecting defects in automotive castings, characterized in that, include: S1: Import the standard 3D model of the casting and the stress distribution cloud map of the casting, and extract the theoretical contour features of the casting; S2: Perform multi-view conformal scanning on the theoretical contour features of the casting to acquire the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting; based on the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting, obtain the multi-modal feature matrix of the casting; combine the pixel brightness features in the two-dimensional texture sequence of the casting to obtain the reflection noise suppression weight. S3: Based on the theoretical contour features of the casting and the measured 3D point cloud of the casting, rigid registration and Boolean difference stripping are performed to obtain the pure defect point cloud of the casting; the measured volume of the casting defect, the inward penetration depth of the defect, and the opening area of the defect surface are extracted from the pure defect point cloud of the casting, and the 3D distortion index of the defect is calculated; based on the multimodal feature matrix of the casting and the reflection noise suppression weight, multi-scale feature fusion inference is performed to obtain the confidence level of the casting defect; S4: Based on the mechanical sensitivity of the defect spatial coordinates in the casting stress distribution cloud map, and combined with the local stress load weight, casting defect confidence level and defect three-dimensional distortion index, perform nonlinear integration to obtain the casting damage index; output sorting control signal according to the magnitude of the casting damage index.
2. The method for detecting defects in automotive castings according to claim 1, characterized in that, The extraction of the theoretical contour features of the casting includes: Import the standard 3D model of the automobile chassis casting to be tested, and simultaneously extract the corresponding casting stress distribution cloud map from the finite element analysis database; call the 3D mesh analysis algorithm to extract the triangular facet normal vectors and vertex coordinates of the surface of the standard 3D model of the casting; based on the triangular facet normal vectors and vertex coordinates of the surface of the standard 3D model of the casting, construct the theoretical contour features of the casting that characterize the ideal appearance of the casting.
3. The method for detecting defects in automotive castings according to claim 1, characterized in that, The acquisition of the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting include: Based on the theoretical contour features of the casting, a multi-view conformal fitting scan is performed to generate a conformal scanning trajectory for the robotic arm. The flexible detection robotic arm is driven to run along the conformal scanning trajectory, and the multi-frequency polarization camera and three-dimensional structured light scanner mounted at the end are triggered simultaneously to collect the two-dimensional texture sequence of the casting, as well as the measured three-dimensional point cloud of the casting generated by the structured light calculation.
4. The method for detecting defects in automotive castings according to claim 1, characterized in that, The process of obtaining the multimodal feature matrix of the casting includes: Extract the two-dimensional texture sequence of the casting and the measured three-dimensional point cloud of the casting, perform a cross-modal space mapping and alignment algorithm, transform and map the obtained two-dimensional pixel coordinates, and append them to the three-dimensional space vertex attributes to perform data stitching, and output a multimodal feature matrix of the casting containing color channels and spatial coordinates.
5. The method for detecting defects in automotive castings according to claim 1, characterized in that, The process of obtaining the reflective noise suppression weights includes: The average brightness of local pixels is extracted from the two-dimensional texture sequence of the casting as the local reference scattered light intensity, and the standard deviation of the brightness of local pixels is extracted as the local high-frequency reflection deviation. At the same time, the surface roughness of the casting, which reflects the surface unevenness, is extracted from the measured three-dimensional point cloud of the casting. Based on the local reference scattered light intensity, the local high-frequency reflection deviation and the surface roughness of the casting, adaptive optical noise reduction normalization is performed to obtain the reflection noise suppression weight.
6. The method for detecting defects in automotive castings according to claim 1, characterized in that, The process of obtaining a pure defect point cloud of the casting includes: Perform spatial rigid registration, and rotate and translate the measured 3D point cloud of the casting in a six-degree-of-freedom space to approximate the theoretical contour features of the casting. After the registration error converges, perform 3D Boolean difference stripping on the two to filter out the overlapping legal geometric structures and output the pure defect point cloud of the casting with the remaining abnormal protrusions or depressions.
7. The method for detecting defects in automotive castings according to claim 1, characterized in that, The calculation of the three-dimensional distortion index of the defect includes: Based on the pure defect point cloud of the casting, the measured volume of the casting defect, the inward penetration depth of the defect, and the opening area of the defect surface are extracted by three-dimensional volume integration and spatial geometric projection, respectively. Based on the above three, a three-dimensional geometric morphology risk amplification algorithm is executed to calculate the three-dimensional distortion index of the defect.
8. The method for detecting defects in automotive castings according to claim 1, characterized in that, The process of obtaining the confidence level of casting defects includes: The deep learning inference engine deployed on the main control device is invoked to extract the multimodal feature matrix of the casting, the reflection noise suppression weight, and the pure defect point cloud of the casting. The multi-scale feature fusion neural network algorithm is executed, and the reflection noise suppression weight is injected into the network as an attention penalty layer to perform dimensionality reduction suppression on the high reflection area. The pure point cloud is combined to perform multi-level extraction and inference, and output the casting defect confidence for the suspected defect area.
9. The method for detecting defects in automotive castings according to claim 1, characterized in that, The process of obtaining the casting damage index and outputting the sorting control signal includes: Extract the casting stress distribution cloud map, and query the local stress load weight corresponding to the defect in the casting stress distribution cloud map based on the defect spatial coordinates; extract the casting defect confidence level and the defect three-dimensional distortion index; call the multi-dimensional risk nonlinear penalty operator, and perform nonlinear integration using the local stress load weight, casting defect confidence level, and defect three-dimensional distortion index to output the casting damage index; extract the casting damage index and the pre-acquired heavy scrap warning threshold. When the casting damage index is greater than or equal to the heavy scrap warning threshold, it is marked as an irreparable scrap and a rejection command is sent to the back-end material handling robot arm. When the casting damage index is lower than the heavy scrap warning threshold, a closed-loop sorting control signal is finally output to guide the physical actions of the automated production line on site.
10. A defect detection system for automotive castings, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement a method for detecting defects in automotive castings according to any one of claims 1-9.
Citation Information
Patent Citations
A defect detection device for automotive rear compartment castings
CN218824014U
