Power patrol multi-target distance measurement method, device and equipment and storage medium

By combining visual images and laser point cloud data, and using a power equipment feature library for spatial coordinate registration, the error problem in power inspection distance measurement under complex environments was solved, achieving high-precision power equipment distance measurement and improving the reliability of power inspection data.

CN121763302AActive Publication Date: 2026-03-31SHENZHEN POWER SUPPLY BUREAU
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional multi-target distance measurement methods for power line inspection suffer from reduced image clarity and pixel grayscale value distortion in complex environments, resulting in large distance measurement errors.

Method used

By combining visual images and laser point cloud data, spatial coordinate registration is performed using a power equipment feature library to obtain target point cloud data of power equipment, thereby achieving high-precision distance measurement.

Benefits of technology

High-precision distance measurement of power equipment was achieved in complex environments, improving the reliability of power inspection data and the accuracy of hazard identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121763302A_ABST
    Figure CN121763302A_ABST
Patent Text Reader

Abstract

The invention relates to a power inspection multi-target distance measurement method, device and equipment and a storage medium. The method comprises the following steps: acquiring a visual image and laser point cloud data collected by an electric power inspection unmanned aerial vehicle in an electric power inspection area; according to the visual image and a preset electrical equipment feature library, determining respective visual sub-images of the plurality of electrical equipment; performing space coordinate registration on the laser point cloud data and respective visual sub-images of the plurality of power devices to obtain respective target point cloud data of the plurality of power devices; and according to the target point cloud data, determining distance measurement results of the plurality of power devices in the power patrol area. By adopting the method, high-precision power equipment distance measurement can still be realized in a complex patrol environment, and the reliability of power patrol data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system technology, and in particular to a method, apparatus, equipment and storage medium for measuring the distance between multiple targets during power inspection. Background Technology

[0002] In power system inspection work, in order to ensure the safe and stable operation of power lines, it is necessary to measure the distances of multiple power equipment targets such as poles, insulators, and conductors on the power lines in order to determine whether there are potential hazards such as insufficient safe distances between the targets.

[0003] Traditional methods for measuring the distance between multiple targets during power line inspections primarily rely on visual sensors to capture images of the power equipment scene. The distance between the drone and each target is then calculated based on the pixel size of the targets in the image and a preset pixel-to-actual-distance conversion ratio. However, when the power line inspection environment is complex, the images captured by the visual sensors are prone to reduced target outline clarity and pixel grayscale distortion, leading to significant errors in the multi-target distance measurement. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, device, computer equipment, computer-readable storage medium, and computer program product for measuring the distance of multiple targets in power inspection, which can achieve high-precision distance measurement of power equipment in complex inspection environments and ensure the reliability of power inspection data.

[0005] Firstly, this application provides a method for measuring the distance between multiple targets during power line inspections, including:

[0006] Acquire visual images and laser point cloud data collected by power inspection drones within the power inspection area;

[0007] Based on the visual images and a pre-set power equipment feature library, determine the visual sub-images of multiple power equipment;

[0008] Spatial coordinate registration is performed between the laser point cloud data and the visual sub-images of multiple power devices to obtain the target point cloud data of each power device.

[0009] Based on the target point cloud data, the distance measurement results of multiple power equipment within the power inspection area are determined.

[0010] Secondly, this application also provides a multi-target distance measurement device for power line inspection, comprising:

[0011] The acquisition module is used to acquire visual images and laser point cloud data collected by the power inspection drone in the power inspection area;

[0012] The first determining module is used to determine the visual sub-images of multiple power devices based on the visual images and a preset power device feature library.

[0013] The registration module is used to register the laser point cloud data and the visual sub-images of multiple power devices in spatial coordinates to obtain the target point cloud data of each power device.

[0014] The second determination module is used to determine the distance measurement results of multiple power devices within the power inspection area based on the target point cloud data.

[0015] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0016] Acquire visual images and laser point cloud data collected by power inspection drones within the power inspection area;

[0017] Based on the visual images and a pre-set power equipment feature library, determine the visual sub-images of multiple power equipment;

[0018] Spatial coordinate registration is performed between the laser point cloud data and the visual sub-images of multiple power devices to obtain the target point cloud data of each power device.

[0019] Based on the target point cloud data, the distance measurement results of multiple power equipment within the power inspection area are determined.

[0020] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0021] Acquire visual images and laser point cloud data collected by power inspection drones within the power inspection area;

[0022] Based on the visual images and a pre-set power equipment feature library, determine the visual sub-images of multiple power equipment;

[0023] Spatial coordinate registration is performed between the laser point cloud data and the visual sub-images of multiple power devices to obtain the target point cloud data of each power device.

[0024] Based on the target point cloud data, the distance measurement results of multiple power equipment within the power inspection area are determined.

[0025] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0026] Acquire visual images and laser point cloud data collected by power inspection drones within the power inspection area;

[0027] Based on the visual images and a pre-set power equipment feature library, determine the visual sub-images of multiple power equipment;

[0028] Spatial coordinate registration is performed between the laser point cloud data and the visual sub-images of multiple power devices to obtain the target point cloud data of each power device.

[0029] Based on the target point cloud data, the distance measurement results of multiple power equipment within the power inspection area are determined.

[0030] The aforementioned method, device, computer equipment, computer-readable storage medium, and computer program product for multi-target distance measurement in power line inspections acquire visual images and laser point cloud data collected by power line inspection drones within the inspection area. This enables collaborative acquisition guidance of dual-modal data, resulting in highly targeted data acquisition that overcomes the inherent limitations of single visual data in complex environments. Based on the visual images and a pre-defined power equipment feature library, individual visual sub-images of multiple power equipment are determined, enabling precise extraction of the areas where power equipment is located within the visual images and eliminating irrelevant background interference. Spatial coordinate registration is performed between the laser point cloud data and the individual visual sub-images of multiple power equipment to obtain target point cloud data for each power equipment. This integrates the precise positioning information of power equipment from visual images while retaining the advantages of laser point cloud data—its immunity to interference from complex environments and high distance measurement accuracy—overcoming the image distortion limitations of single visual sensors in complex environments. Based on the target point cloud data, the distance measurement results for multiple power equipment within the inspection area are determined, achieving high-precision power equipment distance measurement even in complex inspection environments. This ensures the reliability of power line inspection data and improves the accuracy of subsequent hazard assessment. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is an application environment diagram of a multi-target distance measurement method for power line inspection in one embodiment;

[0033] Figure 2 This is a flowchart illustrating a multi-target distance measurement method for power line inspection in one embodiment;

[0034] Figure 3 This is a schematic diagram of a sub-process of step 204 in one embodiment;

[0035] Figure 4 This is a structural block diagram of a multi-target distance measurement device for power line inspection in one embodiment;

[0036] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0038] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0039] The multi-target distance measurement method for power line inspection provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other network servers. This embodiment uses the method applied to terminal 102 as an example; it is understood that this method can also be applied to server 104, and can also be applied to systems including terminals and servers, and implemented through interaction between the terminal and server. Terminal 102 acquires visual images and laser point cloud data collected by a power inspection drone within the power inspection area; based on the visual images and a preset power equipment feature library, it determines the visual sub-images of multiple power devices; it performs spatial coordinate registration of the laser point cloud data and the visual sub-images of the multiple power devices to obtain the target point cloud data of the multiple power devices; based on the target point cloud data, it determines the distance measurement results of multiple power devices within the power inspection area. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.

[0040] In one exemplary embodiment, such as Figure 2 As shown, a method for measuring the distance between multiple targets during power line inspection is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 202 to 208. Wherein:

[0041] Step 202: Acquire visual images and laser point cloud data collected by the power inspection drone within the power inspection area.

[0042] Among them, power line inspection drones are drones used to collect data within power line inspection areas. In some embodiments, power line inspection drones are equipped with navigation satellite systems, inertial measurement units, visual sensors, and lidar sensors. The terminal acquires the spatial state parameters transmitted in real time by the power line inspection drone, including real-time position coordinates collected by the navigation satellite system, for example, in a three-dimensional Cartesian coordinate system. Where X1 represents the eastward coordinate, Y1 represents the northward coordinate, and Z1 represents the elevation coordinate; the real-time attitude angles collected by the inertial measurement unit. , Indicates roll angle, Indicates pitch angle, Indicates the heading angle.

[0043] The terminal determines the theoretical location coordinates of multiple power devices (e.g., pole A, insulator B, conductor C) within the power inspection area based on an electronic map of the area. For example, the theoretical location coordinates of multiple power devices include pole A. Insulator B Wire C By calculating spatial coordinates, based on the real-time location coordinates of the power line inspection drone... By comparing the theoretical position coordinates of each power equipment with the relative azimuth angles between the power inspection drone and each power equipment, the relative azimuth angles between the drone and each power equipment are calculated; this is then combined with the real-time attitude angles of the power inspection drone. This process generates acquisition angle control commands for both the visual sensor and the lidar sensor. These commands guide the visual sensor to adjust its lens orientation and the lidar sensor to adjust its laser emission angle, enabling the simultaneous capture of visual images containing multiple power devices (such as tower A, insulator B, and conductor C) at preset resolution and exposure parameters. It also allows scanning of the same power scene at a preset point cloud density and laser emission frequency, generating laser point cloud data containing the spatial location information of multiple power devices. The coordinates of each laser point in this laser point cloud data can be represented as... ,in , , These correspond to coordinate values ​​in a three-dimensional Cartesian coordinate system.

[0044] For example, in a power inspection area that is a 110kV transmission line section, the power equipment includes tower No. 220 (tower A), a string of disc insulators on that tower (insulator B), and a conductor (conductor C) connecting tower A to tower No. 221. A power inspection drone flies over this inspection area, and its navigation satellite system collects its real-time position coordinates. for Real-time attitude angles acquired by the inertial measurement unit for The theoretical coordinates of tower No. 220 were retrieved from the power inspection database. for Theoretical position coordinates of insulator B for Theoretical position coordinates of conductor C for The relative azimuth angle between the power line inspection drone and tower A, calculated using spatial coordinates, is east-northeast. Based on the real-time attitude angle of the power line inspection drone, the visual sensor's acquisition angle control command is generated as "adjust the lens pitch angle downwards". Adjust the heading angle to The control command for the acquisition angle of the lidar sensor is "adjust the laser emission elevation angle downwards". , launch heading angle adjusted to The visual sensor captures a visual image containing tower A, insulator B, and conductor C as instructed; the lidar sensor scans as instructed to obtain lidar point cloud data, which contains various points on the surfaces of tower A, insulator B, and conductor C. coordinate.

[0045] Step 204: Based on the visual images and the preset power equipment feature library, determine the visual sub-images of each of the multiple power equipment.

[0046] The preset power equipment feature library stores standard contour feature information for multiple power equipment. For example, the standard contour feature information for power poles includes the aspect ratio range of the rectangular contour of the main body of the pole (e.g., ...). ), the range of the interior angles of the triangular outline of the crossarm at the top of the tower (e.g. ) etc.; the standard profile feature information of insulators includes the diameter range of the circular profile of a single insulator (e.g. ), the linear arrangement profile spacing range of insulator strings (e.g. ), etc.; the standard profile feature information of the conductor includes the diameter range of the conductor's cylindrical profile (e.g., ), the threshold for the straight profile length of the conductor (e.g., 5m or more), etc.

[0047] The terminal determines the visual sub-images of multiple power devices in the visual image based on the standard contour feature information of multiple power devices in the preset power equipment feature library.

[0048] Step 206: Spatial coordinate registration is performed between the laser point cloud data and the visual sub-images of each of the multiple power devices to obtain the target point cloud data of each of the multiple power devices.

[0049] Spatial coordinate registration refers to constructing a transformation model between the visual image coordinate system and the point cloud coordinate system, and using the transformation model to perform coordinate transformation on the laser point cloud data, thereby determining the target point cloud data of multiple power devices in the laser point cloud data.

[0050] The visual image coordinate system refers to the coordinate system constructed based on a visual image, while the point cloud coordinate system refers to the coordinate system constructed based on laser point cloud data. The transformation model indicates the transformation relationship between the visual image coordinate system and the point cloud coordinate system.

[0051] Step 208: Based on the target point cloud data, determine the distance measurement results of multiple power devices within the power inspection area.

[0052] Based on the safety monitoring requirements of power line inspections, distance measurement rules are preset between different types of power equipment. The distances between these equipment are calculated using these rules and the target point cloud data of the corresponding power equipment. For example, the distance measurement rule between a pole and a conductor is: take the distance between the two points with the smallest distance in the point cloud data of the main surface of the pole and the conductor. The distance measurement rule between an insulator and a conductor is: take the distance between the two points with the smallest distance in the point cloud data of the bottom connection point of the insulator string and the conductor. By using these distance measurement rules, the distances between corresponding points in the target point cloud data of different power equipment are calculated, thus obtaining the distances between the corresponding power equipment.

[0053] For example, when calculating the distance between tower A and conductor C, all laser points in the target point cloud data of tower A are traversed. All laser points in the target point cloud data of conductor C Calculate the distance between each pair of laser points. , Select the smallest one. This refers to the distance between tower A and conductor C.

[0054] In some embodiments, the multi-target distance measurement method for power inspection further includes: for any power equipment within the power inspection area, determining key component identification rules based on the equipment type of the corresponding power equipment; determining the three-dimensional coordinates of each of the multiple key components in the corresponding power equipment in the target point cloud data of the corresponding power equipment based on the key component identification rules; and determining the distance between the multiple key components in the corresponding power equipment based on the three-dimensional coordinates of each of the multiple key components in the corresponding power equipment.

[0055] For example, the rules for marking key parts of a tower include: the center point of the tower's bottom (set as...). ), center point of the crossarm at the top of the tower (set as) The key part identification rules for insulators include: the connection point at the top of the insulator string (set as...). ), the connection point at the bottom of the insulator string (set as) The key component identification rules for conductors include: the center point of a certain cross-section of the conductor (set as...). The center point of the cross section located 10m along the direction of the conductor extension (let's call it...) Using a point cloud fitting algorithm, such as fitting the minimum circumcircle of the point cloud at the base of the tower to find the center point at the base of the tower, the center of the circle is taken as the minimum circumcircle. The center point of the crossarm at the top of the tower is determined by fitting a straight line segment to the point cloud of the crossarm at the top of the tower, and the midpoint of the line segment is taken as the center point. The three-dimensional coordinates of each key component are extracted from the target point cloud data of the corresponding power equipment, such as... , , , , , Then, the distance between multiple key components in the same power equipment is calculated using the three-dimensional space distance calculation formula. The three-dimensional space distance calculation formula can be: Where d represents the distance between two points, , These represent the three-dimensional coordinates of the two key components.

[0056] In some embodiments, the distances between multiple key components of all measured power equipment and the distances between multiple power equipment are summarized and the corresponding equipment distance labels are marked, such as the distance between the bottom and top of tower A, the distance between the top and bottom of insulator B, the distance between tower A and conductor C, etc., to form the distance measurement results of multiple power equipment in the power inspection area.

[0057] In the aforementioned multi-target distance measurement method for power line inspection, visual images and laser point cloud data collected by power line inspection drones within the inspection area are acquired to guide the collaborative acquisition of dual-modal data. This method provides highly targeted data acquisition and overcomes the inherent limitations of single visual data in complex environments. Based on the visual images and a pre-defined power equipment feature library, individual visual sub-images of multiple power equipment are determined, enabling precise extraction of the areas where the power equipment is located within the visual images and eliminating irrelevant background interference. Spatial coordinate registration is performed between the laser point cloud data and the individual visual sub-images of the multiple power equipment to obtain target point cloud data for each power equipment. This method integrates the precise positioning information of the power equipment from the visual images while retaining the advantages of laser point cloud data—its immunity to interference from complex environments and high distance measurement accuracy—overcoming the image distortion limitations of single visual sensors in complex environments. Based on the target point cloud data, the distance measurement results for multiple power equipment within the inspection area are determined. This achieves high-precision distance measurement of power equipment even in complex inspection environments, ensuring the reliability of power line inspection data and improving the accuracy of subsequent hazard assessment.

[0058] In one exemplary embodiment, such as Figure 3 As shown, based on the visual images and a pre-defined power equipment feature library, visual sub-images for multiple power equipment are determined, including:

[0059] Step 302: Perform edge detection on the visual image to obtain the edge detection results.

[0060] Step 304: Determine candidate edge pixels based on the grayscale gradient difference between each edge pixel and its neighboring pixels in the edge detection results.

[0061] Step 306: Determine multiple candidate sub-images in the visual image based on the candidate edge pixels.

[0062] Step 308: Based on the contour curvature features of multiple candidate sub-images and a preset power equipment feature library, determine the visual sub-images of multiple power equipment respectively.

[0063] The terminal employs an edge detection algorithm to perform edge detection on the visual image, obtaining the edge detection results. The edge detection threshold can be adaptively adjusted based on the grayscale distribution of the visual image to ensure the completeness of edge extraction. Edge pixels refer to the pixels in the edge detection results that indicate the outline of electrical equipment in the visual image. Neighborhood pixels refer to pixels adjacent to edge pixels; for example, neighboring pixels can be edge pixels. The 8 neighboring pixels, such as , , Gray-level gradient difference refers to the gray-level difference between an edge pixel and its neighboring pixels. When there are multiple neighboring pixels, the gray-level gradient difference can be the average of the gray-level differences between the edge pixel and each of its multiple neighboring pixels.

[0064] The terminal can select edge pixels whose grayscale gradient difference is greater than a preset difference from multiple edge pixels in the edge detection results as candidate edge pixels.

[0065] There can be multiple candidate edge pixels. The terminal can perform connected component analysis, edge closure region recognition, and convex hull construction on multiple candidate edge pixels to determine multiple candidate sub-images in the visual image.

[0066] Contour curvature features refer to the curvature-related features of contour lines in candidate sub-images. Using contour curvature features and standard contour feature information of each power device in the power equipment feature library, visual sub-images for multiple power devices are determined.

[0067] In this embodiment, edge detection is used to initially screen out edges that are more likely to belong to power equipment, thereby improving the accuracy of recognition. The gray-scale gradient difference between edge pixels and neighboring pixels is used to further screen candidate edge pixels, thereby improving the detection accuracy of candidate sub-images. Contour feature matching is performed using contour curvature features and a preset power equipment feature library to improve the recognition accuracy of visual sub-images.

[0068] In an exemplary embodiment, determining multiple candidate sub-images in a visual image based on candidate edge pixels includes: taking multiple candidate edge pixels with connectivity as edge pixel groups to obtain multiple edge pixel groups; determining the edge contours corresponding to each of the multiple edge pixel groups based on the neighboring edge pixels of the multiple candidate edge pixels within each edge pixel group; when the Euclidean distance between the start coordinates and end coordinates of any edge contour is less than or equal to a preset distance, taking the region enclosed by the corresponding edge contour as an edge closed region; constructing a convex hull for the edge closed region and determining the bounding rectangle of the constructed convex hull region; and taking the image region where the bounding rectangle is located in the visual image as a candidate sub-image.

[0069] Here, candidate edge pixels with connectivity refer to candidate edge pixels that meet a preset connectivity criterion. For example, the preset connectivity criterion means that if two candidate edge pixels are adjacent in the horizontal or vertical direction and the distance between them is... If there is only one pixel, it is determined that there is a connected relationship.

[0070] Each edge pixel group contains multiple candidate edge pixels with connectivity, and each edge pixel group corresponds to a potential power device. Neighborhood edge pixels refer to edge pixels within the neighborhood of a candidate edge pixel. In some embodiments, the terminal traverses all candidate edge pixels within each edge pixel group, checking if there are other edge pixels within the 8-neighborhood of each candidate edge pixel. If so, the traversal continues until a continuous edge contour is formed.

[0071] The terminal determines the starting coordinates of each continuous edge contour. and endpoint coordinates If the Euclidean distance between the starting point and the ending point If the distance is less than or equal to the preset distance, the area enclosed by the continuous edge contour is considered as the edge closed area.

[0072] In some embodiments, based on the minimum size characteristics of the power equipment (such as the minimum height of the tower corresponding to the image pixel size) 200 pixels, the minimum diameter of the insulator corresponds to the image pixel size. 15 pixels, the minimum diameter of the wire corresponds to the image pixel size. 3 pixels), remove pixels with an area smaller than the minimum size feature (e.g., the minimum pixel area of ​​an insulator). The edge-closed region is obtained by tracing the edge of the closed region.

[0073] The process of constructing a convex hull refers to selecting the pixel with the smallest y-coordinate among all pixels in the closed edge region as the starting point. (If multiple pixels have the smallest y-coordinate, select the one with the smallest x-coordinate); Other pixels in the closed edge region are then compared with... Polar angles sorted by size (polar angles in order of size) (The origin is used as the reference point, and the positive x-axis direction is used as the reference, increasing counterclockwise); initialize the convex hull point set. ( (The pixel with the smallest polar angle), then traverse the remaining sorted pixels. For each Determine the relationship between the last two points in the convex hull set H and... The orientation of the triangle formed (calculated via cross product): if ,but Inside the convex hull, delete from H. If cross product 0, then Add H), until all pixels are traversed, and finally the pixels in H form the vertices of the smallest convex hull; connect the obtained convex hull vertices in order, and the resulting polygonal region is the convex hull region corresponding to the edge closed region. The convex hull region is the smallest convex polygon that contains the edge closed region, which can eliminate the interference of the concave part in the edge closed region on subsequent image cropping.

[0074] For each convex hull region, calculate its minimum bounding rectangle. In some embodiments, the first coordinates (x_min, y_min) of the bounding rectangle are the minimum x-coordinate and minimum y-coordinate of the convex hull vertices, and the second coordinates (x_max, y_max) are the maximum x-coordinate and maximum y-coordinate of the convex hull vertices. The width of the bounding rectangle... ,high In a visual image, the image is cropped using the smallest bounding rectangle of the convex hull region as the boundary. The cropped image region is denoted as a candidate sub-image and labeled with the corresponding edge closed region identifier (e.g., candidate sub-image A corresponds to edge closed region A).

[0075] In this embodiment, by forming edge pixel groups from candidate edge pixels with connectivity, and determining the edge contour based on neighboring edge pixels, it is possible to capture the continuous edge contours in the image more accurately. By determining the Euclidean distance between the starting and ending coordinates of the edge contour, the edge closure region is determined, effectively filtering out the truly closed target region. By constructing the convex hull and the bounding rectangle, the region of the candidate sub-image is defined, accurately surrounding the edge pixels of the power equipment, avoiding surrounding too much background region, and accurately determining the candidate sub-image.

[0076] In an exemplary embodiment, the power equipment feature library includes standard contours and standard contour angles of multiple power equipment. Based on the contour curvature features of multiple candidate sub-images and a preset power equipment feature library, determining visual sub-images for each of the multiple power equipment includes: obtaining multiple feature contour segments for each of the multiple candidate sub-images based on their respective contour curvature features; for each power equipment, determining the contour matching degree between the multiple candidate sub-images and the standard contour of the corresponding power equipment based on the angle between adjacent feature contour segments and the standard contour angle of the corresponding power equipment; and selecting candidate sub-images with a contour matching degree greater than a preset matching degree threshold as the visual sub-images of the corresponding power equipment.

[0077] In this process, edge detection is performed on each candidate sub-image to obtain the corresponding edge contour L. The edge contour L is composed of a continuous sequence of pixels. The composition is (n is the total number of pixels in the edge contour L); then, curve fitting is used to calculate the value of each pixel on the edge contour L. curvature value Specifically, a three-point method can be used to fit the local arc: for each Select the two adjacent pixels before and after it. By fitting the arc containing these 5 points using the least squares method, the curvature formula of the arc is:

[0078]

[0079] in, For pixels Coordinates in the candidate sub-image.

[0080] For the pixels at both ends of the edge contour L (i<2 or i>n-2), the curvature value is calculated by fitting an arc with three adjacent points. The curvature values ​​of all pixels are arranged in order of their position on the contour to form the curvature sequence of the candidate sub-image. This refers to the contour curvature feature of the candidate sub-image.

[0081] The terminal sets a curvature abrupt change threshold based on the typical curvature variation range of the target profile of the power equipment. Traverse the curvature sequence K and calculate the difference between two adjacent curvature values. ,like Then determine the pixel point The curvature value abrupt change points are identified; the coordinates (x_m, y_m) of all curvature value abrupt change points (where m is the abrupt change point number) are recorded to form a set of abrupt change points. (t is the total number of mutation points). The contour segment between two adjacent mutation points (i.e., from...) arrive A continuous contour pixel (i=0) is marked as a feature contour segment. Then, starting from the outline starting point... To the first mutation point The first characteristic contour segment is formed; if there is no abrupt change at the end of the contour (i=n-1), then... Then from the last mutation point To the end of the outline This forms the final feature contour segment. Each feature contour segment is labeled with its corresponding curvature type, such as low curvature segment, medium curvature segment, etc. Ultimately, all feature contour segments form the feature contour segment group of the candidate sub-image. ( (Number of feature contour segments).

[0082] The power equipment feature library includes standard contour feature information of power equipment, which includes the standard contour and the included angle of the standard contour. The included angle of the standard contour can be a sequence of standard angles of the power equipment.

[0083] For each candidate sub-image, the terminal obtains each feature contour segment of the corresponding candidate sub-image. (s) The starting coordinates of [0, n-1] coordinates of the endpoint ,calculate Direction vector For two adjacent feature contour segments and (s∈[0, n-2]), based on its direction vector and The included angle is calculated using the vector dot product formula. Its formula is: .in, For vectors and dot product, , Let be the magnitude of the vector. If the calculated result is a non-real number (denominator is 0, i.e., segment length is 0, which is considered an invalid segment), then the candidate sub-image is directly excluded; otherwise, the included angles of all adjacent feature contour segments are used to form an included angle sequence. Retrieve the standard profile angle of the corresponding equipment type from the power equipment feature library. (n is the number of standard key segments), the profile matching degree M is calculated using the included angle deviation rate, and its formula is: Where k is the number of included angles in the standard profile (e.g., k=2 for towers, k=2 for insulators). M is the t-th angle of the standard contour. The value of M ranges from 0 to 1. The closer it is to 1, the higher the contour matching degree.

[0084] The terminal compares the contour matching degree M of multiple candidate sub-images with a preset matching degree threshold. (like ),exist In the case of [the specific situation], the corresponding candidate sub-image is used as the visual sub-image of the corresponding power equipment.

[0085] In some embodiments, determining the angle between adjacent feature contour segments includes: for each candidate sub-image, multiple feature contour segments Calculate each feature contour segment (s is the segment number, 0≤s≤t) Contour proportion The formula is: .in, Feature contour segment pixel length (e.g.) (The length is 500 pixels) This represents the total pixel length of all feature contour segments in the candidate sub-image. If... If the feature contour segment is determined to be a key feature contour segment, all key feature contour segments are arranged in their original order to form a key feature contour segment group for each candidate sub-image. (m is the number of critical segments) ).in, This represents the percentage threshold, which can be set according to the characteristics and importance of the power equipment target, and the threshold varies for different equipment types.

[0086] Accordingly, the terminal determines the angle between adjacent key feature contour segments, and determines the contour matching degree between multiple candidate sub-images and the standard contour of the corresponding power equipment based on the angle between adjacent key feature contour segments and the standard contour angle of the corresponding power equipment.

[0087] In this embodiment, multiple feature contour segments are extracted by the contour curvature features of candidate sub-images to deeply explore contour details. The contour matching degree is determined by comparing the angle between adjacent feature contour segments with the standard contour angle. Candidate sub-images with a contour matching degree greater than a preset threshold are identified as visual sub-images of the corresponding power equipment, ensuring the accuracy of the selected visual sub-images.

[0088] In an exemplary embodiment, selecting candidate sub-images with a contour matching degree greater than a preset matching degree threshold from among multiple candidate sub-images as visual sub-images of the corresponding power equipment includes: selecting candidate sub-images with a contour matching degree greater than a preset matching degree threshold from among multiple candidate sub-images as target sub-images; obtaining convex vertices of the contour based on the contour vertex coordinates of the target sub-image; verifying the number and spacing of the convex vertices with the standard vertex topology of the corresponding power equipment; and, if the verification passes, using the target sub-image as the visual sub-image of the corresponding power equipment.

[0089] To further improve the recognition accuracy of visual sub-images, candidate sub-images with contour matching scores greater than a preset matching score threshold are selected as target sub-images. The vertex coordinates of all edge contours in the target sub-images are then extracted, i.e., the contour vertices. (p is the number of vertices). In some embodiments, the contour vertices must satisfy the curvature value k of the line connecting adjacent vertices > 0.03.

[0090] The convex vertices of the contour are determined using the coordinates of the contour vertices. Specifically, for each contour vertex... (1≤i≤p-1), take its previous vertex. and postorder vertices Calculate vector , Through cross product If Cross > 0 (counter-clockwise rotation), then... It is a convex vertex; if Cross≤0 (clockwise or collinear), then Concave vertices are removed; the final set of convex vertices is obtained. (q is the number of convex vertices).

[0091] The terminal retrieves the standard vertex topology structure corresponding to the equipment type from the power equipment contour feature library, including: the number of standard convex vertices. (such as towers) =4, corresponding to the four corner points of the rectangular body; insulator =16, corresponding to 2 convex vertices for each of the 8 disks; wires =2, corresponding to the endpoints at both ends of the linear path); standard convex vertex spacing ratio (For example, the ratio of the distance between adjacent convex vertices of a tower is height:width = 3:2, and the ratio of the distance between adjacent convex vertices of an insulator disk is 1:1). If q and deviation rate Then it passes the quantity verification. Calculate the set of convex vertices. Euclidean distance between adjacent convex vertices Calculate the actual spacing ratio ,like If the target sub-image passes both quantity and spacing verification, it is used as the visual sub-image of the corresponding power equipment. If the verification fails, the process returns to the step of re-extracting feature contour segments.

[0092] In some embodiments, before obtaining the convex vertices of the contour based on the contour vertex coordinates of the target sub-image, it further includes: obtaining the area Area_enclosed surrounded by the edge contour in the target sub-image, that is, the area of the edge closed region, and the actual pixel area Area_actual inside the edge contour, that is, the pixels of the electronic device, excluding background noise, and determining the filling rate F = Area_actual / Area_enclosed. Set the filling rate threshold F_threshold according to the entity characteristics of the power equipment. For example, for a pole tower: the entity area is large, F_threshold = 0.6 (a filling rate exceeding 60% is valid); for an insulator: the disc is the entity and the connecting section is relatively thin, F_threshold = 0.4; for a wire: a linear entity, F_threshold = 0.3. Compare F with the F_threshold of the corresponding device type. If F ≥ F_threshold, retain the suspected target sub-image; if F < F_threshold, it is determined that there is too much background inside the contour (such as tree shadows, sky regions) and it is excluded; the retained suspected target sub-images are used as the target sub-images to be verified G_to_be_verified = [G_to_be_verifiedA, G_to_be_verifiedB,...].

[0093] Correspondingly, the terminal obtains the convex vertices of the contour according to the contour vertex coordinates of the verified target sub-image.

[0094] In this embodiment, the key convex vertices of the power equipment contour are accurately located through the contour matching degree and the contour vertex coordinates. The number and spacing of the convex vertices are verified to ensure the consistency between the target sub-image and the standard power equipment, and accurate recognition of the visual sub-image of the power equipment is achieved.

[0095] In an exemplary embodiment, spatial coordinate registration is performed on the laser point cloud data and the visual sub-images of multiple power equipment respectively to obtain the target point cloud data of multiple power equipment respectively, including: performing coordinate transformation on the laser point cloud data according to the conversion model between the pre-calibrated visual image coordinate system and the point cloud coordinate system to obtain the coordinates of multiple laser points in the visual image coordinate system; for any power equipment, determining multiple target laser points within the pixel coordinate range of the visual sub-image of the corresponding power equipment according to the coordinates of the multiple laser points in the visual image coordinate system, and using the multiple target laser points as the target point cloud data of the corresponding power equipment.

[0096] Among them, the conversion model can be obtained through pre-calibration. In some embodiments, the visual image coordinate system is set as a two-dimensional plane coordinate system, the point cloud coordinate system is a three-dimensional rectangular coordinate system, and the conversion model is established based on the internal and external parameters of the visual sensor. The internal parameters are such as the focal length f, the principal point coordinates ( ), and the external parameters are such as the installation position coordinates (X_cam, Y_cam, Z_cam) and the installation attitude angles (α_cam, β_cam, γ_cam) of the visual sensor relative to the body of the power inspection UAV. The conversion model is as follows:

[0097]

[0098] Where (u, v) are the pixel coordinates in the visual image coordinate system. The coordinates are the Z coordinates (in meters) of the corresponding points in the laser point cloud coordinate system, while (X, Y, Z) are the coordinates in the unified coordinate system after transformation.

[0099] The terminal can use a transformation model to convert laser point data to a visual image coordinate system, obtaining the coordinates of each laser point in the visual image coordinate system.

[0100] The terminal determines the pixel coordinate range of each power device's visual sub-image within the visual image. Based on the coordinates of multiple laser points in the visual image coordinate system, it determines whether the coordinates of these laser points fall within the pixel coordinate range of the visual sub-image. Laser points whose coordinates fall within the pixel coordinate range of any power device's visual sub-image are designated as target laser points. The laser point cloud data of these target laser points is then used as the target point cloud data for the corresponding power device. Therefore, the target point cloud data for each of the multiple power devices can be obtained.

[0101] For example, the intrinsic parameters of a vision sensor are: focal length f = 3000 pixels, principal point coordinates ( = (2048, 1080) pixels; extrinsic parameters: mounting position coordinates (X_cam, Y_cam, Z_cam) = (0.5, 0, 0), mounting attitude angle = The pixel coordinates of the visual sub-image of tower A are u∈[2500, 3500], v∈[500, 1800]; the pixel coordinates of the visual sub-image of insulator B are u∈[3500, 4500], v∈[1200, 1800]; the pixel coordinates of the visual sub-image of conductor C are u∈[2000, 4000], v∈[800, 1000]. Taking the coordinates of a certain laser point P (10.00m, 2.00m, 15.00m) as an example, this laser point is located 10m east, 2m north, and 15m above ground relative to the power inspection drone. The coordinates are transformed to the visual image coordinate system using a transformation model. )coordinate:

[0102]

[0103]

[0104] The coordinates of laser point P in the visual image coordinate system are (3948, 1480), falling within the pixel coordinate range of the visual sub-image of insulator B. After classifying all laser points using the above method, outliers are removed from the target laser points corresponding to multiple power devices. For example, statistical outlier detection methods, such as Euclidean distance clustering based on KD trees, can be used to identify and remove points whose Euclidean distance from the cluster center is greater than a preset distance (e.g., 0.1m). After removing outliers, the target point cloud data corresponding to each power device is obtained.

[0105] In this embodiment, the laser point cloud data is converted to the visual image coordinate system through a pre-calibrated conversion model, realizing multi-source data fusion. By utilizing the rich texture information of the visual image and the precise spatial location information of the laser point cloud, the position of each laser point in the visual image coordinate system is accurately determined. Combined with the pixel coordinate range of the visual sub-images of multiple power devices, the target point cloud data related to a specific power device is accurately extracted.

[0106] In an exemplary embodiment, determining visual sub-images for multiple power devices based on visual images and a preset power device feature library includes: acquiring environmental data collected by a power inspection drone within a power inspection area; the environmental data includes haze data, illumination data, and dust concentration data; optimizing the visual images based on the environmental data; and determining visual sub-images for multiple power devices based on the optimized visual images and the preset power device feature library.

[0107] In particular, when the environment of power inspection is complex, such as in foggy, bright light and dusty weather, the images captured by the visual sensor are prone to problems such as reduced target outline clarity and pixel grayscale value distortion, resulting in a large error in the distance calculated based on pixel size and conversion ratio. Therefore, this application proposes to collect environmental data to optimize the visual images accordingly, so as to improve the accuracy of multi-target distance measurement of power equipment.

[0108] The visual image is optimized based on environmental data, including: contrast enhancement processing of the visual image based on haze data to obtain a first visual image with enhanced contrast; exposure interference and equalization of the first visual image based on illumination data to obtain a second visual image; and noise suppression and edge enhancement of the second visual image based on dust concentration data to obtain an optimized visual image.

[0109] Specifically, the contrast enhancement processing involves constructing a haze concentration distribution matrix based on the number of rows and columns of pixels in the haze data and visual images within the power inspection area. (Dimensions M×N); Haze data includes haze particle number concentration. (Unit: pieces / ) Haze particle size distribution (unit: ) and haze extinction coefficient (unit: Based on the haze concentration distribution matrix combined with the grayscale value of each pixel in the visual image; Determine the haze impact correction value for each pixel. Based on the haze impact correction value combined with the grayscale mean of all pixels in the neighborhood of each pixel in the visual image. Determine the contrast enhancement baseline value for each pixel. Based on the contrast enhancement baseline combined with the gradient value at each pixel location using the haze concentration distribution matrix. Determine the target contrast adjustment value for each pixel. The grayscale value of each pixel in the visual image is replaced and updated based on the target contrast adjustment value to obtain the first visual image with enhanced contrast.

[0110] Optionally, a Gaussian spatial distribution model can be used to determine the distribution of haze concentration within the inspection area. The model formula is as follows: ;in, pixels in a visual image The haze extinction coefficient of the location, The haze extinction coefficient at the center of the power inspection area. Here are the center pixel coordinates of the power inspection area, and a and b are distribution coefficients (based on the particle size distribution of haze particles). Sure, The larger the number of smog particles, the larger a and b become); With haze particle size distribution The pixel value is calculated based on the extinction coefficient of haze using Mie scattering theory. Equivalent particle number concentration at The formula is: ;in, For pixels Haze particle size at the location (based on The normal distribution is randomly generated, with a deviation. ); each pixel place , , Integrate into matrix elements This forms a haze concentration distribution matrix. .

[0111] The terminal uses the pixel grayscale attenuation caused by smog and the smog extinction coefficient as a reference. Proportional to the grayscale attenuation model of haze, the attenuation model formula is as follows: ;in, Let L be the pixel grayscale value after haze attenuation, and L be the inspection distance. The haze impact correction value is determined based on the difference between the initial grayscale value and the attenuated grayscale value, and the formula is as follows: ; The value ranges from 0 to 255. A larger value indicates a more severe impact of haze on the pixel, requiring a greater correction. Grayscale mean. The formula is: Specifically, for boundary pixels, when x=0, x+1 is set to 1; when y=2159, y-1 is set to 2158, using mirror completion to avoid boundary effects. Contrast enhancement baseline value. The formula is: This normalizes the value to the range of 0-255, ensuring that the baseline value is consistent with the grayscale value dimension. The larger the value, the greater the contrast of the pixel needs to be improved.

[0112] Gradient value at each pixel (x, y) The formula for calculating the target comparison adjustment value, which reflects the spatial rate of change in haze concentration, is as follows: ;in, For the entire matrix The maximum gradient magnitude (normalized gradient value to the range of 0-1) is used to ensure that the adjustment value does not exceed 255 (if the calculation result exceeds 255, then take 255).

[0113] The specific process of grayscale value replacement and update includes: adjusting the grayscale value of each pixel linearly based on the target contrast adjustment value, using the following formula: ;in, To enhance the pixel grayscale values ​​of the first visual image, The adjustment coefficient is fixed at 0.8, calibrated experimentally to avoid excessive single adjustment that could cause grayscale overflow. and This is used to constrain grayscale values ​​to a valid range of 0-255; then, calculations are performed for each pixel. If the result is greater than 255, then 255 is used; if it is less than 0, then 0 is used, ensuring no invalid grayscale values. After all pixels have completed their grayscale value updates, they are arranged in their original row and column order to form the first visual image with enhanced contrast, while also satisfying the overall image contrast requirements. ,in, , These are the maximum and minimum grayscale values ​​of the first visual image, respectively.

[0114] The illumination data includes the incident light intensity value I(x, y) (unit: lux) for each pixel, the illumination direction angle value θ(x, y) (unit: °, with 0° to the right horizontally and counterclockwise rotation as the positive direction), and the illumination color temperature value. (x, y) (unit: K). Exposure interference and equalization are specifically implemented by constructing an illumination distribution matrix for the first visual image based on the incident light intensity value, illumination direction angle value, and illumination color temperature value corresponding to each pixel. The first visual image is then divided into multiple image sub-regions based on the illumination distribution matrix. An exposure interference region is further divided based on the regional illumination difference coefficient of each sub-region, resulting in an exposure interference region and a normal illumination region. The regional illumination difference coefficient is the ratio of the standard deviation to the average value of the incident light intensity values ​​of all pixels within the image sub-region. The exposure interference region is then combined with the elements of each pixel in the illumination distribution matrix within that region. The exposure compensation amount for each pixel is determined, and the original grayscale value of each pixel in the exposure interference area is initially adjusted based on the exposure compensation amount to obtain the initially adjusted exposure grayscale value. Based on the average value of the incident light intensity of the pixels in the normal lighting area, the regional lighting reference value is determined, and the exposure grayscale value is further corrected based on the regional lighting reference value and the incident light intensity value of each pixel in the exposure interference area to obtain the balanced grayscale value. The balanced grayscale value of the exposure interference area and the original grayscale value of the normal lighting area are stitched together according to the original pixel position of the first visual image to obtain the second visual image.

[0115] Optionally, the terminal normalizes the incident light intensity value at each pixel (x, y). Standardized illumination direction angle value Standardized light color temperature value Integrate into matrix elements To form a light distribution matrix .

[0116] Based on the dispersion characteristics of locally overexposed areas under strong light, the terminal divides the first visual image into multiple image sub-regions, which are numbered as follows: The exposure interference area is determined based on the regional illumination difference coefficient of each sub-region, that is, for each image sub-region Extract the incident light intensity values ​​of all pixels within the region. Calculate the regional illumination difference coefficient (That is, the ratio of the standard deviation to the mean of the incident light intensity values ​​of all pixels in a sub-region of the image). A higher value indicates a more uneven illumination distribution within the image sub-region, and a higher likelihood of exposure interference. A pre-set threshold for the regional illumination difference coefficient is used. (This can be calibrated through numerous experiments in strong light scenarios), if If so, the image sub-region is determined to be an exposure interference region; if If the image sub-region is found to be under normal lighting, then the coordinates of all exposure-disrupted areas and under normal lighting areas are recorded to form a region division result table.

[0117] For each pixel within the exposure interference area, the terminal performs an analysis based on its position within the illumination distribution matrix. The incident light intensity value and the preset ideal incident light intensity Calculate the exposure compensation amount Its formula is: ,in The original grayscale value (0-255) of the pixel (x, y) in the first visual image. ;when hour, To achieve overexposure grayscale reduction compensation; when hour, No compensation is needed. After determining the exposure compensation amount, use that amount as the initially adjusted exposure grayscale value. ,Right now ,in For rounding functions, ensure Within the range of 0-255 (if the calculation result is less than 0, take 0; if it is greater than 255, take 255), until the initial adjustment of all pixels in the exposure interference area is completed, forming the image of the exposure interference area after initial adjustment.

[0118] The terminal extracts the incident light intensity values ​​I(x, y) of all pixels within the normal illumination area. (obtained through inverse standardization), and based on this, the regional illumination reference value is calculated. Its formula is ,in This represents the average value of all pixels I(x, y) within the normal illumination area; for each pixel (x, y) within the exposure interference area, based on... The exposure grayscale value is then corrected a second time using its own I(x,y), and the second correction coefficient is determined. Its formula is: This coefficient reflects the proportion of difference between the actual lighting and normal lighting of a pixel. The larger, The smaller the value, the greater the correction. Based on this, the initial adjustment will be... and Multiplying them together yields the equalized grayscale value after secondary correction. And in order to ensure Within the range of 0-255 (if the calculation result is <0, take 0; if it is >255, take 255), until the secondary correction of all pixels in the exposure interference area is completed, forming the balanced gray value of the corrected exposure interference area.

[0119] The terminal constructs a pixel coordinate mapping table for the first visual image based on the equalized grayscale values ​​of the exposure interference area and the original grayscale values ​​of the normal illumination area. This table records the region type (exposure interference area / normal illumination area) for each pixel (x, y). If (x, y) belongs to the exposure interference area, the terminal calls the corresponding pixel's... If (x, y) falls within the normally lit area, then the function for that pixel is called. Furthermore, for the boundary pixels between the exposure interference area and the normal lighting area (i.e., pixels that simultaneously belong to the neighborhood of both areas), the average grayscale value of three consecutive pixels on both sides of the boundary is calculated, and the grayscale value of the boundary pixels is fine-tuned. The formula is as follows: ;in, The grayscale value of the pixels within the region. The original boundary pixel grayscale value. The grayscale values ​​of adjacent pixels are used to avoid obvious abrupt changes in grayscale at the boundaries. All pixels are filled with the corresponding grayscale values ​​according to the coordinate mapping table. After stitching, a second visual image is formed, so that the overall grayscale distribution range of the image is 20-80 (avoiding excessive darkness or brightness), and the grayscale difference between the boundary of the exposure interference area and the normal lighting area is ≤5 (which can be verified by statistically analyzing the grayscale values ​​of the boundary pixels).

[0120] Noise suppression and edge enhancement are specifically performed by combining the grayscale value of each pixel in the second visual image with dust concentration data to determine the dust influence coefficient corresponding to each pixel, and constructing a dust concentration influence coefficient matrix based on the dust influence coefficient. Based on the dust concentration influence coefficient matrix and a preset dust noise judgment threshold, the location of the pixel in the second visual image affected by dust concentration is determined, and a dust noise localization matrix is ​​constructed based on the pixel location. Based on the dust noise localization matrix, the grayscale values ​​of the located dust noise pixels in the second visual image are corrected to obtain a noise-suppressed image after dust noise suppression. Based on the noise-suppressed image and the dust concentration influence coefficient matrix, the edge enhancement weight corresponding to each pixel is determined, and the pixel grayscale values ​​of the noise-suppressed image are adjusted based on the edge enhancement weight to obtain an optimized visual image.

[0121] Optionally, the terminal uses the acquired second visual image and dust concentration data Based on the interference pattern of dust particles on pixel grayscale values—that is, dust particles cause random fluctuations in pixel grayscale values, and the fluctuation amplitude is positively correlated with dust concentration—the dust influence coefficient for each pixel is calculated. (The value ranges from 0 to 1; the larger the value, the more severe the dust interference to the pixel.) The calculation formula is as follows: ;in Let (x, y) be the grayscale value of pixel (x, y) in the second visual image. It is the grayscale mean of all pixels in the 3×3 neighborhood of pixel (x, y) (the neighborhood boundaries are filled with mirror images). (The preset maximum dust concentration covers extreme dust scenarios). This represents the maximum grayscale value. For each pixel (x, y), take its 3×3 neighborhood and calculate the average grayscale value of the neighborhood. Its formula is: Finally, the (x, y) values ​​of each pixel are... As matrix elements, they form a dust concentration influence coefficient matrix with dimensions M×N (e.g., 4096×2160). .

[0122] like If it is, then it is marked as a dust noise pixel; if If a pixel is marked as normal, it is used to locate the dust noise pixel. The marking result of each pixel is used as a matrix element to form the dust noise localization matrix. .

[0123] Based on the determined dust noise localization matrix, the neighborhood weighted mean correction method is used to calculate the corrected gray value for each dust noise pixel (x, y) based on the gray values ​​of the normal pixels within its 5×5 neighborhood. Its formula is: ;in, The value is the label (0 or 1) of the neighboring pixels, and the denominator is the number of normal pixels in the neighborhood (ensure the denominator is not 0; if there are no normal pixels in the neighborhood, expand to a 7×7 neighborhood). For normal pixels, directly retain their grayscale value from the second visual image, i.e. The process continues until all pixels have completed grayscale value correction, resulting in a noise-suppressed image that satisfies the condition that the noise standard deviation is less than or equal to a preset value (which can be calculated by statistically analyzing the grayscale fluctuations in the smoothed areas of the image).

[0124] Based on the obtained noise-suppressed image and dust concentration influence coefficient matrix, and according to edge enhancement weights... (Values ​​range from 1 to 1.5; larger values ​​indicate a greater need for enhancement of the pixel.) Positively correlated with the dust influence coefficient, its formula is determined as follows: Here, 0.5 is the enhancement coefficient, which was experimentally calibrated to avoid over-enhancement that could lead to noise reproduction. Next, Sobel edge detection was performed on the noise-suppressed image, and the gradient magnitude of each pixel was calculated. And set an edge detection threshold. =30 (Medium noise level): If > If it is determined to be an edge pixel, edge enhancement is required; if ≤ Pixels deemed non-edge are not enhanced. Instead, grayscale values ​​are adjusted for edge pixels: If the result is greater than 255, then take 255; if the result is less than 0, then take 0. For non-edge pixels: The process continues until all pixels have completed grayscale adjustment, forming an optimized visual image that satisfies the condition that the edge gradient magnitude is greater than or equal to a preset value.

[0125] Accordingly, the terminal determines the visual sub-images of multiple power devices based on the optimized visual images and the preset power equipment feature library.

[0126] In this embodiment, by acquiring environmental data such as haze data, illumination data, and dust concentration data and optimizing the visual image, the effects of haze, strong light, and dust can be effectively removed, restoring the clarity and details of the image. This makes the outline, color, and other features of the power equipment more obvious, breaking through the image degradation bottleneck caused by complex and multi-environmental interference, ensuring the integrity and identifiability of the target features of the power equipment, and improving the image quality in a step-by-step manner. Ultimately, this lays a reliable foundation for subsequent target sub-image extraction and distance measurement.

[0127] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0128] Based on the same inventive concept, this application also provides a power inspection multi-target distance measurement device for implementing the aforementioned power inspection multi-target distance measurement method. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more power inspection multi-target distance measurement device embodiments provided below can be found in the limitations of the power inspection multi-target distance measurement method described above, and will not be repeated here.

[0129] In one exemplary embodiment, such as Figure 4As shown, a multi-target distance measurement device 400 for power line inspection is provided, comprising: an acquisition module 420, a first determination module 440, a registration module 460, and a second determination module 480, wherein:

[0130] The acquisition module 420 is used to acquire visual images and laser point cloud data collected by the power inspection drone in the power inspection area;

[0131] The first determining module 440 is used to determine the visual sub-images of multiple power devices based on the visual images and a preset power device feature library;

[0132] Registration module 460 is used to perform spatial coordinate registration between laser point cloud data and visual sub-images of multiple power devices to obtain target point cloud data of multiple power devices.

[0133] The second determining module 480 is used to determine the distance measurement results of multiple power devices within the power inspection area based on the target point cloud data.

[0134] The aforementioned multi-target distance measurement device for power line inspection acquires visual images and laser point cloud data collected by power line inspection drones within the inspection area. This enables collaborative acquisition guidance of dual-modal data, resulting in highly targeted data acquisition that overcomes the inherent limitations of single visual data in complex environments. Based on the visual images and a pre-defined power equipment feature library, it determines individual visual sub-images for multiple power equipment, enabling precise extraction of the areas where the power equipment is located within the visual images and eliminating irrelevant background interference. Spatial coordinate registration is performed between the laser point cloud data and the individual visual sub-images of the multiple power equipment to obtain target point cloud data for each power equipment. This integrates the precise positioning information of the power equipment from the visual images while retaining the advantages of laser point cloud data—its immunity to interference from complex environments and high distance measurement accuracy—overcoming the image distortion limitations of single visual sensors in complex environments. Based on the target point cloud data, the device determines the distance measurement results for multiple power equipment within the inspection area, achieving high-precision distance measurement of power equipment even in complex inspection environments. This ensures the reliability of power line inspection data and improves the accuracy of subsequent hazard assessment.

[0135] In one embodiment, based on the visual image and a preset power equipment feature library, visual sub-images of multiple power equipment are determined. The first determining module 440 is further configured to: perform edge detection on the visual image to obtain edge detection results; determine candidate edge pixels based on the gray-level gradient difference between each edge pixel and its neighboring pixels in the edge detection results; determine multiple candidate sub-images in the visual image based on the candidate edge pixels; and determine the visual sub-images of multiple power equipment based on the contour curvature features of the multiple candidate sub-images and the preset power equipment feature library.

[0136] In one embodiment, based on candidate edge pixels, multiple candidate sub-images are determined in the visual image. The first determining module 440 is further configured to: take multiple candidate edge pixels with connectivity as edge pixel groups to obtain multiple edge pixel groups; determine the edge contours corresponding to each of the multiple edge pixel groups based on the neighboring edge pixels of the multiple candidate edge pixels in each edge pixel group; if the Euclidean distance between the start coordinates and end coordinates of any edge contour is less than or equal to a preset distance, take the region enclosed by the corresponding edge contour as an edge closed region; construct a convex hull for the edge closed region and determine the bounding rectangle of the constructed convex hull region; and take the image region where the bounding rectangle is located in the visual image as a candidate sub-image.

[0137] In one embodiment, the power equipment feature library includes standard contours and standard contour angles of multiple power equipment; based on the contour curvature features of multiple candidate sub-images and the preset power equipment feature library, visual sub-images of each of the multiple power equipment are determined. The first determining module 440 is further configured to: obtain multiple feature contour segments of each of the multiple candidate sub-images based on the contour curvature features of each of the multiple candidate sub-images; for each power equipment, determine the contour matching degree between the multiple candidate sub-images and the standard contour of the corresponding power equipment based on the angle between adjacent feature contour segments and the standard contour angle of the corresponding power equipment; and take the candidate sub-images with a contour matching degree greater than a preset matching degree threshold as the visual sub-images of the corresponding power equipment.

[0138] In one embodiment, candidate sub-images with a contour matching degree greater than a preset matching degree threshold among multiple candidate sub-images are used as visual sub-images of the corresponding power equipment. The first determining module 440 is further configured to: use candidate sub-images with a contour matching degree greater than a preset matching degree threshold among multiple candidate sub-images as target sub-images; obtain the convex vertices of the contour based on the contour vertex coordinates of the target sub-image; verify the number and spacing of the convex vertices with the standard vertex topology of the corresponding power equipment; and, if the verification is successful, use the target sub-image as the visual sub-image of the corresponding power equipment.

[0139] In one embodiment, the laser point cloud data and the visual sub-images of multiple power devices are spatially registered to obtain target point cloud data for each power device. The registration module 460 is further configured to: perform coordinate transformation on the laser point cloud data according to a pre-calibrated transformation model between the visual image coordinate system and the point cloud coordinate system to obtain the coordinates of multiple laser points in the visual image coordinate system; for any power device, based on the coordinates of the multiple laser points in the visual image coordinate system, determine multiple target laser points within the pixel coordinate range of the visual sub-image of the corresponding power device, and use the multiple target laser points as the target point cloud data of the corresponding power device.

[0140] In one embodiment, visual sub-images of multiple power devices are determined based on visual images and a preset power device feature library. The first determining module 440 is further configured to: acquire environmental data collected by the power inspection drone in the power inspection area; the environmental data includes haze data, light data and dust concentration data; optimize the visual images based on the environmental data; and determine visual sub-images of multiple power devices based on the optimized visual images and the preset power device feature library.

[0141] Each module in the aforementioned multi-target distance measurement device for power line inspection can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0142] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a multi-target distance measurement method for power line inspection. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0143] Those skilled in the art will understand that Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0144] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0145] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0146] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0148] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0149] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0150] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for measuring distance between multiple targets during power line inspection, characterized in that, The method includes: Acquire visual images and laser point cloud data collected by power inspection drones within the power inspection area; Based on the visual images and a preset power equipment feature library, visual sub-images for each of the multiple power equipment are determined. Spatial coordinate registration is performed between the laser point cloud data and the visual sub-images of each of the multiple power devices to obtain the target point cloud data of each of the multiple power devices. Based on the target point cloud data, the distance measurement results of multiple power devices within the power inspection area are determined.

2. The method according to claim 1, characterized in that, The step of determining visual sub-images for multiple power devices based on the visual images and a preset power device feature library includes: Edge detection is performed on the visual image to obtain the edge detection results; Candidate edge pixels are determined based on the grayscale gradient difference between each edge pixel and its neighboring pixels in the edge detection results; Based on the candidate edge pixels, a plurality of candidate sub-images are determined in the visual image; Based on the contour curvature features of multiple candidate sub-images and a pre-defined power equipment feature library, visual sub-images for each of the multiple power equipment are determined.

3. The method according to claim 2, characterized in that, The step of determining multiple candidate sub-images in the visual image based on the candidate edge pixels includes: Multiple candidate edge pixels with connectivity are grouped into edge pixel groups to obtain multiple edge pixel groups; Based on the neighboring edge pixels of multiple candidate edge pixels in each edge pixel group, determine the edge contours corresponding to each of the multiple edge pixel groups; If the Euclidean distance between the starting and ending coordinates of any edge contour is less than or equal to a preset distance, the area enclosed by the corresponding edge contour is taken as the edge closed area. Convex hull construction is performed on the edge-closed region, and the bounding rectangle of the constructed convex hull region is determined; The image region containing the bounding rectangle in the visual image is used as a candidate sub-image.

4. The method according to claim 2, characterized in that, The power equipment feature library includes standard contours and standard contour angles of multiple power equipment; the step of determining the visual sub-images of multiple power equipment based on the contour curvature features of multiple candidate sub-images and the preset power equipment feature library includes: Based on the contour curvature features of each of the multiple candidate sub-images, multiple feature contour segments are obtained for each of the multiple candidate sub-images; For each power device, based on the angle between adjacent feature contour segments and the standard contour angle of the corresponding power device, the contour matching degree between multiple candidate sub-images and the standard contour of the corresponding power device is determined. Candidate sub-images with a contour matching degree greater than a preset matching degree threshold are selected as visual sub-images of the corresponding power equipment.

5. The method according to claim 4, characterized in that, The step of selecting candidate sub-images with a contour matching degree greater than a preset matching degree threshold as visual sub-images of the corresponding power equipment includes: Among multiple candidate sub-images, the candidate sub-image whose contour matching degree is greater than a preset matching degree threshold is taken as the target sub-image; Based on the contour vertex coordinates of the target sub-image, the convex vertices of the contour are obtained; The number and spacing of the convex vertices are verified against the standard vertex topology of the corresponding power equipment. If the verification is successful, the target sub-image is used as the visual sub-image of the corresponding power equipment.

6. The method according to claim 1, characterized in that, The step of spatially registering the laser point cloud data and the visual sub-images of each of the multiple power devices to obtain target point cloud data for each of the multiple power devices includes: Based on a pre-defined transformation model between the visual image coordinate system and the point cloud coordinate system, the laser point cloud data is transformed to obtain the coordinates of multiple laser points in the visual image coordinate system. For any power device, based on the coordinates of multiple laser points in the visual image coordinate system, determine multiple target laser points within the pixel coordinate range of the visual sub-image of the corresponding power device, and use the multiple target laser points as the target point cloud data of the corresponding power device.

7. The method according to claim 1, characterized in that, The step of determining visual sub-images for multiple power devices based on the visual images and a preset power device feature library includes: The system acquires environmental data collected by the power inspection drone within the power inspection area; the environmental data includes haze data, light intensity data, and dust concentration data. The visual image is optimized based on the environmental data; Based on the optimized visual images and the preset power equipment feature library, visual sub-images for multiple power equipment are determined.

8. A multi-target distance measurement device for power line inspection, characterized in that, The device includes: The acquisition module is used to acquire visual images and laser point cloud data collected by the power inspection drone in the power inspection area; The first determining module is used to determine the visual sub-images of multiple power devices based on the visual image and a preset power device feature library; The registration module is used to register the laser point cloud data and the visual sub-images of multiple power devices in spatial coordinates to obtain the target point cloud data of each of the multiple power devices. The second determining module is used to determine the distance measurement results of multiple power devices within the power inspection area based on the target point cloud data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data fusion method, system and equipment of power transmission and transformation equipment and medium

    CN120599415A

  • Method and device for detecting obstacles on power grid inspection route, electronic equipment and computer readable storage medium

    CN121147468A

  • Method and device for detecting abnormity of electric power inspection image, electronic equipment and computer readable storage medium

    CN121191019A

  • Power-related hidden danger detection method and device, terminal equipment and storage medium

    CN121434728A

  • Image edge matching degree calculation and inspection point position deviation correction control method and system

    CN121437923A