Method for measuring distance between excavator and high-voltage transmission line
Through the Zhang Zhengyou marking method and infrared rangefinder combined with millimeter-wave radar, the YOLOV5 and K-Means algorithms are used to solve the problem of limited applicable scenarios for measuring the distance between excavators and high-voltage transmission lines in the prior art, and real-time and accurate measurement results are achieved.
Patent Information
- Application Number
- PCT/CN2024/108002
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-29
- Filing Date
- 2024-07-26
- Publication Date
- 2025-09-04
AI Technical Summary
When measuring the distance between excavator and high-voltage transmission line, the applicable scenarios of the method are limited, real-time detection cannot be achieved, and the requirements of advance warning cannot be met.
The camera calibration method is used for Zhang Zhengyou's marking method, combined with infrared rangefinder and millimeter wave radar, the YOLOV5 algorithm is used to detect image targets, the excavator 3D model is analyzed through the K-Means clustering algorithm, and the target distance is calculated by combining the camera's imaging model to achieve real-time distance measurement.
Simple operation, low cost, high measurement accuracy, suitable for different environments, and can achieve accurate distance measurement between excavator and transmission line.
Smart Images

Figure CN2024108002_04092025_PF_FP_ABST
Abstract
Description
A method for measuring the distance between an excavator and a high-voltage transmission line Technical Field
[0001] The present invention relates to the technical fields of target recognition and image measurement, and in particular to a method for measuring the distance between an excavator and a high-voltage transmission line. Background Art
[0002] With the development of industrialization and the continuous expansion of urban construction, large-span high-voltage transmission lines and road excavation projects are becoming increasingly frequent. However, the distance between high-voltage transmission lines and excavators remains a persistent issue, not only hindering project progress but also posing safety risks. Therefore, accurately measuring the distance between high-voltage transmission lines and excavators has become a critical technology.
[0003] There are several common methods for measuring the distance between high-voltage transmission lines and excavators, including laser ranging and GPS ranging. Laser ranging uses a laser beam to measure distance. Lasers are irradiated and reflected between the excavator and the high-voltage transmission line, and the distance between the two points is measured and the location coordinates are determined using a laser and receiver. This method requires good lighting conditions and is relatively expensive. Furthermore, the laser can be affected by the atmosphere, which can affect measurement accuracy. GPS ranging typically requires a GPS receiver mounted on the excavator. The receiver interacts with satellite signals to determine the excavator's position and rotation direction, thereby calculating the distance between the excavator and the high-voltage transmission line. However, this method requires an area with a strong satellite signal and a wide field of view, which limits its feasibility and accuracy in mountainous areas with dense buildings and dense trees.
[0004] Overall, the aforementioned methods are limited in their applicability and lack real-time detection, falling short of the required early warning. While the technology for measuring the distance between high-voltage transmission lines and excavators is increasingly mature, practical applications still require selecting the appropriate method based on the specific project situation and taking into account the impact of environmental factors to ensure accurate measurements.
[0005] Summary of the Invention
[0006] In view of the above existing problems, the present invention is proposed.
[0007] Therefore, the present invention provides a method for measuring the distance between an excavator and a high-voltage transmission line, which can solve the problem that the traditional method is limited in applicable scenarios and cannot perform real-time detection and meet the requirements of early warning.
[0008] To solve the above technical problems, the present invention provides the following technical solution: a method for measuring the distance between an excavator and a high-voltage transmission line, comprising:
[0009] Define the coordinate system, mark the existing cameras using Zhang Zhengyou's marking method, and obtain the camera's internal parameter matrix and external parameter matrix; fix the camera's installation height and the camera's tilt angle θ, and use an infrared rangefinder to measure the camera's height relative to the ground, and obtain the camera's tilt angle θ in real time through the camera's PTZ information; detect the image captured by the camera using the YOLOV5 algorithm, detect and locate the target in the image, and obtain the rectangular frame of the minimum area of the target that completely enters the camera's field of view, and based on this, calculate the depth information of the target from the camera plane; divide the targets into large, medium, and small categories using a partitioning clustering algorithm, analyze the length, width, and height of the 3D model of each type of excavator, calculate the geometric mean of each cluster of excavators, and then perform an overall average; measure the lowest height of the high-voltage transmission line using millimeter-wave radar, and then use calculations to obtain the height of the target object and the distance between the high-voltage transmission line and the target.
[0010] As a preferred solution of the method for measuring the distance between an excavator and a high-voltage transmission line according to the present invention, wherein: the defined coordinate system includes a custom world coordinate system, a camera coordinate system, an image coordinate system, and a pixel coordinate system;
[0011] Draw a perpendicular line from the camera's installation position to the ground, and the point perpendicular to the ground is used to define the origin of the world coordinate system O. w , perpendicular to the origin O w The front is the world coordinate system X w Axis, perpendicular to the right side of the origin as the Y axis of the world coordinate system w , origin O w The direction along the camera is Z w Axis, establish the world coordinate system;
[0012] The optical center of the camera is the origin of the camera coordinate system O c , the camera optical axis is Z c The positive direction, perpendicular to the camera, is Y c The positive direction, perpendicular to the camera's right side is X c Establish the camera coordinate system in the positive direction;
[0013] The image coordinate system is established by taking the focal point of the camera's imaging plane and the camera's optical axis as the origin O of the image coordinate system. The positive direction of the Y axis of the image coordinate system is directly below the O point, and the positive direction of the X axis of the image coordinate system is directly to the right of the O point.
[0014] A pixel coordinate system is established with the upper left corner of the image as the origin O1 of the pixel coordinate system, the direction directly below O1 as the v-axis of the pixel coordinate system, and the direction directly to the right of O1 as the positive direction of the u-axis.
[0015] As a preferred solution of the method for measuring the distance between an excavator and a high-voltage transmission line according to the present invention, the pixel coordinate system includes: performing camera calibration on the camera to obtain the camera's intrinsic parameter matrix A and extrinsic parameter matrix B:
[0016] where d x , d y It represents the scale factor of a pixel in the u-axis and v-axis of the pixel coordinate system, corresponding to the focal length of the camera, r represents the distortion factor u0 of the physical coordinate of the image, v0 represents the pixel offset of the vertical and horizontal coordinates of the image origin relative to the optical imaging point, R represents the direction of the coordinate axis of the world coordinate system relative to the camera coordinate axis, and T represents the position of the coordinate origin of the world coordinate system relative to the space origin of the camera coordinate system.
[0017] As a preferred embodiment of the method for measuring the distance between an excavator and a high-voltage transmission line described in the present invention, the method includes: fixing the installation height of a camera and measuring the height of the camera relative to the horizontal ground as H using the infrared rangefinder; then controlling the camera to rotate in the vertical direction through software, setting the time of each rotation to be fixed at T, and then using an angle rangefinder to measure the rotation angle of the camera within the time T as θ. The rotation speed of the camera per unit time is obtained as W = θ / T (° / s), and the deflection angle θ of the camera relative to the horizontal axis can be obtained in real time.
[0018] As a preferred solution of the method for measuring the distance between an excavator and a high-voltage transmission line according to the present invention, the detection and positioning includes detecting the image captured by the camera through the YOLOV5 algorithm, detecting and positioning the target in the image, obtaining a rectangular frame of the minimum area of the target that completely enters the camera field of view, and then taking the bottom midpoint Q and the top midpoint T of the target frame, and respectively making Q and T points to O when the camera is not tilted. w -Z w -X w The perpendicular line of the plane intersects at points P and S. Then, points P and S are extended with the optical center to intersect the imaging plane at points P' and S'. The pixel coordinate information of Q' and T' can be obtained from the defined coordinate system:
[0019] Where Width and Height are the horizontal and vertical resolutions of the image, which can be set in advance. (u1, v1) is the geometric center of the target box, and h is the width of the target box.
[0020] When the camera optical axis deflection angle is θ, first analyze the ground point Q, and after the previous step, then point P to the optical axis Z c Draw a perpendicular line that intersects the optical axis at point D. The optical axis intersects with Oc The angle formed by the line D is ∠b, the vertical angle of this angle is ∠b`, and the point P is the same as the optical center O. c The line connecting point P and point O w The angle formed by the connecting lines is ∠c, and the calculation method for point T is the same.
[0021] As a preferred embodiment of the method for measuring the distance between an excavator and a high-voltage transmission line according to the present invention, the camera optical axis angle deflection angle includes the following geometric relationship:
[0022] ∠c=∠θ+∠b
[0023] O c D=O c P*cos(∠b)
[0024] The relationship between the pixel coordinate system and the world coordinate system is as follows:
[0025] Among them, Z c =O c D,A -1 A represents the inverse matrix of the internal parameter matrix, B -1 is the inverse matrix of the camera's extrinsic matrix.
[0026] As a preferred embodiment of the method for measuring the distance between an excavator and a high-voltage transmission line according to the present invention, the partitioning and clustering algorithm divides the target into large, medium, and small groups, and uses the K-Means clustering algorithm to analyze the length, width, and height of the 3D models of different types of excavators, calculate the geometric mean of each cluster of excavators, and then calculate the overall mean of the above averages to obtain the target's O _L ,O -K ,O _H , the specific implementation steps of the K-Means clustering algorithm are as follows:
[0027] Input sample set D = {X1, X2, X3, ..., X m}, the number of clusters K = 3, representing the three categories of large, medium and small respectively;
[0028] Randomly select K samples from the sample set D as the initial mean vector {μ1,μ2,μ3};
[0029] make Calculate each sample x j With each mean vector μ i The distance d of (1≤i≤K) ji =||x j -μ i ||2 Determine x based on the nearest mean vectorj Cluster label: λ j =argmin i∈{1,2,3} d ji And x j Arrange into corresponding clusters:
[0030] Compute the new mean vector: Determine whether the updated vector is equal to the current mean μ i If they are not equal, then u′ i Assign to μ i ,If the equal means are not updated, repeat the above steps until the mean changes very little and the classification is completed;
[0031] The output cluster is divided into C = {C1, C2, C3}, where each C represents a three-dimensional vector and is substituted into the length, width and height of the excavator respectively. The overall average of the length, width and height of the three types is obtained to obtain the final output Y = [O _L ,O _K ,O _H ];
[0032] To analyze the target’s posture, first determine a length W Anchor , width is l Anchor , height is h Anchor The cuboid frames the target. From the top view, the angle between the target and the cuboid is ω, so the following equation is obtained:
[0033] O _L *cosω+O _K *sinω=W Anchor
[0034] O _L *sinω+O _K *cosω=l Anchor
[0035] Where W Anchor The real length in the world coordinate system can be mapped according to the target frame length. Let the lower left corner of the target frame be point M and the lower right corner be point K. The coordinates of point M and point K in the pixel coordinate system are as follows:
[0036] Get the world coordinates of points M and K:
[0037] M=(X m ,Y m ,Z m )
[0038] K=(X k ,Y k ,Z k)
[0039] So we can get:
[0040] W Anchor =|X m -X k |
[0041] Among them O _L , O _H Known Simplifying, we get:
[0042] (O _L 2 +O _K 2 )*sin 2 w-2O _L *W Anchor sinw+(W Anchor 2 -O _K )=0
[0043] Let a=O _L 2 +O _K 2 , b=-2O _L *W Anchor , b=-2O _L *W Anchor From the root-finding formula we get:
[0044] Depend on So sinω is positive:
[0045] Substituting ω into the equation yields:
[0046] l Anchor =O _L *sinω+O _K *cosω.
[0047] As a preferred embodiment of the method for measuring the distance between an excavator and a high-voltage transmission line according to the present invention, the height of the target object and the distance between the high-voltage transmission line and the target include: the height of the high-voltage transmission line measured by the millimeter wave radar is H wrie , according to the target length after clustering O _L , width O _K , O _H ; Then build the three-dimensional cube of the target, correspond point Q to point G on the top of the target cube, and connect the optical center O c and T point and intersect at point S on the back of the cube, O c -The angle between TS and the horizontal plane is γ, and the length of GT is hx , according to the geometric relationship, we can get the following relationship:
[0048] h object =h Anchor -h
[0049] where h Anchor Equal to the Z coordinate of point T in the world coordinate system, The obtained target position and posture information are combined to estimate the height of the object, and further calculate the distance between the excavator and the high-voltage transmission line:
[0050] distacnce=H wrie -h object .
[0051] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of a method for measuring the distance between an excavator and a high-voltage transmission line are implemented.
[0052] A computer-readable storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of a method for measuring the distance between an excavator and a high-voltage transmission line.
[0053] Beneficial effects of the present invention:
[0054] 1. Simple operation, economical and efficient: The camera calibration, image screening and algorithm analysis are performed using Zhang Zhengyou's checkerboard calibration method, making the measurement process simpler. At the same time, the present invention uses relatively simple equipment and requires low cost.
[0055] 2. Ideal measurement accuracy: Combining the camera's imaging model and clustering algorithm, the millimeter-wave radar measures the height of the power line, and then estimates the height of the object, enabling accurate measurement of the distance between the excavator and the power line.
[0056] 3. High portability. The method of the present invention is suitable for measuring the distance between an excavator and a power transmission line in different environments and can be easily carried and used. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0058] FIG1 is a flow chart of a method for measuring the distance between an excavator and a high-voltage transmission line provided by one embodiment of the present invention.
[0059] FIG2 is a schematic diagram of a coordinate system for a method for measuring the distance between an excavator and a high-voltage transmission line provided by an embodiment of the present invention.
[0060] FIG3 is a schematic diagram illustrating an analysis of a camera without tilt angle in a method for measuring the distance between an excavator and a high-voltage transmission line provided by an embodiment of the present invention.
[0061] FIG4 is a schematic diagram illustrating an analysis of a camera with a tilt angle in a method for measuring the distance between an excavator and a high-voltage transmission line provided by an embodiment of the present invention.
[0062] FIG5 is a schematic diagram of target plane posture analysis of a method for measuring the distance between an excavator and a high-voltage transmission line provided by an embodiment of the present invention.
[0063] FIG6 is a schematic diagram of target three-dimensional posture analysis of a method for measuring the distance between an excavator and a high-voltage transmission line provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0065] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0066] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0067] The present invention is described in detail with reference to schematic diagrams. For ease of illustration, cross-sectional views of device structures may be partially enlarged and not to scale when describing embodiments of the present invention. Furthermore, the schematic diagrams are merely illustrative and should not limit the scope of the present invention. Furthermore, in actual production, the three-dimensional dimensions of length, width, and depth should be included.
[0068] In the description of the present invention, it should be noted that the terms "upper, lower, inner, and outer" and other references to orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first, second, or third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0069] In this disclosure, unless otherwise specified or limited, the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they may refer to fixed, removable, or integral connections. They may also refer to mechanical, electrical, or direct connections, indirect connections through an intermediary, or internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this disclosure.
[0070] Example 1
[0071] 1 , which is a first embodiment of the present invention, provides a method for measuring the distance between an excavator and a high-voltage transmission line, comprising:
[0072] Define the coordinate system, mark the existing cameras using Zhang Zhengyou's marking method, and obtain the camera's internal parameter matrix and external parameter matrix; fix the camera's installation height and the camera's tilt angle θ, and use an infrared rangefinder to measure the camera's height relative to the ground, and obtain the camera's tilt angle θ in real time through the camera's PTZ information; detect the image captured by the camera using the YOLOV5 algorithm, detect and locate the target in the image, and obtain the rectangular frame of the minimum area of the target that completely enters the camera's field of view, and based on this, calculate the depth information of the target from the camera plane; divide the targets into large, medium, and small categories using a partitioning clustering algorithm, analyze the length, width, and height of the 3D model of each type of excavator, calculate the geometric mean of each cluster of excavators, and then perform an overall average; measure the lowest height of the high-voltage transmission line using millimeter-wave radar, and then use calculations to obtain the height of the target object and the distance between the high-voltage transmission line and the target.
[0073] The defined coordinate system includes a custom world coordinate system, a camera coordinate system, an image coordinate system, and a pixel coordinate system.
[0074] Draw a perpendicular line from the camera's installation position to the ground, and the point perpendicular to the ground is used to define the origin of the world coordinate system O. w , perpendicular to the origin O w The front is the world coordinate system X w Axis, perpendicular to the right side of the origin as the Y axis of the world coordinate system w , origin Ow The direction along the camera is Z w Axis, establish the world coordinate system.
[0075] The optical center of the camera is the origin of the camera coordinate system O c , the camera optical axis is Z c The positive direction, perpendicular to the camera, is Y c The positive direction, perpendicular to the camera's right side is X c The camera coordinate system is established in the positive direction of .
[0076] The image coordinate system is established by taking the focal point of the camera's imaging plane and the camera's optical axis as the origin O of the image coordinate system. The positive direction of the Y axis of the image coordinate system is directly below the O point, and the positive direction of the X axis of the image coordinate system is directly to the right of the O point.
[0077] A pixel coordinate system is established with the upper left corner of the image as the origin O1 of the pixel coordinate system, the direction directly below O1 as the v-axis of the pixel coordinate system, and the direction directly to the right of O1 as the positive direction of the u-axis.
[0078] Calibrate the camera to get the camera's intrinsic parameter matrix A and extrinsic parameter matrix B:
[0079] where d x , d y Represents the scale factor of a pixel in the pixel coordinate system u axis and v axis, corresponding to the focal length of the camera, r represents the distortion factor u0 of the image physical coordinate, v 0 represents the pixel offset of the image origin relative to the vertical and horizontal coordinates of the optical imaging point, R represents the direction of the coordinate axis of the world coordinate system relative to the camera coordinate axis, and T represents the position of the coordinate origin of the world coordinate system relative to the space origin of the camera coordinate system.
[0080] Fix the installation height of the camera and use an infrared rangefinder to measure the height of the camera relative to the horizontal ground as H; then control the camera to rotate in the vertical direction through software, set the time of each rotation to be fixed at T, and then use the angle rangefinder to measure the rotation angle of the camera within the time T as θ. The rotation speed of the camera per unit time is W = θ / T (° / s), and the deflection angle θ of the camera relative to the horizontal axis can be obtained in real time.
[0081] The YOLOV5 algorithm is used to detect the image captured by the camera, detect and locate the target in the image, obtain the rectangular frame of the target with the minimum area that is completely in the camera field of view, and then take the bottom midpoint Q and the top midpoint T of the target frame. When the camera is not tilted, the Q point and the T point are respectively moved to O. w -Z w -X wThe perpendicular line of the plane intersects at points P and S. Then, points P and S are extended with the optical center to intersect the imaging plane at points P' and S'. The pixel coordinate information of Q' and T' can be obtained from the defined coordinate system:
[0082] Where Width and Height are the horizontal and vertical resolutions of the image, which can be set in advance. (u1, v1) is the geometric center of the target box, and h is the width of the target box.
[0083] When the camera optical axis deflection angle is θ, first analyze the ground point Q, and after the previous step, then point P to the optical axis Z c Draw a perpendicular line that intersects the optical axis at point D. The optical axis intersects with O c The angle formed by the line D is ∠b, the vertical angle of this angle is ∠b`, and the point P is the same as the optical center O. c The line connecting point P and point O w The angle formed by the connecting lines is ∠c, and the calculation method for point T is the same.
[0084] The geometric relationship is as follows:
[0085] ∠c=∠θ+∠b
[0086] O c D=O c P*cos(∠b)
[0087] The relationship between the pixel coordinate system and the world coordinate system is as follows:
[0088] Among them, Z c =O c D,A -1 A represents the inverse matrix of the internal parameter matrix, B -1 is the inverse matrix of the camera's extrinsic matrix.
[0089] The length, width and height of the 3D models of different types of excavators are analyzed by K-Means clustering algorithm, and the geometric mean of each cluster of excavators is calculated. Then the overall mean of the above average is calculated to obtain the target O _L ,O -K ,O _H , the specific implementation steps of the K-Means clustering algorithm are as follows:
[0090] Input sample set D = {X1, X2, X3, ..., X m}, the number of clusters K = 3, representing the three categories of large, medium and small respectively.
[0091] Randomly select K samples from the sample set D as the initial mean vector {μ1,μ2,μ3}.
[0092] make Calculate each sample x j With each mean vector μ i The distance d of (1≤i≤K) ji =||x j -μ i ||2.
[0093] Determine x based on the nearest mean vector j Cluster label: λ j =argmin i∈{1,2,3} d ji And x j Arrange into corresponding clusters:
[0094] Compute the new mean vector: Determine whether the updated vector is equal to the current mean μ i If they are not equal, then u′ i Assign to μ i If the mean is equal and not updated, repeat the above steps until the mean changes very little and the classification is completed.
[0095] The output cluster is divided into C = {C1, C2, C3}, where each C represents a three-dimensional vector and is substituted into the length, width and height of the excavator respectively. The overall average of the length, width and height of the three types is obtained to obtain the final output Y = [O _L ,O _K ,O _H ].
[0096] To analyze the target’s posture, first determine a length W Anchor , width is l Anchor , height is h Anchor The cuboid frames the target. From the top view, the angle between the target and the cuboid is ω, so the following equation is obtained:
[0097] O _L *cosω+O _K *sinω=W Anchor
[0098] O _L *sinω+O _K *cosω=l Anchor
[0099] Where W AnchorThe real length in the world coordinate system can be mapped according to the target frame length. Let the lower left corner of the target frame be point M and the lower right corner be point K. The coordinates of point M and point K in the pixel coordinate system are as follows:
[0100] Get the world coordinates of points M and K:
[0101] M=(X m ,Y m ,Z m )
[0102] K=(X k ,Y k ,Z k )
[0103] So we can get:
[0104] W Anchor =|X m -X k |
[0105] Among them O _L , O _H Known Simplifying, we get:
[0106] (O _L 2 +O _K 2 )*sin 2 w-2O _L *W Anchor sinw+(W Anchor 2 -O _K )=0
[0107] Let a=O _L 2 +O _K 2 , b=-2O _L *W Anchor , b=-2O _L *W Anchor From the root-finding formula we get:
[0108] Depend on So sinω is positive:
[0109] Substituting ω into the equation yields:
[0110] l Anchor =O _L *sinω+O _K *cosω.
[0111] The height of the high-voltage transmission line is measured by millimeter-wave radar as H wrie , according to the target length after clustering O _L , width O _K , O _H ; Then build the three-dimensional cube of the target, correspond point Q to point G on the top of the target cube, and connect the optical center O c and T point and intersect at point S on the back of the cube, O c -The angle between TS and the horizontal plane is γ, and the length of GT is h x , according to the geometric relationship, we can get the following relationship:
[0112] h object =h Anchor -h
[0113] where h Anchor Equal to the Z coordinate of point T in the world coordinate system, The obtained target position and posture information are combined to estimate the height of the object, and further calculate the distance between the excavator and the high-voltage transmission line:
[0114] distacnce=H wrie -h object .
[0115] Example 2
[0116] 1 to 6 , which illustrate an embodiment of the present invention, a method for measuring the distance between an excavator and a high-voltage transmission line is provided. To verify the beneficial effects of the present invention, a scientific demonstration is conducted through experiments.
[0117] Case 1: When the camera height H = 2.0717m and the tilt angle θ = 4°, the measured height of the excavator is: 3.18m, the actual height of the excavator is: 3m, the measured height of the power line is 9.5m, and the final distance = 6.32m. The error is: 0.18m
[0118] Case 2: When the camera height H = 2.0717m and the tilt angle θ = 12°, the measured object height is 3.12m, the actual object height is 3m, the measured transmission line height is 9.5m, and the final distance = 6.38m. The error is 0.12m.
[0119] Case 3: When the camera height H = 2.221m and the tilt angle θ = 4°, the measured object height is 3.22m, the actual object height is 3m, and the measured transmission line height is 9.5m. The final distance = 6.28m, with an error of 0.22m.
[0120] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0121] Example 3
[0122] The third embodiment of the present invention is different from the first two embodiments in that:
[0123] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0124] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal translation scripting language JavaScript, etc.
[0125] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.
[0126] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0128] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0129] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A method for measuring the distance between an excavator and a high-voltage transmission line, characterized in that: include, Define the coordinate system, mark the existing camera using Zhang Zhengyou's marking method, and obtain the camera's internal parameter matrix and external parameter matrix; By fixing the camera's installation height and the camera's tilt angle θ, and using an infrared rangefinder to measure the camera's height relative to the ground, the camera's tilt angle θ is obtained in real time through the camera's PTZ information; The YOLOV5 algorithm is used to detect and locate the target in the image captured by the camera, obtain the minimum area of the target rectangle that completely enters the camera's field of view, and use this as a basis to calculate the depth information of the target from the camera plane; The targets are divided into large, medium and small types through the partitioning clustering algorithm. The length, width and height of the 3D models of the excavators in each category are analyzed. The geometric mean of each cluster of excavators is calculated and then the overall mean is calculated. The lowest height of the high-voltage transmission line is measured by millimeter-wave radar, and then the height of the target object and the distance between the high-voltage transmission line and the target are calculated.
2. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 1, wherein: The defined coordinate system includes a custom world coordinate system, a camera coordinate system, an image coordinate system, and a pixel coordinate system; Draw a perpendicular line from the camera's installation position to the ground, and the point perpendicular to the ground is used to define the origin of the world coordinate system O. w , perpendicular to the origin O w The front is the world coordinate system X w Axis, perpendicular to the right side of the origin as the Y axis of the world coordinate system w , origin O w The direction along the camera is Z w Axis, establish the world coordinate system; The optical center of the camera is the origin of the camera coordinate system O c , the camera optical axis is Z c The positive direction, perpendicular to the camera, is Y c The positive direction, perpendicular to the camera's right side is X c Establish the camera coordinate system in the positive direction; The image coordinate system is established by taking the focal point of the camera's imaging plane and the camera's optical axis as the origin O of the image coordinate system. The positive direction of the Y axis of the image coordinate system is directly below the O point, and the positive direction of the X axis of the image coordinate system is directly to the right of the O point. A pixel coordinate system is established with the upper left corner of the image as the origin O1 of the pixel coordinate system, the direction directly below O1 as the v-axis of the pixel coordinate system, and the direction directly to the right of O1 as the positive direction of the u-axis.
3. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 2, wherein: The pixel coordinate system includes the camera calibration to obtain the camera's intrinsic parameter matrix A and extrinsic parameter matrix B: where d x , d y It represents the scale factor of a pixel in the u-axis and v-axis of the pixel coordinate system, corresponding to the focal length of the camera, r represents the distortion factor u0 of the physical coordinate of the image, v0 represents the pixel offset of the vertical and horizontal coordinates of the image origin relative to the optical imaging point, R represents the direction of the coordinate axis of the world coordinate system relative to the camera coordinate axis, and T represents the position of the coordinate origin of the world coordinate system relative to the space origin of the camera coordinate system.
4. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 3, wherein: The method of using an infrared rangefinder includes fixing the installation height of the camera and measuring the height of the camera relative to the horizontal ground as H using the infrared rangefinder; then controlling the camera to rotate in the vertical direction through software, setting the time of each rotation to be fixed at T, and then using an angle rangefinder to measure the rotation angle of the camera within the time T as θ. The rotation speed of the camera per unit time is obtained as W = θ / T (° / s), and the deflection angle θ of the camera relative to the horizontal axis can be obtained in real time.
5. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 4, wherein: The detection and positioning includes detecting the image captured by the camera through the YOLOV5 algorithm, detecting and locating the target in the image, obtaining a rectangular frame with the minimum area of the target that is completely in the camera's field of view, and then taking the bottom midpoint Q and the top midpoint T of the target frame. When the camera is not tilted, the Q point and the T point are respectively moved to O. w -Z w -X w The perpendicular line of the plane intersects at points P and S. Then, points P and S are extended with the optical center to intersect the imaging plane at points P' and S'. The pixel coordinate information of Q' and T' can be obtained from the defined coordinate system: Where Width and Height are the horizontal and vertical resolutions of the image, which can be set in advance. (u1, v1) is the geometric center of the target box, and h is the width of the target box. When the camera optical axis deflection angle is θ, first analyze the ground point Q, and after the previous step, then point P to the optical axis Z c Draw a perpendicular line that intersects the optical axis at point D. The optical axis intersects with O c The angle formed by the line D is ∠b, the vertical angle of this angle is ∠b`, and the point P is the same as the optical center O. c The line connecting the points P and O w The angle formed by the connecting lines is ∠c, and the calculation method for point T is the same.
6. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 5, wherein: The camera optical axis angle deflection angle includes the following geometric relationship: ∠c=∠θ+∠b O c D=O c P*cos(∠b) The relationship between the pixel coordinate system and the world coordinate system is as follows: Among them, Z c =O c D,A -1 A represents the inverse matrix of the internal parameter matrix, B -1 is the inverse matrix of the camera's extrinsic matrix.
7. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 6, wherein: The partitioning clustering algorithm divides the target into large, medium and small groups. The length, width and height of the 3D models of different types of excavators are analyzed by the K-Means clustering algorithm. The geometric mean of each cluster of excavators is calculated. The overall mean of the above average is then calculated to obtain the target's O(n) _L ,O _K ,O _H , the specific implementation steps of the K-Means clustering algorithm are as follows: Input sample set D = {X1, X2, X3, ..., X m }, the number of clusters K = 3, representing the three categories of large, medium and small respectively; Randomly select K samples from the sample set D as the initial mean vector {μ1,μ2,μ3}; make Calculate each sample x j With each mean vector μ i The distance d of (1≤i≤K) ji =||x j -μ i ||2; Determine x based on the nearest mean vector j Cluster label: λ j =arg min i∈{1,2,3} d ji And x j Arrange into corresponding clusters: Compute the new mean vector: Determine whether the updated vector is equal to the current mean μ i If they are not equal, then u′ i Assign to μ i ,If the equal means are not updated, repeat the above steps until the mean changes very little and the classification is completed; The output cluster is divided into C = {C1, C2, C3}, where each C represents a three-dimensional vector and is substituted into the length, width and height of the excavator respectively. The overall average of the length, width and height of the three types is obtained to obtain the final output Y = [O _L ,O _K ,O _H ]; To analyze the target’s posture, first determine a length W Anchor , width is l Anchor , height is h Anchor The cuboid frames the target. From the top view, the angle between the target and the cuboid is ω, so the following equation is obtained: O _L *cosω+O _K *sinω=W Anchor O _L *sinω+O _K *cosω=l Anchor Where W Anchor The real length in the world coordinate system can be mapped according to the target frame length. Let the lower left corner of the target frame be point M and the lower right corner be point K. The coordinates of point M and point K in the pixel coordinate system are as follows: Get the world coordinates of points M and K: M=(X m ,Y m ,Z m ) K=(X k ,Y k ,Z k ) So we can get: W Anchor =|X m -X k | Among them O _L , O _H Known Simplifying, we get: Let a=O _L 2 +O _K 2 , b=-2O _L *W Anchor , b=-2O _L *W Anchor From the root-finding formula we get: Depend on So sinω is positive: Substituting ω into the equation yields: l Anchor =O _L *sinω+O _K *cosω。 8. The method for measuring the distance between an excavator and a high-voltage transmission line according to claim 7, wherein: The height of the target object and the distance between the high-voltage transmission line and the target include the height of the high-voltage transmission line measured by the millimeter wave radar as H wrie , according to the target length after clustering O _L , width O _K , O _H ; Then build the three-dimensional cube of the target, correspond point Q to point G on the top of the target cube, and connect the optical center O c and T point and intersect at point S on the back of the cube, O c -The angle between TS and the horizontal plane is γ, and the length of GT is h x , according to the geometric relationship, we can get the following relationship: h object =h Anchor -h where h Anchor Equal to the Z coordinate of point T in the world coordinate system, The obtained target position and posture information are combined to estimate the height of the object, and further calculate the distance between the excavator and the high-voltage transmission line: distacnce=H wrie -h object 。 9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
A method for measuring the height of a plurality of trees based on a smart phone
CN109285145A
Image millimeter-wave radar fusion target detection method
CN111652097A
Power transmission line safety distance measurement method, computer equipment and storage medium
CN111798507A
Alarm system for preventing construction machinery from accidentally touching power transmission line
CN112652153A
Power transmission line channel hidden danger target distance measurement method and device, and medium
CN113345019A
Cited By
Tree crown sagging dynamic detection method and system based on vehicle-mounted vision
CN121236699A