CN109344766A - Slide block type breaker recognition methods based on crusing robot - Google Patents
Slide block type breaker recognition methods based on crusing robot Download PDFInfo
- Publication number
- CN109344766A CN109344766A CN201811148601.1A CN201811148601A CN109344766A CN 109344766 A CN109344766 A CN 109344766A CN 201811148601 A CN201811148601 A CN 201811148601A CN 109344766 A CN109344766 A CN 109344766A
- Authority
- CN
- China
- Prior art keywords
- image
- circuit breaker
- type circuit
- target
- area
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000007689 inspection Methods 0.000 claims abstract description 42
- 238000012549 training Methods 0.000 claims abstract description 39
- 238000001514 detection method Methods 0.000 claims abstract description 28
- 238000012216 screening Methods 0.000 claims abstract description 13
- 238000005286 illumination Methods 0.000 claims abstract description 11
- 238000007781 pre-processing Methods 0.000 claims abstract description 8
- 238000010801 machine learning Methods 0.000 claims abstract description 6
- 239000013598 vector Substances 0.000 claims description 33
- 238000012706 support-vector machine Methods 0.000 claims description 27
- 230000006870 function Effects 0.000 claims description 25
- 238000004364 calculation method Methods 0.000 claims description 20
- 238000012937 correction Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 7
- 238000004146 energy storage Methods 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 6
- 238000005520 cutting process Methods 0.000 claims description 4
- 238000001914 filtration Methods 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 238000003860 storage Methods 0.000 claims description 2
- 235000013399 edible fruits Nutrition 0.000 claims 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 abstract 1
- 238000012163 sequencing technique Methods 0.000 description 3
- 230000036544 posture Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The slide block type breaker recognition methods based on crusing robot that the invention proposes a kind of.The present invention is broadly divided into 5 steps: (1) utilizing picture number collection training SVM multi-categorizer;(2) crusing robot reaches specified inspection point and obtains picture to be detected;(3) coarse positioning and accurate positioning are carried out to target area, screening object candidate area obtains slide block type breaker;(4) to slide block type breaker progress image preprocessing is got, connection maximum two regions of area are extracted;(5) the HOG feature of two connected regions is extracted respectively, and is sent to SVM multi-categorizer and is obtained final recognition result.The present invention utilizes machine learning, and slide block type breaker detection identification mission can be efficiently accomplished under the conditions of different illumination, posture, the gentle accuracy rate of Automated water of image recognition under complex environment is improved, reduces missing inspection, erroneous detection problem to greatest extent.
Description
Technical Field
The invention relates to a target detection technology, in particular to a slider type circuit breaker identification method based on an inspection robot.
Background
The electric power industry is closely related to the life of people, and the slider type circuit breaker of a transformer substation is the most basic device in the electric power industry and is very important for power supply. In recent years, the slider circuit breaker sometimes fails to detect and recognize the position, so that the phenomenon that electricity cannot be normally transmitted occurs, and huge economic losses are caused to people's lives and industrial production.
At present, two types of detection methods for the circuit breaker are mainly used, and the first type is a manual inspection method. However, most of the circuit breakers of the transformer substation are located outdoors, so that the distance between workers is long, and the problems can not be solved in time, so that the power supply system cannot respond in time. Moreover, manual inspection usually consumes a lot of manpower and time, and is prone to error in a long-time and high-intensity working environment. Therefore, the manual inspection method has the defects of high labor intensity, low efficiency, insufficient inspection, poor reliability, high risk and the like. In recent years, along with the popularization of inspection robots, the detection work of slider circuit breakers gradually develops towards the intelligent direction. The electric power inspection robot is used for replacing manual inspection, and the electric power inspection robot has the advantages of high efficiency, high reliability and the like. However, most of the existing methods utilize the traditional image processing means for detection and identification, the detection effect is poor under the condition of changing illumination conditions, and generally one illumination condition needs a group of parameters, so that a relatively universal detection and identification method needs to be provided to deal with detection tasks under different illumination and posture conditions.
Disclosure of Invention
The invention aims to provide a slider type circuit breaker identification method based on an inspection robot, and solves the problems that when the position of the robot is uncertain, the target size and angle change is large, and the target is greatly influenced by illumination, so that the detection and identification are inaccurate in the existing slider type circuit breaker detection and identification technology.
The technical solution for realizing the invention is as follows: a method for identifying a slider type circuit breaker based on an inspection robot comprises the following specific steps:
step 1, selecting a picture in the middle of the circuit breaker shot at each inspection point as a template picture for each inspection point, and training an SVM (support vector machine) multi-classifier by utilizing a slider type circuit breaker picture number set collected in advance;
step 2, the inspection robot reaches a specified inspection point through positioning and navigation, acquires an on-site slider type circuit breaker image and reads the image in a gray scale pattern form for detection and identification of the slider type circuit breaker;
step 3, carrying out coarse positioning and accurate positioning on a target area to be detected, and screening a target candidate area to obtain a slider type circuit breaker image;
step 4, preprocessing the acquired on-site slider type circuit breaker image, extracting two areas with the largest communication area, and dividing the two areas into a left part and a right part according to positions;
and 5, respectively carrying out pixel adjustment on the two separated regions, sliding a sliding window with the length of m pixels and the width of n pixels on the image, extracting HOG characteristics from the window, and sending the HOG characteristic operator obtained by calculation into the SVM multi-classifier to obtain a final recognition result.
Preferably, the specific method for training the SVM multi-classifier in step 1 is as follows:
step 1-1, collecting a slider type circuit breaker image number set in advance as a positive and negative training sample set;
step 1-2, extracting HOG characteristics of a positive and negative training sample set;
and 1-3, endowing all positive and negative training sample sets with sample labels, and sending the HOG characteristics of the training sample sets and the sample labels into the SVM for training.
Preferably, the specific method for preparing the training sample set in step 1-1 is as follows:
(1) collecting pictures of the slider type circuit breaker, and taking the pictures in an energy storage state as a positive sample set and the pictures in an energy non-storage state as a negative sample set;
(2) cutting pictures, and deleting redundant information outside a slider display window area on the slider type circuit breaker;
(3) the picture is scaled to m pixels long and n pixels wide.
Preferably, the specific method for extracting the positive and negative training sample set HOG features in step 1-2 is as follows:
(1) converting the color image into a gray image;
(2) gamma correction is carried out on the gray level image, the local shadow and illumination change of the image are reduced, and the formula of the Gamma correction is as follows:
I(x,y)=I(x,y)gamma(1)
wherein I (x, y) represents the pixel value of the x row and the y column of the image, and gamma takes a number between 0 and 1;
(3) the gradient of each pixel of the image is calculated according to the following formula:
Gx(x,y)=H(x+1,y)-H(x-1,y) (2)
Gy(x,y)=H(x,y+1)-H(x,y-1) (3)
wherein G isx(x,y),Gy(x, y), H (x, y) respectively represents the horizontal gradient, the vertical gradient and the pixel value of the pixel point (x, y) in the image, and the gradient magnitude G (x, y) and the gradient direction α (x, y) of the pixel point (x, y) can be obtained according to the following formula:
(4) dividing an image into square cells with the side length of a pixel, wherein a is the maximum common factor of m and n, creating a gradient direction histogram for each cell, dividing the gradient direction into k direction blocks by 360 degrees, and the direction range of the ith direction block isCounting the gradient direction of each pixel in the cell, and if the gradient direction belongs to a certain direction block, adding the count value of the corresponding direction block to the amplitude value corresponding to the gradient;
(5) combining the unit cells into blocks, rewriting the gradient histogram corresponding to each unit cell into a vector form by the intra-block normalized gradient histogram, and connecting all gradient vectors in each block in series to form a gradient direction histogram vector of the block; multiplying the vector by a corresponding normalization factor, wherein the calculation formula of the normalization factor is as follows:
wherein v represents a vector that has not been normalized, | v | | | luminance2A norm of order 2 representing v, e representing a constant;
(6) and connecting the normalized vectors of all the blocks in the image in series to obtain the HOG characteristic of the training sample set.
Preferably, the specific method for sending the HOG features and the sample labels of the positive and negative training sample sets into the SVM for training in step 1-3 is as follows:
(1) the training goal of the SVM is to find an optimal hyperplane that can classify positive and negative samples, and its mathematical form can be expressed as:
where w represents a vector perpendicular to the hyperplane, | | w | | | represents the norm of w, ξiRepresenting a relaxation variable, being a non-negative number, D being a parameter controlling the weight of two terms in the objective function, xiRepresenting HOG characteristics, y, of the ith sampleiA sample label representing the ith sample, b represents a constant;
(2) constructing a Lagrangian function:
wherein, αiRepresenting the Lagrange multiplier, ri=D-αiThen order
Transformation of objective function into
Wherein d is*Representing an optimal value of the objective function;
(3) let L minimize for w, b, ξ, i.e.:
by bringing equation (11) into equation (8), the objective function is transformed into:
wherein,<xi,xj>expression to xi,xjInner product of (d);
(4) lagrange multiplier α using SMO algorithmiUsing a heuristic algorithm to select a pair of lagrange multipliers αi,αjFixing device αi,αjDetermining α under the condition that w is extreme, among other parametersiIs taken from αiRepresentation αj(ii) a Repeating the steps until the target function is converged;
(5) determining an optimal hyperplane according to the optimal value of the Lagrange multiplier:
wherein,representing the optimum value of the Lagrange multiplier, w*,b*Respectively representing the direction of the optimal hyperplane and the offset from the origin;
(6) obtaining a classification decision function, namely a trained SVM classifier:
。
preferably, the specific steps of locating and screening the target region in step 3 are as follows:
step 3-1, roughly positioning a target circuit breaker region in a picture to be detected by utilizing Mellin Fourier transform and phase correlation technology;
3-2, accurately positioning the target circuit breaker region by using a machine learning method, and sending the image to be detected into a trained classifier to obtain a plurality of target candidate regions;
3-3, respectively solving intersection ratio parameters IOU of each target candidate area and the coarse positioning target sliding block type circuit breaker area; performing perceptual hash calculation on each target candidate area image and the slider type circuit breaker area image in the template image to obtain a perceptual hash index; and calculating mutual information indexes of each target candidate area image and the template image, and screening the target candidate areas to obtain the slider type circuit breaker.
Preferably, the hash index, the cross-over ratio parameter IOU and the mutual information index I (G) are sensed in step 3-3(X),H(Y)) Is particularly shownThe calculation method comprises the following steps:
(1) scaling the target candidate area image and the template image to the same size, performing cosine transform, selecting a low-frequency area at the upper left corner of the image after cosine transform, removing direct current components of coordinates (0,0) to obtain a characteristic vector, and calculating the Hamming distance of the characteristic vector of the target candidate area image and the characteristic vector of the template image to be used as a perceptual hash index;
(2) the specific calculation formula of the intersection ratio parameter IOU is as follows:
wherein C is a coarse positioning target breaker area, niA target candidate area is obtained;
(3) mutual information index I (G)(X),H(Y)) The calculation formula of (2) is as follows:
G(X)、H(Y)the number of grayscale pixels of the template image and the candidate image, respectively, and W, H the width and height of the candidate area image, respectively.
Preferably, the specific method for screening the target candidate area to obtain the slider type circuit breaker in step 3-3 is as follows:
weighting three indexes of the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate region to obtain the confidence coefficient of the candidate region, wherein D is a constant:
Confidence=1-(pHash+1/I(G(X),H(y)))/(IOU+D) (20)
and (4) sequencing the confidence degrees of all the candidate regions from high to low, and obtaining the region with the maximum confidence degree, wherein the region is used as a candidate detection result. If the IOU of the alternative detection result meets the condition that the IOU is less than the set threshold value threshold dIOU and (pHash +1/I (G)(X),H(Y)) When the circuit breaker area is larger than the threshold, the circuit breaker area with the rough positioning target determined in the step 3-2 is taken as a final target, otherwise, the alternative detection result is taken as the final target. The threshold value range is 0.1-0.4, and the threshold value range is 10-50.
Preferably, the specific method of image preprocessing in step 4 is:
step 4-1, histogram equalization is carried out on the gray level image, and the overall contrast of the image is increased, so that the image is clearer;
4-2, carrying out Gaussian filtering on the image to eliminate Gaussian noise on the image;
4-3, carrying out Otsu binarization on the image to distinguish the target image from the background image;
4-4, performing opening operation on the image to smooth the boundary of the target image, eliminating tiny spikes and disconnecting narrow connection;
and 4-5, carrying out contour scanning on the image, extracting two areas with the largest communication area, and dividing the two areas into a left part and a right part according to positions.
Compared with the prior art, the invention has the following remarkable advantages: (1) the invention can monitor and capture the information of the sliding block type circuit breaker in real time, automatically identify the state of the circuit breaker of the electric power system, increase the automation level of the electric power inspection robot and improve the working efficiency; (3) the invention integrates robot positioning information and machine learning, so that the position repeatability is high (for example, the positioning is lower than 5 cm), and the changes of scale, rotation and the like are small; (2) the invention can effectively complete the detection and identification tasks of the sliding block type circuit breaker under the conditions of different illumination and postures, improves the identification accuracy of images in a complex environment, and reduces the problems of missed detection and false detection to the maximum extent.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
FIG. 2 is a schematic diagram of a captured template image.
Fig. 3 is an image of the slider type circuit breaker after preprocessing.
Fig. 4 is an image of the slider type circuit breaker after the connected region is extracted, in which fig. 4(a) is a left partial image of the slider type circuit breaker after the connected region is extracted, and fig. 4(b) is a right partial image of the slider type circuit breaker after the connected region is extracted.
Detailed Description
The present invention is described in further detail below with reference to the attached drawings.
As shown in fig. 1, a method for identifying a slider type circuit breaker based on an inspection robot comprises the following specific steps:
step 1, selecting an image in the middle of the circuit breaker shot at each inspection point as a template image for each inspection point, and training the SVM multiple classifiers by utilizing a slider type circuit breaker image number set collected in advance, wherein the specific method comprises the following steps:
step 1-1, collecting a pointer type circuit breaker image number set in advance as a positive and negative training sample set: (1) acquiring pictures of the pointer type circuit breaker, and regarding the circular pictures displaying the opening and closing states, taking the pictures in the opening state as a positive sample set and taking the pictures in the closing state as a negative sample set; regarding the circular picture displaying the energy storage state, taking the picture in the energy storage state as a positive sample set, and taking the picture in the non-energy storage state as a negative sample set;
(2) cutting pictures, and deleting redundant information outside a circular area on the pointer type circuit breaker, specifically comprising the following steps:
(3) the picture is scaled to m pixels long and n pixels wide.
Step 1-2, extracting HOG characteristics of the positive and negative training sample sets, specifically:
(1) converting the color image into a gray image;
(2) gamma correction is carried out on the gray level image, the local shadow and illumination change of the image are reduced, and the formula of the Gamma correction is as follows:
I(x,y)=I(x,y)gamma(1)
wherein I (x, y) represents the pixel value of the x row and the y column of the image, and gamma takes a number between 0 and 1;
(3) the gradient of each pixel of the image is calculated according to the following formula:
Gx(x,y)=H(x+1,y)-H(x-1,y) (2)
Gy(x,y)=H(x,y+1)-H(x,y-1) (3)
wherein G isx(x,y),Gy(x, y), H (x, y) respectively represents the horizontal gradient, the vertical gradient and the pixel value of the pixel point (x, y) in the image, and the gradient magnitude G (x, y) and the gradient direction α (x, y) of the pixel point (x, y) can be obtained according to the following formula:
(4) Dividing an image into square cells with the side length of a pixel, wherein a is the maximum common factor of m and n, creating a gradient direction histogram for each cell, dividing the gradient direction into k direction blocks by 360 degrees, and the direction range of the ith direction block isCounting the gradient direction of each pixel in the cell, and if the gradient direction belongs to a certain direction block, adding the count value of the corresponding direction block to the amplitude value corresponding to the gradient;
(5) combining the unit cells into blocks, rewriting the gradient histogram corresponding to each unit cell into a vector form by the intra-block normalized gradient histogram, and connecting all gradient vectors in each block in series to form a gradient direction histogram vector of the block; multiplying the vector by a corresponding normalization factor, wherein the calculation formula of the normalization factor is as follows:
wherein v represents a vector that has not been normalized, | v | | | luminance2A norm of order 2 representing v, e representing a constant;
(6) the normalized vectors of all the blocks in the image are connected in series to obtain the HOG characteristic of the training sample set
Step 1-3, sample labels are given to all positive and negative training sample sets, and HOG characteristics and the sample labels of the training sample sets are sent to an SVM for training:
(1) the training goal of the SVM is to find an optimal hyperplane that can classify positive and negative samples, and its mathematical form can be expressed as:
where w represents a vector perpendicular to the hyperplane, | w | | | represents wNorm of (d), ξiRepresenting a relaxation variable, being a non-negative number, D being a parameter controlling the weight of two terms in the objective function, xiRepresenting HOG characteristics, y, of the ith sampleiA sample label representing the ith sample, b represents a constant;
(2) constructing a Lagrangian function:
wherein, αiRepresenting the Lagrange multiplier, ri=D-αiThen order
Transformation of objective function into
Wherein d represents the optimal value of the objective function;
(3) let L minimize for w, b, ξ, i.e.:
by bringing equation (11) into equation (8), the objective function is transformed into:
wherein,<xi,xj>expression to xi,xjInner product of (d);
(4) lagrange using SMO algorithmMultiplier αiUsing a heuristic algorithm to select a pair of lagrange multipliers αi,αjFixing device αi,αjDetermining α under the condition that w is extreme, among other parametersiIs taken from αiRepresentation αj(ii) a Repeating the steps until the target function is converged;
(5) determining an optimal hyperplane according to the optimal value of the Lagrange multiplier:
wherein,representing the optimum value of the Lagrange multiplier, w*,b*Respectively representing the direction of the optimal hyperplane and the offset from the origin;
(6) obtaining a classification decision function, namely a trained SVM classifier:
。
step 2, the inspection robot reaches a specified inspection point through positioning and navigation, acquires an on-site slider type circuit breaker image and reads the image in a gray scale pattern form for detection and identification of the slider type circuit breaker;
step 3, carrying out coarse positioning and accurate positioning on a target area to be detected, screening a target candidate area to obtain a slide block type circuit breaker image, specifically comprising the following steps:
step 3-1, roughly positioning a target circuit breaker region in a picture to be detected by utilizing Mellin Fourier transform and phase correlation technology;
3-2, accurately positioning the target circuit breaker region by using a machine learning method, and sending the image to be detected into a trained classifier to obtain a plurality of target candidate regions;
step 3-3, respectively solving a merging ratio parameter IOU of each target candidate area and a coarse positioning target pointer type breaker area, performing perceptual hash calculation on each target candidate area image and a pointer type breaker area image in a template image to obtain perceptual hash indexes, calculating mutual information indexes of each target candidate area image and the template image, and screening the target candidate areas to obtain the pointer type breakers, wherein the method specifically comprises the following steps:
(1) scaling the target candidate area image and the template image to the same size, performing cosine transform, selecting a low-frequency area at the upper left corner of the image after cosine transform, removing direct current components of coordinates (0,0) to obtain a characteristic vector, and calculating the Hamming distance of the characteristic vector of the target candidate area image and the characteristic vector of the template image to be used as a perceptual hash index;
(2) the specific calculation formula of the intersection ratio parameter IOU is as follows:
wherein C is a coarse positioning target breaker area, niA target candidate area is obtained;
(3) mutual information index I (G)(X),H(Y)) The calculation formula of (2) is as follows:
G(X)、H(Y)the number of grayscale pixels of the template image and the candidate image, respectively, and W, H the width and height of the candidate area image, respectively.
Weighting three indexes of the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate region to obtain the confidence coefficient of the candidate region, wherein D is a constant:
Confidence=1-(pHash+1/I(G(X),H(y)))/(IOU+D) (20)
and (4) sequencing the confidence degrees of all the candidate regions from high to low, and obtaining the region with the maximum confidence degree, wherein the region is used as a candidate detection result. If the IOU of the alternative detection result meets the condition that the IOU is less than the set threshold value threshold dIOU and (pHash +1/I (G)(X),H(Y)) When the circuit breaker area is larger than the threshold, the circuit breaker area with the rough positioning target determined in the step 3-2 is taken as a final target, otherwise, the alternative detection result is taken as the final target. The threshold value range is 0.1-0.4, and the threshold value range is 10-50.
Step 4, preprocessing the acquired on-site slider type circuit breaker image, extracting two areas with the largest communication area, and dividing the two areas into a left part and a right part according to positions, wherein the method specifically comprises the following steps:
step 4-1, histogram equalization is carried out on the gray level image, and the overall contrast of the image is increased, so that the image is clearer;
4-2, carrying out Gaussian filtering on the image to eliminate Gaussian noise on the image;
4-3, carrying out Otsu binarization on the image to distinguish the target image from the background image;
4-4, performing opening operation on the image to smooth the boundary of the target image, eliminating tiny spikes and disconnecting narrow connection;
and 4-5, carrying out contour scanning on the image, and extracting the region with the largest communication area.
4-6, detecting circle centers, calculating the gradient of the graph, determining a circumferential line, giving gradient straight lines of all graphs in a two-dimensional Hough space, carrying out non-maximum value suppression in a 4-neighborhood region, setting a threshold value, and corresponding to the circle center when points with the sum being greater than the threshold value in the Hough space are accumulated;
and 4-7, detecting the circle radius, calculating the distance from one circle center to all the circumference lines, finding the values with the same distance, calculating the number of the same values, considering the circle radius corresponding to the circle center only when the number of the same values is greater than a certain threshold value, and detecting the circle radius corresponding to the other circle center according to the same method.
And 5, respectively carrying out pixel adjustment on the two separated regions, sliding a sliding window with the length of m pixels and the width of n pixels on the image, extracting HOG characteristics from the window, and sending the HOG characteristic operator obtained by calculation into the SVM multi-classifier to obtain a final recognition result.
Example 1
A method for identifying a slider type circuit breaker based on an inspection robot comprises the following steps:
step 1, selecting a picture in the middle of the circuit breaker shot at each inspection point as a template picture for each inspection point, and training an SVM (support vector machine) multi-classifier by utilizing a slider type circuit breaker picture number set collected in advance as shown in figure 2;
step 1-1, preparing a training sample set, specifically:
(1) acquiring 100000 pictures containing the sliding block type circuit breakers, wherein the pictures in the energy storage state are used as a positive sample set, and the pictures in the non-energy storage state are used as a negative sample set;
(2) cutting picture, and removing unnecessary information outside the slider display window area of the slider type circuit breaker
(3) Scaling the picture into a rectangle with the length and the width of 48 pixels;
step 1-2, extracting HOG characteristics of positive and negative samples, specifically:
(1) converting the color image into a gray image;
(2) and performing Gamma correction on the gray level image to reduce local shadow and illumination change of the image. The formula (1) is a Gamma correction formula, wherein the Gamma is 0.5;
(3) calculating the horizontal and vertical gradients of each pixel of the image according to the formulas (2) and (3), and then calculating the gradient amplitude and the gradient direction at the pixel point (x, y) according to the formulas (4) and (5);
(4) the image is divided into square cells with the side length of 8 pixels, and a gradient direction histogram is created for each cell. Dividing the gradient direction into 9 direction blocks at 360 degrees, counting the gradient direction of each pixel in a unit cell, if the gradient direction belongs to a certain direction block, adding the count value of the corresponding direction block to the amplitude value corresponding to the gradient, combining the unit cell into a block with the side length of 16 pixels, normalizing a gradient histogram in the block, and reducing the influence of illumination, shadow and edge on the gradient; the normalized vectors of all the blocks in the image are connected in series to obtain the HOG characteristics of the blocks;
step 1-3, sample labels are given to all positive and negative samples, HOG characteristics of the positive and negative samples and the sample labels are sent to an SVM for training, and the method specifically comprises the following steps:
(1) the training target of the SVM is to find an optimal hyperplane which can realize classification on positive and negative samples, and the mathematical form of the optimal hyperplane can be expressed by an equation (7);
(2) constructing a Lagrange function as an equation (8), and converting the target function into an equation (10) according to an equation (9);
(3) minimizing L for w, b, ξ, converting the objective function to equation (12);
(4) lags are found using SMO algorithmLangri multiplier αiThe optimum value of (d);
(5) determining an optimal hyperplane according to the optimal value of the Lagrange multiplier and the formula (13);
(6) and obtaining a classification decision function formula (14), namely a trained SVM classifier:
step 2, the inspection robot reaches a specified inspection point through positioning navigation, the navigation error is 6cm, and a slider type circuit breaker image is obtained and read in a gray scale image mode for detection and identification;
step 3, carrying out coarse positioning and accurate positioning on a target area to be detected, and screening a target candidate area to obtain the slider type circuit breaker;
step 3-1, roughly positioning a target circuit breaker region in a picture to be detected by utilizing Mellin Fourier transform and phase correlation technology;
3-2, accurately positioning the image to be detected by using a machine learning Adaboost classifier trained in advance to obtain a plurality of target candidate regions;
3-3, respectively solving intersection ratio parameters IOU of each target candidate area and the coarse positioning target sliding block type circuit breaker area; performing perceptual hash calculation on each target candidate area image and the slider type circuit breaker area image in the template image to obtain a perceptual hash index; calculating mutual information indexes of each target candidate area image and the template image, and screening the target candidate areas to obtain the slider type circuit breaker;
(1) and calculating a perceptual hash pHash index. And performing perceptual hash pHash calculation on the candidate area image obtained by the classifier and the circuit breaker area image in the intercepted template image. The perceptual hash pHash calculation is to scale two pictures to 32 × 32, perform cosine transform, select an 8 × 8 region at the upper left corner of the image after the cosine transform, remove the direct current component of coordinates (0,0) to obtain a 63-dimensional feature vector, and calculate the Hamming distance of the feature vectors of the image A and the image B as a perceptual hash pHash index;
(2) calculating a mutual information index by using formulas (16) to (19);
(3) calculating an intersection ratio parameter IOU by using a formula (15) to respectively obtain three intersection ratio parameter indexes (0.7,0.0 and 0.0);
(4) weighting three indexes of the cross-over ratio IOU, mutual information and perceptual hash pHash of each candidate region according to a formula (20) to obtain the confidence coefficient of the candidate region;
and (4) sequencing the confidence degrees of all the candidate regions from high to low, and obtaining the region with the maximum confidence degree as a final region.
Step 4, preprocessing the acquired on-site slider type circuit breaker image, wherein the processed image is shown in fig. 3, two areas with the largest communication area are extracted and are divided into a left part and a right part according to positions, and the left part and the right part are shown in fig. 4;
and 5, respectively carrying out pixel adjustment on the two separated regions, sliding a sliding window with the length and the width of 48 pixels on the image, extracting HOG characteristics from the window, and sending the extracted HOG characteristics into the SVM for judgment to obtain a final detection result.
Claims (9)
1. A method for identifying a slider type circuit breaker based on an inspection robot is characterized by comprising the following steps:
step 1, selecting a picture in the middle of the circuit breaker shot at each inspection point as a template picture for each inspection point, and training an SVM (support vector machine) multi-classifier by utilizing a slider type circuit breaker picture number set collected in advance;
step 2, the inspection robot reaches a specified inspection point through positioning and navigation, acquires an on-site slider type circuit breaker image and reads the image in a gray scale pattern form for detection and identification of the slider type circuit breaker;
step 3, carrying out coarse positioning and accurate positioning on a target area to be detected, and screening a target candidate area to obtain a slider type circuit breaker image;
step 4, preprocessing the acquired on-site slider type circuit breaker image, extracting two areas with the largest communication area, and dividing the two areas into a left part and a right part according to positions;
and 5, respectively carrying out pixel adjustment on the two separated regions, sliding a sliding window with the length of m pixels and the width of n pixels on the image, extracting HOG characteristics from the window, and sending the HOG characteristic operator obtained by calculation into the SVM multi-classifier to obtain a final recognition result.
2. The inspection robot-based slider type circuit breaker recognition method according to claim 1, wherein the specific method for training the SVM multiple classifiers in the step 1 is as follows:
step 1-1, collecting a slider type circuit breaker image number set as a positive and negative training sample set;
step 1-2, extracting HOG characteristics of a positive and negative training sample set;
and 1-3, endowing all positive and negative training sample sets with sample labels, and sending the HOG characteristics of the training sample sets and the sample labels into the SVM for training.
3. The inspection robot-based slider type circuit breaker recognition method according to claim 2, wherein the specific method for preparing the training sample set in the step 1-1 is as follows:
(1) collecting pictures of the slider type circuit breaker, and taking the pictures in an energy storage state as a positive sample set and the pictures in an energy non-storage state as a negative sample set;
(2) cutting pictures, and deleting redundant information outside a slider display window area on the slider type circuit breaker;
(3) the picture is scaled to m pixels long and n pixels wide, with m and n ranging from 36-64.
4. The inspection robot-based slider type circuit breaker identification method according to claim 2, wherein the specific method for extracting the positive and negative training sample set HOG features in the step 1-2 is as follows:
(1) converting the color image into a gray image;
(2) gamma correction is carried out on the gray level image, the local shadow and illumination change of the image are reduced, and the formula of the Gamma correction is as follows:
I(x,y)=I(x,y)gamma(1)
wherein I (x, y) represents the pixel value of the x row and the y column of the image, and gamma takes a number between 0 and 1;
(3) the gradient of each pixel of the image is calculated according to the following formula:
Gx(x,y)=H(x+1,y)-H(x-1,y) (2)
Gy(x,y)=H(x,y+1)-H(x,y-1) (3)
wherein G isx(x,y),Gy(x, y), H (x, y) respectively represents the horizontal gradient, the vertical gradient and the pixel value of the pixel point (x, y) in the image, and the gradient magnitude G (x, y) and the gradient direction α (x, y) of the pixel point (x, y) can be obtained according to the following formula:
(4) dividing an image into square cells with the side length of a pixel, wherein a is the maximum common factor of m and n, creating a gradient direction histogram for each cell, dividing the gradient direction into k direction blocks by 360 degrees, and the direction range of the ith direction block isCounting the gradient direction of each pixel in the cell, and if the gradient direction belongs to a certain direction block, adding the count value of the corresponding direction block to the amplitude value corresponding to the gradient;
(5) combining the unit cells into blocks, rewriting the gradient histogram corresponding to each unit cell into a vector form by the intra-block normalized gradient histogram, and connecting all gradient vectors in each block in series to form a gradient direction histogram vector of the block; multiplying the vector by a corresponding normalization factor, wherein the calculation formula of the normalization factor is as follows:
wherein v represents a vector that has not been normalized, | v | | | luminance2A norm of order 2 representing v, e representing a constant;
(6) and connecting the normalized vectors of all the blocks in the image in series to obtain the HOG characteristic of the training sample set.
5. The inspection robot-based slider type circuit breaker recognition method according to claim 2, wherein the specific method of feeding the HOG features and sample labels of the positive and negative training sample sets into the SVM for training in the step 1-3 is as follows:
(1) the training target of the SVM is to find an optimal hyperplane which can realize classification of positive and negative samples, and the mathematical form of the optimal hyperplane can be expressed as follows:
where w represents a vector perpendicular to the hyperplane, | | w | | | represents the norm of w, ξiRepresenting a relaxation variable, being a non-negative number, D being a parameter controlling the weight of two terms in the objective function, xiRepresenting HOG characteristics, y, of the ith sampleiA sample label representing the ith sample, b represents a constant;
(2) constructing a Lagrangian function:
wherein, αiRepresenting the Lagrange multiplier, ri=D-αiThen order
Transformation of objective function into
Wherein d is*Representing an optimal value of the objective function;
(3) let L minimize for w, b, ξ, i.e.:
by bringing equation (11) into equation (8), the objective function is transformed into:
wherein,<xi,xj>expression to xi,xjInner product of (d);
(4) lagrange multiplier α using SMO algorithmiUsing a heuristic algorithm to select a pair of lagrange multipliers αi,αjFixing device αi,αjDetermining α under the condition that w is extreme, among other parametersiIs taken from αiRepresentation αj(ii) a Repeating the steps until the target function is converged;
(5) determining an optimal hyperplane according to the optimal value of the Lagrange multiplier:
wherein,representing the optimum value of the Lagrange multiplier, w*,b*Squares representing respectively optimal hyperplanesOffset to and from the origin;
(6) obtaining a classification decision function, namely a trained SVM classifier:
。
6. the inspection robot-based slider type circuit breaker identification method according to claim 1, wherein the specific steps of positioning and screening the target area in the step 3 are as follows:
step 3-1, roughly positioning a target circuit breaker region in a picture to be detected by utilizing Mellin Fourier transform and phase correlation technology;
3-2, accurately positioning the target circuit breaker region by using a machine learning method, and sending the image to be detected into a trained classifier to obtain a plurality of target candidate regions;
and 3-3, respectively solving a merging ratio parameter IOU of each target candidate area and the coarse positioning target slide block type circuit breaker area, performing perceptual hash calculation on each target candidate area image and the slide block type circuit breaker area image in the template image to obtain perceptual hash indexes, calculating mutual information indexes of each target candidate area image and the template image, and screening the target candidate areas to obtain the slide block type circuit breakers.
7. The inspection robot-based slider type circuit breaker identification method according to claim 6, wherein the step 3-3 senses a hash index, an intersection ratio parameter IOU and a mutual information index I (G)(X),H(Y)) The specific calculation methods are respectively as follows:
(1) scaling the target candidate area image and the template image to the same size, performing cosine transform, selecting a low-frequency area at the upper left corner of the image after cosine transform, removing direct current components of coordinates (0,0) to obtain a characteristic vector, and calculating the Hamming distance of the characteristic vector of the target candidate area image and the characteristic vector of the template image to be used as a perceptual hash index;
(2) the specific calculation formula of the intersection ratio parameter IOU is as follows:
wherein C is a coarse positioning target breaker area, niA target candidate area is obtained;
(3) mutual information index I (G)(X),H(Y)) The calculation formula of (2) is as follows:
G(X)、H(Y)the number of grayscale pixels of the template image and the candidate image, respectively, and W, H the width and height of the candidate area image, respectively.
8. The method for identifying the sliding block type circuit breaker of the power inspection robot according to claim 6, wherein the specific method for screening the target candidate area to obtain the sliding block type circuit breaker in the step 3-3 is as follows:
weighting three indexes of the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate region to obtain the confidence coefficient of the candidate region, wherein D is a constant:
Confidence=1-(pHash+1/I(G(X),H(y)))/(IOU+D) (20)
according to the sequence of the confidence degrees of all the candidate regions from large to small, the region with the maximum confidence degree is obtained and is used as the candidate detection result, and if the candidate detection resultsThe IOU of the fruit satisfies the condition that the IOU is less than the set threshold value and is (pHash +1/I (G)(X),H(Y)) When the circuit breaker area is larger than the threshold, the circuit breaker area with the rough positioning target determined in the step 3-2 is taken as a final target, otherwise, the alternative detection result is taken as the final target.
9. The inspection robot-based slider type circuit breaker identification method according to claim 1, wherein the image preprocessing in the step 4 comprises the following specific steps:
step 4-1, histogram equalization is carried out on the gray level image, and the overall contrast of the image is increased, so that the image is clearer;
4-2, carrying out Gaussian filtering on the image to eliminate Gaussian noise on the image;
4-3, carrying out Otsu binarization on the image to distinguish the target image from the background image;
4-4, performing opening operation on the image to smooth the boundary of the target image, eliminating tiny spikes and disconnecting narrow connection;
and 4-5, carrying out contour scanning on the image, and extracting two areas with the largest communication area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811148601.1A CN109344766A (en) | 2018-09-29 | 2018-09-29 | Slide block type breaker recognition methods based on crusing robot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811148601.1A CN109344766A (en) | 2018-09-29 | 2018-09-29 | Slide block type breaker recognition methods based on crusing robot |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109344766A true CN109344766A (en) | 2019-02-15 |
Family
ID=65307905
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811148601.1A Pending CN109344766A (en) | 2018-09-29 | 2018-09-29 | Slide block type breaker recognition methods based on crusing robot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109344766A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800824A (en) * | 2019-02-25 | 2019-05-24 | 中国矿业大学(北京) | A kind of defect of pipeline recognition methods based on computer vision and machine learning |
CN109993168A (en) * | 2019-04-09 | 2019-07-09 | 成都鹏业软件股份有限公司 | Intelligent polling method |
CN110321890A (en) * | 2019-04-26 | 2019-10-11 | 重庆邮电大学 | A kind of digital instrument recognition methods of electric inspection process robot |
CN113077398A (en) * | 2021-04-09 | 2021-07-06 | 上海申瑞继保电气有限公司 | Circuit breaker circular on-off indicator lamp image noise filtering method |
CN116882966A (en) * | 2023-06-27 | 2023-10-13 | 广州慧云网络科技有限公司 | Fault judging method and device for inspection result of operation and maintenance equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260412A (en) * | 2015-09-24 | 2016-01-20 | 东方网力科技股份有限公司 | Image storage method and device, and image retrieval method and device |
CN106951930A (en) * | 2017-04-13 | 2017-07-14 | 杭州申昊科技股份有限公司 | A kind of instrument localization method suitable for Intelligent Mobile Robot |
CN107610162A (en) * | 2017-08-04 | 2018-01-19 | 浙江工业大学 | A kind of three-dimensional multimode state medical image autoegistration method based on mutual information and image segmentation |
CN107610128A (en) * | 2017-09-26 | 2018-01-19 | 山东鲁能智能技术有限公司 | The method for inspecting and device of a kind of oil level indicator |
-
2018
- 2018-09-29 CN CN201811148601.1A patent/CN109344766A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260412A (en) * | 2015-09-24 | 2016-01-20 | 东方网力科技股份有限公司 | Image storage method and device, and image retrieval method and device |
CN106951930A (en) * | 2017-04-13 | 2017-07-14 | 杭州申昊科技股份有限公司 | A kind of instrument localization method suitable for Intelligent Mobile Robot |
CN107610162A (en) * | 2017-08-04 | 2018-01-19 | 浙江工业大学 | A kind of three-dimensional multimode state medical image autoegistration method based on mutual information and image segmentation |
CN107610128A (en) * | 2017-09-26 | 2018-01-19 | 山东鲁能智能技术有限公司 | The method for inspecting and device of a kind of oil level indicator |
Non-Patent Citations (2)
Title |
---|
戴宪策 等: "基于傅里叶-梅林变换的图像匹配方法研究", 《红外技术》 * |
沈新平 等: "《基于霍夫变换和RANSAC算法的绝缘子定位方法》", 《电子测量技术》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800824A (en) * | 2019-02-25 | 2019-05-24 | 中国矿业大学(北京) | A kind of defect of pipeline recognition methods based on computer vision and machine learning |
CN109993168A (en) * | 2019-04-09 | 2019-07-09 | 成都鹏业软件股份有限公司 | Intelligent polling method |
CN109993168B (en) * | 2019-04-09 | 2021-07-16 | 成都鹏业软件股份有限公司 | Intelligent inspection method |
CN110321890A (en) * | 2019-04-26 | 2019-10-11 | 重庆邮电大学 | A kind of digital instrument recognition methods of electric inspection process robot |
CN110321890B (en) * | 2019-04-26 | 2021-04-20 | 重庆邮电大学 | Digital instrument identification method of power inspection robot |
CN113077398A (en) * | 2021-04-09 | 2021-07-06 | 上海申瑞继保电气有限公司 | Circuit breaker circular on-off indicator lamp image noise filtering method |
CN116882966A (en) * | 2023-06-27 | 2023-10-13 | 广州慧云网络科技有限公司 | Fault judging method and device for inspection result of operation and maintenance equipment |
CN116882966B (en) * | 2023-06-27 | 2024-04-19 | 广东慧云科技股份有限公司 | Fault judging method and device for inspection result of operation and maintenance equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109447949A (en) | Insulated terminal defect identification method based on crusing robot | |
CN109344768A (en) | Pointer breaker recognition methods based on crusing robot | |
CN109344766A (en) | Slide block type breaker recognition methods based on crusing robot | |
CN108537154B (en) | Power transmission line bird nest identification method based on HOG characteristics and machine learning | |
CN102289676B (en) | Method for identifying mode of switch of substation based on infrared detection | |
CN107389701A (en) | A kind of PCB visual defects automatic checkout system and method based on image | |
CN109409355B (en) | Novel transformer nameplate identification method and device | |
CN110910350B (en) | Nut loosening detection method for wind power tower cylinder | |
CN108090494B (en) | Textile defect identification method based on Gabor filter and support vector machine | |
CN113538503B (en) | Solar panel defect detection method based on infrared image | |
CN111753577A (en) | Apple identification and positioning method in automatic picking robot | |
CN104198497A (en) | Surface defect detection method based on visual saliency map and support vector machine | |
CN114241364A (en) | Method for quickly calibrating foreign object target of overhead transmission line | |
CN111539330A (en) | Transformer substation digital display instrument identification method based on double-SVM multi-classifier | |
CN109389165A (en) | Oil level gauge for transformer recognition methods based on crusing robot | |
CN116229052B (en) | Method for detecting state change of substation equipment based on twin network | |
CN111199250A (en) | Transformer substation air switch state checking method and device based on machine learning | |
CN109784396A (en) | Method for identifying switching-on and switching-off states | |
CN107610119A (en) | The accurate detection method of steel strip surface defect decomposed based on histogram | |
CN111951218A (en) | Lipstick quality inspection system of mixed deep learning model | |
CN116311201A (en) | Substation equipment state identification method and system based on image identification technology | |
CN110084587B (en) | Automatic dinner plate settlement method based on edge context | |
CN113989196A (en) | Vision-based earphone silica gel gasket appearance defect detection method | |
CN114092478A (en) | Anomaly detection method | |
CN117197700A (en) | Intelligent unmanned inspection contact net defect identification system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190215 |
|
RJ01 | Rejection of invention patent application after publication |