A power distribution inspection robot positioning and tracking method
By combining perspective transformation and the YOLO-seg model with a linear correlation algorithm in the positioning and tracking of power distribution inspection robots, the problem of not being able to obtain real-time speed and trajectory in existing technologies has been solved. This has enabled accurate robot positioning and end-of-battery determination, improving the precision and reliability of equipment management.
Patent Information
- Application Number
- CN202610692134.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-19
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies cannot acquire real-time dynamic performance data such as speed, position, and trajectory of power distribution inspection robots, thus failing to support product iteration and fault analysis.
By clicking on the four corner points of the robot's runway area on the video image, the perspective transformation algorithm is used to map it to the bird's-eye view logical coordinate plane. The robot's position is tracked by combining the YOLO-seg model and the linear correlation algorithm, and the real-time speed and direction are calculated. An anti-anomaly mechanism and calibration results are persisted to simplify the deployment process.
It enables precise positioning and tracking of robots, obtains real-time speed, position and trajectory information, supports end-of-battery termination determination, and improves the precision and reliability of equipment management.
Smart Images

Figure CN122637005A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot positioning and tracking technology, and in particular to a method for positioning and tracking a power distribution inspection robot. Background Technology
[0002] To achieve real-time collection of massive amounts of energy data, equipment status monitoring, and unmanned operation and maintenance of power distribution facilities, modern integrated energy management platforms for industrial parks are gradually deploying new equipment such as intelligent inspection robots and mobile sensing terminals. However, with the rapid increase in the number of such highly mobile and flexible devices, the operation and coordination between these devices have become extremely complex, placing higher demands on the integrated energy management platform for refined perception management and reliable scheduling of related equipment. Among these, the positioning and tracking of power distribution inspection robots is particularly important for obtaining the robot's working status.
[0003] However, current robot positioning and tracking methods can only record the total battery life and cannot obtain real-time dynamic performance data such as the robot's speed, position, and trajectory throughout the entire testing process, thus failing to provide in-depth data support for product iteration and fault analysis. Summary of the Invention
[0004] The purpose of this invention is to solve the technical problems existing in the background art. To this end, a method for positioning and tracking a power distribution inspection robot is provided.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A method for locating and tracking a power distribution inspection robot includes the following steps: Click on the four corner points of the outer and inner rings of the robot's runway area in the video image; By calculating the homography matrix, the original image coordinates are mapped to a regular bird's-eye view logical coordinate plane; On the bird's-eye view logical coordinate plane, convert pixel distance to actual physical distance. The conversion formula is: ; in, The calibration coefficient is calculated by pre-measuring a known length segment of the runway. To provide a bird's-eye view of the plane origin, The coordinates of the calibration point are shown in the bird's-eye view. The calibration point can be a corner point or a robot. Using the segmentation mask output by the YOLO-seg model, the geometric center of the robot region is calculated as the robot's position in the image; The linear correlation algorithm is used to track the robot center point in consecutive frames, including: for the center point detected in the current frame, calculate its Euclidean distance with all candidate center points in the previous frame, and select the point with the closest distance and less than the threshold as the same target; Based on the changes in the center point position of consecutive frames, the robot's direction of motion and instantaneous velocity are determined.
[0007] The following is a further defined technical solution of the present invention: the determination of the robot's motion direction includes: setting the center point of the previous frame as... The center point of the current frame is Then the direction angle of motion satisfy: ; The range of values is [ 180°, 180°).
[0008] The following is a further defined technical solution of the present invention: the calculation of the robot's instantaneous speed includes: assuming the image frame rate is... The time interval between two adjacent frames The physical distance between two points based on bird's-eye view logical coordinates Then instantaneous velocity for: .
[0009] The following is a further defined technical solution of the present invention: the average value of the instantaneous velocity of 3 to 5 consecutive frames is taken as the current output value.
[0010] The following is a further defined technical solution of the present invention: the segmentation mask output by the YOLO-seg model is the pixel-level classification result directly output during inference by the YOLO-seg model, which has been trained by transfer learning, exported in ONNX format and integrated into the C# program.
[0011] The following is a further technical solution of the present invention: the order of clicking the four corner points is defined as top left, top right, bottom right, bottom left, and the four corner points are automatically checked to see if they form a convex quadrilateral. If they do, the setting is successful; otherwise, the setting is repeated.
[0012] The following is a further defined technical solution of the present invention: the homography matrix is solved by the direct linear transformation method, and an anti-outlier mechanism is added during the solution process. The anti-outlier mechanism includes: if three of the four corner points are collinear or the area is less than a threshold, prompting for reselection to ensure the numerical stability of the matrix.
[0013] The following is a further technical solution of the present invention: the homography matrix and calibration coefficients obtained from each calibration calculation are saved to a local configuration file. When the camera position and runway layout remain unchanged, subsequent tests do not require recalibration.
[0014] Compared with the prior art, the present invention has the following technical effects: This invention can locate and track robots, accurately acquiring real-time information such as the robot's speed, position, and trajectory throughout the entire testing process.
[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0019] like Figure 1 As shown, this embodiment provides a method for locating and tracking a power distribution inspection robot, which specifically includes the following steps: When the system is first run, the user clicks on the video image to set the four corner points of the inner and outer circles of the robot track. Through a perspective transformation algorithm, the original image coordinates are mapped to a regular bird's-eye view logical coordinate plane, eliminating distortion caused by the camera's perspective and making distance and speed calculations more accurate. Perspective transformation is a classic geometric transformation method in computer vision, widely used in image correction, lane detection, monocular ranging, and other scenarios. Its core mathematical principle is to calculate a 3×3 homography matrix to map points on the image plane to another plane (the bird's-eye view plane).
[0020] Although perspective transformation itself is a publicly available algorithm, this invention incorporates the following design and customized calculations in its engineering implementation: 1. Corner point selection and order rules: This invention defines the order in which the user clicks the four corner points (top left, top right, bottom right, bottom left) and automatically verifies whether the four points form a convex quadrilateral to avoid mapping distortion caused by incorrect point selection order.
[0021] 2. Solving the homography matrix: This invention uses the Direct Linear Transformation (DLT) method to solve the homography matrix, but adds an anti-outlier mechanism during the solution process. If three of the four points are collinear or the area is too small (i.e., the area is less than the threshold), the system will prompt the user to reselect, thus ensuring the numerical stability of the matrix.
[0022] 3. Mapping formula between logical coordinates and physical dimensions: This invention further converts pixel distance into actual physical distance on the bird's-eye view logical coordinate plane. (millimeters or centimeters), the conversion formula is: ; in, The calibration coefficient is calculated by pre-measuring a known length of the runway. To provide a bird's-eye view of the plane origin, This provides the bird's-eye view coordinates for the calibration points (corner points or the robot). This mapping allows the system to directly calculate the robot's actual movement speed (mm / s), unaffected by the camera's installation height or angle.
[0023] Persistence and Reuse: This invention saves the homography matrix and calibration coefficients obtained from each calibration calculation to a local configuration file. As long as the camera position and runway layout remain unchanged, subsequent tests do not require recalibration, improving ease of use.
[0024] Although this invention adopts a general perspective transformation algorithm, it has been designed and engineered to optimize interaction rules, anti-anomaly point processing, physical distance mapping formula, and persistent reuse of calibration results, making on-site deployment simple, coordinate mapping accurate, and reusable.
[0025] Using the segmentation mask output by the YOLO-seg model, the geometric center of the robot region is calculated as its position in the image. This segmentation mask is exactly what was mentioned earlier—the pixel-level classification result directly output by the YOLO-seg model (each pixel is labeled as "robot" or "background") during inference, after being trained by transfer learning, exported in ONNX format, and integrated into a C# program.
[0026] Since the test scenario is relatively simple (single robot, relatively regular movement direction), this invention uses a linear correlation algorithm to track the robot center point in consecutive frames: that is, for the center point detected in the current frame, calculate its Euclidean distance with all candidate center points in the previous frame, and select the point with the closest distance and less than a threshold (such as 50 pixels) as the same target.
[0027] Based on the changes in the center point position of consecutive frames, the robot's direction of motion and instantaneous velocity can be determined. Determining the robot's direction of motion includes: setting the center point of the previous frame as... The center point of the current frame is Then the direction angle of motion satisfy: ; The range of values is [ [180°, 180°] can intuitively represent the robot's direction of movement (e.g., 0° is due east, 90° is due north).
[0028] The calculation of the robot's instantaneous velocity includes: Assuming the image frame rate is (frames / second), the time interval between two adjacent frames Seconds. The physical distance between two points in a known bird's-eye view logical coordinate system. (millimeters) The instantaneous velocity is obtained through perspective transformation and calibration coefficient conversion. for: (mm / s).
[0029] In practical applications, to avoid single-frame noise, the average instantaneous velocity of 3 to 5 consecutive frames is taken as the current output value. This linear correlation algorithm is simple, efficient, and has extremely low CPU usage, fully meeting the real-time tracking requirements of single-robot endurance testing.
[0030] This invention can be used for intelligent determination of end-of-run conditions. Specifically, when the robot's center point remains outside the preset track area for N seconds (e.g., 5 seconds), or its instantaneous speed remains below a preset threshold for M seconds (e.g., 10 seconds), the system automatically determines that end-of-run conditions have been terminated. This composite determination logic effectively avoids misjudgments caused by the robot's brief pauses on curves or by visual obstruction.
[0031] For tracking the robot's center point, this invention, in addition to linear correlation, can also employ more complex prediction and filtering algorithms such as Kalman filtering to improve tracking stability under conditions of high-speed movement or brief occlusion. It should be noted that Kalman filtering and the linear correlation algorithm used in this invention differ significantly in principle and implementation, and its introduction introduces new technical challenges. This is precisely why this invention chooses linear correlation. Differences in principle and application: Linear correlation only matches the Euclidean distance between the current frame's detection result and the previous frame's result, belonging to a "no prediction, pure matching" strategy; while Kalman filtering consists of two steps: "prediction" and "update". It predicts the possible position of the current frame based on the robot's state (position, velocity, acceleration) in the previous frame, and then fuses the detection result of the current frame with it to obtain the optimal estimate. Therefore, Kalman filtering has a natural "memory" ability for brief occlusion (such as the robot being blocked by a runway pillar for 1-2 frames), and can still predict the position based on the motion model even if the detection is lost.
[0032] However, if Kalman filtering is used instead in this invention, the following technical issues need to be addressed: 1. State modeling: A state vector (such as position, velocity, and acceleration) needs to be defined for each robot, and the process noise and measurement noise covariance matrices need to be set. Different robot models have different motion characteristics (such as maximum speed and acceleration / deceleration capabilities), and the noise parameters need to be optimized separately, increasing the system configuration complexity. 2. Occlusion handling threshold: After continuous occlusion for more than a few frames, the prediction error of Kalman filtering will accumulate rapidly. An "occlusion timer" needs to be introduced in conjunction with a re-detection mechanism; otherwise, it will lead to trajectory drift. 3. Computational overhead: Although the computational load of Kalman filtering is not large, in multi-target scenarios (such as the future V2.0 version), an independent filter needs to be maintained for each target, and logic such as filter initialization and reset needs to be handled, making the code complexity higher than that of linear correlation.
[0033] The reason this invention does not employ Kalman filtering is as follows: Actual testing has shown that in the current application scenario—a single robot, a fixed track trajectory, a gentle movement speed (0.2–0.8 m / s), and no severe obstruction in the camera's field of view—the linear association algorithm already achieves a 100% tracking success rate (no frame drops or mismatches occurred in over 50 tests). The stability improvement brought by Kalman filtering is negligible in this scenario; instead, it introduces engineering burdens such as parameter tuning, multi-model adaptation, and increased code complexity. Furthermore, the core logic of this invention for determining battery termination relies on the speed remaining below a threshold M seconds. The smoothing effect of Kalman filtering might "filter out" genuine short-term pauses in the robot, leading to a delay in the decision. Therefore, from an engineering pragmatism perspective, this invention chooses the simple, transparent, and easily debuggable linear association algorithm, rather than the overly designed Kalman filtering.
[0034] In summary, although Kalman filtering is a mature solution in the field of motion tracking, this invention did not adopt it based on a comprehensive consideration of scenario simplicity, real-time performance, maintainability, and the accuracy of the decision logic. If supporting concurrent testing of multiple robots or the presence of severe occlusion is required, Kalman filtering can be considered as an optional enhancement module.
[0035] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any person skilled in the art can make many possible variations and modifications to the technical solution of the present invention, or modify it into equivalent embodiments, without departing from the scope of the present invention's technical solution. Therefore, all equivalent changes made based on the shape, structure, and principle of the present invention without departing from the scope of the present invention's technical solution should be covered within the protection scope of the present invention.
Claims
1. A method for locating and tracking a power distribution inspection robot, characterized in that, Includes the following steps: Click on the four corner points of the outer and inner rings of the robot's runway area in the video image; By calculating the homography matrix, the original image coordinates are mapped to a regular bird's-eye view logical coordinate plane; On the bird's-eye view logical coordinate plane, convert pixel distance to actual physical distance. The conversion formula is: ; in, The calibration coefficient is calculated by pre-measuring a known length segment of the runway. To provide a bird's-eye view of the plane origin, The coordinates of the calibration point are shown in the bird's-eye view. The calibration point can be a corner point or a robot. Using the segmentation mask output by the YOLO-seg model, the geometric center of the robot region is calculated as the robot's position in the image; The linear correlation algorithm is used to track the robot center point in consecutive frames, including: for the center point detected in the current frame, calculate its Euclidean distance with all candidate center points in the previous frame, and select the point with the closest distance and less than the threshold as the same target; Based on the changes in the center point position of consecutive frames, the robot's direction of motion and instantaneous velocity are determined.
2. The power distribution inspection robot positioning and tracking method as described in claim 1, characterized in that, Determining the robot's direction of motion includes: setting the center point of the previous frame as... The center point of the current frame is Then the direction angle of motion satisfy: ; The range of values is [ 180°, 180°).
3. The power distribution inspection robot positioning and tracking method as described in claim 1, characterized in that, The calculation of the robot's instantaneous velocity includes: assuming the image frame rate is... The time interval between two adjacent frames The physical distance between two points based on bird's-eye view logical coordinates Then instantaneous velocity for: .
4. The power distribution inspection robot positioning and tracking method as described in claim 3, characterized in that, Take the average instantaneous velocity of 3 to 5 consecutive frames as the current output value.
5. The power distribution inspection robot positioning and tracking method as described in claim 1, characterized in that, The segmentation mask output by the YOLO-seg model is the pixel-level classification result directly output during inference by the YOLO-seg model, which has been trained through transfer learning, exported in ONNX format, and integrated into a C# program.
6. The power distribution inspection robot positioning and tracking method as described in claim 1, characterized in that, Define the order of clicking the four corner points as top left, top right, bottom right, bottom left, and automatically check whether the four corner points form a convex quadrilateral. If they do, the setting is successful; otherwise, click to set again.
7. The power distribution inspection robot positioning and tracking method as described in claim 1, characterized in that, The homography matrix is solved using the direct linear transformation method. An anti-outlier mechanism is added during the solution process. The anti-outlier mechanism includes prompting for reselection if three of the four corner points are collinear or the area is less than a threshold, thus ensuring the numerical stability of the matrix.
8. The power distribution inspection robot positioning and tracking method as described in claim 1, characterized in that, The homography matrix and calibration coefficients obtained from each calibration calculation are saved to a local configuration file. When the camera position and runway layout remain unchanged, subsequent tests do not require recalibration.