Aluminum alloy casting defect identification method and system based on image analysis
By employing multimodal image analysis methods, combined with visible light, thermal imaging, and X-ray radiographic images, the problems of missed and false detections in aluminum alloy casting defect identification have been solved, achieving comprehensive defect identification and efficient detection, which is suitable for real-time quality control in aluminum alloy casting production lines.
Patent Information
- Application Number
- CN202511562757.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2025-11-28
AI Technical Summary
Existing methods for identifying defects in aluminum alloy castings rely on single-modal image analysis, leading to missed and false detections. They are particularly difficult to identify buried defects and defects with weak thermal characteristics, and lack the complementarity of multimodal features.
A multimodal image analysis method is adopted, including visible light, thermal images and X-ray radiographic images. Through unified coordinate system registration and regional analysis, the surface texture, temperature gradient and radiographic projection comprehensive index are extracted, and the matching and judgment are performed in combination with the preset defect interval.
It enables comprehensive defect identification of aluminum alloy castings, reduces the rate of missed and false detections, improves the reliability and efficiency of inspection, is suitable for real-time inspection on the production line, and reduces the time for manual intervention and the complexity of system integration.
Smart Images

Figure CN121033043A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image analysis, in particular to an aluminum alloy casting defect identification method and system based on image analysis. BACKGROUND
[0002] Aluminum alloy castings are widely used in aerospace, automobile manufacturing, rail transportation, shipbuilding equipment and other fields due to their light weight, high specific strength, good corrosion resistance and excellent forming performance. In actual production, aluminum alloy casting process involves melting, pouring, cooling, solidification, demolding and post-processing, etc. The fluctuation of process parameters in any of these links may introduce internal or surface defects such as porosity, shrinkage, porosity, inclusions, cracks, etc. These defects not only reduce the mechanical properties of the casting, but also may cause fatigue failure, stress concentration and corrosion propagation during service, seriously affecting the safety and service life of the product.
[0003] With the development of industrial detection technology, quality control methods based on non-destructive testing have gradually become an important part of aluminum alloy casting production. Among them, X-ray radiographic imaging, industrial CT scanning, ultrasonic testing and other methods can obtain internal structure information without damaging the casting. Especially X-ray and industrial CT imaging can generate high-resolution radiographic or tomographic images, providing intuitive basis for defect identification and analysis. However, traditional manual interpretation relies on the experience of detection personnel, which not only consumes time and effort, but also is easily affected by subjective factors, resulting in insufficient detection consistency and stability. Therefore, introducing image analysis technology into the aluminum alloy casting defect identification process, using quantitative analysis of image features and automatic recognition algorithm, realizing rapid, objective and repeatable evaluation of defects, has become an important research direction of casting quality detection and intelligent manufacturing.
[0004] The limitations of the prior art at least include the following problems. The current aluminum alloy casting defect identification method generally relies on single modal image data for analysis. This method can only reflect certain characteristic information of the casting. For example, visible light images can obtain surface texture information, but it is difficult to identify internal inclusions, porosity and other buried defects. X-ray radiographic images can reveal internal structure to some extent, but they lack detail expression for surface micro-cracks or slight deformation. Thermal images can reflect abnormal heat flow distribution, but they have limited response to non-thermal defects. Due to the lack of multi-modal complementarity, single modal detection often misses and misidentifies defects, especially when the defects are located inside the casting and the surface texture is normal, or the thermal characteristics of the defects are weak. This is not conducive to comprehensive quality control of aluminum alloy castings. SUMMARY
[0005] In view of the deficiencies of the prior art, the present application provides an aluminum alloy casting defect identification method and system based on image analysis, which solves the problem of missed detection and false detection caused by the lack of multi-modal feature complementation due to the dependence on single modal images in the prior art.
[0006] To achieve the above object, the present application is implemented by the following technical scheme: an aluminum alloy casting defect identification method based on image analysis, comprising the following steps: acquiring multi-modal image data of the aluminum alloy casting to be tested, including visible light, thermal image and X-ray transmission image; performing registration processing on the multi-modal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting to be tested into a plurality of analysis regions; based on the unified coordinate system, acquiring the corresponding regions of the visible light, thermal image and X-ray transmission image in each analysis region, and extracting the visible light, thermal image and X-ray transmission features of the corresponding analysis region; based on the visible light, thermal image and X-ray transmission features, analyzing the surface texture, temperature gradient and transmission projection comprehensive index of each analysis region of the aluminum alloy casting to be tested; and matching and analyzing the surface texture, temperature gradient and transmission projection comprehensive index with the corresponding preset defect interval respectively, and determining that the analysis region is a defect region when any index is in its corresponding defect interval.
[0007] Further, the visible light image includes a plurality of RGB pixel points, and each RGB pixel point corresponds to an RGB pixel value; the thermal image includes a plurality of temperature pixel points, and each temperature pixel point corresponds to a temperature pixel value; and the X-ray transmission image includes a plurality of transmission gray pixel points, and each transmission gray pixel point corresponds to a transmission gray pixel value.
[0008] Further, the specific steps of performing registration processing on the multi-modal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting to be tested into a plurality of analysis regions are as follows: selecting one of the visible light image, the thermal image or the X-ray transmission image as a reference image, and determining the coordinate system of the reference image; performing geometric transformation on the remaining images to map the pixel positions thereof to the coordinate system of the reference image; establishing a unified coordinate based on the multi-modal images after completing the registration processing; and dividing the aluminum alloy casting into a plurality of analysis regions according to a preset division rule under the unified coordinate system.
[0009] Further, the visible light feature values include surface micro-scratch coverage rate value, main direction angle value, edge pixel proportion value, brightness gradient energy value and highlight saturation pixel proportion value; the thermal image feature values include region average temperature value, region temperature span value, temperature gradient average value, isotherm curvature average value and temperature direction difference ratio value; and the X-ray transmission feature values include average transmission gray value, transmission gray variance value, low gray pixel proportion value, low gray connected blob quantity value and blob slenderness ratio average value.
[0010] Further, the specific steps of extracting the visible light, thermal image and X-ray transmission characteristics of the corresponding analysis region are as follows: reading the corresponding regions of the visible light, thermal image and X-ray transmission image in each analysis region of the aluminum alloy casting to be tested; based on the pre-trained image region feature extraction model, the corresponding regions of the visible light, thermal image and X-ray transmission image in each analysis region are respectively subjected to feature extraction to obtain the visible light, thermal image and X-ray transmission characteristics of each analysis region of the aluminum alloy casting to be tested.
[0011] Further, the image region feature extraction model includes a visible light feature extraction network, a thermal image feature extraction network and an X-ray transmission feature extraction network, and the specific steps of obtaining the visible light, thermal image and X-ray transmission characteristics of each analysis region of the aluminum alloy casting to be tested are as follows: in the visible light feature extraction network of the image region feature extraction model, the surface brightness and color distribution of the corresponding regions of the visible light, thermal image and X-ray transmission image in each analysis region are analyzed to obtain the visible light characteristics of the corresponding analysis region; in the thermal image feature extraction network of the image region feature extraction model, the temperature distribution and difference of the corresponding regions of the visible light, thermal image and X-ray transmission image in each analysis region are analyzed to obtain the thermal image characteristics of the corresponding analysis region; in the X-ray transmission feature extraction network of the image region feature extraction model, the transmission density and gray scale fluctuation of the corresponding regions of the visible light, thermal image and X-ray transmission image in each analysis region are analyzed to obtain the X-ray transmission characteristics of the corresponding analysis region.
[0012] Further, the specific steps of analyzing the surface texture comprehensive index of each analysis region of the aluminum alloy casting to be tested are as follows: reading the principal direction angle value of each analysis region of the aluminum alloy casting to be tested and performing standardization processing; combining the principal direction angle value of each analysis region of the aluminum alloy casting to be tested after standardization processing with the corresponding surface micro-scratch coverage value, edge pixel proportion value, brightness gradient energy value and highlight saturation pixel proportion value respectively, comprehensive analysis is performed to obtain the surface texture comprehensive index of the corresponding analysis region.
[0013] Further, the specific steps of analyzing the temperature gradient comprehensive index of each analysis region of the aluminum alloy casting to be tested are as follows: reading the region average temperature value, region temperature span value and temperature gradient average value of each analysis region of the aluminum alloy casting to be tested and performing standardization processing; combining the region average temperature value, region temperature span value and temperature gradient average value of each analysis region of the aluminum alloy casting to be tested after standardization processing with the corresponding isotherm curvature average value and temperature direction difference ratio respectively, comprehensive analysis is performed to obtain the temperature gradient comprehensive index of the corresponding analysis region.
[0014] Further, the specific steps of analyzing the radiographic projection comprehensive index of each analysis region of the aluminum alloy casting to be tested are as follows: reading the average radiographic gray value, radiographic gray variance value and low gray connected blob quantity value of each analysis region of the aluminum alloy casting to be tested, and performing standardization processing; performing comprehensive analysis on the average radiographic gray value, radiographic gray variance value and low gray connected blob quantity value of each analysis region of the aluminum alloy casting to be tested after standardization processing respectively in combination with the corresponding low gray pixel ratio value and blob elongation ratio average value to obtain the radiographic projection comprehensive index of the corresponding analysis region.
[0015] An aluminum alloy casting defect identification system based on image analysis comprises: a multi-modal image acquisition unit for acquiring multi-modal image data of an aluminum alloy casting to be tested, including visible light, thermal image and X-ray radiographic image; a registration and division unit for performing registration processing on the multi-modal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting to be tested into a plurality of analysis regions; a region feature extraction unit for acquiring corresponding regions of visible light, thermal image and X-ray radiographic image in each analysis region based on the unified coordinate system, and extracting visible light, thermal image and X-ray radiographic features of the corresponding analysis region; a region feature analysis unit for analyzing surface texture, temperature gradient and radiographic projection comprehensive index of each analysis region of the aluminum alloy casting to be tested based on the visible light, thermal image and X-ray radiographic features; and a region defect judgment unit for matching and analyzing the surface texture, temperature gradient and radiographic projection comprehensive index with the corresponding preset defect interval respectively, and determining that the analysis region is a defect region when any index is in the corresponding defect interval.
[0016] The present application has the following beneficial effects: (1) The aluminum alloy casting defect identification method based on image analysis breaks through the limitation of traditional single modal detection that can only identify specific types of defects by performing unified registration and regional analysis on visible light, thermal image and X-ray radiographic image. The visible light image can obtain the surface texture details of the casting, the thermal image can reveal the abnormal distribution of heat conduction, and the X-ray radiographic image can reflect the internal structure and density changes. Multi-modal fusion not only realizes the full coverage of surface defects, internal defects and thermal anomaly defects, but also provides complementary information in the case where different defects are not obvious, avoiding missed detection due to the absence of single signal. For example, when there are pores in the casting and no texture abnormality on the surface, the thermal image or X-ray radiographic feature can still significantly reflect the defect position, thereby realizing effective identification of buried defects and improving the reliability of the detection result.
[0017] (2) The aluminum alloy casting defect recognition method based on image analysis not only obtains multi-modal features, but also respectively calculates a surface texture index, a temperature gradient index and a penetration projection comprehensive index for each analysis area, and matches them with a preset defect interval. This determination method based on numerical features converts complex information in the image into comparable quantitative indicators, reduces subjective differences caused by manual judgment, and avoids misjudgment caused by fluctuations in a single index by comparing the comprehensive performance of multiple feature indexes. For example, if the surface texture index is normal, but the temperature gradient index and the penetration projection comprehensive index are in the defect interval, it can be determined that there is an internal thermal anomaly or structural defect. The multi-feature cross-validation mechanism makes the detection process more fault-tolerant and stable, significantly reduces the false detection rate and the missed detection rate, and ensures the accuracy of the quality evaluation of aluminum alloy castings.
[0018] (3) The aluminum alloy casting defect recognition method based on image analysis is highly automated through unified coordinate system registration processing and regional analysis of multi-modal images. In the unified coordinate system, feature extraction and comparative analysis can be directly performed on the same region of different modalities without manual alignment and comparison one by one, which reduces a large amount of manual intervention time. Meanwhile, systematic regional segmentation and feature calculation can be run in parallel in batch casting detection, significantly shortening the detection period. Compared with the traditional method relying on manual observation, the method can achieve rapid screening of a large number of castings while maintaining high precision, and is especially suitable for real-time or quasi-real-time detection on the production line. This not only improves the efficiency and consistency of detection, but also enables timely feedback of detection results to the production process, facilitating rapid adjustment of process parameters and reducing the rate of defective products and rework costs.
[0019] (4) The aluminum alloy casting defect recognition system based on image analysis is modularly designed through multi-modal image acquisition, registration processing, regional feature extraction, feature analysis and defect determination, and seamlessly connects the processing results of different modal images through a unified coordinate system, reducing the complexity of data transmission and format conversion in each link. Since the interfaces and data structures between units are standardized, the system can be directly integrated into the existing aluminum alloy casting production line, connected with industrial cameras, thermal imagers, X-ray detection equipment and production management systems in a plug-and-play manner, avoiding the need for a large amount of customized development and debugging when deploying traditional detection systems. This highly integrated and modular structure enables the system to be quickly switched and deployed in different production lines and different types of casting detection, significantly reducing installation and maintenance costs, while providing a flexible and expandable quality detection platform for production enterprises, which helps to continuously improve product quality control levels without affecting the production rhythm.
[0020] Of course, implementing any product of the present application does not necessarily require achieving all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 A flow chart of an aluminum alloy casting defect recognition method based on image analysis.
[0022] Figure 2 An example of visible light, thermal image and X-ray transillumination image of the aluminum alloy casting to be tested in the aluminum alloy casting defect recognition method based on image analysis.
[0023] Figure 3 A specific step flow chart of obtaining the visible light, thermal image and X-ray transillumination features of each analysis region of the aluminum alloy casting to be tested in the aluminum alloy casting defect recognition method based on image analysis.
[0024] Figure 4 A block diagram of an aluminum alloy casting defect recognition system based on image analysis. DETAILED DESCRIPTION
[0025] Please refer to Figures 1-2 The embodiment of the present application provides a technical scheme: an aluminum alloy casting defect recognition method based on image analysis, comprising the following steps: obtaining multi-modal image data of the aluminum alloy casting to be tested, including visible light, thermal image and X-ray transillumination image; performing registration processing on the multi-modal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting to be tested into a plurality of analysis regions; based on the unified coordinate system, obtaining the corresponding regions of the visible light, thermal image and X-ray transillumination image in each analysis region, and extracting the visible light, thermal image and X-ray transillumination features of the corresponding analysis region; based on the visible light, thermal image and X-ray transillumination features, respectively analyzing the surface texture, temperature gradient and transillumination projection comprehensive index of each analysis region of the aluminum alloy casting to be tested; respectively matching and analyzing the surface texture, temperature gradient and transillumination projection comprehensive index with the corresponding preset defect interval, and when any index is in the corresponding defect interval, determining that the analysis region is a defect region, wherein, Figure 2 From left to right, they are example images of visible light, thermal image and X-ray transillumination image of the aluminum alloy casting to be tested.
[0026] The visible light image includes a plurality of RGB pixel points, and each RGB pixel point corresponds to an RGB pixel value; the thermal image includes a plurality of temperature pixel points, and each temperature pixel point corresponds to a temperature pixel value; and the X-ray transillumination image includes a plurality of transillumination grayscale pixel points, and each transillumination grayscale pixel point corresponds to a transillumination grayscale pixel value.
[0027] Specifically, the specific steps of the registration processing of the multi-modal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting to be measured into a plurality of analysis regions are as follows: one of the visible light image, the thermal image, or the X-ray transmission image is selected as a reference image, and the coordinate system of the reference image is determined, which is specifically: the coordinate system of the reference image adopts a two-dimensional Cartesian coordinate system, the origin is set at the upper left corner of the image, the X-axis is along the horizontal direction, and the Y-axis is along the vertical direction, and the coordinates of each pixel point are determined by its column number and row number; geometric transformation is performed on the remaining images to map the pixel positions to the coordinate system of the reference image to complete the registration processing, which is specifically: for non-reference images, first, a set of feature points corresponding to the boundary of the aluminum alloy casting in the image are extracted, such as corner points, boundary intersection points, or structure points of a specific shape, then a feature matching algorithm (such as scale-invariant feature transform SIFT, speeded up robust features SURF, or ORB feature) is used to match the feature point set of the reference image, the mapping relationship between the matched point pairs is calculated, and the optimal geometric transformation matrix is solved based on the matching result, which can be an affine transformation matrix, a perspective transformation matrix, or a nonlinear deformation matrix, and the specific selection is based on the difference in imaging angle and optical distortion; the pixel point coordinates of the non-reference image are mapped to the coordinate system of the reference image through the transformation matrix, thereby realizing one-to-one correspondence of the pixel positions; a unified coordinate system is established based on the multi-modal images after the registration processing is completed, so that each image corresponds to the same physical position of the aluminum alloy casting in the same coordinate position; in the unified coordinate system, the aluminum alloy casting is divided into a plurality of analysis regions according to a preset division rule, and the preset division rule is specifically an equal grid division method, that is, the part of the image corresponding to the aluminum alloy casting is uniformly divided into a fixed number of rectangular regions along the X-axis and Y-axis.
[0028] In the embodiment, the data from the three different imaging modes of visible light, thermal image, and X-ray transmission can be ensured to realize accurate correspondence in spatial position, so that the same physical position information under different modalities can be directly compared and fused during subsequent analysis, avoiding feature misplacement problems caused by imaging angle difference, optical distortion, or displacement error. By establishing a unified two-dimensional Cartesian coordinate system and using feature point matching and geometric transformation matrix accurate mapping, the pixel-level consistency between multi-modal images is ensured, fundamentally improving the reliability of feature extraction and defect judgment. At the same time, the equal grid division uniformly divides the entire casting region into fixed rectangular analysis units, which not only facilitates batch processing and local defect positioning, but also effectively supports quantitative analysis and statistical comparison of regional features. The combination of high-precision registration and regularized region division makes multi-modal information fusion have a solid spatial reference.
[0029] Specifically, visible light features include surface micro-scratch coverage, principal direction angle, edge pixel ratio, brightness gradient energy, and high-saturation pixel ratio; thermal imaging features include regional average temperature, regional temperature span, average temperature gradient, average isotherm curvature, and temperature direction difference ratio; and X-ray radiographic features include average radiographic grayscale, radiographic grayscale variance, low grayscale pixel ratio, number of low grayscale connected patches, and average patch elongation ratio.
[0030] The specific steps for extracting the visible light, thermal image, and X-ray radiographic features of the corresponding analysis area are as follows: Read the corresponding areas in the visible light, thermal image, and X-ray radiographic images of each analysis area of the aluminum alloy casting to be tested; Based on the pre-trained image region feature extraction model, extract the features of the corresponding areas in the visible light, thermal image, and X-ray radiographic images of each analysis area to obtain the visible light, thermal image, and X-ray radiographic features of each analysis area of the aluminum alloy casting to be tested.
[0031] This implementation scheme can comprehensively characterize the surface condition, heat distribution features, and internal structural information of aluminum alloy castings from three dimensions: visible light, thermal imaging, and X-ray radiography. It forms a complete feature set covering appearance, temperature field, and internal density. Visible light feature values can accurately reflect appearance details such as micro-scratches, edge morphology, and light response. Thermal imaging feature values can reveal thermal anomalies such as abnormal heat conduction, local overheating, or uneven cooling. X-ray radiography feature values can effectively reflect structural defects such as internal pores, cracks, or looseness. By reading multimodal images of the corresponding analysis area under a unified coordinate system and using a pre-trained image region feature extraction model for automated processing, it can ensure that each modal feature corresponds one-to-one and is accurately quantified, avoiding the bias caused by subjective human judgment.
[0032] Specifically, such as Figure 3 As shown, the image region feature extraction model includes a visible light feature extraction network, a thermal image feature extraction network, and an X-ray radiography feature extraction network. The specific steps for obtaining the visible light, thermal image, and X-ray radiography features of each analysis region of the aluminum alloy casting under test are as follows: In the visible light feature extraction network of the image region feature extraction model, surface brightness and color distribution analysis is performed on the corresponding regions of each analysis region in visible light, thermal images, and X-ray radiographs to obtain the visible light features of the corresponding analysis regions, specifically: The corresponding area of the visible light image is converted into a grayscale image. Fine high-frequency texture components are extracted based on high-pass filtering. Suspected micro-scratches are identified by threshold segmentation. The proportion of these pixels to the total number of pixels in the area is calculated as the surface micro-scratch coverage value.
[0033] A direction gradient histogram is counted for the distribution of the micro-scratch pixel points, and an angle corresponding to a direction with a maximum gradient intensity cumulative value is taken as a main direction angle value.
[0034] An edge pixel of a region is extracted by using a Canny edge detection operator, and a proportion of the edge pixel quantity to the total pixel quantity of the region is calculated as an edge pixel proportion value.
[0035] A Sobel gradient calculation is performed on a gray-scale image, a square sum of a horizontal gradient amplitude and a vertical gradient amplitude is calculated, and an average of the square sum in the region is calculated to obtain a luminance gradient energy value.
[0036] A luminance component is extracted from an original RGB image, a high-light luminance threshold is set, a pixel with a luminance greater than the threshold is determined as a high-light saturated pixel, and a proportion of the high-light saturated pixel to the total pixel quantity of the region is calculated to obtain a high-light saturated pixel proportion value. In the thermal image feature extraction network of the image region feature extraction model, temperature distribution and difference analysis is performed on corresponding regions of the visible light image, the thermal image and the X-ray transillumination image in each analysis region to obtain a thermal image feature of the corresponding analysis region, and the thermal image feature comprises: An arithmetic average of temperature pixel values of all temperature pixel points in the region is calculated to obtain a region average temperature value.
[0037] A difference between a maximum value and a minimum value of the temperature pixel values in the region is taken to obtain a region temperature span value.
[0038] A temperature difference between each pixel point and adjacent pixel points above, below, left and right of the pixel point in the region is calculated, an average of absolute values of the temperature differences is calculated to obtain a temperature gradient average value.
[0039] An isotherm is generated based on a region temperature field, a curvature value of each isotherm at all sampling points is calculated, and an average of the curvature values of all isotherms in the region is calculated to obtain an isotherm curvature average value.
[0040] A sum of component intensities of the temperature gradient in a horizontal direction and a vertical direction in the region is calculated, and a ratio of an absolute value of a difference between the two to a sum of the two is taken to obtain a temperature direction difference ratio. In the X-ray transillumination feature extraction network of the image region feature extraction model, transillumination density and gray-scale fluctuation analysis is performed on corresponding regions of the visible light image, the thermal image and the X-ray transillumination image in each analysis region to obtain an X-ray transillumination feature of the corresponding analysis region, and the X-ray transillumination feature comprises: An arithmetic average of gray-scale values of all transillumination gray-scale pixel points in the region is calculated to obtain an average transillumination gray-scale value.
[0041] A variance of the gray-scale values of all transillumination gray-scale pixel points in the region is calculated to obtain a transillumination gray-scale variance value.
[0042] A low gray threshold is set, pixels with a gray value less than the threshold are determined as low gray pixels, and the proportion of the number of low gray pixels to the total number of pixels in the region is calculated to obtain a low gray pixel proportion value.
[0043] Based on the low gray pixel set, the number of connected components obtained by labeling is counted as the number of low gray connected components.
[0044] For each low gray connected component, the aspect ratio of its circumscribed rectangle is calculated, and the average of the aspect ratios of all components is taken to obtain the average aspect ratio of the components.
[0045] The pre-training step of the image region feature extraction model is as follows: A training data set containing multiple types of aluminum alloy casting surface visible light images is constructed, each image is manually labeled with surface defect region, scratch direction, brightness distribution and highlight saturation region information; then the RGB pixel values in each training image are normalized, and the surface brightness channel and color saturation channel features are extracted based on color space conversion (converting RGB values to HSV color space); then, the local texture response is extracted using a convolution kernel size of 3x3, and the main direction angle distribution is calculated by the direction gradient histogram method; further, the pixel threshold segmentation method is used to detect the surface micro scratch area, and the coverage ratio is calculated, and the proportion of high saturation pixels is detected by the highlight threshold; finally, the extracted brightness gradient energy value, edge pixel proportion value, surface micro scratch coverage value and other features are optimized by mean square error back propagation with the labeled label, and the network weight parameters are repeatedly updated until the validation set accuracy meets the preset convergence condition.
[0046] A training data set containing multiple groups of aluminum alloy casting thermographic images is constructed, each temperature pixel point of each thermographic image corresponds to an actual temperature value, and the local abnormal temperature area, isotherm morphology and temperature gradient change information are labeled; secondly, the thermographic pixel value is normalized, and the average temperature value, temperature span value and temperature gradient average value of each local area are calculated using a sliding window method; then, the isotherm extraction algorithm (based on connected component tracking of equal pixel values) is used to calculate the curvature distribution of the isotherm, and the average curvature of the isotherm is obtained; further, the temperature direction difference ratio is calculated by directional gradient temperature distribution analysis; in the feature extraction process, a multi-layer convolution and pooling structure is used to enhance the perception of local temperature fluctuations and overall temperature distribution, and cross-entropy loss back propagation training is performed combined with the artificial labeled abnormal temperature area label; after multiple rounds of training iteration, the convolution kernel weight and fully connected layer parameter are constantly optimized to ensure that the output thermographic features have stable recognition accuracy under multiple temperature distribution modes.
[0047] A training data set containing X-ray radiographic images of aluminum alloy castings is constructed, and each radiographic grayscale pixel point of each radiographic image is labeled with information such as low gray scale defect area, connected blob morphology and elongation ratio; then the gray scale of each radiographic grayscale pixel value is normalized, and the average radiographic grayscale value and the radiographic grayscale variance value of the entire image are calculated; then, based on the gray scale threshold segmentation method, low gray scale pixel points are detected, and the number of low gray scale connected blobs and their geometric elongation ratio average are calculated using the connected domain analysis method; in the network structure, multi-scale convolution is used to extract gray scale change features, and pyramid pooling structure is used to enhance the response ability to defects of different scales; by comparing the above features with the defect position and class label labeled by artificial labeling, the network parameters are optimized by using weighted cross-entropy loss for back propagation; after multiple rounds of training, the network can stably extract features such as average radiographic grayscale value, gray scale variance value, low gray scale pixel ratio value, blob number and elongation ratio average under multiple radiographic grayscale distribution conditions, providing high-reliability feature input for subsequent defect judgment.
[0048] In the embodiment, through the cooperative feature extraction of three different modalities of visible light, thermal image and X-ray, the surface and internal state of the aluminum alloy casting can be revealed in multiple angles in the same analysis area. The visible light features focus on detecting fine scratches, edge changes and highlight reflections, which are suitable for finding surface topography defects. The thermal image features reveal thermal abnormalities in the material interior or surface layer through temperature distribution, gradient and isotherm morphology, reflecting potential structural unevenness or stress concentration. The X-ray radiographic features identify internal porosity, inclusions and other hidden defects through radiographic grayscale and low grayscale connected structure analysis. This multi-modal division and cooperation method can complement the identification of details that may be missed by a single modality, greatly improving the accuracy of defect detection.
[0049] Specifically, the specific steps of analyzing the surface texture comprehensive index of each analysis area of the aluminum alloy casting to be measured are as follows: reading the principal direction angle value of each analysis area of the aluminum alloy casting to be measured, and performing standardization processing (i.e. unit removal processing); combining the principal direction angle value of each analysis area of the aluminum alloy casting to be measured after standardization processing with the corresponding surface micro-scratch coverage rate value, edge pixel ratio value, brightness gradient energy value and highlight saturation pixel ratio value respectively, and performing comprehensive analysis to obtain the surface texture comprehensive index of the corresponding analysis area.
[0050] Specifically, the specific steps of analyzing the surface texture comprehensive index of each analysis area of the aluminum alloy casting to be measured are as follows: reading the principal direction angle value of each analysis area of the aluminum alloy casting to be measured, and performing standardization processing (i.e. unit removal processing); combining the principal direction angle value of each analysis area of the aluminum alloy casting to be measured after standardization processing with the corresponding surface micro-scratch coverage rate value, edge pixel ratio value, brightness gradient energy value and highlight saturation pixel ratio value respectively, and performing comprehensive analysis to obtain the surface texture comprehensive index of the corresponding analysis area. ; wherein, , , , , , The surface texture comprehensive index, the surface micro-scratch coverage value, the main direction angle value, the edge pixel proportion value, the brightness gradient energy value, and the highlight saturated pixel proportion value of a certain analysis region of the aluminum alloy casting to be measured are sequentially obtained. , , , , The surface micro-scratch coverage weight coefficient, the main direction angle weight coefficient, the edge pixel proportion weight coefficient, the brightness gradient energy weight coefficient, and the highlight saturated pixel proportion weight coefficient stored in the database are sequentially obtained, and in this embodiment, the weight coefficients are equal weights, and the sum is 1.
[0051] In this embodiment, by weighting and fusing the surface texture characteristics such as the surface micro-scratch coverage, the main direction angle, the edge pixel proportion, the brightness gradient energy, and the highlight saturated pixel proportion, a quantifiable surface texture comprehensive index is formed, which can more comprehensively and objectively reflect the overall quality state of the surface of the aluminum alloy casting. A single characteristic can only describe the surface information in a certain aspect, for example, the micro-scratch coverage only reflects the damage degree, and the brightness gradient energy is more inclined to the texture definition. By integrating these characteristics in an index through the weight coefficients, not only can the misjudgment caused by the fluctuation of a single index be avoided, but also the importance of different characteristics can be balanced to achieve more stable quality evaluation. At the same time, the formulaic processing makes the detection result repeatable and comparable, which is convenient for quickly screening unqualified products in batch production and provides a quantitative basis for subsequent defect positioning and production process adjustment.
[0052] Specifically, the specific steps of analyzing the temperature gradient comprehensive index of each analysis region of the aluminum alloy casting to be measured are as follows: reading the region average temperature value, the region temperature span value, and the temperature gradient average value of each analysis region of the aluminum alloy casting to be measured, and performing standardization processing (i.e., unit removal processing); combining the region average temperature value, the region temperature span value, and the temperature gradient average value of each analysis region of the aluminum alloy casting to be measured after standardization processing with the corresponding isotherm curvature average value and temperature direction difference ratio value, respectively, to obtain the temperature gradient comprehensive index of the corresponding analysis region.
[0053] The specific formula for calculating the temperature gradient comprehensive index of a certain analysis region of the aluminum alloy casting to be measured is as follows: ; wherein, , , , , , The temperature gradient comprehensive index, the region average temperature value, the region temperature span value, the temperature gradient average value, the isotherm curvature average value, and the temperature direction difference ratio value of a certain analysis region of the aluminum alloy casting to be measured are sequentially obtained. 、 、 、 、 The area average temperature weight coefficient, the area temperature span weight coefficient, the average temperature gradient weight coefficient, the average isotherm curvature weight coefficient, and the temperature direction difference ratio weight coefficient stored in the database in sequence, and in this embodiment, the weight coefficients are equal weights, and the value is 1.
[0054] In this embodiment, by fusing the multi-dimensional thermal distribution characteristics of the area average temperature, the temperature span, the temperature gradient, the isotherm curvature, and the temperature direction difference, a temperature gradient comprehensive index is constructed, which can comprehensively depict the overall uniformity and stability of the thermal field of the aluminum alloy casting in the forming or cooling process. A single temperature index cannot accurately reflect the complex thermal changes in the casting, and the comprehensive index integrates different thermal characteristics according to the weight. It not only can identify potential defects such as local overheating or insufficient cooling, but also can reveal the spatial coordination of temperature distribution, provide reliable basis for judging thermal stress concentration, shrinkage risk and other key problems. The standardization processing eliminates the dimensional difference of different characteristic quantities, so that it can be directly used for quality comparison and trend monitoring between production batches. In addition, this method has high quantification degree and is easy to combine with automatic detection system, which can realize more accurate quality judgment and process optimization decision without increasing detection time.
[0055] Specifically, the specific steps of analyzing the radiographic projection comprehensive index of each analysis area of the aluminum alloy casting to be measured are as follows: reading the average radiographic gray value, radiographic gray variance value, and low gray connected blob quantity value of each analysis area of the aluminum alloy casting to be measured, and performing standardization processing (i.e. unit processing); combining the average radiographic gray value, radiographic gray variance value, and low gray connected blob quantity value of each analysis area of the aluminum alloy casting to be measured after standardization processing with the corresponding low gray pixel ratio value and blob elongation ratio average value respectively, to obtain the radiographic projection comprehensive index of the corresponding analysis area.
[0056] The specific formula for calculating the radiographic projection comprehensive index of a certain analysis area of the aluminum alloy casting to be measured is as follows: ; wherein, 、 、 、 、 、 The radiographic projection comprehensive index, the average radiographic gray value, the radiographic gray variance value, the low gray pixel ratio value, the low gray connected blob quantity value, and the blob elongation ratio average value of a certain analysis area of the aluminum alloy casting to be measured in sequence, 、 、 、 、 The average transillumination gray weight coefficient, the transillumination gray variance weight coefficient, the low gray pixel proportion weight coefficient, the low gray connected blob quantity weight coefficient, and the blob elongation ratio weight coefficient are stored in the database in sequence, and in this embodiment, the weight coefficients are equal, and the sum is 1.
[0057] In this embodiment, the average transillumination gray, the gray variance, the low gray connected blob quantity, and the low gray pixel proportion, the blob elongation ratio, and other image features are comprehensively analyzed to construct a transillumination projection comprehensive index, which can comprehensively reflect the internal organization density and defect distribution of the aluminum alloy casting. Relying on a single transillumination feature alone is prone to cause judgment deviation due to noise or local abnormalities, but the method can capture the overall transillumination brightness change trend and locate the local low gray abnormal area and its morphological features, thereby effectively identifying internal defects such as shrinkage holes, porosity, and inclusions. Standardization processing eliminates the dimensional differences of different features.
[0058] Please refer to Figure 4 The embodiment of the present application provides a technical scheme: an aluminum alloy casting defect identification system based on image analysis, comprising: a multi-modal image acquisition unit for acquiring multi-modal image data of the aluminum alloy casting to be measured, including visible light, thermal image, and X-ray transillumination image; a registration and division unit for performing registration processing on the multi-modal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting to be measured into a plurality of analysis regions; a region feature extraction unit for acquiring corresponding regions of the visible light, thermal image, and X-ray transillumination image in each analysis region based on the unified coordinate system, and extracting visible light, thermal image, and X-ray transillumination features of the corresponding analysis region; a region feature analysis unit for analyzing the surface texture, temperature gradient, and transillumination projection comprehensive index of each analysis region of the aluminum alloy casting to be measured based on the visible light, thermal image, and X-ray transillumination features; and a region defect determination unit for matching and analyzing the surface texture, temperature gradient, and transillumination projection comprehensive index with the corresponding preset defect interval, respectively, and determining that the analysis region is a defect region when any index is in the corresponding defect interval.
[0059] Although the preferred embodiments of the present application have been described, those skilled in the art can make further changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0060] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for defect identification in aluminum alloy castings based on image analysis, characterized in that, Includes the following steps: Acquire multimodal image data of the aluminum alloy casting under test, including visible light, thermal images and X-ray radiographic images; The multimodal image data is registered to establish a unified coordinate system, and the aluminum alloy casting under test is divided into several analysis areas. Based on a unified coordinate system, the corresponding regions of visible light, thermal imaging, and X-ray radiography images are obtained in each analysis region, and the visible light, thermal imaging, and X-ray radiography features of the corresponding analysis regions are extracted. Based on visible light, thermal imaging and X-ray radiographic features, the surface texture, temperature gradient and radiographic projection comprehensive index of each analysis area of the aluminum alloy casting under test are analyzed respectively. The surface texture, temperature gradient, and projection projection index are matched with the corresponding preset defect intervals. When any index is within its corresponding defect interval, the analysis area is determined to be a defect area.
2. The method for defect identification of aluminum alloy castings based on image analysis according to claim 1, characterized in that, Visible light images include several RGB pixels, and each RGB pixel corresponds to an RGB pixel value. Thermal images include several temperature pixels, and each temperature pixel corresponds to a temperature pixel value. X-ray radiographs include several radiograph grayscale pixels, and each radiograph grayscale pixel corresponds to a radiograph grayscale pixel value.
3. The method for defect identification of aluminum alloy castings based on image analysis according to claim 1, characterized in that, The specific steps for registering multimodal image data, establishing a unified coordinate system, and dividing the aluminum alloy casting under test into several analysis regions are as follows: Select one of the following as a reference image: a visible light image, a thermal image, or an X-ray radiograph, and determine the coordinate system of the reference image; Perform geometric transformations on the remaining images to map their pixel positions to the coordinate system of the reference image; Establish unified coordinates based on the multimodal images after registration processing; Under a unified coordinate system, the aluminum alloy casting is divided into several analysis regions according to the preset division rules.
4. The method for defect identification of aluminum alloy castings based on image analysis according to claim 1, characterized in that, Visible light features include surface micro-scratch coverage, principal direction angle, edge pixel ratio, brightness gradient energy, and high-saturation pixel ratio. Thermal image features include region average temperature, region temperature span, average temperature gradient, average isotherm curvature, and temperature direction difference ratio. X-ray radiographic features include average radiographic grayscale, radiographic grayscale variance, low grayscale pixel ratio, number of low grayscale connected patches, and average patch elongation ratio.
5. The image analysis-based defect identification method for aluminum alloy castings according to claim 4, characterized in that, The specific steps for extracting the visible light, thermal image, and X-ray radiographic features of the corresponding analysis area are as follows: Read the corresponding areas in the visible light, thermal image, and X-ray radiographic images of each analysis area of the aluminum alloy casting under test; Based on a pre-trained image region feature extraction model, features are extracted from the corresponding regions in the visible light, thermal image, and X-ray radiographic images of each analysis region to obtain the visible light, thermal image, and X-ray radiographic features of each analysis region of the aluminum alloy casting under test.
6. The method for defect identification of aluminum alloy castings based on image analysis according to claim 5, characterized in that, The image region feature extraction model includes a visible light feature extraction network, a thermal image feature extraction network, and an X-ray radiographic feature extraction network. The specific steps for obtaining the visible light, thermal image, and X-ray radiographic features of each analysis region of the aluminum alloy casting under test are as follows: In the visible light feature extraction network of the image region feature extraction model, the surface brightness and color distribution of the corresponding regions in the visible light, thermal image and X-ray radiographic images of each analysis region are analyzed to obtain the visible light features of the corresponding analysis region. In the thermal image feature extraction network of the image region feature extraction model, temperature distribution and difference analysis are performed on the corresponding regions of each analysis region in visible light, thermal image and X-ray radiographic images to obtain the thermal image features of the corresponding analysis region. In the X-ray radiographic feature extraction network of the image region feature extraction model, the radiographic density and grayscale fluctuation analysis are performed on the corresponding regions of the visible light, thermal image and X-ray radiographic image within each analysis region to obtain the X-ray radiographic features of the corresponding analysis region.
7. The image analysis-based defect identification method for aluminum alloy castings according to claim 4, characterized in that, The specific steps for analyzing the comprehensive surface texture index of each analytical region of the aluminum alloy casting under test are as follows: Read the principal direction angle values of each analysis region of the aluminum alloy casting under test and perform standardization processing; The principal direction angle value of each analysis area of the standardized aluminum alloy casting under test is combined with the corresponding surface micro-scratch coverage value, edge pixel ratio value, brightness gradient energy value, and high-gloss saturation pixel ratio value for comprehensive analysis to obtain the comprehensive surface texture index of the corresponding analysis area.
8. The method for defect identification of aluminum alloy castings based on image analysis according to claim 4, characterized in that, The specific steps for analyzing the comprehensive index of the temperature gradient in each analytical region of the aluminum alloy casting under test are as follows: Read the average temperature value, temperature span value, and average temperature gradient value of each analysis area of the aluminum alloy casting under test, and perform standardization processing. The average temperature value, temperature span value, and average temperature gradient value of each analysis area of the standardized aluminum alloy casting under test are combined with the average curvature value of the corresponding isotherms and the temperature direction difference ratio for comprehensive analysis to obtain the comprehensive temperature gradient index of the corresponding analysis area.
9. The image analysis-based defect identification method for aluminum alloy castings according to claim 4, characterized in that, The specific steps for analyzing the comprehensive index of the radiographic projection of each analytical region of the aluminum alloy casting under test are as follows: The average radiometric grayscale value, radiometric grayscale variance value, and number of low-grayscale connected patches of each analysis area of the aluminum alloy casting under test are read and standardized. The average radiometric grayscale value, radiometric grayscale variance value, and number of low-grayscale connected patches of each analysis area of the standardized aluminum alloy casting under test are combined with the corresponding low-grayscale pixel ratio value and the mean patch slenderness ratio value for comprehensive analysis to obtain the comprehensive radiometric projection index of the corresponding analysis area.
10. An image analysis-based defect identification system for aluminum alloy castings, employing the image analysis-based defect identification method for aluminum alloy castings as described in any one of claims 1-9, characterized in that, include: The multimodal image acquisition unit is used to acquire multimodal image data of the aluminum alloy casting under test, including visible light, thermal images and X-ray radiographic images; The registration and division unit is used to register multimodal image data, establish a unified coordinate system, and divide the aluminum alloy casting under test into several analysis areas. The region feature extraction unit is used to acquire the corresponding regions of visible light, thermal image and X-ray radiography images in each analysis region based on a unified coordinate system, and extract the visible light, thermal image and X-ray radiography features of the corresponding analysis region. The regional feature analysis unit is used to analyze the surface texture, temperature gradient, and comprehensive projection index of each analysis area of the aluminum alloy casting under test based on visible light, thermal imaging, and X-ray radiographic features. The regional defect determination unit is used to match and analyze the surface texture, temperature gradient and transmission projection comprehensive index with the preset corresponding defect intervals. When any index is within its corresponding defect interval, the analysis area is determined to be a defect area.
Citation Information
Patent Citations
Surface defect detection method and device based on machine vision
CN119600026A
Titanium alloy bar visual detection method based on image segmentation
CN119991670A
Aluminum alloy casting machining forming quality evaluation method
CN120451164A
Defect detection method combining vision and X-ray detection technology
CN120598968A
Part defect detection method and system based on image model
CN120612289A
Cited By
Three-dimensional shape defect detection system based on flight time and phase correction
CN122130717A
