A method, system, medium and product for inspecting and shooting components of a power transmission tower
By acquiring images in real time using the drone's visual sensor and adjusting the pose using recognition models and nonlinear mapping, the problem of poor trajectory adaptability in drone inspections is solved, enabling precise positioning and safe photography of tower components, and improving the robustness and efficiency of inspections.
Patent Information
- Application Number
- CN202611266199.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-27
AI Technical Summary
Existing drone inspection technology relies on pre-fabricated point cloud flight paths, resulting in poor adaptability of inspection trajectories for tower components and difficulty in achieving accurate positioning and safe filming in complex environments.
By acquiring images in real time through the drone's visual sensors, obtaining bounding box information and flight pose using recognition models, and combining nonlinear mapping and Kalman filters, the drone's pose is dynamically adjusted, local inspection trajectories are planned, and three-dimensional spatial positioning and safe shooting are achieved.
It improves the robustness and safety of drone inspections in complex environments, enables precise positioning and accurate imaging of various target components, avoids collision risks, and improves inspection efficiency.
Smart Images

Figure CN123185446A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of drone inspection and relates to a method, system, medium and product for inspecting and photographing components of power transmission towers. Background Technology
[0002] With the continuous expansion of the power grid and the increasing demands for power supply reliability, the use of drones for autonomous and precise inspection of overhead transmission lines has become an important technological means to replace traditional manual tower climbing inspections. Drones equipped with visible light cameras, infrared thermal imagers, and other sensors fly along preset routes and take fixed-point photos of towers and line equipment. This data is then combined with a background intelligent image analysis model to detect defects such as insulator spontaneous explosions, broken conductor strands, and hardware corrosion. This is currently the mainstream inspection mode.
[0003] However, in this mode, the precise flight and shooting of drones rely heavily on pre-built 3D laser point cloud models and fixed flight paths. Not only is the data acquisition and processing process cumbersome, time-consuming, and costly, but the pre-built flight paths are also difficult to adapt to changes in the channel environment and different tower structure characteristics, which can easily lead to inaccurate shooting positions or collision risks. Existing auxiliary methods based on GPS and simple image recognition can only achieve rough positioning and lack the ability to accurately locate and calculate parameters of various target components, which cannot meet the needs of refined inspection. Summary of the Invention
[0004] This application provides a method, system, medium, and product for photographing components of power transmission towers, which can solve the problem of poor adaptability of tower component inspection trajectories caused by reliance on pre-made point cloud flight paths in the prior art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for photographing and inspecting components of a power transmission tower, comprising: Control the drone to fly to the preset initial observation position of the target power transmission tower; The UAV's visual sensor acquires real-time images of the current frame containing the target power transmission tower. A preset recognition model identifies the bounding box information of the target component in the current frame image. Combined with the UAV's current flight pose, a pose adjustment command is generated, controlling the UAV to adjust its flight pose until the deviation of the target component's image on the visual sensor from the preset ideal state converges to a preset tolerance range. This yields the adjusted bounding box information and flight pose. The bounding box information includes position, scale, and confidence level. Based on the bounding box information after pose adjustment and the flight pose, the three-dimensional spatial position of the target component is calculated; Based on the three-dimensional spatial position and component type of the target component, the theoretical safe shooting distance is calculated, and the local inspection trajectory is planned using the theoretical safe shooting distance as the imaging constraint. Based on the local inspection trajectory, the drone is controlled to fly to each target shooting point and collect images of the target components to complete the inspection and shooting.
[0006] Compared to existing technologies, the embodiments of this application have the following beneficial effects: By controlling the UAV to fly to a preset initial observation position, a stable spatial reference is provided for subsequent visual perception. Based on real-time image acquisition by the visual sensor, bounding box information containing position, scale, and confidence is obtained through a recognition model. Combined with flight pose, adjustment commands are generated and the UAV is controlled until the imaging deviation converges to the tolerance range. The utilization of the three elements in the bounding box information makes the pose adjustment process not only dependent on geometric deviation, but also introduces recognition reliability as a dynamic adjustment factor. Unlike traditional pure geometric vision servoing, when the confidence fluctuates, the system can automatically suppress invalid or high-risk pose correction actions, avoiding false triggering and oscillations easily caused by rigid tracking based solely on pixel deviation. This improves the robustness and safety of pose adjustment in close-range fine inspection scenarios. This closed-loop feedback mechanism ensures that the target component is in a standardized observation state in the image, eliminating feature extraction distortion caused by tilted viewpoint or excessive distance. At the same time, the "boundary after pose adjustment" is also improved. Boundary box information and flight pose serve as high-confidence data sources, providing a reliable input foundation for 3D solution. Based on the boundary box information and flight pose under stable conditions, the 3D spatial position is calculated, transforming 2D pixel coordinates and pose into absolute spatial coordinates through geometric mapping. This achieves positioning from relative visual perception to absolute physical positioning, eliminating reliance on external point cloud models. Subsequently, the theoretical safe shooting distance is calculated based on the 3D spatial position and component type, and this distance is used as a constraint to plan local inspection trajectories. This allows the flight path to be dynamically generated based on real-time perception results rather than executing pre-defined routes, avoiding collision risks caused by environmental changes and ensuring the spatial matching accuracy between the shooting point and the target component. Finally, the UAV is controlled based on the local trajectory to complete image acquisition, forming a complete autonomous inspection closed loop. This solves the problems of poor adaptability of tower component inspection trajectories and inaccurate shooting caused by reliance on pre-defined point cloud routes in existing technologies, enabling the system to achieve adaptive response and precise operation in complex channel environments without prior models.
[0007] In some embodiments of the first aspect of this application, the step of identifying the bounding box information of the target component in the current frame image through a preset recognition model includes: The current frame image is input into the recognition model, and features are extracted through depthwise separable convolution to obtain a geometric feature map containing shallow spatial location information and a semantic feature map containing deep category semantic information. The geometric feature map and semantic feature map are routed in parallel to multiple independent detection branches. The geometric feature map and semantic feature map are fused in a targeted manner through each detection branch to obtain the enhanced features corresponding to each detection branch. Each detection branch uses its own enhanced features to perform classification prediction and bounding box regression on at least one target component, and outputs bounding box information including component type, two-dimensional bounding box center coordinates, two-dimensional bounding box size, and confidence level.
[0008] Compared with existing technologies, the above embodiments have the following beneficial effects: By inputting the current frame image into the recognition model and extracting geometric and semantic feature maps through depthwise separable convolution, shallow convolution is used to preserve spatial details while reducing computational load, adapting to the computing power limitations of airborne terminals; furthermore, the two types of feature maps are routed in parallel to multiple independent detection branches and fused in a targeted manner, so that the geometric structure and category semantics interact and enhance each other in their respective optimal dimensions, avoiding the information bottleneck of a single feature stream and improving the feature expression capability of small targets or occluded parts; then, the detection heads of each branch perform classification prediction and bounding box regression based on the enhanced features, outputting complete bounding box information including part type, center coordinates, size and confidence level. The multi-branch parallel architecture can achieve synchronous and accurate positioning of various heterogeneous parts such as insulators and fittings, while the confidence level output provides a quantitative reliability basis for subsequent pose adjustment and safety verification. Overall, the detection rate and positioning accuracy of target parts in complex backgrounds are significantly improved while ensuring real-time performance.
[0009] In some embodiments of the first aspect of this application, the generation of pose adjustment instructions includes: Calculate the pixel deviation vector of the center coordinates of the two-dimensional bounding box relative to the center preset region of the current frame image, and obtain the current pixel size of the two-dimensional bounding box; Based on the magnitude of the pixel deviation vector, the current pixel size, and the confidence level, a proportional gain coefficient is calculated using a nonlinear mapping function, and a desired speed command is generated based on the proportional gain coefficient. The proportional gain coefficient exhibits a nonlinear positive correlation with the magnitude of the pixel deviation vector and a positive correlation with the current pixel size and the confidence level. When the confidence level is lower than a preset confidence threshold, the maximum value of the proportional gain coefficient is limited to within a preset safety upper limit. Based on the current pixel size, the component type of the target component, and the intrinsic parameter matrix of the visual sensor, the depth information of the target component under the visual sensor is calculated, and the image motion trend is calculated using the pixel deviation change rate between two consecutive current frame images. Based on the depth information, image motion trend, and the current linear and angular velocities of the UAV, the state equation of the discrete-time UAV attitude control model is established, and the model predictive control optimization problem with the goal of minimizing the weighted sum of tracking error and control energy consumption is solved to obtain the feedforward compensation amount. The feedforward compensation is superimposed on the desired velocity command to obtain the superimposed velocity command. A safety correction coefficient is calculated based on the minimum distance from the current position of the UAV to the preset safety envelope of the target power transmission tower. The normal component of the superimposed velocity command is limited based on the safety correction coefficient to obtain the pose adjustment command.
[0010] Compared to existing technologies, the above embodiments have the following beneficial effects: By calculating the pixel deviation vector and obtaining the current pixel size, the visual observation error is quantified into a controllable state variable, providing precise input for gain adjustment; furthermore, based on the modulus, size, and confidence level, the proportional gain coefficient is calculated using a nonlinear mapping function to generate the desired speed command, and the maximum gain is limited when the confidence level is below a threshold. This adaptive mechanism enables the control response intensity to dynamically adapt to the observation quality, accelerating convergence under large deviations and suppressing oscillations caused by erroneous actions under low confidence levels, thus ensuring the stability of the visual servoing process; simultaneously, depth information is calculated based on pixel size, component type, and intrinsic parameter matrix, and the motion trend is calculated using the continuous frame deviation change rate, combining monocular ranging with temporal difference to compensate for... This approach compensates for the lag in dynamic target calculations caused by pure geometric solutions, providing accurate disturbance predictions for feedforward compensation. Furthermore, a discrete-time attitude control model is established, and an optimization problem is solved to minimize the weighted sum of tracking error and control energy consumption, yielding the feedforward compensation. Inertial effects and actuator constraints are incorporated into a unified optimization framework, achieving a balance between active disturbance rejection and energy efficiency. The feedforward compensation is then superimposed on the desired velocity command, and a correction coefficient is calculated based on the minimum distance to the safe envelope to limit the normal component. This allows the velocity command to automatically decay as it approaches the target, preventing overshoot collisions caused by positioning delays or model mismatches. Overall, this forms a robust attitude control strategy integrating adaptive feedback, feedforward disturbance rejection, and safety constraints, effectively addressing the dynamic uncertainty risks in close-range UAV inspections.
[0011] In some embodiments of the first aspect of this application, the step of calculating the scaling gain coefficient using a nonlinear mapping function based on the magnitude of the pixel deviation vector, the current pixel size, and the confidence level includes: Calculate the square of the magnitude of the pixel deviation vector, multiply the square by a preset pixel deviation adjustment coefficient, and add the result to a preset unit reference gain to obtain the first intermediate variable; The second intermediate variable is obtained by multiplying the current pixel size by a preset pixel size adjustment coefficient and then adding the result to the unit reference gain. The confidence level is multiplied by a preset confidence level adjustment coefficient and then added to the unit reference gain to obtain the third intermediate variable; The theoretical proportional gain coefficient is obtained by multiplying the first intermediate variable, the second intermediate variable, the third intermediate variable, and the preset basic proportional gain constant. If the confidence level is lower than a preset confidence threshold, the theoretical proportional gain coefficient is compared with a preset safety upper limit value and the smaller value is used as the proportional gain coefficient; otherwise, the theoretical proportional gain coefficient is used as the proportional gain coefficient.
[0012] Compared to existing technologies, the above embodiments have the following beneficial effects: By calculating the square of the pixel deviation modulus and multiplying it by the pixel deviation adjustment coefficient, then adding a unit reference gain to obtain the first intermediate variable, the gain response to deviation exhibits a quadratic growth characteristic, providing a stronger corrective torque to accelerate convergence under large deviations. Simultaneously, the unit reference gain ensures that basic control capability is retained even when the deviation is zero, preventing system silent failure. Furthermore, multiplying the current pixel size by the pixel size adjustment coefficient and then adding a unit reference gain to obtain the second intermediate variable allows the gain to increase with the target field of view, conforming to the physical law that higher sensitivity is required for close-range shooting. Simultaneously, multiplying the confidence level by the confidence level adjustment coefficient and then adding a unit reference gain to obtain the third intermediate variable directly improves the recognition reliability. The system modulates and controls the gain, automatically reducing the response intensity to prevent false tracking when the confidence level is low. Then, it multiplies three intermediate variables with the basic proportional gain constant to obtain the theoretical proportional gain coefficient. Multiplicative coupling enables joint adjustment of multiple factors; any abnormality in any factor will suppress the overall output, enhancing the system's inherent safety. Finally, it checks if the confidence level is below a threshold. If so, it compares the theoretical coefficient with the safety upper limit and takes the smaller value as the final coefficient. This hard clamping mechanism sets an insurmountable safety boundary for the gain. Even if the nonlinear mapping is abnormally amplified due to extreme inputs, it can be forcibly limited to an acceptable range. This overall system constructs a proportional gain generation mechanism that combines adaptive sensitivity with multiple safety protections, ensuring stable and reliable operation of visual servo systems under various working conditions.
[0013] In some embodiments of the first aspect of this application, the calculation of the safety correction coefficient based on the minimum distance from the current location of the UAV to the preset safety envelope of the target transmission tower includes: The semi-axis length is determined based on the dimensions of the target transmission tower, and an ellipsoid is constructed as the safety envelope surface with the geometric center of the target transmission tower as the center of the sphere. Calculate the minimum distance from the current position of the UAV to the surface of the safety envelope, and calculate the safety correction coefficient based on the minimum distance, the preset minimum safety distance threshold, and the preset soft constraint start distance.
[0014] Compared with existing technologies, the above embodiments have the following beneficial effects: By determining the semi-axis length based on the target transmission tower size and constructing an ellipsoid as the safety envelope with the geometric center as the sphere center, the safety boundary fits the actual shape of the tower rather than using a spherical or cubic approximation. This maximizes the available flight space while ensuring the protection effect and reducing unnecessary trajectory detours. Furthermore, the minimum distance from the current position of the UAV to the surface of the ellipsoid is calculated, and this distance, together with the minimum safe distance threshold and the soft constraint start distance, is used to calculate the safety correction coefficient. Overall, a safety constraint mechanism that adaptively matches the target geometry and has progressive deceleration characteristics is formed, which improves the smoothness of the inspection trajectory and the shooting efficiency while ensuring operational safety.
[0015] In some embodiments of the first aspect of this application, calculating the three-dimensional spatial position of the target component based on the pose-adjusted bounding box information and the flight pose includes: Based on the adjusted bounding box information and flight pose, the original three-dimensional spatial position of the target component in the current frame image is calculated by projective geometry. The original three-dimensional spatial position and confidence level of the target component are input into a preset Kalman filter, and the continuous low confidence count variable stored in the Kalman filter is read. If the continuous low confidence count variable is greater than or equal to a preset threshold, the observation update operation of the Kalman filter is stopped, and a constant velocity extrapolation operation is performed based on the velocity component in the state estimate value stored in the Kalman filter at the previous moment, and the result of the extrapolation operation is used as the three-dimensional spatial position. Otherwise, a state prediction is performed based on the state estimate value at the previous moment to obtain the predicted three-dimensional spatial position, and the Mahalanobis distance between the original three-dimensional spatial position and the predicted three-dimensional spatial position is calculated. If the Mahalanobis distance exceeds a preset threshold, the current observation input is rejected and the state estimate value at the previous moment is used as the three-dimensional spatial position. Otherwise, the observation update operation of the Kalman filter is performed and the update result is used as the three-dimensional spatial position. The continuous low confidence count variable represents the cumulative number of consecutive frame images with confidence levels lower than the preset threshold.
[0016] Compared to existing technologies, the above embodiments have the following advantages: By calculating the original three-dimensional spatial position based on the bounding box information after pose adjustment and the flight pose through projection geometry, the two-dimensional visual observation is transformed into three-dimensional physical coordinates, providing initial observation values for subsequent filtering; furthermore, the original position and confidence are input into the Kalman filter and continuous low-confidence count variables are read. When the cumulative number represented by the variable reaches a preset threshold, the observation update is stopped and a constant-velocity extrapolation operation is performed based on the velocity component in the state estimate of the previous moment as the output. This mechanism can still maintain the continuity of position estimation based on kinematic priors when the target is continuously lost or recognition fails, avoiding position jumps or filter divergence caused by observation interruption; otherwise, based on the state of the previous moment... The estimated value is used to perform state prediction to obtain the predicted 3D spatial position and calculate the Mahalanobis distance between the original position and the predicted position. If the distance exceeds the threshold, the current observation is rejected and the state estimate of the previous time step is used as the output. This outlier elimination logic uses historical motion trends as a benchmark to check the rationality of the current observation, effectively filtering out abnormal measurement values caused by false detection, sudden changes in illumination, etc., and preventing contamination of the filter state. The observation update operation is only performed after passing double verification and the result is used as the output, ensuring that each state correction is based on reliable observation. The overall system constructs an adaptive state estimation mechanism that integrates loss tolerance, outlier suppression and reliable update, which significantly improves the temporal stability and data reliability of monocular vision 3D localization in complex inspection environments.
[0017] In some embodiments of the first aspect of this application, calculating the theoretical safe shooting distance based on the three-dimensional spatial position and type of the target component includes: According to the component type, query the preset safety distance margin mapping table to obtain the corresponding safety distance margin value; Calculate the Euclidean distance between the three-dimensional spatial position and the current position of the drone as the real-time relative distance, and add the real-time relative distance to the safety distance margin value to obtain the theoretical safe shooting distance.
[0018] Compared with existing technologies, the above embodiments have the following beneficial effects: By querying the safety distance margin mapping table according to the component type to obtain the corresponding margin value, the safety margin can be set differently according to the physical size, electrical characteristics and shooting requirements of different components, avoiding excessive conservatism or insufficient protection caused by a uniform threshold; further, the Euclidean distance between the three-dimensional spatial position and the current position of the UAV is calculated as the real-time relative distance, and this distance is added to the safety distance margin value to obtain the theoretical safe shooting distance. The static safety rules and dynamic spatial relationships are integrated in real time, so that the safety constraints can be updated in real time with the flight status rather than relying on fixed parameters. The whole forms a safety distance calculation method that takes into account both component specificity and spatiotemporal dynamics, providing a personalized and real-time adaptive imaging constraint benchmark for local inspection trajectory planning.
[0019] Secondly, the present invention also provides a component inspection and photography system for transmission towers, comprising: an initialization module, a pose adjustment module, a spatial calculation module, a planning module, and an inspection module; The initialization module is used to control the UAV to fly to the preset initial observation position of the target power transmission tower; The pose adjustment module is used to acquire current frame images containing the target power transmission tower in real time based on the UAV's visual sensor, identify the bounding box information of the target component in the current frame image through a preset recognition model, and combine it with the current flight pose of the UAV to generate a pose adjustment command and control the UAV to adjust the flight pose until the image of the target component on the visual sensor converges to a preset tolerance range compared with the observation deviation of the preset ideal state, thereby obtaining the pose-adjusted bounding box information and flight pose; wherein, the bounding box information includes position, scale, and confidence level; The spatial calculation module is used to calculate the three-dimensional spatial position of the target component based on the bounding box information after pose adjustment and the flight pose. The planning module is used to calculate the theoretical safe shooting distance based on the three-dimensional spatial position and component type of the target component, and to plan a local inspection trajectory using the theoretical safe shooting distance as an imaging constraint. The inspection module is used to control the UAV to fly to each target shooting point and collect images of the target components based on the local inspection trajectory, thereby completing the inspection and shooting.
[0020] Compared with existing technologies, the above embodiments of this application have the following beneficial effects: By controlling the UAV to fly to a preset initial observation position, a stable spatial reference is provided for subsequent visual perception. Based on the real-time acquisition of images by the visual sensor, bounding box information containing position, scale, and confidence is obtained through the recognition model. Combined with the flight pose, adjustment commands are generated and the UAV is controlled until the imaging deviation converges to the tolerance range. Among them, the utilization of the three elements in the bounding box information makes the pose adjustment process not only dependent on geometric deviation, but also introduces recognition reliability as a dynamic adjustment factor. Unlike traditional pure geometric vision servoing, when the confidence fluctuates, the system can automatically suppress invalid or high-risk pose correction actions, avoiding the false triggering and oscillation easily caused by rigid tracking based solely on pixel deviation. This improves the robustness and safety of pose adjustment in close-range fine inspection scenarios. This closed-loop feedback mechanism ensures that the target component is in a standardized observation state in the image, eliminating feature extraction distortion caused by tilted viewpoint or excessive distance. At the same time, "the pose adjustment after Bounding box information and flight pose serve as high-confidence data sources, providing a reliable input foundation for 3D solution. Based on the bounding box information and flight pose under stable conditions, the 3D spatial position is calculated, transforming 2D pixel coordinates and pose into absolute spatial coordinates through geometric mapping. This achieves positioning from relative visual perception to absolute physical positioning, eliminating reliance on external point cloud models. Subsequently, the theoretical safe shooting distance is calculated based on the 3D spatial position and component type, and this distance is used as a constraint to plan local inspection trajectories. This allows the flight path to be dynamically generated based on real-time perception results rather than executing pre-defined routes, avoiding collision risks caused by environmental changes and ensuring the spatial matching accuracy between the shooting point and the target component. Finally, the UAV is controlled based on the local trajectory to complete image acquisition, forming a complete autonomous inspection closed loop. This solves the problems of poor adaptability of tower component inspection trajectories and inaccurate shooting caused by reliance on pre-defined point cloud routes in existing technologies, enabling the system to achieve adaptive response and precise operation in complex channel environments without prior models.
[0021] Thirdly, the present invention also provides a computer program product, including a computer program or instructions, which, when executed, implements any one of the component inspection and photography methods for power transmission towers of the present invention.
[0022] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any one of the component inspection and photography methods for transmission towers according to the present invention. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating a method for inspecting and photographing components of a power transmission tower, provided in some embodiments of the present invention.
[0024] Figure 2 This is a schematic diagram of the structure of a component inspection and imaging system for power transmission towers provided in some embodiments of the present invention. Detailed Implementation
[0025] 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.
[0026] Example 1: Please refer to Figure 1 To address the problem of poor adaptability of tower component inspection trajectories in existing technologies due to reliance on pre-fabricated point cloud flight paths, an embodiment of the present invention provides a component inspection and photography method for transmission towers, comprising steps S1 to S5: Step S1: Control the drone to fly to the preset initial observation position of the target power transmission tower; Step S2: Based on the UAV's visual sensor, the current frame image containing the target power transmission tower is acquired in real time. The bounding box information of the target component in the current frame image is identified through a preset recognition model and combined with the current flight pose of the UAV. A pose adjustment command is generated and the UAV is controlled to adjust its flight pose until the deviation of the image of the target component on the visual sensor from the preset ideal state converges to a preset tolerance range. The adjusted bounding box information and flight pose are obtained. The bounding box information includes position, scale, and confidence level. As a preferred approach, the ideal state is that the center of the two-dimensional bounding box is located in the predetermined central region of the current frame image, or the pixel size of the target component in the current frame image is not less than a preset threshold. For observational deviations, if the center of the two-dimensional bounding box is not located in the predetermined central region, or the pixel size of the target component is less than the preset threshold, then it is determined that the UAV's flight attitude needs dynamic adjustment.
[0027] Furthermore, in step S2, identifying the bounding box information of the target component in the current frame image can be implemented through the following preferred embodiments, including steps S21-S23: S21: Input the current frame image into the recognition model, and extract features through depthwise separable convolution to obtain a geometric feature map containing shallow spatial location information and a semantic feature map containing deep category semantic information; S22: The geometric feature map and semantic feature map are routed in parallel to multiple independent detection branches. The geometric feature map and semantic feature map are fused in a targeted manner through each detection branch to obtain the enhanced features corresponding to each detection branch. S23: Using the detection heads of each detection branch, classify and predict at least one target component and perform bounding box regression based on their respective enhanced features, and output bounding box information including component type, two-dimensional bounding box center coordinates, two-dimensional bounding box size and confidence level.
[0028] As a preferred option, the recognition model is a single-stage lightweight target detection network deployed on an airborne computing unit, and its network structure includes: A backbone feature extraction network based on depthwise separable convolution is used to extract multi-scale features from the input current frame image; A multi-branch detection head is used to simultaneously detect different target components such as insulators, equalizing rings, vibration dampers, and hardware strings from the multi-scale features, and to perform bounding box regression and output the branch detection results; A cross-component feature sharing module is set between the branches of the multi-branch detection head to reuse the shallow geometric features and deep semantic features of the multi-scale features.
[0029] The lightweight design of the recognition model includes at least one of the following optimization strategies: The network weights are quantized using 8-bit integers, and the quantized recognition model is deployed to the neural network processing unit in the airborne computing unit; channel pruning technology is used to remove feature channels whose contribution rate to the component response is lower than a set threshold; the convolutional layers in the multi-branch detection head are grouped and rearranged to reduce the amount of computation and maintain the feature expression ability. In this preferred embodiment, depthwise separable convolution is used instead of traditional standard convolution for feature extraction. This significantly reduces the number of parameters and computational complexity while effectively preserving shallow geometric details and deep semantic information, thus adapting to the hardware environment of UAVs with limited computing power on the onboard side. By routing geometric feature maps and semantic feature maps in parallel to multiple independent detection branches and performing targeted fusion, the information bottleneck of a single feature stream is broken. This allows spatial location information and category semantic information to interact and enhance each other in their respective optimal dimensions, significantly improving the feature representation capability of small targets or occluded components such as insulators and fittings. This multi-branch parallel architecture not only achieves synchronous and accurate localization of multiple heterogeneous target components, but its output confidence score also provides a quantitative reliability basis for subsequent pose adjustment and safety verification, significantly improving the detection rate and localization accuracy of target components in complex backgrounds while ensuring real-time performance.
[0030] Furthermore, in step S2, generating pose adjustment commands can be implemented through the following preferred embodiments, including steps S24-S28: S24: Calculate the pixel deviation vector of the center coordinates of the two-dimensional bounding box relative to the center preset region of the current frame image, and obtain the current pixel size of the two-dimensional bounding box; S25: Based on the magnitude of the pixel deviation vector, the current pixel size, and the confidence level, calculate the proportional gain coefficient using a nonlinear mapping function, and generate the desired speed command based on the proportional gain coefficient; wherein, the proportional gain coefficient has a nonlinear positive correlation with the magnitude of the pixel deviation vector, and a positive correlation with the current pixel size and the confidence level; when the confidence level is lower than a preset confidence threshold, limit the maximum value of the proportional gain coefficient to within a preset safety upper limit; S26: Based on the current pixel size, the component type of the target component, and the intrinsic parameter matrix of the visual sensor, calculate the depth information of the target component under the visual sensor, and calculate the image motion trend using the pixel deviation change rate between two consecutive current frame images; S27: Based on the depth information, image motion trend, and the current linear and angular velocities of the UAV, establish the state equation of the discrete-time UAV attitude control model, and solve the model predictive control optimization problem with the goal of minimizing the weighted sum of tracking error and control energy consumption to obtain the feedforward compensation amount. S28: The feedforward compensation amount is superimposed on the desired speed command to obtain the superimposed speed command. A safety correction coefficient is calculated based on the minimum distance from the current position of the UAV to the preset safety envelope of the target power transmission tower. The normal component of the superimposed speed command is limited based on the safety correction coefficient to obtain the pose adjustment command.
[0031] In practical implementation, the specific steps for generating the feedforward compensation amount are as follows: First, a simplified discrete-time UAV attitude control model is established, with the following state equations: ; ; ; in, Let k be the state vector at time k. The three-dimensional coordinates of the drone in three-dimensional space. The linear velocity in the corresponding direction of the three-dimensional coordinates; Let k be the control input vector at time k, which is the feedforward compensation quantity to be solved. Let be the observation output at time k, and be the desired image feature motion rate; A, B, and C are the state transition matrix, control matrix, and observation matrix pre-calibrated based on the UAV's dynamic characteristics and visual projection geometry, respectively. This is process noise.
[0032] The model predictive controller finds the optimal control sequence in the prediction time domain by solving the following optimization problem: ; in, This is the predicted value of the output at time k+i based on the observation at time k+i. The expected reference trajectory at the future k+i time is the expected motion rate of the image features, i.e., the expected motion rate of the image features is zero. To predict the time domain, To control the time domain, satisfy ; and These are preset weight matrices used to balance tracking accuracy and control energy consumption.
[0033] After solving, take the first value of the control sequence. As the feedforward compensation amount at the current moment, it is used to superimpose on the desired speed command output by the proportional gain coefficient.
[0034] In this preferred embodiment, the pose adjustment strategy abandons the rigid control mode with fixed gain in traditional visual servoing and instead adopts an adaptive adjustment mechanism based on observation quality. By introducing confidence as a key input variable for the nonlinear mapping function, the system can dynamically perceive the reliability of the current recognition result: when the confidence is high, the proportional gain increases nonlinearly with the pixel deviation magnitude to accelerate convergence; when the confidence is low, the system automatically weakens the response intensity and limits the maximum gain, effectively suppressing control oscillations and erroneous actions caused by false detections or sudden changes in illumination. Furthermore, by combining model predictive control (MPC) to solve for the feedforward compensation, the inertial effects of the UAV and actuator constraints are incorporated into a unified optimization framework, achieving active disturbance rejection against dynamic disturbances. Finally, by constructing an ellipsoidal safety envelope that fits the shape of the tower and progressively limiting the velocity normal component, smooth deceleration and collision avoidance safety of the UAV during the approach to the target are ensured, forming a robust control closed loop integrating adaptive feedback, feedforward disturbance rejection, and geometric safety constraints.
[0035] Furthermore, in step S25, calculating the proportional gain coefficient can be implemented through the following preferred embodiments, including steps S251-S255: S251: Calculate the square of the magnitude of the pixel deviation vector, multiply the square by a preset pixel deviation adjustment coefficient, and add the result to a preset unit reference gain to obtain the first intermediate variable; S252: Multiply the current pixel size by a preset pixel size adjustment coefficient and add the result to the unit reference gain to obtain a second intermediate variable; S253: Multiply the confidence level by the preset confidence level adjustment coefficient and add it to the unit reference gain to obtain the third intermediate variable; S254: Multiply the first intermediate variable, the second intermediate variable, the third intermediate variable, and the preset basic proportional gain constant to obtain the theoretical proportional gain coefficient; S255: If the confidence level is lower than the preset confidence threshold, the theoretical proportional gain coefficient is compared with the preset safety upper limit value and the smaller value is taken as the proportional gain coefficient; otherwise, the theoretical proportional gain coefficient is taken as the proportional gain coefficient.
[0036] Specifically, the proportional gain coefficient The calculation method is as follows: ; ; in, The preset base scaling gain is a constant between 0.2 and 0.8; e is the pixel offset vector. Let (u,v) be the pixel coordinates of the desired target center point (i.e., the coordinates of the center of the image's central region), and (u,v) be the pixel coordinates of the center of the current target component's two-dimensional bounding box. is the magnitude of the pixel deviation vector (in pixels); s is the current pixel size of the 2D bounding box (e.g., expressed as the area or diagonal length of the bounding box, in pixels); c is the confidence score output by the recognition model, ranging from 0 to 1; α, β, and γ are preset positive adjustment coefficients, used to adjust the influence of pixel deviation, pixel size, and confidence score on the gain, respectively.
[0037] In the design of this nonlinear mapping function, the introduction of "unit reference gain" ensures that the proportional gain retains its basic control capability even when the pixel deviation is zero or the confidence level is extremely low, avoiding the risk of the system falling into silent failure due to a single factor reaching zero. By multiplying the squared pixel deviation term, pixel size term, and confidence level term by their respective adjustment coefficients, adding the unit reference gain, and then multiplying by the basic proportional gain constant, multiplicative coupling adjustment of multidimensional factors is achieved. This structure ensures that abnormal fluctuations in any factor will directly modulate the overall output, enhancing the system's inherent safety. The hard clamping mechanism sets an insurmountable safety boundary for the gain, forcibly limiting it to within a preset safety upper limit even if the nonlinear mapping generates abnormal amplification due to extreme inputs, thus constructing a proportional gain generation logic that combines adaptive sensitivity with multiple safety protections.
[0038] Further, in step S28, calculating the safety correction factor can be implemented through the following preferred embodiments, including steps S281-S282: S281: Determine the semi-axis length based on the dimensions of the target transmission tower, and construct an ellipsoid as the safety envelope surface with the geometric center of the target transmission tower as the center of the sphere; S282: Calculate the minimum distance from the current position of the UAV to the surface of the safety envelope, and calculate the safety correction coefficient based on the minimum distance, the preset minimum safety distance threshold, and the preset soft constraint start distance.
[0039] Here, the safety envelope is defined as an ellipsoid centered at the geometric center of the target transmission tower, and the safety correction factor is... The calculation method is as follows: ; in, This is the minimum distance from the current position of the drone to the surface of the safety envelope. The preset minimum safe distance threshold, when hour, ; The preset soft constraint start distance, when hour, .
[0040] Calculate Then, by multiplying by the normal component of the superimposed velocity command, the pose adjustment command can be obtained.
[0041] Compared to traditional spherical or cubic safety boundaries, an ellipsoidal surface with the tower's geometric center as its center and a semi-axis length determined based on its actual dimensions can more closely fit the slender structural features of transmission towers. This shape-adaptive safety envelope maximizes usable flight space while ensuring core protection, reducing unnecessary detours by the drone in non-dangerous directions. Combined with linear interpolation correction coefficients calculated based on minimum distance, minimum safe distance thresholds, and soft-constraint start-up distances, the system can achieve a smooth transition from full-speed cruise to hovering shooting, avoiding sudden speed changes and aircraft shake caused by hard threshold switching. This significantly improves the smoothness of the inspection trajectory and shooting efficiency while ensuring absolute operational safety.
[0042] Step S3: Calculate the three-dimensional spatial position of the target component based on the bounding box information and flight pose after pose adjustment; Furthermore, step S3 can be implemented through the following preferred embodiments, including steps S31-S32: S31: Based on the adjusted bounding box information and flight pose, the original three-dimensional spatial position of the target component in the current frame image is calculated by projective geometry. S32: Input the original three-dimensional spatial position and confidence level of the target component into a preset Kalman filter, and read the continuous low confidence count variable stored in the Kalman filter; if the continuous low confidence count variable is greater than or equal to a preset threshold, stop the observation update operation of the Kalman filter, and perform constant velocity extrapolation operation based on the velocity component in the state estimate value of the previous moment stored in the Kalman filter, and use the result of the extrapolation operation as the three-dimensional spatial position; otherwise, perform state prediction based on the state estimate value of the previous moment to obtain the predicted three-dimensional spatial position, calculate the Mahalanobis distance between the original three-dimensional spatial position and the predicted three-dimensional spatial position, if the Mahalanobis distance exceeds a preset threshold, reject the current observation input and use the state estimate value of the previous moment as the three-dimensional spatial position, otherwise perform the observation update operation of the Kalman filter and use the update result as the three-dimensional spatial position; wherein the continuous low confidence count variable represents the cumulative number of consecutive frame images with confidence levels lower than the preset threshold.
[0043] Specifically, in a Kalman filter, the noise covariance matrix is measured. The adaptive adjustment rules are as follows: ; Alternatively, a simpler linear mapping can be used: ; in, It is the measurement noise covariance matrix at time k, which is usually simplified to a diagonal matrix in this method; It is the preset basic noise covariance matrix; is the confidence score output from the target component recognition model at time k, with a value range of [0, 1]; λ and μ are preset positive constants used to control the sensitivity and attenuation rate of noise covariance as confidence changes. In the rules of the linear mapping, and These are the preset maximum and minimum measurement noise covariance matrices, respectively. This rule ensures that when the confidence score... When it is 1, Give the observation the highest confidence weight; when When it is 0, Its weight is extremely small.
[0044] The motion model based on UAV flight uses a constant velocity model (CV model) for state prediction in the case of loss detection, and its state vector is defined as: ; in Let k be the three-dimensional spatial position of the target component at time k. Let its corresponding velocity be given. The state prediction equation for this model is as follows: ;in, Here is the prior state estimate at time k+1; F is the state transition matrix, specifically: ;in, The time interval between two consecutive frames.
[0045] In this preferred embodiment, the calculation of 3D position is achieved by introducing an adaptive Kalman filter to address the issue of monocular vision solution data being susceptible to noise interference and sudden anomalies. Specifically, the introduction of a "continuous low-confidence count variable" enables intelligent assessment of target loss status: when the confidence level falls below a threshold for multiple consecutive frames, the system determines that the target is temporarily lost and automatically switches to a constant-velocity extrapolation mode. This maintains the continuity of position estimation based on historical kinematic priors, avoiding position jumps caused by observation interruptions. Under normal observation conditions, outlier removal is performed on the original solution values through Mahalanobis distance testing, allowing only observations that pass the rationality check to participate in state updates. This effectively filters out abnormal measurement values caused by background false detections or drastic changes in illumination. This mechanism, integrating loss tolerance, outlier suppression, and reliable updates, significantly improves the temporal stability and data reliability of monocular vision 3D positioning in complex inspection environments, providing a high-quality spatial benchmark for subsequent trajectory planning.
[0046] Step S4: Calculate the theoretical safe shooting distance based on the three-dimensional spatial position and type of the target component, and plan the local inspection trajectory using the theoretical safe shooting distance as the imaging constraint; Furthermore, in step S4, calculating the theoretical safe shooting distance can be implemented through the following preferred embodiments, including steps S41-S42: S41: Query the preset safety distance margin mapping table according to the component type to obtain the corresponding safety distance margin value; S42: Calculate the Euclidean distance between the three-dimensional spatial position and the current position of the drone as the real-time relative distance, and add the real-time relative distance to the safety distance margin value to obtain the theoretical safe shooting distance.
[0047] In this preferred embodiment, the traditional, broad approach of applying a uniform safety threshold to all components during inspections is abandoned. Instead, a differentiated configuration of safety margins is achieved by querying a pre-defined safety distance margin mapping table. Different components require varying safety buffer spaces due to differences in their physical dimensions, electrical characteristics, and shooting angle requirements. This mapping table accurately matches the individual safety needs of each component. By dynamically integrating this static safety rule with real-time relative distance calculations based on Euclidean distance, the theoretical safe shooting distance can be updated in real-time according to the drone's flight status. This calculation method, which considers both component specificity and spatiotemporal dynamics, provides an imaging constraint benchmark for local inspection trajectory planning that conforms to electrical safety specifications and adapts to real-time spatial relationships, effectively balancing image clarity and operational safety.
[0048] When planning a local inspection trajectory, the three-dimensional spatial position of the target component is used as a reference point, and a spherical or cylindrical spatial range is determined as the target shooting envelope at the theoretical safe shooting distance. Then, a local fine inspection flight trajectory is planned to smoothly move from the current position of the UAV to the predetermined shooting point on the target shooting envelope, and to ensure that the local fine inspection flight trajectory does not conflict with environmental obstacles.
[0049] During the planning process, a layered strategy is adopted, including: planning a path on the horizontal plane so that the UAV approaches the target from the side to capture the envelope; and planning a path in the vertical direction to adjust the height and pitch angle of the UAV so that the target component is in the optimal composition position in the field of view of the visual sensor (e.g., at the visual center).
[0050] Step S5: Based on the local inspection trajectory, control the UAV to fly to each target shooting point and collect images of the target components to complete the inspection shooting.
[0051] During close-up shooting, the shooting parameters of the visual sensor are dynamically optimized based on the component type of the target component, the real-time ambient light intensity, and the current relative distance between the UAV and the target component. The shooting parameters include at least two of the following: focusing distance, aperture size, exposure time, sensitivity, and shooting interval. The dynamic optimization specifically includes: The component type, real-time ambient light intensity, and current relative distance are input into the adaptive shooting parameter decision model deployed on the airborne computing unit, and the initial shooting parameter combination is output. During continuous close-up shooting, the current frame image after each frame is captured is acquired, and image quality evaluation indicators are extracted. The image quality evaluation indicators include sharpness, signal-to-noise ratio, and pixel saturation of the target component area. Based on the comparison results between the image quality evaluation index and the preset image quality threshold, the shooting parameters of subsequent frames are adaptively adjusted frame by frame to form a closed-loop feedback control: if the sharpness is lower than the preset first threshold, the focus distance and sensitivity are adjusted first; if the signal-to-noise ratio is lower than the preset second threshold, the exposure time and aperture size are adjusted first; if the pixel saturation exceeds the preset third threshold, the shooting interval is compressed and the bracketing exposure mode is enabled. When a suspected defect area is detected on the surface of the target component, the shooting parameters are automatically switched to macro enhancement mode. Macro enhancement mode includes: forced focus to minimum object distance, increased resolution to the upper limit of the sensor, reduced shooting interval to continuous fast shooting, and multiple frames of images are fused and stored with different exposure compensation values to enhance the texture details of the defect area.
[0052] The adaptive shooting parameter decision model is a pre-trained lightweight deep neural network or random forest model, and its structure is as follows: Input layer: Receives a three-dimensional feature vector ,in For the unique thermal encoding of the target component type, This represents the normalized real-time ambient light intensity. The normalized current relative distance between the drone and the target component; Output layer: Outputs a five-dimensional parameter configuration vector. ,in, , , , and These represent the focusing distance (meters), aperture size (f-number), exposure time (seconds), ISO sensitivity (ISO value), and shooting interval (seconds), respectively.
[0053] The model is trained offline, with the training dataset consisting of images taken under different part types, lighting conditions, and distances, labeled with optimal shooting parameters by professional photographers or automated algorithms. The model aims to learn a non-linear mapping from input conditions to optimal output parameters.
[0054] In summary, compared with the prior art, the above embodiments of this application have the following beneficial effects: By controlling the UAV to fly to the preset initial observation position, a stable spatial reference is provided for subsequent visual perception. Based on the real-time acquisition of images by the visual sensor, bounding box information containing position, scale, and confidence is obtained through the recognition model. Combined with the flight pose, adjustment commands are generated and the UAV is controlled until the imaging deviation converges to the tolerance range. Among them, the utilization of the three elements in the bounding box information makes the pose adjustment process not only dependent on geometric deviation, but also introduces recognition reliability as a dynamic adjustment factor. Unlike traditional pure geometric vision servoing, when the confidence fluctuates, the system can automatically suppress invalid or high-risk pose correction actions, avoiding the false triggering and oscillation easily caused by rigid tracking based solely on pixel deviation. This improves the robustness and safety of pose adjustment in close-range fine inspection scenarios. This closed-loop feedback mechanism ensures that the target component is in a standardized observation state in the image, eliminating feature extraction distortion caused by tilted viewpoint or excessive distance. At the same time, "after pose adjustment..." The bounding box information and flight pose serve as a high-confidence data source, providing a reliable input foundation for 3D solution. Then, based on the bounding box information and flight pose under the aforementioned stable state, the 3D spatial position is calculated. Two-dimensional pixel coordinates and pose are transformed into absolute spatial coordinates through geometric mapping, achieving positioning from relative visual perception to absolute physical positioning, eliminating dependence on external point cloud models. Subsequently, the theoretical safe shooting distance is calculated based on the 3D spatial position and component type, and this distance is used as a constraint to plan a local inspection trajectory. This allows the flight path to be dynamically generated based on real-time perception results rather than executing a pre-defined route, avoiding collision risks caused by environmental changes and ensuring the spatial matching accuracy between the shooting point and the target component. Finally, the UAV is controlled based on the local trajectory to complete image acquisition, forming a complete autonomous inspection closed loop. This solves the problems of poor adaptability of tower component inspection trajectories and inaccurate shooting caused by the reliance on pre-defined point cloud routes in existing technologies, enabling the system to achieve adaptive response and precise operation in complex channel environments without prior models.
[0055] Example 2: Please refer to Figure 2 Based on the same inventive concept, the present invention discloses a component inspection and photography system for transmission towers, comprising: an initialization module M1, a pose adjustment module M2, a spatial calculation module M3, a planning module M4, and an inspection module M5; The initialization module M1 is used to control the UAV to fly to the preset initial observation position of the target power transmission tower; The pose adjustment module M2 is used to acquire a current frame image containing the target power transmission tower in real time based on the UAV's visual sensor. It identifies the bounding box information of the target component in the current frame image through a preset recognition model and combines it with the current flight pose of the UAV to generate a pose adjustment command and control the UAV to adjust its flight pose until the image of the target component on the visual sensor converges to a preset tolerance range compared with the observation deviation of the preset ideal state. The adjusted bounding box information and flight pose are obtained. The bounding box information includes position, scale, and confidence level. Furthermore, the pose adjustment module M2 includes: a feature extraction unit, a fusion unit, and a prediction and regression unit; The feature extraction unit is used to input the current frame image into the recognition model and extract features through depthwise separable convolution to obtain a geometric feature map containing shallow spatial location information and a semantic feature map containing deep category semantic information. The fusion unit is used to route the geometric feature map and the semantic feature map in parallel to multiple independent detection branches, and perform targeted fusion of the geometric feature map and the semantic feature map through each detection branch to obtain the enhanced features corresponding to each detection branch. The prediction and regression unit is used to perform classification prediction and bounding box regression on at least one target component based on its respective enhanced features through the detection heads of each detection branch, and output bounding box information including component type, two-dimensional bounding box center coordinates, two-dimensional bounding box size and confidence level.
[0056] In this preferred embodiment, the current frame image is input into the recognition model and subjected to depthwise separable convolution to extract geometric and semantic feature maps. Shallow convolution preserves spatial details while reducing computational load, adapting to the computing power limitations of airborne terminals. Furthermore, the two types of feature maps are routed in parallel to multiple independent detection branches and fused in a targeted manner, so that the geometric structure and category semantics interact and enhance each other in their respective optimal dimensions, avoiding the information bottleneck of a single feature stream and improving the feature expression capability of small targets or occluded parts. Then, the detection heads of each branch perform classification prediction and bounding box regression based on the enhanced features, outputting complete bounding box information including part type, center coordinates, size, and confidence. The multi-branch parallel architecture can achieve synchronous and accurate positioning of various heterogeneous parts such as insulators and fittings. At the same time, the confidence output provides a quantitative reliability basis for subsequent pose adjustment and safety verification. Overall, while ensuring real-time performance, the detection rate and positioning accuracy of target parts in complex backgrounds are significantly improved.
[0057] Furthermore, the pose adjustment module M2 includes: a deviation unit, a desired command generation unit, a parameter calculation unit, a compensation calculation unit, and a correction unit; The deviation unit is used to calculate the pixel deviation vector of the center coordinates of the two-dimensional bounding box relative to the center preset region of the current frame image, and to obtain the current pixel size of the two-dimensional bounding box. The expected command generation unit is used to calculate a proportional gain coefficient using a nonlinear mapping function based on the magnitude of the pixel deviation vector, the current pixel size, and the confidence level, and to generate an expected speed command based on the proportional gain coefficient; wherein the proportional gain coefficient has a nonlinear positive correlation with the magnitude of the pixel deviation vector, and a positive correlation with the current pixel size and the confidence level; when the confidence level is lower than a preset confidence threshold, the maximum value of the proportional gain coefficient is limited to within a preset safety upper limit. The parameter calculation unit is used to calculate the depth information of the target component under the visual sensor based on the current pixel size, the component type of the target component and the intrinsic parameter matrix of the visual sensor, and to calculate the image motion trend using the pixel deviation change rate between two consecutive current frame images. The compensation calculation unit is used to establish the state equation of the discrete-time UAV attitude control model based on the depth information, image motion trend and the current linear velocity and angular velocity of the UAV, and solve the model predictive control optimization problem with the goal of minimizing the weighted sum of tracking error and control energy consumption to obtain the feedforward compensation amount. The correction unit is used to superimpose the feedforward compensation amount onto the desired speed command to obtain the superimposed speed command, calculate the safety correction coefficient based on the minimum distance from the current position of the UAV to the preset safety envelope of the target power transmission tower, and limit the normal component of the superimposed speed command based on the safety correction coefficient to obtain the pose adjustment command.
[0058] In this preferred embodiment, by calculating the pixel deviation vector and obtaining the current pixel size, the visual observation error is quantified into a controllable state variable, providing precise input for gain adjustment. Furthermore, based on the modulus, size, and confidence level, a proportional gain coefficient is calculated using a nonlinear mapping function to generate the desired speed command. The maximum gain is limited when the confidence level is below a threshold. This adaptive mechanism dynamically adapts the control response intensity to the observation quality, accelerating convergence under large deviations and suppressing oscillations caused by erroneous actions under low confidence levels, thus ensuring the stability of the visual servoing process. Simultaneously, depth information is calculated based on pixel size, component type, and intrinsic parameter matrix, and the motion trend is calculated using the continuous frame deviation change rate. This combines monocular ranging with temporal difference analysis, compensating for the limitations of purely geometric solutions. The lag of the dynamic target is calculated, providing an accurate disturbance prediction for feedforward compensation. Then, a discrete-time attitude control model is established and an optimization problem with the goal of minimizing the weighted sum of tracking error and control energy consumption is solved to obtain the feedforward compensation. Inertial effects and actuator constraints are incorporated into a unified optimization framework, achieving a balance between active disturbance rejection and energy efficiency. The feedforward compensation is then superimposed on the desired velocity command, and the normal component is limited by a correction coefficient calculated based on the minimum distance to the safe envelope. This causes the velocity command to automatically decay as it approaches the target, preventing overshoot collisions caused by positioning delay or model mismatch. Overall, a robust attitude control strategy integrating adaptive feedback, feedforward disturbance rejection, and safety constraints is formed, effectively addressing the dynamic uncertainty risks in close-range UAV inspections.
[0059] Furthermore, the expected instruction generation unit includes: a first variable subunit, a second variable subunit, a third variable subunit, a multiplication subunit, and a limiting subunit; The first variable subunit is used to calculate the square of the magnitude of the pixel deviation vector, multiply the square by a preset pixel deviation adjustment coefficient, and add it to a preset unit reference gain to obtain the first intermediate variable. The second variable subunit is used to multiply the current pixel size by a preset pixel size adjustment coefficient and then add it to the unit reference gain to obtain a second intermediate variable; The third variable subunit is used to multiply the confidence level by a preset confidence level adjustment coefficient and then add it to the unit reference gain to obtain a third intermediate variable; The multiplication subunit is used to perform a multiplication operation on the first intermediate variable, the second intermediate variable, the third intermediate variable, and the preset basic proportional gain constant to obtain the theoretical proportional gain coefficient. The limiting subunit is used to determine whether the confidence level is lower than a preset confidence threshold. If so, it compares the theoretical proportional gain coefficient with a preset safety upper limit value and uses the smaller value as the proportional gain coefficient; otherwise, it uses the theoretical proportional gain coefficient as the proportional gain coefficient.
[0060] In this preferred embodiment, a first intermediate variable is obtained by calculating the square of the pixel deviation modulus, multiplying it by the pixel deviation adjustment coefficient, and then adding a unit reference gain. This makes the gain response to deviation exhibit a quadratic growth characteristic, providing a stronger corrective torque to accelerate convergence when there is a large deviation. At the same time, the unit reference gain ensures that basic control capability is retained even when the deviation is zero, avoiding system silent failure. Furthermore, a second intermediate variable is obtained by multiplying the current pixel size by the pixel size adjustment coefficient and then adding a unit reference gain. This makes the gain increase as the target field of view increases, conforming to the physical law that higher sensitivity is required for close-range shooting. Simultaneously, a third intermediate variable is obtained by multiplying the confidence level by the confidence adjustment coefficient and then adding a unit reference gain, allowing the recognition reliability to be directly modulated by the control gain. When the confidence level is low, the response intensity is automatically reduced to prevent false tracking. Then, the three intermediate variables are multiplied by the basic proportional gain constant to obtain the theoretical proportional gain coefficient. Through multiplicative coupling, the joint adjustment of multidimensional factors is achieved. Any abnormality of any factor will suppress the overall output, enhancing the inherent safety of the system. Finally, it is determined whether the confidence level is lower than the threshold. If so, the theoretical coefficient is compared with the safety upper limit and the smaller value is taken as the final coefficient. This hard clamping mechanism sets an insurmountable safety boundary for the gain. Even if the nonlinear mapping is abnormally amplified due to extreme input, it can be forcibly limited to an acceptable range. The overall proportional gain generation mechanism with adaptive sensitivity and multiple safety protections is constructed to ensure the stable and reliable operation of visual servo under various working conditions.
[0061] Furthermore, the correction unit includes: an envelope surface construction subunit and a correction coefficient subunit; The envelope surface construction sub-unit is used to determine the semi-axis length based on the size of the target transmission tower, and to construct an ellipsoid as the safety envelope surface with the geometric center of the target transmission tower as the center of the sphere. The correction coefficient subunit is used to calculate the minimum distance from the current position of the UAV to the surface of the safety envelope, and to calculate the safety correction coefficient based on the minimum distance, the preset minimum safety distance threshold and the preset soft constraint start distance.
[0062] In this preferred embodiment, the semi-axis length is determined based on the target transmission tower size, and an ellipsoidal surface is constructed with the geometric center as the sphere center as the safety envelope. This ensures that the safety boundary conforms to the actual shape of the tower rather than using a spherical or cubic approximation. This maximizes the available flight space while ensuring the protection effect and reducing unnecessary trajectory detours. Furthermore, the minimum distance from the current position of the UAV to the surface of the ellipsoidal surface is calculated, and this distance, together with the minimum safe distance threshold and the soft constraint start distance, is used to calculate the safety correction coefficient. Overall, a safety constraint mechanism that adaptively matches the target geometry and has progressive deceleration characteristics is formed, which improves the smoothness of the inspection trajectory and the shooting efficiency while ensuring operational safety.
[0063] The spatial calculation module M3 is used to calculate the three-dimensional spatial position of the target component based on the bounding box information after pose adjustment and the flight pose. Furthermore, the spatial calculation module M3 includes: a calculation unit and a filtering unit; The calculation unit is used to calculate the original three-dimensional spatial position of the target component in the current frame image by means of projection geometry based on the bounding box information after pose adjustment and the flight pose. The filtering unit is used to input the original three-dimensional spatial position and confidence level of the target component into a preset Kalman filter, and read the continuous low confidence level count variable stored in the Kalman filter; if the continuous low confidence level count variable is greater than or equal to a preset threshold, the observation update operation of the Kalman filter is stopped, and a constant velocity extrapolation operation is performed based on the velocity component in the previous state estimate stored in the Kalman filter, and the result of the extrapolation operation is used as the three-dimensional spatial position; otherwise, a state prediction is performed based on the previous state estimate to obtain a predicted three-dimensional spatial position, and the Mahalanobis distance between the original three-dimensional spatial position and the predicted three-dimensional spatial position is calculated. If the Mahalanobis distance exceeds a preset threshold, the current observation input is rejected and the previous state estimate is used as the three-dimensional spatial position; otherwise, the observation update operation of the Kalman filter is performed and the update result is used as the three-dimensional spatial position; wherein the continuous low confidence level count variable represents the cumulative number of consecutive frame images with confidence levels lower than the preset threshold.
[0064] In this preferred embodiment, the original three-dimensional spatial position is calculated based on the bounding box information after pose adjustment and the flight pose through projected geometry, transforming the two-dimensional visual observation into three-dimensional physical coordinates, providing initial observation values for subsequent filtering. Furthermore, the original position and confidence level are input into a Kalman filter, and a continuous low-confidence count variable is read. When the cumulative number represented by this variable reaches a preset threshold, the observation update stops, and a constant-velocity extrapolation operation is performed based on the velocity component in the previous state estimate as the output. This mechanism can maintain the continuity of position estimation based on kinematic priors even when the target is continuously lost or identification fails, avoiding position jumps or filter divergence caused by observation interruptions. Otherwise, the state estimate is performed based on the previous state estimate. The state prediction obtains the predicted 3D spatial position and calculates the Mahalanobis distance between the original position and the predicted position. If the distance exceeds the threshold, the current observation is rejected and the state estimate of the previous moment is output. This outlier elimination logic uses historical motion trends as a benchmark to check the rationality of the current observation, effectively filtering out abnormal measurement values caused by false detection, sudden changes in illumination, etc., and preventing contamination of the filter state. The observation update operation is only performed after passing double verification and the result is output, ensuring that each state correction is based on reliable observations. The overall system constructs an adaptive state estimation mechanism that integrates loss tolerance, outlier suppression and reliable updates, which significantly improves the temporal stability and data reliability of monocular vision 3D localization in complex inspection environments.
[0065] The planning module M4 is used to calculate the theoretical safe shooting distance based on the three-dimensional spatial position and component type of the target component, and to plan the local inspection trajectory using the theoretical safe shooting distance as the imaging constraint. Furthermore, the planning module M4 includes: a mapping query unit and a distance calculation unit; The mapping query unit is used to query a preset safety distance margin mapping table according to the component type and obtain the corresponding safety distance margin value. The distance calculation unit is used to calculate the Euclidean distance between the three-dimensional spatial position and the current position of the drone as the real-time relative distance, and to add the real-time relative distance to the safety distance margin value to obtain the theoretical safe shooting distance.
[0066] In this preferred embodiment, the corresponding margin value is obtained by querying the safety distance margin mapping table according to the component type. This allows the safety margin to be set differently according to the physical size, electrical characteristics and shooting requirements of different components, avoiding overly conservative or insufficient protection caused by a uniform threshold. Furthermore, the Euclidean distance between the three-dimensional spatial position and the current position of the UAV is calculated as the real-time relative distance. This distance is then added to the safety distance margin value to obtain the theoretical safe shooting distance. Static safety rules and dynamic spatial relationships are integrated in real time, allowing safety constraints to be updated instantly with the flight status rather than relying on fixed parameters. Overall, a safety distance calculation method that takes into account both component specificity and spatiotemporal dynamics is formed, providing a personalized and real-time adaptive imaging constraint benchmark for local inspection trajectory planning.
[0067] The inspection module M5 is used to control the UAV to fly to each target shooting point and collect images of the target components based on the local inspection trajectory, thereby completing the inspection and shooting.
[0068] In summary, compared with existing technologies, the embodiments of this application have the following beneficial effects: By controlling the UAV to fly to a preset initial observation position, a stable spatial reference is provided for subsequent visual perception. Based on real-time image acquisition by the visual sensor, bounding box information containing position, scale, and confidence is obtained through a recognition model. Combined with flight pose, adjustment commands are generated and the UAV is controlled until the imaging deviation converges to the tolerance range. Among them, the utilization of the three elements in the bounding box information makes the pose adjustment process not only dependent on geometric deviation, but also introduces recognition reliability as a dynamic adjustment factor. Unlike traditional pure geometric vision servoing, when the confidence fluctuates, the system can automatically suppress invalid or high-risk pose correction actions, avoiding false triggering and oscillations easily caused by rigid tracking based solely on pixel deviation. This improves the robustness and safety of pose adjustment in close-range fine inspection scenarios. This closed-loop feedback mechanism ensures that the target component is in a standardized observation state in the image, eliminating feature extraction distortion caused by tilted viewpoint or excessive distance. At the same time, "the pose adjustment after Bounding box information and flight pose serve as high-confidence data sources, providing a reliable input foundation for 3D solution. Based on the bounding box information and flight pose under stable conditions, the 3D spatial position is calculated, transforming 2D pixel coordinates and pose into absolute spatial coordinates through geometric mapping. This achieves positioning from relative visual perception to absolute physical positioning, eliminating reliance on external point cloud models. Subsequently, the theoretical safe shooting distance is calculated based on the 3D spatial position and component type, and this distance is used as a constraint to plan local inspection trajectories. This allows the flight path to be dynamically generated based on real-time perception results rather than executing pre-defined routes, avoiding collision risks caused by environmental changes and ensuring the spatial matching accuracy between the shooting point and the target component. Finally, the UAV is controlled based on the local trajectory to complete image acquisition, forming a complete autonomous inspection closed loop. This solves the problems of poor adaptability of tower component inspection trajectories and inaccurate shooting caused by reliance on pre-defined point cloud routes in existing technologies, enabling the system to achieve adaptive response and precise operation in complex channel environments without prior models.
[0069] Example 3: This invention also provides a computer program product, including a computer program or instructions, capable of running on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute any of the component inspection and photography methods for transmission towers according to this invention.
[0070] Example 4: This invention also provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a transmission tower component inspection and imaging system, the transmission tower component inspection and imaging system performs one of the transmission tower component inspection and imaging methods described in any of the above method embodiments.
[0071] The specific working processes of each module described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. The division of modules is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules may be combined or integrated into another system.
[0072] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for photographing components of a power transmission tower during inspection, characterized in that, include: Control the drone to fly to the preset initial observation position of the target power transmission tower; The UAV's visual sensor acquires real-time images of the current frame containing the target power transmission tower. A preset recognition model identifies the bounding box information of the target component in the current frame image. Combined with the UAV's current flight pose, a pose adjustment command is generated, controlling the UAV to adjust its flight pose until the deviation of the target component's image on the visual sensor from the preset ideal state converges to a preset tolerance range. This yields the adjusted bounding box information and flight pose. The bounding box information includes position, scale, and confidence level. Based on the bounding box information after pose adjustment and the flight pose, the three-dimensional spatial position of the target component is calculated; Based on the three-dimensional spatial position and component type of the target component, the theoretical safe shooting distance is calculated, and the local inspection trajectory is planned using the theoretical safe shooting distance as the imaging constraint. Based on the local inspection trajectory, the drone is controlled to fly to each target shooting point and collect images of the target components to complete the inspection and shooting.
2. The method for inspecting and photographing components of a transmission tower as described in claim 1, characterized in that, The step of identifying the bounding box information of the target component in the current frame image using a preset recognition model includes: The current frame image is input into the recognition model, and features are extracted through depthwise separable convolution to obtain a geometric feature map containing shallow spatial location information and a semantic feature map containing deep category semantic information. The geometric feature map and semantic feature map are routed in parallel to multiple independent detection branches. The geometric feature map and semantic feature map are fused in a targeted manner through each detection branch to obtain the enhanced features corresponding to each detection branch. Each detection branch uses its own enhanced features to perform classification prediction and bounding box regression on at least one target component, and outputs bounding box information including component type, two-dimensional bounding box center coordinates, two-dimensional bounding box size, and confidence level.
3. The method for inspecting and photographing components of a transmission tower as described in claim 1, characterized in that, The generated pose adjustment instructions include: Calculate the pixel deviation vector of the center coordinates of the two-dimensional bounding box relative to the center preset region of the current frame image, and obtain the current pixel size of the two-dimensional bounding box; Based on the magnitude of the pixel deviation vector, the current pixel size, and the confidence level, a proportional gain coefficient is calculated using a nonlinear mapping function, and a desired speed command is generated based on the proportional gain coefficient. The proportional gain coefficient exhibits a nonlinear positive correlation with the magnitude of the pixel deviation vector and a positive correlation with the current pixel size and the confidence level. When the confidence level is lower than a preset confidence threshold, the maximum value of the proportional gain coefficient is limited to within a preset safety upper limit. Based on the current pixel size, the component type of the target component, and the intrinsic parameter matrix of the visual sensor, the depth information of the target component under the visual sensor is calculated, and the image motion trend is calculated using the pixel deviation change rate between two consecutive current frame images. Based on the depth information, image motion trend, and the current linear and angular velocities of the UAV, the state equation of the discrete-time UAV attitude control model is established, and the model predictive control optimization problem with the goal of minimizing the weighted sum of tracking error and control energy consumption is solved to obtain the feedforward compensation amount. The feedforward compensation is superimposed on the desired velocity command to obtain the superimposed velocity command. A safety correction coefficient is calculated based on the minimum distance from the current position of the UAV to the preset safety envelope of the target power transmission tower. The normal component of the superimposed velocity command is limited based on the safety correction coefficient to obtain the pose adjustment command.
4. The method for inspecting and photographing components of a transmission tower as described in claim 3, characterized in that, The step of calculating the scaling gain coefficient using a nonlinear mapping function based on the magnitude of the pixel deviation vector, the current pixel size, and the confidence level includes: Calculate the square of the magnitude of the pixel deviation vector, multiply the square by a preset pixel deviation adjustment coefficient, and add the result to a preset unit reference gain to obtain the first intermediate variable; The second intermediate variable is obtained by multiplying the current pixel size by a preset pixel size adjustment coefficient and then adding the result to the unit reference gain. The confidence level is multiplied by a preset confidence level adjustment coefficient and then added to the unit reference gain to obtain the third intermediate variable; The theoretical proportional gain coefficient is obtained by multiplying the first intermediate variable, the second intermediate variable, the third intermediate variable, and the preset basic proportional gain constant. If the confidence level is lower than a preset confidence threshold, the theoretical proportional gain coefficient is compared with a preset safety upper limit value and the smaller value is used as the proportional gain coefficient; otherwise, the theoretical proportional gain coefficient is used as the proportional gain coefficient.
5. The method for inspecting and photographing components of a transmission tower as described in claim 3, characterized in that, The calculation of the safety correction coefficient based on the minimum distance from the current location of the UAV to the preset safety envelope of the target power transmission tower includes: The semi-axis length is determined based on the dimensions of the target transmission tower, and an ellipsoid is constructed as the safety envelope surface with the geometric center of the target transmission tower as the center of the sphere. Calculate the minimum distance from the current position of the UAV to the surface of the safety envelope, and calculate the safety correction coefficient based on the minimum distance, the preset minimum safety distance threshold, and the preset soft constraint start distance.
6. The method for inspecting and photographing components of a transmission tower as described in claim 1, characterized in that, The calculation of the three-dimensional spatial position of the target component based on the pose-adjusted bounding box information and flight pose includes: Based on the adjusted bounding box information and flight pose, the original three-dimensional spatial position of the target component in the current frame image is calculated by projective geometry. The original three-dimensional spatial position and confidence level of the target component are input into a preset Kalman filter, and the continuous low confidence count variable stored in the Kalman filter is read. If the continuous low confidence count variable is greater than or equal to a preset threshold, the observation update operation of the Kalman filter is stopped, and a constant velocity extrapolation operation is performed based on the velocity component in the state estimate value stored in the Kalman filter at the previous moment, and the result of the extrapolation operation is used as the three-dimensional spatial position. Otherwise, a state prediction is performed based on the state estimate value at the previous moment to obtain the predicted three-dimensional spatial position, and the Mahalanobis distance between the original three-dimensional spatial position and the predicted three-dimensional spatial position is calculated. If the Mahalanobis distance exceeds a preset threshold, the current observation input is rejected and the state estimate value at the previous moment is used as the three-dimensional spatial position. Otherwise, the observation update operation of the Kalman filter is performed and the update result is used as the three-dimensional spatial position. The continuous low confidence count variable represents the cumulative number of consecutive frame images with confidence levels lower than the preset threshold.
7. The method for photographing and inspecting components of a transmission tower as described in claim 1, characterized in that, The step of calculating the theoretical safe shooting distance based on the three-dimensional spatial position and component type of the target component includes: Query the preset safety distance margin mapping table according to the component type to obtain the corresponding safety distance margin value; Calculate the Euclidean distance between the three-dimensional spatial position and the current position of the drone as the real-time relative distance, and add the real-time relative distance to the safety distance margin value to obtain the theoretical safe shooting distance.
8. A component inspection and imaging system for power transmission towers, characterized in that, include: Initialization module, pose adjustment module, spatial calculation module, planning module, and inspection module; The initialization module is used to control the UAV to fly to the preset initial observation position of the target power transmission tower; The pose adjustment module is used to acquire current frame images containing the target power transmission tower in real time based on the UAV's visual sensor, identify the bounding box information of the target component in the current frame image through a preset recognition model, and combine it with the current flight pose of the UAV to generate a pose adjustment command and control the UAV to adjust the flight pose until the image of the target component on the visual sensor converges to a preset tolerance range compared with the observation deviation of the preset ideal state, thereby obtaining the pose-adjusted bounding box information and flight pose; wherein, the bounding box information includes position, scale, and confidence level; The spatial calculation module is used to calculate the three-dimensional spatial position of the target component based on the bounding box information after pose adjustment and the flight pose. The planning module is used to calculate the theoretical safe shooting distance based on the three-dimensional spatial position and component type of the target component, and to plan a local inspection trajectory using the theoretical safe shooting distance as an imaging constraint. The inspection module is used to control the UAV to fly to each target shooting point and collect images of the target components based on the local inspection trajectory, thereby completing the inspection and shooting.
9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed, they implement a component inspection and photography method for power transmission towers as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a component inspection and photography method for power transmission towers as described in any one of claims 1-7.
