CN117197088A - Cable intermediate joint defect identification method, system and equipment - Google Patents

Cable intermediate joint defect identification method, system and equipment Download PDF

Info

Publication number
CN117197088A
CN117197088A CN202311167642.6A CN202311167642A CN117197088A CN 117197088 A CN117197088 A CN 117197088A CN 202311167642 A CN202311167642 A CN 202311167642A CN 117197088 A CN117197088 A CN 117197088A
Authority
CN
China
Prior art keywords
spliced
cable intermediate
intermediate joint
image
splicing
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
CN202311167642.6A
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.)
Guangdong Power Grid Co Ltd
Zhongshan Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Zhongshan Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Power Grid Co Ltd, Zhongshan Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202311167642.6A priority Critical patent/CN117197088A/en
Publication of CN117197088A publication Critical patent/CN117197088A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method, a system and equipment for identifying defects of a cable intermediate joint, comprising the steps of selecting a first pre-splicing part and a second pre-splicing part from all effective parts, splicing the first pre-splicing part and the second pre-splicing part, and generating a spliced image of the target cable intermediate joint; acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts; judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has defects or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result; and identifying the defect type according to the judging result. Solves the technical problem of low defect recognition rate in the prior art. The invention can accurately judge the defect type by firstly identifying the position coordinate set of each position of the cable intermediate joint and then identifying the defect characteristic of each position coordinate set.

Description

Cable intermediate joint defect identification method, system and equipment
Technical Field
The invention relates to the technical field of defect identification of cable intermediate connectors, in particular to a method, a system and equipment for identifying defects of cable intermediate connectors.
Background
The cable intermediate head is an important component for ensuring normal transmission of electric energy. The installation of each part of the 10kV cable intermediate joint has higher requirements on construction environment and process quality. Main insulation scratches and stains are easily generated between the middle and middle parts in the construction process by workers, the size of the middle and middle part is not up to the standard, the semiconductive layer is stripped and is not uniform, the main insulation is cut and the crimp pipe has burr defects. Thus, it is desirable to identify individual defects for repair.
However, because the cable is long and thin in main insulation, the required shooting view angle is wider, and in order to obtain a high-resolution 10kV cable intermediate joint image, a plurality of macro cameras are required to be subjected to segmented shooting to generate a plurality of images, but in the prior art, the images are spliced by an image splicing method, so that defects of the cable intermediate joint are identified, but the image splicing method adopted in the method is insufficient in definition, detail information is ignored, and the defect identification rate is low.
Disclosure of Invention
The invention provides a method, a system and equipment for identifying defects of a cable intermediate joint, which solve the technical problems that the defects are identified at a low rate due to the fact that an image is not clear enough and detailed information is ignored by an image splicing method adopted in the prior art.
The invention provides a cable intermediate joint defect identification method, which comprises the following steps:
responding to a received defect identification instruction, and acquiring a plurality of initial images to be spliced corresponding to cable intermediate connectors corresponding to the defect identification instruction;
filtering all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the cable intermediate connectors contained in the updated images to be spliced;
selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a target cable intermediate joint spliced image;
acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts;
judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect or not based on a part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result;
and identifying the defect type according to the judging result.
Optionally, the step of filtering all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying an effective part of the updated images to be spliced, which contains the cable intermediate connector, includes:
Carrying out graying treatment on all the initial images to be spliced to generate a plurality of intermediate images to be spliced;
carrying out Gaussian filtering treatment on all the intermediate images to be spliced to generate a plurality of updated images to be spliced;
inputting all the updated images to be spliced into a preset target feature recognition model;
identifying the characteristic part and the background part of the cable intermediate joint contained in each updated image to be spliced through the target characteristic identification model;
and extracting the characteristic parts of the cable intermediate connectors contained in each updated image to be spliced, and taking the characteristic parts as effective parts.
Optionally, the step of selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, splicing the first pre-splicing part and the second pre-splicing part, and generating a spliced image of the intermediate joint of the target cable includes:
calculating a ratio between the feature portion and the background portion;
all the ratios are ordered according to the order from high to low, and an ordering result is generated;
taking the effective part with the highest ratio corresponding to the sequencing result as a first pre-stitching part, and taking the rest of the pre-stitching images as a second pre-stitching part;
Performing expansion processing on the first pre-spliced part based on the cable intermediate joint reference image to generate a pre-spliced virtual image;
and overlapping the second pre-spliced part with the pre-spliced virtual image, and splicing the second pre-spliced part with the first pre-spliced part to generate a spliced image of the middle joint of the target cable.
Optionally, the step of expanding the first pre-stitching portion based on the cable intermediate joint reference image to generate a pre-stitching virtual image includes:
acquiring a cable middle joint reference image, overlapping the outline of the first pre-spliced part with the outline of the cable middle joint reference image, and determining gray value mutation positions of the first pre-spliced part and the cable middle joint reference image;
determining a structural boundary line of the cable intermediate joint in the first pre-splicing part and the cable intermediate joint reference image according to the gray value abrupt change position;
adjusting the scaling and the position of the cable intermediate joint in the cable intermediate joint reference image until the first pre-spliced part and the contour and the structure boundary line of the cable intermediate joint in the cable intermediate joint reference image are in a coincident section;
And taking the contour and the structural boundary line of the cable intermediate joint except the overlapped section in the cable intermediate joint reference image as a pre-splicing virtual image.
Optionally, the step of overlapping the second pre-spliced portion with the pre-spliced virtual image and splicing the second pre-spliced portion with the first pre-spliced portion to generate a spliced image of the intermediate joint of the target cable includes:
selecting any image from the rest effective parts as a second pre-splicing part;
overlapping the outline of the second pre-spliced part with the outline of the pre-spliced virtual shadow, and determining the gray value mutation position of the second pre-spliced part;
determining a structural boundary line of the second pre-spliced part according to the gray value mutation position;
adjusting the scaling and the position of the second pre-spliced part until the contour and the structural boundary of the second pre-spliced part are matched with the pre-spliced virtual shadow, and generating a matched position;
selecting any image from the rest effective parts as a new second pre-stitching part, skipping to execute the step of overlapping the outline of the second pre-stitching part and the outline of the pre-stitching virtual shadow, and determining the gray value mutation position of the second pre-stitching part;
Adjusting the scaling of all the second pre-spliced parts, and moving to the fit position of the pre-spliced virtual shadow to generate a target second pre-spliced part;
and splicing the target second pre-splicing part with the first pre-splicing part to generate a target cable intermediate joint spliced image.
Optionally, the step of splicing the target second pre-spliced portion with the first pre-spliced portion to generate a target cable intermediate joint spliced image includes:
splicing the target second pre-spliced part with the first pre-spliced part to generate an initial cable intermediate joint spliced image;
judging whether an overlapping area exists in the spliced image of the middle joint of the initial cable;
if not, taking the spliced image of the initial cable intermediate joint as a spliced image of the target cable intermediate joint;
if yes, acquiring the center coordinates of each overlapping area;
calculating the center distance between the center coordinate and the first pre-splicing part or the second pre-splicing part where the overlapped area is located;
and selecting the first pre-splicing part or the second pre-splicing part corresponding to the smallest center distance, removing the other pre-splicing part corresponding to the overlapping area, and generating a target cable intermediate joint splicing image.
Optionally, the step of obtaining the coordinate range of each part of the cable intermediate joint in the target cable intermediate joint spliced image and generating the part coordinate set of the part includes:
acquiring a gray value of each pixel in the spliced image of the middle joint of the target cable;
traversing all the peaks and the troughs of the gray values, and determining the peak coordinates and the trough coordinates of a plurality of gray values;
setting the gray values of the preset number of pixels at the positions of the peak coordinates and the trough coordinates as a first preset value, setting the gray values of the rest pixels as a second preset value, and generating a gray peak Gu Tuxiang of the spliced image of the target cable intermediate connector;
determining a gray peak Gu Tuxiang of the cable intermediate joint reference image based on the gray peak Gu Tuxiang of the target cable intermediate joint stitched image;
marking each part of the cable intermediate joint in the gray peak-valley image of the cable intermediate joint reference image;
matching the gray peak-valley image of the cable intermediate joint reference image with the gray peak-valley image of the target cable intermediate joint spliced image;
and determining the coordinate range of each part of the cable intermediate joint in the target cable intermediate joint spliced image according to the matching similarity of the parts of the cable intermediate joint in the gray peak-valley image, and generating a part coordinate set of the parts.
Optionally, the step of determining whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a determination result includes:
judging whether the peak coordinates and the trough coordinates corresponding to the part coordinate set of each part are matched with the peak coordinates and the trough coordinates in a preset cable intermediate joint reference image or not;
if yes, determining that all parts of the cable intermediate joint in the target cable intermediate joint splicing image have no defects;
if not, determining that defects exist in each part of the cable intermediate joint in the target cable intermediate joint spliced image, and extracting peak coordinates and trough coordinates corresponding to the part coordinate sets of the unmatched parts;
connecting the wave crest coordinates and the wave trough coordinates to generate a closed range;
and restoring the gray value of the pixel point in the closed range, and identifying the defect characteristic in the closed range.
The invention provides a cable intermediate joint defect identification system, which comprises:
the device comprises an initial image module to be spliced, a fault identification module and a fault detection module, wherein the initial image module to be spliced is used for responding to a received fault identification instruction and obtaining a plurality of initial images to be spliced corresponding to cable intermediate connectors corresponding to the fault identification instruction;
The effective part module is used for carrying out filtering treatment on all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the cable intermediate connectors contained in the updated images to be spliced;
the target cable intermediate joint splicing image module is used for selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, splicing the first pre-splicing part and the second pre-splicing part, and generating a target cable intermediate joint splicing image;
the position coordinate set module is used for acquiring the coordinate range of each position of the cable intermediate joint in the target cable intermediate joint spliced image and generating a position coordinate set of the position;
the judging result module is used for judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result;
and the defect type module is used for identifying the defect type according to the judging result.
An electronic device according to a third aspect of the present invention is characterized by comprising a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the cable intermediate joint defect identifying method according to any one of the above.
From the above technical scheme, the invention has the following advantages:
according to the method, a plurality of initial images to be spliced corresponding to the cable intermediate connectors corresponding to the defect identification instruction are obtained by responding to the received defect identification instruction; filtering all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the updated images to be spliced, which contain cable intermediate connectors; selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a spliced image of the middle joint of the target cable; acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts; judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has defects or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result; and identifying the defect type according to the judging result. The method solves the technical problems that the image is not clear enough by adopting the image stitching method in the prior art, the detail information is ignored, and the defect recognition rate is low.
According to the invention, the problem of unclear images can be avoided by shooting the segments of the cable intermediate joint and splicing the images shot by the segments, meanwhile, the position coordinate sets of all positions of the cable intermediate joint are identified first, then the defect characteristics of each position coordinate set are identified, and the defect type can be accurately judged.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flowchart of a method for identifying defects of a cable intermediate joint according to a first embodiment of the present invention;
fig. 2 is a flowchart of a step of a method for identifying defects of a cable intermediate joint according to a second embodiment of the present invention;
fig. 3 is a block diagram of a cable intermediate joint defect identifying system according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a system and equipment for identifying defects of a cable intermediate joint, which are used for solving the technical problems that the defects identification rate is low due to the fact that an image is not clear enough and detailed information is ignored by an image splicing method adopted in the prior art.
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for identifying defects of a cable intermediate joint according to an embodiment of the present invention.
The invention provides a cable intermediate joint defect identification method, which comprises the following steps:
and step 101, responding to the received defect identification instruction, and acquiring a plurality of initial images to be spliced corresponding to the cable intermediate connectors corresponding to the defect identification instruction.
The defect identification command refers to a command request for identifying whether or not a defect exists in the cable intermediate connector.
The initial image to be spliced is that a micro-distance camera is perpendicular to a cable middle joint, and the shooting range is adjusted along the axial direction of the cable middle joint to take the cable middle joint in a segmented mode, so that a plurality of segmented images needing to be spliced are obtained. The sectional images with consistent shooting angles are divided into a group, and the sectional images are processed by taking the group as a unit.
In the implementation, when a defect identification instruction is received in response, determining a cable intermediate joint corresponding to the defect identification instruction, and acquiring an initial image to be spliced of the cable intermediate joint.
And 102, performing filtering processing on all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the updated images to be spliced, which contain cable intermediate joints.
It should be noted that, the filtering process refers to processing the initial image to be stitched by using gaussian filtering.
And identifying and updating an effective part containing the cable intermediate joint and an ineffective part containing the background area in the image to be spliced by adopting the target feature identification model.
In specific implementation, gaussian filtering is adopted to process an initial image to be spliced, the processed image is updated, the updated image to be spliced is input into a target feature recognition model, and the effective part of the cable intermediate connector and the ineffective part of the background area are recognized and updated in the image to be spliced through the target feature recognition model.
And 103, selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a spliced image of the middle joint of the target cable.
It should be noted that, calculating the ratio of the effective portion containing the cable middle joint area to the ineffective portion containing the background area, comparing all the ratios, and the effective portion corresponding to the maximum ratio is used as the first pre-splicing portion, and the remaining effective portions are all the second pre-splicing portions.
The target cable intermediate joint image refers to that all the images to be spliced are spliced into a complete cable intermediate joint image.
In specific implementation, a first pre-splicing part and a second pre-splicing part are selected, a cable middle joint image is taken as a base, the proportion and the position of the first pre-splicing part are adjusted, the adjusted first pre-splicing part is overlapped with the outline of a cable middle joint in a cable middle joint reference image to generate a superposition section, the cable middle joint part in the cable middle joint reference image outside the superposition section is taken as an expansion part to produce a pre-splicing virtual image, all the second pre-splicing parts are overlapped with the outline of the cable middle joint in the pre-splicing virtual image, the outline and the structural boundary of all the second pre-splicing parts and the cable middle joint in the pre-splicing virtual image are matched, the matching position is recorded, the proportion and the position of the second pre-splicing part are adjusted, and the second pre-splicing part is put into the matching position and spliced with the first pre-splicing part, so that a complete cable middle joint image can be obtained.
And 104, acquiring a coordinate range of each part of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the part.
The location coordinate set refers to a plurality of coordinate ranges in which the location is located.
In specific implementation, the gray values of the spliced image of the middle joint of the target cable are obtained, peaks and troughs of all the gray values are traversed to obtain a plurality of peak coordinates and trough coordinates, the gray values of n pixels around the positions of the peak coordinates and the trough coordinates are set to 255, and the gray values of other pixels are set to zero, so that the gray peak-valley image of the spliced image of the middle joint of the target cable can be obtained. Wherein n is a preset number.
And (3) obtaining gray peak-valley images of the cable intermediate joint reference image in the same mode, marking each part of the cable intermediate joint, matching the gray peak-valley images of the cable intermediate joint reference image with the gray peak-valley images of the target cable intermediate joint spliced image, and regarding the similarity reaching a threshold value as the same part, thus obtaining a part coordinate set of each part of the target cable intermediate joint spliced image.
And 105, judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has defects or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result.
It should be noted that the cable intermediate joint reference image refers to a reference image of the complete cable intermediate joint.
The judging result refers to the presence or absence of a defect in the cable intermediate joint.
In the specific implementation, the position coordinate set of each position of the cable intermediate joint of the target cable intermediate joint spliced image is matched with the cable intermediate joint reference image, if unmatched peaks and valleys exist, the defect exists in the cable intermediate joint of the target cable intermediate joint spliced image, and if all the peaks and valleys are matched, the defect does not exist.
And 106, identifying the defect type according to the judging result.
If the cable intermediate joint of the target cable intermediate joint spliced image has defects, the defect characteristics can be input into a defect type library to judge the defect type.
The defect type library has defect types such as stains, uneven cutting, size types, scratches, burrs and the like.
In the specific implementation, in the identification process, various identification modes are adopted, for example, an edge detection algorithm is utilized to carry out scratch identification on the spliced image of the middle joint of the target cable, and after the spliced image of the middle joint of the target cable is subjected to edge detection, an obvious scratch area can be seen. And then, judging whether the scratch defect exists or not by counting specific value pixels in the spliced image of the middle joint of the target cable. In order to be able to detect scratches of different degrees, the edge detection threshold value that works best can be selected experimentally.
In the specific implementation, the crimp pipe burr identification method can also be adopted, in the crimp pipe burr identification process, the crimp pipe edge is extracted by adopting an edge detection method, and if the crimp pipe edge with smooth polishing is approximately a straight line. When the burrs are not polished or not polished in place, the edge curvilinearity of the crimp tube is increased, so that an extreme point exists in a curve section of the boundary line of the crimp tube, and the extreme point has a larger difference with the smooth polished boundary of the crimp tube. Before two different thresholds are used for respectively detecting strong and weak edges, a Canny operator firstly utilizes a Gaussian smoothing filter to smooth images to remove noise, a Canny segmentation algorithm adopts a finite difference of first-order partial derivatives to calculate gradient amplitude values and directions, and in the processing process, the Canny operator also undergoes a non-maximum value suppression process, and finally the Canny operator also adopts two thresholds to connect the edges. When the edge of the crimp tube is detected, the edge parting line can also be regarded as a function curve, and the fitting is performed by using a unitary quadratic function. When burr defects exist, the boundary line on the surface of the crimping pipe is uneven in level, a unitary quadratic function is adopted to fit the crimping pipe, the error between the flatness and the unevenness of the crimping pipe is calculated, and whether the boundary line is peeled off or not is judged according to the size of the error.
In the specific implementation, in order to judge whether the outer semiconductive layer and the main insulating layer are stripped or not, the spliced image of the middle joint of the target cable at the boundary is required to be intercepted, the boundary line of the spliced image of the middle joint of the target cable is extracted by an edge extraction method, then the boundary line is subjected to function fitting, the stripped boundary line is also subjected to fitting by using a unitary quadratic function, the error of the fitting function of the stripping order and the stripping irregularity is calculated, and whether the stripping irregularity at the boundary is generated or not is judged according to the size of the error.
The edge-trimmed semiconductive layer also has a certain radian under the picture shooting, so that a mean square error mode is adopted to compare a fitting equation of an image to be detected with a fitting equation of a semiconductive layer without defects, for example:
wherein n is the total number of edge points, y i For the size of the fitted edge points to be detected,is the size of the defect-free edge point.
The interval is set to be [0,2], the fitting unitary quadratic equation is known, and the independent variable interval is set to be [0,2], so that the mean square error can be obtained. And (3) solving the mean square error of the re-fitting function of all points on the demarcation line by fitting the image, and judging whether the peeling is uneven or not by the mean square error. It is obvious from the experiment that the fitting error of the image having the peeling uneven defect is significantly larger than that of the image having the peeling regular defect, and when the fitting error belongs to [0, 200], it is considered that there is no defect, and if it is larger than this section, it is determined that the peeling of the outer semiconductive layer is uneven. The judgment is carried out by the judgment standard, so that the method has certain practicability and rationality.
According to the method, a plurality of initial images to be spliced corresponding to the cable intermediate connectors corresponding to the defect identification instruction are obtained by responding to the received defect identification instruction; filtering all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the updated images to be spliced, which contain cable intermediate connectors; selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a spliced image of the middle joint of the target cable; acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts; judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has defects or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result; and identifying the defect type according to the judging result. The method solves the technical problems that the image is not clear enough by adopting the image stitching method in the prior art, the detail information is ignored, and the defect recognition rate is low.
According to the invention, the problem of unclear images can be avoided by shooting the segments of the cable intermediate joint and splicing the images shot by the segments, meanwhile, the position coordinate sets of all positions of the cable intermediate joint are identified first, then the defect characteristics of each position coordinate set are identified, and the defect type can be accurately judged.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for identifying defects of a cable intermediate joint according to a second embodiment of the present invention.
The invention provides a cable intermediate joint defect identification method, which comprises the following steps:
and step 201, responding to the received defect identification instruction, and acquiring a plurality of initial images to be spliced corresponding to the cable intermediate connectors corresponding to the defect identification instruction.
In the embodiment of the present invention, the implementation process of step 201 is similar to that of step 101, and will not be repeated here.
And 202, carrying out gray processing on all the initial images to be spliced to generate a plurality of intermediate images to be spliced.
The graying process refers to graying all the initial images to be stitched.
And in the specific implementation, graying all the initial images to be spliced to obtain a middle image to be spliced after graying.
And 203, performing Gaussian filtering processing on all the intermediate images to be spliced to generate a plurality of updated images to be spliced.
It should be noted that, the image set of the middle joint of the original cable may be interfered by the collecting device and the external environment during the process of collecting and transmitting the image set of the middle joint of the cable, so that the image set of the middle joint of the original cable may generate noise interference, destroy the image surface information, affect the algorithm identification, even misjudge the results. Therefore, before defect analysis, the quality of the image needs to be enhanced, and noise interference in the image is eliminated. Thereby achieving the purpose of improving the detection precision of the algorithm.
In a specific implementation, if the image to be stitched is updated to be f (x, y), the f (x, y) is smoothed by a gaussian function component filter G (x, y, σ), and the gaussian function is expressed by the following formula:
in the formula, x and y are respectively updated two-dimensional image coordinate positions of the images to be spliced, sigma is taken as 14, and a filtered image is obtained by the following formula when the standard deviation of the Gaussian curve is not passed:
I(x,y)=G(x,y,σ)×f(x,y)
and after the Gaussian filtering processing is completed, obtaining a plurality of updated images to be spliced.
And 204, inputting all updated images to be spliced into a preset target feature recognition model.
It should be noted that the target feature recognition model refers to a neural network for feature recognition, such as a multi-layer perceptron, an ad hoc neural network, and a convolutional neural network.
In the specific implementation, the image to be spliced is input into a target feature recognition model, and the effective part containing the cable intermediate joint area and the ineffective part containing the background area are recognized through the target feature recognition model.
And 205, recognizing the characteristic part and the background part of the cable intermediate joint in each updated image to be spliced through the target characteristic recognition model.
The area containing the cable intermediate joint was set as an effective portion, and the remaining background area was set as an ineffective portion.
In specific implementation, the effective part containing the cable intermediate joint area and the ineffective part containing the background area in each updated image to be spliced are identified through the target feature identification model.
Through training a large number of images containing cable intermediate joints, a target feature recognition model can be obtained, and because the interference elements in the application scene of the embodiment are less, the feature recognition model is not required to be configured very accurately, only the division of different areas is required to be recognized, the processing amount is reduced, and the processing efficiency is improved.
And 206, extracting characteristic parts containing cable intermediate joints from the images to be spliced, and taking the characteristic parts as effective parts.
In specific implementation, extracting characteristic parts containing cable middle joint areas in each updated image to be spliced as effective parts.
And 207, selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a target cable intermediate joint spliced image.
Optionally, step 207 includes the following steps S11-S15:
s11, calculating the ratio between the characteristic part and the background part;
s12, sorting all the ratios according to the arrangement sequence from high to low to generate a sorting result;
S13, taking an effective part with the highest ratio corresponding to the sequencing result as a first pre-stitching part, and taking the rest pre-stitching images as a second pre-stitching part;
s14, performing expansion processing on the first pre-spliced part based on the cable intermediate joint reference image to generate a pre-spliced virtual image;
and S15, overlapping the second pre-spliced part with the pre-spliced virtual image, and splicing the second pre-spliced part with the first pre-spliced part to generate a spliced image of the middle joint of the target cable.
It should be noted that the ratio refers to the duty ratio of the feature portion and the background portion in updating the image to be stitched, respectively.
In specific implementation, the arrangement sequence of all the ratios from high to low is ordered, and the effective part of at least one image with the highest ordering is selected as a first pre-stitching part, and the remaining effective parts are selected as a second pre-stitching image.
Specifically, the first pre-stitching part is the basis of subsequent judgment, the effective part occupies a relatively large area, and the displayed content of the image is relatively clear, so that the first pre-stitching part is used as the first pre-stitching part.
In the specific implementation, the first pre-splicing part is subjected to expansion processing according to the cable intermediate joint reference image, so as to generate a pre-splicing virtual image; and overlapping the second pre-spliced part with the pre-spliced virtual image, and splicing the second pre-spliced part with the first pre-spliced part to generate a spliced image of the middle joint of the target cable.
Optionally, step S14 includes the following steps S21-S24:
s21, acquiring a cable middle joint reference image, overlapping the outline of the first pre-spliced part with the outline of the cable middle joint reference image, and determining gray value mutation positions of the first pre-spliced part and the cable middle joint reference image;
s22, determining a structural boundary line of the cable intermediate joint in the reference image of the first pre-spliced part and the cable intermediate joint according to the gray value abrupt change position;
s23, adjusting the scaling and the position of the cable intermediate joint in the cable intermediate joint reference image until a superposition section appears between the first pre-spliced part and the contour and the structure boundary of the cable intermediate joint in the cable intermediate joint reference image;
s24, taking the outline and the structural boundary of the cable intermediate joint except the overlapping section in the cable intermediate joint reference image as a pre-splicing virtual image.
In specific implementation, a reference image containing a complete cable intermediate joint is obtained, and the contour of a first pre-spliced part is overlapped with the contour of the cable intermediate joint in the cable intermediate joint reference image; and according to the gray value abrupt change positions of the cable intermediate joint in the first pre-splicing part and the cable intermediate joint reference image, the respective structural boundaries of the first pre-splicing part and the cable intermediate joint are drawn.
In the specific implementation, the scaling and the position of the cable intermediate joint in the cable intermediate joint reference image are adjusted until the first pre-spliced part and the outline and the structural boundary line of the cable intermediate joint in the cable intermediate joint reference image are in a coincident section; and taking the contour and structural boundary lines except the overlapping sections of the cable intermediate joint in the cable intermediate joint reference image as pre-splicing ghosts.
Optionally, step S15 includes the following steps S31-S37:
s31, selecting any image from the remaining effective parts as a second pre-stitching part;
s32, overlapping the outline of the second pre-spliced part with the outline of the pre-spliced virtual shadow, and determining the gray value mutation position of the second pre-spliced part;
s33, determining a structural boundary line of the second pre-spliced part according to the gray value mutation position;
s34, adjusting the scaling and the position of the second pre-spliced part until the contour and the structural boundary of the second pre-spliced part are matched with the pre-spliced virtual image, and generating a matched position;
s35, selecting any image from the remaining effective parts as a new second pre-stitching part, and jumping to perform the step of overlapping the outline of the second pre-stitching part with the outline of the pre-stitching virtual shadow to determine the gray value mutation position of the second pre-stitching part;
S36, adjusting the scaling of all second pre-spliced parts, and moving to the fit position of the pre-spliced virtual shadow to generate a target second pre-spliced part;
and S37, splicing the target second pre-spliced part with the first pre-spliced part to generate a spliced image of the middle joint of the target cable.
When the target second pre-stitching portion is to be described, the target second pre-stitching portion refers to an integral portion obtained by placing all the adjusted second pre-stitching portions at the fitting positions of the pre-stitching ghosts.
In specific implementation, selecting any image from the rest pre-spliced images as a second pre-spliced part, and overlapping the contour of the second pre-spliced part with the contour of the pre-spliced virtual image; according to the gray value mutation position of the second pre-splicing part, a structural boundary line of the second pre-splicing part is drawn; and adjusting the scaling and the position of the second pre-spliced part until the outline and the structural boundary of the second pre-spliced part are matched with the pre-spliced virtual image, and recording the matched position.
In the specific implementation, any image is selected from the remaining effective parts as a new second pre-splicing part, and step S32 is re-executed until all the fit positions are recorded, the second pre-splicing part is adjusted, and all the adjusted second pre-splicing parts are spliced with the first pre-splicing part at the fit positions of the pre-splicing virtual images, so that a spliced image of the middle joint of the target cable is obtained.
Optionally, step S37 includes the following steps S41-S46:
s41, splicing the target second pre-spliced part with the first pre-spliced part to generate an initial cable intermediate joint spliced image;
s42, judging whether an overlapping area exists in the spliced image of the middle joint of the initial cable;
s43, if not, taking the spliced image of the initial cable intermediate joint as a spliced image of the target cable intermediate joint;
s44, if yes, acquiring the center coordinates of each overlapping area;
s45, calculating the center distance between the center coordinates and the first pre-splicing part or the second pre-splicing part where the overlapping area is located;
s46, selecting a first pre-splicing part or a second pre-splicing part corresponding to the minimum center distance, removing the other pre-splicing part corresponding to the overlapping area, and generating a target cable intermediate joint splicing image.
The initial cable intermediate joint stitched image refers to an image obtained by stitching the target second pre-stitched portion with the first pre-stitched portion for the first time.
The target cable intermediate joint splice image refers to an image containing a complete cable intermediate joint without an overlap region.
In specific implementation, splicing the target second pre-spliced part and the first pre-spliced part to obtain an initial cable intermediate joint spliced image, judging whether an overlapping area exists between all the second pre-spliced parts and between the second pre-spliced part and the first pre-spliced part in the initial cable intermediate joint spliced image, if not, outputting the initial cable intermediate joint spliced image as the target cable intermediate joint spliced image, and if so, selecting the overlapping area.
In the specific implementation, when the overlapping area is selected, the central coordinate of each overlapping area is obtained, the central distance between the central coordinate and the second pre-splicing part or the first pre-splicing part where the overlapping area is located is respectively judged, the second pre-splicing part or the first pre-splicing part with smaller central distance in the overlapping area is reserved, and after the overlapping area is selected, the spliced image of the middle joint of the target cable is output.
Specifically, a pre-splicing virtual image is constructed through the cable middle joint reference image and the first pre-splicing part, the second pre-splicing part is adjusted by utilizing the pre-splicing virtual image so as to carry out final splicing, the adjustment of splicing size and the correspondence of the parts can be accurately carried out, and the problems of errors or obvious splicing marks in the splicing process are avoided; moreover, by selecting the first pre-spliced part, a relatively clear image can be obtained as a basis for subsequent processing; the pre-spliced virtual images are acquired and then matched, so that corresponding matched positions can be accurately obtained, and a reference is provided for splicing; by selecting the overlapping area, images with high relative imaging quality can be selected, and the images are prevented from being unclear after splicing.
And step 208, acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts.
Optionally, step 208 includes the following steps S51-S57:
s51, acquiring a gray value of each pixel in a spliced image of the middle joint of the target cable;
s52, traversing the peaks and the troughs of all gray values, and determining the peak coordinates and the trough coordinates of a plurality of gray values;
s53, setting the gray values of the preset number of pixels at the positions where the peak coordinates and the trough coordinates are respectively located as a first preset value, setting the gray values of the rest pixels as a second preset value, and generating a gray peak Gu Tuxiang of the spliced image of the middle joint of the target cable;
s54, determining a gray peak Gu Tuxiang of a cable intermediate joint reference image based on a gray peak Gu Tuxiang of a target cable intermediate joint spliced image;
s55, marking each part of the cable intermediate joint in the gray peak-valley image of the cable intermediate joint reference image;
s56, matching the gray peak-valley image of the cable intermediate joint reference image with the gray peak-valley image of the target cable intermediate joint spliced image;
s57, determining the coordinate range of each part of the cable intermediate joint in the target cable intermediate joint spliced image according to the matching similarity of the parts of the cable intermediate joint in the gray peak-valley image, and generating a part coordinate set of the part.
Note that the first preset value is 255, and the second preset value is 0.
In specific implementation, acquiring a gray value of each pixel in the mosaic, traversing peaks and troughs of the gray values, and obtaining a plurality of peak coordinates and trough coordinates; setting 255 gray values of n pixels around the positions of the peak coordinates and the trough coordinates, and setting zero gray values of other pixels to obtain gray peak-valley images of the mosaic, wherein n is a preset number.
And (3) manufacturing gray peak-valley images of the cable intermediate joint reference image in the same mode, marking each part of the cable intermediate joint, matching the gray peak-valley images of the cable intermediate joint reference image with the gray peak-valley images of the target cable intermediate joint spliced image, and regarding the part with the similarity (part matching similarity) reaching a threshold value as the same part to obtain a part coordinate set of each part.
Specifically, by selecting the wave crest and the wave trough, the processed data volume can be reduced, and the main information is visually highlighted.
Step 209, judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result.
Optionally, step 209 includes the following steps S61-S65:
s61, judging whether peak coordinates and trough coordinates corresponding to the position coordinate set of each part are matched with peak coordinates and trough coordinates in a preset cable intermediate joint reference image;
s62, if yes, determining that all parts of the cable intermediate joint in the target cable intermediate joint spliced image have no defects;
s63, if not, determining that defects exist in each part of the cable intermediate joint in the target cable intermediate joint spliced image, and extracting peak coordinates and trough coordinates corresponding to the part coordinate sets of the unmatched parts;
s64, connecting the wave crest coordinates and the wave trough coordinates to generate a closed range;
s65, restoring the gray value of the pixel point in the closed range, and identifying the defect characteristics in the closed range.
In the specific implementation, the peak coordinates and the trough coordinates corresponding to the position coordinate sets of all parts of the cable intermediate joint of the target cable intermediate joint spliced image are matched with the peak coordinates and the trough coordinates corresponding to the cable intermediate joint reference image, if all the peak coordinates and the trough coordinates are matched, the fact that all the parts of the cable intermediate joint in the target cable intermediate joint spliced image are not defective is indicated, otherwise, the fact that all the parts of the cable intermediate joint in the target cable intermediate joint spliced image are defective is indicated, the matched peak coordinates and trough coordinates are connected to obtain a closed range, gray values of pixel points in the closed range are restored, and the defect characteristics in the closed range can be identified.
Specifically, in the matching process, the image frames can be directly matched, or the image frames can be converted into a fitting function in advance, and then the matching can be performed by judging the difference of the fitting function.
Specifically, in the above steps, after the gray values of pixels except the peripheral ranges of the peaks and the troughs are set to zero, only a small number of points exist in the obtained picture, the positions of defects can be known by judging the redundant peaks and troughs, and the gray values of the areas are extracted after being restored, so that the recognition quantity of other unnecessary pixels can be greatly reduced, and under the condition of filtering interference factors, the recognition accuracy and the recognition efficiency are improved.
Step 210, identifying the defect type according to the judging result.
In the embodiment of the present invention, the implementation process of step 210 is similar to that of step 106, and will not be repeated here.
According to the method, a plurality of initial images to be spliced corresponding to the cable intermediate connectors corresponding to the defect identification instruction are obtained by responding to the received defect identification instruction; filtering all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the updated images to be spliced, which contain cable intermediate connectors; selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a spliced image of the middle joint of the target cable; acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts; judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has defects or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result; and identifying the defect type according to the judging result. The method solves the technical problems that the image is not clear enough by adopting the image stitching method in the prior art, the detail information is ignored, and the defect recognition rate is low.
According to the invention, the problem of unclear images can be avoided by shooting the segments of the cable intermediate joint and splicing the images shot by the segments, meanwhile, the position coordinate sets of all positions of the cable intermediate joint are identified first, then the defect characteristics of each position coordinate set are identified, and the defect type can be accurately judged.
Referring to fig. 3, fig. 3 is a block diagram illustrating a defect identifying system for an intermediate joint of a cable according to a third embodiment of the present invention.
The invention provides a cable intermediate joint defect identification system, which comprises:
the initial image to be spliced module 301 is configured to respond to a received defect identification instruction, and obtain a plurality of initial images to be spliced corresponding to cable intermediate connectors corresponding to the defect identification instruction;
the effective part module 302 is configured to perform filtering processing on all the initial images to be stitched, generate a plurality of updated images to be stitched, and identify an effective part of the updated images to be stitched, where the effective part contains a cable intermediate joint;
the target cable intermediate joint splicing image module 303 is configured to select a first pre-splicing portion and a second pre-splicing portion from all the effective portions, splice the first pre-splicing portion and the second pre-splicing portion, and generate a target cable intermediate joint splicing image;
The position coordinate set module 304 is configured to obtain coordinate ranges of positions of the cable intermediate connectors in the target cable intermediate connector spliced image, and generate a position coordinate set of the positions;
the judging result module 305 is configured to judge whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generate a judging result;
the defect type module 306 is configured to identify a defect type according to the determination result.
Optionally, the active portion module 302 includes:
the intermediate image sub-module is used for carrying out gray processing on all the initial images to be spliced to generate a plurality of intermediate images to be spliced;
the image updating sub-module is used for carrying out Gaussian filtering processing on all the middle images to be spliced to generate a plurality of updated images to be spliced;
the target feature recognition model submodule is used for inputting all updated images to be spliced into a preset target feature recognition model;
the background part sub-module is used for identifying the characteristic part and the background part of the cable intermediate joint contained in each updated image to be spliced through the target characteristic identification model;
And the effective part sub-module is used for extracting the characteristic parts containing the cable intermediate joints in the images to be spliced, and taking the characteristic parts as effective parts.
Optionally, the target cable intermediate joint stitching image module 303 includes:
a computing sub-module for computing a ratio between the feature portion and the background portion;
the sequencing sub-module is used for sequencing all the ratios according to the sequence from high to low to generate a sequencing result;
the second pre-stitching part sub-module is used for taking the effective part with the highest ratio corresponding to the sequencing result as a first pre-stitching part, and the rest pre-stitching images as a second pre-stitching part;
the pre-spliced virtual shadow module is used for expanding the first pre-spliced part based on the cable intermediate joint reference image to generate a pre-spliced virtual shadow;
and the first target cable intermediate joint spliced image sub-module is used for overlapping the second pre-spliced part with the pre-spliced virtual image and splicing the second pre-spliced part with the first pre-spliced part to generate a target cable intermediate joint spliced image.
Optionally, the pre-stitching virtual shadow module includes:
the abrupt position submodule is used for acquiring a cable intermediate joint reference image, overlapping the outline of the first pre-spliced part with the outline of the cable intermediate joint reference image, and determining the gray value abrupt position of the first pre-spliced part and the cable intermediate joint reference image;
The structure boundary sub-module is used for determining the structure boundary of the cable intermediate joint in the first pre-splicing part and the cable intermediate joint reference image according to the gray value mutation position;
the overlapping section submodule is used for adjusting the scaling and the position of the cable intermediate joint in the cable intermediate joint reference image until the first pre-spliced part and the outline and the structure boundary line of the cable intermediate joint in the cable intermediate joint reference image form an overlapping section;
and the pre-splicing virtual shadow module is used for taking the contour and the structural boundary line of the cable intermediate joint except the overlapping section in the cable intermediate joint reference image as a pre-splicing virtual shadow.
Optionally, the target cable intermediate joint splicing image submodule includes:
the second pre-stitching part sub-module is used for selecting any image from the remaining effective parts to serve as a second pre-stitching part;
the gray value abrupt change position submodule is used for overlapping the outline of the second pre-spliced part and the outline of the pre-spliced virtual shadow to determine the gray value abrupt change position of the second pre-spliced part;
the determining structure boundary sub-module is used for determining the structure boundary of the second pre-splicing part according to the gray value mutation position;
A fitting position sub-module, configured to adjust a scaling ratio and a position of the second pre-spliced portion until a contour and a structural boundary of the second pre-spliced portion are fitted with the pre-spliced virtual image, so as to generate a fitting position;
a skip rotor module, configured to select any one of the images from the remaining effective portions as a new second pre-stitching portion, skip to perform a step of overlapping a contour of the second pre-stitching portion with a contour of the pre-stitching ghost, and determining a gray value abrupt change position of the second pre-stitching portion;
the target second pre-splicing part sub-module is used for adjusting the scaling of all the second pre-splicing parts and moving to the fitting position of the pre-splicing virtual shadow to generate a target second pre-splicing part;
and the second target cable intermediate joint spliced image sub-module is used for splicing the target second pre-spliced part with the first pre-spliced part to generate a target cable intermediate joint spliced image.
Optionally, the second target cable intermediate joint splicing image submodule includes:
the initial cable intermediate joint spliced image sub-module is used for splicing the target second pre-spliced part with the first pre-spliced part to generate an initial cable intermediate joint spliced image;
The overlapping region sub-module is used for judging whether an overlapping region exists in the spliced image of the middle joint of the initial cable;
determining a target cable intermediate joint spliced image sub-module, wherein if not, the initial cable intermediate joint spliced image is used as a target cable intermediate joint spliced image;
the central coordinate sub-module is used for acquiring the central coordinate of each overlapping area if yes;
the center distance ion module is used for calculating the center distance between the center coordinates and the first pre-splicing part or the second pre-splicing part where the overlapping area is located;
and the target cable intermediate joint spliced image sub-module is used for selecting the first pre-spliced part or the second pre-spliced part corresponding to the minimum center distance, removing the other pre-spliced part corresponding to the overlapping area and generating a target cable intermediate joint spliced image.
Optionally, the location coordinate set module 304 includes:
the gray value submodule is used for acquiring the gray value of each pixel in the spliced image of the middle joint of the target cable;
the trough coordinate sub-module is used for traversing the peaks and the troughs of all gray values and determining the peak coordinates and the trough coordinates of a plurality of gray values;
the gray peak Gu Tuxiang sub-module is used for setting the gray values of the preset number of pixels at the positions where the peak coordinates and the trough coordinates are respectively located as a first preset value, setting the gray values of the rest pixels as a second preset value, and generating a gray peak Gu Tuxiang of the spliced image of the middle joint of the target cable;
A determine gray peak Gu Tuxiang sub-module for determining a gray peak Gu Tuxiang of a cable intermediate joint reference image based on a gray peak Gu Tuxiang of a target cable intermediate joint stitched image;
the marking sub-module is used for marking each part of the cable intermediate joint in the gray peak-valley image of the cable intermediate joint reference image;
the matching sub-module is used for matching the gray peak-valley image of the cable intermediate joint reference image with the gray peak-valley image of the target cable intermediate joint spliced image;
the similarity submodule is used for determining the coordinate range of each part of the cable intermediate joint in the target cable intermediate joint spliced image according to the matching similarity of the parts of the cable intermediate joint in the gray peak-valley image and generating a part coordinate set of the parts.
Optionally, the judgment result module 305 includes:
the judging submodule is used for judging whether the crest coordinates and the trough coordinates corresponding to the position coordinate set of each part are matched with the crest coordinates and the trough coordinates in the preset cable intermediate joint reference image or not;
a defect-free sub-module for determining that each part of the cable intermediate joint in the target cable intermediate joint splicing image has no defect if the defect-free sub-module has the defect;
The peak coordinate sub-module is used for determining that each part of the cable intermediate joint in the target cable intermediate joint spliced image has defects if not, and extracting peak coordinates and trough coordinates corresponding to the part coordinate sets of the unmatched parts;
the closed range submodule is used for connecting the wave crest coordinates and the wave trough coordinates to generate a closed range;
and the defect characteristic submodule is used for restoring the gray value of the pixel point in the closed range and identifying the defect characteristic in the closed range.
The fourth embodiment of the application also provides an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program; the computer program, when executed by a processor, causes the processor to perform the steps of the cable intermediate joint defect identification method of any of the embodiments described above.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for identifying defects in an intermediate joint of a cable, comprising:
responding to a received defect identification instruction, and acquiring a plurality of initial images to be spliced corresponding to cable intermediate connectors corresponding to the defect identification instruction;
filtering all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the cable intermediate connectors contained in the updated images to be spliced;
selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, and splicing the first pre-splicing part and the second pre-splicing part to generate a target cable intermediate joint spliced image;
Acquiring coordinate ranges of all parts of the cable intermediate joint in the target cable intermediate joint spliced image, and generating a part coordinate set of the parts;
judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect or not based on a part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result;
and identifying the defect type according to the judging result.
2. The method for identifying a cable intermediate joint defect according to claim 1, wherein the step of performing filtering processing on all of the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying that the updated images to be spliced contain an effective portion of the cable intermediate joint comprises:
carrying out graying treatment on all the initial images to be spliced to generate a plurality of intermediate images to be spliced;
carrying out Gaussian filtering treatment on all the intermediate images to be spliced to generate a plurality of updated images to be spliced;
inputting all the updated images to be spliced into a preset target feature recognition model;
identifying the characteristic part and the background part of the cable intermediate joint contained in each updated image to be spliced through the target characteristic identification model;
And extracting the characteristic parts of the cable intermediate connectors contained in each updated image to be spliced, and taking the characteristic parts as effective parts.
3. The method of claim 2, wherein the step of selecting a first pre-splice portion and a second pre-splice portion from all the effective portions, splicing the first pre-splice portion and the second pre-splice portion, and generating a target cable intermediate splice image comprises:
calculating a ratio between the feature portion and the background portion;
all the ratios are ordered according to the order from high to low, and an ordering result is generated;
taking the effective part with the highest ratio corresponding to the sequencing result as a first pre-stitching part, and taking the rest of the pre-stitching images as a second pre-stitching part;
performing expansion processing on the first pre-spliced part based on the cable intermediate joint reference image to generate a pre-spliced virtual image;
and overlapping the second pre-spliced part with the pre-spliced virtual image, and splicing the second pre-spliced part with the first pre-spliced part to generate a spliced image of the middle joint of the target cable.
4. The method for identifying a cable intermediate joint defect according to claim 3, wherein the step of performing expansion processing on the first pre-spliced portion based on the cable intermediate joint reference image to generate a pre-spliced ghost comprises:
Acquiring a cable middle joint reference image, overlapping the outline of the first pre-spliced part with the outline of the cable middle joint reference image, and determining gray value mutation positions of the first pre-spliced part and the cable middle joint reference image;
determining a structural boundary line of the cable intermediate joint in the first pre-splicing part and the cable intermediate joint reference image according to the gray value abrupt change position;
adjusting the scaling and the position of the cable intermediate joint in the cable intermediate joint reference image until the first pre-spliced part and the contour and the structure boundary line of the cable intermediate joint in the cable intermediate joint reference image are in a coincident section;
and taking the contour and the structural boundary line of the cable intermediate joint except the overlapped section in the cable intermediate joint reference image as a pre-splicing virtual image.
5. The method of claim 3, wherein the step of overlapping the second pre-spliced portion with the pre-spliced virtual image and splicing with the first pre-spliced portion to generate the target cable intermediate splice image comprises:
Selecting any image from the rest effective parts as a second pre-splicing part;
overlapping the outline of the second pre-spliced part with the outline of the pre-spliced virtual shadow, and determining the gray value mutation position of the second pre-spliced part;
determining a structural boundary line of the second pre-spliced part according to the gray value mutation position;
adjusting the scaling and the position of the second pre-spliced part until the contour and the structural boundary of the second pre-spliced part are matched with the pre-spliced virtual shadow, and generating a matched position;
selecting any image from the rest effective parts as a new second pre-stitching part, skipping to execute the step of overlapping the outline of the second pre-stitching part and the outline of the pre-stitching virtual shadow, and determining the gray value mutation position of the second pre-stitching part;
adjusting the scaling of all the second pre-spliced parts, and moving to the fit position of the pre-spliced virtual shadow to generate a target second pre-spliced part;
and splicing the target second pre-splicing part with the first pre-splicing part to generate a target cable intermediate joint spliced image.
6. The method of claim 5, wherein the step of stitching the target second pre-stitched portion with the first pre-stitched portion to generate a target cable intermediate joint stitched image comprises:
splicing the target second pre-spliced part with the first pre-spliced part to generate an initial cable intermediate joint spliced image;
judging whether an overlapping area exists in the spliced image of the middle joint of the initial cable;
if not, taking the spliced image of the initial cable intermediate joint as a spliced image of the target cable intermediate joint;
if yes, acquiring the center coordinates of each overlapping area;
calculating the center distance between the center coordinate and the first pre-splicing part or the second pre-splicing part where the overlapped area is located;
and selecting the first pre-splicing part or the second pre-splicing part corresponding to the smallest center distance, removing the other pre-splicing part corresponding to the overlapping area, and generating a target cable intermediate joint splicing image.
7. The method for identifying a cable intermediate joint defect according to claim 4, wherein the step of obtaining a coordinate range in which each part of the cable intermediate joint in the target cable intermediate joint spliced image is located, and generating a part coordinate set of the part, comprises:
Acquiring a gray value of each pixel in the spliced image of the middle joint of the target cable;
traversing all the peaks and the troughs of the gray values, and determining the peak coordinates and the trough coordinates of a plurality of gray values;
setting the gray values of the preset number of pixels at the positions of the peak coordinates and the trough coordinates as a first preset value, setting the gray values of the rest pixels as a second preset value, and generating a gray peak Gu Tuxiang of the spliced image of the target cable intermediate connector;
determining a gray peak Gu Tuxiang of the cable intermediate joint reference image based on the gray peak Gu Tuxiang of the target cable intermediate joint stitched image;
marking each part of the cable intermediate joint in the gray peak-valley image of the cable intermediate joint reference image;
matching the gray peak-valley image of the cable intermediate joint reference image with the gray peak-valley image of the target cable intermediate joint spliced image;
and determining the coordinate range of each part of the cable intermediate joint in the target cable intermediate joint spliced image according to the matching similarity of the parts of the cable intermediate joint in the gray peak-valley image, and generating a part coordinate set of the parts.
8. The method for identifying a cable intermediate joint defect according to claim 1, wherein the step of determining whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a determination result comprises:
judging whether the peak coordinates and the trough coordinates corresponding to the part coordinate set of each part are matched with the peak coordinates and the trough coordinates in a preset cable intermediate joint reference image or not;
if yes, determining that all parts of the cable intermediate joint in the target cable intermediate joint splicing image have no defects;
if not, determining that defects exist in each part of the cable intermediate joint in the target cable intermediate joint spliced image, and extracting peak coordinates and trough coordinates corresponding to the part coordinate sets of the unmatched parts;
connecting the wave crest coordinates and the wave trough coordinates to generate a closed range;
and restoring the gray value of the pixel point in the closed range, and identifying the defect characteristic in the closed range.
9. A cable intermediate joint defect identification system, comprising:
The device comprises an initial image module to be spliced, a fault identification module and a fault detection module, wherein the initial image module to be spliced is used for responding to a received fault identification instruction and obtaining a plurality of initial images to be spliced corresponding to cable intermediate connectors corresponding to the fault identification instruction;
the effective part module is used for carrying out filtering treatment on all the initial images to be spliced to generate a plurality of updated images to be spliced, and identifying the effective parts of the cable intermediate connectors contained in the updated images to be spliced;
the target cable intermediate joint splicing image module is used for selecting a first pre-splicing part and a second pre-splicing part from all the effective parts, splicing the first pre-splicing part and the second pre-splicing part, and generating a target cable intermediate joint splicing image;
the position coordinate set module is used for acquiring the coordinate range of each position of the cable intermediate joint in the target cable intermediate joint spliced image and generating a position coordinate set of the position;
the judging result module is used for judging whether each part of the cable intermediate joint in the target cable intermediate joint spliced image has a defect or not based on the part coordinate set of each part and a preset cable intermediate joint reference image, and generating a judging result;
And the defect type module is used for identifying the defect type according to the judging result.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the cable intermediate joint defect identification method of any of claims 1-8.
CN202311167642.6A 2023-09-11 2023-09-11 Cable intermediate joint defect identification method, system and equipment Pending CN117197088A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311167642.6A CN117197088A (en) 2023-09-11 2023-09-11 Cable intermediate joint defect identification method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311167642.6A CN117197088A (en) 2023-09-11 2023-09-11 Cable intermediate joint defect identification method, system and equipment

Publications (1)

Publication Number Publication Date
CN117197088A true CN117197088A (en) 2023-12-08

Family

ID=88986561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311167642.6A Pending CN117197088A (en) 2023-09-11 2023-09-11 Cable intermediate joint defect identification method, system and equipment

Country Status (1)

Country Link
CN (1) CN117197088A (en)

Similar Documents

Publication Publication Date Title
CN111383209B (en) Unsupervised flaw detection method based on full convolution self-encoder network
CN107197269B (en) Video splicing method and device
Cho et al. Wavelet transform based image template matching for automatic component inspection
CN111008961B (en) Transmission line equipment defect detection method and system, equipment and medium thereof
CN103543394A (en) Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment
CN108550166B (en) Spatial target image matching method
CN108960280B (en) Picture similarity detection method and system
CN109559273B (en) Quick splicing method for vehicle bottom images
CN110472640B (en) Target detection model prediction frame processing method and device
CN112288682A (en) Electric power equipment defect positioning method based on image registration
CN114119987A (en) Feature extraction and descriptor generation method and system based on convolutional neural network
CN113673515A (en) Computer vision target detection algorithm
CN110827189B (en) Watermark removing method and system for digital image or video
CN117197088A (en) Cable intermediate joint defect identification method, system and equipment
CN111833341A (en) Method and device for determining stripe noise in image
CN116630662A (en) Feature point mismatching eliminating method applied to visual SLAM
CN116128820A (en) Pin state identification method based on improved YOLO model
CN110349129B (en) Appearance defect detection method for high-density flexible IC substrate
CN112052727B (en) Portrait recognition analysis system and method based on big data
CN111768357B (en) Image detection method and device
JP4796535B2 (en) Multi-conductor electric wire tracking method, apparatus and program by image processing, and multi-conductor electric wire abnormality detection method, apparatus and program using the same
CN110956640A (en) Heterogeneous image edge point detection and registration method
CN111630569B (en) Binocular matching method, visual imaging device and device with storage function
CN117057990A (en) Cable intermediate joint image splicing method, system and equipment
CN116818778B (en) Rapid and intelligent detection method and system for automobile parts

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