Method and system for detecting internal defects of aluminum alloy casting electric power fittings
By combining multi-view infrared image acquisition with 3D modeling and machine learning, the blind spots and high costs of internal defect detection in aluminum alloy cast power fittings have been solved, achieving efficient and low-cost non-destructive testing and improving the accuracy and efficiency of the test.
Patent Information
- Application Number
- CN202511558571.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-16
AI Technical Summary
Existing technologies for detecting internal defects in aluminum alloy cast power fittings suffer from blind spots, low accuracy, and poor efficiency. Furthermore, the equipment costs are high, making it difficult to achieve efficient and low-cost non-destructive testing.
Multi-view color infrared image acquisition and preprocessing, combined with 3D modeling and machine learning models, are employed. Multiple infrared cameras are simultaneously triggered to acquire multi-view infrared images of an object at different times, constructing a 3D temperature field, and using a 3D convolutional neural network for defect determination.
It achieves full-domain perception of complex structural objects, eliminates blind spots in detection, enables objective and accurate identification and quantification of defects, reduces detection costs, and improves detection efficiency and accuracy.
Smart Images

Figure CN121353247A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of testing technology, specifically to a method and system for detecting internal defects in aluminum alloy cast power fittings. Background Technology
[0002] Aluminum alloy castings are widely used in aerospace, automotive manufacturing, precision instruments, and power transmission and distribution (such as various power fittings) due to their excellent specific strength, good casting performance, and machinability. Power fittings, as critical connection, fixation, and protection components on power transmission lines, directly affect the stable operation and reliability of the power grid through their structural integrity and internal quality. However, during the casting process of aluminum alloy fittings, due to incomplete melt purification, improper control of solidification shrinkage, unreasonable mold design, or fluctuations in casting parameters, microscopic or macroscopic defects such as porosity, shrinkage cavities, inclusions, and cold shuts are easily generated inside the castings. These defects significantly reduce the mechanical properties of the material, such as fatigue strength, toughness, and load-bearing capacity, and may become stress concentration points. Under long-term loads, vibrations, and environmental corrosion, these defects can induce crack propagation, seriously affecting the dimensional stability and service life of the parts, and posing serious hidden dangers to the safe operation of critical components such as power facilities.
[0003] Currently, conventional non-destructive testing (NDT) techniques for such internal defects in industry, such as ultrasonic testing (UT), phased array testing (PAUT), and X-ray testing (RT), have become relatively mature. Ultrasonic testing utilizes the characteristic that high-frequency sound waves reflect or attenuate when they encounter defects in materials to locate them. However, it has blind spots for complex-shaped workpieces and typically requires coupling agents and skilled operators. While phased array technology improves testing flexibility and efficiency, it is expensive and data analysis is complex. X-ray testing can visually present the two-dimensional projection morphology of defects, but the detection rate for certain planar defects (such as cracks) is significantly affected by orientation, and it also presents radiation safety protection issues. Furthermore, its equipment investment and operating costs are high. These technologies generally share some common limitations.
[0004] Therefore, developing an efficient, low-cost, and easy-to-implement non-destructive testing method is of great significance for improving the quality control and production efficiency of aluminum alloy castings. To this end, this invention provides a method and system for detecting internal defects in aluminum alloy cast power fittings. Summary of the Invention
[0005] To address the aforementioned shortcomings of existing technologies, this invention provides a method and system for detecting internal defects in aluminum alloy cast power fittings. This technology can be deeply integrated into the automated testing system of production lines, helping various industries achieve full lifecycle quality control of products, reducing the risk of safety accidents caused by internal defects in parts, and promoting the overall improvement of industry quality.
[0006] This invention provides the following technical solution: a method for detecting internal defects in aluminum alloy cast power fittings, comprising the following steps:
[0007] S1: Multi-view color infrared image acquisition and preprocessing. Multi-view color mapping infrared images are acquired by multiple infrared cameras that are triggered simultaneously during the cooling process of the fittings at the initial time T1 and the time T2 after the interval Δt. The images are then subjected to color-temperature calibration, noise reduction and color contrast enhancement.
[0008] S2: Image-based 3D modeling. Based on multi-view color infrared images at times T1 and T2, the 3D geometric model of the hardware is reconstructed through stereo vision matching, and the color information of the images at the two times is mapped onto the surface of the 3D model to form the T1 color 3D model and the T2 color 3D model.
[0009] S3: Extraction of difference and uniformity features. Calculate the image difference features between the T1 and T2 color 3D models, and the color uniformity features of the color model at a single time step. Construct a feature matrix that integrates the two types of features.
[0010] S4: Machine learning model training and defect determination. The model is trained by labeled samples to obtain image difference thresholds and color uniformity thresholds. The metal tool to be inspected is directly compared with the difference and color uniformity of T1-T2 images. If the difference exceeds the threshold, it is determined to be a defect. The specific steps include dataset construction, model training, threshold determination, defect determination and output.
[0011] Preferably, the first set of infrared images is acquired at the initial time T1. (N is the number of cameras, here N=4), after an interval of time Δt, the second set of infrared images is acquired at time T2. ;
[0012] First, temperature calibration was performed on all cameras using a standard temperature source, and then Gaussian filtering was applied. ( Image noise is removed using a Gaussian filter kernel, and finally, temperature differences are enhanced by histogram equalization.
[0013] Preferably, the image-based 3D modeling in step S2 needs to be associated with color information, specifically including:
[0014] S21: Three-dimensional geometric modeling. Using stereo vision or structured light methods, a point cloud model of the object surface is reconstructed based on multi-camera images. The SIFT algorithm is used to extract feature points from multi-view color infrared images at times T1 and T2. The pose between cameras is calculated through feature point matching, and a three-dimensional point cloud model of the hardware is generated by combining the principle of triangulation. ( (Number of point clouds);
[0015] S22: Color mapping to 3D model, mapping the image color values at times T1 and T2 to the corresponding point cloud points. Each point The formula for calculating color values is:
[0016]
[0017] Where t∈{1,2} (corresponding to T1, T2). For point The projection function onto the k-color image from the camera. To cover A collection of cameras, =| |;Finally, the T1 color 3D model was obtained. With T2 color 3D model .
[0018] Preferably, step S3, the extraction of difference and uniformity features, requires quantifying image differences and color uniformity, specifically including:
[0019] S31: Image difference feature calculation, based on and Calculate point cloud points The color difference value directly reflects the difference between T1 and T2 images;
[0020] S32: Calculation of color uniformity characteristics, targeting or A colored 3D model, constructing points 8 neighborhood Calculate the color uniformity coefficient: The coefficient of variation, the smaller the value, the more uniform the color, and the more defect-free the area. <0.1);
[0021] S33: Feature matrix construction, for each point The feature vectors are:
[0022] , and These are the mean and standard deviation of the neighborhood temperature difference, and the characteristic matrix, respectively. .
[0023] Preferably, step S4 includes three sub-steps: dataset construction, model training, and model deployment.
[0024] S41: Dataset construction, each sample contains the input feature matrix F and a three-dimensional temperature voxel. The data is augmented with labels by random rotation, horizontal / vertical flipping, scaling, adding Gaussian noise, and perturbation Δt, and then divided into training, validation, and test sets.
[0025] S42: Model training, using a 3D convolutional neural network, with input being a dual-channel image (channel0=T1, channel1=T2) or a three-dimensional temperature voxel. Using the cross-entropy loss function ( For real labels, To predict probabilities, the model is trained using the Adam optimizer, a batch size of 32, and 50-100 training epochs. The parameters are adjusted using the validation set to prevent overfitting.
[0026] Preferably, step S4 further includes establishing a cooling feature model, setting an early warning threshold and output. Based on the model training results, a cooling feature model is established for samples without defects and samples with various defects. The cooling feature of the actual sample to be inspected is monitored during system operation. When the feature value exceeds the early warning threshold of the defect-free area determined by the cooling feature model, the system automatically outputs a defect alarm signal, defect type and three-dimensional positioning coordinates.
[0027] The trained model is packaged into a callable API and integrated into the detection system. It automatically receives the preprocessed feature data and outputs the defect prediction results and confidence scores.
[0028] An internal defect detection system for aluminum alloy cast power fittings includes the following modules:
[0029] Multi-view infrared acquisition module: includes 8 high-resolution infrared cameras and 1 synchronization trigger, used to synchronously acquire multi-view infrared images of the object at times T1 and T2;
[0030] Preprocessing module: includes calibration unit and noise reduction and enhancement unit. The calibration unit unifies camera readings through a standard temperature source, and the noise reduction and enhancement unit processes the image using Gaussian filtering and histogram equalization.
[0031] 3D Modeling and Temperature Mapping Module: Used to reconstruct 3D point cloud models using stereo vision / structured light methods, and map infrared temperature values to the point cloud to generate a 3D temperature field;
[0032] Feature extraction module: used to calculate temperature change, three-dimensional temperature gradient and neighborhood statistical features, and construct feature matrix;
[0033] Machine learning detection module: It has a built-in trained 3DCNN model that receives feature matrices and outputs defect prediction results and confidence scores;
[0034] Results output module: Highlights defect areas in color difference and color uniformity maps, outputs 3D coordinates of defects, judgment basis report, and supports audible and visual alarms.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] This invention relates to a method and system for detecting internal defects in aluminum alloy cast power fittings. Based on the difference in thermal conductivity between the aluminum alloy matrix and internal defects, the method uses multiple infrared cameras that are triggered simultaneously to acquire multi-view infrared images of the object at different times during the cooling process, transforming the internal structural information into the surface temperature field distribution. Multi-view imaging is used to achieve full surface coverage of complex structural objects, eliminating blind spots in the detection.
[0037] By deeply integrating multi-view infrared imaging, three-dimensional temperature field construction, and machine learning, a complete automated detection closed loop of "data acquisition - information fusion - intelligent diagnosis" has been built. This method systematically solves the three core pain points of traditional detection: incomplete coverage, low accuracy, and poor efficiency; multi-view imaging eliminates detection blind spots and realizes full-domain perception of complex structural objects.
[0038] The three-dimensional temperature field precisely binds abstract two-dimensional temperature information with the physical spatial location, providing a geometric basis for defect localization; while the deep learning model replaces experience-dependent manual interpretation, realizing the objective, accurate identification and quantification of defects.
[0039] By image preprocessing, 3D geometric model reconstruction and temperature mapping, a 3D temperature field integrating spatial and temperature information is constructed; then, temperature change, 3D gradient and neighborhood statistical features are extracted as feature matrix, and a deep learning model is trained to automatically identify and locate defects in 3D.
[0040] This invention provides an efficient, reliable, and easily integrated non-destructive testing solution not only for aluminum alloy cast power fittings, but also for a wider range of industrial components, with significant practical value and broad prospects for industrial application. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the object defect detection process using multi-view infrared imaging according to the present invention;
[0042] Figure 2 This is a schematic diagram of the hardware structure that causes abnormal temperature field due to defects in the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. In order to keep the following description of the embodiments of this disclosure clear and concise, detailed descriptions of known functions and known components are omitted to avoid unnecessarily obscuring the concept of the present invention.
[0044] A method for detecting internal defects in aluminum alloy cast power fittings, the detection process is as follows:
[0045] I. Infrared thermal imaging data acquisition process
[0046] A high-precision infrared thermal imager with a resolution of 640×512 pixels, thermal sensitivity ≤0.03℃, and a temperature range of -20℃ to 1500℃ is selected to ensure accurate capture of minute temperature changes on the surface of castings (minimum detectable temperature difference of 0.05℃), meeting the stringent temperature resolution requirements for defect detection. The transmission line is driven by a servo motor with an adjustable speed (0.5-2m / min) and a positioning accuracy of ±0.5mm, ensuring the workpiece reaches the precise imaging position. The workpiece mounting uses an adaptive fixture, compatible with aluminum alloy casting power fittings of different specifications (length 50-500mm, weight 1-20kg). The contact area between the fixture and the workpiece is insulated to prevent interference with the workpiece's temperature field. The detection area is equipped with a constant temperature and humidity chamber, with a temperature control range of 20-25℃ (fluctuation ±1℃) and relative humidity controlled at 40%-60% (fluctuation ±5%). It is also equipped with windproof and dustproof devices to prevent environmental airflow and dust from affecting the infrared imaging quality and workpiece cooling process, ensuring the stability and repeatability of the detection data. The cast workpiece, still at a high temperature after casting, is automatically loaded onto a conveyor line. High-precision infrared thermal imagers are deployed at two fixed locations on the conveyor line. As the workpiece passes by sequentially, the imagers are triggered, capturing a thermal image of the workpiece at two different time points (t1 and t2). These two locations represent two different cooling stages during the natural cooling process. Using high-precision infrared thermal imagers, continuous, non-contact image acquisition of the casting's surface is performed from multiple fixed angles during the natural cooling process. The core of this step is to obtain the temporal temperature field distribution data of the casting surface during the cooling process.
[0047] The physical basis for this detection is the significant difference in thermophysical properties between the aluminum alloy substrate and its internal defects (such as pores and voids). Under the same heat dissipation conditions, dense metal regions with good thermal conductivity lose heat rapidly, resulting in a rapid drop in surface temperature; while in defective regions, heat dissipation is hindered due to the insulating effect of internal air or vacuum, leading to a significantly slower cooling rate on the corresponding surface area. Therefore, by analyzing time-series thermal maps, identifying "overheated" regions with significantly slower cooling rates than the surrounding substrate can indirectly pinpoint the internal defects beneath them.
[0048] II. Multi-view infrared data acquisition and preprocessing
[0049] Hardware configuration: "Eight infrared cameras are arranged according to the principle of spatial distribution, and the overlap area of adjacent cameras is strictly controlled within 30%-40%. The cameras are precisely calibrated using camera calibration software to ensure that the stitching accuracy of multi-view images is ≤0.1 pixels. The synchronization trigger adopts the USB synchronization protocol, with low trigger latency, to ensure that multiple cameras can shoot simultaneously."
[0050] Shooting process: Using the natural cooling process of the hardware as the time dimension, infrared images were captured at two key moments (temperature information was mapped to pseudo-color, with high-temperature areas appearing in red / orange tones and low-temperature areas appearing in blue / green tones).
[0051] Time T1: The initial moment after the hardware casting is demolded and enters the inspection area (poor surface temperature uniformity, initial manifestation of thermal resistance differences in defect areas), the first set of multi-view pseudo-color infrared images is acquired. Let be the pseudo-color value of the k-th camera at pixel (x,y);
[0052] Time T2: After an interval Δt, the fittings naturally cool to a stable cooling stage, and the second set of multi-view pseudo-color infrared images is acquired. ;
[0053] Machine vision preprocessing: For the acquired pseudo-color infrared images, machine vision algorithms are used to eliminate noise and equipment errors, and enhance the color difference features related to defects;
[0054] Color-Temperature Calibration: Using a standard blackbody as a reference, a mapping table of "pseudo-color value - actual temperature" is established for each camera to ensure that the same temperature corresponds to a uniform pseudo-color (color value deviation between cameras ≤ 2 gray levels), avoiding color misjudgment caused by individual differences in equipment; Denoising: Gaussian filtering with σ=1.0 is used to remove random noise in the image;
[0055] Noise reduction: A Gaussian filtering algorithm with σ=1.0 is used. It smooths out color abrupt changes caused by ambient light interference and pixel noise in images, while preserving color gradient details in defective areas;
[0056] Color enhancement: The dynamic range of color in pseudo-color images is stretched by histogram equalization algorithm, which increases the color contrast between defective areas (such as the "high-temperature retention area" corresponding to pores and shrinkage) and normal areas by 2-3 times, making it easier for subsequent difference identification.
[0057] III. Machine Vision-Based 3D Modeling and Temperature-Color Mapping
[0058] By using machine vision stereo matching technology, two-dimensional pseudo-color infrared images are fused into three-dimensional models, realizing the binding of "spatial position-temperature-color" and solving the problem of blind spots in planar image detection.
[0059] 3D geometric modeling: Using stereo vision methods, the pose between cameras is calculated by feature point matching (SIFT algorithm) of multi-camera images, and a point cloud model is generated by combining the principle of triangulation. The point cloud density is ≥100 points / cm² (to ensure the integrity of surface details).
[0060] For each point cloud point Through the projection function (Projecting 3D points onto the 2D image plane of the k-th camera), determining the coverage. camera collection (Usually 2-3 units, due to the design of overlapping camera areas);
[0061] calculate Pseudocolor values:
[0062] (t∈{1,2}, =| (This represents the number of cameras covered), and the average value is used to eliminate single-camera perspective bias.
[0063] The final output is a 3D color model at time T1. 3D color model at time T2 It visually presents the temperature and color distribution at various spatial locations on the surface of the hardware.
[0064] IV. Image Difference and Color Uniformity Feature Extraction
[0065] Based on machine vision technology, image difference features and color uniformity features of T1-T2 three-dimensional color models are extracted to quantify the visual representation of defective areas and provide input for machine learning.
[0066] Image difference feature calculation: direct comparison and The pseudo-color values are used to extract the temporal color differences at various points on the surface of the hardware, reflecting the abnormal thermal resistance caused by defects.
[0067] Single-channel pseudo-color scene: Calculate color difference A positive number indicates that the color at time T2 is more inclined towards a high-temperature hue, while a negative number indicates that it is more inclined towards a low-temperature hue.
[0068] Percentage of regions with differences: statistically significant differences in single-view images. The proportion of pixels with more than 5 gray levels to the total number of pixels. , normal hardware <5%, including defective hardware ≥10%.
[0069] Color uniformity characteristic calculation
[0070] For a 3D color model at time T1 or T2, construct a point cloud. 8 neighborhood By using machine vision statistical analysis to quantify the uniformity of spatial color distribution, it can be found that defective areas exhibit color dispersion due to uneven heat distribution.
[0071] Neighborhood color mean: It reflects the color level corresponding to the overall temperature of the neighborhood;
[0072] Color uniformity coefficient (coefficient of variation): The color of the defect-free area is uniform. ), color discreteness in defect areas ( ≥0.15).
[0073] Feature matrix construction:
[0074] Integrating the above features, each point cloud point is formed. eigenvectors
[0075] , characteristic matrix Simultaneously output T1-T2 color difference map (pixel value) With color uniformity map (pixel value) This provides multi-dimensional visual feature inputs for machine learning models.
[0076] V. Machine Learning Model Training
[0077] Dataset construction: Collect 1000 samples (500 with defects and 500 without defects, with defect types including voids, cracks and corrosion). Each sample contains a three-dimensional temperature voxel and a feature matrix. The sample size is expanded to 5000 through data augmentation and divided into training / validation / test sets.
[0078] Model Training: The 3DCNN network structure is as follows: Input layer (64×64×64×2, dual-channel T1 / T2) → Convolutional layer 1 (32 3×3×3 kernels) → Pooling layer 1 (2×2×2 max pooling) → Convolutional layer 2 (64 3×3×3 kernels) → Pooling layer 2 (2×2×2 max pooling) → Convolutional layer 3 (128 3×31 (256 neurons) → Fully connected layer 2 (128 neurons) → Output layer (sigmoid activation, 1 output)). An early stopping strategy is adopted during training (the model stops if the loss on the validation set does not decrease after 3 rounds). The final model test set accuracy is ≥92%.
[0079] VI. Intelligent Defect Judgment Logic Based on Feature Thresholds
[0080] By combining machine learning model output with machine vision feature thresholds, multi-condition judgment rules are established to achieve automated and high-precision defect identification.
[0081] Early warning threshold setting (based on statistics of defect-free samples)
[0082] Based on the feature distribution of defect-free samples in the training set, two types of early warning thresholds are determined by statistical methods.
[0083] Single-dimensional feature threshold: for , Set a 95% confidence level threshold;
[0084] (Grayscale)
[0085] ;
[0086]
[0087] Mahalanobis distance threshold: Calculates the feature vector of a defect-free sample to... Mahalanobis distance The 95th percentile was used as the threshold.
[0088] Confidence threshold: Set the confidence threshold for model predictions. This ensures the reliability of the judgment results.
[0089] Inspection process for samples to be inspected; For aluminum alloy cast power fittings to be inspected, the following inspection steps shall be performed:
[0090] (1) Data processing: Through the machine vision workflow in sections 2.1-2.3, the color difference map, color uniformity map, and feature matrix of the sample to be inspected are obtained. Input the trained 3DCNN model to obtain the predicted probability ;
[0091] (2) Feature comparison: Calculate the deviation between the features of the sample to be tested and the defect-free model – one-dimensional deviation.
[0092] , Mahalanobis distance deviation ( (The Mahalanobis distance of the features of the sample to be tested).
[0093] (3) Defect determination: A defect is determined if any of the following conditions are met;
[0094] There exists a continuous pixel region (area ≥ 5 mm²). >0 and ;
[0095] >0 and ;
[0096] (4) Defect type matching: Based on the defect cooling characteristic model, the defect type is determined by maximum likelihood estimation. ;
[0097] (5) Output results: Automatically outputs defect alarm signal (audio-visual alarm) and three-dimensional coordinates of defect area. Judgment basis report (including) , The deviation from the threshold and the model confidence level are used to highlight the defect areas in the color difference map and the color uniformity map.
[0098] Example 1
[0099] Hardware setup: Eight FLIR infrared cameras were selected, and FLIRSyncBox synchronization triggers were used, fixed around the metal parts with an overlap area of 35%.
[0100] Data acquisition: The first set of images was acquired at time T1, Δt = 2 minutes, and the second set of images was acquired at time T2;
[0101] Preprocessing: The camera was calibrated with a standard blackbody, Gaussian filtering with σ=1.0 was applied, and histogram equalization improved the image temperature difference contrast by 2.5 times.
[0102] 3D modeling: The SIFT algorithm of OpenCV is used to match feature points, generating 12,000 point clouds with a point cloud density of 120 points / cm².
[0103] Temperature mapping: Each point cloud point is covered by an average of 2 to 3 cameras, and the three-dimensional temperature fields of T1 and T2 are calculated.
[0104] Feature extraction: ΔT = 8℃ for defect points (internal cavities with a preset diameter of 2mm) (ΔT = 5℃ for normal areas), gradient modulus = 0.8℃ / mm (0.4℃ / mm for normal areas), and feature matrix is 12000×4;
[0105] Model detection: Input the feature matrix into the 3DCNN model and output "defect location (50mm, 50mm, 10mm), defect type (hole, probability 0.92), confidence 0.95", which perfectly matches the actual defect.
[0106] 1. Layout of testing stations
[0107] A dedicated inspection section with a length of 10 m is demarcated on the transmission line (bandwidth 500 mm, running speed 1 m / min, positioning accuracy ±0.5 mm). At both ends of the inspection section, the first shooting point (P1, close to the demolding process) and the second shooting point (P2, 3.3 m downstream of P1) are respectively set. According to the transmission line speed calculation, the time interval Δt for the workpiece to flow from P1 to P2 is 2 minutes, which exactly meets the natural cooling detection requirements. A constant temperature and humidity environmental chamber (size 5 m × 3 m × 2.5 m) is built around the inspection section. The temperature inside the chamber is controlled at 22 ± 1 °C, and the relative humidity is 50 ± 5%. An anti-wind and dust fan (wind speed ≤ 0.5 m / s) is installed on the top of the chamber to avoid air flow interfering with the workpiece cooling process.
[0108] 2. Image acquisition device configuration
[0109] At point P1: 4 FLIR infrared cameras are installed, which are respectively fixed at the positions directly in front (1.8 m away from the workpiece surface, the height is flush with the workpiece center), directly behind (with the same parameters as the front side), directly left (with the same parameters as the front side), and directly above (2.2 m away from the workpiece top) of the transmission line. The resolution of each camera is 640 × 512 pixels, the thermal sensitivity is 0.03 °C, the temperature measurement range is 0 - 600 °C, and the lens focal length is 25 mm, ensuring that all outer surfaces of the strain clamp are covered (including complex parts such as the screw hole entrance and U-shaped groove). The overlapping rate of the shooting areas of adjacent cameras is 35%.
[0110] At point P2: 4 infrared cameras of the same model and quantity as at point P1 are installed, and the installation positions are completely symmetrical to those at point P1, ensuring that the image perspectives collected twice correspond one by one, facilitating subsequent temperature change calculation, (such as Figure 1 ).
[0111] Synchronous trigger system: An FLIR synchronous trigger is adopted. Through Ethernet, 8 infrared cameras are respectively connected to the transmission line PLC control system. When the workpiece reaches points P1 and P2, the transmission line photoelectric sensor (model E3Z-LS63) sends a trigger signal to the SyncBox, and the trigger synchronously triggers the 4 cameras at the corresponding positions to take pictures. The trigger delay < 1 ms, ensuring the consistency of the image acquisition time.
[0112] 3. Data processing and control equipment
[0113] One industrial computer is configured, installed with the Windows10 IoT system, and the detection system software (developed by mixing C# and Python, integrating the Halcon machine vision library and the TensorFlow deep learning framework) is deployed. The industrial computer receives the image data of 8 cameras through Gigabit Ethernet, and at the same time conducts data interaction with the transmission line PLC and the sorting unit (model FESTOD GPL-50-100-PPVA-B), realizing the linkage between the detection and production processes.
[0114] 4. Workpiece loading and positioning
[0115] After the tension clamp is demolded from the casting mold (demolding temperature approximately 200℃), it is gripped by a robotic arm (model KUKAKR6R900) and mounted onto the adaptive fixture of the conveyor line. The contact area between the fixture and the workpiece is insulated with fiberglass (thermal conductivity 0.028W / (m・K)) to prevent the fixture from absorbing heat and affecting the workpiece's temperature field. The conveyor line carries the workpiece into the detection section at a speed of 1m / min. 10cm before reaching point P1, photoelectric sensor 1 (E3Z-LS63) detects the workpiece and sends a pre-trigger signal to the industrial computer. The system then preheats the camera (preheating time 2 seconds).
[0116] 5. Image Acquisition and Preprocessing at Point P1
[0117] When the workpiece fully reaches point P1, sensor 1 sends a trigger signal, and SyncBox synchronously triggers the four cameras at point P1 to acquire the first set of infrared images (at time T1, the workpiece temperature is approximately 180℃). The image resolution is 640×512, the bit depth is 16 bits, the data size of a single image is approximately 625KB, and the total data size of the four cameras in a single acquisition is approximately 2.5MB. The data is transmitted in real time to the industrial computer via Ethernet. The system preprocesses the images at point P1.
[0118] Temperature calibration: The calibration data of the standard blackbody source (model FLIRBB304, temperature accuracy ±0.1℃) is used to correct the temperature of each pixel of each camera, ensuring that the temperature measurement error between the four cameras is ≤0.2℃;
[0119] Denoising: A Gaussian filtering algorithm with σ=1.0 (3×3 kernel size) is used to remove ambient light interference noise in the image, and the signal-to-noise ratio of the processed image is improved to 45dB;
[0120] Enhancement processing: By using an adaptive histogram equalization algorithm, the temperature grayscale range is stretched (mapping the original temperature range of 50-200℃ to 0-255 grayscale levels), which improves the contrast of areas with obvious temperature differences on the workpiece surface (such as the parts corresponding to potential defects) by 2.5 times, making it easier for subsequent feature extraction.
[0121] 6. Image Acquisition and Preprocessing at Point P2
[0122] The workpiece continues to flow along the conveyor line and reaches point P2 after 2 minutes (at time T2, the workpiece has naturally cooled to 120℃). Sensor 2 sends a trigger signal, and SyncBox synchronously triggers the four cameras at point P2 to acquire a second set of infrared images, with the acquisition parameters consistent with those at point P1. The system uses the same preprocessing procedure as at point P1 to process the images at point P2, ensuring that the preprocessing standards for the two sets of images are consistent and avoiding errors introduced due to differences in processing methods.
[0123] 7. 3D Modeling and Temperature Mapping
[0124] The industrial computer calls the stereo vision algorithm in the Halcon machine vision library to process the preprocessed images of the four cameras at point P1.
[0125] Feature point matching: Key feature points of each image are extracted using the SIFT algorithm (approximately 2000 feature points are extracted per image), and cross-camera feature point matching is performed using the FLANN matcher, with a matching accuracy of ≥98%.
[0126] Point cloud generation: Based on the matched feature points and camera intrinsic parameters (obtained in advance through checkerboard calibration with a calibration error ≤ 0.1 pixels), the three-dimensional coordinates are calculated using the triangulation principle to generate a point cloud model of the tension clamp. The total number of points in the point cloud is about 12,000, and the point cloud density is 120 points / cm², which completely restores the complex structural details of the workpiece surface, such as threaded holes and U-grooves.
[0127] Temperature mapping: For each point cloud point Pi, the camera set Ωi covering the point is found through the camera projection function πk (calculated based on camera extrinsic parameters). (Point cloud points in the root region of the tension clamp thread hole are covered by 2 cameras, and point cloud points in other regions are covered by 3 cameras.) The average temperature of the corresponding pixels of these cameras is calculated as the temperature value of Pi. Finally, the three-dimensional temperature field data at times T1 and T2 are generated (data format is PLY, containing point coordinates and temperature attributes).
[0128] 8. Feature Extraction and Defect Detection
[0129] Temperature change calculation: The temperature difference ΔT between time T2 and T1 is calculated point-to-point (ΔT=T2(Pi)-T1(Pi)). In the normal area, ΔT is about 5℃, while in the root area of the tension clamp threaded hole, a region with a diameter of about 3mm was detected with ΔT reaching 13℃, forming a clear "high temperature retention zone".
[0130] 3D temperature gradient solution: For each point cloud point Pi, select 8 neighboring points to form a neighborhood N(Pi). Use the finite difference method to calculate the temperature partial derivatives in the x, y, and z directions to obtain the gradient vector ∇T(Pi). Calculate the gradient magnitude ||∇T(Pi)||. The gradient magnitude in the normal region is about 0.4℃ / mm, while the gradient magnitude in the "high-temperature retention zone" is as long as 0.8℃ / mm, indicating a significantly higher temperature change rate than in the normal region.
[0131] Feature matrix construction: Using ΔT, ||∇T(Pi)||, mean neighborhood temperature difference μ, and standard deviation of neighborhood temperature difference σ as feature vectors for each point cloud point, a 12000×4 feature matrix is constructed and used as input to the 3DCNN model.
[0132] Model inference: The system loads the trained 3DCNN model (model file size approximately 50MB, trained using the TensorFlow framework, test set accuracy 95%), performs inference calculations on the feature matrix, and the inference time is approximately 0.8 seconds. Model output results;
[0133] Defect location: 3D coordinates (150mm, 40mm, 20mm), corresponding to the root area of the threaded hole of the tension clamp (which perfectly matches the actual defect location).
[0134] Defect types: shrinkage porosity (probability 0.92), voids (probability 0.06), cold shuts (probability 0.02), the main defect type is determined to be shrinkage porosity;
[0135] Confidence level: 0.95 (≥0.8 is considered a valid test result).
[0136] 9. Results output linked with sorting
[0137] The system completes the entire inspection process within 1.5 seconds, displaying the inspection results (including workpiece ID, inspection time, defect location, defect type, and confidence level) in real time on the human-machine interface (HMI). The interface highlights the defect location with a red alarm box (overlaid on the workpiece's 3D model) and simultaneously sends the defect signal to the transmission line PLC. When the tension clamp reaches the sorting station (located 5m downstream of point P2), the PLC controls the automatic pusher of the sorting unit to push the defective workpiece off the transmission line and into the "awaiting re-inspection" area (equipped with an identification tag indicating the workpiece ID and defect information); qualified workpieces continue to the next machining process.
[0138] 10. Re-examination and Model Optimization
[0139] The quality inspector used a portable ultrasonic detector (model GEPhasorXS, probe frequency 5MHz) to re-inspect the defective workpiece in the "to be re-inspected" area, confirming a shrinkage defect of approximately 3mm in diameter at the root of the threaded hole (consistent with the system's detection results). The quality inspector entered the re-inspection result (pass / fail) into the inspection system, which automatically added the sample to the model training dataset for incremental training of the model (one model iteration every 50 new samples) to continuously improve the detection accuracy.
[0140] The above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the present invention. The scope of protection of the present invention is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to the present invention within its spirit and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.
Claims
1. A method for detecting internal defects of an aluminum alloy cast electric power fitting, characterized by, The process includes the following steps: S1: Multi-view color infrared image acquisition and preprocessing, multi-view color mapping infrared images of the fittings at initial time T1 and time T2 after interval Δt during the cooling process are collected by multiple infrared cameras triggered synchronously, and the images are color-temperature calibrated, denoised and color contrast enhanced; S2: Image-based three-dimensional modeling, based on the multi-view color infrared images at T1 and T2, the three-dimensional geometric model of the fittings is reconstructed through stereo vision matching, and the image color information at the two times is mapped to the surface of the three-dimensional model to form T1 color three-dimensional model and T2 color three-dimensional model; S3: Difference and uniformity feature extraction, calculate the image difference features between T1 and T2 color three-dimensional models, and the color uniformity features of single-time color model, and construct a feature matrix that integrates the two types of features; S4: Machine learning model training and defect judgment, train the model through labeled samples to obtain image difference threshold and color uniformity threshold, directly compare T1-T2 image difference and color uniformity of the fittings to be inspected, and judge as defect if the threshold is exceeded, which includes data set construction, model training, threshold determination, defect judgment and output sub-steps.
2. The aluminum alloy cast electric power fitting internal defect detection method according to claim 1, characterized by, At an initial time T1 a first set of infrared images is acquired (N is the number of cameras, here N=4) and a second set of infrared images is acquired at time T2 after an interval time Δt ; First, temperature calibration was performed on all cameras using a standard temperature source, and then Gaussian filtering was applied. ( Image noise is removed using a Gaussian filter kernel, and finally, temperature differences are enhanced by histogram equalization.
3. The method of claim 1, wherein the method is characterized by: The image-based three-dimensional modeling of step S2 needs to associate color information, which specifically includes: S21: three-dimensional geometric modeling, using stereo vision or structured light method, based on multi-camera image reconstruction object surface point cloud model, using SIFT algorithm to extract the feature points of multi-view color infrared image at T1, T2, calculate the pose between cameras through feature point matching, generate the three-dimensional point cloud model of the fitting by combining the principle of triangulation for the number of point clouds); S22: Color mapping to three-dimensional model, mapping the color values of the images at T1 and T2 to the corresponding point cloud points The color value of each point The color value calculation formula is: where t e {1,2} (corresponding to T1, T2), is a point is a projection function on the camera k color image, is a coverage is a set of cameras, |; resulting in a T1 color 3D model and a T2 color 3D model . 4. The method for detecting internal defects of an aluminum alloy cast electric power fitting according to Claim 1, characterized by, The difference and uniformity feature extraction of step S3 needs to quantify image difference and color uniformity, which specifically includes: S31: Image difference feature calculation, based on With , the color difference value of the point cloud point directly reflects the image difference T1-T2 through the color difference value. S32: Color uniformity feature calculation, for a color 3D model of or constructing the 8-neighborhood of points calculating the color uniformity coefficient: coefficient of variation, the smaller the value, the more uniform the color, and the defect-free region is usually )<0.1); S33: Feature matrix construction, each point feature vector is: , and are the mean and standard deviation of the neighborhood temperature difference, respectively, and the feature matrix .
5. The method for detecting internal defects of an aluminum alloy cast electric power fitting according to Claim 1, characterized by, Step S4 includes three sub-steps of data set construction, model training and model deployment: S41: data set construction, each sample contains input feature matrix F and three-dimensional temperature voxel Data augmentation is performed by random rotation, horizontal / vertical flip, scaling, adding Gaussian noise, and perturbation Δt. The training set, validation set, and test set are divided. S42: Model training, 3D convolutional neural network is selected, input is dual-channel image (channel0 = T1, channel1 = T2) or three-dimensional temperature voxel , cross-entropy loss function is adopted ( is real label, is prediction probability), model training is performed through Adam optimizer, batch size 32, training round 50-100, and parameters are adjusted by using verification set to prevent overfitting.
6. The method for detecting internal defects of an aluminum alloy cast electric power fitting according to Claim 1, characterized by, Step S4 also includes establishing a cooling feature model, setting an early warning threshold and outputting, according to the model training results, establishing a cooling feature model of defect-free and various defect samples, and monitoring the cooling features of actual samples to be inspected during system operation; when the feature value exceeds the early warning threshold of the defect-free area determined by the cooling feature model, the system automatically outputs a defect alarm signal, a defect type and a three-dimensional positioning coordinate; The trained model is packaged as a callable API and integrated into the detection system to automatically receive preprocessed feature data and output defect prediction results and confidence.
7. An aluminum alloy cast electric power fitting internal defect detection system characterized by, The object defect detection method based on multi-view infrared imaging of any one of claims 1-5 comprises the following modules: Multi-view infrared acquisition module: including 8 high-resolution infrared cameras and 1 synchronous trigger, for synchronously collecting multi-view infrared images of the object at T1 and T2; Preprocessing module: including calibration unit and denoising enhancement unit, the calibration unit unifies the camera readings through a standard temperature source, and the denoising enhancement unit processes the images by Gaussian filtering and histogram equalization; Three-dimensional modeling and temperature mapping module: for reconstructing a three-dimensional point cloud model through stereo vision / structured light method, and mapping the infrared temperature value to the point cloud to generate a three-dimensional temperature field; Feature extraction module: for calculating temperature change, three-dimensional temperature gradient and neighborhood statistical features, and constructing a feature matrix; Machine learning detection module: built-in trained 3DCNN model, receives the feature matrix and outputs the defect prediction result and confidence; Result output module: highlights the defect area in the color difference map and the color uniformity map, outputs the three-dimensional coordinates of the defect, the judgment basis report, and supports sound and light alarm.