Method and system for detecting defects of parts of unmanned aerial vehicle based on machine vision

CN122901185APending Publication Date: 2026-10-13SICHUAN JUNFA JUNRONG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610858401.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]然而,安定面端肋的端肋翼面各区域对雷达散射截面的影响程度存在显著差异,前缘、翼尖等电磁敏感区域的涂层缺陷对整体隐身性能的危害远大于其他区域,并且端肋翼型在前缘、翼尖等部位的曲率半径极小,翼面曲率的存在会改变光线在涂层表面的实际入射角与观测角,使得高光谱相机采集到的光谱反射率与理想平面条件下存在系统性偏差,从而造成缺陷判定时的误判与漏检;因此,难以同时保证对敏感区域的充分覆盖与曲面处光谱数据的准确性,严重制约了无人机零配件表面涂层缺陷检测的整体精度

Benefits of technology

[0037]1.通过将涂层缺陷检测的采样密度与翼面局部散射敏感度分布相关联,使采样资源向对隐身性能影响最关键的电磁敏感区域倾斜,在敏感度梯度较大的区域实现高密度采样以确保捕捉影响整机雷达散射截面的微小涂层缺陷,在敏感度较低的区域适当降低采样密度以提升检测效率,从而解决敏感区域漏检而非敏感区域过度采样的问题,实现了检测可靠性与检测效率的最优平衡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122901185A_ABST
    Figure CN122901185A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine vision defect detection, and particularly relates to a UAV spare part defect detection method and system based on machine vision, which comprises the following steps: acquiring airfoil geometry data and wing surface local scattering sensitivity distribution; obtaining an adaptive sampling point set by non-uniform sampling according to the wing surface local scattering sensitivity distribution, obtaining a continuous scanning track by weighting, and obtaining a hyperspectral image by point-by-point scanning; extracting original spectral data, surface normal vector and surface curvature radius; correcting to obtain equivalent spectral reflectance according to the surface normal vector and a preset bidirectional reflectance distribution function model; correcting the local sampling points with a surface curvature radius less than a preset compensation threshold by a preset high-order correction function curvature compensation to obtain corrected spectral reflectance; and matching and determining coating defects by a preset standard spectral library. The present application realizes sufficient sampling of the electromagnetic sensitive area of the stabilizer end rib and accurate correction of the reflectance at the place with sharp change of curvature, and improves the accuracy of coating defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision defect detection technology, specifically to a machine vision-based method and system for detecting defects in drone parts. Background Technology

[0002] The manufacturing quality of UAV components directly affects the UAV's flight performance and mission reliability, with the manufacturing quality of its aerodynamic structural components directly impacting flight performance and stealth effectiveness. Stabilizer end ribs, as key load-bearing and aerodynamic components of the UAV tail fin, are typically coated with radar-absorbing coatings to control their radar cross-section. Any coating defects can lead to abnormal local scattering characteristics, thereby impairing the UAV's overall stealth capability. Therefore, high-precision defect detection of the radar-absorbing coating on stabilizer end ribs is a crucial aspect of UAV component manufacturing quality control. Machine vision technology, with its non-contact and high-efficiency detection characteristics, has been widely applied in the field of surface quality inspection of aerospace components.

[0003] However, the impact of different regions of the end rib airfoil on the radar cross section varies significantly. Coating defects in electromagnetically sensitive areas such as the leading edge and wingtip have a far greater impact on overall stealth performance than in other areas. Furthermore, the curvature radius of the end rib airfoil is extremely small at the leading edge and wingtip. The presence of airfoil curvature changes the actual incident angle and observation angle of light on the coating surface, resulting in a systematic deviation between the spectral reflectance collected by the hyperspectral camera and the ideal planar condition. This leads to misjudgment and missed detection when identifying defects. Therefore, it is difficult to simultaneously ensure sufficient coverage of sensitive areas and accuracy of spectral data at curved surfaces, which severely restricts the overall accuracy of surface coating defect detection for UAV components. Summary of the Invention

[0004] The purpose of this invention is to provide a machine vision-based method and system for detecting defects in UAV parts, so as to achieve sufficient sampling of the electromagnetically sensitive area of ​​the stabilizer end rib and accurate correction of reflectivity at the point of abrupt curvature change, thereby improving the accuracy of coating defect detection.

[0005] To achieve the above objectives, in one aspect, the present invention provides a machine vision-based method for detecting defects in drone components, the method comprising:

[0006] Step S1: Obtain the three-dimensional digital model of the end rib of the stabilizer to be detected by the UAV and the corresponding local scattering sensitivity distribution of the airfoil. The three-dimensional digital model includes airfoil geometric data.

[0007] Step S2: Based on the local scattering sensitivity distribution of the wing surface, perform non-uniform sampling on the wing surface to obtain an adaptive sampling point set; optimize the path cost by weighting the spatial gradient direction of the local scattering sensitivity distribution of the wing surface to obtain a continuous scanning trajectory; perform point-by-point scanning along the continuous scanning trajectory to obtain a hyperspectral image.

[0008] Step S3: Map the three-dimensional spatial coordinates of each sampling point in the airfoil geometry data to the hyperspectral image to obtain the pixel position corresponding to each sampling point and extract the corresponding original spectral data; extract the surface normal vector and surface curvature radius corresponding to the sampling point from the airfoil geometry data; determine the sampling points with surface curvature radius less than the preset compensation threshold as local sampling points.

[0009] Step S4: Based on the surface normal vector and the preset bidirectional reflection distribution function of the absorbing coating, correct the measured spectral reflectance in the original spectral data of each sampling point to obtain the equivalent spectral reflectance; then, use a preset higher-order correction function to perform curvature compensation on the equivalent spectral reflectance of the local sampling points to obtain the corrected spectral reflectance.

[0010] Step S5: Based on the corrected spectral reflectance and the equivalent spectral reflectance of the sampling points other than the local sampling points, perform spectral matching through a preset standard spectral library to determine the coating defects on the end rib surface.

[0011] Furthermore, the method for obtaining an adaptive sampling point set by performing non-uniform sampling on the wing surface based on the local scattering sensitivity distribution of the wing surface includes:

[0012] Normalize the spanwise and chordwise arc lengths of the airfoil geometry data to establish a bidirectional mapping relationship between the three-dimensional spatial coordinates of the airfoil and the coordinates of the two-dimensional parameter domain; calculate the spatial gradient of the local scattering sensitivity distribution of the airfoil to obtain the gradient vector of each grid node; calculate the magnitude of each gradient vector to obtain the scalar gradient mode field on the airfoil; and map the scalar gradient mode field to the two-dimensional parameter domain according to the bidirectional mapping relationship to obtain the discrete gradient mode field.

[0013] The gradient magnitude of each discrete point in the discrete gradient mode field is weighted with a preset basic sampling density to obtain a sampling density distribution function. The sampling density distribution function is then used to generate a two-dimensional adaptive sampling point set in the two-dimensional parameter domain through a variable density Poisson disk sampling method. Based on the bidirectional mapping relationship, the two-dimensional adaptive sampling point set is mapped back to the three-dimensional space of the airfoil to obtain an adaptive sampling point set.

[0014] Furthermore, the method for obtaining a continuous scanning trajectory by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface includes:

[0015] Extract the airfoil tangent plane from each sampling point in the airfoil geometry data; calculate the local scattering gradient vector of each sampling point based on the local scattering sensitivity distribution of the airfoil; project the local scattering gradient vector onto the airfoil tangent plane to obtain the gradient direction of each sampling point; perform a local neighborhood search on the adaptive sampling point set to obtain a set of effective point pairs; calculate the vector average for each effective point pair in the set to obtain the corresponding average direction vector; calculate the Euclidean distance based on the three-dimensional spatial coordinates of each effective point pair using the spatial distance formula. And determine the connection direction vector from one sampling point to another; calculate the absolute value of the cosine of the angle between the average direction vector and the connection direction vector. .

[0016] The connection cost between effective point pairs is calculated using the absolute value of the Euclidean distance and the cosine of the included angle, through a connection cost formula. The connection cost formula is as follows: ,in and Preset weighting coefficients; The average Euclidean distance between all sampling points is used; all sampling points in the adaptive sampling point set are taken as nodes, the connection cost of valid point pairs in the set of valid point pairs is taken as edge weight, and the connection cost of sampling point pairs not included in the set of valid point pairs is set as the preset penalty cost, thus obtaining a weighted path cost graph; the optimized continuous path traversing all sampling points is obtained by solving the problem through a genetic algorithm, and it is determined as a continuous scanning trajectory.

[0017] Furthermore, the method for mapping the three-dimensional spatial coordinates of each sampling point in the airfoil geometry data to a hyperspectral image, obtaining the pixel position corresponding to each sampling point, and extracting the corresponding original spectral data includes:

[0018] Based on the camera calibration parameters of the shortwave infrared hyperspectral camera, the three-dimensional spatial coordinates of each sampling point are mapped to the pixel position of the hyperspectral image, and the corresponding original spectral data is extracted. The camera calibration parameters include the external parameter rotation matrix, translation vector, internal parameter matrix, and distortion coefficient. The spectral response signal at the pixel position is extracted from the hyperspectral image, and the original spectral data of each sampling point is obtained through radiometric calibration calculation.

[0019] Furthermore, the method for determining sampling points with surface curvature radii smaller than a preset compensation threshold as local sampling points includes:

[0020] Based on the airfoil geometry data and the three-dimensional spatial coordinates of each sampling point in the adaptive sampling point set, the normal curvature of each sampling point along the airfoil chord is obtained through surface local differential geometry calculation; the reciprocal of the absolute value of the normal curvature is used as the surface curvature radius of each sampling point; sampling points with a surface curvature radius less than a preset compensation threshold and greater than a preset effective curvature radius lower limit are determined as local sampling points.

[0021] Furthermore, the method for correcting the measured spectral reflectance in the original spectral data of each sampling point based on the surface normal vector and the preset bidirectional reflectance distribution function of the absorbing coating to obtain the equivalent spectral reflectance includes:

[0022] The optical center position and light source position of the short-wave infrared hyperspectral camera are obtained. The observation direction vector and light source incident direction vector of each sampling point are obtained by pointing the three-dimensional spatial coordinates of each sampling point to the optical center position and light source position, respectively. Based on the surface normal vector, the light source incident direction vector, and the observation direction vector, the measured light source incident angle is calculated. Actual measurement of the reflection angle observed by the camera and azimuth difference By pre-setting the bidirectional reflection distribution function of the absorbing coating, the measured bidirectional reflection distribution function values ​​at each sampling point are obtained. Based on the preset standard angle, the standard bidirectional reflection distribution function value of each sampling point is calculated using the preset bidirectional reflection distribution function of the absorbing coating. .

[0023] Based on the measured spectral reflectance at each sampling point Measured bidirectional reflection distribution function value and standard bidirectional reflection distribution function value The equivalent spectral reflectance of each sampling point is calculated using an angle correction formula; the angle correction formula is: ,in, Spectral wavelength; Preset standard incident angle; Preset standard reflection angle; This is the angle correction factor.

[0024] Furthermore, the method for obtaining the corrected spectral reflectance by performing curvature compensation on the equivalent spectral reflectance of local sampling points using a preset higher-order correction function includes:

[0025] Based on the surface curvature radius of local sampling points, the curvature correction factor for each local sampling point is obtained through a preset higher-order correction function; the preset higher-order correction function is: ;in, The radius of curvature of the surface; , , These are preset coefficients.

[0026] Based on the equivalent spectral reflectance and curvature correction factor of each local sampling point Calculate the corrected spectral reflectance at each local sampling point. .

[0027] Furthermore, the method for determining coating defects on the end rib surface by performing spectral matching using a preset standard spectral library based on the corrected spectral reflectance and the equivalent spectral reflectance of sampling points other than local sampling points includes:

[0028] The corrected spectral reflectance of the local sampling points and the equivalent spectral reflectance of the sampling points other than the local sampling points are respectively matched with the preset standard spectral library to obtain the best matching standard spectrum for each sampling point. Based on the best matching standard spectrum for each sampling point, the corresponding coating thickness value and coating component ratio value are extracted from the preset standard spectral library to obtain the estimated coating thickness value and estimated coating component ratio value for each sampling point.

[0029] Sampling points where the estimated coating thickness exceeds the preset coating thickness tolerance range are identified as having coating thickness defects; sampling points where the estimated coating component ratio deviates from the preset coating component standard ratio by an absolute deviation exceeding a preset deviation threshold are identified as having coating component defects.

[0030] Based on the same inventive concept, this invention also provides a machine vision-based defect detection system for drone parts, the system comprising:

[0031] The model acquisition module is used to acquire a three-dimensional digital model of the end rib of the stabilizer to be detected by the UAV and the corresponding local scattering sensitivity distribution of the airfoil. The three-dimensional digital model includes airfoil geometric data.

[0032] An adaptive scanning module is used to perform non-uniform sampling on the wing surface according to the local scattering sensitivity distribution of the wing surface to obtain an adaptive sampling point set; to obtain a continuous scanning trajectory by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface; and to obtain a hyperspectral image by scanning point by point along the continuous scanning trajectory.

[0033] The spectral and geometric parameter extraction module is used to map the three-dimensional spatial coordinates of each sampling point in the airfoil geometric data to the hyperspectral image, obtain the pixel position corresponding to each sampling point and extract the corresponding original spectral data; extract the surface normal vector and surface curvature radius corresponding to the sampling point from the airfoil geometric data; and determine the sampling points with a surface curvature radius less than a preset compensation threshold as local sampling points.

[0034] The graded correction module is used to correct the measured spectral reflectance in the original spectral data of each sampling point according to the surface normal vector and the preset bidirectional reflectance distribution function of the absorbing coating, so as to obtain the equivalent spectral reflectance; the equivalent spectral reflectance of the local sampling points is then compensated for curvature by a preset higher-order correction function to obtain the corrected spectral reflectance.

[0035] The coating defect determination module is used to determine coating defects on the end rib surface by performing spectral matching based on the corrected spectral reflectance and the equivalent spectral reflectance of sampling points other than local sampling points, through a preset standard spectral library.

[0036] Compared with the prior art, the beneficial effects of the present invention are:

[0037] 1. By correlating the sampling density of coating defect detection with the local scattering sensitivity distribution of the wing surface, sampling resources are tilted towards the electromagnetically sensitive areas that have the most critical impact on stealth performance. High-density sampling is achieved in areas with large sensitivity gradients to ensure the capture of tiny coating defects that affect the radar cross section of the entire aircraft. In areas with low sensitivity, the sampling density is appropriately reduced to improve detection efficiency. This solves the problem of missed detection in sensitive areas and oversampling in non-sensitive areas, achieving the optimal balance between detection reliability and detection efficiency.

[0038] 2. Angle correction of the measured spectral reflectance is performed by using the bidirectional reflection distribution function of the absorbing coating, and curvature compensation is performed on local sampling points by combining a higher-order correction function based on the surface curvature radius. This eliminates the spectral measurement deviations introduced by the three-dimensional curved surface geometry of the wing and the light source-camera observation geometry, so that the spectral data of sampling points under different spatial locations and different geometric conditions are uniformly corrected to the equivalent spectrum under the standard observation geometry. This improves the accuracy and consistency of coating thickness estimation and composition ratio estimation, and enhances the reliability of defect judgment. Attached Figure Description

[0039] Figure 1 This is a flowchart of the machine vision-based defect detection method for UAV parts according to the present invention;

[0040] Figure 2 This is a block diagram of the machine vision-based unmanned aerial vehicle (UAV) component defect detection system of the present invention. Detailed Implementation

[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] Before providing examples, it is necessary to describe the application scenarios of the present invention. The present invention is applicable to the detection of defects in the absorbing coating of rib-type components on the stabilizer of unmanned aerial vehicles.

[0043] Example 1: As Figure 1 As shown, this embodiment provides a machine vision-based method for detecting defects in drone components. The method includes:

[0044] A three-dimensional digital model of the end rib of the stabilizer to be inspected by the UAV and the corresponding local scattering sensitivity distribution of the airfoil are obtained. The three-dimensional digital model includes airfoil geometric data.

[0045] For example, a three-dimensional digital model of the end rib of a certain type of UAV to be inspected is obtained. The spanwise length of the end rib is approximately 300 mm, the maximum chord width is approximately 80 mm, and the minimum leading edge radius of curvature is approximately 8 mm. A coordinate measuring machine is used to perform a full-surface scan of the actual end rib to obtain three-dimensional point cloud data of the airfoil. After surface reconstruction, airfoil geometric data containing the three-dimensional spatial coordinates of each point and the surface normal vector are obtained. In the end rib design stage, full-wave electromagnetic simulation software is used, with the incident direction perpendicular to the airfoil where the end rib is located. The frequency range covers the radar band targeted by the UAV stealth design. The polarization method is to calculate the horizontal polarization and the vertical polarization separately and then take the average value. The airfoil of the end rib is discretized into triangular mesh elements. The bistatic scattering contribution value of each mesh element in the far field direction is calculated, and the contribution value is normalized relative to the maximum scattering contribution value to obtain the local scattering sensitivity value of each mesh node.

[0046] Based on the local scattering sensitivity distribution of the wing surface, non-uniform sampling is performed on the wing surface to obtain an adaptive sampling point set.

[0047] The method for obtaining an adaptive sampling point set by performing non-uniform sampling on the wing surface based on the local scattering sensitivity distribution of the wing surface includes:

[0048] Normalize the spanwise and chordwise arc lengths of the airfoil geometry data to establish a bidirectional mapping relationship between the three-dimensional spatial coordinates of the airfoil and the coordinates of the two-dimensional parameter domain; calculate the spatial gradient of the local scattering sensitivity distribution of the airfoil to obtain the gradient vector of each grid node; calculate the magnitude of each gradient vector to obtain the scalar gradient mode field on the airfoil; and map the scalar gradient mode field to the two-dimensional parameter domain according to the bidirectional mapping relationship to obtain the discrete gradient mode field.

[0049] The gradient magnitude of each discrete point in the discrete gradient mode field is weighted with a preset basic sampling density to obtain a sampling density distribution function. The sampling density distribution function is then used to generate a two-dimensional adaptive sampling point set in the two-dimensional parameter domain through a variable density Poisson disk sampling method. Based on the bidirectional mapping relationship, the two-dimensional adaptive sampling point set is mapped back to the three-dimensional space of the airfoil to obtain an adaptive sampling point set.

[0050] A continuous scanning trajectory is obtained by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface.

[0051] The method for obtaining a continuous scanning trajectory by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface includes:

[0052] Extract the airfoil tangent plane from each sampling point in the airfoil geometry data; calculate the local scattering gradient vector of each sampling point based on the local scattering sensitivity distribution of the airfoil; project the local scattering gradient vector onto the airfoil tangent plane to obtain the gradient direction of each sampling point; perform a local neighborhood search on the adaptive sampling point set to obtain a set of effective point pairs; calculate the vector average for each effective point pair in the set to obtain the corresponding average direction vector; calculate the Euclidean distance based on the three-dimensional spatial coordinates of each effective point pair using the spatial distance formula. And determine the connection direction vector from one sampling point to another; calculate the absolute value of the cosine of the angle between the average direction vector and the connection direction vector. .

[0053] The connection cost between effective point pairs is calculated using the absolute value of the Euclidean distance and the cosine of the included angle, through a connection cost formula. The connection cost formula is as follows: ,in and Preset weighting coefficients; The average Euclidean distance between all sampling points is used; all sampling points in the adaptive sampling point set are taken as nodes, the connection cost of valid point pairs in the set of valid point pairs is taken as edge weight, and the connection cost of sampling point pairs not included in the set of valid point pairs is set as the preset penalty cost, thus obtaining a weighted path cost graph; the optimized continuous path traversing all sampling points is obtained by solving the problem through a genetic algorithm, and it is determined as a continuous scanning trajectory.

[0054] Hyperspectral images are obtained by scanning point by point along a continuous scanning trajectory.

[0055] For example, the direction extending outward from the fuselage along the length of the stabilizer end rib is the spanwise direction; the direction from the foremost point to the rearmost point along the airfoil section is the chordwise direction; calculate the arc length of each grid node along the spanwise direction from the root. and the arc length along the chord starting from the leading edge To obtain the normalized parameters , , Establish the three-dimensional spatial coordinates of the wing surface. Two-dimensional parameter domain coordinates The two-way mapping relationship between the two is established. The local scattering sensitivity distribution of the airfoil is a scalar field on the grid nodes. The local scattering sensitivity values ​​of each grid node are read from the local scattering sensitivity distribution, and the gradient vector of each grid node is calculated using the central difference method. The magnitude is then taken to obtain the scalar gradient mode field on the grid node. Based on the two-way mapping relationship, any coordinate point in the two-dimensional parameter domain is mapped back to the three-dimensional space of the airfoil. Then, the triangular element in which the coordinate point is located is determined by spatial search. The triangular element is composed of three adjacent grid nodes and their connecting lines, and is the basic geometric unit of the airfoil. Based on the gradient magnitude values ​​of the three vertices of the triangular element, the gradient magnitude value of the coordinate point in the two-dimensional parameter domain is calculated by barycentric coordinate interpolation, resulting in the discrete gradient mode field in the two-dimensional parameter domain.

[0056] Based on the spatial resolution and minimum detectable defect size of the short-wave infrared hyperspectral camera, and according to the Nyquist sampling theorem, the sampling interval should not exceed half the defect size. The total area of ​​the end rib wing surface is approximately 0.024 m², and the preset expected total number of sampling points is approximately 3600. The calculated average sampling density on the wing surface is approximately 150,000 points / m², which is determined as the preset basic sampling density. The corresponding average sampling interval is approximately 2.6 mm. Area Jacobian coefficient. The Jacobian coefficient is calculated by the ratio of the three-dimensional area of ​​the triangular surface element to the area of ​​the corresponding parameter domain. Based on the airfoil geometry data, the area Jacobian coefficient from the three-dimensional space of the airfoil to the two-dimensional parameter domain is calculated. The equivalent basic sampling density in the two-dimensional parameter domain is calculated. The gradient magnitudes at each discrete point in the discrete gradient magnitude field are normalized to obtain the normalized gradient magnitudes. The sampling density distribution function is obtained by weighting: By preparing a 150μm thick plate with the same material and coating as the end ribs, and fabricating multiple artificial defects with known thickness deviations on it, different... Each value undergoes a complete inspection process, and the inverted coating thickness is compared with the actual defect thickness to calculate the root mean square error. The value with the smallest error is selected. The value, in this example, is the calibration result. This ensures that the local sampling density at the point of maximum gradient magnitude (leading edge region) is 3.5 times the base density, and the local sampling density at the point of minimum gradient magnitude (flat region) is approximately equal to the base density. The set of all sampling density values ​​constitutes the sampling density distribution function. .

[0057] First, a random initial point is generated as the first existing point. A local sampling radius is calculated based on the sampling density distribution function value at the existing point. The local sampling radius is inversely proportional to the square root of the sampling density distribution function. Candidate points are generated within a ring-shaped region around the existing point. The inner diameter of the ring is equal to the local sampling radius of the existing point, and the outer diameter is equal to twice the local sampling radius. It is determined whether the distance between the candidate point and all existing points in the sampling point set is greater than the local sampling radius corresponding to the candidate point's location. If the distance is satisfied, the candidate point is added to the sampling point set; otherwise, it is discarded. This process is repeated until no new valid candidate points can be generated, at which point the algorithm terminates. Approximately 3720 two-dimensional adaptive sampling points are obtained. The sampling point density in the high gradient region at the leading edge (curvature radius ≤ 20 mm) is approximately 525,000 points / m², and the sampling point density in the flat region is approximately 150,000 points / m². The overall sampling point distribution is positively correlated with the scattering sensitivity gradient. Based on the bidirectional mapping relationship, each sampling point in the two-dimensional adaptive sampling point set is mapped from the two-dimensional parameter domain coordinates... Inverse mapping back to wing surface three-dimensional space coordinates This yields an adaptive sampling point set that is non-uniformly distributed on the wing surface.

[0058] In the airfoil geometry data, the triangular element containing the sampling point is determined. If it is a mesh node, the normal vector is directly extracted. If it is located inside, the normal vector of the corresponding sampling point is obtained by interpolation of the normal vectors of the three vertices using the centroid coordinates. The plane passing through the sampling point and perpendicular to the normal vector is taken as the airfoil tangent plane of the sampling point. The local scattering sensitivity value and three-dimensional coordinates of the vertex of the triangular element containing the sampling point are determined. An approximate function of sensitivity and three-dimensional coordinates is established using linear interpolation. The coefficients are solved by substituting the vertex data to obtain the local scattering gradient vector. The local scattering gradient vector of the sampling point is orthogonally projected onto the airfoil tangent plane to obtain the gradient direction vector. If the gradient direction vector is along the normal direction, the direction is assumed to be along the chord. Based on the field-of-view diameter of 30 mm for a single scan of the short-wave infrared hyperspectral camera and the average spacing of approximately 10 mm between adjacent sampling points in the adaptive sampling point set in a flat area, the median value between the field-of-view diameter and the average spacing is taken to determine the preset neighborhood search radius as 20 mm. Calculate the distance between each sampling point in the adaptive sampling point set and other sampling points. If the distance is less than or equal to the preset neighborhood search radius, add the two sampling points as valid point pairs to the valid point pair set. Valid point pairs with identical sampling points are counted only once. Add the gradient direction vectors of the valid point pairs to obtain the vector sum, and calculate the average direction vector through vector averaging. Calculate the Euclidean distance based on the three-dimensional spatial coordinates of the valid point pairs. And determine the connection direction vector from one sampling point to another. Calculate the absolute value of the cosine of the angle between the average direction vector and the connection direction vector. .

[0059] The preset weighting coefficients are determined by preparing standard end-rib specimens with a known gradient distribution of coating thickness. Multiple combinations of different weighting coefficients are used to perform non-uniform sampling, scanning trajectory planning, hyperspectral image acquisition, equivalent spectral reflectance correction, and coating thickness inversion operations. The weighting coefficient combination with the smallest root mean square error in the coating thickness inversion result is selected to obtain the preset weighting coefficients. , Through the connection cost formula The connection cost of the corresponding valid point pairs is calculated. To prevent connections between non-neighboring point pairs from being selected by the genetic algorithm, a preset penalty cost is set to 10 times the maximum connection cost of all valid point pairs, ensuring it is greater than the connection cost of any valid path. Using all sampled points in the adaptive sampling set as nodes, and the connection cost of each point pair in the valid point pair set as the edge weight, the preset penalty cost between sampled point pairs not included in the valid point pair set is used as the corresponding edge weight, resulting in a weighted path cost graph.

[0060] The path costs between different nodes in the weighted path cost graph do not satisfy the triangle inequality; therefore, a genetic algorithm is used to solve the weighted Hamiltonian path. The genetic algorithm uses the order of sampling point indices as individual codes and randomly generates an initial population; in this example, the population size is determined to be 200. For each individual, the connection costs between corresponding adjacent sampling points in the weighted path cost graph are accumulated to obtain the total path cost, and the reciprocal of the total path cost is used as the fitness value. A roulette wheel selection method is used to select parent individuals from the current population. Partial matching crossover is performed with a crossover probability of 0.8, and exchange mutation is performed with a mutation probability of 0.05 to generate offspring. This iteration is repeated until the preset iteration termination generation of 500. The scanning path optimization problem solved by this scheme introduces local scattering gradient direction weighting into the connection cost formula, making the optimal path mainly composed of locally optimal connections between neighboring sampling points along the gradient direction. The effective dimension of the search space is lower than that of an unordered TSP problem of the same size. After the iteration terminates, the sampling point access order corresponding to the individual with the highest fitness value is output, obtaining the path cost optimization that traverses all sampling points, which is determined as a continuous scanning trajectory. The continuous scanning trajectory prioritizes moving along the direction of the greatest gradient magnitude change. In the leading edge region, the trajectory repeatedly bends along the chord direction, while in the flat region, the trajectory moves gently along the span direction.

[0061] The robotic arm drives a short-wave infrared hyperspectral camera to scan point-by-point along a continuous scanning trajectory. The camera's shooting posture is adjusted based on the surface normal vector of each docking point, maintaining a preset observation angle between the camera's optical axis and the surface normal vector of the docking point, and ensuring the docking point is located in the center of the camera's field of view. The short-wave infrared hyperspectral camera operates in the 1000nm-2500nm band, with a spectral resolution of 5nm and a spatial resolution of 0.2mm / pixel. At each docking point, the camera acquires a complete set of hyperspectral sampling data. After acquiring data at all docking points along the trajectory, a hyperspectral image covering the entire wing surface is obtained.

[0062] The three-dimensional spatial coordinates of each sampling point in the airfoil geometry data are mapped to the hyperspectral image to obtain the pixel position corresponding to each sampling point and extract the corresponding original spectral data.

[0063] The method for mapping the three-dimensional spatial coordinates of each sampling point in the airfoil geometry data to a hyperspectral image, obtaining the pixel position corresponding to each sampling point, and extracting the corresponding original spectral data includes:

[0064] Based on the camera calibration parameters of the shortwave infrared hyperspectral camera, the three-dimensional spatial coordinates of each sampling point are mapped to the pixel position of the hyperspectral image, and the corresponding original spectral data is extracted. The camera calibration parameters include the external parameter rotation matrix, translation vector, internal parameter matrix, and distortion coefficient. The spectral response signal at the pixel position is extracted from the hyperspectral image, and the original spectral data of each sampling point is obtained through radiometric calibration calculation.

[0065] Extract the surface normal vector and surface radius of curvature corresponding to the sampling points from the airfoil geometry data; determine the sampling points with surface radius of curvature less than the preset compensation threshold as local sampling points.

[0066] The method for determining sampling points with a surface curvature radius smaller than a preset compensation threshold as local sampling points includes:

[0067] Based on the airfoil geometry data and the three-dimensional spatial coordinates of each sampling point in the adaptive sampling point set, the normal curvature of each sampling point along the airfoil chord is obtained through surface local differential geometry calculation; the reciprocal of the absolute value of the normal curvature is used as the surface curvature radius of each sampling point; sampling points with a surface curvature radius less than a preset compensation threshold and greater than a preset effective curvature radius lower limit are determined as local sampling points.

[0068] For example, hand-eye calibration is performed on the short-wave infrared hyperspectral camera and the robotic arm end effector to obtain the fixed extrinsic parameter matrix of the camera relative to the robotic arm end effector. Translation vector During point-by-point scanning, the pose rotation matrix of the robotic arm end effector relative to the world coordinate system of the stabilizer end rib is read from the robotic arm control system for each sampling point. Translation vector The extrinsic rotation matrix corresponding to each sampling point is obtained through calculation. Translation vector Each sampling point in the adaptive sampling point set is selected sequentially. Three-dimensional spatial coordinates The sampling points are then transformed one by one using the rigid body transformation formula. ,in The sampling points are the three-dimensional spatial coordinates in the airfoil geometry data. The three-dimensional coordinates of the sampling points in the camera coordinate system are given; the three-dimensional coordinates of each sampling point in the camera coordinate system are calculated.

[0069] A checkerboard calibration plate specifically designed for the short-wave infrared band was used. The checkerboard grid size was 5mm × 5mm, and the material was an aluminum alloy plate with a checkerboard pattern etched on the surface. Images of the calibration plate were captured from 20 different angles and distances using a short-wave infrared hyperspectral camera, and the sub-pixel coordinates of the checkerboard corner points in each image were extracted. The Zhang Zhengyou calibration method was used to jointly optimize and solve the 20 sets of corner point data to obtain the intrinsic parameter matrix of the short-wave infrared hyperspectral camera. And distortion coefficients. Distortion coefficients include radial distortion coefficients. , , and tangential distortion coefficient , The three-dimensional coordinates of the camera coordinate system are taken sequentially at each sampling point. The normalized image coordinates are calculated using the perspective projection transformation formula: , Calculate the radial distance from the normalized image coordinates to the image center point. ; Calculate the radial distortion correction factor ; Calculate the tangential distortion correction amount , ; Obtain the normalized image coordinates after distortion correction , Finally, based on the intrinsic parameter matrix... Convert the distortion-free normalized image coordinates to projected pixel coordinates: , ,in and Intrinsic parameter matrix The focal length parameter in the text, and Intrinsic parameter matrix The coordinates of the principal point in the equation.

[0070] Distortion correction was performed on each sampling point individually to obtain the corresponding pixel position. The pixel positions were located in the hyperspectral image, and the raw digital response values ​​of all bands were read to obtain the spectral response signal. Dark current images and standard white board images were acquired under the same camera parameters. Dark current correction and white board correction were performed on the spectral response signal to obtain the measured spectral reflectance for each band. The measured spectral reflectance for each band was arranged in wavelength order to constitute the raw spectral data of the sampling points. The raw spectral data is a spectral reflectance curve of 301 bands in the short-wave infrared band (1000nm-2500nm) with 5nm intervals.

[0071] In the triangular mesh of the airfoil geometry data, locate the triangular facet element where each sampling point is located. If the sampling point is a mesh node, directly take the corresponding normal vector as the surface normal vector; otherwise, take the normal vectors of the three vertices of the facet element and interpolate them using the centroid coordinates to obtain the surface normal vector. Obtain the local surface parameters along the airfoil chord direction at the location of each sampling point from the airfoil geometry data. Through local differential geometry calculations of the surface, perform quadratic surface fitting on 7×7 mesh vertices in the neighborhood centered on the corresponding sampling point. Calculate the normal curvature along the airfoil chord direction at the corresponding sampling point according to the second fundamental form of the fitted surface. .like Then the surface curvature radius Set to 1000mm; otherwise, use the reciprocal of the absolute value of the normal curvature as the surface curvature radius at each sampling point. The surface curvature radius of the leading edge region of the end rib ranges from 8mm to 20mm, while that of the flat region in the middle and rear of the wing ranges from 50mm to 300mm. A set of arc-shaped test blocks with curvature radii ranging from 5mm to 100mm were prepared, with the same coating as the end rib. The equivalent spectral reflectance of each arc-shaped test block was measured under normal incident light and normal camera observation. The relative deviation was calculated using a planar test block with a curvature radius of 100mm as a benchmark. The curvature radius corresponding to the first occurrence of a relative deviation exceeding 2% was set as the preset compensation threshold, which in this example is 20mm. The compensation is based on the inverse proportional term in the curvature correction function. When the radius of curvature is too small, numerical divergence occurs. Considering the effective detection curvature range that the absorbing coating used in this example can form in the actual spraying process, the lower limit of the preset effective radius of curvature is set to 1 mm. Sampling points with a surface radius of curvature less than 20 mm and greater than 1 mm are identified as local sampling points. A total of approximately 1200-1500 local sampling points are identified, mainly distributed in the region with a leading edge radius of curvature of 8 mm-20 mm.

[0072] Based on the surface normal vector and the preset bidirectional reflection distribution function of the absorbing coating, the measured spectral reflectance in the original spectral data of each sampling point is corrected to obtain the equivalent spectral reflectance.

[0073] The method for correcting the measured spectral reflectance in the original spectral data of each sampling point based on the surface normal vector and the preset bidirectional reflectance distribution function of the absorbing coating to obtain the equivalent spectral reflectance includes:

[0074] The optical center position and light source position of the short-wave infrared hyperspectral camera are obtained. The observation direction vector and light source incident direction vector of each sampling point are obtained by pointing the three-dimensional spatial coordinates of each sampling point to the optical center position and light source position, respectively. Based on the surface normal vector, the light source incident direction vector, and the observation direction vector, the measured light source incident angle is calculated. Actual measurement of the reflection angle observed by the camera and azimuth difference By pre-setting the bidirectional reflection distribution function of the absorbing coating, the measured bidirectional reflection distribution function values ​​at each sampling point are obtained. Based on the preset standard angle, the standard bidirectional reflection distribution function value of each sampling point is calculated using the preset bidirectional reflection distribution function of the absorbing coating. .

[0075] Based on the measured spectral reflectance at each sampling point Measured bidirectional reflection distribution function value and standard bidirectional reflection distribution function value The equivalent spectral reflectance of each sampling point is calculated using an angle correction formula; the angle correction formula is: ,in, Spectral wavelength; Preset standard incident angle; Preset standard reflection angle; This is the angle correction factor.

[0076] The equivalent spectral reflectance of local sampling points is used to perform curvature compensation through a preset higher-order correction function to obtain the corrected spectral reflectance.

[0077] The method for obtaining the corrected spectral reflectance by performing curvature compensation using a preset higher-order correction function on the equivalent spectral reflectance of local sampling points includes:

[0078] Based on the surface curvature radius of local sampling points, the curvature correction factor for each local sampling point is obtained through a preset higher-order correction function; the preset higher-order correction function is: ;in, The radius of curvature of the surface; , , These are preset coefficients.

[0079] Based on the equivalent spectral reflectance and curvature correction factor of each local sampling point Calculate the corrected spectral reflectance at each local sampling point. .

[0080] For example, the current pose data of the short-wave infrared hyperspectral camera is read from the robotic arm control system, and the three-dimensional spatial coordinates of the camera's optical center in the world coordinate system are extracted from the pose data as the camera's optical center position. The light source of the short-wave infrared hyperspectral camera is a ring halogen lamp, which is coaxially mounted with the camera lens. The position of the light source coincides with the position of the camera's optical center, and the position of the light source directly uses the three-dimensional spatial coordinates of the camera's optical center position. The three-dimensional spatial coordinates of the sampling point are then used. and surface normal vector The incident direction vector of the light source is obtained by pointing from the three-dimensional spatial coordinates of the sampling point to the three-dimensional spatial coordinates of the light source position. The observation direction vector is obtained by pointing from the three-dimensional spatial coordinates of the sampling point to the three-dimensional spatial coordinates of the camera's optical center. Measured incident angle of the light source at the sampling point The actual measured reflection angle of the sampling point by the camera If the result exceeds the range [-1, 1], it is truncated to the boundary value -1 or 1. When the light source position coincides with the camera optical center position, and Same direction, azimuth difference When the position of the light source does not coincide with the position of the camera's optical center, and Project the vectors onto the wing tangent plane of the sampling point and calculate the angle between the two projection vectors.

[0081] The pre-defined bidirectional reflection distribution function of the absorbing coating was constructed using a planar sample with the same coating as the end ribs, under fixed conditions of a hyperspectral camera and a ring light source, with an incident angle of... And the step size is 10°, and the reflection angle is And the step size is 10°, and the azimuth difference is Furthermore, the combined spectral reflectance measured with a step size of 15° was normalized to obtain the direction-direction bidirectional reflectance distribution function values ​​under various geometric conditions, with units of [missing information]. The data is stored as a four-dimensional lookup table, indexed by the angle of incidence, angle of reflection, azimuth difference, and spectral wavelength. The angle that provides the most stable reflectivity measurement and is least sensitive to surface tilt is selected as the preset standard angle. The measured incident angle of the light source at the sampling point. Actual measurement of the reflection angle observed by the camera and azimuth difference Using the coordinates as the lookup coordinates, eight surrounding grid points are located in a four-dimensional lookup table, two for each dimension. The measured bidirectional reflectance distribution function value at the corresponding wavelength is then calculated using four-dimensional linear interpolation. Substituting the preset standard angle into a four-dimensional lookup table, the standard bidirectional reflectance distribution function value is obtained by interpolation. The equivalent spectral reflectance of each sampling point was calculated using the angle correction formula. The angle correction formula is based on the assumption that the absorbing coating exhibits weak specular reflection characteristics within the measured angle range, meaning that surface reflection is predominantly diffuse, and the bidirectional reflection distribution function changes gradually with the angle. In actual table lookup, if the measured bidirectional reflection distribution function value of a sampling point is near the specular extinction angle but less than the preset threshold, that sampling point is marked as invalid and not included in subsequent defect determination. The absorbing coating involved in this embodiment has a resin substrate with added microwave absorber particles such as carbon powder and ferrite. In the short-wave infrared band used in this method, the size of the absorber particles is much smaller than the working wavelength. Actual measurements show that the optical penetration depth of the coating in this band is on the order of several micrometers, much smaller than the typical thickness of the coating. The incident light is fully absorbed or diffusely reflected before reaching the coating-substrate interface. The angle correction factor established in this method is corrected using a ratio. The equivalent spectral reflectance has eliminated reflectance deviations caused by differences in surface normal vectors and measurement angles at each sampling point. Angle correction eliminates measurement geometric differences, while curvature compensation eliminates additional reflection distortion caused by surface curvature. Since these two methods have different physical origins, they are not subject to redundant correction. Within the curvature radius of the leading edge of the stabilizer end rib (minimum approximately 8 mm), the correction effect of curvature on the pre-set bidirectional reflection distribution function of the absorbing coating is less coupled with the angle effect. Therefore, the error introduced by sequential correction is less than the level of spectral measurement noise.

[0082] A set of arc-shaped test blocks with curvature radii ranging from 5 mm to 100 mm were prepared, with the same coating and end ribs. The equivalent spectral reflectance of each arc-shaped test block was measured under 0° incident and 0° observation conditions. Using the reflectance of the 100 mm test block as a planar reference, the ratio of the average reflectance of each arc-shaped test block to the reference reflectance was calculated and used as the target value of the correction factor. Nonlinear least squares fitting was employed to obtain... , , The pre-defined higher-order correction function is empirically proposed based on the surface reflection distortion characteristics. It is determined according to the surface curvature radius at each local sampling point. The correction factor for each local sampling point is calculated using preset coefficients. Surface radius of curvature Always greater than 0. In the shortwave infrared band. nm- Within the nm range nm is the interval. At each wavelength band, the equivalent spectral reflectance With correction factor The corrected spectral reflectance for each band was calculated. After all bands have been calculated, the corrected spectral reflectance of the local sampling points is obtained. For non-local sampling points, curvature compensation calculation is not performed; the equivalent spectral reflectance is directly calculated. As the final reflectance data, the corrected spectral reflectance has removed the additional reflectance distortion caused by curvature in the region of minimal curvature.

[0083] Based on the corrected spectral reflectance and the equivalent spectral reflectance of the sampling points other than the local sampling points, spectral matching is performed using a preset standard spectral library to determine the coating defects on the end rib surface.

[0084] The method for determining coating defects on the end rib surface by performing spectral matching using a preset standard spectral library based on the corrected spectral reflectance and the equivalent spectral reflectance of sampling points other than local sampling points includes:

[0085] The corrected spectral reflectance of the local sampling points and the equivalent spectral reflectance of the sampling points other than the local sampling points are respectively matched with the preset standard spectral library to obtain the best matching standard spectrum for each sampling point. Based on the best matching standard spectrum for each sampling point, the corresponding coating thickness value and coating component ratio value are extracted from the preset standard spectral library to obtain the estimated coating thickness value and estimated coating component ratio value for each sampling point.

[0086] Sampling points where the estimated coating thickness exceeds the preset coating thickness tolerance range are identified as having coating thickness defects; sampling points where the estimated coating component ratio deviates from the preset coating component standard ratio by an absolute deviation exceeding a preset deviation threshold are identified as having coating component defects.

[0087] For example, using the same material formulation and spraying process as the end-ribbed absorbing coating, 88 standard coating samples were prepared, covering 11 thickness grades with a thickness range of 50μm-300μm and a thickness interval of 25μm, and 8 composition grades with an absorber-binder ratio range of 0.8:1-1.5:1 and a ratio interval of 0.1:1, retaining 88 thickness-composition combinations. The standard coating samples were planar specimens, and hyperspectral images were acquired at a light source incident angle of 0° and a camera observation angle of 0°. Since the acquisition angle was consistent with the preset standard angle for angle correction, the measured spectral reflectance of the standard coating sample was the equivalent spectral reflectance, eliminating the need for further angle correction. The standard reflectance spectrum, coating thickness value, and coating composition ratio value of each standard coating sample were stored in a one-to-one mapping relationship, forming a preset standard spectral library. The corrected spectral reflectance of local sampling points and the equivalent spectral reflectance of non-local sampling points were used as the spectra to be matched. Calculate the spectrum to be matched and each standard spectrum in the preset standard spectrum library. spectral angle distance ;in, For the first in the preset standard spectral library Standard spectrum; To traverse all wavelengths within the shortwave infrared band from 1000nm to 2500nm. The smallest standard spectrum is used as the best matching standard spectrum for the sampling point. The coating thickness value and composition ratio value corresponding to the standard spectrum are read from the preset standard spectrum library and used as the coating thickness estimate and coating composition ratio estimate for the sampling point.

[0088] The preset coating thickness tolerance range is determined based on the design drawings of the stabilizer end ribs of this UAV model. In this example, the nominal thickness is 150μm, with an allowable deviation of ±15%, i.e., a tolerance range of 127.5μm to 172.5μm. If the estimated coating thickness is less than the lower limit of the preset coating thickness tolerance or greater than the upper limit, the sampling point is judged to have a coating thickness defect, and the defect type is marked as "thinning" or "overthickness". The preset standard ratio of coating components is determined based on the microwave absorbing coating material formulation. In this example, the standard ratio of absorber to binder is 1.2:1. The preset deviation threshold is determined through material formulation tolerance testing, and in this example, it is set to 0.15. If the absolute deviation between the estimated component ratio and the preset standard ratio of coating components exceeds the preset deviation threshold, i.e., the estimated component ratio exceeds the range of 1.05:1 to 1.35:1, the sampling point is judged to have a coating component defect. The judgment results of all sampling points are summarized to obtain the coating defect distribution map of the entire surface of the end rib.

[0089] Example 2: Based on the same inventive concept, such as Figure 2 As shown, this embodiment also provides a machine vision-based defect detection system for drone parts, the system comprising:

[0090] The model acquisition module is used to acquire a three-dimensional digital model of the end rib of the stabilizer to be detected by the UAV and the corresponding local scattering sensitivity distribution of the airfoil. The three-dimensional digital model includes airfoil geometric data.

[0091] An adaptive scanning module is used to perform non-uniform sampling on the wing surface according to the local scattering sensitivity distribution of the wing surface to obtain an adaptive sampling point set; to obtain a continuous scanning trajectory by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface; and to obtain a hyperspectral image by scanning point by point along the continuous scanning trajectory.

[0092] The spectral and geometric parameter extraction module is used to map the three-dimensional spatial coordinates of each sampling point in the airfoil geometric data to the hyperspectral image, obtain the pixel position corresponding to each sampling point and extract the corresponding original spectral data; extract the surface normal vector and surface curvature radius corresponding to the sampling point from the airfoil geometric data; and determine the sampling points with a surface curvature radius less than a preset compensation threshold as local sampling points.

[0093] The graded correction module is used to correct the measured spectral reflectance in the original spectral data of each sampling point according to the surface normal vector and the preset bidirectional reflectance distribution function of the absorbing coating, so as to obtain the equivalent spectral reflectance; the equivalent spectral reflectance of the local sampling points is then compensated for curvature by a preset higher-order correction function to obtain the corrected spectral reflectance.

[0094] The coating defect determination module is used to determine coating defects on the end rib surface by performing spectral matching based on the corrected spectral reflectance and the equivalent spectral reflectance of sampling points other than local sampling points, through a preset standard spectral library.

[0095] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0096] Finally, it should be noted that although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A machine vision-based method for detecting defects in UAV components, characterized in that, The method includes: A three-dimensional digital model of the end rib of the stabilizer to be inspected by the UAV and the corresponding local scattering sensitivity distribution of the airfoil are obtained. The three-dimensional digital model includes airfoil geometric data. Based on the local scattering sensitivity distribution of the wing surface, non-uniform sampling is performed on the wing surface to obtain an adaptive sampling point set; a continuous scanning trajectory is obtained by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface; a hyperspectral image is obtained by scanning point by point along the continuous scanning trajectory. The three-dimensional spatial coordinates of each sampling point in the airfoil geometry data are mapped to the hyperspectral image to obtain the pixel position corresponding to each sampling point and extract the corresponding original spectral data; the surface normal vector and surface radius of curvature corresponding to the sampling point are extracted from the airfoil geometry data; sampling points with a surface radius of curvature less than a preset compensation threshold are determined as local sampling points; Based on the surface normal vector and the preset bidirectional reflection distribution function of the absorbing coating, the measured spectral reflectance in the original spectral data of each sampling point is corrected to obtain the equivalent spectral reflectance; the equivalent spectral reflectance of the local sampling points is then compensated for curvature using a preset higher-order correction function to obtain the corrected spectral reflectance. Based on the corrected spectral reflectance and the equivalent spectral reflectance of the sampling points other than the local sampling points, spectral matching is performed using a preset standard spectral library to determine the coating defects on the end rib surface.

2. The machine vision-based defect detection method for UAV parts according to claim 1, characterized in that, The method for obtaining an adaptive sampling point set by performing non-uniform sampling on the wing surface based on the local scattering sensitivity distribution of the wing surface includes: Normalize the spanwise and chordwise arc lengths of the airfoil geometry data to establish a bidirectional mapping relationship between the three-dimensional spatial coordinates of the airfoil and the coordinates of the two-dimensional parameter domain; calculate the spatial gradient of the local scattering sensitivity distribution of the airfoil to obtain the gradient vector of each grid node; calculate the magnitude of each gradient vector to obtain the scalar gradient mode field on the airfoil; and map the scalar gradient mode field to the two-dimensional parameter domain according to the bidirectional mapping relationship to obtain the discrete gradient mode field. The gradient magnitude of each discrete point in the discrete gradient mode field is weighted with a preset basic sampling density to obtain a sampling density distribution function. The sampling density distribution function is then used to generate a two-dimensional adaptive sampling point set in the two-dimensional parameter domain through a variable density Poisson disk sampling method. Based on the bidirectional mapping relationship, the two-dimensional adaptive sampling point set is mapped back to the three-dimensional space of the airfoil to obtain an adaptive sampling point set.

3. The machine vision-based defect detection method for UAV parts according to claim 2, characterized in that, The method for obtaining a continuous scanning trajectory by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface includes: Extract the airfoil tangent plane from each sampling point in the airfoil geometry data; calculate the local scattering gradient vector of each sampling point based on the local scattering sensitivity distribution of the airfoil; project the local scattering gradient vector onto the airfoil tangent plane to obtain the gradient direction of each sampling point; perform a local neighborhood search on the adaptive sampling point set to obtain a set of effective point pairs; calculate the vector average for each effective point pair in the set to obtain the corresponding average direction vector; calculate the Euclidean distance based on the three-dimensional spatial coordinates of each effective point pair using the spatial distance formula. And determine the connection direction vector from one sampling point to another; calculate the absolute value of the cosine of the angle between the average direction vector and the connection direction vector. ; The connection cost between effective point pairs is calculated using the absolute value of the Euclidean distance and the cosine of the included angle, through a connection cost formula. The connection cost formula is as follows: ,in and Preset weighting coefficients; The average Euclidean distance between all sampling points is used; all sampling points in the adaptive sampling point set are taken as nodes, the connection cost of valid point pairs in the set of valid point pairs is taken as edge weight, and the connection cost of sampling point pairs not included in the set of valid point pairs is set as the preset penalty cost, thus obtaining a weighted path cost graph; the optimized continuous path traversing all sampling points is obtained by solving the problem through a genetic algorithm, and the continuous scanning trajectory is determined.

4. The machine vision-based defect detection method for UAV parts according to claim 1, characterized in that, The method for mapping the three-dimensional spatial coordinates of each sampling point in the airfoil geometry data to a hyperspectral image, obtaining the pixel position corresponding to each sampling point, and extracting the corresponding original spectral data includes: Based on the camera calibration parameters of the shortwave infrared hyperspectral camera, the three-dimensional spatial coordinates of each sampling point are mapped to the pixel position of the hyperspectral image, and the corresponding original spectral data is extracted. The camera calibration parameters include the external parameter rotation matrix, translation vector, internal parameter matrix, and distortion coefficient. The spectral response signal at the pixel position is extracted from the hyperspectral image, and the original spectral data of each sampling point is obtained through radiometric calibration calculation.

5. The machine vision-based defect detection method for UAV parts according to claim 4, characterized in that, The method for determining sampling points with a surface curvature radius smaller than a preset compensation threshold as local sampling points includes: Based on the airfoil geometry data and the three-dimensional spatial coordinates of each sampling point in the adaptive sampling point set, the normal curvature of each sampling point along the airfoil chord is obtained through surface local differential geometry calculation; the reciprocal of the absolute value of the normal curvature is used as the surface curvature radius of each sampling point; sampling points with a surface curvature radius less than a preset compensation threshold and greater than a preset effective curvature radius lower limit are determined as local sampling points.

6. The machine vision-based defect detection method for UAV parts according to claim 1, characterized in that, The method for correcting the measured spectral reflectance in the original spectral data of each sampling point based on the surface normal vector and the preset bidirectional reflectance distribution function of the absorbing coating to obtain the equivalent spectral reflectance includes: The optical center position and light source position of the short-wave infrared hyperspectral camera are obtained. The observation direction vector and light source incident direction vector of each sampling point are obtained by pointing the three-dimensional spatial coordinates of each sampling point to the optical center position and light source position, respectively. Based on the surface normal vector, the light source incident direction vector, and the observation direction vector, the measured light source incident angle is calculated. Actual measurement of the reflection angle observed by the camera and azimuth difference By pre-setting the bidirectional reflection distribution function of the absorbing coating, the measured bidirectional reflection distribution function values ​​at each sampling point are obtained. Based on the preset standard angle, the standard bidirectional reflection distribution function value of each sampling point is calculated using the preset bidirectional reflection distribution function of the absorbing coating. ; Based on the measured spectral reflectance at each sampling point Measured bidirectional reflection distribution function value and standard bidirectional reflection distribution function value The equivalent spectral reflectance of each sampling point is calculated using an angle correction formula; the angle correction formula is: ,in, Spectral wavelength; Preset standard incident angle; Preset standard reflection angle; This is the angle correction factor.

7. The machine vision-based defect detection method for UAV parts according to claim 6, characterized in that, The method for obtaining the corrected spectral reflectance by performing curvature compensation using a preset higher-order correction function on the equivalent spectral reflectance of local sampling points includes: Based on the surface curvature radius of local sampling points, the curvature correction factor for each local sampling point is obtained through a preset higher-order correction function; the preset higher-order correction function is: ;in, The radius of curvature of the surface; , , These are preset coefficients; Based on the equivalent spectral reflectance and curvature correction factor of each local sampling point Calculate the corrected spectral reflectance at each local sampling point. .

8. The machine vision-based defect detection method for UAV parts according to claim 1, characterized in that, The method for determining coating defects on the end rib surface by performing spectral matching using a preset standard spectral library based on the corrected spectral reflectance and the equivalent spectral reflectance of sampling points other than local sampling points includes: The corrected spectral reflectance of local sampling points and the equivalent spectral reflectance of sampling points other than local sampling points are respectively matched with the preset standard spectral library to obtain the best matching standard spectrum for each sampling point. Based on the best matching standard spectrum for each sampling point, the corresponding coating thickness value and coating composition ratio value are extracted from the preset standard spectral library to obtain the estimated coating thickness value and estimated coating composition ratio value for each sampling point. Sampling points where the estimated coating thickness exceeds the preset coating thickness tolerance range are identified as having coating thickness defects; sampling points where the estimated coating component ratio deviates from the preset coating component standard ratio by an absolute deviation exceeding a preset deviation threshold are identified as having coating component defects.

9. A machine vision-based defect detection system for unmanned aerial vehicle (UAV) parts, used to perform the method described in any one of claims 1-8, characterized in that, The system includes: The model acquisition module is used to acquire a three-dimensional digital model of the end rib of the stabilizer to be detected by the UAV and the corresponding local scattering sensitivity distribution of the airfoil. The three-dimensional digital model includes airfoil geometric data. An adaptive scanning module is used to perform non-uniform sampling on the wing surface according to the local scattering sensitivity distribution of the wing surface to obtain an adaptive sampling point set; to obtain a continuous scanning trajectory by optimizing the path cost weighted by the spatial gradient direction of the local scattering sensitivity distribution of the wing surface; and to obtain a hyperspectral image by scanning point by point along the continuous scanning trajectory. The spectral and geometric parameter extraction module is used to map the three-dimensional spatial coordinates of each sampling point in the airfoil geometric data to the hyperspectral image, obtain the pixel position corresponding to each sampling point and extract the corresponding original spectral data; extract the surface normal vector and surface curvature radius corresponding to the sampling point from the airfoil geometric data; and determine the sampling points with a surface curvature radius less than a preset compensation threshold as local sampling points. The graded correction module is used to correct the measured spectral reflectance in the original spectral data of each sampling point according to the surface normal vector and the preset bidirectional reflectance distribution function of the absorbing coating, so as to obtain the equivalent spectral reflectance; the equivalent spectral reflectance of the local sampling points is then compensated for curvature using a preset higher-order correction function to obtain the corrected spectral reflectance. The coating defect determination module is used to determine coating defects on the end rib surface by performing spectral matching based on the corrected spectral reflectance and the equivalent spectral reflectance of sampling points other than local sampling points, through a preset standard spectral library.