CN-122023332-A - Axle housing casting defect automatic identification method and system based on three-dimensional vision
Abstract
The invention discloses an automatic identification method of axle housing casting defects based on three-dimensional vision, which aims to solve the problems that areas such as axle housing reinforcing ribs, grooves, orifices, flange edges and the like are shielded, and deep cavities and corner areas are difficult to image so as to cause missed inspection; and executing a point cloud registration network on the multi-view point cloud, taking the computer aided design model as a registration reference to obtain pose transformation and registration confidence, updating a truncated symbol distance field model and a voxel confidence map by taking the registration confidence as a fusion weight, triggering a compensation iteration according to a critical region coverage rate threshold value and a voxel confidence rate threshold value, and finally executing a three-dimensional defect segmentation network on the three-dimensional surface of the critical region to output defect types and three-dimensional positions, thereby realizing the technical effects of coverage improvement of the shielding region, omission ratio reduction and accurate defect positioning.
Inventors
- TIAN LONG
- CHENG LIN
- LI XINXIN
- HUANG LIYA
- ZHANG ZHICHEN
Assignees
- 西峡县众德汽车部件有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260129
Claims (10)
- 1. The automatic identification method for the casting defects of the axle housing based on the three-dimensional vision is characterized by comprising the following steps of: S1, acquiring a computer-aided design model corresponding to an axle housing casting to be detected, determining key areas for defect detection, setting area weights for the key areas, and generating candidate view angles according to the reachable range of a detection station; s2, determining an initial view angle according to the visibility of the candidate view angle to the key region and combining the region weight, and controlling a three-dimensional vision sensor to perform three-dimensional scanning on the axle housing casting at the initial view angle to generate an initial point cloud; S3, performing a point cloud registration network on the initial point cloud, and taking a computer aided design model as a registration reference to obtain initial pose transformation and initial registration confidence, and transforming the initial point cloud to a model coordinate system according to the initial pose transformation to obtain an initial registration point cloud; s4, constructing a truncated symbol distance field model based on the initial registration point cloud, and taking the initial registration confidence coefficient as a fusion weight to update the truncated symbol distance field model in a weighting manner, and updating a voxel confidence coefficient map to obtain a current truncated symbol distance field model and a current voxel confidence coefficient map; S5, performing visibility analysis on the computer aided design model under the candidate view angles to obtain the visibility of each candidate view angle to the key area, determining a visibility weight value corresponding to each candidate view angle according to the visibility and the area weight, and mapping the current voxel confidence map to the surface position of the key area to determine the area to be complemented and scanned; S6, calculating coverage gain according to the to-be-compensated area aiming at each candidate view angle, calculating view angle scores in combination with the observation quality factors, and determining the candidate view angle with the largest view angle score as the next best view angle; S7, controlling a three-dimensional vision sensor to perform three-dimensional scanning on the axle housing casting at the next optimal view angle, generating a newly added point cloud, executing a point cloud registration network, taking a computer aided design model as a registration reference, obtaining newly added pose transformation and newly added registration confidence, transforming the newly added point cloud to a model coordinate system according to the newly added pose transformation to obtain newly added registration point cloud, and updating a current truncated symbol distance field model and updating a voxel confidence map by taking the newly added registration confidence as a fusion weight to obtain an updated truncated symbol distance field model and an updated voxel confidence map; S8, calculating the coverage rate of the key region according to the updated truncated symbol distance field model and the updated voxel confidence map and combining the key region and the region weight, and determining the updated truncated symbol distance field model as a final truncated symbol distance field model when the coverage rate is not smaller than a preset coverage rate threshold and the voxel confidence of the corresponding surface position of the key region is not smaller than a confidence threshold, otherwise, returning to execute the steps S5 to S8; S9, extracting the three-dimensional surface to be detected in the key area from the final cut-off symbol distance field model, executing a three-dimensional defect segmentation network, and outputting a defect identification result.
- 2. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S2 comprises: For each candidate view, performing ray casting on the key region based on the computer-aided design model to obtain a visible surface range of the key region under the candidate view, and weighting the visible surface range according to the region weight to obtain an initial visibility score of the candidate view; meanwhile, calculating an observation quality factor of the candidate view according to the incidence angle and the working distance corresponding to the candidate view, and determining an initial view score of the candidate view according to the initial visibility score and the observation quality factor; and determining the candidate view angle with the highest initial view angle score as an initial view angle, and controlling a three-dimensional vision sensor to perform three-dimensional scanning on the axle housing casting at the initial view angle so as to generate an initial point cloud.
- 3. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S3 comprises: sampling a surface triangular mesh of the computer aided design model to generate a model point cloud; Respectively extracting point characteristics of the initial point cloud and the model point cloud, and inputting the extracted point characteristics into a transform point cloud registration network to output point corresponding relations and corresponding matching scores; Selecting a corresponding point pair with a high matching score according to the point corresponding relation and the corresponding matching score, and estimating according to the corresponding point pair to obtain initial pose transformation for aligning the initial point cloud to the model coordinate system; Determining initial registration confidence according to the corresponding matching score and the residual error of the corresponding point pair after the initial pose transformation; and transforming the initial point cloud into the model coordinate system according to the initial pose transformation to generate an initial alignment point cloud.
- 4. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S4 comprises: Establishing a voxel grid covering the key region under a model coordinate system, and initializing a truncated symbol distance value and voxel confidence coefficient for each voxel in the voxel grid; For each measuring point in the initial alignment point cloud, calculating the symbol distance of the measuring point to the corresponding voxel in the voxel grid along the direction of the sensor sight, and cutting off the symbol distance according to a preset cut-off distance to obtain a cut-off symbol distance value; distributing fusion weights to the measurement points according to the initial registration confidence, and carrying out weighted updating on the truncated symbol distance values of the corresponding voxels by utilizing the fusion weights so as to update the truncated symbol distance values of the voxels; And synchronously carrying out accumulated updating on the voxel confidence coefficient of the corresponding voxel by utilizing the fusion weight to obtain a current truncated symbol distance field model and a current voxel confidence coefficient map.
- 5. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S5 comprises: for each candidate view angle, performing ray casting on the key region along the sight direction of the candidate view angle based on the computer aided design model so as to remove the surface position blocked by the computer aided design model and obtain the surface position of the visible key region under the candidate view angle; Weighting calculation is carried out on the surface position of the visible key region according to the region weight, and a visibility weight value corresponding to the candidate view angle is generated; Mapping the current voxel confidence map to the surface position of the key region, determining the surface position of the key region with the voxel confidence equal to zero as an unobserved surface position, and determining the surface position of the key region with the voxel confidence smaller than a preset confidence threshold and not equal to zero as a low-confidence surface position; And determining a region to be complemented according to the unobserved surface position and the low-confidence surface position.
- 6. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S6 comprises: Calculating coverage gain according to the to-be-compensated area for each candidate view angle, wherein the coverage gain is the proportion of the area of the visible surface position in the to-be-compensated area under the candidate view angle to the total area of the to-be-compensated area, and weighting the area proportion according to the area weight; meanwhile, calculating an incident angle corresponding to the candidate view angle according to the gesture of the candidate view angle relative to the computer aided design model, calculating a working distance corresponding to the candidate view angle according to the distance between the candidate view angle and the computer aided design model, and calculating a predicted shielding probability corresponding to the candidate view angle based on a ray projection result; Normalizing the incidence angle, the working distance and the predicted shielding probability, and then combining to obtain an observation quality factor; and fusing the coverage gain and the observation quality factor according to a preset linear weighting function to obtain a view angle score, and determining a candidate view angle with the largest view angle score as the next best view angle.
- 7. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S7 comprises: Controlling a three-dimensional vision sensor to perform three-dimensional scanning on the axle housing casting at the next optimal view angle so as to generate an added point cloud; Performing a transform point cloud registration network on the newly added point cloud, and calculating newly added pose transformation and newly added registration confidence by taking the computer aided design model as a registration reference; Transforming the newly added point cloud to a model coordinate system according to the newly added pose transformation to generate a newly added alignment point cloud; Calculating the symbol distance of the current truncated symbol distance from each measuring point in the newly added alignment point cloud to the corresponding voxel in the field model along the sensor sight direction, and truncating the symbol distance according to a preset truncated distance to obtain a newly added truncated symbol distance value; Distributing new fusion weights to the measurement points according to the new registration confidence, and carrying out weighted fusion on the new truncated symbol distance values and the truncated symbol distance values of the corresponding voxels by utilizing the new fusion weights so as to update the truncated symbol distance values of the corresponding voxels; and synchronously carrying out accumulated updating on the voxel confidence coefficient of the corresponding voxel by utilizing the newly added fusion weight to obtain an updated truncated symbol distance field model and an updated voxel confidence coefficient map.
- 8. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S8 comprises: mapping the updated voxel confidence map to the surface position of the key region, and determining the surface position of the key region with the voxel confidence greater than zero as the observed surface position; calculating the area of the observed surface position in each key region and the total area of the key regions respectively, and carrying out weighted summarization on the area occupation ratio of each key region according to the region weight to obtain the coverage rate of the key region; When the coverage rate of the key region is not smaller than a preset coverage rate threshold value and the voxel confidence coefficient of the observed surface position is not smaller than a preset confidence coefficient threshold value, determining the updated truncated symbol distance field model as a final truncated symbol distance field model; And when the foregoing condition is not satisfied, continuing to execute step S5 to step S8 based on the updated truncated symbol distance field model and the updated voxel confidence map.
- 9. The automatic identification method for casting defects of axle housing based on three-dimensional vision according to claim 1, wherein S9 comprises: Extracting zero-crossing equivalent surfaces from the final truncated symbol distance field model to obtain a three-dimensional reconstruction surface of the axle housing casting; intercepting corresponding surface fragments on the three-dimensional reconstruction surface according to the key region to generate a three-dimensional surface to be detected in the key region; gridding the three-dimensional surface to be detected, inputting a three-dimensional defect segmentation network, and outputting defect types and defect confidence degrees of all surface positions in a key area; and screening surface positions with defect confidence coefficient not smaller than a preset output threshold value from the surface positions according to the defect confidence coefficient, and calculating three-dimensional coordinates of the screened surface positions based on the model coordinate system to output defect identification results, wherein the defect identification results comprise defect types, three-dimensional positions of defects under the model coordinate system and defect confidence coefficient.
- 10. An automatic axle housing casting defect recognition system based on three-dimensional vision is characterized by being used for executing the automatic axle housing casting defect recognition method based on three-dimensional vision, and comprises a three-dimensional vision sensor, a control executing mechanism and a processor, wherein the processor is configured to execute the following module functions, namely a model and key area module, a computer aided design model corresponding to an axle housing casting to be detected is obtained, a key area for defect detection is determined, and area weights are set for the key areas; the system comprises a candidate view module for generating a candidate view according to the reach of a detection station, a view planning module for determining an initial view based on the visibility of the candidate view to a key region and combining region weight, and calculating coverage gain according to a region to be complemented and a view grade according to an observation quality factor in the detection process to determine the next best view, a scanning control module for controlling a control executing mechanism to drive a three-dimensional vision sensor to perform three-dimensional scanning on an axle housing casting at the initial view and the next best view to generate point cloud data, a registration module for executing a point cloud registration network on the point cloud data and taking a computer aided design model as a registration reference to obtain pose transformation and registration confidence coefficient, transforming the point cloud data to a model coordinate system according to the pose transformation, a fusion reconstruction module for constructing and updating a truncated symbol distance field model based on the transformed point cloud data, updating the truncated symbol distance field model by taking the registration confidence coefficient as a fusion weight, and updating a voxel confidence map at the same time, a compensation and control module, the system comprises a visual angle planning module, a visual angle detection module and a defect identification module, wherein the visual angle planning module is used for carrying out visibility analysis on a computer aided design model, determining a region to be complemented by combining a voxel confidence coefficient map, calculating a coverage rate of a key region, outputting a final cut-off symbol distance field model when the coverage rate of the key region is not smaller than a preset coverage rate threshold and the voxel confidence coefficient of a corresponding surface position of the key region is not smaller than a preset confidence coefficient threshold, otherwise, triggering the visual angle planning module to carry out complement iteration, and the defect identification module is used for extracting a three-dimensional surface to be detected, which is positioned in the key region, from the final cut-off symbol distance field model, executing a three-dimensional defect segmentation network on the three-dimensional surface to be detected, and outputting a defect identification result.
Description
Axle housing casting defect automatic identification method and system based on three-dimensional vision Technical Field The invention relates to the technical field of three-dimensional vision detection, in particular to an automatic axle housing casting defect identification method and system based on three-dimensional vision. Background The axle housing belongs to typical complex casting parts, is widely applied to a vehicle transmission system, and surface defects (such as shrinkage cavities, sand holes, cracks, slag inclusion, cold insulation and the like) of the axle housing can influence the assembly precision and service reliability, so that the automatic defect detection of the axle housing casting on a production line has important significance. With the development of three-dimensional vision sensors, industrial robots and point cloud processing algorithms, the prior art has gradually developed from manual visual inspection and two-dimensional machine vision inspection to three-dimensional point cloud inspection based on structured light or laser scanning; meanwhile, the scanning data are aligned to a standard model by utilizing point cloud registration, and defects are identified by combining a three-dimensional reconstruction or deep learning segmentation network, so that the method is a common technical route. In engineering application, part of schemes adopt fixed camera pose, fixed multi-camera arrangement or preset robot scanning track to acquire multi-view point clouds, and then point cloud splicing and fusion are carried out to improve coverage. For castings with structures such as reinforcing ribs, grooves, orifices and flange edges of axle housings, the following defects still exist in the prior art: 1. the combination of single visual angle scanning or fixed visual angles is adopted, so that natural shielding, deep cavity and corner area visual changes are difficult to deal with, and the problem that the detection is missed due to insufficient coverage of key areas is easily caused; 2. In the process of multi-view point cloud registration and fusion, registration error accumulation or local matching failure is common, and the existing scheme often lacks quantitative characterization and fusion weight control on registration reliability, so that deviation exists on a reconstructed surface, and the subsequent defect positioning accuracy is affected; 3. The scanning process generally lacks a quantitative evaluation mechanism for coverage and observation quality of a key area, closed loop control of automatic compensation of an unobserved area is difficult to form, and detection efficiency and consistency are greatly influenced by station fluctuation. Therefore, an automatic identification method and system for casting defects of axle housing, which can solve the defects of the prior art, are the problems that the person skilled in the art needs to solve. Disclosure of Invention The invention aims to provide an automatic identification method of an axle housing casting defect based on three-dimensional vision, aiming at the problems that in the prior art, a single view angle or a fixed scanning track is adopted to cause insufficient coverage of a critical area of a shielding and deep cavity corner, registration fusion reliability is difficult to quantify to cause omission and positioning deviation, a self-adaptive compensation closed-loop technical scheme driven by visibility of a computer-aided design model is provided, a computer-aided design model of an axle housing casting is obtained, a critical area and area weight thereof are determined, candidate view angles are generated, the visibility of the critical area is calculated through ray casting, an observation quality factor is formed by combining an incident angle, a working distance and a predicted shielding probability to select an initial view angle and a next optimal view angle, a point cloud registration network is executed on a multi-view point cloud, a truncated symbol distance field model and a voxel confidence map are updated by using registration confidence as fusion weight, compensation is triggered based on a critical area coverage threshold and voxel confidence threshold, and finally a defect segmentation network is executed on the three-dimensional surface of the critical area. The invention has the technical effects of improving the coverage rate of the key area, reducing the omission ratio, improving the reconstruction and positioning precision and enhancing the detection consistency and the automation degree. The invention provides an automatic identification method for axle housing casting defects based on three-dimensional vision, which comprises the following steps: S1, acquiring a computer-aided design model corresponding to an axle housing casting to be detected, determining key areas for defect detection, setting area weights for the key areas, and generating candidate view angles according to the reachable ran