A method, system and apparatus for identifying defects in a cable mid-span joint

By filtering and stitching the images of cable joints, the effective part of the cable joint is identified, a clear stitched image is generated, and the defect type is determined. This solves the problem of low recognition rate caused by insufficient image clarity in the prior art and achieves accurate defect recognition.

CN117197088BActive Publication Date: 2026-06-19GUANGDONG POWER GRID CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG POWER GRID CO LTD
Filing Date
2023-09-11
Publication Date
2026-06-19

Smart Images

  • Figure CN117197088B_ABST
    Figure CN117197088B_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, and device for identifying defects in cable joints. The invention includes selecting a first pre-splicing portion and a second pre-splicing portion from all valid portions; splicing the first and second pre-splicing portions to generate a spliced ​​image of the target cable joint; obtaining the coordinate range of each part of the cable joint in the spliced ​​image of the target cable joint, generating a set of coordinates for each part; based on the set of coordinates for each part and a preset reference image of the cable joint, determining whether there are defects in each part of the cable joint in the spliced ​​image of the target cable joint, generating a judgment result; and identifying the defect type based on the judgment result. This invention solves the technical problem of low defect identification rate in existing technologies. By first identifying the set of coordinates for each part of the cable joint, and then identifying defect features in each set of coordinates, this invention can accurately determine the defect type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cable joint defect identification technology, and in particular to a method, system and device for cable joint defect identification. Background Technology

[0002] Cable joints are a crucial component for ensuring the normal transmission of electrical energy. The installation of each component of a 10kV cable joint places high demands on the construction environment and workmanship quality. During construction, workers are prone to causing defects such as scratches and stains on the main insulation, dimensional inaccuracies, uneven peeling of the semi-conductive layer, uneven cutting of the main insulation, and burrs on the crimping pipe. Therefore, it is necessary to identify these defects to facilitate repair.

[0003] However, due to the slender main insulation of the cable, a wide shooting angle is required. In order to obtain a high-resolution image of the 10kV cable joint, multiple macro cameras need to be used to take segmented shots and generate multiple images. However, in the existing technology, multiple images are usually stitched together to identify defects in the cable joint. However, the image stitching method used in the above method makes the image unclear and ignores details, resulting in a low defect recognition rate. Summary of the Invention

[0004] This invention provides a method, system, and device for identifying defects in cable joints, which solves the technical problem that existing image stitching methods result in unclear images, ignore detailed information, and lead to low defect identification rates.

[0005] The first aspect of this invention provides a method for identifying defects in cable joints, comprising:

[0006] In response to the received defect identification command, multiple initial images to be spliced ​​are obtained corresponding to the cable intermediate joints corresponding to the defect identification command;

[0007] All the initial images to be stitched are filtered to generate multiple updated images to be stitched, and the effective portions of the cable joints in the updated images to be stitched are identified.

[0008] Select a first pre-splicing portion and a second pre-splicing portion from all the effective portions, and splice the first pre-splicing portion and the second pre-splicing portion to generate a spliced ​​image of the target cable intermediate joint;

[0009] Obtain the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate the coordinate set of the part;

[0010] Based on the coordinate set of each part and the preset reference image of the cable intermediate joint, it is determined whether there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and a judgment result is generated.

[0011] The defect type is identified based on the judgment result.

[0012] Optionally, the step of filtering all the initial images to be stitched to generate multiple updated images to be stitched, and identifying the valid portion of the cable joint in the updated images to be stitched, includes:

[0013] All the initial images to be stitched are converted to grayscale to generate multiple intermediate images to be stitched.

[0014] Gaussian filtering is applied to all the intermediate images to be stitched together to generate multiple updated images to be stitched together;

[0015] Input all the updated images to be stitched into a preset target feature recognition model;

[0016] The target feature recognition model identifies the feature portion and background portion containing the cable intermediate joint in each of the updated images to be stitched together.

[0017] Extract the feature portions containing the cable intermediate joint from each of the updated images to be stitched together, and use the feature portions as valid portions.

[0018] Optionally, the step of selecting a first pre-segmentation portion and a second pre-segmentation portion from all the effective portions, and splicing the first pre-segmentation portion and the second pre-segmentation portion to generate a spliced ​​image of the target cable intermediate joint includes:

[0019] Calculate the ratio between the feature portion and the background portion;

[0020] Sort all the ratios in descending order to generate a sorting result;

[0021] The effective portion of the highest ratio corresponding to the sorting result is taken as the first pre-stitching portion, and the remaining pre-stitched image is taken as the second pre-stitching portion;

[0022] Based on the reference image of the cable intermediate joint, the first pre-splicing portion is expanded to generate a pre-splicing ghost image;

[0023] The second pre-splicing portion is overlapped with the pre-splicing phantom image and then spliced ​​with the first pre-splicing portion to generate a spliced ​​image of the target cable intermediate joint.

[0024] Optionally, the step of expanding the first pre-stitched portion based on the cable intermediate joint reference image to generate a pre-stitched ghost image includes:

[0025] Obtain a reference image of the cable intermediate joint, overlap the outline of the first pre-splicing portion with the outline of the reference image of the cable intermediate joint, and determine the position of the gray value abrupt change between the first pre-splicing portion and the reference image of the cable intermediate joint.

[0026] Based on the location of the grayscale value abrupt change, the structural boundary line between the first pre-splicing part and the cable intermediate joint in the cable intermediate joint reference image is determined;

[0027] Adjust the scaling ratio and position of the cable intermediate joint in the reference image of the cable intermediate joint until the outline and structural boundary line of the first pre-splicing part coincide with the outline and structural boundary line of the cable intermediate joint in the reference image of the cable intermediate joint.

[0028] The outline and structural boundary line of the cable intermediate joint in the reference image of the cable intermediate joint, excluding the overlapping section, are used as a pre-stitching ghost image.

[0029] Optionally, the step of overlapping the second pre-stitched portion with the pre-stitched phantom image and stitching it with the first pre-stitched portion to generate a stitched image of the target cable joint includes:

[0030] Select any image from the remaining valid portions as the second pre-stitching portion;

[0031] The outline of the second pre-stitched portion is overlapped with the outline of the pre-stitched phantom to determine the position of the gray value abrupt change in the second pre-stitched portion;

[0032] Based on the locations of abrupt changes in grayscale values, the structural boundary line of the second pre-splicing portion is determined;

[0033] Adjust the scaling ratio and position of the second pre-stitched portion until the outline and structural boundary line of the second pre-stitched portion match the pre-stitched phantom, generating a matching position;

[0034] Select any image from the remaining valid portions as a new second pre-stitched portion, and proceed to the step of overlapping the outline of the second pre-stitched portion with the outline of the pre-stitched phantom to determine the position of the gray value abrupt change in the second pre-stitched portion.

[0035] Adjust the scaling ratio of all the second pre-stitched portions and move them to the matching position of the pre-stitched phantom to generate the target second pre-stitched portion;

[0036] The second pre-splicing portion of the target is spliced ​​together with the first pre-splicing portion to generate a spliced ​​image of the target cable intermediate joint.

[0037] Optionally, the step of splicing the second pre-segmented portion of the target with the first pre-segmented portion to generate a spliced ​​image of the target cable intermediate joint includes:

[0038] The second pre-segmented portion of the target is spliced ​​with the first pre-segmented portion to generate an initial spliced ​​image of the cable intermediate joint;

[0039] Determine whether there are overlapping areas in the initial spliced ​​image of the cable intermediate joint;

[0040] If not, then the initial cable joint splicing image will be used as the target cable joint splicing image;

[0041] If so, then obtain the center coordinates of each of the overlapping regions;

[0042] Calculate the distance between the center coordinates and the center of the first pre-stitching portion or the second pre-stitching portion where the overlapping area is located;

[0043] Select the first or second pre-segmented portion corresponding to the smallest center distance, remove the other pre-segmented portion corresponding to the overlapping area, and generate the target cable intermediate joint splicing image.

[0044] Optionally, the step of obtaining the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint and generating the coordinate set of the parts includes:

[0045] Obtain the grayscale value of each pixel in the spliced ​​image of the target cable intermediate joint;

[0046] Traverse all the peaks and troughs of the grayscale values ​​to determine the peak coordinates and trough coordinates of multiple grayscale values;

[0047] Set a preset number of pixel grayscale values ​​at the locations of the peak coordinates and the trough coordinates to a first preset value, and set the grayscale values ​​of the remaining pixels to a second preset value to generate a grayscale peak-trough image of the spliced ​​image of the target cable intermediate joint.

[0048] Based on the grayscale peak-valley image of the spliced ​​image of the target cable joint, the grayscale peak-valley image of the reference image of the cable joint is determined.

[0049] Each part of the cable joint in the grayscale peak-valley image of the cable joint reference image is identified.

[0050] Match the grayscale peak-valley image of the reference image of the cable intermediate joint with the grayscale peak-valley image of the stitched image of the target cable intermediate joint;

[0051] Based on the similarity of the locations of the cable joints in the grayscale peak-valley images, the coordinate range of each part of the cable joint in the spliced ​​image of the target cable joint is determined, and a set of location coordinates for the location is generated.

[0052] Optionally, the step of determining whether there are defects in each part of the cable joint in the spliced ​​image of the target cable joint based on the coordinate set of each part and a preset reference image of the cable joint includes:

[0053] Determine whether the peak coordinates and trough coordinates corresponding to the location coordinate sets of each part match the peak coordinates and trough coordinates in the preset cable intermediate joint reference image;

[0054] If so, then it is determined that there are no defects in any part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint;

[0055] If not, then it is determined that there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and the peak coordinates and trough coordinates corresponding to the coordinate sets of each mismatched part are extracted.

[0056] Connect the peak coordinates and the trough coordinates to generate a closed range;

[0057] Restore the grayscale values ​​of the pixels within the enclosed area to identify defect features within the enclosed area.

[0058] A second aspect of the present invention provides a cable joint defect identification system, comprising:

[0059] The initial image to be stitched module is used to respond to the received defect identification command and acquire multiple initial images to be stitched corresponding to the cable intermediate joint corresponding to the defect identification command;

[0060] The effective portion module is used to filter all the initial images to be stitched, generate multiple updated images to be stitched, and identify the effective portion of the updated images to be stitched containing the cable intermediate joint.

[0061] The target cable intermediate joint splicing image module is used 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;

[0062] The part coordinate set module is used to obtain the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate the part coordinate set of the part;

[0063] The judgment result module is used to determine whether there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint based on the part coordinate set of each part and the preset cable intermediate joint reference image, and generate a judgment result.

[0064] The defect type module is used to identify the defect type based on the judgment result.

[0065] The third aspect of the present invention provides an electronic device, characterized in that it includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the cable joint defect identification method as described in any of the preceding claims.

[0066] As can be seen from the above technical solutions, the present invention has the following advantages:

[0067] This invention, in response to a received defect identification command, acquires multiple initial images to be stitched corresponding to the cable intermediate joint. It then filters all initial images to generate multiple updated images to be stitched, identifying valid portions containing the cable intermediate joint within these updated images. From these valid portions, it selects a first pre-stitching portion and a second pre-stitching portion, stitching them together to generate a target cable intermediate joint stitched image. It acquires the coordinate range of each part of the cable intermediate joint in the target stitched image, generating a set of coordinates for each part. Based on the coordinate sets of each part and a preset reference image of the cable intermediate joint, it determines whether any part of the cable intermediate joint in the target stitched image has a defect, generating a judgment result. Finally, it identifies the defect type based on the judgment result. This invention solves the technical problem of existing image stitching methods resulting in unclear images, neglecting detailed information, and leading to low defect recognition rates.

[0068] This invention avoids the problem of unclear images by taking segmented pictures of cable joints and stitching the images together. At the same time, it first identifies the coordinate sets of each part of the cable joint, and then identifies the defect features of each coordinate set, which can accurately determine the defect type. Attached Figure Description

[0069] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1 This is a flowchart illustrating the steps of a cable joint defect identification method provided in Embodiment 1 of the present invention.

[0071] Figure 2 This is a flowchart illustrating the steps of a cable joint defect identification method according to Embodiment 2 of the present invention.

[0072] Figure 3 This is a structural block diagram of a cable intermediate joint defect identification system provided in Embodiment 3 of the present invention. Detailed Implementation

[0073] This invention provides a method, system, and device for identifying defects in cable joints, addressing the technical problem that existing image stitching methods result in unclear images, neglect of detailed information, and low defect identification rates.

[0074] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0075] Please see Figure 1 , Figure 1 The flowchart illustrates the steps of a cable joint defect identification method provided in Embodiment 1 of the present invention.

[0076] The present invention provides a method for identifying defects in cable joints, comprising the following steps:

[0077] Step 101: Respond to the received defect identification command and obtain multiple initial images to be spliced ​​corresponding to the cable intermediate joint corresponding to the defect identification command.

[0078] It should be noted that the defect identification instruction refers to the instruction request to identify whether there are defects in the cable joint.

[0079] The initial images to be stitched refer to images taken using a macro camera perpendicular to the cable joint, with the shooting range adjusted along the axial direction of the cable joint to capture segmented images of the cable joint, resulting in several segmented images that need to be stitched together. Segments with the same shooting angle are grouped together, and these groups are processed as units.

[0080] In practical implementation, when a defect identification instruction is received, the corresponding cable intermediate joint is determined, and the initial image of the cable intermediate joint to be spliced ​​is obtained.

[0081] Step 102: Filter all initial images to be stitched to generate multiple updated images to be stitched, and identify the valid parts of the updated images to be stitched that contain cable intermediate joints.

[0082] It should be noted that filtering refers to processing the initial image to be stitched using Gaussian filtering.

[0083] The target feature recognition model is used to identify and update the valid parts containing cable joints and the invalid parts of the background area in the image to be stitched.

[0084] In practice, Gaussian filtering is used to process the initial image to be stitched. The processed image is then used to update the image to be stitched. All updated images are then input into the target feature recognition model. The target feature recognition model identifies the valid parts containing cable joints and the invalid parts of the background area in the updated images to be stitched.

[0085] Step 103: Select the first pre-splicing portion and the second pre-splicing portion from all valid portions, and splice the first pre-splicing portion and the second pre-splicing portion to generate a spliced ​​image of the target cable intermediate joint.

[0086] It should be noted that the ratio of the effective portion containing the cable joint area to the invalid portion of the background area is calculated, and all ratios are compared. The effective portion corresponding to the largest ratio is taken as the first pre-splicing portion, and the remaining effective portions are all the second pre-splicing portions.

[0087] The target cable joint image refers to the image of a cable joint that is stitched together from all the images to be stitched together.

[0088] In practice, the first and second pre-splicing parts are selected. Using the cable joint image as the base, the proportion and position of the first pre-splicing part are adjusted. The adjusted first pre-splicing part is then overlapped with the outline of the cable joint in the cable joint reference image to generate an overlapping segment. The portion of the cable joint in the cable joint reference image outside the overlapping segment is used as an extension to produce a pre-splicing ghost image. All the second pre-splicing parts are then overlapped with the outline of the cable joint in the pre-splicing ghost image, so that the outline and structural boundary line of the cable joint in the pre-splicing ghost image match. The matching position is recorded. The proportion and position of the second pre-splicing part are then adjusted, placed in the matching position, and spliced ​​with the first pre-splicing part to obtain a complete cable joint image.

[0089] Step 104: Obtain the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate the part coordinate set.

[0090] It should be noted that the coordinate set of a part refers to the multiple coordinate ranges in which the part is located.

[0091] In practice, the grayscale values ​​of the spliced ​​image of the target cable joint are obtained. The peaks and troughs of all grayscale values ​​are traversed to obtain several peak and trough coordinates. The grayscale values ​​of the n pixels surrounding the locations of the peak and trough coordinates are set to 255, and the grayscale values ​​of the other pixels are set to zero. This yields the grayscale peak-trough image of the spliced ​​image of the target cable joint. Here, n is a preset number.

[0092] In the same way, obtain the grayscale peak and valley images of the reference image of the cable intermediate joint and mark each part of the cable intermediate joint. Match the grayscale peak and valley images of the reference image of the cable intermediate joint and the grayscale peak and valley images of the spliced ​​image of the target cable intermediate joint. If the similarity reaches the threshold, they are regarded as the same part. Then, the coordinate set of each part of the spliced ​​image of the target cable intermediate joint can be obtained.

[0093] Step 105: Based on the coordinate set of each part and the preset reference image of the cable intermediate joint, determine whether there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate the judgment result.

[0094] It should be noted that the reference image of the cable joint refers to a complete reference image of the cable joint.

[0095] The judgment result refers to whether the cable joint has a defect or not.

[0096] In practice, the coordinate set of each part of the cable joint in the spliced ​​image of the target cable joint is matched with the reference image of the cable joint. If there are mismatched peaks and troughs, it means that there is a defect in the cable joint of the spliced ​​image of the target cable joint. If all match, it means that there is no defect.

[0097] Step 106: Identify the defect type based on the judgment result.

[0098] It should be noted that if the cable joint in the spliced ​​image of the target cable joint has a defect, the defect features can be entered into the defect type library to determine the defect type.

[0099] The defect type library contains defect types such as stains, uneven cuts, size issues, scratches, and burrs.

[0100] In practice, various identification methods were employed during the recognition process. For example, edge detection algorithms were used to identify scratches in the spliced ​​image of the target cable joint. After edge detection, obvious scratch areas were visible. Subsequently, the presence of scratch defects was determined by statistically analyzing specific pixel values ​​in the spliced ​​image. To detect scratches of varying degrees, the optimal edge detection threshold was selected through experimentation.

[0101] In practical implementation, a burr identification method for crimped pipes can also be used. During this process, edge detection is employed to extract the edges of the crimped pipe. A smoothly polished crimped pipe edge should be roughly a straight line. When burrs are present or not properly polished, the curvature of the crimped pipe edge increases, resulting in an extreme point on the curve segment of the crimped pipe boundary line. This extreme point differs significantly from the smoothed crimped pipe boundary. Two different thresholds are used to detect strong and weak edges. Before processing, the Canny operator first uses a Gaussian smoothing filter to smooth the image and remove noise. The Canny segmentation algorithm uses the finite difference of the first-order partial derivative to calculate the gradient magnitude and direction. During processing, the Canny operator also undergoes a non-maximum suppression process. Finally, the Canny operator uses two thresholds to connect the edges. When detecting the edges of the crimped pipe, the edge boundary line can also be viewed as a function curve, fitted using a quadratic function. When burr defects are present, the boundary line on the surface of the crimped pipe will be uneven. Similarly, a quadratic function is used for fitting to calculate the error between the flatness and unevenness of the crimped pipe. The magnitude of the error is used to determine whether the boundary is unevenly peeled.

[0102] In practice, to determine whether the outer semiconductive layer and the main insulation layer are unevenly peeled, it is necessary to crop the spliced ​​image of the target cable intermediate joint at the boundary. By using edge extraction, the boundary line of the spliced ​​image of the target cable intermediate joint is extracted. Then, by fitting a function to the boundary line, a quadratic function is also used to fit the boundary line with uneven peeling. The error between the fitted function for neat peeling and uneven peeling is calculated, and the magnitude of the error is used to determine whether the peeling at the boundary is uneven.

[0103] Even a neatly trimmed semiconductive layer will still exhibit a certain curvature in the photograph. Therefore, it is advisable to use the mean square error method to compare the fitting equation of the image to be tested with the fitting equation of a defect-free semiconductive layer, such as:

[0104]

[0105] In the formula, n is the total number of edge points, and y i The size of the fitted edge points to be detected. Size of the defect-free edge point.

[0106] Let the interval be [0,2]. Given a fitted quadratic equation, with the independent variable also in the interval [0,2], the mean square error can be obtained. By fitting the image, the mean square error of the fitted function is calculated for all points on the boundary line. This mean square error is then used to determine whether the peeling is uneven. Experiments clearly show that the fitting error of images with uneven peeling defects is significantly greater than that of images with neat peeling. Furthermore, when the fitting error is within the range [0, 200], it is considered that there is no defect; if it exceeds this range, it is determined that the outer semiconducting layer is peeled unevenly. This criterion for judgment has certain practicality and rationality.

[0107] This invention, in response to a received defect identification command, acquires multiple initial images to be stitched corresponding to the cable intermediate joint. It then filters all initial images to generate multiple updated images to be stitched, identifying valid portions containing the cable intermediate joint within these updated images. From these valid portions, it selects a first pre-stitching portion and a second pre-stitching portion, stitching them together to generate a target cable intermediate joint stitched image. It acquires the coordinate range of each part of the cable intermediate joint in the target stitched image, generating a set of coordinates for each part. Based on the coordinate sets of each part and a preset reference image of the cable intermediate joint, it determines whether any part of the cable intermediate joint in the target stitched image has a defect, generating a judgment result. Finally, it identifies the defect type based on the judgment result. This invention solves the technical problem of existing image stitching methods resulting in unclear images, neglecting detailed information, and leading to low defect recognition rates.

[0108] This invention avoids the problem of unclear images by taking segmented pictures of cable joints and stitching the images together. At the same time, it first identifies the coordinate sets of each part of the cable joint, and then identifies the defect features of each coordinate set, which can accurately determine the defect type.

[0109] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps of a cable intermediate joint defect identification method provided in Embodiment 2 of the present invention.

[0110] The present invention provides a method for identifying defects in cable joints, comprising the following steps:

[0111] Step 201: Respond to the received defect identification command and obtain multiple initial images to be spliced ​​corresponding to the cable intermediate joint corresponding to the defect identification command.

[0112] In this embodiment of the invention, the specific implementation process of step 201 is similar to that of step 101, and will not be repeated here.

[0113] Step 202: Convert all initial images to grayscale to generate multiple intermediate images to be stitched together.

[0114] It should be noted that grayscale processing refers to converting all initial images to grayscale.

[0115] In practice, all initial images to be stitched are converted to grayscale to obtain intermediate images to be stitched after grayscale conversion.

[0116] Step 203: Perform Gaussian filtering on all intermediate images to be stitched to generate multiple updated images to be stitched.

[0117] It should be noted that the acquisition and transmission of cable joint images can be affected by interference from the acquisition device and the external environment. This interference can introduce noise into the original cable joint image set, damaging the surface information of the images and impacting the algorithm's recognition, potentially leading to misjudgments. Therefore, before defect analysis, it is necessary to enhance image quality and eliminate noise interference in the images to improve the algorithm's detection accuracy.

[0118] In practical implementation, if the updated image to be stitched is set as f(x,y), f(x,y) is smoothed by a Gaussian function component filter G(x,y,σ). The Gaussian function is expressed by the following formula:

[0119]

[0120] In the formula, x and y are the coordinate positions of the two-dimensional image to be stitched, respectively, and σ is taken as 14, which is the standard deviation of the Gaussian curve. The filtered image is obtained through the following formula:

[0121] I(x,y)=G(x,y,σ)×f(x,y)

[0122] After Gaussian filtering, multiple updated images to be stitched together are obtained.

[0123] Step 204: Input all updated images to be stitched into the preset target feature recognition model.

[0124] It should be noted that the target feature recognition model refers to the neural network used for feature recognition, such as multilayer perceptron, self-organizing neural network, and convolutional neural network.

[0125] In practice, all images to be stitched will be updated and input into the target feature recognition model. The target feature recognition model will then identify the valid parts containing the cable joint area and the invalid parts of the background area.

[0126] Step 205: Identify the feature parts containing cable intermediate joints and the background parts in each updated image to be stitched using the target feature recognition model.

[0127] It should be noted that the area containing the cable joint is designated as the valid part, while the remaining background area is designated as the invalid part.

[0128] In practice, the target feature recognition model is used to identify the valid parts of each updated image to be stitched that contain cable joint areas and the invalid parts of the background areas.

[0129] By training a large number of images containing cable joints, a target feature recognition model can be obtained. Since there are few interfering elements in the application scenario of this embodiment, the feature recognition model does not need to be configured to be very accurate. It only needs to identify the division of different regions, which reduces the amount of processing and improves the processing efficiency.

[0130] Step 206: Extract the feature parts containing cable intermediate joints from each updated image to be stitched together, and take the feature parts as the valid parts.

[0131] In practice, the feature portion containing the cable joint area in each updated image to be stitched is extracted as the effective portion.

[0132] Step 207: Select the first pre-splicing portion and the second pre-splicing portion from all valid portions, and splice the first pre-splicing portion and the second pre-splicing portion to generate a spliced ​​image of the target cable intermediate joint.

[0133] Optionally, step 207 includes the following steps S11-S15:

[0134] S11. Calculate the ratio between the feature portion and the background portion;

[0135] S12. Sort all ratios from highest to lowest to generate the sorting results;

[0136] S13. Take the effective part of the highest ratio corresponding to the sorting result as the first pre-stitching part, and the remaining pre-stitching image as the second pre-stitching part.

[0137] S14. Based on the reference image of the cable intermediate joint, the first pre-splicing part is expanded to generate a pre-splicing ghost image;

[0138] S15. Overlap the second pre-segmented portion with the pre-segmented virtual image, and then splice it with the first pre-segmented portion to generate a spliced ​​image of the target cable intermediate joint.

[0139] It should be noted that the ratio refers to the proportion of the feature part and the background part in the updated image to be stitched.

[0140] In practice, all ratios are sorted from high to low, and the effective portion of at least one image at the top of the sort is selected as the first pre-stitching part, while the remaining effective portions are selected as the second pre-stitching image.

[0141] Specifically, since the first pre-stitched part is the basis for subsequent judgments, and the effective part accounts for a large proportion, the content displayed in the image is relatively clear, so it is used as the first pre-stitched part.

[0142] In practice, based on the reference image of the cable intermediate joint, the first pre-splicing part is expanded to generate a pre-splicing ghost image; the second pre-splicing part is overlapped with the pre-splicing ghost image and spliced ​​with the first pre-splicing part to generate the target cable intermediate joint splicing image.

[0143] Optionally, step S14 includes the following steps S21-S24:

[0144] S21. Obtain a reference image of the cable intermediate joint, overlap the outline of the first pre-splicing part with the outline of the cable intermediate joint reference image, and determine the position of the gray value abrupt change between the first pre-splicing part and the cable intermediate joint reference image.

[0145] S22. Based on the location of abrupt changes in grayscale values, determine the structural boundary line between the first pre-splicing section and the cable intermediate joint in the reference image of the cable intermediate joint;

[0146] S23. Adjust the scaling ratio and position of the cable intermediate joint in the cable intermediate joint reference image until the first pre-splicing part overlaps with the outline and structural boundary line of the cable intermediate joint in the cable intermediate joint reference image.

[0147] S24. Use the outline and structural boundary line of the cable intermediate joint in the reference image of the cable intermediate joint, excluding the overlapping section, as a pre-splicing ghost image.

[0148] In practice, a reference image containing a complete cable joint is obtained, and the outline of the first pre-splicing part is overlapped with the outline of the cable joint in the reference image of the cable joint. Based on the abrupt change in grayscale value of the first pre-splicing part and the cable joint in the reference image of the cable joint, the structural boundary lines of the first pre-splicing part and the cable joint are drawn respectively.

[0149] In practice, the scaling ratio and position of the cable intermediate joint in the reference image of the cable intermediate joint are adjusted until the first pre-splicing part overlaps with the outline and structural boundary line of the cable intermediate joint in the reference image of the cable intermediate joint; the outline and structural boundary line of the cable intermediate joint in the reference image of the cable intermediate joint, excluding the overlapping section, are used as the pre-splicing ghost image.

[0150] Optionally, step S15 includes the following steps S31-S37:

[0151] S31. Select any image from the remaining valid parts as the second pre-stitching part;

[0152] S32. Overlap the outline of the second pre-stitched part with the outline of the pre-stitched phantom to determine the position of the gray value change in the second pre-stitched part.

[0153] S33. Determine the structural boundary line of the second pre-splitting part based on the location of the gray value abrupt change;

[0154] S34. Adjust the scaling ratio and position of the second pre-stitched part until the outline and structural boundary line of the second pre-stitched part match the pre-stitched phantom, generating the matching position.

[0155] S35. Select any image from the remaining valid parts as a new second pre-stitching part, and jump to execute the step of overlapping the outline of the second pre-stitching part with the outline of the pre-stitching ghost image to determine the gray value change position of the second pre-stitching part.

[0156] S36. Adjust the scaling ratio of all second pre-stitched parts and move them to the matching position of the pre-stitched phantom to generate the target second pre-stitched part.

[0157] S37. The second pre-segmented part of the target is spliced ​​with the first pre-segmented part to generate a spliced ​​image of the intermediate joint of the target cable.

[0158] It should be noted that the target second pre-stitching part refers to the overall part obtained by placing the fully adjusted second pre-stitching part into the matching position of the pre-stitching phantom.

[0159] In practice, any image from the remaining pre-stitched images is selected as the second pre-stitched part, and the outline of the second pre-stitched part is overlapped with the outline of the pre-stitched virtual image. Based on the position of the gray value change of the second pre-stitched part, the structural boundary line of the second pre-stitched part is drawn. The scaling ratio and position of the second pre-stitched part are adjusted until the outline and structural boundary line of the second pre-stitched part match the pre-stitched virtual image, and the matching position is recorded.

[0160] In practice, any image from the remaining valid parts is selected as a new second pre-stitching part, and step S32 is repeated until all matching positions are recorded. The second pre-stitching part is adjusted, and all the adjusted second pre-stitching parts are stitched with the first pre-stitching part at the matching position of the pre-stitching phantom to obtain the target cable intermediate joint stitching image.

[0161] Optionally, step S37 includes the following steps S41-S46:

[0162] S41. The second pre-segmented part of the target is spliced ​​with the first pre-segmented part to generate an initial cable intermediate joint splicing image;

[0163] S42. Determine whether there are overlapping areas in the initial spliced ​​image of the cable intermediate joint;

[0164] S43. If not, then use the initial cable intermediate joint splicing image as the target cable intermediate joint splicing image.

[0165] S44. If so, obtain the center coordinates of each overlapping region;

[0166] S45. Calculate the center coordinates and the center distance between the center coordinates and the center of the first pre-stitching part or the second pre-stitching part where the overlapping area is located;

[0167] S46. Select the first or second pre-segmentation part corresponding to the smallest center distance, remove the other pre-segmentation part corresponding to the overlapping area, and generate the target cable intermediate joint splicing image.

[0168] It should be noted that the initial cable joint splicing image refers to the image in which the second pre-splicing part of the target is spliced ​​with the first pre-splicing part for the first time.

[0169] The target cable joint splicing image refers to an image containing a complete cable joint without overlapping areas.

[0170] In practice, the target second pre-segmented part is spliced ​​with the first pre-segmented part to obtain an initial cable intermediate joint splicing image. It is then determined whether there are overlapping areas between all the second pre-segmented parts in the initial cable intermediate joint splicing image, as well as between the second pre-segmented part and the first pre-segmented part. If there are no overlapping areas, the initial cable intermediate joint splicing image is output as the target cable intermediate joint splicing image. If there are overlapping areas, then overlapping area selection is required.

[0171] In practical implementation, when selecting overlapping areas, the center coordinates of each overlapping area are obtained, and the center distance between the center coordinates and the center of the second pre-splicing part or the first pre-splicing part where the overlapping area is located is determined. The second pre-splicing part or the first pre-splicing part with the smaller center distance in the overlapping area is retained. After the overlapping area selection is completed, the splicing image of the target cable intermediate joint is output.

[0172] Specifically, a pre-stitching ghost image is constructed by using a reference image of the cable intermediate joint and the first pre-stitching portion. The second pre-stitching portion is then adjusted using this ghost image for final stitching. This allows for accurate adjustment of stitching dimensions and alignment of parts, avoiding errors or obvious stitching marks during the stitching process. Furthermore, selecting the first pre-stitching portion provides a relatively clear image as the basis for subsequent processing. The acquisition of the pre-stitching ghost image and subsequent fitting accurately determine the corresponding fitting position, providing a benchmark for stitching. By selecting overlapping areas, images with relatively high imaging quality can be chosen, preventing unclear images after stitching.

[0173] Step 208: Obtain the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate the part coordinate set.

[0174] Optionally, step 208 includes the following steps S51-S57:

[0175] S51. Obtain the grayscale value of each pixel in the spliced ​​image of the target cable intermediate joint;

[0176] S52. Traverse all grayscale values' peaks and troughs to determine the peak and trough coordinates of multiple grayscale values.

[0177] S53. Set the grayscale values ​​of a preset number of pixels at the locations of the peak and trough coordinates to the first preset value, and set the grayscale values ​​of the remaining pixels to the second preset value to generate a grayscale peak-trough image of the target cable intermediate joint splicing image.

[0178] S54. Based on the grayscale peak-valley image of the spliced ​​image of the target cable intermediate joint, determine the grayscale peak-valley image of the reference image of the cable intermediate joint.

[0179] S55. Identify the various parts of the cable joint in the grayscale peak-valley image of the cable joint reference image.

[0180] S56. Match the grayscale peak-valley image of the reference image of the cable intermediate joint with the grayscale peak-valley image of the stitched image of the target cable intermediate joint.

[0181] S57. Based on the similarity of the locations of the cable joints in the grayscale peak-valley images, determine the coordinate range of each part of the cable joint in the spliced ​​image of the target cable joint, and generate a set of location coordinates.

[0182] It should be noted that the first preset value is 255, and the second preset value is 0.

[0183] In practice, the grayscale value of each pixel in the stitched image is obtained, and the peaks and valleys of the grayscale values ​​are traversed to obtain several peak coordinates and valley coordinates. The grayscale values ​​of the n pixels around the location of the peak coordinates and valley coordinates are set to 255, and the grayscale values ​​of the other pixels are set to zero to obtain the grayscale peak and valley image of the stitched image, where n is a preset number.

[0184] In the same way, grayscale peak-valley images of the reference image of the cable intermediate joint are created and each part of the cable intermediate joint is marked. The grayscale peak-valley images of the reference image of the cable intermediate joint are matched with the grayscale peak-valley images of the spliced ​​image of the target cable intermediate joint. If the similarity (part matching similarity) reaches the threshold, they are considered to be the same part, and the part coordinate set of each part is obtained.

[0185] Specifically, by selecting peaks and troughs, the amount of data processed can be reduced, and key information can be highlighted intuitively.

[0186] Step 209: Based on the coordinate set of each part and the preset reference image of the cable intermediate joint, determine whether there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate the judgment result.

[0187] Optionally, step 209 includes the following steps S61-S65:

[0188] S61. Determine whether the peak and trough coordinates corresponding to the coordinate sets of each part match the peak and trough coordinates in the preset cable intermediate joint reference image.

[0189] S62. If so, then determine that there are no defects in any part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint;

[0190] S63. If not, then determine that there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and extract the peak coordinates and trough coordinates corresponding to the coordinate sets of the mismatched parts.

[0191] S64. Connect the peak coordinates and trough coordinates to generate a closed range;

[0192] S65. Restore the grayscale values ​​of pixels within the closed area to identify defect features within the closed area.

[0193] In practice, the peak and trough coordinates corresponding to the coordinate sets of each part of the cable joint in the spliced ​​image of the target cable joint are matched with the peak and trough coordinates corresponding to the reference image of the cable joint. If all match, it means that there are no defects in each part of the cable joint in the spliced ​​image of the target cable joint; otherwise, it means that there are defects in each part of the cable joint in the spliced ​​image of the target cable joint. The peak and trough coordinates that do not match are connected to obtain a closed range. The gray values ​​of the pixels in the closed range are restored to identify the defect features within the closed range.

[0194] Specifically, during the matching process, matching can be performed directly using the image frame, or the image frame can be pre-converted into a fitting function, and then the matching can be performed by judging the differences between the fitting functions.

[0195] Specifically, in the above steps, after setting the gray values ​​of pixels outside the periphery of the peaks and troughs to zero, only a small number of points exist in the resulting image. By identifying the excess peaks and troughs, the location of the defects can be determined. After restoring the gray values ​​of these areas, the number of other unnecessary pixels to be identified can be greatly reduced. By filtering out interference factors, both the recognition accuracy and recognition efficiency are improved.

[0196] Step 210: Identify the defect type based on the judgment result.

[0197] In this embodiment of the invention, the specific implementation process of step 210 is similar to that of step 106, and will not be repeated here.

[0198] This invention, in response to a received defect identification command, acquires multiple initial images to be stitched corresponding to the cable intermediate joint. It then filters all initial images to generate multiple updated images to be stitched, identifying valid portions containing the cable intermediate joint within these updated images. From these valid portions, it selects a first pre-stitching portion and a second pre-stitching portion, stitching them together to generate a target cable intermediate joint stitched image. It acquires the coordinate range of each part of the cable intermediate joint in the target stitched image, generating a set of coordinates for each part. Based on the coordinate sets of each part and a preset reference image of the cable intermediate joint, it determines whether any part of the cable intermediate joint in the target stitched image has a defect, generating a judgment result. Finally, it identifies the defect type based on the judgment result. This invention solves the technical problem of existing image stitching methods resulting in unclear images, neglecting detailed information, and leading to low defect recognition rates.

[0199] This invention avoids the problem of unclear images by taking segmented pictures of cable joints and stitching the images together. At the same time, it first identifies the coordinate sets of each part of the cable joint, and then identifies the defect features of each coordinate set, which can accurately determine the defect type.

[0200] Please see Figure 3 , Figure 3 This is a structural block diagram of a cable joint defect identification system provided in Embodiment 3 of the present invention.

[0201] The present invention provides a cable joint defect identification system, comprising:

[0202] The initial image to be stitched module 301 is used to respond to the received defect identification command and acquire multiple initial images to be stitched corresponding to the cable intermediate joint corresponding to the defect identification command.

[0203] The effective part module 302 is used to filter all the initial images to be stitched, generate multiple updated images to be stitched, and identify the effective parts of the updated images to be stitched that contain cable intermediate joints.

[0204] The target cable intermediate joint splicing image module 303 is used to select a first pre-splicing portion and a second pre-splicing portion from all valid portions, splice the first pre-splicing portion and the second pre-splicing portion, and generate a target cable intermediate joint splicing image;

[0205] The part coordinate set module 304 is used to obtain the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint and generate the part coordinate set of the part.

[0206] The judgment result module 305 is used to determine whether there are defects in each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint based on the part coordinate set of each part and the preset cable intermediate joint reference image, and generate a judgment result.

[0207] The defect type module 306 is used to identify the defect type based on the judgment result.

[0208] Optionally, the effective portion module 302 includes:

[0209] The intermediate images to be stitched submodule is used to convert all the initial images to be stitched to grayscale and generate multiple intermediate images to be stitched.

[0210] The "Update Images to be Stitched" submodule is used to perform Gaussian filtering on all intermediate images to be stitched, generating multiple updated images to be stitched.

[0211] The target feature recognition model submodule is used to input all updated images to be stitched into the preset target feature recognition model;

[0212] The background submodule is used to identify the feature parts containing cable joints and the background parts in each updated image to be stitched using a target feature recognition model.

[0213] The effective part submodule is used to extract the feature parts containing cable intermediate joints from each updated image to be stitched together, and to use the feature parts as the effective parts.

[0214] Optionally, the target cable joint splicing image module 303 includes:

[0215] The calculation submodule is used to calculate the ratio between the feature portion and the background portion;

[0216] The sorting submodule is used to sort all ratios from highest to lowest and generate the sorting results.

[0217] The second pre-stitching submodule is used to take the effective part of the highest ratio corresponding to the sorting result as the first pre-stitching part, and the remaining pre-stitched image as the second pre-stitching part.

[0218] The pre-stitching virtual image module is used to expand the first pre-stitching part based on the reference image of the cable intermediate joint to generate a pre-stitching virtual image;

[0219] The first target cable intermediate joint stitching image submodule is used to overlap the second pre-stitched part with the pre-stitched ghost image and stitch it with the first pre-stitched part to generate a target cable intermediate joint stitching image.

[0220] Optionally, the pre-stitched virtual shadow module includes:

[0221] The mutation location submodule is used to acquire a reference image of a cable intermediate joint, overlap the outline of the first pre-splicing part with the outline of the reference image of the cable intermediate joint, and determine the gray value mutation location between the first pre-splicing part and the reference image of the cable intermediate joint.

[0222] The structural boundary line submodule is used to determine the structural boundary line between the first pre-splicing part and the cable intermediate joint in the reference image of the cable intermediate joint based on the location of the gray value abrupt change.

[0223] The overlapping segment module is used to adjust the scaling ratio and position of the cable intermediate joint in the cable intermediate joint reference image until the first pre-splicing part overlaps with the outline and structural boundary line of the cable intermediate joint in the cable intermediate joint reference image.

[0224] The pre-stitching ghost image module is used to use the outline and structural boundary lines of the cable joint in the reference image of the cable joint, excluding the overlapping section, as a pre-stitching ghost image.

[0225] Optionally, the target cable mid-joint stitching image submodule includes:

[0226] The second pre-stitching submodule is used to select any image from the remaining valid parts as the second pre-stitching part;

[0227] The grayscale value abrupt change position submodule is used to overlap the outline of the second pre-stitched part with the outline of the pre-stitched ghost image to determine the grayscale value abrupt change position of the second pre-stitched part.

[0228] The structural boundary line determination submodule is used to determine the structural boundary line of the second pre-splicing section based on the location of abrupt changes in grayscale values.

[0229] The matching position submodule is used to adjust the scaling ratio and position of the second pre-stitched part until the outline and structural boundary line of the second pre-stitched part matches the pre-stitched phantom, thus generating the matching position;

[0230] The jump rotor module is used to select any image from the remaining valid parts as a new second pre-stitching part, jump to execute the step of overlapping the outline of the second pre-stitching part with the outline of the pre-stitching ghost image, and determining the position of the gray value change of the second pre-stitching part.

[0231] The target second pre-stitching part submodule is used to adjust the scaling ratio of all second pre-stitching parts and move them to the matching position of the pre-stitching phantom to generate the target second pre-stitching part;

[0232] The second target cable intermediate joint splicing image submodule is used to splice the second pre-splicing part of the target with the first pre-splicing part to generate a spliced ​​image of the target cable intermediate joint.

[0233] Optionally, the second target cable intermediate joint stitching image submodule includes:

[0234] The initial cable joint stitching image submodule is used to stitch the target second pre-stitched part with the first pre-stitched part to generate an initial cable joint stitching image.

[0235] The overlapping area submodule is used to determine whether there is an overlapping area in the initial cable joint splicing image;

[0236] The target cable joint splicing image determination submodule is used to use the initial cable joint splicing image as the target cable joint splicing image if not otherwise specified.

[0237] The center coordinates submodule is used to obtain the center coordinates of each overlapping region if the condition is met.

[0238] The center distance submodule is used to calculate the center distance between the center coordinates and the center of the first or second pre-stitching part where the overlapping area is located;

[0239] The submodule for generating the spliced ​​image of the target cable intermediate joint is used to select the first or second pre-splicing part corresponding to the smallest center distance, remove the other pre-splicing part corresponding to the overlapping area, and generate the spliced ​​image of the target cable intermediate joint.

[0240] Optionally, the part coordinate set module 304 includes:

[0241] The grayscale value submodule is used to obtain the grayscale value of each pixel in the spliced ​​image of the target cable intermediate joint;

[0242] The valley coordinates submodule is used to traverse the peaks and valleys of all gray values ​​and determine the peak coordinates and valley coordinates of multiple gray values.

[0243] The grayscale peak and valley image submodule is used to set the grayscale values ​​of a preset number of pixels at the positions of the peak coordinates and valley coordinates to the first preset value, and set the grayscale values ​​of the remaining pixels to the second preset value, so as to generate a grayscale peak and valley image of the target cable intermediate joint splicing image.

[0244] The grayscale peak and valley image determination submodule is used to determine the grayscale peak and valley image based on the stitched image of the target cable joint and the grayscale peak and valley image of the reference image of the cable joint.

[0245] The identification submodule is used to identify the various parts of the cable joint in the grayscale peak-valley image of the cable joint reference image.

[0246] The matching submodule is used to match the grayscale peak-valley image of the reference image of the cable joint with the grayscale peak-valley image of the stitched image of the target cable joint.

[0247] The similarity submodule is used to determine the coordinate range of each part of the cable joint in the spliced ​​image of the target cable joint based on the similarity of the parts of the cable joint in the grayscale peak and valley image, and generate the part coordinate set.

[0248] Optionally, the judgment result module 305 includes:

[0249] The judgment submodule is used to determine whether the peak coordinates and trough coordinates corresponding to the coordinate sets of each part match the peak coordinates and trough coordinates in the preset cable intermediate joint reference image.

[0250] The "No Defects" submodule is used to determine, if yes, that there are no defects in any part of the cable joint in the spliced ​​image of the target cable joint.

[0251] The peak coordinate submodule is used to determine, if not, that there are defects in various parts of the cable joint in the spliced ​​image of the target cable joint, and to extract the peak coordinates and trough coordinates corresponding to the coordinate sets of the mismatched parts.

[0252] The closed range submodule is used to connect the peak coordinates and trough coordinates to generate a closed range;

[0253] The defect feature submodule is used to restore the grayscale values ​​of pixels within a closed area and identify defect features within the closed area.

[0254] Embodiment 4 of the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs the steps of the cable joint defect identification method as described in any of the above embodiments.

[0255] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0256] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0257] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0258] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0259] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0260] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of cable intermediate joint defect recognition, characterized by, include: In response to the received defect identification command, multiple initial images to be spliced ​​are obtained corresponding to the cable intermediate joints corresponding to the defect identification command; All the initial images to be stitched are filtered to generate multiple updated images to be stitched, and the effective portions of the cable joints in the updated images to be stitched are identified. From all the effective portions, calculate the ratio of the effective portion containing the cable joint area to the invalid portion of the background area. Compare all ratios, and the effective portion corresponding to the largest ratio is taken as the first pre-stitching portion. The remaining effective portions are all second pre-stitching portions. Based on the preset cable joint reference image, the first pre-stitching portion is expanded to generate a pre-stitching ghost image. The second pre-stitching portion is overlapped with the pre-stitching ghost image and stitched with the first pre-stitching portion to generate the target cable joint stitched image. Obtain the coordinate range of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint, and generate a set of coordinates for each part, including: Obtain the grayscale value of each pixel in the spliced ​​image of the target cable intermediate joint; Traverse all the peaks and troughs of the grayscale values ​​to determine the peak coordinates and trough coordinates of multiple grayscale values; Set a preset number of pixel grayscale values ​​at the locations of the peak coordinates and the trough coordinates to a first preset value, and set the grayscale values ​​of the remaining pixels to a second preset value to generate a grayscale peak-trough image of the spliced ​​image of the target cable intermediate joint. Based on the grayscale peak-valley image of the spliced ​​image of the target cable intermediate joint, the grayscale peak-valley image of the preset cable intermediate joint reference image is determined. Each part of the cable joint in the grayscale peak-valley image of the preset cable joint reference image is identified. The grayscale peak-valley image of the preset cable intermediate joint reference image is matched with the grayscale peak-valley image of the target cable intermediate joint spliced ​​image. Based on the similarity of the locations of the cable joints in the grayscale peak-valley images, the coordinate range of each part of the cable joint in the spliced ​​image of the target cable joint is determined, and a set of location coordinates for the location is generated. Based on the coordinate set of each part and the preset reference image of the cable intermediate joint, the coordinate set of each part of the cable intermediate joint in the spliced ​​image of the target cable intermediate joint is matched with the reference image of the cable intermediate joint. If there are mismatched peaks and valleys, the cable intermediate joint in the spliced ​​image of the target cable intermediate joint has a defect. If all match, there is no defect. A judgment result is generated. The defect type is identified based on the judgment result.

2. The cable intermediate joint defect identification method according to claim 1, characterized in that, The step of filtering all the initial images to be stitched to generate multiple updated images to be stitched, and identifying the valid portion of the cable joint in the updated images to be stitched, includes: All the initial images to be stitched are converted to grayscale to generate multiple intermediate images to be stitched. Gaussian filtering is applied to all the intermediate images to be stitched together to generate multiple updated images to be stitched together; Input all the updated images to be stitched into a preset target feature recognition model; The target feature recognition model identifies the feature portion and background portion containing the cable intermediate joint in each of the updated images to be stitched together. Extract the feature portions containing the cable intermediate joint from each of the updated images to be stitched together, and use the feature portions as valid portions.

3. The cable intermediate joint defect identification method according to claim 1, characterized in that, The step of expanding the first pre-stitched portion based on a preset cable joint reference image to generate a pre-stitched ghost image includes: Obtain the preset cable intermediate joint reference image, overlap the outline of the first pre-splicing part with the outline of the preset cable intermediate joint reference image, and determine the position of the gray value abrupt change between the first pre-splicing part and the preset cable intermediate joint reference image. Based on the location of the grayscale value abrupt change, the structural boundary line between the first pre-splicing part and the cable intermediate joint in the preset cable intermediate joint reference image is determined; Adjust the scaling ratio and position of the cable intermediate joint in the preset cable intermediate joint reference image until the first pre-splicing part overlaps with the outline and structural boundary line of the cable intermediate joint in the preset cable intermediate joint reference image. The outline and structural boundary line of the cable intermediate joint in the preset cable intermediate joint reference image, excluding the overlapping section, are used as a pre-stitched ghost image.

4. The cable intermediate joint defect identification method according to claim 1, characterized by, The step of overlapping the second pre-stitched portion with the pre-stitched virtual image and stitching it with the first pre-stitched portion to generate a stitched image of the target cable joint includes: Select any image from the remaining valid portions as the second pre-stitching portion; The outline of the second pre-stitched portion is overlapped with the outline of the pre-stitched phantom to determine the position of the gray value abrupt change in the second pre-stitched portion; Based on the locations of abrupt changes in grayscale values, the structural boundary line of the second pre-splicing portion is determined; Adjust the scaling ratio and position of the second pre-stitched portion until the outline and structural boundary line of the second pre-stitched portion match the pre-stitched phantom, generating a matching position; Select any image from the remaining valid portions as a new second pre-stitched portion, and proceed to the step of overlapping the outline of the second pre-stitched portion with the outline of the pre-stitched phantom to determine the position of the gray value abrupt change in the second pre-stitched portion. Adjust the scaling ratio of all the second pre-stitched portions and move them to the matching position of the pre-stitched phantom to generate the target second pre-stitched portion; The second pre-splicing portion of the target is spliced ​​together with the first pre-splicing portion to generate a spliced ​​image of the target cable intermediate joint.

5. The cable joint defect identification method according to claim 4, characterized in that, The step of splicing the second pre-segmented portion of the target with the first pre-segmented portion to generate a spliced ​​image of the target cable intermediate joint includes: The second pre-segmented portion of the target is spliced ​​with the first pre-segmented portion to generate an initial spliced ​​image of the cable intermediate joint; Determine whether there are overlapping areas in the initial spliced ​​image of the cable intermediate joint; If not, then the initial cable joint splicing image will be used as the target cable joint splicing image; If so, then obtain the center coordinates of each of the overlapping regions; Calculate the distance between the center coordinates and the center of the first pre-stitching portion or the second pre-stitching portion where the overlapping area is located; Select the first or second pre-segmented portion corresponding to the smallest center distance, remove the other pre-segmented portion corresponding to the overlapping area, and generate the target cable intermediate joint splicing image.

6. The cable intermediate joint defect identification method of claim 1, wherein, If the cable joint in the spliced ​​image of the target cable joint has a defect, the step of generating a judgment result further includes: Extract the peak and trough coordinates corresponding to the location coordinate sets of each mismatched part; Connect the peak coordinates and the trough coordinates to generate a closed range; Restore the grayscale values ​​of the pixels within the enclosed area to identify defect features within the enclosed area.

7. A cable intermediate joint defect recognition system characterized by, include: The initial image to be stitched module is used to respond to the received defect identification command and acquire multiple initial images to be stitched corresponding to the cable intermediate joint corresponding to the defect identification command; The effective portion module is used to filter all the initial images to be stitched, generate multiple updated images to be stitched, and identify the effective portion of the updated images to be stitched containing the cable intermediate joint. The target cable joint stitching image module is used to calculate the ratio of the effective portion containing the cable joint area to the invalid portion of the background area from all the effective portions. All ratios are compared, and the effective portion corresponding to the largest ratio is used as the first pre-stitching portion. The remaining effective portions are all used as the second pre-stitching portions. Based on a preset cable joint reference image, the first pre-stitching portion is expanded to generate a pre-stitching ghost image. The second pre-stitching portion is overlapped with the pre-stitching ghost image and stitched with the first pre-stitching portion to generate the target cable joint stitching image. The component coordinate set module is used to obtain the coordinate range of each component of the cable joint in the spliced ​​image of the target cable joint, and generate a component coordinate set for each component. This includes: obtaining the grayscale value of each pixel in the spliced ​​image of the target cable joint; traversing the peaks and troughs of all grayscale values ​​to determine the peak coordinates and trough coordinates of multiple grayscale values; setting a preset number of pixel grayscale values ​​at the locations of the peak and trough coordinates to a first preset value, and setting the grayscale values ​​of the remaining pixels to a second preset value, thereby generating a grayscale peak-trough image of the spliced ​​image of the target cable joint; based on the target... The grayscale peak-valley image of the target cable joint splicing image is obtained by identifying the grayscale peak-valley image of the preset cable joint reference image; each part of the cable joint in the grayscale peak-valley image of the preset cable joint reference image is identified; the grayscale peak-valley image of the preset cable joint reference image is matched with the grayscale peak-valley image of the target cable joint splicing image; based on the similarity of the cable joint parts in the grayscale peak-valley images, the coordinate range of each part of the cable joint in the target cable joint splicing image is determined, and a set of coordinates of the parts is generated. The judgment result module is used to match the coordinate set of each part of the cable joint in the target cable joint splicing image with the cable joint reference image based on the coordinate set of each part and the preset cable joint reference image. If there are mismatched peaks and troughs, the cable joint in the target cable joint splicing image has a defect. If all match, there is no defect. The judgment result is generated. The defect type module is used to identify the defect type based on the judgment result.

8. An electronic device, comprising: The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the cable joint defect identification method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Power transmission line safety distance measuring method

    CN112734840A

  • Cable intermediate joint construction defect detection method, system and device based on image recognition

    CN114445331A