CN116912254B - Cable defect identification method based on data enhancement preprocessing - Google Patents

Cable defect identification method based on data enhancement preprocessing Download PDF

Info

Publication number
CN116912254B
CN116912254B CN202311181080.0A CN202311181080A CN116912254B CN 116912254 B CN116912254 B CN 116912254B CN 202311181080 A CN202311181080 A CN 202311181080A CN 116912254 B CN116912254 B CN 116912254B
Authority
CN
China
Prior art keywords
pixel
pixel point
degree
defective
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311181080.0A
Other languages
Chinese (zh)
Other versions
CN116912254A (en
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.)
Shandong Bocheng Electric Co ltd
Original Assignee
Shandong Bocheng Electric 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 Shandong Bocheng Electric Co ltd filed Critical Shandong Bocheng Electric Co ltd
Priority to CN202311181080.0A priority Critical patent/CN116912254B/en
Publication of CN116912254A publication Critical patent/CN116912254A/en
Application granted granted Critical
Publication of CN116912254B publication Critical patent/CN116912254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • 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/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • 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/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Abstract

The invention relates to the technical field of image enhancement, in particular to a cable defect identification method based on data enhancement pretreatment. The method utilizes an artificial intelligence system to complete the breakdown defect identification of the electric wires and cables. The method comprises the steps of obtaining a cable area, and screening a normal area and a defect area from the cable area; and performing image enhancement on the normal region and the defect region to obtain an enhanced image, and further identifying a breakdown defect region in the enhanced image. According to the invention, the pixel points possibly in the breakdown defect area are obtained from the wire and cable image, the pixel points in the breakdown defect area are enhanced, the image enhancement is realized, the enhancement image is obtained, the breakdown defect area can be clearly distinguished, and the defect detection accuracy is improved.

Description

Cable defect identification method based on data enhancement preprocessing
Technical Field
The invention relates to the technical field of image enhancement, in particular to a cable defect identification method based on data enhancement pretreatment.
Background
The wire and cable is used to transmit electrical energy, information and wire products for electromagnetic energy conversion. The broad sense of the wire cable is also simply referred to as cable, and the narrow sense of the cable is referred to as insulated cable. In the use process of the electric wire and the electric cable, the electric wire and the electric cable can be damaged due to the influence of various reasons, and the breakdown phenomenon can also exist when the electric wire and the electric cable are serious. Some wires and cables in the high altitude cannot be checked by human eyes in person, and only wire and cable defect detection can be performed through wire and cable images acquired by the unmanned aerial vehicle.
At present, a common method for detecting defects of an electric wire and cable image acquired by an unmanned aerial vehicle is to globally strengthen the electric wire and cable image, and because the breakdown defect area and the aging abrasion area of the cable are similar in gray value, the breakdown defect area is difficult to accurately distinguish from the image only by globally strengthening the electric wire and cable image, and the defect detection precision is low.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a cable defect identification method based on data enhancement preprocessing, and the adopted technical scheme is as follows:
acquiring an electric wire and cable image, and preprocessing the electric wire and cable image to obtain a cable gray level image and a cable area;
screening out a normal area and a defect area in the cable area based on the gray value of the pixel point of the cable gray image; calculating the gray level abnormality degree of the defective pixel point compared with the pixel point in the normal area based on the defective pixel point in the defective area, and calculating the pixel protrusion degree of the defective pixel point according to the difference of the gray level abnormality degree of the defective pixel point compared with the pixel point in the corresponding neighborhood;
selecting a neighborhood pixel point corresponding to the defective pixel point according to the pixel salience degree of the defective pixel point; calculating the clutter degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel; screening a plurality of closed pixel points from a plurality of neighborhood pixel points according to the difference of the mess degree of the defect pixel points and the corresponding neighborhood pixel points, and calculating the regional closure degree of the region formed by the closed pixel points;
the pixel saliency and the clutter degree are weighted and summed to obtain the attention degree of the defective pixel point; multiplying the average value of the products of the pixel salience degree, the clutter degree and the region closure degree of each pixel point in a defect region by the attention degree to obtain a transformation coefficient of the defect region;
enhancing the defect area by utilizing the transformation coefficient to obtain an enhanced image; and carrying out edge detection on the enhanced image to obtain a breakdown defect area.
Preferably, the screening the normal area and the defect area in the cable area based on the gray value of the pixel point of the cable gray image includes:
acquiring a gray level histogram of the cable gray level image, and selecting a gray level value corresponding to the highest peak value of the gray level histogram as a gray level threshold; based on the cable region, taking the pixel points smaller than the gray threshold value as normal pixel points, and forming the normal region by the normal pixel points; and taking the pixel point with the gray threshold value larger than or equal to the gray threshold value as a defective pixel point, and forming the defective region by the defective pixel point.
Preferably, the calculating the gray level abnormality degree of the defective pixel point compared with the pixel point in the normal area includes:
acquiring a gray average value of a normal pixel point in a normal region; and the difference value between the gray value of the defective pixel point and the gray average value is the gray abnormity degree.
Preferably, the calculating the pixel protrusion degree of the defective pixel according to the difference of the gray level abnormality degree of the defective pixel compared with the pixel in the corresponding neighborhood includes:
the gray value of the defective pixel point is subtracted from the gray value of any pixel point in the corresponding neighborhood to obtain a first gray difference value; each defective pixel point corresponds to a plurality of first gray difference values; and the squares of the first gray level differences are added to obtain a total gray level difference, and the ratio of the total gray level difference to the number of pixel points in the neighborhood is used as the pixel saliency degree.
Preferably, the calculating the clutter degree of the defective pixel according to the gradient amplitude difference between the defective pixel and the corresponding neighboring pixel includes:
the square of the difference between the gradient amplitude of the defective pixel and the gradient amplitude of the corresponding arbitrary neighborhood pixel is used as an initial gradient difference, the sum of a plurality of initial gradient differences is a total gradient difference, and the ratio of the total gradient difference to the number of the neighborhood pixels corresponding to the defective pixel is used as the clutter degree.
Preferably, the screening a plurality of closed pixels from a plurality of neighboring pixels according to the difference between the defective pixel and the clutter degree of the corresponding neighboring pixels includes:
selecting a defective pixel with the largest clutter degree as a starting pixel, acquiring a difference value of the clutter degree between the starting pixel and a corresponding neighborhood pixel, and taking the neighborhood pixel with the difference value of the corresponding clutter degree smaller than or equal to a preset clutter difference value threshold as a first closed pixel; obtaining a difference value of clutter degrees of the first closed pixel point and the corresponding neighborhood pixel points except the initial pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degrees smaller than or equal to a preset clutter difference value threshold value as a second closed pixel point; obtaining a difference value of clutter degrees of the second closed pixel point and the corresponding neighborhood pixel points except the first closed pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degrees smaller than or equal to a preset clutter difference value threshold value as a third closed pixel point; and repeatedly searching the closed pixel points until the difference value of the clutter degrees of the neighborhood pixel points corresponding to the last closed pixel point is larger than a preset clutter difference value threshold value.
Preferably, the calculating the area closing degree of the closed pixel point forming area includes:
selecting an arbitrary region formed by closed pixel points as a target region, and obtaining the reciprocal of the number of the closed pixel points corresponding to the target region; a second exponential function with a natural constant as a base and a negative said reciprocal as an exponent is used as the degree of region closure.
Preferably, multiplying the attention by the average value of the products of the pixel saliency, the clutter degree and the region closure degree of each pixel point in the defect region to obtain a transform coefficient of the defect region includes:
the calculation formula of the transformation coefficient is as follows:
wherein,the attention degree of the j-th defective pixel point; />The pixel protrusion degree of the jth defective pixel point; />The degree of clutter for the j-th defective pixel; />The closing degree of the region of the jth defective pixel point; />A threshold value of attention is preset; />The number of defective pixel points with the attention degree being greater than or equal to a preset attention degree threshold value; />The number of defective pixel points with the attention degree smaller than a preset attention degree threshold value is set; />The conversion coefficient corresponding to the j-th defect pixel point when the attention degree is larger than or equal to a preset attention degree threshold value; />And when the attention degree of the j-th defective pixel point is smaller than a preset attention degree threshold value, the corresponding transformation coefficient is used.
Preferably, the selecting the neighboring pixel point corresponding to the defective pixel point according to the pixel protrusion degree of the defective pixel point includes:
acquiring a first exponential function taking a natural constant as a base and taking negative pixel salience as an index, and selecting a pixel point in the eight adjacent areas of the defective pixel point as a neighborhood pixel point when the first exponential function is larger than a preset salience threshold value; and when the first exponential function is smaller than or equal to a preset salient threshold, selecting the pixel points in the four adjacent areas of the defective pixel point as the adjacent pixel points.
Preferably, the enhancing the defective area by using the transform coefficient to obtain an enhanced image includes:
multiplying the pixel value of each defective pixel point in the defective area by the corresponding transformation coefficient to obtain an enhanced pixel value, and forming an enhanced image based on the enhanced pixel value corresponding to the defective pixel point and the pixel value of the normal pixel point in the normal area.
The embodiment of the invention has at least the following beneficial effects:
the embodiment of the invention relates to the technical field of data processing, and the method is used for acquiring an electric wire and cable image and a cable area; screening out a normal area and a defect area in the cable area; calculating the pixel protrusion degree of the defective pixel according to the gray level abnormality degree of the defective pixel compared with the pixel in the normal region based on the defective pixel in the defective region, wherein the probability that the pixel with the larger pixel protrusion degree is the pixel in the breakdown defective region is larger; calculating the disorder degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel, wherein the larger the disorder degree is, the larger the probability that the pixel in the defect area is broken down is; further screening a plurality of closed pixel points from a plurality of neighborhood pixel points, calculating the area closing degree of an area formed by the closed pixel points, screening the closed pixel points because most of breakdown defect areas are in closed pits, and calculating the area closing degree of a corresponding area; the pixel prominence and the clutter degree are weighted and summed to obtain the attention degree of the defective pixel point; obtaining a transformation coefficient of the defect area according to the pixel salience degree, the clutter degree, the area closure degree and the attention degree of each pixel point in the defect area; performing image enhancement on the defect area by using the transformation coefficient to obtain an enhanced image; and performing edge detection on the enhanced image to obtain a breakdown defect area. According to the embodiment of the invention, through analysis processing of the cable image, pixel points which are possibly in the breakdown defect area are distinguished from the defect area, and the pixel points are enhanced, so that the enhanced image is obtained by image enhancement, and the breakdown defect area can be distinguished clearly based on the enhanced image.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for identifying a cable defect based on data enhancement preprocessing according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of the specific implementation, structure, characteristics and effects of the cable defect identification method based on data enhancement pretreatment according to the invention with reference to the attached drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment of the invention provides a specific implementation method of a cable defect identification method based on data enhancement preprocessing, which is suitable for a wire and cable defect detection scene. The unmanned aerial vehicle is used for collecting wires and cables in the high altitude under the scene, or the professional camera is used for collecting the wires and cables, so that the images of the wires and cables are obtained. To solve the problem that it is difficult to accurately distinguish a breakdown defect region from an image by global enhancement of only a wire and cable image. According to the embodiment of the invention, through carrying out data analysis processing on the cable image, pixel points which are possibly in the breakdown defect area are distinguished from the defect area, and the pixel points are enhanced, so that the enhanced image is obtained through image enhancement, and the breakdown defect area can be distinguished clearly based on the enhanced image.
The following specifically describes a specific scheme of the cable defect identification method based on data enhancement preprocessing provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating a method for identifying a cable defect based on data enhancement preprocessing according to an embodiment of the present invention is shown, the method includes the following steps:
and S100, acquiring an electric wire and cable image, and preprocessing the electric wire and cable image to obtain a cable gray level image and a cable area.
Aerial collection of aerial wires and cables is achieved through unmanned aerial vehicle, or underground wire and cable images are collected through a professional camera. Because noise interference exists in the process of acquiring the wire and cable images, the acquired wire and cable images need to be preprocessed to remove the noise of the wire and cable images. Specific: and carrying out Gaussian filtering processing on the wire and cable image to obtain a noise reduction image. The cable area in the noise reduction image is separated semantically, the cable area is multiplied by the noise reduction image to obtain a cable area image, and the cable area image is grayed to obtain a cable gray image.
The semantic segmentation method comprises the steps of dividing cable areas in a noise reduction image, specifically: a DNN network is utilized to identify and extract cable regions in the noise reduced image. The DNN network comprises the following steps: the DNN uses the data set which is the noise reduction image corresponding to the wire and cable image in the image acquisition process as the data set, and the wire and cable forms to be extracted are various. The pixels to be segmented are of two types, namely, the label labeling process corresponding to the training data set is as follows: the corresponding semantics are divided into single channels, the pixel points of the background area in the image are marked as 0, and the pixel points of the cable area are marked as 1. The task of the DNN network is classification, the loss function used being a cross entropy loss function.
Enhancing the image requires extracting the cable wires in the image, so the DNN network is utilized to identify and extract the cable areas in the image.
Step S200, screening out a normal area and a defect area in the cable area based on the gray value of the pixel point of the cable gray image; and calculating the gray level abnormality degree of the defective pixel point compared with the pixel point in the normal area based on the defective pixel point in the defective area, and calculating the pixel protrusion degree of the defective pixel point according to the difference of the gray level abnormality degree of the defective pixel point compared with the corresponding pixel point in the neighborhood.
In the use process of the cable, the surface of the cable is aged and worn to enable uneven surface gray level distribution, if histogram equalization is directly carried out on the electric wire and cable image, the reinforced image can not intensively highlight the characteristics of the breakdown area, and the linear gray level enhancement can lose the edge characteristics of the breakdown area in the image and the like. Therefore, the defect areas which are possibly defective can be obtained first to classify the defect areas, the possible defect areas are enhanced in piecewise linearity, the defect areas are enhanced, other areas are restrained, and the normal areas are unchanged.
And screening out a normal area and a defect area in the cable area based on the gray value of the pixel point of the cable gray image. Specific: and acquiring a gray level histogram of the cable gray level image, wherein the horizontal axis of the gray level histogram is gray level 0-255, and the vertical axis of the gray level histogram is pixel frequency. Because the cable gray level image has a relatively clear characteristic, the gray level value of the pixels in the normal area without defects in the cable area is lower, the gray level value of the defective area is different from that in the normal area, and the pixel value of the defective area may be higher than that of the normal area or lower than that of the normal area. Therefore, the gray level histogram of the cable gray level image can be in a multimodal shape, and as the pixel frequency of the normal area in the cable gray level image is the greatest under most conditions, the pixel value of the highest peak representing the normal area in the gray level histogram is selected through the gray level histogram, namely the gray level value corresponding to the highest peak of the gray level histogram is selected as the gray level threshold; based on the cable region, the pixel points smaller than the gray threshold value are used as normal pixel points, and the normal pixel points form a normal region; the pixel points with the gray threshold value or more are taken as defective pixel points, and a defective region is formed by the defective pixel points. Wherein the resulting defective areas include severe defective areas that are broken down and slight defective areas that are caused by wear in use. The severely defective region that is broken down is referred to as a breakdown defective region, and the slightly defective region is referred to as an aged wear region.
The breakdown defect area needs to be enhanced, and the aging abrasion area is restrained, so that the breakdown defect area is highlighted. Because the defect areas are not breakdown defect areas, and the conditions of similar gray levels between breakdown defects and aging wear exist, the breakdown defect areas are difficult to detect by human eyes, and the protruding degree and the closing degree of the defect areas are further analyzed.
The larger the gray scale difference between the pixel point gray scale value in the defect area and the pixel point gray scale value in the normal area, the larger the gray scale difference of the defect pixel point is, the larger the probability that the defect pixel point is the pixel point in the breakdown defect area is reflected. Further, based on the defective pixel points in the defective area, the gray level abnormality degree of the defective pixel points compared with the pixel points in the normal area is calculated. Specific: and acquiring the gray average value of the normal pixel points in the normal region, wherein the difference value between the gray value of the defective pixel point and the gray average value is the gray abnormity degree.
And calculating the pixel saliency degree of the defective pixel according to the difference of the gray level abnormality degree of the defective pixel compared with the pixel in the corresponding neighborhood. Specific: for any defective pixel point, subtracting the gray value of any pixel point in the corresponding neighborhood from the gray value of the defective pixel point to obtain a first gray difference value; each defective pixel corresponds to a plurality of first gray differences; if the eight neighborhood pixels of the defective pixel are taken, each corresponding defective pixel corresponds to eight first gray difference values, and if the four neighborhood pixels of the defective pixel are taken, each corresponding defective pixel corresponds to four first gray difference values. The squares of the first gray differences are added to obtain a total gray difference, and the ratio of the total gray difference to the number of pixels in the neighborhood is used as the pixel saliency. The pixel point is abnormal, and pixels in the neighborhood corresponding to the pixel point are abnormal, so that the pixel protrusion degree is reflected to be large, and the probability that the defective pixel point belongs to a breakdown defect area is increased as the pixel protrusion degree is larger.
Step S300, selecting a neighborhood pixel point corresponding to the defective pixel point according to the pixel saliency of the defective pixel point; calculating the clutter degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel; and screening a plurality of closed pixels from the plurality of neighborhood pixels according to the difference of the mess degree of the defect pixels and the corresponding neighborhood pixels, and calculating the regional closure degree of the region formed by the closed pixels.
The breakdown defect area and the aging abrasion area have gray scale difference from the normal area, and the defect type cannot be subdivided only by the pixel prominence degree. However, the breakdown defect is that the gradient information of the pixels in the breakdown area is very disordered and the breakdown area is approximately closed because the charges in the wires are extremely poor and the multilayer plastic layers, the insulating layers and the like are broken down from inside to outside; the aging abrasion area is simply the change of the plane gray scale, and the whole is clearer and tidier.
Therefore, the gradient of each pixel point in the cable gray image in the x and y directions is calculated by utilizing the Sobel (Sobel) operator,/>Further calculating gradient amplitude of each pixel point>. It should be noted that, the gradient is generally regarded as the magnitude of the gradient, and is simply referred to as the gradient magnitude.
Selecting a proper clutter degree calculation range for the pixel points according to the pixel salience degree, wherein the larger the pixel salience degree is, the smaller the corresponding selected neighborhood size is; conversely, the smaller the pixel salience, the larger the corresponding selected neighborhood size. And selecting a neighborhood pixel point corresponding to the defective pixel point according to the pixel saliency of the defective pixel point.
Specific: a first exponential function is obtained that bases on a natural constant and that expounds to a negative pixel saliency. When the first exponential function is larger than a preset salient threshold, selecting a pixel in the eight adjacent areas of the defective pixel as a neighborhood pixel; when the first exponential function is smaller than or equal to a preset salient threshold, selecting the pixel points in the four adjacent areas of the defective pixel point as the neighborhood pixel points.
Wherein,the number of the neighborhood pixel points; />Is the pixel salience; />Is a natural constant; b is a preset protrusion threshold. In the embodiment of the present invention, the preset protrusion threshold is 0.5, and in other embodiments, the practitioner can adjust the value according to the actual situation.
When the protrusion degree of the defective pixel point is larger, the corresponding first exponential function is smaller, and when the first exponential function is smaller than a preset protrusion threshold value, the pixel points in the four adjacent areas are selected as the neighborhood pixel points, because the higher the pixel protrusion degree of the defective pixel point is, the larger the pixel point probability that the defective pixel point is a breakdown defective area is reflected, the gradient of the pixel point in the breakdown defective area is richer, the disorder degree can be reflected by selecting a smaller neighborhood, namely, the disorder degree can be reflected by selecting the pixel points in the four adjacent areas, the subsequent calculated amount is reduced, and the calculation speed is increased. When the first exponential function is larger than or equal to a preset salient threshold, the pixel points in the eight adjacent areas are selected as the neighborhood pixel points, and the probability that the pixel points with the defects are the aging abrasion areas is larger as the pixel salient degree is lower, the aging abrasion areas are tidier, so that the larger neighborhood is selected to reflect the clutter degree, namely, the pixel points in the eight adjacent areas are selected to reflect the clutter degree.
And calculating the clutter degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel. Specific: the square of the difference between the gradient amplitude of the defective pixel and the gradient amplitude of the corresponding arbitrary neighborhood pixel is used as an initial gradient difference, and each defective pixel corresponds to a plurality of initial gradient differences. The sum of the initial gradient differences is a total gradient difference, and the ratio of the total gradient difference to the number of neighborhood pixel points corresponding to the defective pixel points is the clutter degree.
The degree of clutterThe calculation formula of (2) is as follows:
wherein,is a pixel point of arbitrary defect>Is a gradient magnitude of (a); />Is defective pixel->Corresponding->Gradient amplitude values of the adjacent pixel points; />Is a defective pixelPoint->The number of corresponding neighborhood pixel points; />Is defective pixel->The number of corresponding neighborhood pixels.
The higher the clutter degree of the defective pixel, the greater the probability that the defective pixel is a defective pixel within a breakdown defective region; conversely, the lower the clutter of the defective pixel, the greater the likelihood that the defective pixel is a defective pixel in an aged and worn area.
Since the breakdown defect area is in a closed shape, the pixel points at the edge of the breakdown defect area should meet the requirements of large pixel protrusion and high clutter. Calculating the position relation between points with high clutter and large pixel salience, if the points are approximately closed, the point is very likely to be a breakdown defect area, and the point needs to be enhanced later; if little closure indicates that a breakdown defect region is not possible, it is not enhanced later.
Calculating the difference of the clutter degree of the defective pixel point and the corresponding neighborhood pixel point, screening a plurality of closed pixel points from the neighborhood pixel points, and calculating the regional closure degree of the region formed by the adjacent closed pixel points. Specific:
selecting a defect pixel point with the largest clutter degree as a starting pixel point, acquiring a difference value of the clutter degree between the starting pixel point and the corresponding neighborhood pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degree smaller than or equal to a preset clutter difference value threshold as a first closed pixel point; obtaining a difference value of clutter degrees of the first closed pixel point and the corresponding neighborhood pixel points except the initial pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degrees smaller than or equal to a preset clutter difference value threshold value as a second closed pixel point; obtaining a difference value of clutter degrees of the second closed pixel point and the corresponding neighborhood pixel points except the first closed pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degrees smaller than or equal to a preset clutter difference value threshold value as a third closed pixel point; and repeatedly searching the closed pixel points until the difference value of the clutter degree of the neighborhood pixel points corresponding to the last closed pixel point is larger than a preset clutter difference value threshold value, and obtaining a plurality of closed pixel points after statistics is completed. The more closed pixel points continuously meeting the condition, the higher the area closure degree of the area is, and the higher the possibility that the corresponding area is a breakdown defect area is. In the embodiment of the present invention, the preset clutter value threshold is 0.5, and in other embodiments, the practitioner can adjust the value according to the actual situation.
Further, the region closure degree of the region formed by the closed pixel points is calculated. Specific: selecting an arbitrary region formed by closed pixel points as a target region, and obtaining the reciprocal of the number of the closed pixel points corresponding to the target region; a second exponential function with a natural constant as a base and a negative reciprocal as an exponent is used as the degree of region closure.
The degree of closure of the regionThe calculation formula of (2) is as follows:
wherein,is a natural constant; />Is the number of closed pixels of the nth region.
Step S400, obtaining the attention degree of the defective pixel point by weighted summation of the pixel prominence degree and the clutter degree; the conversion coefficient of the defect area is obtained by multiplying the average value of the products of the pixel saliency degree, the clutter degree and the area closure degree of each pixel point in the defect area by the attention degree.
When the degree of protrusion and the degree of disorder of the defective pixel are large, the probability that the defective pixel is a pixel in the breakdown defective region is larger, and conversely, the probability that the defective pixel is aged and worn is larger. And calculating the attention degree of each pixel point according to the pixel prominence degree and the clutter degree. Specific: and (5) carrying out weighted summation on the pixel prominence and the clutter degree to obtain the attention degree of the defective pixel point.
The attention degreeThe calculation formula of (2) is as follows:
wherein,the pixel salience degree of the defective pixel point; />The clutter degree of the defective pixel points; />To adjust the weights. In the embodiment of the invention, the value of the weight is adjusted to be 0.4, and in other embodiments, the practitioner can adjust the value according to the actual situation. When the attention of the defective pixel point is larger, the larger the amplitude of the enhancement to the region is reflected, otherwise, the defective pixel point with smaller attention needs to be suppressed.
The larger the probability that the pixel with the higher attention is the pixel in the breakdown defect area, the larger the probability that the pixel with the lower attention is the pixel in the aging abrasion area.
The conversion coefficient of the defect area is obtained by multiplying the average value of the products of the pixel saliency degree, the clutter degree and the area closure degree of each pixel point in the defect area by the attention degree.
The calculation formula of the transformation coefficient is as follows:
wherein,the attention degree of the j defective pixel point; />The pixel protrusion degree of the jth defective pixel point; />The clutter degree of the j defective pixel points is the clutter degree; />The region closure degree of the jth defective pixel point; />A threshold value of attention is preset; />The number of defective pixel points with the attention degree being greater than or equal to a preset attention degree threshold value; />The number of defective pixel points with the attention degree smaller than a preset attention degree threshold value is set; />The conversion coefficient corresponding to the j-th defect pixel point when the attention degree is larger than or equal to a preset attention degree threshold value; />And when the attention degree of the j-th defective pixel point is smaller than a preset attention degree threshold value, the corresponding transformation coefficient is used. In the embodiment of the present invention, the preset attention threshold value is 0.5, and in other embodiments, the practitioner can adjust the value according to the actual situation.
Step S500, the defect area is enhanced by utilizing the transformation coefficient, and an enhanced image is obtained; and performing edge detection on the enhanced image to obtain a breakdown defect area.
After the transformation coefficient is obtained, different areas of the image are enhanced according to the transformation coefficient, so that the image is stretched or restrained according to the pixel protrusion degree, the clutter degree and the attention degree of the area where the pixels are located of the pixel points.
The pixel value of each defective pixel point in the defective area is multiplied by the corresponding transformation coefficient to obtain an enhanced pixel value, and an enhanced image is formed based on the enhanced pixel value corresponding to the defective pixel point and the pixel value of the normal pixel point in the normal area. Namely, the transformation coefficient is used as the coefficient of the pixel value of the defective pixel point, so as to obtain the enhanced pixel value of each enhanced defective pixel point, and further obtain an enhanced image.
Preferably, after the cable gray level image is enhanced to obtain an enhanced image, an abnormal difference value between the average gray level value of the defect area and the average gray level value of the normal area can be obtained, so that the abnormal difference value is added to the pixel value of the enhanced defect pixel point, and the fine brightness adjustment of the original enhanced image is realized.
For the enhanced image after enhancement transformation, the background area becomes blurred, the breakdown defect area becomes more prominent and obvious, and the edge line in the defect area can be clearly detected. Since the breakdown defective area is generally an approximately circular pit, when it is detected that a relatively continuous edge in the image constitutes the edge of the breakdown defective area by edge detection, the area is considered as the breakdown defective area, that is, the enhanced image is subjected to edge detection to obtain the breakdown defective area.
In summary, the embodiment of the invention acquires the electric wire and cable image to obtain the cable gray image and the cable region by using the data processing technology; screening out a normal area and a defect area in the cable area; calculating the pixel protrusion degree of the defective pixel point according to the gray level abnormality degree of the defective pixel point compared with the pixel point in the normal region based on the defective pixel point in the defective region; calculating the disorder degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel, screening a plurality of closed pixel from a plurality of neighborhood pixels, and calculating the regional closure degree of the region formed by the closed pixel; the pixel prominence and the clutter degree are weighted and summed to obtain the attention degree of the defective pixel point; obtaining a transformation coefficient of the defect area according to the pixel salience degree, the clutter degree, the area closure degree and the attention degree of each pixel point in the defect area; performing image enhancement on the defect area by using the transformation coefficient to obtain an enhanced image; and performing edge detection on the enhanced image to obtain a breakdown defect area. According to the embodiment of the invention, through analysis processing of the cable image, pixel points which are possibly in the breakdown defect area are distinguished from the defect area, and the pixel points are enhanced, so that the enhanced image is obtained by image enhancement, and the breakdown defect area can be distinguished clearly based on the enhanced image.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (5)

1. The cable defect identification method based on data enhancement pretreatment is characterized by comprising the following steps of:
acquiring an electric wire and cable image, and preprocessing the electric wire and cable image to obtain a cable gray level image and a cable area;
screening out a normal area and a defect area in the cable area based on the gray value of the pixel point of the cable gray image; calculating the gray level abnormality degree of the defective pixel point compared with the pixel point in the normal area based on the defective pixel point in the defective area, and calculating the pixel protrusion degree of the defective pixel point according to the difference of the gray level abnormality degree of the defective pixel point compared with the pixel point in the corresponding neighborhood;
selecting a neighborhood pixel point corresponding to the defective pixel point according to the pixel salience degree of the defective pixel point; calculating the clutter degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel; screening a plurality of closed pixel points from a plurality of neighborhood pixel points according to the difference of the mess degree of the defect pixel points and the corresponding neighborhood pixel points, and calculating the regional closure degree of the region formed by the closed pixel points;
the pixel saliency and the clutter degree are weighted and summed to obtain the attention degree of the defective pixel point; multiplying the average value of the products of the pixel salience degree, the clutter degree and the region closure degree of each pixel point in a defect region by the attention degree to obtain a transformation coefficient of the defect region;
enhancing the defect area by utilizing the transformation coefficient to obtain an enhanced image; performing edge detection on the enhanced image to obtain a breakdown defect area;
the calculating the pixel protrusion degree of the defective pixel point according to the difference of the gray level abnormality degree of the defective pixel point compared with the pixel point in the corresponding neighborhood comprises:
the gray value of the defective pixel point is subtracted from the gray value of any pixel point in the corresponding neighborhood to obtain a first gray difference value; each defective pixel point corresponds to a plurality of first gray difference values; the squares of the first gray level difference values are added to obtain a total gray level difference, and the ratio of the total gray level difference to the number of pixel points in the neighborhood is used as the pixel saliency degree;
the calculating the clutter degree of the defective pixel according to the gradient amplitude difference of the defective pixel and the corresponding neighborhood pixel comprises:
the square of the difference between the gradient amplitude of the defective pixel and the gradient amplitude of the corresponding arbitrary neighborhood pixel is used as an initial gradient difference, the sum of a plurality of initial gradient differences is a total gradient difference, and the ratio of the total gradient difference to the number of the neighborhood pixels corresponding to the defective pixel is used as the clutter degree;
the step of screening a plurality of closed pixel points from a plurality of neighborhood pixel points according to the difference of the clutter degree of the defect pixel points and the corresponding neighborhood pixel points comprises the following steps:
selecting a defective pixel with the largest clutter degree as a starting pixel, acquiring a difference value of the clutter degree between the starting pixel and a corresponding neighborhood pixel, and taking the neighborhood pixel with the difference value of the corresponding clutter degree smaller than or equal to a preset clutter difference value threshold as a first closed pixel; obtaining a difference value of clutter degrees of the first closed pixel point and the corresponding neighborhood pixel points except the initial pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degrees smaller than or equal to a preset clutter difference value threshold value as a second closed pixel point; obtaining a difference value of clutter degrees of the second closed pixel point and the corresponding neighborhood pixel points except the first closed pixel point, and taking the neighborhood pixel point with the difference value of the corresponding clutter degrees smaller than or equal to a preset clutter difference value threshold value as a third closed pixel point; repeatedly searching the closed pixel points until the difference value of the clutter degree of the neighborhood pixel point corresponding to the last closed pixel point is larger than a preset clutter difference value threshold value;
the calculating the region closing degree of the closed pixel point forming region comprises the following steps:
selecting an arbitrary region formed by closed pixel points as a target region, and obtaining the reciprocal of the number of the closed pixel points corresponding to the target region; taking a natural constant as a base, and taking a second exponential function taking the negative reciprocal as an exponent as the region closure degree;
multiplying the focus by the mean value of the products of the pixel saliency, the clutter and the area closure of each pixel point in the defect area to obtain a transformation coefficient of the defect area, wherein the transformation coefficient comprises the following steps:
the calculation formula of the transformation coefficient is as follows:
wherein,the attention degree of the j-th defective pixel point; />The pixel protrusion degree of the jth defective pixel point; />The degree of clutter for the j-th defective pixel; />The closing degree of the region of the jth defective pixel point; />A threshold value of attention is preset; />The number of defective pixel points with the attention degree being greater than or equal to a preset attention degree threshold value; />The number of defective pixel points with the attention degree smaller than a preset attention degree threshold value is set; />The conversion coefficient corresponding to the j-th defect pixel point when the attention degree is larger than or equal to a preset attention degree threshold value; />And when the attention degree of the j-th defective pixel point is smaller than a preset attention degree threshold value, the corresponding transformation coefficient is used.
2. The method for identifying cable defects based on data enhancement preprocessing according to claim 1, wherein the step of screening out a normal area and a defective area in a cable area based on the gray value size of a pixel point of the cable gray image comprises the steps of:
acquiring a gray level histogram of the cable gray level image, and selecting a gray level value corresponding to the highest peak value of the gray level histogram as a gray level threshold; based on the cable region, taking the pixel points smaller than the gray threshold value as normal pixel points, and forming the normal region by the normal pixel points; and taking the pixel point with the gray threshold value larger than or equal to the gray threshold value as a defective pixel point, and forming the defective region by the defective pixel point.
3. The method for identifying cable defects based on data enhancement preprocessing according to claim 1, wherein said calculating the gray level abnormality degree of the defective pixel point compared with the pixel point in the normal area comprises:
acquiring a gray average value of a normal pixel point in a normal region; and the difference value between the gray value of the defective pixel point and the gray average value is the gray abnormity degree.
4. The cable defect identification method based on data enhancement preprocessing according to claim 1, wherein selecting a neighboring pixel point corresponding to the defective pixel point according to the pixel protrusion degree of the defective pixel point comprises:
acquiring a first exponential function taking a natural constant as a base and taking negative pixel salience as an index, and selecting a pixel point in the eight adjacent areas of the defective pixel point as a neighborhood pixel point when the first exponential function is larger than a preset salience threshold value; and when the first exponential function is smaller than or equal to a preset salient threshold, selecting the pixel points in the four adjacent areas of the defective pixel point as the adjacent pixel points.
5. The method for identifying a cable defect based on data enhancement preprocessing according to claim 1, wherein said enhancing the defect area with the transform coefficient to obtain an enhanced image comprises:
multiplying the pixel value of each defective pixel point in the defective area by the corresponding transformation coefficient to obtain an enhanced pixel value, and forming an enhanced image based on the enhanced pixel value corresponding to the defective pixel point and the pixel value of the normal pixel point in the normal area.
CN202311181080.0A 2023-09-14 2023-09-14 Cable defect identification method based on data enhancement preprocessing Active CN116912254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311181080.0A CN116912254B (en) 2023-09-14 2023-09-14 Cable defect identification method based on data enhancement preprocessing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311181080.0A CN116912254B (en) 2023-09-14 2023-09-14 Cable defect identification method based on data enhancement preprocessing

Publications (2)

Publication Number Publication Date
CN116912254A CN116912254A (en) 2023-10-20
CN116912254B true CN116912254B (en) 2023-12-08

Family

ID=88367248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311181080.0A Active CN116912254B (en) 2023-09-14 2023-09-14 Cable defect identification method based on data enhancement preprocessing

Country Status (1)

Country Link
CN (1) CN116912254B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712512A (en) * 2021-01-05 2021-04-27 余波 Hot-rolled strip steel scab defect detection method and system based on artificial intelligence
KR102290273B1 (en) * 2020-03-24 2021-08-17 (주)캠시스 Defect pixel detecting device and method
CN113793318A (en) * 2021-09-13 2021-12-14 中国空气动力研究与发展中心超高速空气动力研究所 Multi-region complex damage defect characteristic comprehensive analysis method
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision
CN115147409A (en) * 2022-08-30 2022-10-04 深圳市欣冠精密技术有限公司 Mobile phone shell production quality detection method based on machine vision
CN115222741A (en) * 2022-09-20 2022-10-21 江苏昱恒电气有限公司 Cable surface defect detection method
CN115330646A (en) * 2022-10-17 2022-11-11 江苏康非特动力科技有限公司 Metal component inspection method for fitness equipment paint spraying process
CN115330772A (en) * 2022-10-12 2022-11-11 南通通力油泵有限公司 Online welding spot quality detection method
CN115641336A (en) * 2022-12-23 2023-01-24 无锡康贝电子设备有限公司 Air conditioner sheet metal part defect identification method based on computer vision
CN115908362A (en) * 2022-12-07 2023-04-04 江苏曜彰体育用品有限公司 Method for detecting wear resistance of skateboard wheel
WO2023134789A1 (en) * 2022-10-25 2023-07-20 苏州德斯米尔智能科技有限公司 Automatic inspection method for belt-type conveying device
CN116721106A (en) * 2023-08-11 2023-09-08 山东明达圣昌铝业集团有限公司 Profile flaw visual detection method based on image processing

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102290273B1 (en) * 2020-03-24 2021-08-17 (주)캠시스 Defect pixel detecting device and method
CN112712512A (en) * 2021-01-05 2021-04-27 余波 Hot-rolled strip steel scab defect detection method and system based on artificial intelligence
CN113793318A (en) * 2021-09-13 2021-12-14 中国空气动力研究与发展中心超高速空气动力研究所 Multi-region complex damage defect characteristic comprehensive analysis method
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision
CN115147409A (en) * 2022-08-30 2022-10-04 深圳市欣冠精密技术有限公司 Mobile phone shell production quality detection method based on machine vision
CN115222741A (en) * 2022-09-20 2022-10-21 江苏昱恒电气有限公司 Cable surface defect detection method
CN115330772A (en) * 2022-10-12 2022-11-11 南通通力油泵有限公司 Online welding spot quality detection method
CN115330646A (en) * 2022-10-17 2022-11-11 江苏康非特动力科技有限公司 Metal component inspection method for fitness equipment paint spraying process
WO2023134789A1 (en) * 2022-10-25 2023-07-20 苏州德斯米尔智能科技有限公司 Automatic inspection method for belt-type conveying device
CN115908362A (en) * 2022-12-07 2023-04-04 江苏曜彰体育用品有限公司 Method for detecting wear resistance of skateboard wheel
CN115641336A (en) * 2022-12-23 2023-01-24 无锡康贝电子设备有限公司 Air conditioner sheet metal part defect identification method based on computer vision
CN116721106A (en) * 2023-08-11 2023-09-08 山东明达圣昌铝业集团有限公司 Profile flaw visual detection method based on image processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于机器视觉的线缆表面缺陷检测系统设计与算法研究;乔湘洋;王海芳;祁超飞;李新庆;;机床与液压(第05期);正文 *
陶瓷制品微缺陷裂纹图像无损检测仿真;邱永德;林国勇;;计算机仿真(第06期);正文 *

Also Published As

Publication number Publication date
CN116912254A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US11221107B2 (en) Method for leakage detection of underground pipeline corridor based on dynamic infrared thermal image processing
CN107610114B (en) optical satellite remote sensing image cloud and snow fog detection method based on support vector machine
CN107944396B (en) Knife switch state identification method based on improved deep learning
CN110543837A (en) visible light airport airplane detection method based on potential target point
CN115457041A (en) Road quality identification and detection method
CN114972326A (en) Defective product identification method for heat-shrinkable tube expanding process
CN109523529B (en) Power transmission line defect identification method based on SURF algorithm
CN108537751B (en) Thyroid ultrasound image automatic segmentation method based on radial basis function neural network
CN108829711B (en) Image retrieval method based on multi-feature fusion
CN115147414A (en) Method for detecting surface breakdown defect of bipolar power transistor
CN116385450B (en) PS sheet wear resistance detection method based on image processing
CN113112519B (en) Key frame screening method based on interested target distribution
CN114549981A (en) Intelligent inspection pointer type instrument recognition and reading method based on deep learning
CN110070545B (en) Method for automatically extracting urban built-up area by urban texture feature density
CN115100196B (en) Method for evaluating derusting effect of stamping part based on image segmentation
CN116402810B (en) Image processing-based lubricating oil anti-abrasive particle quality detection method
CN109684905A (en) The method of the icing quality testing of aerial condutor based on image identification
CN111695373A (en) Zebra crossing positioning method, system, medium and device
CN111476804A (en) Method, device and equipment for efficiently segmenting carrier roller image and storage medium
CN110689003A (en) Low-illumination imaging license plate recognition method and system, computer equipment and storage medium
CN110348307B (en) Path edge identification method and system for crane metal structure climbing robot
CN111597875A (en) Traffic sign identification method, device, equipment and storage medium
CN116912254B (en) Cable defect identification method based on data enhancement preprocessing
CN112418241A (en) Power equipment identification method based on infrared imaging technology
Guo et al. Fault diagnosis of power equipment based on infrared image analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant