Disclosure of Invention
Aiming at the problems, the invention aims to provide a laser radar-based insulator string automatic identification method with high identification precision.
The technical scheme adopted by the invention for solving the technical problems is as follows: the laser radar-based insulator string identification method comprises the following steps of:
acquiring a depth image: obtaining a depth image through laser radar equipment arranged on the robot;
preprocessing of the depth image: preprocessing the depth image with the insulator string to obtain an interested area;
feature extraction of the depth image: in the interested region, establishing a depth characteristic curve model, constructing a depth periodic characteristic matrix and a width vector, and extracting insulator string segment number characteristics and disc diameter variation characteristics;
identifying the type of an insulator string: and identifying the type of the insulator string according to the extracted features.
The depth image preprocessing comprises the following steps:
(2.1) carrying out binarization processing on the depth image, separating a foreground and a background in the depth image, and eliminating background interference;
(2.2) carrying out expansion operation on the processed binary image, and then carrying out corrosion operation to eliminate interference pixel points on the binary image;
and (2.3) selecting the maximum connected region, extracting the region of interest, and finishing pretreatment.
The depth characteristic curve model is established as follows:
extracting the left edge of the target area:
lik=k,
extracting the right edge of the target area:
rik=k,
where D (x, y) is a binary image, k represents the number of rows in the image, t represents the number of columns in the image, lk,rkPixel point locations on the edge;
determining the position on the line in the target area by the left and right edges:
mik=k,
in the formula mkAs coordinates of the depth profile pixel points, mikIs a depth profile pixel point row coordinate, mjkThe pixel point row coordinates of the depth characteristic curve are obtained; n isIThe number of image lines;
establishing a depth characteristic curve model:
f(xk,yk)=0
wherein:
xk=mik
xkas the abscissa of the characteristic curve, i.e. the number of image lines, ykIs the ordinate of the characteristic curve, namely the depth value; l (m)k) Representing a depth image.
The construction of the depth periodic feature matrix comprises the following steps:
firstly, the depth characteristic curve f (x) is obtainedk,yk) Maximum and minimum values on 0; building (2)Vertical matrix
In the formula:
v2kis a depth characteristic curve f (x)k,yk) 0 on the abscissa of the extreme point, v3kIs a depth characteristic curve f (x)k,yk) The ordinate of the extreme point on 0, namely the depth value; k is 1,2 … nI;
Setting a threshold lambda
c1,λ
c2And lambda
c1﹤λ
c2(ii) a Then to
Traversing by column to obtain V
3,k+1-V
3,k>λ
c1And V
3,k+1-V
3,k<λ
c2Time V
1,kAnd V
2,kRecording; when the traversal is finished, the values meeting the conditions are formed into a matrix according to the recording sequence
V is to be
1,kRecorded in a matrix
First row of (v)
2,kRecorded in the second row of the matrix, resulting in:
n3is the number of matrix columns;
then to
Go through the rows by row, order
c1,k=abs(v11,k+1-v11,k)
c2,k=v12,k+1-v12,k
c3,k=v12,k
Obtaining a depth periodic feature matrix
Constructing a width vector:
in the formula:
i=1,2…nI
(xi1,yi1,zi1) Is the spatial coordinate of the left edge point, (x)i2,yi2,zi2) Is the spatial coordinate of the right edge point; n isIRepresenting the number of image lines.
The method for extracting the insulator string number characteristics and the disc diameter variation characteristics comprises the following steps:
(1) by
Extracting insulator string segment number characteristics
First, a threshold value alpha is setcInitializing the flag bit deltacIs 0, the segment number information num (C) is 0;
then to
Traversing by columns:
when C is present1,k=1,C2,k<αcAnd deltacWhen equal to 0, set the flag bit deltacIs 1, and C is3,kStored in vector T as upper edge of insulator string;
When deltac1 and C1,k0 or C2,k>αcSetting a flag bit deltacIs 0, adding C3,kStoring the lower edge of the insulator string into the vector T, and adding 1 to the number information num (C);
vector T is the upper and lower edges of the insulator string, where the odd-term element T2n-1The even-numbered element t being the upper edge of the insulator string2nThe lower edge of the insulator string; n is 1,2 … k1;k1Is the length of the vector T.
(2) Extracting disc diameter change characteristics of insulator string from W
And calculating the width variance of the insulator string according to the vector T:
when d is2< threshold value alphawThe insulator is equal in disc diameter, otherwise, the insulator is variable in disc diameter.
The method for identifying the insulator string type according to the extracted features comprises the following steps:
if num (C) is 1, and d2< threshold value alphawIf the insulator string is a single-section insulator string with the same disc diameter; if num (C) is 2, and d2< threshold value alphawIf num (c) is 1 and d is equal to d2> threshold value alphawAnd the insulator string is a single-section disc-changing insulator string.
The invention has the following beneficial effects and advantages:
1. the invention utilizes the laser depth periodicity characteristic, the insulator string spacing characteristic and the disc diameter characteristic to identify, has high insulator identification accuracy, improves the working efficiency, and provides a basis for the completion of tasks of the transformer substation inspection robot.
2. The invention adopts the laser radar as the sensor, and can accurately identify the insulator string under the backlight condition. In the depth image, the foreground and the background can be accurately separated, and the influence of the complex background on the identification precision is overcome.
Detailed Description
The present invention will be described in further detail with reference to examples.
A laser radar-based insulator string automatic identification method comprises the following steps:
(1) acquiring a depth image: installing laser radar equipment on the transformer substation inspection robot, fixing the laser radar equipment on a holder, and rotating the laser radar by a fixed angle to obtain a depth image;
(2) preprocessing of the depth image: and preprocessing the depth image with the insulator string to obtain the interested region.
(3) Feature extraction of the depth image: in the interested region, a depth characteristic curve model is established, a depth periodic characteristic matrix and a width vector are established, and insulator string segment number characteristics and disc diameter variation characteristics are extracted.
(4) Identifying the type of an insulator string: and identifying the type of the insulator string according to the extracted features.
The depth image preprocessing comprises the following steps:
and (2.1) separating the foreground and the background in the depth image through depth binarization processing, and eliminating background interference in the depth image.
And (2.2) processing the depth binary image by adopting image morphology, firstly adopting expansion operation, and then adopting corrosion operation to eliminate interference pixel points on the depth binary image.
And (2.3) selecting the maximum connected domain from the depth binary image, extracting the interested region and finishing the pretreatment.
The feature extraction method of the depth image comprises the following steps:
(3.1) establishing a depth characteristic curve model, wherein the defined depth characteristic curve can reflect the characteristics of the insulator string, and the method comprises the following steps:
extracting the left edge of the target area:
lik=k,
extracting the right edge of the target area:
rik=k,
where D (x, y) is a depth binary image, k represents the number of rows of the image, t represents the number of columns of the image, lk,rkPixel point locations on the edge. n isIRepresented as the maximum number of lines of the image. From these two sets, a set of positions on the line in the target area can be determined.
mik=k,
In the formula mkAs coordinates of the depth profile pixel points, mikIs a depth profile pixel point row coordinate, mjkIs the pixel point column coordinate of the depth characteristic curve.
Establishing a depth characteristic curve model:
f(xk,yk)=0
wherein:
xk=mik
xkas the abscissa of the characteristic curve, i.e. the number of image lines, ykIs the ordinate of the characteristic curve, namely the depth value; l (m)k) Representing a depth image.
And (3.2) constructing a depth periodic feature matrix and a width vector through a certain rule, and extracting the insulator string number features and the disc diameter variation features.
And analyzing the number characteristics and the width characteristics of the insulator string segments extracted from the depth image to finish the identification of the insulator string.
The flow chart of the laser radar-based insulator string automatic identification method is shown in figure 1. The specific process is as follows:
1. laser radar data acquisition
The laser radar scans the insulator string region to obtain a laser depth image L (x, y), as shown in fig. 2.
2. Image pre-processing
Binarizing the depth image according to formula (1):
d (x, y) represents binarization, and M is a threshold value. And then carrying out expansion corrosion operation and marking the maximum connected domain. After pretreatment, the foreground and background can be separated to obtain the insulator string and the erection thereof. As shown in fig. 3.
3. Establishing a depth characteristic curve model
According to the depth periodic variation of the region where the insulator string is located in the depth image, a depth characteristic curve model is established, and the method comprises the following steps:
extracting the left edge of the target area:
lik=k,
extracting the right edge of the target area:
rik=k,
where D (x, y) is a binary image, k represents the number of rows in the image, t represents the number of columns in the image, lk,rkPixel point locations on the edge. The left edge and the right edge are respectively the left edge and the right edge of the insulator string. From these two sets, a set of positions of the lines in the target area can be determined.
mik=k,
In the formula mkAs coordinates of the depth profile pixel points, mikIs a depth profile pixel point row coordinate, mjkIs a depth characteristic curvePixel point column coordinates.
Establishing a depth characteristic curve model:
f(xk,yk)=0
wherein:
xk=mik
as shown in fig. 4, the abscissa represents the number of image lines, and the ordinate represents the depth value.
4. Constructing depth periodic feature and width feature vectors
(1) Constructing a depth periodic feature matrix:
firstly, the depth characteristic curve f (x) is obtainedk,yk) Maximum and minimum values on 0. Building a matrix
In the formula:
v
2kis a depth characteristic curve f (x)
k,y
k) 0 on the abscissa of the extreme point, v
3kIs a depth characteristic curve f (x)
k,y
k) The ordinate of the extreme point at 0, i.e. the depth value. n is
1Representation matrix
Number of columns, n
2Representation matrix
The number of columns.
Setting a threshold lambda
c1,λ
c2,λ
c1﹤λ
c2In this embodiment, 3 and 10 are taken, respectively. Then to
Go through by column, go v
3,k+1-v
3,k>λ
c1And v is
3,k+1-v
3,k<λ
c2V of time
1,kAnd v
2,kAnd recording is carried out. When the traversal is finished, the values meeting the conditions are formed into a matrix according to the recording sequence
V is to be
1,kRecorded in a matrix
First row of (v)
2,kRecorded in the second row of the matrix, resulting in:
n3is the number of matrix columns.
Then go through V1 by column, let
c1,k=abs(v11,k+1-v11,k)
c2,k=v12,k+1-v12,k
c3,k=v12,k
And obtaining a depth periodic feature matrix.
(2) The width feature vector is constructed as follows:
in the formula:
i=1,2...nI
(xi1,yi1,zi1) Is the spatial coordinate of the left edge point, (x)i2,yi2,zi2) The spatial coordinates of the right edge point. n isIRepresenting the maximum number of lines of the image. Here, the
5. Extracting insulator string segment number characteristic and disc diameter characteristic
(1) By
Extracting insulator string segment number characteristics
First, a threshold value alpha is setcIn this embodiment, 15 is taken. Initialization flag bit deltacIs 0, and the segment number information num (C) is 0.
Then to
Traversal is performed by column. When C is present
1,k=1,C
2,k<α
cAnd delta
cWhen equal to 0, set the flag bit delta
cIs 1, and C is
3,kAnd storing the vector T as the upper edge of the insulator string. When delta
c1 and C
1,k0 or C
2,k>α
cSetting a flag bit delta
cIs 0, adding C
3,kAnd storing the lower edge of the insulator string into the vector T, and adding 1 to the segment number information num (C). Traversing to the tail end of the matrix to finish the recognition of the insulator string. Vector T is the upper and lower edges of the insulator string, where the odd-term element T
2n-1The even-numbered element t being the upper edge of the insulator string
2nThe lower edge of the insulator string. n is 1,2 … k
1;k
1Is the length of the vector T.
(2) Extracting disc diameter change characteristics of insulator string from W
And calculating the width variance of the insulator string according to the vector T:
when d is2<αwWhen is αwFor the threshold, this embodiment takes 0.01. (ii) a And extracting the disc diameter characteristic as equal disc diameter, otherwise, extracting the disc diameter characteristic as variable disc diameter.
6. Insulator string type identification
And identifying three types of pillar insulator strings in the transformer substation according to the section number information and the disc diameter change information. Combining the obtained characteristics of the number of segments and the disc diameter, if num (C) is 1 and d is2< threshold value alphawIf num (c) is 2 and d is equal to d2< threshold value alphawIf num (c) is 1 and d is equal to d2> threshold value alphawAnd the insulator string is a single-section disc-changing insulator string. And (4) identifying three insulator strings commonly used by the transformer substation. As shown in fig. 5, the insulator string is a two-section equal-disc-diameter insulator string.