Visual signal processing system based on casting defect inspection
Patent Information
- Application Number
- CN202611141359.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本发明提供基于铸件缺陷检验的视觉信号处理系统,解决相关技术中铸件表面视觉检验无法利用铸造工艺仿真场信息对不同缺陷高风险区域实施差异化信号处理灵敏度配置,导致缺陷漏检率高、分类准确性不足的技术问题
[0015]本发明将充型顺序时间场、凝固时间场和补缩效率场投影为归一化二维工艺参数图,并与铸件表面视觉采集图像实现像素级空间对齐,使图像中每个像素位置均携带对应的工艺风险信息;在此基础上,灵敏度配置模块依据归一化补缩效率通道值和归一化充型时间通道值将图像各区域区分为不同缺陷风险等级并分配差异化信号处理参数,缩松高风险区域获得更低的灰度对比度分割阈值和更小的最小连通域面积约束,使微弱的缩松灰度异常信号能够被有效分割检出;
Smart Images

Figure CN122929286A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual signal processing technology, and more specifically, to a visual signal processing system based on casting defect inspection. Background Technology
[0002] During the filling, solidification, and feeding processes of castings, different types of defects can easily form on different surface areas due to factors such as the location of the gate, changes in wall thickness, the flow path of the molten metal, the cooling rate, and the connectivity of the feeding channels. For example, thin-walled areas far from the gate are prone to defects such as cold shuts and undercasting due to the drop in molten metal temperature at the end of the filling process; while thick-walled hot spots are prone to defects such as shrinkage porosity and shrinkage cavities due to insufficient solidification shrinkage compensation.
[0003] Existing visual inspection methods for casting surfaces are usually based on grayscale threshold segmentation, edge detection, morphological analysis or image classification models to process the acquired images. However, most methods mainly rely on the grayscale, texture and morphological features of the image itself, and apply the same or nearly the same signal processing threshold to the entire image. They fail to make full use of the prior information of the process obtained from the casting process simulation, such as the filling sequence time field, solidification time field and feeding efficiency field. When the grayscale response of defects is weak, the edge features are not obvious, or the defects are located in areas with high process risk but weak visual signals, the uniform sensitivity processing method is prone to missed detection. At the same time, relying solely on visual morphological features for defect classification makes it difficult to determine whether the classification results are consistent with the casting process causes, and it is easy to misjudge defects such as cold shuts, shrinkage porosity, and slag inclusions.
[0004] To address this, a visual signal processing system for casting defect inspection is proposed. This system can spatially fuse casting process simulation field information with visual images of the casting surface and adaptively configure visual signal processing parameters based on the process risk of different regions. This aims to improve the defect detection capability in high-risk areas and the reliability of defect classification results. Summary of the Invention
[0005] This invention provides a visual signal processing system for casting defect inspection, which solves the technical problem in related technologies that visual inspection of casting surfaces cannot utilize casting process simulation field information to implement differentiated signal processing sensitivity configuration for different high-risk defect areas, resulting in high defect miss rates and insufficient classification accuracy.
[0006] This invention discloses a visual signal processing system for casting defect inspection, comprising: The process field projection module is configured to perform projection processing along the normal direction of the casting surface on the filling sequence time field, solidification time field and feeding efficiency field in the casting process simulation results, and generate a two-dimensional filling time map, a two-dimensional solidification time map and a two-dimensional feeding efficiency map. The spatial registration module is configured to perform pixel-level alignment of the normalized two-dimensional filling time map, two-dimensional solidification time map, and two-dimensional feeding efficiency map with the visual acquisition image of the casting surface, and generate a four-channel process parameter enhancement image. The sensitivity configuration module is configured to enhance the normalized scaling efficiency channel value and normalized filling time channel value of each pixel in the image based on the process parameters, assign differentiated visual signal processing sensitivity parameters to each spatial region, and generate a spatial heterogeneity visual signal processing sensitivity configuration map. The adaptive segmentation module is configured to perform segmentation processing on each region of the visually acquired image of the casting surface according to the sensitivity configuration map, and generate a set of candidate defect regions and expected defect type labels. The classification and verification module is configured to extract morphological feature vectors from candidate defect regions and calculate the matching confidence between them and the standard feature templates corresponding to the expected defect type labels. Based on the matching confidence, the defect type is confirmed or reclassified, and an inspection report is output.
[0007] Furthermore, when the process field projection module performs projection processing along the normal direction of the casting surface, it samples the field quantity values within a preset depth range along the outward normal direction of each surface grid node on the casting surface, and takes the extreme value on the sampling path as the projection value of the surface grid node; it takes the maximum value on the sampling path for the filling sequence time field, the maximum value on the sampling path for the solidification time field, and the minimum value on the sampling path for the feeding efficiency field.
[0008] Furthermore, after projection, the process field projection module performs normalization processing on the pixel values of the two-dimensional filling time map, the two-dimensional solidification time map, and the two-dimensional shrinkage efficiency map, respectively, scaling the pixel values uniformly to... Interval.
[0009] Furthermore, the spatial registration module includes a feature point matching submodule. The feature point matching submodule extracts a set of geometric feature points on the surface of the casting based on the casting CAD model, extracts a corresponding set of image feature points from the visually acquired image of the casting surface, calculates the affine transformation matrix from the coordinate system of the two-dimensional process parameter diagram to the coordinate system of the image pixels through the correspondence between the geometric feature points and the image feature points, and performs coordinate transformation and resampling on the two-dimensional filling time diagram, the two-dimensional solidification time diagram, and the two-dimensional shrinkage efficiency diagram, respectively, using the affine transformation matrix.
[0010] Furthermore, the four-channel process parameter enhancement image uses the visual grayscale signal value as the first channel, the normalized filling time value as the second channel, the normalized solidification time value as the third channel, and the normalized feeding efficiency value as the fourth channel.
[0011] Furthermore, the sensitivity configuration module sets the normalized scaling efficiency channel value of each pixel against the scaling efficiency risk threshold. Compare the normalized filling time channel values with the filling time risk threshold. Comparison; for normalized compensation efficiency channel values lower than The pixel region was identified as a high-risk area for scaling down, and a segmentation threshold including grayscale contrast was assigned. and minimum connected region area threshold High-sensitivity shrinkage detection signal processing parameter set; for normalized filling time channel values exceeding The pixel region was identified as a high-risk area for cold shut-off, and parameters including the directional filter kernel size were assigned. and edge response threshold A high-sensitivity cold shut detection signal processing parameter set; and a standard signal processing parameter set assigned to pixel regions that do not meet the above two conditions. Among them, To compensate for the risk threshold of shrinkage efficiency, The filling time risk threshold, This is the grayscale contrast segmentation threshold. The minimum connected component area threshold. Here are the parameters for the directional filter kernel size. This is the edge response threshold.
[0012] Furthermore, when a pixel simultaneously satisfies the condition that the normalized scaling efficiency channel value is lower than... And the normalized filling time channel value exceeds At that time, the region where the pixel is located is simultaneously subjected to dual detection processing by both the high-sensitivity shrinkage detection signal processing parameter group and the high-sensitivity cold shut detection signal processing parameter group.
[0013] Furthermore, the adaptive segmentation module segments the regions assigned with high-sensitivity loosening detection signal processing parameter sets, in order to and Local adaptive thresholding is performed on the parameters to extract dark regions with gray values lower than the local background and connected areas satisfying the lower limit constraint as candidate defect regions for shrinkage porosity; for regions assigned to high-sensitivity cold shut detection signal processing parameter groups, Perform multi-directional gradient filtering to extract edge response values exceeding The linear connected structure is used as a candidate defect region for cold shuts.
[0014] Furthermore, the classification verification module uses cosine similarity to calculate the standardized morphological feature vector. With standard feature template Match confidence between : ; in, Morphological feature vectors The One portion, Standard feature template The One portion, The morphological feature dimension is preset; when Greater than or equal to the confidence threshold When confirming that the classification result of the candidate defect region is the type indicated by the expected defect type label, and adding a process cause annotation, when Less than The morphological feature vectors of candidate defect regions are compared with the standard feature templates of all defect types one by one to calculate the cosine similarity, and the type with the highest cosine similarity is selected as the reclassification result.
[0015] This invention projects the filling sequence time field, solidification time field, and feeding efficiency field into a normalized two-dimensional process parameter diagram, and achieves pixel-level spatial alignment with the visually acquired image of the casting surface, so that each pixel position in the image carries the corresponding process risk information. On this basis, the sensitivity configuration module classifies each region of the image into different defect risk levels and assigns differentiated signal processing parameters according to the normalized feeding efficiency channel value and the normalized filling time channel value. The high-risk shrinkage porosity region obtains a lower gray-scale contrast segmentation threshold and a smaller minimum connected region area constraint, so that weak shrinkage porosity gray-scale abnormal signals can be effectively segmented and detected. By obtaining enhanced directional gradient filtering parameters and lower edge response thresholds for high-risk cold-slit areas, subtle linear features of cold-slits can be effectively captured, thus overcoming the problem of missed detection caused by insufficient signal response in high-risk areas under a uniform sensitivity configuration.
[0016] By using prior knowledge of defect types predicted by process parameter channel values to constrain and verify the visual morphological classification results, a full-type reclassification process is triggered when the morphological features are inconsistent with the expected process type. This filters out unreasonable classification outputs in the process, so that the defect classification results have dual support from both visual morphological basis and casting process basis, thereby improving the credibility and interpretability of the classification results. Attached Figure Description
[0017] Figure 1 This is a system flowchart of a visual signal processing system for casting defect inspection provided in an embodiment of the present invention. Detailed Implementation
[0018] Example 1 See Figure 1As shown, during the visual inspection of casting surface defects, the probability and type of defects in different areas of the casting exhibit a spatially non-uniform distribution due to differences in the pouring sequence, solidification time gradient, and distance of the feeding channel. Thin-walled areas far from the gate are prone to undercasting and cold shut defects, while thick-walled hot spots are prone to shrinkage porosity and shrinkage cavities. Existing visual signal processing systems use a uniform signal sensitivity threshold for defect searching across the entire casting surface, which cannot adaptively increase the detection sensitivity for high-risk areas, leading to the risk of missed detections in these areas. Furthermore, defect type judgment relies solely on morphological visual features, lacking constraints based on the rationality of the casting process, resulting in insufficient reliability of the classification results. This embodiment provides a visual signal processing system for casting defect inspection, which includes a process field projection module, a spatial registration module, a sensitivity configuration module, an adaptive segmentation module, and a classification verification module.
[0019] System input: Visually acquired images of the casting surface and simulation results of the corresponding casting process; The process field projection module is configured to acquire three-dimensional field data of the casting process simulation results and generate a two-dimensional surface mapping map. The process field projection module acquires the casting process simulation result data corresponding to the casting. The casting process simulation result data includes the filling sequence time field, solidification time field, and feeding efficiency field. The filling sequence time field, solidification time field, and feeding efficiency field are all scalar fields defined on the three-dimensional geometric volume domain of the casting.
[0020] The feeding efficiency field represents the ability of molten metal to effectively replenish a target location during the solidification and shrinkage stage. Its value can be output by casting simulation software based on the temperature field, solidification fraction, feeding channel connectivity, and pressure gradient. The lower the feeding efficiency, the more likely that shrinkage porosity or shrinkage cavity defects will form at that location. The original value of the feeding efficiency can be expressed as a percentage, and after normalization, it takes a value from 0 to 1. The smaller the value, the higher the risk of shrinkage porosity.
[0021] The surface normal projection submodule performs projection processing along the casting surface normal on the filling sequence time field, solidification time field, and feeding efficiency field. For each surface mesh node on the casting surface, the field value within a preset depth range is sampled along the outward normal direction at the surface mesh node, and the extreme value on the sampling path is taken as the projection value of the surface mesh node. For the filling sequence time field, the maximum value on the sampling path is taken, representing the latest time when the surface mesh node is filled by molten metal; for the solidification time field, the maximum value on the sampling path is taken, representing the final solidification time at the surface mesh node; for the feeding efficiency field, the minimum value on the sampling path is taken, representing the most unfavorable feeding condition at the surface mesh node. After projection processing, a two-dimensional filling time map, a two-dimensional solidification time map, and a two-dimensional feeding efficiency map defined on the casting surface mesh are generated. After projection, the pixel values of the two-dimensional filling time map, the two-dimensional solidification time map, and the two-dimensional feeding efficiency map are normalized, and the pixel values of the two-dimensional filling time map, the two-dimensional solidification time map, and the two-dimensional feeding efficiency map are uniformly scaled to a certain value. The interval eliminates the impact of differences in the dimensions of different physical fields on subsequent multi-channel fusion calculations.
[0022] The preset depth range d can be determined based on the local wall thickness h of the casting. d is set to the minimum value (5mm, 0.3h). When the local wall thickness is less than 5mm, d should not exceed half of the local wall thickness. The sampling step size Δd should not be greater than the average side length of the simulation mesh, or not greater than 1mm. If the sampling path exceeds the boundary of the casting entity, only sampling points inside the entity are retained.
[0023] The spatial registration module is configured to perform pixel-level alignment between the two-dimensional process parameter diagram and the visually acquired image of the casting surface and generate an enhanced image of the process parameters. The spatial registration module spatially registers the normalized two-dimensional filling time map, two-dimensional solidification time map, and two-dimensional feeding efficiency map with the visually acquired image of the casting surface.
[0024] Feature point matching submodule: Extracts a set of geometric feature points from the casting surface based on the casting CAD model. This set includes corner points, arc endpoints, and intersection points of the surface. Simultaneously, it extracts the corresponding set of image feature points from the visually acquired images of the casting surface. Based on the correspondence between the geometric feature points of the CAD model and the image feature points, it calculates the affine transformation matrix from the two-dimensional process parameter diagram coordinate system to the image pixel coordinate system.
[0025] Additional notes: When the surface to be inspected is an approximately planar region, registration is completed using an affine transformation matrix; when the surface to be inspected is a non-planar curved surface or has obvious perspective distortion, the intrinsic and extrinsic parameters are first obtained through camera calibration, and the CAD surface is unfolded to a two-dimensional UV coordinate system. Then, a homography mapping or piecewise affine mapping is established between the UV coordinates and the image pixel coordinates.
[0026] The image fusion submodule utilizes an affine transformation matrix to perform coordinate transformation and resampling on the 2D filling time map, 2D solidification time map, and 2D shrinkage efficiency map, respectively, to achieve pixel-level spatial alignment between these maps and the visually acquired image of the casting surface. The visual grayscale signal value is used as the first channel, the normalized filling time value as the second channel, the normalized solidification time value as the third channel, and the normalized shrinkage efficiency value as the fourth channel, generating a four-channel process parameter enhancement image. This means that each pixel in the process parameter enhancement image simultaneously carries the visual grayscale signal value and the values of the three normalized process parameter channels.
[0027] The sensitivity configuration module is configured to adaptively allocate visual signal processing sensitivity parameters to each spatial region of the image based on the process parameter channel values. The sensitivity configuration module reads the normalized shrinkage efficiency channel value and normalized filling time channel value of each pixel in the process parameter enhancement image. Based on the defect occurrence risk level indicated by the normalized shrinkage efficiency channel value and normalized filling time channel value, it assigns differentiated visual signal processing sensitivity parameters to each spatial region of the process parameter enhancement image. The normalized solidification time channel value participates in the construction of the process parameter enhancement image as an independent channel. In the sensitivity configuration module, the normalized solidification time channel value does not directly participate in the risk judgment threshold comparison, but rather, together with the shrinkage efficiency field, it characterizes the process state of the hot spot region, providing complete three-field process background information for the subsequent classification and verification module.
[0028] The regional risk assessment submodule iterates through each pixel location in the process parameter enhancement image, and compares the normalized scaling efficiency channel value of the pixel location with a first threshold. The normalized filling time channel value of the pixel location is compared with the second threshold. Comparison. Among them The risk threshold for replenishment efficiency is a lower limit criterion characterizing the effective liquid supply capacity of the replenishment channel, with a value range of [value range missing]. ; The filling time risk threshold is a normalized value representing the critical filling time required for the molten metal front-end temperature to drop to the level that would lead to a cold shut risk. Its value range is [range missing]. .
[0029] Sensitivity parameter allocation submodule: For normalized compensation efficiency channel values below Pixel regions identified as high-risk areas for shrinkage porosity are assigned a high-sensitivity shrinkage detection signal processing parameter set, which includes a low grayscale contrast segmentation threshold. and a smaller minimum connected component area threshold ,in To reduce the grayscale contrast segmentation threshold for detection, To detect porosity, a minimum connected component area threshold is set to ensure that minute porosity-related grayscale anomalies can be detected; for normalized filling time channel values exceeding... The pixel region was identified as a high-risk area for cold shuts, and a high-sensitivity cold shut detection signal processing parameter set was assigned. This parameter set included the directional filter kernel size parameter for enhancing linear grayscale gradient features. and lower edge response threshold ,in For the directional filter kernel size parameter, This is the edge response threshold for cold shut detection, enabling the detection of subtle linear features of cold shuts; for channels with normalized patching efficiency values below [value missing], [the threshold is set to be inserted here]. and normalized filling time channel value exceeds For pixel regions under two conditions, a standard signal processing parameter set is assigned, which includes a standard gray-level contrast segmentation threshold. and standard minimum connected region area threshold ,in The standard grayscale contrast segmentation threshold, This is the standard minimum connected component area threshold. When a pixel simultaneously satisfies the condition that the normalized scaling efficiency is lower than... And the normalized filling time exceeds Under both conditions, the region containing the pixel simultaneously undergoes dual detection processing using both the high-sensitivity shrinkage detection signal processing parameter set and the high-sensitivity cold shut detection signal processing parameter set. After the above processing is completed, a spatial heterogeneous visual signal processing sensitivity configuration map is generated, which records the signal processing parameter set category corresponding to each pixel region.
[0030] The adaptive segmentation module is configured to perform segmentation processing on each region of the visually acquired image of the casting surface according to the sensitivity configuration map and generate a set of candidate defect regions. The adaptive segmentation module performs adaptive segmentation processing on the visually acquired images of the casting surface based on the spatial heterogeneity visual signal processing sensitivity configuration map.
[0031] Region segmentation execution submodule: For regions assigned with high-sensitivity puffiness detection signal processing parameter groups, segmentation is performed using the gray-level contrast threshold in the high-sensitivity puffiness detection signal processing parameter groups. and minimum connected region area threshold Using the parameters, local adaptive thresholding is performed on the visual grayscale signals within the region assigned to the high-sensitivity cold shut detection signal processing parameter group. Dark regions with grayscale values lower than the local background and connected areas satisfying the lower limit constraint are extracted as candidate defect regions for cold shut. The expected defect type label "cold shut" is then added to these candidate defect regions. For the region assigned to the high-sensitivity cold shut detection signal processing parameter group, the directional filter kernel size parameter in the high-sensitivity cold shut detection signal processing parameter group is used. Multi-directional gradient filtering is performed on the region assigned the high-sensitivity cold shut detection signal processing parameter set, and edge response values exceeding the edge response threshold in the high-sensitivity cold shut detection signal processing parameter set are extracted. Linear connected structures are used as candidate defect regions for cold shuts, and the expected defect type label "cold shut" is attached to each candidate defect region. Regions assigned standard signal processing parameter sets are segmented using a standard grayscale contrast threshold. Perform standard grayscale threshold segmentation, and attach the expected defect type label "Pending" to the detected candidate regions. For regions that undergo dual detection processing, perform the above-mentioned segmentation processing for loosening-type candidate defects and cold shut-type candidate defect regions respectively, and attach the corresponding expected defect type label to the resulting candidate defect regions. After the above processing is completed, summarize the detection results of all regions to generate a set of candidate defect regions and the corresponding expected defect type labels for the set of candidate defect regions.
[0032] A w×w local window is established centered on pixel p, and the grayscale mean of pixels in the non-candidate region within the window is calculated. As a local background grayscale; if and the area of the connected domain If so, the connected component is identified as a candidate region for the contraction class.
[0033] The cold shut section can be supplemented as follows: "Set up four directional filter kernels at 0°, 45°, 90°, and 135°, and calculate the gradient response for each." ,Pick As the edge response value of pixel p; if the pixels in a continuous linear connected structure If the structural length is greater than the preset length threshold, it is determined as a candidate region for cold insulation.
[0034] The classification verification module is configured to extract morphological feature vectors from candidate defect regions and verify the classification results in conjunction with process prior constraints to output an inspection report. The classification and verification module performs classification and verification processing of process constraints on each candidate defect region in the candidate defect region set.
[0035] The morphological feature extraction submodule extracts a visual morphological feature vector for each candidate defect region in the candidate defect region set. This visual morphological feature vector includes components such as region area, perimeter, roundness, aspect ratio, gray-level mean deviation, and gray-level gradient direction histogram. 3D morphological eigenvectors ,in This is the preset morphological feature dimension. After extraction, [the following is performed]... Each component is standardized to eliminate the influence of differences in the dimensions of different morphological features on the subsequent cosine similarity calculation.
[0036] Template matching confidence calculation submodule: Obtains the standard feature template corresponding to the expected defect type label of the candidate defect region. The standard feature template is obtained by standardizing and statistically analyzing the feature vectors of known samples of the same defect type. dimensional mean vector The morphological feature dimension is preset. The standardized morphological feature vector is calculated using cosine similarity. With standard feature template Match confidence between : ; in Morphological feature vectors The Each component, Standard feature template The Each component, The preset morphological feature dimension, For component index and . and All Dimensional vectors, with the same dimension.
[0037] Classification Decision Submodule: Assigns matching confidence scores. Compared with the preset confidence threshold Comparison, among which To determine the confidence threshold for classification. When When the visual morphological features of the candidate defect region highly match the defect types expected by the normalized feeding efficiency channel value and the normalized filling time channel value, the classification result of the candidate defect region is confirmed to be the type indicated by the expected defect type label, and a process cause label is added—for shrinkage porosity defects, the cause is labeled "insufficient feeding channel"; for cold shut defects, the cause is labeled "insufficient filling temperature"; for candidate defect regions with the expected defect type label "pending", no process cause label is added after the classification result is confirmed. When the visual morphology of the candidate defect region does not match the expected type of the normalized patching efficiency channel value and the normalized filling time channel value, the candidate defect region is marked as an abnormal defect signal, and the full-type reclassification process is triggered: the morphological feature vector of the candidate defect region is... Cosine similarity is calculated for each defect type in the system against its standard feature template. The type with the highest cosine similarity is selected as the reclassification result. After all candidate defect regions have been classified and verified, the defect type labels and process cause annotations for each candidate defect region are summarized, and the final visual inspection report is output.
[0038] The standard feature template for each type of defect is established from no fewer than N manually verified historical defect samples, where N can be between 30 and 100. The sample mean and standard deviation are calculated for the region area, perimeter, roundness, aspect ratio, grayscale mean deviation, and gradient direction histogram principal direction energy, respectively, and Z-score standardization is applied. The standard feature template is the mean vector of the standardized feature vectors of samples of the same type.
[0039] Technical effects of this embodiment; This implementation projects the filling sequence time field, solidification time field, and feeding efficiency field generated by the casting process simulation into two-dimensional filling time maps, two-dimensional solidification time maps, and two-dimensional feeding efficiency maps. After normalization processing to eliminate dimensional differences, these maps are spatially aligned with the visually acquired images of the casting surface at the pixel level, ensuring that each pixel in the visually acquired images of the casting surface carries process risk information. Based on this, the sensitivity configuration module classifies different regions of the visually acquired images of the casting surface into different defect risk levels according to the normalized feeding efficiency channel value and the normalized filling time channel value, and assigns differentiated visual signal processing sensitivity parameters. Because the high-risk shrinkage porosity region receives a lower grayscale contrast segmentation threshold and a smaller minimum connected region area constraint, weak shrinkage porosity grayscale anomalies within the high-risk shrinkage porosity region can be effectively segmented and detected. Similarly, because the high-risk cold shut region receives enhanced directional gradient filtering parameters and a lower edge response threshold, subtle cold shut linear features within the high-risk cold shut region can be effectively captured. Therefore, compared to the processing method of using a uniform sensitivity threshold for the entire image, this implementation method specifically improves the signal response capability in high-defect areas, overcoming the problem of missed detection caused by insufficient signal response in high-risk areas under a uniform sensitivity configuration. Simultaneously, the classification verification module uses prior knowledge of defect types predicted by the normalized shrinkage efficiency channel value and the normalized filling time channel value to constrain and verify the visual morphological classification results. When the morphological features are consistent with the expected types of the normalized shrinkage efficiency channel value and the normalized filling time channel value, the classification result is confirmed and a process cause annotation is added. When they are inconsistent, a full-type reclassification process is triggered, thereby filtering out unreasonable classification outputs in terms of process, ensuring that the defect classification results are supported by both visual morphological basis and casting process basis, thus improving the credibility and interpretability of the classification results.
[0040] This application scenario focuses on an aluminum alloy shell casting produced in a foundry. The casting is an integrally formed structure of a thin-walled top cover and a thick-walled base. The top cover area has a wall thickness of approximately 3 mm, while the base flange area has a wall thickness of approximately 18 mm. The gate is located in the middle of the side of the casting. Due to the top cover's distance from the gate and its thin wall, there is a significant temperature loss in the molten metal during the final stage of filling, posing a high risk of cold shuts. The base flange area is a typical hot spot with a long feeding channel, also posing a high risk of shrinkage porosity. Visual images of the casting surface were acquired using an industrial linear array camera at a fixed station, with an image resolution of 2048×1536 pixels. The casting process simulation software has completed a numerical simulation of the entire filling and solidification process of this casting, outputting a 3D simulation result file containing the filling sequence time field, solidification time field, and feeding efficiency field, which serves as the process field input for this system.
[0041] The process field projection module processes the 3D simulation field data of the casting. For each node of the casting surface mesh, field values are sampled along the outer normal direction within a preset depth range (5 mm in this example). The maximum value on the sampling path is taken for the filling sequence time field and solidification time field, and the minimum value is taken for the feeding efficiency field, generating 2D filling time map, 2D solidification time map, and 2D feeding efficiency map, respectively. Then, the pixel values of the three maps are normalized and scaled to a specific size. Interval. The normalization formula is: ,in These are the projected values of the original field quantity. and These are the minimum and maximum values of the field quantity across the entire casting surface, respectively. These are the normalized pixel values.
[0042] Table 1. Examples of process field projection results (typical surface area nodes) The spatial registration module performs pixel-level alignment between the three normalized two-dimensional process parameter diagrams and the visually acquired images of the casting surface. The feature point matching submodule extracts 14 geometric feature points—corner points, arc endpoints, and intersection points of the surface—from the casting CAD model, and simultaneously extracts corresponding image feature points from the visually acquired images. Based on the correspondence between the two sets of feature points, the affine transformation matrix is calculated. This is used to map the coordinate system of the process parameter diagram to the image pixel coordinate system. The image fusion submodule utilizes... Coordinate transformation and resampling were performed on the three process parameter images to align them with the visually acquired images at the pixel level. Then, the visual grayscale signal value, normalized filling time value, normalized solidification time value, and normalized shrinkage efficiency value were used as the first to fourth channels to generate a four-channel process parameter enhancement image.
[0043] Table 2. Four-channel process parameters for enhanced image data of typical pixels after registration. The sensitivity configuration module reads the normalized scaling efficiency channel value (fourth channel) and the normalized filling time channel value (second channel) of each pixel in the enhanced image based on the process parameters, and compares them with a preset threshold. (Supplementation efficiency risk threshold) and (Filling time risk threshold) is compared to complete the regional risk assessment and assign differentiated signal processing parameter groups. The specific values of each parameter group in this example are as follows: The high-sensitivity shrinkage detection signal processing parameter group is... , Pixels; High-sensitivity cold shut detection signal processing parameter set , Standard signal processing parameter set , Pixel.
[0044] Table 3. Risk assessment and sensitivity parameter allocation results for typical pixels. The generated spatial heterogeneity visual signal processing sensitivity configuration map records the parameter group category corresponding to each pixel in the entire image, covering the high-risk area of cold insulation at the far corner of the top cover (approximately 18% of the image area), the high-risk area of shrinkage in the base flange and central area (approximately 22% of the image area), and the remaining standard areas (approximately 60% of the image area).
[0045] The adaptive segmentation module performs segmentation processing on each region of the visually acquired image according to the sensitivity configuration map, using corresponding parameters. For the high-risk cold-seal area at the far corner of the top cover, [the following is applied]: Perform multi-directional gradient filtering to extract edge response values exceeding The linear interconnected structure revealed one linear candidate defect area, labeled "cold shut" as the expected type. For the high-risk shrinkage porosity area in the base flange and center, [further details are needed]. Perform local adaptive threshold segmentation to extract connected components with a connected area not less than [value missing]. In the dark area of the pixel, two candidate defect areas were detected, both labeled with the expected type "shrinkage loosening". For the standard area... Perform standard grayscale thresholding to detect one candidate region, and attach the expected type label "Pending". Summarize to generate a candidate defect region set containing four candidate defect regions.
[0046] Table 4. Set of candidate defect regions The classification and verification module performs process constraint classification and verification processing on each of the four candidate defect regions. The calculation process is illustrated using candidate region 2 (the shrinkage candidate region at the base flange) as an example. The morphological feature extraction submodule extracts a 6-dimensional morphological feature vector from candidate region 2, which is then standardized to obtain... The six components correspond to the region area, perimeter, roundness, aspect ratio, grayscale mean deviation, and grayscale gradient direction histogram principal direction energy, respectively. The system retrieves standard feature templates for contracted looseness. Calculate the matching confidence score: ; in For standardized morphological feature vectors The One portion, Standard feature template for shrinkage-type The One portion, Confidence threshold , The classification decision submodule confirmed that candidate region 2 was a shrinkage defect, and added the process cause label "insufficient shrinkage channel". The remaining candidate regions were processed in the same way, and the results are summarized below.
[0047] Table 5 Classification Verification Results and Final Inspection Report Matching confidence of candidate region 4 This triggers a full-type reclassification process, calculating the cosine similarity between its morphological feature vector and the standard feature templates of all defect types in the system. The cosine similarity with the slag inclusion template is the highest (0.89), and the final output reclassification result is slag inclusion, without adding process cause annotation.
[0048] In the entire processing flow, data starts from the 3D field of casting process simulation, is compressed into a 2D surface distribution map by the process field projection module, and normalized to eliminate dimensional differences. The spatial registration module then fuses the data with visually acquired images at the pixel level, forming a four-channel process parameter enhanced image, ensuring each pixel carries both grayscale and process risk information. The sensitivity configuration module divides the image into differentiated risk regions based on the process parameter channel values and assigns corresponding parameter groups, generating a spatial heterogeneity sensitivity configuration map. The adaptive segmentation module performs targeted segmentation on each region according to the configuration map, generating a set of candidate defect regions carrying expected type labels. The classification verification module uses cosine similarity to measure the consistency between morphological features and process expectations; if consistent, it directly confirms and adds the process cause; if inconsistent, it triggers reclassification, ultimately outputting an inspection report that combines visual morphological evidence and casting process evidence. The output data of each module is passed step-by-step, with process field information permeating the entire process from sensitivity configuration to classification verification, ensuring the continuity and logical consistency of data flow.
[0049] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A visual signal processing system for casting defect inspection, characterized in that, include: The process field projection module is configured to perform projection processing along the normal direction of the casting surface on the filling sequence time field, solidification time field and feeding efficiency field in the casting process simulation results, and generate a two-dimensional filling time map, a two-dimensional solidification time map and a two-dimensional feeding efficiency map. The spatial registration module is configured to perform pixel-level alignment of the normalized two-dimensional filling time map, two-dimensional solidification time map, and two-dimensional feeding efficiency map with the visual acquisition image of the casting surface, and generate a four-channel process parameter enhancement image. The sensitivity configuration module is configured to enhance the normalized scaling efficiency channel value and normalized filling time channel value of each pixel in the image based on the process parameters, assign differentiated visual signal processing sensitivity parameters to each spatial region, and generate a spatial heterogeneity visual signal processing sensitivity configuration map. The adaptive segmentation module is configured to perform segmentation processing on each region of the visually acquired image of the casting surface according to the sensitivity configuration map, and generate a set of candidate defect regions and expected defect type labels. The classification and verification module is configured to extract morphological feature vectors from candidate defect regions and calculate the matching confidence between them and the standard feature templates corresponding to the expected defect type labels. Based on the matching confidence, the defect type is confirmed or reclassified, and an inspection report is output.
2. The visual signal processing system for casting defect inspection according to claim 1, characterized in that, When the process field projection module performs projection processing along the normal direction of the casting surface, it samples the field quantity values within a preset depth range along the outward normal direction of each surface grid node on the casting surface, and takes the extreme value on the sampling path as the projection value of the surface grid node; it takes the maximum value on the sampling path for the filling sequence time field, the maximum value on the sampling path for the solidification time field, and the minimum value on the sampling path for the feeding efficiency field.
3. The visual signal processing system for casting defect inspection according to claim 1, characterized in that, After projection, the process field projection module performs normalization processing on the pixel values of the two-dimensional filling time map, the two-dimensional solidification time map, and the two-dimensional feeding efficiency map, respectively, scaling the pixel values uniformly to [a specific scale]. Interval.
4. The visual signal processing system for casting defect inspection according to claim 1, characterized in that, The spatial registration module includes a feature point matching submodule. The feature point matching submodule extracts a set of geometric feature points on the surface of the casting based on the casting CAD model, extracts a corresponding set of image feature points from the visually acquired image of the casting surface, and calculates the affine transformation matrix from the coordinate system of the two-dimensional process parameter map to the coordinate system of the image pixels through the correspondence between the geometric feature points and the image feature points. The affine transformation matrix is then used to perform coordinate transformation and resampling on the two-dimensional filling time map, the two-dimensional solidification time map, and the two-dimensional shrinkage efficiency map, respectively.
5. The visual signal processing system for casting defect inspection according to claim 1, characterized in that, The four-channel process parameter enhancement image uses the visual grayscale signal value as the first channel, the normalized filling time value as the second channel, the normalized solidification time value as the third channel, and the normalized feeding efficiency value as the fourth channel.
6. The visual signal processing system for casting defect inspection according to claim 1, characterized in that, The sensitivity configuration module sets the normalized scaling efficiency channel value of each pixel against the scaling efficiency risk threshold. Compare the normalized filling time channel values with the filling time risk threshold. Comparison; for normalized compensation efficiency channel values lower than The pixel region was identified as a high-risk area for scaling down, and a segmentation threshold including grayscale contrast was assigned. and minimum connected region area threshold High-sensitivity shrinkage detection signal processing parameter set; for normalized filling time channel values exceeding The pixel region was identified as a high-risk area for cold shut-off, and parameters including the directional filter kernel size were assigned. and edge response threshold A high-sensitivity cold shut detection signal processing parameter set; and a standard signal processing parameter set assigned to pixel regions that do not meet the above two conditions.
7. The visual signal processing system for casting defect inspection according to claim 6, characterized in that, When a pixel simultaneously satisfies the normalized scaling efficiency channel value being lower than And the normalized filling time channel value exceeds At that time, the region where the pixel is located is simultaneously subjected to dual detection processing by both the high-sensitivity shrinkage detection signal processing parameter group and the high-sensitivity cold shut detection signal processing parameter group.
8. The visual signal processing system for casting defect inspection according to claim 6, characterized in that, The adaptive segmentation module processes the regions assigned with high-sensitivity sag detection signal processing parameter sets, in order to and Local adaptive thresholding is performed on the parameters to extract dark regions with gray values lower than the local background and connected areas satisfying the lower limit constraint as candidate defect regions for shrinkage porosity; for regions assigned to high-sensitivity cold shut detection signal processing parameter groups, the following is used: Perform multi-directional gradient filtering to extract edge response values exceeding The linear connected structure is used as a candidate defect region for cold shuts.
9. The visual signal processing system for casting defect inspection according to claim 1, characterized in that, The classification verification module uses morphological feature vectors standardized by cosine similarity calculation. With standard feature template Match confidence between : ; in Morphological feature vectors The One portion, Standard feature template The One portion, The morphological feature dimension is preset; when Greater than or equal to the confidence threshold When confirming that the classification result of the candidate defect region is the type indicated by the expected defect type label, and adding a process cause annotation, when Less than The morphological feature vectors of candidate defect regions are compared with the standard feature templates of all defect types one by one to calculate the cosine similarity, and the type with the highest cosine similarity is selected as the reclassification result.