CN115100443A - Cable defect identification method based on high-speed template matching calculation - Google Patents

Cable defect identification method based on high-speed template matching calculation Download PDF

Info

Publication number
CN115100443A
CN115100443A CN202210474693.2A CN202210474693A CN115100443A CN 115100443 A CN115100443 A CN 115100443A CN 202210474693 A CN202210474693 A CN 202210474693A CN 115100443 A CN115100443 A CN 115100443A
Authority
CN
China
Prior art keywords
cable
image
template
matching
real
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
CN202210474693.2A
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.)
Hangzhou Xindian Internet Information Technology Co ltd
State Grid Zhejiang Electric Power Co Ltd Haiyan County Power Supply Co
Jiaxing Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
Hangzhou Xindian Internet Information Technology Co ltd
State Grid Zhejiang Electric Power Co Ltd Haiyan County Power Supply Co
Jiaxing Power Supply Co of State Grid Zhejiang Electric Power 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 Hangzhou Xindian Internet Information Technology Co ltd, State Grid Zhejiang Electric Power Co Ltd Haiyan County Power Supply Co, Jiaxing Power Supply Co of State Grid Zhejiang Electric Power Co Ltd filed Critical Hangzhou Xindian Internet Information Technology Co ltd
Priority to CN202210474693.2A priority Critical patent/CN115100443A/en
Publication of CN115100443A publication Critical patent/CN115100443A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a cable defect identification method based on high-speed template matching calculation, which overcomes the problems of low calculation efficiency and low real-time performance of the cable defect identification method in the prior art and comprises the following steps: s1: acquiring a cable historical image, training the cable historical image, and establishing a cable template; s2: acquiring a cable real-time image, and matching the acquired cable real-time image with a template in a cable template; s3: and judging whether the cable has defects or not according to the matching result. By using the template matching method, the cable defect identification calculation process is reduced, and the cable defect identification efficiency is improved.

Description

Cable defect identification method based on high-speed template matching calculation
Technical Field
The invention relates to the technical field of electric power detection equipment, in particular to a cable defect identification method based on high-speed template matching calculation.
Background
In recent years, power failure accidents caused by cable faults in China are extremely harmful. Accurate diagnosis of the running state of the cable is an important prerequisite for preventing cable faults. And in order to ensure the stability and the uninterrupted power supply, the detection requirement of the power cable is carried out under the condition of electrification.
Therefore, there are several inventions for testing and detecting high harmonic waves of cable defects, which are published under CN109116191A, and the inventions include: physical model of cable and joint defects: the method is used for simulating the defect type of the cable; a higher harmonic measurement device; and acquiring the characteristic value of the higher harmonic wave generated under each analog cable defect type, and generating a higher harmonic wave database according to the characteristic value of the higher harmonic wave and the corresponding analog cable defect type. The method is used for sampling and detecting the cable with the defect fault type, collects enough test data to generate a high-order harmonic database so as to be applied to defect evaluation of a power cable system, and can be used for evaluating the defect type of the cable matched in the database when the harmonic component information of the actual cable is detected on the basis of the generated high-order harmonic database. However, the invention has the disadvantages of more circuit elements, higher cost and no contribution to field test, and generates high-order harmonic data by using the data, thereby having more complex calculation process and low efficiency.
Disclosure of Invention
The invention aims to solve the problems of low calculation efficiency, low real-time performance and high cost of a cable defect template matching method in the prior art, and provides a cable defect identification method based on high-speed template matching calculation.
In order to achieve the purpose, the invention adopts the following technical scheme: a cable defect identification method based on high-speed template matching calculation is characterized by comprising the following steps:
s1: acquiring a cable historical image, training the cable historical image, and establishing a cable template;
s2: acquiring a cable real-time image, and matching the acquired cable real-time image with a template in a cable template;
s3: and judging whether the cable has defects or not according to the matching result.
According to the invention, the defects of the cable can be identified in a disordered environment only by comparing and matching the real-time acquisition result with the template in the cable template, and the real-time performance is realized.
Preferably, the step S1 further includes:
s1.1: acquiring historical image data of the cable from a plurality of angles, a plurality of distances and a plurality of directions, and preprocessing the acquired historical image data to obtain a training template image;
s1.2: and performing feature extraction on the preprocessed image data to obtain feature point information.
The model of the pre-identified three-dimensional object can be manually rendered by utilizing an OpenGL method; according to the invention, through collecting historical data of the cable, template images at all angles and distances when the cable has defects are obtained, and features on the images are extracted and stored.
Preferably, in step S1.1, the preprocessing includes:
a1: performing geometric transformation on the acquired historical image, mainly comprising performing inclination correction, translation, scale scaling and rotation at different angles on the historical image, and transforming the historical image to the axial direction of the cable;
a2: denoising the history image after geometric transformation, and reducing noises including shot noise, photon noise and alternating current noise in the history image;
a3: and performing image enhancement on the denoised historical image, wherein the image enhancement is mainly represented by performing gray level transformation on the historical image and improving the contrast.
Through image preprocessing, irrelevant information in the image can be eliminated, useful real information can be recovered, the detectability of relevant information is enhanced, and data is simplified to the maximum extent, so that the reliability of feature extraction, image segmentation, matching and identification is improved.
Preferably, in step S1.2, the step of extracting feature points includes:
b1: calculating a feature vector: extracting edge points of the image, calculating the gradient direction and the gradient amplitude of each edge point, and clustering the edge points to obtain a feature vector;
b2: calculating the coordinates of the characteristic points: layering the template images by using a pyramid model, establishing an image pyramid from high to low, extracting the coordinate position of each layer of feature points of the pyramid, continuously and circularly calculating and correcting the coordinates of the feature points to obtain the coordinates of the feature points;
b3: the characteristic point information is saved.
The gradient amplitude of the candidate points can be calculated through a Sobel operator to obtain the edge of the object image, the gradient direction of the candidate points is calculated through a Phase function, then the gradient direction of the candidate points is quantized, and the gradient direction with the largest gradient amplitude higher than the threshold value in the area candidate points is used as the gradient direction of the whole area through setting a threshold value and a gradient histogram. But this is not the only option for the present invention.
Preferably, the pyramid model includes a gaussian pyramid and a mean pyramid. The gaussian pyramid is essentially a multi-scale representation of a signal, i.e., the same signal or picture is gaussian blurred several times and down-sampled to generate multiple sets of signals or pictures at different scales for subsequent processing. The mean pyramid has a good visual effect and small calculation amount. The two are combined, so that the calculation amount can be effectively reduced, and the calculation efficiency is improved.
Preferably, in step S2, the step of matching the cable template includes:
s2.1: preprocessing acquired cable real-time image data, and extracting features of the preprocessed image to obtain real-time image feature point information;
s2.2: taking the angle direction of the gradient of the feature point as a feature, quantizing the angle of 360 degrees into N values, and calculating the absolute values of the cosines of different angles of the cable image;
s2.3: diffusing the quantized values to establish a corresponding table;
s2.4: extracting cable template information, matching the cable template on a real-time image, and comparing the absolute difference value between the characteristic point of the cable template and the corresponding characteristic point of the real-time image;
s2.5: and repeating matching to obtain different similarities, overlapping the similarities of the same template to obtain the overall similarity, and judging whether the matching is successful according to the similarities.
The way of preprocessing and feature extraction is the same as that used in step one. In the invention, the establishment of the corresponding table can be that the characteristic information is coded and used corresponding to a binary string.
Preferably, in step S2.3, the specific step of diffusing the quantized values is:
c1: setting a characteristic point field, carrying out OR operation on each point and the field thereof according to the discretization direction, carrying out OR operation between T rows when carrying out OR operation, and carrying out OR operation between T columns on the result;
c2: and (5) completing the gradient direction value traversal of the characteristic points in the field for T times according to the field diameter T in a circulating mode and storing. And performing OR operation among the T rows, and performing OR operation among the T columns on the result, wherein only 2 x T times of or calculation are needed, and the operation speed is increased.
Preferably, the method further comprises step S4: and storing the acquired cable real-time image and the matching result. The result can be called and checked conveniently at any time.
Therefore, the invention has the following beneficial effects: 1. a cable template library is generated by using historical data, a response graph is calculated in advance, table lookup is directly carried out during matching, and the matching efficiency is high; 2. the collected image is generated in real time, and the image collection efficiency is high; 3. the image data is directly processed without generating other data, and the calculation process is reduced.
Drawings
FIG. 1 is a flow chart of the operation of the method of the present invention.
Detailed Description
The invention is described in further detail below with reference to the following detailed description and accompanying drawings:
in the embodiment shown in fig. 1, a cable defect identification method based on high-speed template matching calculation is shown, and the operation flow is as follows: acquiring a cable historical image, training the cable historical image, and establishing a cable template; acquiring a cable real-time image, and matching the acquired cable real-time image with a template in a cable template; judging whether the cable has defects or not according to the matching result; and step four, storing the acquired cable real-time image and the matching result. According to the invention, the defects of the cable can be identified in a disordered environment only by comparing and matching the real-time acquisition result with the template in the cable template, and the real-time performance is realized.
The first step is as follows: and acquiring a cable historical image, training the cable historical image, and establishing a cable template.
And acquiring historical cable image data from a plurality of angles, a plurality of distances and a plurality of directions, and preprocessing the acquired historical image data to obtain a training template image.
The pretreatment comprises the following steps:
carrying out geometric transformation on the collected historical image, wherein the geometric transformation mainly comprises the steps of carrying out inclination correction, translation, scale scaling and rotation at different angles on the historical image, and transforming the historical image to the axial direction of the cable; denoising the history image after geometric transformation, and reducing noises including shot noise, photon noise and alternating current noise in the history image; and performing image enhancement on the denoised historical image, wherein the image enhancement is mainly represented by performing gray level transformation on the historical image and improving the contrast. Through image preprocessing, irrelevant information in the image can be eliminated, useful real information can be recovered, the detectability of relevant information is enhanced, and data is simplified to the maximum extent, so that the reliability of feature extraction, image segmentation, matching and identification is improved.
And performing feature extraction on the preprocessed image data to obtain feature point information.
The concrete expression is as follows:
1. calculating a feature vector: in the embodiment, a Sobel operator is adopted to calculate gradient amplitude of candidate points to obtain the edge of an object image, the gradient direction of the candidate points is calculated through a Phase function, then the gradient direction of the candidate points is quantized, and the gradient direction with the largest number of candidate points in the area with the gradient amplitude higher than the threshold value is taken as the gradient direction of the whole area through setting the threshold value and a gradient histogram.
2. Calculating a characteristic value: and layering the template image by using a pyramid model, establishing an image pyramid from high to low, extracting the coordinate position of each layer of feature points of the pyramid, continuously and circularly calculating and correcting the coordinates of the feature points to obtain the coordinates of the feature points. The pyramid model is a model combining a Gaussian pyramid and a mean pyramid.
And storing the obtained feature vector and the feature value to obtain feature point information.
The second step is that: and acquiring a cable real-time image, and matching the acquired cable real-time image with a template in a cable template.
And (3) preprocessing the acquired cable real-time image data, and extracting the features of the preprocessed image to obtain the real-time image feature point information, wherein the feature extraction mode is consistent with the method adopted in the step one. And taking the angle direction of the gradient of the feature point as a feature, quantizing the angle of 360 degrees into N values, and calculating the absolute values of the cosines of different angles of the cable image.
In this embodiment, 360 angles are quantized into 8 values, that is, 45 degrees are used as intervals, and the angles are respectively represented by integers 0, 1, 2, 3, 4, 5, 6, and 7, so that there are 8 directions, 5 absolute values of differences (calculated according to right-angle included angles) between two different angles exist, pixel-by-pixel matching is performed for the 8 directions, and the matching result is a cosine value of an angle from the nearest direction.
And diffusing the quantized values to establish a corresponding table:
setting a characteristic point field, carrying out OR operation on each point and the field thereof according to the discretization direction, carrying out OR operation between T rows when carrying out OR operation, and carrying out OR operation between T columns on the result; and (5) completing the gradient direction value traversal of the characteristic points in the field for T times according to the field diameter T in a circulating mode and storing.
In this embodiment, the lookup table is made by using a binary encoding method, and quantized into how many response graphs exist in how many value lookup tables according to a quantization result, that is, the response graphs are binary representations of the corresponding extension directions of the template at various positions.
Extracting cable template information, matching the cable template on a real-time image, and comparing the absolute difference value between the characteristic point of the cable template and the corresponding characteristic point of the real-time image; and repeating matching to obtain different similarities, and overlapping the similarities of the same template to obtain the overall similarity.
The third step: and judging whether the cable has defects or not according to the matching result.
And judging whether the matching is successful according to the similarity. And if the matching is successful, judging the defects of the current cable according to the template obtained by matching.
The fourth step: and storing the acquired cable real-time image and the matching result.
And the acquired cable real-time image and the matching result are stored, so that the result can be conveniently called and checked at any time.
The above-described embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention in any way, and other variations and modifications may be made without departing from the spirit of the invention as set forth in the claims.

Claims (8)

1. A cable defect identification method based on high-speed template matching calculation is characterized by comprising the following steps:
s1: acquiring a cable historical image, training the cable historical image, and establishing a cable template;
s2: acquiring a cable real-time image, and matching the acquired cable real-time image with a template in a cable template;
s3: and judging whether the cable has defects or not according to the matching result.
2. The method for cable defect identification based on high-speed template matching calculation as claimed in claim 1, wherein said step S1 further comprises:
s1.1: acquiring cable historical image data from a multi-dimensional angle, and preprocessing the acquired historical image data to obtain a training template image;
s1.2: and performing feature extraction on the preprocessed image data to obtain feature point information.
3. The method for identifying cable defects based on high-speed template matching calculation according to claim 2, wherein in step S1.1, the preprocessing comprises:
a1: carrying out geometric transformation on the collected historical image, wherein the geometric transformation mainly comprises the steps of carrying out inclination correction, translation, scale scaling and rotation at different angles on the historical image;
a2: denoising the history image after geometric transformation, and reducing noises including shot noise, photon noise and alternating current noise in the history image;
a3: and performing image enhancement on the denoised historical image, wherein the image enhancement is mainly represented by performing gray level transformation on the historical image and improving the contrast.
4. A cable defect identification method based on high-speed template matching calculation according to claim 2 or 3, characterized in that, in the step S1.2, the step of extracting feature points is:
b1: calculating a feature vector: extracting edge points of the image, calculating the gradient direction and the gradient amplitude of each edge point, and clustering the edge points to obtain a feature vector;
b2: calculating the coordinates of the characteristic points: layering the template images by using a pyramid model, establishing an image pyramid from high to low, extracting the coordinate position of each layer of feature points of the pyramid, continuously and circularly calculating and correcting the coordinates of the feature points to obtain the coordinates of the feature points;
b3: the characteristic point information is saved.
5. The method of claim 4, wherein the pyramid model comprises a Gaussian pyramid and a mean pyramid.
6. The method for identifying the cable defect based on the high-speed template matching calculation according to claim 1, wherein in the step S2, the specific step of matching the cable template comprises:
s2.1: preprocessing acquired cable real-time image data, and extracting features of the preprocessed image to obtain cable real-time image feature point information;
s2.2: taking the angle direction of the gradient of the feature point as a feature, quantizing the angle of 360 degrees into N values, and calculating the absolute values of the cosines of different angles of the cable image;
s2.3: diffusing the quantized values to establish a corresponding table;
s2.4: extracting cable template information, matching the cable template on a real-time image, and comparing the absolute difference value between the characteristic point of the cable template and the corresponding characteristic point of the real-time image;
s2.5: and repeating matching to obtain different similarities, overlapping the similarities of the same template to obtain the overall similarity, and judging whether the matching is successful according to the similarities.
7. The method for identifying the cable defects based on the high-speed template matching calculation according to claim 6, wherein in the step S2.3, the specific step of diffusing the quantized values is as follows:
c1: setting a characteristic point field, carrying out OR operation on each characteristic point and the field thereof according to the discretization direction, and carrying out OR operation between T rows and then carrying out OR operation between T columns on the result when carrying out OR operation;
c2: and (5) completing the gradient direction value traversal of the characteristic points in the field for T times according to the field diameter T in a circulating mode and storing.
8. The cable defect identification method based on the high-speed template matching calculation according to claim 1, 2 or 4, characterized by further comprising the step S4: and storing the acquired cable real-time image and the matching result.
CN202210474693.2A 2022-04-29 2022-04-29 Cable defect identification method based on high-speed template matching calculation Pending CN115100443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210474693.2A CN115100443A (en) 2022-04-29 2022-04-29 Cable defect identification method based on high-speed template matching calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210474693.2A CN115100443A (en) 2022-04-29 2022-04-29 Cable defect identification method based on high-speed template matching calculation

Publications (1)

Publication Number Publication Date
CN115100443A true CN115100443A (en) 2022-09-23

Family

ID=83287712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210474693.2A Pending CN115100443A (en) 2022-04-29 2022-04-29 Cable defect identification method based on high-speed template matching calculation

Country Status (1)

Country Link
CN (1) CN115100443A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116486126A (en) * 2023-06-25 2023-07-25 合肥联宝信息技术有限公司 Template determination method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116486126A (en) * 2023-06-25 2023-07-25 合肥联宝信息技术有限公司 Template determination method, device, equipment and storage medium
CN116486126B (en) * 2023-06-25 2023-10-27 合肥联宝信息技术有限公司 Template determination method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109087274B (en) Electronic device defect detection method and device based on multi-dimensional fusion and semantic segmentation
US11443437B2 (en) Vibe-based three-dimensional sonar point cloud image segmentation method
CN106289777B (en) A kind of multi-state rolling bearing performance appraisal procedure based on geometry measurement
CN110796637A (en) Training and testing method and device of image defect detection model and storage medium
CN107389701A (en) A kind of PCB visual defects automatic checkout system and method based on image
CN106504238A (en) Railway contact line defect inspection method based on image procossing and convolutional neural networks
CN109946304A (en) Surface defects of parts on-line detecting system and detection method based on characteristic matching
Deng et al. Defect detection of bearing surfaces based on machine vision technique
CN114170184A (en) Product image anomaly detection method and device based on embedded feature vector
CN105574161A (en) Trademark graph element identification method, device and system
CN115100443A (en) Cable defect identification method based on high-speed template matching calculation
AlAzawee et al. Using morphological operations—Erosion based algorithm for edge detection
CN109948629B (en) GIS equipment X-ray image fault detection method based on SIFT features
CN116229052A (en) Method for detecting state change of substation equipment based on twin network
CN110334727B (en) Intelligent matching detection method for tunnel cracks
CN113962951B (en) Training method and device for detecting segmentation model, and target detection method and device
CN113780484B (en) Industrial product defect detection method and device
Sun K-Cosine Corner Detection.
CN112614094B (en) Insulator string abnormity positioning and identifying method based on sequence state coding
Han et al. Damage detection of quayside crane structure based on improved faster R-CNN
CN110598674B (en) Point switch fault identification method based on pattern identification
CN113870328A (en) Liquid foreign matter visual detection method and system
CN107123105A (en) Images match defect inspection method based on FAST algorithms
Jian-hai et al. Research on subpixel detecting on-line system based on machine vision for inner diameter of bearings
Wang et al. On research of video stream detection algorithm for ship waterline

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