A machine vision-based axle assembly quality detection method

By combining machine vision with improved YOLOv8 algorithms and image processing technology, static and dynamic full-condition inspection of axle assembly quality has been achieved, solving the problems of low inspection efficiency and poor accuracy in existing inspections, and improving inspection accuracy and reliability.

CN120876483BActive Publication Date: 2025-12-09SHANDONG ZHONGLI AUTO PARTS MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511393436.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2025-12-09
Estimated Expiration
2045-09-28

AI Technical Summary

Technical Problem

The existing axle assembly quality inspection is inefficient and inaccurate, failing to meet the demand for efficient and precise inspection, and cannot simulate actual dynamic operating conditions, resulting in a high rate of missed and false detections.

Method used

A machine vision-based inspection method, combined with an improved YOLOv8 algorithm and image processing techniques, is employed for both static and dynamic full-condition inspection. Static inspection utilizes adaptive filtering and edge sharpening to optimize the image and extract static assembly parameters; dynamic inspection employs preload detection, motion blur compensation, and Kalman vibration denoising to extract dynamic assembly parameters.

Benefits of technology

It achieves accurate detection covering all working conditions, significantly improving the accuracy and reliability of axle assembly inspection and reducing the rate of missed and false detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876483B_ABST
    Figure CN120876483B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of quality detection, and particularly relates to a kind of axle assembly quality detection method based on machine vision.Firstly, the static image of axle is collected, after adaptive filtering and edge sharpening processing, the improved YOLOv8 with series gap feature attention module is used to extract static parameters and compare; after passing, the fastener pretightening force is detected first, then the dynamic image and vibration data are collected by simulating working condition, after motion blur compensation of dynamic image and Kalman filter denoising of vibration data, the improved YOLOv8 extracts dynamic parameters and compares; multiple cycles of detection, and the axle assembly quality is determined to be qualified if all qualified.The present application covers all working conditions, improves detection accuracy and reliability, and reduces the false rejection rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of quality detection, and particularly relates to a vehicle axle assembly quality detection method based on machine vision. BACKGROUND

[0002] The vehicle axle is a core transmission component of a rail transit vehicle, a commercial vehicle and other vehicles, and the assembly quality of the vehicle axle directly determines the driving safety, stability and service life of the vehicle. In the assembly process, the precision control of parameters such as the coaxiality of the bearing inner ring and the axle neck, the fitting gap of the axle shoulder and the bearing end face, and the integrity of the fastener is crucial. Once the assembly deviation occurs, it is easy to cause serious faults such as running abnormal sound, accelerated component wear and even shafting failure. With the improvement of safety standards of vehicles and the requirement of production efficiency, the existing detection methods cannot meet the efficient and accurate detection requirements, and have the problems of low efficiency, high labor intensity, and being affected by subjective experience of personnel. The judgment accuracy of fine parameters such as small fitting gap and coaxiality is poor, and the rates of missed detection and misjudgment are high. Moreover, some machine vision schemes only detect static parameters and do not simulate actual running dynamic conditions, so they cannot capture dynamic defects such as bearing radial runout and fastener rotation offset under idle speed to rated speed, and the detection coverage is insufficient. Therefore, an efficient and accurate vehicle axle assembly quality detection scheme covering all working conditions is urgently needed. SUMMARY

[0003] The application proposes a vehicle axle assembly quality detection method based on machine vision to solve the technical problems in the above background art.

[0004] In order to achieve the above purpose, the technical scheme adopted by the application comprises the following steps:

[0005] S1, first fix the assembled vehicle axle on a positioning fixture, and use an industrial camera to collect static image data of the vehicle axle after assembly;

[0006] S2, perform image processing on the static image data to obtain processed static images;

[0007] S3, use an improved YOLOv8 algorithm to extract static assembly parameters, the static assembly parameters including the coaxiality of the bearing inner ring and the axle neck, the fitting gap of the axle shoulder and the bearing end face, the integrity of the fastener corner, and the fitting gap of the keyway and the key; compare the static assembly parameters with a preset static standard parameter library, and if all the parameters are within the tolerance range, perform dynamic detection;

[0008] S4, dynamic detection is used to perform dynamic test on the vehicle axle that passes the static detection, preset a test time and perform the test according to the actual use scene, collect dynamic sequence images and vibration data of the vehicle axle at each preset gradient speed from idle speed to rated speed;

[0009] S5, motion blur compensation is performed on the dynamic sequence image, and dynamic assembly parameters including bearing outer ring radial runout and fastener rotation offset angle are extracted based on an improved YOLOv8 algorithm, and vibration data is denoised;

[0010] S6, the dynamic assembly parameters are compared with the preset dynamic standard parameter library and standard vibration data to determine whether they are qualified;

[0011] S7, the static and dynamic detection is performed in multiple rounds, if all rounds of detection are qualified and the vibration data is normal, it is determined that the axle assembly quality is qualified; if any round of detection is unqualified, it is determined to be unqualified.

[0012] As preferred, the implementation of the step S2 of performing image processing on the static image data to obtain the processed static image includes:

[0013] S21, for the input static original image I, for each pixel take its initial 3*3 neighborhood , calculate the gradient amplitude and local noise intensity of the pixel, the gradient amplitude of the pixel is calculated in the following manner , wherein are the horizontal and vertical gradients respectively; the calculation method of the local noise intensity is , wherein, is the gray value of the static original image at the pixel coordinate (x, y), is the mean value of all pixels in the 3*3 neighborhood;

[0014] S22, the gradient and noise intensity are normalized to obtain the normalized gradient and noise intensity, and then the filter window side length corresponding to each pixel is obtained, the calculation method is , wherein denotes the window base length, are weight coefficients respectively, is the normalized value of the local noise intensity, is the normalized value of the gradient amplitude of the pixel;

[0015] S23, the window is constrained and rounded, if then it is forced to be 3 as the minimum window, if then it is forced to be 7, if then it is rounded to an odd number, and finally the filter window side length of the pixel is obtained;

[0016] S24, a pixel is taken as the center to construct a filter window with a side length of A square filtering window is used, and the median gray value of all pixels within the window is calculated as the filtered pixel value.

[0017] S25. Filter the image. An edge map is obtained through edge detection, and then the edge confidence score is calculated. The calculation method for the edge confidence is as follows: ,in, For any point gradient value, The average gradient value of the surrounding neighborhood. To avoid the denominator being zero for extremely small constants, This represents the number of edge pixels within the neighborhood. Given the total number of pixels in the neighborhood, targeted sharpening is performed based on a preset edge confidence threshold to obtain the final static image. The calculation method is as follows: ,in, To sharpen the intensity, For directional sharpening operators, based on edge direction angles choose, The set edge confidence threshold.

[0018] Preferably, the improved YOLOv8 algorithm used in step S3 is implemented by serially connecting a gap feature attention module (GAM) after the C2f feature extraction unit in the YOLOv8 algorithm backbone layer; the GAM is constructed as follows:

[0019] S311. Receive the multi-scale feature map F output by the C2f unit in the Backbone layer. This feature map includes features at three different scales.

[0020] S312. Perform global average pooling on the feature map F to obtain the channel-dimensional feature vector. ,Will The input consists of a channel mapping network with two fully connected layers, with a ReLU activation function inserted in between to achieve a non-linear transformation. The output is the channel attention weights. ;

[0021] S313, will Multiplying the original feature map F by the channel dimension completes the enhancement of gap-related features at the channel level;

[0022] S314. Perform a 3×3 convolution on the enhanced feature map to compress the number of channels to 1, resulting in a single-channel feature map. Then, the Sigmoid activation function is applied to... Normalization is performed to generate spatial attention weights. ,Will The feature map after channel enhancement is multiplied by an element to complete the strengthening of the key assembly area at the spatial level;

[0023] S315, 1x1 convolution is performed on the feature map after spatial enhancement, the number of channels is adjusted to be consistent with the input feature map F, and the final enhanced feature map is output .

[0024] As preferred, the implementation of the improved YOLOv8 algorithm according to the serial gap feature attention module GAM for extracting static assembly parameters includes:

[0025] S321, a GAM module is embedded after each of the three different scale C2f units of the original YOLOv8 Backbone;

[0026] S322, the enhanced feature maps output by the three C2f-GAM units are input into the Neck layer to realize scale transmission from top to bottom through the feature pyramid network, and the fused multi-scale feature maps are obtained;

[0027] S323, finally, the fused feature maps are input into the regression head and the detection head of the Head layer, the detection head identifies the key components of the axle assembly and calculates the static assembly parameter values.

[0028] As preferred, before the dynamic detection in step S4, the fastening force needs to be detected, and the torque sensor and the angle encoder are used to detect the real-time torque value and the angle value; the collected torque value and angle value data are used to construct a tightening curve, the established tightening curve is compared with a standard tightening curve, the integral area difference of the two curves of the elastic section is calculated, if the difference exceeds the set threshold, the pre-tightening force is determined to be unqualified, otherwise it is qualified.

[0029] As preferred, the implementation of motion blur compensation on the dynamic sequence images in step S5 includes:

[0030] S51, first, an association mark between the dynamic sequence images and the speed is established, and each preset gradient speed from idle speed to rated speed is one-to-one bound with the corresponding dynamic sequence image frame, and a unique speed label is added to each image frame;

[0031] S52, for the key areas related to the dynamic assembly parameters in the dynamic sequence images, the feature point set of each key area is extracted by the optical flow method; the motion vector of the key area is obtained by calculating the displacement and direction of the same feature point between adjacent frames;

[0032] S53, the theoretical blur kernel length is calculated according to the speed, and the theoretical blur kernel direction is determined according to the rotation direction of the axle; the initial parameters of the theoretical blur kernel are obtained;

[0033] ​S54, using a genetic algorithm to maximize the edge gradient entropy of the key area as the objective function to obtain the optimal fuzzy kernel parameter;

[0034] S55, finally, the optimal fuzzy kernel parameter obtained is deblurred to obtain the motion compensated image.

[0035] As a preferred, the vibration data in step S5 is denoised by using Kalman filter algorithm.

[0036] Compared with the prior art, the advantages and positive effects of the present application are that, in view of the problems of low detection efficiency, insufficient coverage of static detection, and high false detection rate, a static and dynamic full working condition detection mode is created. In the static stage, the image is optimized by adaptive filtering combined with edge sharpening, and improved YOLOv8 is used to extract accurate static parameters; in the dynamic stage, the pre-tightening force detection is added to exclude hidden dangers, and the motion blur compensation and Kalman vibration denoising are used, and then the improved YOLOv8 is used to extract dynamic parameters, and multiple detection is used to further reduce the false detection rate, which greatly improves the precision and reliability of the axle assembly detection. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0038] Figure 1 It is a flowchart of a kind of axle assembly quality detection method based on machine vision. DETAILED DESCRIPTION

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0040] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, however, the present application can also be implemented in other ways different from those described herein, therefore, the present application is not limited to the specific embodiments disclosed in the following description.

[0041] In the embodiment, the axle is a key bearing and transmission component of a vehicle such as a rail transit vehicle or a commercial vehicle, and the assembly quality of the axle directly determines the driving stability and operation safety of the vehicle. However, the existing axle quality detection has various problems and cannot meet the demand of rapid detection of large-scale assembly lines. Therefore, the present application provides an axle assembly quality detection method based on machine vision, and the specific implementation process is shown in Figure 1 .

[0042] First, the assembled axle is fixed on a positioning fixture, and an industrial camera is used to collect static image data of the assembled axle.

[0043] In order to reduce noise interference in the original image and highlight the edge features, the static image is then processed, and the image processing includes adaptive filtering and edge sharpening. The implementation process is as follows: first, the input static original image I is analyzed at the pixel level, the initial 3*3 neighborhood data of each pixel is extracted, and the gradient amplitude and local noise intensity of the pixel are calculated, wherein the gradient amplitude is calculated by the horizontal and vertical gradients, and the local noise intensity is measured by the difference between the pixel gray value and the neighborhood mean value; on this basis, the gradient and noise intensity are normalized to obtain the normalized gradient value and noise intensity value, and according to the set weight coefficient and window base length, the filter window side length corresponding to each pixel is calculated, so that the area with larger noise is automatically allocated a larger filter window to enhance the smoothing ability, while the area with higher edge gradient is allocated a smaller window to retain details, thereby realizing adaptive filtering of the image; then, the filter window is constrained and rounded to ensure that the side length is odd and within the specified range, avoiding filter distortion caused by improper window size, and finally the corresponding filter window is constructed around each pixel and the pixel gray median value in the filter window is calculated as the filter value of the pixel, to obtain the image after overall noise suppression; on the basis of the filtering result, the edge feature map is extracted by the edge detection algorithm, and the confidence of the edge pixel is measured by combining the edge confidence calculation formula, wherein the confidence is determined by the gradient ratio and the proportion of neighborhood edge pixels, which can effectively distinguish between real edges and noise pseudo-edges; in this process, the edge confidence threshold is set, and only the area with confidence exceeding the threshold is subjected to directional sharpening operation, and the sharpening operator is dynamically adjusted according to the edge direction angle to ensure that the sharpening enhancement is only for structured edges but not for noise points, and finally the output static image realizes global noise suppression and enhances the contrast and clarity of the key component edges. Specifically, for the input static original image I, the initial 3*3 neighborhood of each pixel is extracted, the gradient amplitude and local noise intensity of the pixel are calculated, the gradient amplitude of the pixel is calculated in the following manner: ​​​​​These are the gradients in the horizontal and vertical directions, respectively; the local noise intensity is calculated as follows: ,in, This represents the grayscale value of the static original image at pixel coordinates (x, y). The mean value of all pixels within a 3×3 neighborhood is used; the gradient and noise intensity are normalized to obtain the normalized gradient and noise intensity, and then the side length of the filter window corresponding to each pixel is obtained, calculated as follows: ,in Represented as the base length of the window. These are the weighting coefficients, This is the normalized value of the local noise intensity. This is the normalized value of the pixel's gradient magnitude; the window is constrained and rounded if... Then force the minimum window size to be 3. Then the mandatory order is 7, if Then round it to the nearest odd number to obtain the side length of the filter window for that pixel. ; in pixels Construct a structure with a side length of [missing information] at the center. A square filtering window is used, and the median gray value of all pixels within the window is calculated as the filtered pixel value; the filtered image is then processed. An edge map is obtained through edge detection, and then the edge confidence score is calculated. The calculation method for the edge confidence is as follows: ,in, For any point gradient value, The average gradient value of the surrounding neighborhood. To avoid the denominator being zero for extremely small constants, This represents the number of edge pixels within the neighborhood. Given the total number of pixels in the neighborhood, targeted sharpening is performed based on a preset edge confidence threshold to obtain the final static image. The calculation method is as follows: ,in, To sharpen the intensity, For directional sharpening operators, based on edge direction angles choose, The set edge confidence threshold is used. This processing scheme significantly reduces random noise and illumination interference in the original acquired images. On the other hand, it preserves and enhances the edge details of axle assembly features while avoiding excessive smoothing. This ensures that the subsequent deep learning-based assembly parameter extraction process has higher input image quality, thereby effectively improving detection accuracy and robustness. This achieves the technical effect of improving the reliability and intelligence level of axle assembly quality detection.

[0044] In order to accurately identify the key parameters in the process of assembling the axle, the improved YOLOv8 algorithm is used to extract the static assembly parameters, including the coaxiality of the bearing inner ring and the axle neck, the fitting gap between the shaft shoulder and the bearing end face, the integrity of the fastener corner, and the fitting gap between the keyway and the key; the static assembly parameters are compared with the preset static standard parameter library, and if all parameters are within the tolerance range, dynamic detection is performed. Among them, based on the improved YOLOv8 algorithm, the gap feature attention module (GAM) is introduced to enhance the attention of the algorithm to the small gap and edge features. Specifically, the gap feature attention module GAM is connected in series after the C2f feature extraction unit of the Backbone layer of the YOLOv8 algorithm. The construction of the GAM is as follows: receiving the multi-scale feature map F output by the C2f unit in the Backbone layer, the feature map includes three different scale features; in this step, first, the multi-scale feature map F output by the C2f unit in the Backbone layer of the YOLOv8 algorithm is received, which usually includes three different scale feature layers, corresponding to small scale, processing local detail features of the axle, such as fastener corners, keyway and key fitting area; medium scale, processing the fitting area features of the shaft shoulder and the bearing end face; large scale, processing the overall coaxial area features of the bearing inner ring and the axle neck.

[0045] Global average pooling is performed on the feature map F to obtain a channel dimension feature vector , which is input into a channel mapping network composed of two fully connected layers, with a ReLU activation function inserted in the middle to realize nonlinear transformation, and a channel attention weight is output. After obtaining the multi-scale feature map, this step compresses the response of each channel in the spatial range through global average pooling to obtain a channel dimension feature vector. This vector can reflect the importance of each channel in the overall feature representation. Subsequently, the vector is input into a channel mapping network composed of two fully connected layers, with a ReLU activation function embedded in the middle to realize nonlinear mapping, and finally a channel attention weight is output. This weight can adaptively allocate the expression strength of different channels, thereby highlighting the key feature channels for assembly detection. For example, channels that can reflect the coaxiality and fitting gap of the axle will be given higher weights, while channels related to background noise or irrelevant features will be weakened. Compared with the traditional convolutional method of treating all channels equally, this method can effectively capture the dependency between channels and realize feature selection and enhancement. Its advantage is that the feature utilization of the network is more efficient, irrelevant information is reduced, and the sensitivity and discrimination ability of the detection model to assembly abnormalities are improved.

[0046] Then The original feature map F is multiplied by the channel dimension to complete the strengthening of the gap-related features at the channel level. After obtaining the channel attention weight, this step multiplies it with the original feature map F by channel to realize feature weighting at the channel level. Through this operation, the channels with higher importance are enhanced, while the channels with lower weight are suppressed, so that the network can automatically focus on the expression of key features in the axle assembly process. For example, when detecting the rotational offset or local gap of the axle fastener, the attention mechanism will preferentially amplify those channels that can capture corner features and edge details, thereby enhancing the reliability of the judgment.

[0047] A 3x3 convolution is performed on the strengthened feature map to compress the channel number to 1 to obtain a single-channel feature map Then, the normalized is generated by the Sigmoid activation function The is multiplied by the channel-strengthened feature map by element to complete the strengthening of the key assembly area at the spatial level. After completing the feature strengthening at the channel level, this step further highlights the key assembly area through the spatial attention mechanism. Specifically, first, a 3x3 convolution is performed on the strengthened feature map to compress the channel number to 1 to obtain a two-dimensional single-channel feature map to comprehensively reflect the response strength of each pixel position. Then, the Sigmoid function is used to normalize the feature map to generate a spatial attention weight matrix, which is multiplied by the channel-strengthened feature map by element to realize spatial-level strengthening of the key area. Through this process, the model can automatically focus on the most valuable area in the spatial dimension, such as the bearing outer ring and shaft neck contact area, fastener position and keyway boundary, while ignoring the interference of background or irrelevant areas.

[0048] Finally, a 1x1 convolution is performed on the spatially strengthened feature map to adjust the channel number to be consistent with the input feature map F, and the final enhanced feature map is output After completing the channel and spatial double strengthening, this step adjusts the channel number of the spatially strengthened feature map through a 1x1 convolution to make it consistent with the channel number of the original input feature map F, to ensure the compatibility of the network structure. This operation not only completes the dimension alignment, but also further fuses and compresses redundant information in the convolution process, ensuring that the enhanced feature map has high efficiency and accuracy. The enhanced feature map has completed the amplification of key information and the suppression of invalid information at the channel and spatial levels, and has stronger expression and discrimination ability.

[0049] The implementation of the improved YOLOv8 algorithm based on the serial gap feature attention module GAM to extract static assembly parameters includes embedding one GAM module after each of the three different scale C2f units of the original YOLOv8 Backbone; the enhanced feature maps output by the three C2f-GAM units are input into the Neck layer The input Neck layer realizes scale transmission from top to bottom through a feature pyramid network to obtain a fused multi-scale feature map; finally, the fused feature map is input into the regression head and the detection head of the Head layer, the detection head identifies the key components of the axle assembly and calculates the static assembly parameter values. Specifically, first, a gap feature attention module GAM is embedded after each of the three different scale C2f units of the Backbone, and by introducing an attention mechanism in the multi-scale feature extraction stage, the expression ability of the model for small assembly details and local structural features is effectively enhanced. Subsequently, the enhanced feature maps output by the three C2f-GAM units are input into the Neck layer, and a feature pyramid network (FPN) is used to realize multi-scale feature fusion and transmission from top to bottom, so that shallow detail features and deep semantic features can be fully combined, ensuring the capture of details such as fastener corners, keyway gaps, and other details, while also taking into account the semantic understanding of the overall geometric relationship. Finally, the fused multi-scale feature map is input into the Head layer, and the regression head and the detection head work together to complete the detection task, where the detection head is responsible for identifying and positioning the key components of the axle assembly, and the regression head calculates the static assembly parameters such as the coaxiality of the bearing inner ring and the shaft neck, the fit gap between the shaft shoulder and the bearing end face, the integrity of the fastener, and the keyway fit gap. Through this improved design, the model can take into account feature extraction and enhancement at different scales, ensuring the accuracy and robustness of static assembly parameter calculation, and significantly improving the automation level and reliability of axle quality detection.

[0050] Before dynamic detection, the tightening force of the fastener needs to be detected, and the torque sensor and the rotation angle encoder are used to detect the real-time torque value and the rotation angle value; the collected torque value and rotation angle value data are used to construct a tightening curve, the established tightening curve is compared with a standard tightening curve, the integral area difference of the two curves in the elastic section is calculated, and if the integral area difference exceeds a set threshold, the tightening force is determined to be unqualified, otherwise, the tightening force is determined to be qualified. Specifically, first, after the axle assembly is completed, the fastener to be detected is connected to the torque sensor and the rotation angle encoder, the torque sensor is used to measure the torque change in the tightening process in real time, and the rotation angle encoder is used to synchronously record the change of the rotation angle of the fastener. Through the synchronous collection of the sensor and the encoder, a high-precision torque value and rotation angle value data sequence can be obtained. Second, the collected data is processed in time sequence, and a tightening curve is drawn based on the correspondence between the torque and the rotation angle. The curve usually includes an initial idle section, an elastic deformation section and a plastic deformation section. The elastic section is the most critical stage for reflecting the tightening force between the fastener and the connecting piece, and directly determines whether the fastener can maintain a stable clamping state during operation. Subsequently, the actual tightening curve established is compared with the standard tightening curve stored in the database in advance. In order to ensure the objectivity and scientificity of the comparison, the integral operation is adopted to calculate the area difference between the two curves in the elastic section. The integral area difference can quantify the deviation degree of the actual tightening process from the standard tightening process. If the calculated area difference exceeds the set threshold, it indicates that the tightening force of the fastener fails to meet the standard requirements, and there is a risk of insufficient clamping or excessive tightening. In this case, the tightening force is determined to be unqualified. Otherwise, if the integral area difference is within the threshold range, it indicates that the tightening force of the fastener meets the standard requirements, and the tightening force is determined to be qualified. Through the detection step, not only can the loosening caused by insufficient tightening force or damage caused by excessive tightening be avoided, but also potential assembly problems can be eliminated before dynamic testing, ensuring the authenticity and reliability of the subsequent dynamic test data, and further improving the scientificity and safety of the axle assembly quality detection.

[0051] The dynamic detection is used to perform dynamic testing on the axle qualified in the static detection, preset a test time and perform the experiment according to the actual use scene, and collect dynamic sequence images and vibration data of the axle at each preset gradient speed from idle speed to rated speed after the experiment.

[0052] In order to solve the image blur problem caused by high-speed rotation of the axle, a motion blur compensation technology is introduced in the dynamic detection. The dynamic sequence images are subjected to motion blur compensation, and the dynamic assembly parameters including the bearing outer ring radial runout and the fastener rotation offset angle are extracted based on the improved YOLOv8 algorithm, and the vibration data is subjected to denoising processing. The vibration data denoising is realized by using the Kalman filter algorithm.

[0053] The implementation of the motion blur compensation comprises, firstly, establishing an association mark of a dynamic sequence image and a rotating speed, binding each preset gradient rotating speed from an idle speed to a rated rotating speed with a corresponding dynamic sequence image frame one by one, and adding a unique rotating speed label to each image. Then, for the key regions related to dynamic assembly parameters in the dynamic sequence image, the feature point sets of the key regions are extracted by the optical flow method; and the motion vectors of the key regions are obtained by calculating the displacement and direction of the same feature point between adjacent frames. Specifically, three independent key regions are framed respectively, and a 5-pixel buffer band is reserved on the edge of each key region to exclude background interference; the FAST corner detection is used in each key region to extract the corner points with a gradient change greater than 30 as initial feature points, and then the Harris response value is used to filter and retain the feature points with a response value in the top 80% to ensure representativeness and sparseness; the matching relationship of the feature points between adjacent frames is established by the optical flow method, a 5*5 search window is constructed at the corresponding position of the adjacent frame based on the feature points of the current frame, the similarity is calculated by the normalized cross-correlation coefficient, and it is determined whether it is an effective match; the displacement of the x and y directions between adjacent frames is calculated to obtain the displacement, the displacement direction is determined by the inverse tangent function, the real-time motion speed is converted combined with the camera frame rate, and finally the motion vector set of each key region is formed. Then, the theoretical blur kernel length is calculated according to the rotating speed, and the theoretical blur kernel direction is determined according to the rotating direction of the axle; the initial parameters of the theoretical blur kernel are obtained. Specifically, the rotating speed is converted into angular velocity, the actual radii of the bearing outer ring, fastener and shaft neck to the rotating center are obtained, the actual motion arc length of the key regions within the exposure time is calculated combined with the exposure time of the industrial camera, and the actual arc length is converted into the blur kernel length in pixel scale by the pixel size of the camera. The theoretical blur kernel direction is determined according to the rotating direction of the axle: when the rotating direction signal fed back by the encoder is clockwise, the blur kernel direction is negative, and when the rotating direction signal fed back by the encoder is counterclockwise, the blur kernel direction is positive; the tangent angle is calculated from the relative position of the region center coordinates and the rotating center, and finally the theoretical blur kernel length and the kernel direction are obtained. Then, the genetic algorithm is used to optimize the optimal blur kernel parameters with the maximum edge gradient entropy of the key region as the objective function, and finally the optimal blur kernel parameters are deblurred to obtain the motion compensated image.

[0054] The dynamic assembly parameters are extracted from the motion compensated image based on the improved YOLOv8 algorithm, and the dynamic assembly parameters include the bearing outer ring radial runout and the fastener rotation offset angle. The calculation method is that the bearing outer ring radial runout is fitted into a circle by the least square method based on the edge coordinates of the image, the center coordinates and the radius are obtained, and the radial offset of the outer ring center relative to the reference is calculated based on the rotating center of the axle ; and the fastener rotation offset angle is the absolute value of the included angle difference between the direction vector of the first frame and the direction vector of the current frame.

[0055] Then after the dynamic detection is completed, the dynamic assembly parameters are compared with the preset dynamic standard parameter library and standard vibration data to determine whether they are qualified.

[0056] Finally, the static and dynamic detection is performed in cycles for multiple rounds, and the detection is completed when the set number of rounds is reached. If all the rounds of detection are qualified and the vibration data is normal, the axle assembly quality is determined to be qualified. If any round of detection is unqualified, the axle assembly quality is determined to be unqualified.

[0057] The above is only a preferred embodiment of the present application, and is not intended to limit the present application in other forms. Any skilled person in the art can modify or change the above disclosed technical content to equivalent embodiments applied to other fields. However, any simple modification, equivalent change and modification made on the basis of the technical essence of the present application to the above embodiments still falls within the protection scope of the present application.

Claims

1. A machine vision-based method of detecting quality of assembly of an axle, the method comprising: The method comprises the following steps: S1, first fix the assembled axle on the positioning fixture, and collect static image data of the assembled axle by using an industrial camera; S2, process the static image data to obtain processed static images; S3, extract static assembly parameters by using the improved YOLOv8 algorithm, the static assembly parameters include coaxiality of the bearing inner ring and the axle neck, fitting clearance of the axle shoulder and the bearing end face, integrity of the fastener corner, and fitting clearance of the keyway and the key; compare the static assembly parameters with a preset static standard parameter library, and if all parameters are within the tolerance range, perform dynamic detection; S4, dynamic detection is used to perform dynamic test on the axle that passes the static detection, preset test time is executed according to the actual use scene, and dynamic sequence images and vibration data of the axle at each preset gradient speed from idle speed to rated speed are collected after the experiment; S5, perform motion blur compensation on the dynamic sequence images, extract dynamic assembly parameters based on the improved YOLOv8 algorithm, the dynamic assembly parameters include bearing outer ring radial runout and fastener rotation offset angle, and perform denoising processing on the vibration data; S6, compare the dynamic assembly parameters with a preset dynamic standard parameter library and standard vibration data to determine whether they are qualified; S7, cyclically perform multiple rounds of static and dynamic detection, if all rounds of detection are qualified and the vibration data are normal, it is determined that the axle assembly quality is qualified, and if any round of detection is unqualified, it is determined that the axle assembly quality is unqualified; In the step S3, the improved YOLOv8 algorithm is realized by connecting a gap feature attention module GAM after a C2f feature extraction unit in a Backbone layer of the YOLOv8 algorithm; the GAM is constructed as follows: S311, receive a multi-scale feature map F output by the C2f unit in the Backbone layer, the feature map includes three features of different scales; S312, globally average-pooling the feature map F to obtain a channel-dimension feature vector , the inputting a channel mapping network composed of 2 full connection layers, inserting a ReLU activation function therebetween to realize nonlinear transformation, and outputting a channel attention weight ; S313、combine with the original feature map F, multiplying the channel dimension, completing the reinforcement of the gap-related features at the channel level; S314, 3x3 convolution is performed on the enhanced feature map to compress the channel number to 1, and a single-channel feature map is obtained Then, the normalized is generated by a Sigmoid activation function The spatial attention weight is multiplied by the channel-enhanced feature map element by element, and the enhancement of the key assembly area on the spatial level is completed; S315. Perform a 1×1 convolution on the spatially enhanced feature map, adjust the number of channels to match the input feature map F, and output the final enhanced feature map. .

2. The machine vision-based detection method for axle assembly quality according to claim 1, wherein, In the step S2, the realization of processing the static image data to obtain processed static images includes: S21, for each pixel of the input static raw image I taking its initial 3x3 neighborhood calculating the gradient magnitude of the pixel and the local noise intensity in the following way where are the horizontal and vertical gradients, respectively; and in the following way where is the gray value of the static raw image at pixel coordinates (x,y), is the mean value of all pixels in the 3x3 neighborhood; S22, the gradient and noise intensity are normalized to obtain normalized gradient and noise intensity, and then the filter window side length corresponding to each pixel is obtained, and the calculation method is wherein is expressed as the window base length, are weight coefficients, respectively, is the normalized value of the local noise intensity, is the normalized value of the gradient amplitude of the pixel; S23, constraint and rounding to window, if then forced to 3 as minimum window, if then forced to 7, if then rounding to odd number, finally get the filter window side length of the pixel ; S24, with the pixel as the center, a square filter window with a side length of is constructed, and the median value of the gray scale of all the pixels in the window is calculated as the filtered pixel value. S25. Filter the image. An edge map is obtained through edge detection, and then the edge confidence score is calculated. The calculation method for the edge confidence is as follows: ,in, For any point gradient value, The average gradient value of the surrounding neighborhood. To avoid the denominator being zero for extremely small constants, This represents the number of edge pixels within the neighborhood. Given the total number of pixels in the neighborhood, targeted sharpening is performed based on a preset edge confidence threshold to obtain the final static image. The calculation method is as follows: ,in, To sharpen the intensity, For directional sharpening operators, based on edge direction angles choose, The set edge confidence threshold.

3. The machine vision-based axle assembly quality detection method of claim 1, wherein, The realization of extracting the static assembly parameters by using the improved YOLOv8 algorithm of the connected gap feature attention module GAM includes: S321, embed one GAM module after each of three different scale C2f units of the original YOLOv8 Backbone; S322、output the enhanced feature maps of the 3 C2f-GAM units The input neck layer realizes the top-down scale transmission through the feature pyramid network to obtain the fused multi-scale feature maps. S323, finally input the fused feature map into a regression head and a detection head of a Head layer, the detection head identifies key components of the axle assembly and calculates the static assembly parameter values.

4. The machine vision-based axle assembly quality detection method of claim 1, wherein, Before the step S4, the pre-tightening force of the fastener also needs to be detected, a torque sensor and an angle encoder are used to detect real-time torque values and angle values; construct a tightening curve based on the collected torque values and angle values, compare the established tightening curve with a standard tightening curve, calculate the integral area difference of the two curves in the elastic section, if the difference exceeds a set threshold, it is determined that the pre-tightening force is unqualified, otherwise, it is qualified.

5. The machine vision-based axle assembly quality detection method of claim 1, wherein, In the step S5, the realization of performing motion blur compensation on the dynamic sequence images includes: S51, first establish the association between dynamic sequence images and speed, and collect the idle speed to the rated speed of each preset gradient speed and the corresponding dynamic sequence image frame one by one, add a unique speed label to each frame of image; S52, for the key area related to the dynamic assembly parameter in the dynamic sequence image, the feature point set of each key area is extracted by the optical flow method; by calculating the displacement and displacement direction of the same feature point between adjacent frames, the motion vector of the key area is obtained; S53, according to the speed calculation theory, the length of the fuzzy kernel is calculated, and the direction of the theoretical fuzzy kernel is determined according to the rotating direction of the axle; the initial parameters of the theoretical fuzzy kernel are obtained; S54, the genetic algorithm is used to optimize the optimal fuzzy kernel parameters with the maximum edge gradient entropy of the key area as the objective function; S55, finally, the optimal fuzzy kernel parameters obtained are deblurred to obtain the motion compensated image.

6. The machine vision-based axle assembly quality detection method of claim 1, wherein, The vibration data in the step S5 is denoised by using Kalman filtering algorithm.

Citation Information

Patent Citations

  • Vehicle door surface defect detection method based on improved YOLOv8 network

    CN117173096A

  • Dynamic scene online calibration method and system for three-dimensional target detection

    CN120563628A