CN112464789B - Power transmission line extraction method based on line characteristics - Google Patents
Power transmission line extraction method based on line characteristics Download PDFInfo
- Publication number
- CN112464789B CN112464789B CN202011338502.7A CN202011338502A CN112464789B CN 112464789 B CN112464789 B CN 112464789B CN 202011338502 A CN202011338502 A CN 202011338502A CN 112464789 B CN112464789 B CN 112464789B
- Authority
- CN
- China
- Prior art keywords
- edge
- transmission line
- image
- line
- power transmission
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 97
- 238000000605 extraction Methods 0.000 title claims abstract description 17
- 239000013598 vector Substances 0.000 claims abstract description 98
- 238000000034 method Methods 0.000 claims abstract description 39
- 238000012545 processing Methods 0.000 claims abstract description 20
- 101100394003 Butyrivibrio fibrisolvens end1 gene Proteins 0.000 claims description 12
- 238000010586 diagram Methods 0.000 claims description 5
- 238000003708 edge detection Methods 0.000 claims description 5
- 239000011159 matrix material Substances 0.000 claims description 4
- 238000006116 polymerization reaction Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 claims description 4
- 230000002146 bilateral effect Effects 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 238000007689 inspection Methods 0.000 abstract description 6
- 238000001514 detection method Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000004438 eyesight Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000012876 topography Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/13—Satellite images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30181—Earth observation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Astronomy & Astrophysics (AREA)
- Remote Sensing (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a power transmission line extraction method based on line characteristics, which is used for processing an acquired power transmission line aerial image based on the power transmission line characteristics in the aerial image and effectively extracting a complete power transmission line comprising straight lines, curves and other forms from a complex and various backgrounds. The method mainly comprises the steps of carrying out histogram equalization processing on an image brightness space, obtaining an edge image by utilizing an ED algorithm and generating a two-dimensional vector of the image through a vector tracking algorithm; on the basis of analyzing the line characteristic and non-line characteristic difference, extracting the power transmission line by using a length constraint method, a curvature constraint method and an endpoint projection method; and finally, obtaining the power transmission line with the single pixel width through iterative processing, and obtaining the complete power line by least square fitting. The problem that the traditional manual inspection method is time-consuming and labor-consuming is solved, and the method has high engineering application value.
Description
Technical Field
The invention relates to a line feature-based power transmission line extraction method, and belongs to the technical field of computer vision and power transmission line inspection.
Background
With the continuous development and promotion of national comprehensive national power, the rapid development of the society puts higher requirements on the construction of a power grid. The power transmission line is used as an important component in a power grid, and the stable operation of the power transmission line is an important guarantee for national safety power utilization. However, the power transmission line is often in a complex external environment, and vegetation, buildings and the like with different heights on the ground can form potential threats to the power transmission line. If these objects are too close to the high voltage transmission line, accidents such as line tripping may occur. Therefore, the power transmission line channel environment needs to be regularly inspected to ensure the safe and stable operation of the power transmission line.
Traditional manual line patrol is limited by topography, low efficiency, high cost and certain danger. Along with the increase of the scale of the power grid, the manual measurement mode cannot meet the requirements of coverage and instantaneity of power transmission line routing inspection. With the rapid development of small unmanned aerial vehicles and high-resolution visible light cameras, the unmanned aerial vehicle carries the visible light camera to acquire the image of the power transmission line, and the inspection of the power transmission line channel environment becomes a new research idea. The method has the advantages of high efficiency, low cost and high automation degree. Because the image data is susceptible to various factors such as the shooting environment and the shooting angle, the obtained image is not a simple power transmission line and mostly contains a complex background. Therefore, how to completely and effectively extract the power transmission line from the aerial image has important research significance for the power transmission line inspection field.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a power transmission line extraction method based on line characteristics, so that the power transmission line is accurately extracted, the working strength and the risk coefficient of inspection personnel are reduced, and the working efficiency is improved.
In order to achieve the purpose, the invention discloses a power transmission line extraction method based on line characteristics, which comprises the following steps:
the aerial image acquired by the unmanned aerial vehicle is preprocessed through an image enhancement algorithm, the contrast between a power transmission line and a background in the aerial image is improved, and gray scale is obtainedFIG. I gray ;
Extracting smooth and complete edge segments from the gray level image based on an edge detection algorithm to obtain an edge image I edge ,I edge The gray value of the pixel point of the middle edge segment is 255, I edge The gray value of the pixel point of the middle non-edge part is 0;
by vector tracking algorithm, I edge The edge segment in (1) is transformed into a two-dimensional vector and I is deleted edge The edge segments of the middle and smaller than 20 pixel points are obtained as V 1 ,V 1 ={v 1 ,v 2 ,...,v i ,...,v n1 Wherein n1 is V 1 Number of medium two-dimensional vectors, v i Representing a certain i-th two-dimensional vector, v i Comprises m pixel points with the gray value of 255, and is expressed as v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},(x m ,y m )∈I edge ,m>20;
Based on the curve characteristics of the power transmission line, deleting all over-bent two-dimensional vectors to obtain a two-dimensional vector V 2 ,V 2 ={v' 1 ,v' 2 ,...v' i ,...,v' n2 },V 2 ∈V 1 Wherein n2 is V 2 The number of the medium two-dimensional vectors;
two-dimensional vector V according to line segment projection method 2 Carrying out polymerization to obtain a two-dimensional vector V related to the transmission line 3 ,V 3 ={v” 1 ,v” 2 ,...,v” i ,...,v” N },V 3 ∈V 2 Wherein N represents V 3 The number of medium two-dimensional vectors, which also represents the number of detected power lines, v " i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x t ,y t ) Representing the two-dimensional vector of the ith transmission line;
to V 3 Of all transmission line two-dimensional vectors v' i ' obtaining two-dimensional vector of transmission line with single pixel width by iterative processing All transmission line two-dimensional vectors v' i ' the set of power transmission line vectors obtained after the iterative processing is V 4 ,
And fitting the power transmission line based on a least square method to determine a polynomial equation of the power transmission line in the aerial photography image.
Preferentially, the aerial image acquired by the unmanned aerial vehicle is preprocessed through an image enhancement algorithm, the contrast between a power transmission line and a background in the aerial image is improved, and a gray level image I is obtained gray The method comprises the following steps:
a. the aerial image is a color RGB image, and the aerial image is I rgb Each corresponding color vector is (r, g, b), max is the maximum value among the r component, the g component, and the b component, min is the minimum value among the r component, the g component, and the b component, and the (h, s, v) value in the corresponding HSV space is:
v=max
according to the formula (1) adding I rgb Respectively obtaining saturation images I after converting into HSV space h Tone image I s And a luminance image I v ;
b. For the v component, for the luminance image I v Is processed by histogram equalization to obtain I' v Improving the image contrast;
c. will I h 、I s And l' v Combining to obtain HSV images, wherein the corresponding vectors are (h ', s ', v '), converting HSV space into RGB color space, and each color vector in the corresponding RGB color spaceThe (r ', g ', b ') values are:
whereinp ═ v '× (1-s'), q ═ v '× (1-f × s'), t ═ v '× (1- (1-f) × s'), and the processed color RGB image is I hrgb ;
d. Will I hrgb Converted into a grey-scale image I gray And to I gray And bilateral filtering is adopted, so that noise caused by equalization is eliminated, and background interference is reduced.
Preferably, the edge detection algorithm is based on from the grey scale image I gray Extracting smooth and complete edge segments to obtain an edge map I edge ,I edge The gray value of the pixel point of the middle edge segment is 255, the gray value of the pixel point of the non-edge part is 0, and the specific steps are as follows:
a. firstly, the original gray image I is filtered by a Gaussian filter gray Processing to obtain image Img 0 ;
b. Processing Img with Sobel operator 0 Obtaining a gradient map Img 1 ;
c. According to Img 1 Calculating Img 0 Obtaining an anchor point diagram Img 2 ;
d. Drawing each anchor point to obtain an edge graph I edge ,I edge Gray value of the middle background is 0, I edge The grey value of the medium transmission line is 255.
Preferably, I is determined by a vector tracking algorithm edge The edge segment in (1) is transformed into a two-dimensional vector and I is deleted edge The edge segments of the middle and smaller than 20 pixel points are obtained as V 1 ,V 1 ={v 1 ,v 2 ,...,v i ,...,v n1 Wherein n1 is V 1 Number of medium two-dimensional vectors, v i Representing a certain i-th two-dimensional vector, v i Comprising m pixels with a grey value of 255, denoted v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m ) The method comprises the following steps:
in I edge Based on the vector tracking algorithm, I is calculated edge To a two-dimensional vector V 1 ;
From I edge The left lower corner of the image is scanned line by line until a pixel point with a gray value of 255 is found, and the pixel point is taken as the starting position of the current vector and is recorded as a current pixel Q;
setting the gray value of the position of the current pixel Q as 0, searching 8 neighborhoods of the current pixel Q according to the sequence from left to right and from bottom to top, and recording the encountered pixel point with the first gray value of 255 as the current pixel Q;
then search 8 neighborhoods of Q again according to the previous step until I is reached edge The edge or a pixel point with the gray value of 255 exists in the 8 neighborhoods of the current pixel;
deleting I in vectorization process edge Edge segment of less than 20 pixels in the image, then V 1 Can be represented by formula (3), I edge Of (2) a point (x) where the gray value of each pixel point is not 0 j ,y j ) Are assigned to V according to the above steps 1 V in (1) i ,
Preferably, based on the curve characteristic of the power transmission line, all over-bent two-dimensional vectors are deleted to obtain a two-dimensional vector V 2 ,V 2 ={v' 1 ,v' 2 ,...v' i ,...,v' n2 },V 2 ∈V 1 Wherein n2 is V 2 The number of the medium two-dimensional vectors specifically includes the following contents:
arbitrary transmission line is arbitrarily divided into a plurality of successive segments { seg 1 ,seg 2 ,...,seg a A is the number of segments, and the slope corresponding to each segment is k i ,i∈[1,a];
The slope difference of the linear shape segment is 0, and the slope difference of the curve shape segment is less than a set threshold Vk, namely | k c -k e |<Vk,k c And k e Is the slope corresponding to any segment, and c, e ∈ [1, a ]];
The two-dimensional vector of any line segment obtained in the step 3) is represented by v i Is denoted by v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},(x m ,y m )∈I edge (ii) a V is to be i Trisection, expressed asWhereinRepresenting the m-th in the two-dimensional vector 1 A coordinate, i.e.Representing the m-th in the two-dimensional vector 2 A coordinate, i.e.Based on the curve characteristic of the transmission line, the transmission line is divided into three partsAndcorresponding slopes are respectivelyAndwherein
ComputingAndthe difference in slope between the middle segments is SI wz =|k w -k z I, w, z ═ 1,2,3, delete SI wz And more than or equal to a two-dimensional vector of Vk.
Preferentially, the two-dimensional vector V is projected according to a line segment method 2 Carrying out polymerization to obtain a two-dimensional vector V related to the transmission line 3 ,V 3 ={v” 1 ,v” 2 ,...,v” i ,...,v” N },V 3 ∈V 2 Wherein N represents V 3 The number of medium two-dimensional vectors, also representing the number of detected power lines, v " i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x t ,y t ) Representing the two-dimensional vector of the ith transmission line, and comprising the following steps of:
two line segments are defined as l 1 And l 2 ,l 1 Tangent sum of endpoints l 2 The tangents to the end points extend to the boundaries of the aerial image, l 1 Tangent sum of endpoints l 2 The tangent to the endpoint forms a projection point at the left edge of the boundary of the aerial image, denoted as { A, B }, l, respectively 1 Tangent sum of endpoints l 2 The coordinates of projection points formed by tangents of the end points on the right edge of the boundary of the aerial image, which are respectively marked as { A ', B' }, A, B, A 'and B', are respectively (0, y) A )、(0,y B )、(W,y A' ) And (W, y) B' ) W is the length of the aerial image, then l 1 Tangent sum of endpoints l 2 The projection distance of the tangent line of the end point on the left edge of the boundary of the aerial image is d A =|y A -y B |,l 1 Tangent sum of endpoints l 2 The projection distance of the tangent line of the end point on the right edge of the boundary of the aerial image is d B =|y A' -y B' If l 1 And l 2 Collinear, then projection distance d A And d B Min (d) should be satisfied A ,d B )≤T;
And if the polar coordinate equation of the tangent of the segment end point is rho-x-cos theta + y-sin theta, wherein rho is the polar diameter of the tangent, theta is the included angle between the tangent of the end point and the horizontal transverse axis of the aerial image, and (x, y) are the coordinates of the segment end point, d is the coordinate of the segment end point A And d B Calculated from the following equation:
wherein l 1 And l 2 Respectively is l 1 :ρ 1 =x·cosθ 1 +y·sinθ 1 ,l 2 :ρ 2 =x·cosθ 2 +y·sinθ 2 ,ρ 1 Is 1 1 Pole diameter of (a) (. theta.) 1 Is 1 of 1 Angle between tangent line of end point and horizontal cross axis of aerial image, rho 2 Is 1 2 Pole diameter of (a) (. theta.) 2 Is 1 2 And the included angle between the tangent line of the end point and the horizontal transverse axis of the aerial image.
Preferably, for V 3 Of all transmission lines i Iterative processing is carried out to obtain a two-dimensional vector of the transmission line with single pixel widthThe vector set of the transmission line obtained after the iterative processing of the two-dimensional vectors vi of all the transmission lines is V 4 ,The method specifically comprises the following steps:
first according to v " i The abscissa of each point in the series, v in small to large order " i Ordering to obtain v " i ={(x' 1 ,y' 1 ),(x' 2 ,y' 2 ),...,(x' t ,y' t ) } mixing (x' 1 ,y' 1 ) As a starting point P start1 (x, y), ergodic v " i Find and (x' 1 ,y' 1 ) As a final point of unequal abscissasDead point P end1 (x, y) passing through the starting point P start1 (x, y) and an end point P end1 (x, y) to obtainThe new coordinates in (1) ares 1 Is v' i Middle P start1 (x, y) to P end1 The total number of coordinates between (x, y); v' i Middle P end1 As a new starting point P start2 (x, y) repeating the above steps up to v ″' i All the coordinates are traversed to obtain the linear quantity of single pixel widthAnd is s t Is v' i Middle P startt (x, y) to P endt The total number of coordinates between (x, y).
Preferentially, fitting and determining a polynomial equation of the power transmission line in the aerial photography image based on a least square method, specifically comprising the following steps:
line segmentHas a fitting equation ofa k (k ═ 0, 1.., n) denotes fitting parameters, and n denotes the number of poles of the fitting polynomial;
according to the least square methodFitting is performed based onPixel point of (x) t ,y t ) Determining a fitting parameter a k (k ═ 0,1,..., n), fitting parameters a k (k ═ 0, 1.. times, n) is required to satisfy a condition that minimizes the sum of squares of the differences in the Y direction, as shown in equation (5):
deriving equation (5) to obtain a real symmetric positive definite matrix:
solving the formula (6) to obtain a fitting parameter a meeting the fitting condition k (k ═ 0, 1.. times, n), determining a line segmentThe equation of the corresponding power line in the aerial image.
Preferably, the gaussian filter uses a 5 × 5 gaussian kernel with σ ═ 1, and the background grayscale values include sky grayscale values.
Preferably, the threshold Vk is 0.27, and the threshold T is set to 10.
The invention achieves the following beneficial effects:
(1) according to the power transmission line extraction method based on the line characteristics, the contrast of the power transmission line is enhanced by performing histogram equalization processing on the brightness space, and the influence of environmental factors such as shooting color and illumination on the detection effect of the power transmission line is reduced;
(2) according to the method, based on the line segment characteristic information of the power transmission line in the aerial image, a complete two-dimensional vector of the power transmission line with the single pixel width is effectively extracted from a complex background by means of curvature constraint, line end point projection, skeleton extraction, power transmission line fitting and the like, and the power transmission line with different line characteristics such as straight lines, curves and the like can be accurately positioned.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic diagram of a geometric model of the power transmission line curvature feature of the present invention;
FIG. 3 is a schematic diagram of a line segment projection method according to the present invention.
Detailed Description
The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
It should be noted that, if there is a directional indication (such as up, down, left, right, front, and back) in the embodiment of the present invention, it is only used to explain the relative position relationship between the components, the motion situation, etc. in a certain specific posture, and if the specific posture is changed, the directional indication is changed accordingly.
The line feature-based power transmission line extraction method of the invention is as shown in fig. 1, and the specific operation flow is as follows:
1. preprocessing an aerial image acquired by the unmanned aerial vehicle through an image enhancement algorithm, improving the contrast between a power transmission line and a background, and obtaining a gray level image I gray The method comprises the following specific steps:
the three colors in the RGB color space have close relationship, and the images can be deformed by respectively processing the three colors; in HSV space, hue, saturation and brightness correspond directly to the human visual perception characteristics and are not strongly linked to each other. The aerial image is a color RGB image and is set as I rgb Each corresponding color vector is (r, g, b), max is the maximum of the r, g, b components, min is the minimum of the r, g, b components, and the (h, s, v) value in the corresponding HSV space is:
v=max
according to the formula (1) adding I rgb Respectively obtaining saturation images I after converting into HSV space h Tone image I s And a luminance image I v ;
b. For the v component, for the luminance image I v Is processed by histogram equalization to obtain I' v Thereby improving image contrast.
c. Will I h 、I s And l' v And (5) merging to obtain the HSV image, wherein the corresponding vector is (h ', s ', v '). Converting from HSV space to RGB color space, wherein each color vector (r ', g ', b ') in the corresponding RGB color space has the following value:
whereinp ═ v '× (1-s'), q ═ v '× (1-f × s'), t ═ v '× (1- (1-f) × s'), and the processed color RGB image is I hrgb ;
d. Will I hrgb Converted into a grey-scale image I gray And to I gray And bilateral filtering is adopted, so that noise caused by equalization is eliminated, and background interference is reduced.
2. Edge detection algorithm based from gray level image I gray Extracting smooth and complete edge segments to obtain an edge image I edge ,I edge The gray value of the pixel point of the middle edge segment is 255, the gray value of the pixel point of the non-edge part is 0, and the specific steps are as follows:
a. firstly, the original gray image I is processed by a Gaussian filter gray Processing to obtain image Img 0 . The gaussian filter defaults to a 5 × 5 gaussian kernel with σ ═ 1.
b. Processing Img with Sobel operator 0 Obtaining a gradient map Img 1 。
c. According to Img 1 Calculate the image Img 0 Obtaining an anchor point diagram Img 2 Where anchor point means having in an edge pixelA pixel with a high probability of existence.
d. Connecting each anchor point generated in the step 2(c), and drawing an edge graph I edge 。I edge The gray value of the background such as the sky is 0, and the gray value of the transmission line is 255.
3. In I edge On the basis of the edge transformation, the edge is transformed into a two-dimensional vector V by a vector tracking algorithm 1 . The basic process of vector tracking is: from I edge The left lower corner of the image is scanned line by line until a pixel with a gray value of 255 is found, and the pixel is taken as the starting position of the current vector and is recorded as a current pixel Q; setting the gray value of the position to be 0, searching 8 neighborhoods of the pixel Q from left to right and from bottom to top, and recording the encountered pixel with the first gray value of 255 as the current pixel; then searching 8 neighborhoods of Q again according to the previous step until reaching the image I edge There are pixels with a gray value of 255 in the edge, or 8 neighborhood of the current pixel. Deleting short features with length less than 20 pixels in the vectorization process, then V 1 Can be represented by formula (5), I edge Each of the points (x) other than 0 j ,y j ) Are assigned to V according to the above steps 1 In a different vector group v i ,
4. The power lines in the aerial image are continuous and close to straight lines. As shown in FIG. 2, assume that an arbitrary transmission line is arbitrarily divided into a plurality of consecutive segments { seg 1 ,seg 2 ,...,seg a A is the number of segments, and the slope corresponding to each segment is k i ,i∈[1,a](ii) a For straight line segments, the slope difference of each segment should be close to 0, and for curve segments, the slope difference of each segment is less than a set threshold Vk, i.e. | k i -k j |<Vk,k i ,k j Is the slope corresponding to any segment, and i, j is E [1, a ]](ii) a Considering the power line with curve characteristics, the threshold Vk is set to 0.27.
From step 3, arbitrary two dimensions can be obtainedThe vector is denoted by v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},(x m ,y m )∈I edge . V is to be i Trisection, expressed asWhereinRepresenting the m-th in the two-dimensional vector 1 A coordinate, i.e.Representing the m-th in the two-dimensional vector 2 A coordinate, i.e.Trisecting the transmission line into three parts based on the curvature characteristics of the transmission lineAndcorresponding slope ofAndwherein
Calculating each segmentAndthe difference in slope SI between wz =|k w -k z I, w, z ═ 1,2,3, delete SI wz Greater than or equal to VkTwo-dimensional vector to obtain two-dimensional vector V 2 ,V 2 ={v' 1 ,v' 2 ,...v' i ,...,v' n2 },V 2 ∈V 1 。
5. The line segment after the primary screening of the curvature is only a partial line segment on the power line, is incomplete, and is usually disconnected. Therefore, the aggregation needs to be further performed according to a line segment projection method, and if the two line segments are collinear, the two line segments are connected. The principle of the line segment projection method is shown in FIG. 3, and two line segments are assumed to be l 1 And l 2 The line segment end points are respectively extended to the boundary of the image according to the tangent lines of the line segment end points, and the corresponding coordinates of projection points formed by the line segment end points are respectively { A, B } and { A ', B' }, A, B, A 'and B' are respectively (0, y) A )、(0,y B )、(W,y A' ) And (W, y) B' ) W is the length of the aerial image, and the projection distances at the two ends of the aerial image are d A =|y A -y B |,d B =|y A' -y B' L, |; if l is 1 And l 2 Collinear, then projection distance d A And d B Min (d) should be satisfied A ,d B ) T is less than or equal to T. In order to prevent two line segments that are close and approximately parallel to each other from being determined to be collinear, and in consideration of the influence of the width of the power line, a threshold value T of 10 is set here.
And if the polar coordinate equation of the tangent of the segment end point is rho-x-cos theta + y-sin theta, wherein rho is the polar diameter of the tangent, theta is the included angle between the tangent of the end point and the horizontal transverse axis of the aerial image, and (x, y) are the coordinates of the segment end point, d is the coordinate of the segment end point A And d B Calculated from the following equation:
wherein l 1 And l 2 Respectively is l 1 :ρ 1 =x·cosθ 1 +y·sinθ 1 ,l 2 :ρ 2 =x·cosθ 2 +y·sinθ 2 ,ρ 1 Is 1 1 Pole diameter of (a) (. theta.) 1 Is 1 1 Tangent and aerial photography of end pointAngle of horizontal axis of image, p 2 Is 1 2 Pole diameter of (a), [ theta ] 2 Is 1 2 And the included angle between the tangent line of the end point and the horizontal transverse axis of the aerial image.
6. After the line segments are screened secondarily by the line segment projection method, the two-dimensional vector of the image can be changed from V 3 Represents:
n is the number of power lines. V' after being aggregated by the line segment projection method in step 5 in consideration of the influence of the width of the power line " i No longer a single pixel width. To obtain a single pixel wide power line detection result, v " i Carrying out iterative processing to obtain a vector with a single pixel widthThen
The method comprises the following specific steps: first according to v " i The abscissa of each point in the series, v in small to large order " i Are sequenced to obtain v' i ={(x' 1 ,y' 1 ),(x' 2 ,y' 2 ),...,(x' t ,y' t ) } mixing (x,' 1 )y' 1 As a starting point P start1 (x, y), go through v 'in order' i Find and (x' 1 ,y' 1 ) Is taken as the end point P end1 (x, y) passing through the starting point P start1 (x, y) and an end point P end1 (x, y) obtainingThe new coordinates in (1) ares is v' i Middle P start1 (x, y) to P end1 The total number of points of (x, y); v' i Middle P end1 As a new starting point P start2 (x, y) repeating the above steps up to v ″' i All the coordinates are traversed to obtain the linear quantity of single pixel widthAnd is s t Is v' i Middle P startt (x, y) to P endt The total number of coordinates between (x, y).
7. And fitting the transmission line. After the power line detection operation, there may be a situation where the power line is not complete. In the power line aerial image, the power line always penetrates through the whole image, so that the complete power line can be still determined through the partial fitting points. Suppose a line segmentIs a fitting equation ofa k (k ═ 0, 1.., n) denotes the fitting parameterization, and n denotes the number of poles of the fitting polynomial. According to the least square methodFitting is performed toPixel point of (x) t ,y t ) Determining a fitting parameter a k (k ═ 0, 1.., n) minimizes the sum of squares of the differences in the Y direction, as shown in equation (6).
Derivation of equation (6) yields a true symmetric positive definite matrix:
solving the matrix can obtain a fitting parameter a meeting the fitting condition k (k-0, 1.., n), determining the equation of the power line in the image.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.
Claims (10)
1. The method for extracting the power transmission line based on the line characteristics is characterized by comprising the following steps of:
preprocessing an aerial image acquired by an unmanned aerial vehicle through an image enhancement algorithm, improving the contrast between a power transmission line and a background in the aerial image, and obtaining a gray level image I gray ;
Extracting smooth and complete edge segments from the gray level image based on an edge detection algorithm to obtain an edge image I edge ,I edge The gray value of the pixel point of the middle edge segment is 255, I edge The gray value of the pixel point of the middle non-edge part is 0;
by vector tracking algorithm, I edge The edge segment in (1) is transformed into a two-dimensional vector and I is deleted edge Obtaining V from the edge segment of less than 20 pixel points 1 ,V 1 ={v 1 ,v 2 ,...,v i ,...,v n1 Wherein n1 is V 1 Number of medium two-dimensional vectors, v i Representing a certain i-th two-dimensional vector, v i Comprising m pixels with a grey value of 255, denoted v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},(x m ,y m )∈I edge ,m>20;
Based on the curvedness characteristics of the transmission line, all over-bends are deletedObtaining a two-dimensional vector V by a curved two-dimensional vector 2 ,V 2 ={v' 1 ,v' 2 ,...v' i ,...,v' n2 },V 2 ∈V 1 Wherein n2 is V 2 The number of the medium two-dimensional vectors;
two-dimensional vector V according to line segment projection method 2 Carrying out polymerization to obtain a two-dimensional vector V related to the transmission line 3 ,V 3 ={v” 1 ,v” 2 ,...,v” i ,...,v” N },V 3 ∈V 2 Wherein N represents V 3 The number of medium two-dimensional vectors, also representing the number of detected power lines, v " i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x t ,y t ) Denotes the ith transmission line two-dimensional vector;
to V 3 Two-dimensional vector v of all transmission lines in " i Iterative processing is carried out to obtain a two-dimensional vector of the transmission line with single pixel width All transmission line two-dimensional vectors v " i The vector set of the transmission line obtained after the iterative processing is V 4 ,
And fitting the power transmission line based on a least square method to determine a polynomial equation of the power transmission line in the aerial photography image.
2. The line feature-based power transmission line extraction method according to claim 1,
preprocessing an aerial image acquired by an unmanned aerial vehicle through an image enhancement algorithm, improving the contrast between a power transmission line and a background in the aerial image, and obtaining a gray level image I gray The method comprises the following steps:
a. the aerial image is a color RGB imageAerial image is I rgb Each corresponding color vector is (r, g, b), max is the maximum value among the r component, the g component, and the b component, min is the minimum value among the r component, the g component, and the b component, and the (h, s, v) value in the corresponding HSV space is:
according to the formula (1) adding I rgb Respectively obtaining saturation images I after converting into HSV space h Tone image I s And a luminance image I v ;
b. For the v component, for the luminance image I v Is processed by histogram equalization to obtain I' v Improving the image contrast;
c. will I h 、I s And l' v And combining to obtain HSV images, wherein the corresponding vectors are (h ', s', v '), converting the vectors into RGB color space by the HSV space, and the value of each color vector (r', g ', b') in the corresponding RGB color space is as follows:
whereinp ═ v '× (1-s'), q ═ v '× (1-f × s'), t ═ v '× (1- (1-f) × s'), and the processed color RGB image is I hrgb ;
d. Will I hrgb Converted into a grey-scale image I gray And to I gray And bilateral filtering is adopted, so that noise caused by equalization is eliminated, and background interference is reduced.
3. The line feature-based power transmission line extraction method according to claim 1,
edge detection algorithm based from gray level image I gray Extracting smooth and complete edge segments to obtain an edge map I edge ,I edge The gray value of the pixel point of the middle edge segment is 255, and the gray value of the pixel point of the non-edge part is 0, and the method specifically comprises the following steps:
a. firstly, the original gray image I is processed by a Gaussian filter gray Processing to obtain image Img 0 ;
b. Processing Img with Sobel operator 0 Obtaining a gradient map Img 1 ;
c. According to Img 1 Calculating Img 0 Obtaining an anchor point diagram Img 2 ;
d. Connecting and drawing each anchor point to obtain an edge graph I edge ,I edge Gray value of middle background is 0, I edge The grey value of the medium transmission line is 255.
4. The line feature-based power transmission line extraction method according to claim 1,
by vector tracking algorithm, I edge The edge segment in (1) is transformed into a two-dimensional vector and I is deleted edge Obtaining V from the edge segment of less than 20 pixel points 1 ,V 1 ={v 1 ,v 2 ,...,v i ,...,v n1 Wherein n1 is V 1 Number of medium two-dimensional vectors, v i Representing some ith two-dimensional vector, v i Comprising m pixels with a grey value of 255, denoted v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m ) The method comprises the following steps:
in I edge Based on the vector tracking algorithm, I is calculated edge Edge segment in (1) is transformed into a two-dimensional vector V 1 ;
From I edge The left lower corner of the image is scanned line by line until a pixel point with a gray value of 255 is found, and the pixel point is taken as the starting position of the current vector and is recorded as a current pixel Q;
setting the gray value of the position of the current pixel Q as 0, searching 8 neighborhoods of the current pixel Q according to the sequence from left to right and from bottom to top, and recording the encountered pixel point with the first gray value of 255 as the current pixel Q;
then search 8 neighborhoods of Q again according to the previous step until I is reached edge The edge or a pixel point with the gray value of 255 exists in the 8 neighborhoods of the current pixel;
deleting I in vectorization process edge Edge segment of less than 20 pixels in the image, then V 1 Can be represented by formula (3), I edge Of (2) a point (x) where the gray value of each pixel point is not 0 j ,y j ) Are assigned to V according to the above steps 1 V in (1) i ,
5. The line feature-based power transmission line extraction method according to claim 1,
based on the curve characteristics of the power transmission line, deleting all over-bent two-dimensional vectors to obtain a two-dimensional vector V 2 ,V 2 ={v' 1 ,v' 2 ,...v' i ,...,v' n2 },V 2 ∈V 1 Wherein n2 is V 2 The number of the medium two-dimensional vectors specifically includes the following contents:
arbitrary transmission line is arbitrarily divided into a plurality of consecutive segments { seg 1 ,seg 2 ,...,seg a A is the number of segments, and the slope corresponding to each segment is k i ,i∈[1,a];
The slope difference of the linear shape segment is 0, and the slope difference of the curve shape segment is less than a set threshold Vk, namely | k c -k e |<Vk,k c And k e Is the slope corresponding to any segment, and c, e ∈ [1, a ]];
The two-dimensional vector of any line segment obtained in the step 3) is represented by v i Is denoted by v i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},(x m ,y m )∈I edge (ii) a V is to be i Trisection, watchShown asWhereinRepresenting the m-th in the two-dimensional vector 1 A coordinate, i.e. Representing the m-th in the two-dimensional vector 2 A coordinate, i.e.Trisecting the transmission line into three parts based on the curvature characteristics of the transmission lineAndcorresponding slopes are respectivelyAndwherein
6. The line feature-based power transmission line extraction method according to claim 5,
two-dimensional vector V according to line segment projection method 2 Carrying out polymerization to obtain a two-dimensional vector V related to the transmission line 3 ,V 3 ={v” 1 ,v” 2 ,...,v” i ,...,v” N },V 3 ∈V 2 Wherein N represents V 3 The number of medium two-dimensional vectors, also representing the number of detected power lines, v " i ={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x t ,y t ) Representing the two-dimensional vector of the ith transmission line, and comprising the following steps of:
two line segments are defined as l 1 And l 2 ,l 1 Tangent sum of endpoints l 2 The tangents to the end points extend to the boundaries of the aerial image, l 1 Tangent sum of endpoints l 2 The tangent to the endpoint forms a projection point at the left edge of the boundary of the aerial image, denoted as { A, B }, l, respectively 1 Tangent sum of endpoints l 2 The tangent to the endpoint forms a projection point at the right edge of the boundary of the aerial image, and the coordinates corresponding to the projection points are respectively (0, y ', B' }, A, B, A 'and B') A )、(0,y B )、(W,y A' ) And (W, y) B' ) W is the length of the aerial image, then l 1 Tangent sum of endpoints l 2 The projection distance of the tangent of the end point on the left edge of the boundary of the aerial image is d A =|y A -y B |,l 1 Tangent sum of endpoints l 2 The projection distance of the tangent line of the end point on the right edge of the boundary of the aerial image is d B =|y A' -y B' If l 1 And l 2 Collinear, then projection distance d A And d B Min (d) should be satisfied A ,d B )≤T;
And if the polar coordinate equation of the tangent of the segment end point is rho-x-cos theta + y-sin theta, wherein rho is the polar diameter of the tangent, theta is the included angle between the tangent of the end point and the horizontal transverse axis of the aerial image, and (x, y) are the coordinates of the segment end point, d is the coordinate of the segment end point A And d B Calculated from the following equation:
wherein l 1 And l 2 Respectively is l 1 :ρ 1 =x·cosθ 1 +y·sinθ 1 ,l 2 :ρ 2 =x·cosθ 2 +y·sinθ 2 ,ρ 1 Is 1 1 Pole diameter of (a) (. theta.) 1 Is 1 of 1 Angle between tangent line of end point and horizontal cross axis of aerial image, rho 2 Is 1 2 Pole diameter of (a) (. theta.) 2 Is 1 2 And the included angle between the tangent line of the end point and the horizontal transverse axis of the aerial image.
7. The line feature-based power transmission line extraction method according to claim 1,
to V 3 Two-dimensional vector v of all transmission lines in " i Iterative processing is carried out to obtain a two-dimensional vector of the transmission line with single pixel width All transmission line two-dimensional vectors v " i The vector set of the transmission line obtained after the iterative processing is V 4 ,The method specifically comprises the following steps:
first according to v " i The abscissa of each point in the series, v in small to large order " i Are sequenced to obtain v' i ={(x' 1 ,y' 1 ),(x' 2 ,y' 2 ),...,(x' t ,y' t ) } mixing (x' 1 ,y' 1 ) As a starting point P start1 (x, y), traverse v' i Find and (x' 1 ,y' 1 ) Is taken as the end point P end1 (x, y) passing through the starting point P start1 (x, y) and an end point P end1 (x, y) to obtainThe new coordinates in (1) ares 1 Is v' i Middle P start1 (x, y) to P end1 The total number of coordinates between (x, y); v' i Middle P end1 As a new starting point P start2 (x, y) repeating the above steps up to v ″' i All the coordinates are traversed to obtain the linear quantity of single pixel widthAnd is s t Is v' i Middle P startt (x, y) to P endt The total number of coordinates between (x, y).
8. The line feature-based power transmission line extraction method according to claim 7,
fitting the power transmission line based on a least square method to determine a polynomial equation of the power transmission line in an aerial photography image, and specifically comprises the following steps:
line segmentIs a fitting equation ofa k Representing the fitting parameters, k is 0,1, …, n represents the pole number of the fitting polynomial;
according to the least square methodFitting is performed based onPixel point of (x) t ,y t ) Determining a fitting parameter a k Fitting parameter a k The condition for minimizing the sum of squares of the differences in the Y direction is satisfied, as shown in equation (5):
deriving equation (5) to obtain a real symmetric positive definite matrix:
9. The line feature-based power transmission line extraction method of claim 3, wherein the Gaussian filter uses a 5 x 5 Gaussian kernel with σ -1, and the background gray value comprises a sky gray value.
10. The method according to claim 6, wherein the threshold Vk is 0.27, and the threshold T is 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011338502.7A CN112464789B (en) | 2020-11-25 | 2020-11-25 | Power transmission line extraction method based on line characteristics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011338502.7A CN112464789B (en) | 2020-11-25 | 2020-11-25 | Power transmission line extraction method based on line characteristics |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112464789A CN112464789A (en) | 2021-03-09 |
CN112464789B true CN112464789B (en) | 2022-09-02 |
Family
ID=74799964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011338502.7A Active CN112464789B (en) | 2020-11-25 | 2020-11-25 | Power transmission line extraction method based on line characteristics |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112464789B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116912273B (en) * | 2023-09-13 | 2023-12-12 | 国网山东省电力公司莱芜供电公司 | Three-dimensional GIS-based transmission line crossing construction scheme visualization method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107341470A (en) * | 2017-07-03 | 2017-11-10 | 国网浙江省电力公司信息通信分公司 | A kind of transmission of electricity line detecting method based on Aerial Images |
CN109325935A (en) * | 2018-07-24 | 2019-02-12 | 国网浙江省电力有限公司杭州供电公司 | A kind of transmission line faultlocating method based on unmanned plane image |
CN109615598A (en) * | 2018-12-10 | 2019-04-12 | 武汉大学 | A kind of power transmission line recognition methods based on the free algorithm of edge mapping parameter |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106356757B (en) * | 2016-08-11 | 2018-03-20 | 河海大学常州校区 | A kind of power circuit unmanned plane method for inspecting based on human-eye visual characteristic |
-
2020
- 2020-11-25 CN CN202011338502.7A patent/CN112464789B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107341470A (en) * | 2017-07-03 | 2017-11-10 | 国网浙江省电力公司信息通信分公司 | A kind of transmission of electricity line detecting method based on Aerial Images |
CN109325935A (en) * | 2018-07-24 | 2019-02-12 | 国网浙江省电力有限公司杭州供电公司 | A kind of transmission line faultlocating method based on unmanned plane image |
CN109615598A (en) * | 2018-12-10 | 2019-04-12 | 武汉大学 | A kind of power transmission line recognition methods based on the free algorithm of edge mapping parameter |
Also Published As
Publication number | Publication date |
---|---|
CN112464789A (en) | 2021-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109615611B (en) | Inspection image-based insulator self-explosion defect detection method | |
CN107680054B (en) | Multi-source image fusion method in haze environment | |
CN109785291B (en) | Lane line self-adaptive detection method | |
JP5542889B2 (en) | Image processing device | |
JP5362878B2 (en) | Image processing apparatus and image processing method | |
CN110516550B (en) | FPGA-based lane line real-time detection method | |
Mu et al. | Lane detection based on object segmentation and piecewise fitting | |
US11854244B2 (en) | Labeling techniques for a modified panoptic labeling neural network | |
CN108961286B (en) | Unmanned aerial vehicle image segmentation method considering three-dimensional and edge shape characteristics of building | |
CN107818303B (en) | Unmanned aerial vehicle oil and gas pipeline image automatic contrast analysis method, system and software memory | |
CN110268420B (en) | Computer-implemented method of detecting a foreign object on a background object in an image, device for detecting a foreign object on a background object in an image, and computer program product | |
CN110268442B (en) | Computer-implemented method of detecting a foreign object on a background object in an image, device for detecting a foreign object on a background object in an image, and computer program product | |
CN112991283A (en) | Flexible IC substrate line width detection method based on super-pixels, medium and equipment | |
CN115631116B (en) | Aircraft power inspection system based on binocular vision | |
CN112200746A (en) | Defogging method and device for traffic scene image in foggy day | |
CN112464789B (en) | Power transmission line extraction method based on line characteristics | |
CN116805356A (en) | Building model construction method, building model construction equipment and computer readable storage medium | |
CN115841633A (en) | Power tower and power line associated correction power tower and power line detection method | |
Chaloeivoot et al. | Building detection from terrestrial images | |
CN112686872B (en) | Wood counting method based on deep learning | |
JP2014106713A (en) | Program, method, and information processor | |
Chen | Superpixel segmentation based on Delaunay Triangulation | |
Rui | Lane line detection technology based on machine vision | |
CN113807238A (en) | Visual measurement method for area of river surface floater | |
Li et al. | Quantitative evaluation for dehazing algorithms on synthetic outdoor hazy dataset |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |