Aircraft riveting upset head geometric defect detection method
By building a Matlab-based detection system and combining Gaussian functions and improved Zernike matrix subpixel edge detection, the problems of automation and accuracy in the detection of defects in aircraft riveting heads were solved, achieving efficient and accurate defect detection.
Patent Information
- Application Number
- CN202510844043.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-28
AI Technical Summary
In the current technology, defect detection of aircraft riveting heads mainly relies on manual inspection, which is prone to missed detections, false detections, and individual differences, and cannot meet the precision and intelligent requirements of modern industry.
A detection system was built using a checkerboard calibration method based on Matlab. It combines two-dimensional Gaussian function smoothing and denoising, Canny operator edge detection, and improved Zernike moment subpixel edge detection. Subpixel-level edge localization is achieved through a slope edge model, thereby improving the edge extraction accuracy.
It enables high-precision automated detection of defects in aircraft riveting heads, reduces detection costs, and improves detection efficiency and accuracy. It is suitable for defect detection in complex structures.
Smart Images

Figure CN120852292A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to aircraft riveting defect detection technology and machine vision technology, specifically to a method for detecting geometric defects in aircraft riveting upset heads. Background Technology
[0002] With my country's increasing emphasis on the aviation sector, aircraft manufacturing technology has developed rapidly, and the production volume and precision requirements for both military and civilian aircraft are constantly improving. Aircraft manufacturing, as a crucial component of advanced manufacturing, is a strategic industry strongly supported by the state, with aircraft assembly being the core of the entire manufacturing process. The quality of aircraft assembly directly affects the aircraft's service life and flight performance.
[0003] During each flight, the aircraft is subjected to cyclic loads from the ground to the air and back to the ground, making stress concentrations prone to occur at structural joints. Substandard riveting quality can lead to uneven stress distribution or insufficient tightening in the joint area, creating potential safety hazards. The quality of riveting directly affects the service life of thin-walled components and has a profound impact on the overall structural performance and flight safety of the aircraft. Therefore, regular riveting quality inspection is essential. In current aviation production, defect detection in riveting quality primarily relies on manual inspection. Workers visually inspect and touch the riveting head for parameters such as diameter, cracks, and scratches. However, due to the large number of riveting heads, the workload for workers is substantial, easily leading to missed or false detections, affecting the accuracy and reliability of the inspection. Furthermore, different workers have different evaluation standards, resulting in individual differences in inspection results, which cannot meet the requirements of accurate, precise, and intelligent modern industrial inspection.
[0004] With the rapid development of computer technology and the continuous improvement of visual inspection accuracy, machine vision inspection technology has been widely used in industrial production. Compared with traditional inspection methods, machine vision technology achieves non-contact, high-precision, and real-time automated inspection by simulating human visual functions. This technology effectively solves the subjectivity problem of manual inspection, overcomes the limitations of contact inspection, and significantly improves inspection efficiency. With its high stability, flexibility, and adaptability to complex environments, machine vision has become an important component of modern industrial automation. Summary of the Invention
[0005] The purpose of this invention is to solve the technical problems existing in the prior art and to provide a method for detecting geometric defects in aircraft riveting heads.
[0006] To achieve the above objectives, the technical solution provided by this invention is: a method for detecting geometric defects in aircraft riveting upset heads, the method comprising the following steps:
[0007] S100: Build a platform for acquiring images of defects in riveting upsetting heads to meet the requirements for riveting defect detection;
[0008] The riveting upsetting head defect image acquisition system platform includes an industrial camera, lens, bracket, light source, and computer. The industrial camera is used to acquire images and convert the images into signals, which are then transmitted to the computer. The computer controls the industrial camera to complete image acquisition, and processes and subsequently inspects the images. The lens is used to focus the light from the object under test onto the camera's photosensitive element. The light source is used for auxiliary illumination, enabling the object under test to present a clear external outline and defect details.
[0009] After the platform was built, the imaging parameters of the detection system were obtained by the checkerboard calibration method based on Matlab. The checkerboard calibration method based on Matlab used a backlit ceramic checkerboard with a specification of 9*9 array and a single grid size of 5*5mm.
[0010] S200: Smoothing and denoising the original grayscale image using a two-dimensional Gaussian function:
[0011]
[0012] In the formula, σ is the standard deviation of the Gaussian function, and the output image I(u,v) of S200 after Gaussian smoothing is:
[0013] I(u,v)=G(u,v)g(u,v) (2)
[0014] In the formula, g(u,v) is the original grayscale image;
[0015] S300: Calculation of image gradient magnitude and gradient direction;
[0016] The gradient magnitude image H(u,v) and gradient direction θ(u,v) are defined as follows:
[0017]
[0018] S400: Assign values to the image gradient: Select the pixel to be processed as the center, calculate the interpolation of the gradient magnitudes of two adjacent gradients in the gradient direction of the current pixel. If the gradient magnitude is greater than the two interpolation values, then the point is an edge point and its magnitude is assigned to 1; otherwise, it is assigned to 0.
[0019] S500: A function for coarsely extracting defect edges based on the Canny operator to obtain a unit circle image;
[0020] Edge detection and connection are performed based on a dual threshold of high and low values. Let the high threshold be T. max The low threshold is T min If the gradient intensity of a pixel in the image is greater than T maxIf the gradient intensity of a pixel is less than T, then that point is a strong edge point; min If the gradient intensity of a pixel is within T, then the point is a non-edge point; min and T max If the point is between [a certain value] and [another value], then that point is a weak edge point.
[0021] Weak edge points have two possibilities: one is a true edge point, and the other is a non-edge point caused by noise. Therefore, it is necessary to combine the information of strong edge points for further judgment. After the above steps, the unit circle image function with Canny edge coarse localization is obtained.
[0022] S600: Establishing the cumulative distribution function of the edge model based on improved Zernike moment sub-pixel edge detection;
[0023] Subpixel edge detection based on improved Zernike moments employs a step model at edges. However, the edge intensity in actual images is not step-like but gradually changes. Therefore, the cumulative distribution function of the edge model is established as follows:
[0024]
[0025] In the formula, u′ is the new coordinate axis after image rotation, perpendicular to the edge; σ is the standard deviation, which can change the edge width; l is the distance from the edge to the u′ axis;
[0026] S700: Uses a ramp edge model instead of a stepped model;
[0027] To simplify the calculation, a slope edge model is used instead. The functional expression of the slope model is:
[0028]
[0029] In the formula, d is the horizontal width of the slope, h and h+g are the distances from the edge to the u-axis, and h and h+g represent the gray values of the image background and the graphic, respectively; that is, the edge model is transformed from the step model to the slope function model.
[0030] S800: The defining equation of Zernike moments is written in rectangular coordinate form;
[0031] The expression in the rotating coordinate system is:
[0032]
[0033] S900: Using pixel-level edge positioning points as the origin, the final sub-pixel edge coordinates in the actual image are obtained;
[0034] Using the pixel-level edge location point (u0, v0) as the origin, the final sub-pixel edge coordinates (u0, v0) in the actual image are obtained.e ,v e )for:
[0035]
[0036] In the formula, N is the size of the template.
[0037] Preferably, the specific method for establishing the cumulative distribution function of the edge model based on the improved Zernike moment sub-pixel edge detection in S600 is as follows:
[0038] The Zernike polynomial is defined as:
[0039] V nm (ρ,ω)=S nm (ρ)e imω
[0040] ρ represents the distance from the coordinate point (u,v) in the Cartesian coordinate system to the origin, and ω is the angle between ρ and the u direction;
[0041] S nm (ρ) can be expressed as:
[0042]
[0043] In the formula, n and m are integers, n≥0, n≥|m| and n-|m| is even;
[0044] The nth-order m-th Zernike moment of a continuous image f(u,v) in the unit circle is defined as:
[0045]
[0046] Under discrete conditions, the discrete image f * The nth-order m-th Zernike moment of (u,v) is defined as:
[0047]
[0048] In the formula, is the conjugate matrix of the Zernike polynomial in the complex region;
[0049] If the image is rotated The relationship between the angle, the Zernike moment polynomial before and after rotation, and the equation satisfy... Therefore, when an image rotates, the phase angle changes, but the phase modulus remains unchanged. This property is known as the rotation invariance of Zernike moments. Using this property, edge parameters can be extracted by processing the rotated image, achieving sub-pixel-level edge localization.
[0050] Beneficial effects of this invention:
[0051] This invention studies and analyzes the Zernike moment method in the moment method, and improves the traditional Zernike moment method by proposing an improved Canny-Zernike moment sub-pixel edge extraction algorithm. This method is then used to complete the edge extraction step of the riveting upsetting head, thereby improving the edge extraction accuracy.
[0052] This invention is not only applicable to the defect measurement of aircraft riveting heads, but can also be extended to the defect detection of other similar structures, thus having a certain degree of versatility.
[0053] It not only solves the problem that defect detection in actual aircraft production still mainly relies on manual visual inspection by workers, which is prone to missed detection and false detection and cannot meet the requirements of automated inspection, but is also applicable to complex structural products such as aerospace equipment. It has important theoretical significance and practical engineering value for improving defect detection accuracy, reducing development costs and improving aircraft defect detection efficiency. Attached Figure Description
[0054] The accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, are illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention.
[0055] Figure 1 This is a diagram of the platform device for the riveting upsetting head defect detection system of the present invention;
[0056] Figure 2 This is an example diagram of the platform device for the riveting upsetting head defect detection system of the present invention;
[0057] Figure 3 This is a diagram of the slope edge model of the present invention;
[0058] Figure 4 This is a flowchart of the riveting defect detection algorithm according to an embodiment of the present invention;
[0059] Figure 5 This is the software system testing process of the present invention. Detailed Implementation
[0060] This section will describe in detail specific embodiments of the present invention. Preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the drawings is to supplement the textual description with graphics, so that people can intuitively and vividly understand each technical feature and overall technical solution of the present invention, but they should not be construed as limiting the scope of protection of the present invention.
[0061] Reference Figure 1-Figure 5 According to a preferred embodiment of the present invention, a method for detecting geometric defects in aircraft riveting upset heads includes the following steps:
[0062] S100: Build a platform for acquiring images of riveting upsetting defects to meet the requirements for riveting defect detection; after the platform is built, use the Matlab-based checkerboard calibration method to obtain the imaging parameters of the detection system. The Matlab-based checkerboard calibration method uses a 9*9 array of backlit ceramic checkerboard with a single grid size of 5*5mm.
[0063] S200: Smoothing and denoising the original grayscale image using a two-dimensional Gaussian function:
[0064]
[0065] In the formula, σ is the standard deviation of the Gaussian function, and the output image I(u,v) of S200 after Gaussian smoothing is:
[0066] I(u,v)=G(u,v)g(u,v) (2)
[0067] In the formula, g(u,v) is the original grayscale image;
[0068] S300: Calculation of image gradient magnitude and gradient direction;
[0069] The gradient magnitude image H(u,v) and gradient direction θ(u,v) are defined as follows:
[0070]
[0071] S400: Assign values to the image gradient: Select the pixel to be processed as the center, calculate the interpolation of the gradient magnitudes of two adjacent gradients in the gradient direction of the current pixel. If the gradient magnitude is greater than the two interpolation values, then the point is an edge point and its magnitude is assigned to 1; otherwise, it is assigned to 0.
[0072] S500: A function for coarsely extracting defect edges based on the Canny operator to obtain a unit circle image;
[0073] Edge detection and connection are performed based on a dual threshold of high and low values. Let the high threshold be T. max The low threshold is T min If the gradient intensity of a pixel in the image is greater than T max If the gradient intensity of a pixel is less than T, then that point is a strong edge point; min If the gradient intensity of a pixel is within T, then the point is a non-edge point; min and T max If the point is between [a certain value] and [another value], then that point is a weak edge point.
[0074] Weak edge points have two possibilities: one is a true edge point, and the other is a non-edge point caused by noise. Therefore, it is necessary to combine the information of strong edge points for further judgment. After the above steps, the unit circle image function with Canny edge coarse localization is obtained.
[0075] S600: Establishing the cumulative distribution function of the edge model based on improved Zernike moment sub-pixel edge detection;
[0076] Subpixel edge detection based on improved Zernike moments employs a step model at the edges, but the edge intensity in actual images is not step-like but gradually changes. Therefore, an edge model cumulative distribution function is established.
[0077] S700: Uses a ramp edge model instead of a stepped model;
[0078] To simplify the calculation, a slope edge model is used instead. The functional expression of the slope model is:
[0079]
[0080] In the formula, d is the horizontal width of the slope, h and h+g are the distances from the edge to the u-axis, and h and h+g represent the gray values of the image background and the graphic, respectively; that is, the edge model is transformed from the step model to the slope function model.
[0081] S800: The defining equation of Zernike moments is written in rectangular coordinate form;
[0082] The expression in the rotating coordinate system is:
[0083]
[0084] S900: Using the pixel-level edge positioning point as the origin, the final sub-pixel edge coordinates in the actual image are obtained.
[0085] Using the pixel-level edge location point (u0, v0) as the origin, the final sub-pixel edge coordinates (u0, v0) in the actual image are obtained. e ,v e )for:
[0086]
[0087] In the formula, N is the size of the template.
[0088] In this embodiment, the specific method for step S600, which establishes the cumulative distribution function of the edge model based on the improved Zernike moment sub-pixel edge detection, is as follows:
[0089] S601: The Zernike polynomial is defined as follows:
[0090] V nm (ρ,ω)=S nm (ρ)e imω (8)
[0091] In equation (8), ρ represents the distance from the coordinate point (u,v) in the Cartesian coordinate system to the origin, and ω is the angle between the directions of ρ and u.
[0092] S nm (ρ) can be expressed as:
[0093]
[0094] In equation (9), n and m are integers, n≥0, n≥|m| and n-|m| is even;
[0095] The nth-order m-th Zernike moment of a continuous image f(u,v) in the unit circle is defined as:
[0096]
[0097] Under discrete conditions, the discrete image f * The nth-order m-th Zernike moment of (u,v) is defined as:
[0098]
[0099] In equation (11), Let be the conjugate matrix of the Zernike polynomial over the complex region.
[0100] If the image is rotated The relationship between the angle, the Zernike moment polynomial before and after rotation, and the equation satisfy... Therefore, when an image is rotated, the phase angle changes, but the phase modulus remains unchanged. This property is known as the rotation invariance of Zernike moments. With this property, edge parameters can be extracted more easily by processing the rotated image, thereby achieving sub-pixel level edge localization.
[0101] S602: Traditional Zernike moment-based sub-pixel edge detection uses a step model at the edges, but the edge intensity in actual images is not step-like but gradually changes. Therefore, the cumulative distribution function of the edge model is established as follows:
[0102]
[0103] In the formula, u′ is the new coordinate axis after image rotation, perpendicular to the edge; σ is the standard deviation, which can change the edge width; and l is the distance from the edge to the u′ axis.
[0104] In this embodiment, the specific method for step S800, which expresses the definition equation of the Zernike moment in rectangular coordinate form, is as follows:
[0105] S801: Coordinate Transformation. Let Re represent the real part and Im represent the imaginary part. Then, for ease of integration, the definition of the Zernike moment can be written in rectangular coordinates. The expression in the rotating coordinate system is:
[0106]
[0107] S802: Region division. Using the constructed slope model, the Zr values of the slope edge model are... nm ′ Divided into three areas:
[0108] Zer′ nm =Zer′ nm1 +Zer′ nm2 +Zer′ nm3 (14)
[0109] S803: Zer′ nm1 Zer′ nm2 Zer′ nm3 expression.
[0110] Zer′ nm1 Zer′ nm2 Zer′ nm3 The expressions are as follows:
[0111]
[0112] S804: When n = 1 and m = 1, we can obtain Zer′ from equation (12). 11 .
[0113]
[0114] S805: When n = 2 and m = 0, we can obtain Zer′ from equation (12). 20 .
[0115]
[0116] S806: When When the value approaches 0, we can obtain from equations (14) and (15):
[0117]
[0118] S807: When As it approaches 0, it infinitely approximates the result in the step model, meaning the step model can be considered a special case of the slope model. In the traditional step model algorithm, d is related to the ratio of the two Zernike moments; therefore, in the slope model, their relationship is approximately:
[0119]
[0120] According to equation (18), we can obtain:
[0121]
[0122] when As the value approaches 0, the limit of d can be obtained:
[0123]
[0124] Obtain the image rotation angle
[0125]
[0126] According to equation (21), the direction of the edge normal of the image f(u,v) can be obtained:
[0127]
[0128] As can be seen from this invention: (1) The Zernike moment method in the moment method is studied and analyzed, and the traditional Zernike moment method is improved. An improved Canny-Zernike moment sub-pixel edge extraction algorithm is proposed, and the edge extraction step of the riveting head is completed using this method to improve the edge extraction accuracy. (2) This invention is not only applicable to the defect measurement of aircraft riveting heads, but can also be extended to the defect detection of other similar structures, and has a certain degree of versatility.
[0129] Furthermore, the implementation process of this invention is relatively simple and clear, making it easy for engineers to understand and operate, thus lowering the technical threshold. In practical implementation, this invention can automatically identify and extract the edge features of the riveting head, thereby accurately calculating the geometric dimensions of defects, such as length, width, and other key parameters. This data is of great significance for evaluating riveting quality, timely detection of potential defects, and ensuring the safety of aircraft structures.
[0130] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for detecting geometric defects in aircraft riveting upsetting heads, characterized in that: The method includes the following steps: S100: Build a platform for acquiring images of riveting upsetting defects to meet the requirements for riveting defect detection; after the platform is built, use the Matlab-based checkerboard calibration method to obtain the imaging parameters of the detection system. The Matlab-based checkerboard calibration method uses a 9*9 array of backlit ceramic checkerboard with a single grid size of 5*5mm. S200: Smoothing and denoising the original grayscale image using a two-dimensional Gaussian function: In the formula, σ is the standard deviation of the Gaussian function, and the output image I(u,v) of S200 after Gaussian smoothing is: I(u,v)=G(u,v)g(u,v)(2) In the formula, g(u,v) is the original grayscale image; S300: Calculation of image gradient magnitude and gradient direction; The gradient magnitude image H(u,v) and gradient direction θ(u,v) are defined as follows: S400: Assign values to the image gradient: Select the pixel to be processed as the center, calculate the interpolation of the gradient magnitudes of two adjacent gradients in the gradient direction of the current pixel. If the gradient magnitude is greater than the two interpolation values, then the point is an edge point and its magnitude is assigned to 1; otherwise, it is assigned to 0. S500: A function for coarsely extracting defect edges based on the Canny operator to obtain a unit circle image; Edge detection and connection are performed based on a dual threshold of high and low values. Let the high threshold be T. max The low threshold is T min If the gradient intensity of a pixel in the image is greater than T max If the gradient intensity of a pixel is less than T, then that point is a strong edge point; min If the gradient intensity of a pixel is within T, then the point is a non-edge point; min and T max If the point is between [a certain value] and [another value], then that point is a weak edge point. Weak edge points have two possibilities: one is a true edge point, and the other is a non-edge point caused by noise. Therefore, it is necessary to combine the information of strong edge points for further judgment. After the above steps, the unit circle image function with Canny edge coarse localization is obtained. S600: Establishing the cumulative distribution function of the edge model based on improved Zernike moment sub-pixel edge detection; Subpixel edge detection based on improved Zernike moments employs a step model at edges. However, the edge intensity in actual images is not step-like but gradually changes. Therefore, the cumulative distribution function of the edge model is established as follows: In the formula, u′ is the new coordinate axis after image rotation, perpendicular to the edge; σ is the standard deviation, which can change the edge width; l is the distance from the edge to the u′ axis; S700: Uses a ramp edge model instead of a stepped model; To simplify the calculation, a slope edge model is used instead. The functional expression of the slope model is: In the formula, d is the horizontal width of the slope, h and h+g are the distances from the edge to the u-axis, and h and h+g represent the gray values of the image background and the graphic, respectively; that is, the edge model is transformed from the step model to the slope function model. S800: The defining equation of Zernike moments is written in rectangular coordinate form; The expression in the rotating coordinate system is: S900: Using pixel-level edge positioning points as the origin, the final sub-pixel edge coordinates in the actual image are obtained; Using the pixel-level edge location point (u0, v0) as the origin, the final sub-pixel edge coordinates (u0, v0) in the actual image are obtained. e ,v e )for: In the formula, N is the size of the template.
2. The method for detecting geometric defects in aircraft riveting upset heads according to claim 1, characterized in that: The riveting upsetting head defect image acquisition system platform includes an industrial camera, lens, bracket, light source, and computer. The industrial camera is used to acquire images and convert the images into signals, which are then transmitted to the computer. The computer controls the industrial camera to complete image acquisition, and processes and subsequently inspects the images. The lens is used to focus the light from the object under test onto the camera's photosensitive element. The light source is used for auxiliary illumination, enabling the object under test to present a clear external outline and defect details.
3. The method for detecting geometric defects in aircraft riveting upset heads according to claim 1, characterized in that: The specific method for establishing the cumulative distribution function of the edge model based on the improved Zernike moment sub-pixel edge detection in S600 is as follows: The Zernike polynomial is defined as: V nm (ρ,ω)=S nm (p)e imω ρ represents the distance from the coordinate point (u,v) in the Cartesian coordinate system to the origin, and ω is the angle between ρ and the direction of u; S nm (ρ) can be expressed as: In the formula, n and m are integers, n≥0, n≥|m| and n-|m| is even; The nth-order m-th Zernike moment of a continuous image f(u,v) in the unit circle is defined as: Under discrete conditions, the discrete image f * The nth-order m-th Zernike moment of (u,v) is defined as: In the formula, is the conjugate matrix of the Zernike polynomial in the complex region; If the image is rotated The relationship between the angle, the Zernike moment polynomial before and after rotation, and the equation satisfy... Therefore, when an image is rotated, the phase angle changes, but the phase modulus remains unchanged. This property is known as the rotation invariance of Zernike moments. With this property, edge parameters can be extracted by processing the rotated image, achieving sub-pixel level edge localization.