CN113436212A - Extraction method for inner contour of circuit breaker static contact meshing state image detection - Google Patents

Extraction method for inner contour of circuit breaker static contact meshing state image detection Download PDF

Info

Publication number
CN113436212A
CN113436212A CN202110694422.3A CN202110694422A CN113436212A CN 113436212 A CN113436212 A CN 113436212A CN 202110694422 A CN202110694422 A CN 202110694422A CN 113436212 A CN113436212 A CN 113436212A
Authority
CN
China
Prior art keywords
contour
image
target
filtering
edge
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
Application number
CN202110694422.3A
Other languages
Chinese (zh)
Inventor
李宝锋
罗传胜
周义雄
刘涛
廖钊
何位经
方番
李炎
黄锦丽
宋喜平
苏淑敏
张光资
肖行运
覃智贤
国家栋
王飞
李鸿鹏
李瑞麟
李鹏帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanning Power Supply Bureau of Guangxi Power Grid Co Ltd
Original Assignee
Nanning Power Supply Bureau of Guangxi Power Grid Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanning Power Supply Bureau of Guangxi Power Grid Co Ltd filed Critical Nanning Power Supply Bureau of Guangxi Power Grid Co Ltd
Priority to CN202110694422.3A priority Critical patent/CN113436212A/en
Publication of CN113436212A publication Critical patent/CN113436212A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Abstract

The invention discloses an extraction method for detecting an inner contour of an image of a fixed contact meshing state of a circuit breaker, which comprises the steps of preprocessing an original image, binarizing the preprocessed image by an image segmentation method based on a self-adaptive threshold, filtering a non-target contour by area filtering, roundness filtering, circle center position coordinates and the like, and calculating a mask contour by utilizing a thinning algorithm; then, an elliptical ring contour is obtained by using an edge detection method based on a ZERNIKE moment, and coordinates of the inner contour and the outer contour of the elliptical ring are respectively obtained by combining with a mask contour; and finally, a high-precision elliptical ring contour is obtained through the SNAKE active contour model, the final solution of the single-pixel elliptical contour is realized based on a thinning algorithm, the meshing state detection precision is effectively improved, and the method has important significance in circuit breaker fault diagnosis.

Description

Extraction method for inner contour of circuit breaker static contact meshing state image detection
Technical Field
The invention relates to the field of fault diagnosis of circuit breakers, in particular to an extraction method for detecting an inner contour of an image of a fixed contact meshing state of a circuit breaker.
Background
The circuit breaker is an important protection device in a high-voltage switch cabinet, the detection of the meshing state of the contact is an important link of fault diagnosis of the circuit breaker, and because the existing measurement method cannot realize high-precision pose estimation in the environment of the switch cabinet, and the visual measurement has high adaptability and precision, the application in industrial measurement is more and more extensive, the invention uses the visual measurement for the meshing state detection for the first time.
Disclosure of Invention
The invention aims to solve the problems and provide a method for extracting an inner contour of a circuit breaker fixed contact meshing state image detection.
The invention realizes the purpose through the following technical scheme:
the invention comprises the following steps:
s1: firstly, a target contour is roughly extracted from an original image by using a self-adaptive binarization method, and an initial position of the target contour is found, so that image masks respectively containing inner and outer contours of an oval ring are obtained;
s2: then carrying out sub-pixel edge detection on the original image through edge detection based on ZERNIKE moment, and obtaining pixel coordinates of inner and outer contours by combining a mask region;
s3: taking a ZERNIKE moment detection result as an initial solution, and obtaining more accurate inner and outer contour coordinates through contour fitting based on an SNAKE model;
s4: and thinning the elliptical ring to obtain a single-pixel target elliptical contour.
The step S1 is to realize the coarse extraction of the target contour, including image preprocessing, contour coarse extraction, non-target contour filtering and mask contour calculation, where the non-target contour filtering includes area filtering, roundness filtering, and circle center position filtering, and the area filtering filters the non-target contour through a target contour area threshold value obtained through experiments; the roundness filtering filters non-circular contours based on a contour roundness evaluation algorithm; the circle center position filtering is realized through a circle center position threshold value after contour fitting; the mask contour calculation is to extract the approximate areas of the two target contours in the original image as the basis of the elliptical ring contour separation.
The outline rough extraction method comprises edge-based, region-based and threshold-based methods, and the edge-based method realizes edge detection by utilizing image gradient and the like; the region-based method utilizes random seeds to realize the collection of neighborhood similar pixels to realize contour extraction; the threshold-based method performs binarization by comparing the central point and its neighborhood gray value.
The non-target contour filtering comprises area filtering, roundness filtering and circle center position filtering, and the area filtering is used for filtering the non-target contour through a target contour area threshold value obtained through experiments; the roundness filtering filters non-circular contours based on a contour roundness evaluation algorithm; the circle center position filtering is realized through a circle center position threshold value after contour fitting; the mask contour calculation is to extract the approximate areas of the two target contours in the original image as the basis of the elliptical ring contour separation.
The edge-based method utilizes different edge calculation operators to realize different detection effects, including a first-order differential operator PREWITT operator, a SOBEL operator, a ROBERTS operator and the like; judging LOG operators of the edge points by detecting zero points of second derivative; and judging CANNY operators of the edge points by using the Gaussian function gradient.
The region-based algorithm calculates the similarity between the target point pixel and the seed by giving the seed pixel, searching the neighborhood around the seed, and adding the target point pixel and the seed to the seed region if the target point pixel and the seed are similar.
The threshold-based method comprises a simple threshold and an adaptive threshold, wherein the simple threshold realizes binarization for the whole image by using the same transformation, the local information of the image is difficult to extract, the adaptive threshold sets a targeted threshold for each local image to realize binarization, and a target contour can be extracted more accurately.
The invention has the beneficial effects that:
the invention relates to an extraction method for detecting an inner contour of an image of a fixed contact meshing state of a circuit breaker, which is compared with the prior art.A primary image is preprocessed, the preprocessed image is binarized by an image segmentation method based on a self-adaptive threshold value, and non-target contours are filtered through area filtering, roundness filtering, circle center position coordinates and the like to obtain masks of the inner contour and the outer contour; then, obtaining inner and outer contours by using an edge detection method based on ZERNIKE moment, and respectively obtaining coordinate values of the inner and outer contours by combining mask operation; and finally, acquiring high-precision inner and outer contours through the SNAKE active contour model, and solving the single-pixel elliptical contour by adopting a refinement algorithm, so that the accuracy of elliptical ring contour extraction is effectively improved, the meshing state detection with higher precision is realized, and the method has important significance in circuit breaker fault diagnosis.
Drawings
FIG. 1 is a schematic diagram of the profile extraction scheme of the present invention;
FIG. 2 is a schematic diagram of CLAHE equalization
FIG. 3 is the image contrast before and after CLAHE histogram equalization
In the figure, a is an unequalized image, b is an unequalized image histogram, c is an equalized image, and d is an equalized image histogram;
FIG. 4 is a median filtered wavefront image
FIG. 5 is a median filtered image
FIG. 6 is an original image
FIG. 7 is a graph of graying-CLAHE equalization-bilateral filtering
FIG. 8 is an original grayscale image map
FIG. 9 is a ROBERTS operator edge detection diagram
FIG. 10 is a diagram of the edge detection of the PREWITT operator
FIG. 11 is a SOBEL operator edge detection diagram
FIG. 12 is a LOG operator edge detection diagram
FIG. 13 is a graph of CANNY operator edge detection
FIG. 14 is a graph of initial image and selected seed coordinates
FIG. 15 is a graph showing the results after the region growing test
FIG. 16 is an adaptive threshold image binarization map
FIG. 17 is a histogram equalization + binarization graph
FIG. 18 is an equalization + bilateral filtering + binarization diagram
FIG. 19 is a partial view of the target profile
FIG. 20 is a view of the field of view of the camera when fully engaged
FIG. 21 is a view of the field of view of the camera at the start of engagement
FIG. 22 is a crude extraction graph of elliptical ring contour at full engagement FIG. 23 is a crude extraction graph of elliptical ring contour at the start of engagement FIG. 24 is a graph of the area of the first six contours in the full engagement contour FIG. 25 is a graph of the area of the first six contours in the start of engagement contour FIG. 26 is a filtered contour graph
FIG. 27 is a diagram of the position of the recognized contour in the original image
FIG. 28 is a refined algorithm scheme diagram
FIG. 29 is a refined inside and outside contour boundary line diagram
FIG. 30 is an outer elliptical ring mask view
FIG. 31 is a mask view of an inner elliptical ring
FIG. 32 is a gray scale view of the inner bore of a stationary contact
FIG. 33 is a ZERNIKE rectangular sub-pixel detection map
FIG. 34 is a schematic view showing the positional relationship between the mask profile and the target profile
FIG. 35 is an iterative contour finding diagram with an initial contour that is elliptical
FIG. 36 is an iterative contour finding diagram with an initial contour being a circle
Fig. 37 is a schematic diagram of a contour extracted based on the snap model and a refined contour.
Detailed Description
The invention will be further described with reference to the accompanying drawings in which:
as shown in fig. 1: aiming at the problem of identifying the contour of the static contact, an extraction scheme of contour coarse extraction, contour fine extraction and elliptical ring refinement is designed. Firstly, roughly extracting a target contour from an original image by utilizing self-adaptive binarization, finding out an initial position of the target contour, and respectively obtaining masks of an inner contour and an outer contour; then carrying out sub-pixel edge detection on the original image through ZERNIKE matrix edge detection, and respectively obtaining pixel coordinates of inner and outer contours by combining a mask region; then taking a ZERNIKE moment detection result as an initial solution, and obtaining high-precision internal and external contour coordinates through an iteration contour searching algorithm based on an SNAKE model; and finally, obtaining the single-pixel target elliptical contour through a thinning algorithm.
Image preprocessing:
the initial image has the phenomena of uneven exposure, noise and the like due to the influence of a light source, the environment and the like, and aiming at the problems, an image preprocessing scheme based on the CLAHE (Contrast Limited Adaptive Histogram Equalization) and bilateral filtering for limiting Contrast enhancement is designed, so that the quality of the original image is improved, the complexity of contour extraction is reduced, and the precision of contour extraction is improved.
The histogram is the gray level probability density distribution of the image, and for a gray level image, the histogram is a statistical graph of the occurrence frequency of different gray level values, and for a color image, the histogram is three histograms of RGB channels. The purpose of Histogram Equalization (HE) is to homogenize the original image histogram, with a pixel distribution for each gray level. HA(D),HB(D) Histogram distribution of the two images respectively, the purpose of equalization being to make the grey value in the A image D by using the transformation fAIs changed to DBAs shown in formula 1. The ideal histogram distribution is shown in formula 2, wherein A0The number of pixels in the image, L is the gray scale, which is generally 256, and the transformation f can be obtained as shown in equation 3.
Figure BDA0003127502190000061
Figure BDA0003127502190000062
Figure BDA0003127502190000063
The common Histogram Equalization method adopts the same transformation f to each region of the image, and an Adaptive Histogram Equalization (AHE) method calculates the Histogram of each subregion aiming at the defect, calculates f respectively, realizes the redistribution of the image brightness, enhances the image edge information and is beneficial to segmentation. However, this method enhances the contrast and simultaneously enhances the noise in the area with uniformly changing brightness, and a mosaic-like effect occurs.
As shown in fig. 2: the CLAHE method solves this problem by placing a contrast CLIPLIMIT limit on each neighborhood, resulting in a transform function f for each neighborhood.
Fig. 3 shows the result of equalizing the contour of the inner hole of the stationary contact by the CLAHE histogram, in which the parameter CLIPLIMIT is set to 2.0 and the image partition size is (2, 2). It can be found that compared with the histogram of the original image, the edge of the equalized image is clearer, and no brightness non-uniform area appears.
The main purpose of filtering is to reduce noise in the image, remove high frequency components in the image such as noise, boundaries, etc. The main methods are gaussian filtering, median filtering, bilateral filtering, etc. The median filtering realizes filtering by exchanging the gray value of the central point and the gray value of the median in the neighborhood, and has obvious noise reduction effect on random noise; gaussian filtering is realized by solving the weighted average value of pixels in the neighborhood of a central point to realize convolution, and a convolution kernel is shown as a formula 4, so that high-frequency details in an image can be lost; aiming at the problem that the Gaussian filter only calculates the position relation of pixels and does not use pixel value information, the bilateral filter combines the position and the pixel information, the boundary information of the image is kept as much as possible while denoising is carried out, and the bilateral filter formula is shown as formula 5.
Figure BDA0003127502190000064
Figure BDA0003127502190000071
The weight w is the product of a domain kernel and a value domain kernel, the domain corresponds to the pixel point coordinates of the image, the value domain corresponds to the pixel value, and the calculation formula is as follows.
Figure BDA0003127502190000072
Will sigmadSet to 75, σrThe image neighborhood diameter d is set to be 75, the image obtained after graying-CLAHE equalization-bilateral filtering processing is carried out on the contour of the inner hole of the static contact is as follows, and experimental result analysis shows that the processed image has the advantages of reduced noise, more balanced brightness, more definite edge and contribution to edge detection.
Contour extraction based on adaptive binarization:
commonly used contour extraction methods include edge-based, region-based, threshold-based, and the like. Edge detection is realized by using image gradient and the like based on an edge method; the region-based method utilizes random seeds to realize the collection of neighborhood similar pixels to realize contour extraction; the threshold-based method performs binarization by comparing the central point and its neighborhood gray value.
The edge-based method utilizes different edge calculation operators to achieve different detection effects. The system comprises a first-order differential operator PREWITT operator, a SOBEL operator, a ROBERTS operator and the like; judging LOG operators of the edge points by detecting zero points of second-order derivatives; and judging CANNY operators of the edge points by using the Gaussian function gradient.
TABLE 1 convolution templates for first order operators
Figure BDA0003127502190000073
The bottom profile of the static contact is subjected to five operator comparison tests, and the results are shown in fig. 8-13. From the analysis of experimental results, the effect is better because the PREWITT operator is average filtering and is suitable for images with slightly different gray values, while the CANNY operator has higher noise, the SOBEL operator and the ROBERTS operator are too sensitive to the noise, and the LOG operator loses too much high-frequency details, so that almost no contour is identified.
The region-based algorithm searches neighborhood around the seeds by giving the seed pixels, calculates similarity between the target Point pixels and the seeds, and if the similarity is added to the seed regions, the method can be used for segmenting a relatively complex image, and pixel coordinates where an elliptical ring is located are selected as Point (765,402), Point (957,725) and Point (1061,553) which are respectively used as the seed pixels. The obtained detection results are shown in fig. 14-15, and it can be found from the experimental results that the region growing detection method has a poor effect when processing the image with small pixel difference, such as the contour image of the inner hole of the static contact, and the extracted contour is difficult to perform the next edge detection.
Threshold-based methods include simple thresholds, adaptive thresholds, and the like. The simple threshold value realizes binaryzation for the whole image by using the same transformation, and the local information of the image is difficult to extract. The adaptive threshold sets a targeted threshold for each local image to realize binarization, so that the target contour can be extracted more accurately.
The size of the local threshold neighborhood is set to 31, CV _ ADAPTIVE _ THRESH _ GAUSSIAN _ C is adopted for local threshold calculation, the threshold parameter is set to 3, and ADAPTIVE binarization is performed on the contour image, as shown in fig. 16. From the analysis of the experimental results of the above figures, the adaptive binarization can better retain the detail of the contour.
As shown in fig. 17 to 19, after histogram equalization and bilateral filtering, the noise of the image is significantly reduced, and from the partially enlarged view of the target contour map, the threshold-based method can better realize the extraction of the target elliptical ring.
Non-target contour filtering:
after the adaptive threshold segmentation, a plurality of non-target contours still exist in the image, and in order to solve the problem, area filtering, roundness filtering, circle center position filtering and the like are designed. Area filtering non-target contours are filtered through target contour area threshold values obtained through experiments; the roundness filtering filters non-circular contours based on a contour roundness evaluation algorithm; and the circle center position filtering is realized through a circle center position threshold value after contour fitting.
Area filtering first needs to find a target contour area threshold value, and the maximum contour area when the meshing is completely engaged and the meshing begins is obtained by detecting all contours (RETR _ TREE) and sequencing the contour areas.
The first six maximum profile areas were calculated by image processing experiments in the fully engaged state and at the beginning of engagement, and the results of the experiments are shown in fig. 20-25. As is apparent from the experimental results, in order to avoid the interference of the false circular contour as much as possible while allowing the target contour to be accurately identified, the minimum value of the threshold is set to the contour area 90000 at the start of engagement, and the maximum value is set to the contour area 220000 in the fully engaged state.
After filtering the outline whose area does not meet the requirement, there may exist the outline whose area meets the requirement, such as square, polygon, etc., but not the outline of the target object. In order to filter such contours, a roundness evaluation algorithm is designed, and the calculation formula is as follows:
Figure BDA0003127502190000092
wherein S is the area of the contour, C is the perimeter of the contour, and can be obtained by calculation respectively by using Opencv library functions contourArea and arcLength. Considering the processing problem, a plurality of circular outlines are arranged on the inner wall of the static contact, and in order to solve the problem of false recognition, the outline is subjected to circular fitting to realize outline fitting and the position of the circle center is judged to realize outline filtering. The filtration parameters used are shown in the table below.
TABLE 2 Filtering parameters Table
Figure BDA0003127502190000091
The target contour map obtained by filtering the binarized image by using the parameters is shown in fig. 26, and it can be found that the designed filtering mode can better realize the filtering of the non-target contour.
Mask contour calculation:
because the bottom of the static contact is provided with two elliptical contours, the two contours need to be respectively extracted and separated, so that the mask contour extraction needs to be carried out on the binarized and filtered image, and the approximate areas of the two target contours in the original image are extracted to be used as the basis for separating the elliptical ring contours.
Using the contour coordinates obtained in fig. 26, two elliptical contours are obtained after elliptical fitting, and the characteristics are shown in table 3. Analysis shows that the difference between the two elliptical contours is about 10 pixels, and the length difference between the major axis and the minor axis of the two ellipses is larger and larger as the engagement depth of the moving contact and the fixed contact is increased in the image at the beginning of engagement. Therefore, only the extraction of the mask outline of the static contact image at the beginning of meshing is considered, and only the elliptical outline at the beginning of meshing is required to be separated, so that the elliptical outline separation in the meshing process can be realized.
TABLE 3 characteristics of ellipse fitting of target profile
Figure BDA0003127502190000101
In order to find the boundary between two contours, contour extraction based on a thinning algorithm is designed. The thinning algorithm marks all node states by traversing image nodes, deletes internal points of the image, and reserves connection points, isolated points and end points. The refinement algorithm scheme is shown in fig. 28:
where B (P1) ═ P2+ P3+ P4+ P5+ P6+ P7+ P8+ P9, and a (P1) is the number of changes from 0 to 1 in the case of P2 and P3 … P9 in the order of arrangement.
The refined single-pixel elliptical profile is shown in fig. 29.
From the view of the thinning effect graph, the boundary line obtained after thinning can better separate the two target contours. In order to acquire a mask area only containing a single elliptical contour, the outer boundary and the inner boundary of two contours are searched, the widths of the boundary line and the inner and outer contour boundaries are respectively increased or decreased by the major axis and the minor axis of the inner and outer elliptical contours as the inner and outer boundaries by utilizing the inner and outer elliptical contours obtained by fitting, five pixels are increased by the major axis and the minor axis of the outer elliptical contour as the outer boundary, and five pixels are decreased by the inner contour as the inner boundary because the width of the inner and outer boundaries is about 10 pixels.
TABLE 4 inside and outside boundary ellipse Profile features
Figure BDA0003127502190000102
After obtaining the contour coordinates of the inner and outer boundaries, the area between the outer boundary and the contour boundary is used as a mask for the outer elliptical contour, and the area between the contour boundary and the inner boundary is used as a mask for the inner elliptical contour, as shown in fig. 30 to 31.
Contour rough extraction based on ZERNIKE moment:
because the common edge detection methods such as a fitting method and an interpolation method cannot well inhibit noise and are low in efficiency, a detection scheme based on ZERNIKE moment is designed for improving the contour extraction precision. The method is characterized in that a complex moment is obtained, pixel points of an original image are mapped into a unit circle, a model of a ZERNIKE moment is used for describing a target contour, each target contour feature is represented by a group of feature vectors, a low order is used for describing an overall contour, and a high order is used for representing contour details. The n-order m-order ZERNIKE moment calculation formula of the gray image is as follows:
Figure BDA0003127502190000111
wherein f (x, y) is the gray value of the pixel point of the original image, Vnm(p, theta) is a ZERNIKE polynomial,
Figure BDA0003127502190000112
is the complex conjugate thereof. The calculation formula of the ZERNIEK moment under the discrete condition is as follows.
Figure BDA0003127502190000113
The rotation invariance of ZERNIKE moment is determined by judging whether the image is an edge or not, and the image G 'before and after the rotation'nmAnd GnmThe relationship can be expressed as:
Gnm=G′nme-jmα (10)
due to rotation invariance, the module length of the ZERNIEK moment of the image is not changed, and the image edge parameters can be calculated by utilizing the ZERNIKE moment of the image to obtain the sub-pixel coordinates of the contour. The ZERNIKE template coefficient of the image to be detected can be obtained through an integral kernel function, the template coefficient and the edge parameter are obtained by calculating the convolution result of the template and the image, and the edge point is judged according to whether the edge parameter reaches a threshold value or not. Edge point coordinates (χ)mym) The calculation formula is as follows.
Figure BDA0003127502190000114
Wherein
Figure BDA0003127502190000115
Is the origin coordinate and N is the template size.
Using the template size of 7X7, two corresponding templates M were constructed1,1,M2,0
Tables 4 to 5M1,1Real number template
Figure BDA0003127502190000121
Tables 4 to 6M1,1Imaginary number template
Figure BDA0003127502190000122
Tables 4 to 7M2,0Form panel
Figure BDA0003127502190000123
Since the ZERNIKE moment is generally suitable for NXN image edge detection, the position of the center of a circle is calculated by taking the pixel coordinates of the edge of the elliptical contour in bold outline, as shown in Table 4. The center position is near (873,557), in order to realize the cutting of an NXN image containing a target contour, an image cutting method is designed to cut the original image into a 1200X1200 image, and the height of the original image is 1200 pixels, so that only the initial pixel point X of the width needs to be calculatedInitiation of,XTerminateThat is, the calculation formula is as follows.
X start is X circle center-600
Y termination is X circle center +600 (12)
The image is cut to obtain a 1200X1200 image, the template designed by the tables 5-7 is adopted for contour extraction, the result is shown in figure 33, and the image processing result shows that the contour of the countersunk hole can be accurately extracted, and the noise edge can be effectively filtered.
And after obtaining the contour map of the inner hole of the static contact, inversely cutting the image according to the original cutting mode, and restoring the image to the original size. The images were individually masked with mask profiles to obtain two elliptical profiles, as shown in fig. 34.
From fig. 34, it can be found that the outer layer contour mask and the inner layer contour mask can achieve more accurate separation of the target elliptical ring contour, and two elliptical contour features obtained by performing elliptical fitting respectively are as follows.
TABLE 4-8ZERNIKE moment identification contour fitting ellipse feature
Figure BDA0003127502190000131
Because the elliptical ring profiles of the inner holes of the static contact are concentric theoretically, the identification precision can be judged according to the difference between the circle centers and the angles of the two identified elliptical profiles. According to experimental results, the X-axis difference and the Y-axis difference of the coordinates of the central point of the elliptic contour obtained by ZERNIKE moment detection and fitting are large, and the rotation angle is smaller than that obtained by directly using an adaptive threshold segmentation method and is closer to an actual circular contour.
Contour fine extraction based on the SNAKE model:
in order to obtain an edge contour with higher precision, an oval contour searching method based on a SNAKE model is designed, and a more precise target contour nearby is searched through continuous iteration of an initial contour, wherein a cost function is an energy function defined based on the SNAKE model.
For image I (X, Y), C (q) C (X (q), Y (q)) is its evolution curve, the energy of the evolution curve is defined as the energy function of the SNAKE model:
E(c)=Eint+Eext (13)
where Eint is an internal energy function and Eext is an external energy function, equation 14 is satisfied when e (c) is minimum.
Figure BDA0003127502190000141
Combining the formula 14 with the Euler-Lagrange formula of the curve C (q)
Figure BDA0003127502190000142
To solve 15, the formula of the iterative evolution of the curve is shown in equations 4-16.
Figure BDA0003127502190000143
As shown in fig. 35-36, the dotted line is an initial contour c (q), and the solid line is a target contour searched iteratively, and from experimental results, the snap-based contour extraction method can achieve higher-precision contour extraction.
Setting the initial evolution curve C(s) as two elliptic contours obtained in the table 8, and obtaining a target contour through the iterative evolution of the SNAKE algorithm, wherein the SNAKE algorithm is realized through a SKIMAGE library function active _ constraint, and the main parameters are shown as follows.
TABLE 9 SANKE parameter settings
Figure BDA0003127502190000144
The resulting fitted elliptical profiles are shown in tables 4-10.
TABLE 10 SNAKE model extraction contour fitting ellipse features
Figure BDA0003127502190000145
From experimental results, it can be found that the coordinates of the central points of the ellipses obtained by respectively fitting and solving the two groups of outline data obtained by the iterative computation of the active outline model are almost consistent, the difference of the rotation angles is small, and the detection precision is higher compared with that only by using the ZERNIKE moment.
After the two groups of elliptical contours are obtained, extraction of the middle contour is achieved by utilizing a thinning algorithm, and elliptical fitting is carried out on the thinned contour, so that a final target elliptical contour is obtained.
Figure BDA0003127502190000151
The foregoing shows and describes the general principles and features of the present invention, together with the advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (9)

1. The method for extracting the inner contour of the image detection of the meshing state of the fixed contact of the circuit breaker is characterized by comprising the following steps of:
s1: firstly, a target contour is roughly extracted from an original image by using a self-adaptive binarization method, and an initial position of the target contour is found, so that image masks respectively containing inner and outer contours of an oval ring are obtained;
s2: then carrying out sub-pixel edge detection on the original image through edge detection based on ZERNIKE moment, and obtaining pixel coordinates of inner and outer contours by combining a mask region;
s3: taking a ZERNIKE moment detection result as an initial solution, and obtaining more accurate inner and outer contour coordinates through contour fitting based on an SNAKE model;
s4: and thinning the elliptical ring to obtain a single-pixel target elliptical contour.
2. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 1, wherein: the step S1 is to realize the coarse extraction of the target contour, including image preprocessing, contour coarse extraction, non-target contour filtering and mask contour calculation, where the non-target contour filtering includes area filtering, roundness filtering, and circle center position filtering, and the area filtering filters the non-target contour through a target contour area threshold value obtained through experiments; the roundness filtering filters non-circular contours based on a contour roundness evaluation algorithm; the circle center position filtering is realized through a circle center position threshold value after contour fitting; the mask contour calculation is to extract the approximate areas of the two target contours in the original image as the basis of the elliptical ring contour separation.
3. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 2, wherein: the outline rough extraction method comprises edge-based, region-based and threshold-based methods, and the edge-based method realizes edge detection by utilizing image gradient and the like; the region-based method utilizes random seeds to realize the aggregation of similar pixels in the neighborhood so as to realize the contour extraction; the threshold-based method performs binarization by comparing the central point and its neighborhood gray value.
4. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 3, wherein: the non-target contour filtering comprises area filtering, roundness filtering and circle center position filtering, and the area filtering is used for filtering the non-target contour through a target contour area threshold value obtained through experiments; the roundness filtering filters non-circular contours based on a contour roundness evaluation algorithm; the circle center position filtering is realized through a circle center position threshold value after contour fitting; the mask contour calculation is to extract the approximate areas of the two target contours in the original image as the basis of the elliptical ring contour separation.
5. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 3, wherein: the edge-based method utilizes different edge calculation operators to realize different detection effects, including a first-order differential operator PREWITT operator, a SOBEL operator and a ROBERTS operator; judging LOG operators of the edge points by detecting zero points of second-order derivatives; and judging the CANNY operator of the edge point by using the Gaussian function gradient.
6. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 3, wherein: the region-based algorithm calculates the similarity between the target point pixel and the seed by giving the seed pixel, searching the neighborhood around the seed, and adding the target point pixel and the seed to the seed region if the target point pixel and the seed are similar.
7. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 3, wherein: the threshold-based method comprises a simple threshold and an adaptive threshold, wherein the simple threshold realizes binarization for the whole image by using the same transformation, the local information of the image is difficult to extract, the adaptive threshold sets a targeted threshold for each local image to realize binarization, and a target contour can be extracted more accurately.
8. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 1, wherein: in step S2, edge detection based on the ZERNIKE moment is performed by mapping pixel points of the original image into unit circles, and using a module of the ZERNIKE moment to describe target contours, each target contour feature is represented by a set of feature vectors, low order is used to describe the whole contour, and high order is used to represent the contour details. The n-order m-order ZERNIKE moment calculation formula of the gray image is as follows:
Figure FDA0003127502180000021
wherein f (x, y) is the gray value of the pixel point of the original image, Vnm(p, theta) is a ZERNIKE polynomial,
Figure FDA0003127502180000031
for its complex conjugate, the ZERNIEK moment under discrete conditions is calculated as follows:
Figure FDA0003127502180000032
the rotation invariance of ZERNIKE moment is determined by judging whether the image is an edge or not, and the image G 'before and after the rotation'nmAnd GnmThe relationship can be expressed as:
Gnm=G′nme-jmα
calculating image edge parameters by utilizing the ZERNIKE moment of the image to obtain the sub-pixel coordinates of the outline, obtaining the ZERNIKE template coefficient of the image to be detected by an integral kernel function, calculating the template coefficient and the edge parameters by using a template and image convolution result, judging edge points according to whether the edge parameters reach a threshold value or not, and determining the edge point coordinates (x)mym) The calculation formula is as follows:
Figure FDA0003127502180000033
wherein
Figure FDA0003127502180000034
Is the coordinate of the origin, and N is the size of the template;
using the template size of 7X7, two corresponding templates M were constructed1,1,M2,0
Starting pixel point X for calculating widthInitiation of,XTerminateThe calculation formula is as follows:
x start is X circle center-600
X center +600 of Y end
Cutting to obtain a 1200X1200 image; and after obtaining the contour map of the inner hole of the static contact, inversely cutting the image according to the original cutting mode, and restoring the image to the original size. And respectively carrying out masking operation on the image by utilizing the mask outline to obtain two elliptical outlines, and judging the identification precision according to the difference between the circle centers and the angles of the two identified elliptical outlines.
9. The method for extracting the inner contour of the circuit breaker static contact meshing state image detection as claimed in claim 1, wherein: the elliptic contour searching method based on the SNAKE model continuously iterates through an initial contour to search a more accurate target contour nearby, and the cost function is an energy function defined based on the SNAKE model;
for image I (X, Y), C (q) C (X (q), Y (q)) is its evolution curve; the energy of the evolution curve is defined as the energy function of the SNAKE model as:
E(c)=Eint+Eext
wherein Eint is an internal energy function, Eext is an external energy function, and when E (c) is minimum, the following equation is satisfied:
Figure FDA0003127502180000041
obtained by combining the above equation with the Euler-Lagrange equation of the curve C (q)
Figure FDA0003127502180000042
To solve the above equation, the formula of the curve iterative evolution is shown as follows:
Figure FDA0003127502180000043
setting the initial evolution curve C(s) as two obtained elliptical contours, obtaining a target contour through the iterative evolution of the SNAKE algorithm, realizing the SNAKE algorithm through a SKIMAGE library function active _ constraint, extracting an intermediate contour by using a thinning algorithm after obtaining two groups of elliptical contours, and carrying out elliptical fitting on the thinned contour to obtain a final target elliptical contour.
CN202110694422.3A 2021-06-22 2021-06-22 Extraction method for inner contour of circuit breaker static contact meshing state image detection Pending CN113436212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110694422.3A CN113436212A (en) 2021-06-22 2021-06-22 Extraction method for inner contour of circuit breaker static contact meshing state image detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110694422.3A CN113436212A (en) 2021-06-22 2021-06-22 Extraction method for inner contour of circuit breaker static contact meshing state image detection

Publications (1)

Publication Number Publication Date
CN113436212A true CN113436212A (en) 2021-09-24

Family

ID=77757215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110694422.3A Pending CN113436212A (en) 2021-06-22 2021-06-22 Extraction method for inner contour of circuit breaker static contact meshing state image detection

Country Status (1)

Country Link
CN (1) CN113436212A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114299086A (en) * 2021-12-24 2022-04-08 深圳明锐理想科技有限公司 Image segmentation processing method, electronic equipment and system for low-contrast imaging
CN114359597A (en) * 2021-11-26 2022-04-15 西安交通大学 Oil tank inner cover identification and pose parameter sensing method based on vision
CN114441499A (en) * 2022-04-11 2022-05-06 天津美腾科技股份有限公司 Grade detection method and device, identification equipment, ore pulp grade instrument and storage medium
CN114494226A (en) * 2022-02-11 2022-05-13 安徽大学 Spinning cake oil stain defect detection method based on graph centroid tracking algorithm
CN114937077A (en) * 2022-04-22 2022-08-23 南通荣华包装材料有限公司 Peanut seed screening method
CN114931112A (en) * 2022-04-08 2022-08-23 南京农业大学 Sow body ruler detection system based on intelligent inspection robot
CN116030047A (en) * 2023-03-24 2023-04-28 四川中星电子有限责任公司 Method for identifying mask qualification in capacitor process
TWI807809B (en) * 2022-05-04 2023-07-01 國立東華大學 System, computer program and computer-readable medium for assisting in the recognition of periodontitis and dental caries by using the convolutional neural network of deep learning
CN117237366A (en) * 2023-11-16 2023-12-15 福建凯达集团有限公司 Method for detecting anti-fog performance of film

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830868A (en) * 2018-04-19 2018-11-16 江南大学 It is a kind of that the circular fitting method combined is returned based on Snake model and iteration dipole inversion
CN109003258A (en) * 2018-06-15 2018-12-14 广东工业大学 A kind of high-precision sub-pix circular pieces measurement method
CN111583286A (en) * 2020-04-09 2020-08-25 天津大学 Abdomen MRI (magnetic resonance imaging) image contour extraction method based on Flow-XDoG operator

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830868A (en) * 2018-04-19 2018-11-16 江南大学 It is a kind of that the circular fitting method combined is returned based on Snake model and iteration dipole inversion
CN109003258A (en) * 2018-06-15 2018-12-14 广东工业大学 A kind of high-precision sub-pix circular pieces measurement method
CN111583286A (en) * 2020-04-09 2020-08-25 天津大学 Abdomen MRI (magnetic resonance imaging) image contour extraction method based on Flow-XDoG operator

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
徐超: "基于视觉测量的沉头孔垂直度检测新技术研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 *
徐超: "基于视觉测量的沉头孔垂直度检测新技术研究", 《中国优秀硕士论文全文库 工程科技Ⅱ辑》 *
玖零猴: "基于偏微分方程的图像分割 Snake模型 Matlab实现", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/139532898》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114359597A (en) * 2021-11-26 2022-04-15 西安交通大学 Oil tank inner cover identification and pose parameter sensing method based on vision
CN114359597B (en) * 2021-11-26 2023-09-12 西安交通大学 Vision-based oil tank inner cover identification and pose parameter sensing method
CN114299086A (en) * 2021-12-24 2022-04-08 深圳明锐理想科技有限公司 Image segmentation processing method, electronic equipment and system for low-contrast imaging
CN114494226A (en) * 2022-02-11 2022-05-13 安徽大学 Spinning cake oil stain defect detection method based on graph centroid tracking algorithm
CN114494226B (en) * 2022-02-11 2024-03-12 安徽大学 Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm
CN114931112B (en) * 2022-04-08 2024-01-26 南京农业大学 Sow body ruler detection system based on intelligent inspection robot
CN114931112A (en) * 2022-04-08 2022-08-23 南京农业大学 Sow body ruler detection system based on intelligent inspection robot
CN114441499A (en) * 2022-04-11 2022-05-06 天津美腾科技股份有限公司 Grade detection method and device, identification equipment, ore pulp grade instrument and storage medium
CN114937077A (en) * 2022-04-22 2022-08-23 南通荣华包装材料有限公司 Peanut seed screening method
TWI807809B (en) * 2022-05-04 2023-07-01 國立東華大學 System, computer program and computer-readable medium for assisting in the recognition of periodontitis and dental caries by using the convolutional neural network of deep learning
CN116030047A (en) * 2023-03-24 2023-04-28 四川中星电子有限责任公司 Method for identifying mask qualification in capacitor process
CN117237366B (en) * 2023-11-16 2024-02-06 福建凯达集团有限公司 Method for detecting anti-fog performance of film
CN117237366A (en) * 2023-11-16 2023-12-15 福建凯达集团有限公司 Method for detecting anti-fog performance of film

Similar Documents

Publication Publication Date Title
CN113436212A (en) Extraction method for inner contour of circuit breaker static contact meshing state image detection
CN107871322B (en) Iris image segmentation method and device
Al-Amri et al. Image segmentation by using edge detection
Sulaiman et al. Denoising-based clustering algorithms for segmentation of low level salt-and-pepper noise-corrupted images
CN107220988B (en) Part image edge extraction method based on improved canny operator
CN114372983B (en) Shielding box coating quality detection method and system based on image processing
CN108416789A (en) Method for detecting image edge and system
WO2021109697A1 (en) Character segmentation method and apparatus, and computer-readable storage medium
CN109447117B (en) Double-layer license plate recognition method and device, computer equipment and storage medium
CN114399522A (en) High-low threshold-based Canny operator edge detection method
CN116542982B (en) Departure judgment device defect detection method and device based on machine vision
Rani et al. Detection of edges using mathematical morphological operators
Palus Color image segmentation: selected techniques
CN109975196B (en) Reticulocyte detection method and system
CN111476804B (en) Efficient carrier roller image segmentation method, device, equipment and storage medium
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
CN109255792B (en) Video image segmentation method and device, terminal equipment and storage medium
CN109325421B (en) Eyelash removing method and system based on edge detection
CN112734761A (en) Industrial product image boundary contour extraction method
CN113780110A (en) Method and device for detecting weak and small targets in image sequence in real time
EP3510526A1 (en) Particle boundary identification
CN114581658A (en) Target detection method and device based on computer vision
CN116934746B (en) Scratch defect detection method, system, equipment and medium thereof
Chandra et al. A survey on advanced segmentation techniques in image processing applications
CN113781413A (en) Electrolytic capacitor positioning method based on Hough gradient method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210924