Cable surface defect detection method based on binocular vision

By combining cable images and connectivity distortions from different viewing angles during cable surface defect detection, and matching depth information of cable segments, the problem of binocular cameras misidentifying stranded wire protrusions as defects is solved and the accuracy of detection results is improved. .

CN118552525BActive Publication Date: 2024-10-25西部电缆陕西有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411001384.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-10-25
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Depth information directly extracted based on binocular cameras can easily misjudge normal stranded wire protrusions as defect information, affecting the accuracy of cable surface defect detection results.

Method used

By acquiring cable images from different viewing angles, initial inspection is performed to determine the cable detection area to be selected. Combined with the connectivity distortion and shape influence, the cable images from different viewing angles are matched, the depth information of the cable segment is obtained, and the local area is determined through corner point detection. defect.

Benefits of technology

It improves the accuracy of cable surface defect detection, avoids misjudgment of normal twisted wire protrusions, and enhances the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552525B_ABST
    Figure CN118552525B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of defect detection technology, and specifically to a cable surface defect detection method based on binocular vision. The method performs initial detection on cable images of cable segments under different viewing angles to determine a cable detection area to be selected; determines the information influence state of the cable detection area to be selected in combination with the connectivity distortion between different cable detection areas to be selected; matches and compares points within the cable detection area to be selected, and determines the degree of deformation influence of different points in the cable detection area to be selected in combination with the information influence state of the cable detection area to be selected; matches cable images of the same cable segment under different viewing angles based on the degree of deformation influence to obtain the depth information of the cable segment; analyzes the depth information of the cable segment to determine the local defects of the cable segment. The present invention avoids the problem of easily misjudging normal stranded wire protrusions as defect information by correcting the depth information acquisition process, thereby improving the accuracy of the cable surface defect detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of defect detection, and in particular to a cable surface defect detection method based on binocular vision. Background Art

[0002] In the process of cable production and manufacturing, the outer sheath of the cable is the insulating layer that protects the wires and cables and the structural part that prevents environmental factors from corroding the wires and cables. The main function of the outer sheath of the cable is to improve the mechanical strength of the wires and cables, prevent chemical corrosion, moisture, water infiltration, and prevent the cable from burning. Therefore, the defect detection of the outer sheath on the surface of the cable is an important step in the quality control of cable production. The common cable manufacturing process uses an extruder to directly extrude and form a cable outer sheath made of polyvinyl chloride according to different requirements for the cable. However, the cable production and manufacturing process includes multiple production and manufacturing steps such as metal wire drawing, wire bundling, wire twisting, cabling, armoring, and outer sheath extrusion. The flatness of the outer sheath surface is often caused by the joint influence of multiple links. For example, the thickness of the armor and outer sheath will affect the diameter of the finished cable at different positions, resulting in differences in the diameter of the corresponding armor part and the outer sheath part.

[0003] At present, it is common to use binocular vision devices to extract the depth information of the outer sheath surface, which is used to determine the location information of defects such as scratches and impurity protrusions on the cable surface. However, sometimes some strands of wire protrusions are formed on the cable surface, which actually meets the production and manufacturing standards of the cable, that is, the mutual influence of errors in multiple production and manufacturing steps causes the surface flatness of the outer sheath to fluctuate. However, defect detection based on the depth information directly extracted by the binocular camera is prone to misjudge normal strand protrusions as defect information, affecting the accuracy of the cable surface defect detection results. Summary of the invention

[0004] In order to solve the technical problem that the normal stranded wire protrusions are easily misjudged as defect information when performing defect detection based on the depth information directly extracted by the binocular camera, which affects the accuracy of the cable surface defect detection results, the purpose of the present invention is to provide a cable surface defect detection method based on binocular vision, and the technical scheme adopted is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a cable surface defect detection method based on binocular vision, the method comprising:

[0006] Acquire cable images of the cable segment at different viewing angles; perform initial detection on the cable images to determine a cable detection area to be selected;

[0007] Combined with the connectivity distortion between the different cable detection areas to be selected, the information influence state of the cable detection area to be selected is determined; the points in the cable detection area to be selected are matched and compared, and combined with the information influence state of the cable detection area to be selected, the deformation influence degree of different points in the cable detection area to be selected is determined;

[0008] Based on the influence degree of the deformation, cable images of the same cable segment under different viewing angles are matched to obtain depth information of the cable segment; the depth information of the cable segment is analyzed to determine local defects of the cable segment;

[0009] The information influence state of the cable detection area to be selected is determined in combination with the connectivity distortion between different cable detection areas to be selected, including: determining the shape influence degree of the cable detection area to be selected in combination with the shape of the cable detection area to be selected; sorting the cable detection areas to be selected according to their positions in the cable image, and determining the row to which each cable detection area to be selected belongs; and comparing the shape influence degrees of the cable detection area to be selected with those of other cable detection areas to be selected in the row to which they belong, to obtain the information influence state of the cable detection area to be selected.

[0010] Further, the performing initial detection on the cable image to determine a cable detection area to be selected includes:

[0011] Edge detection and connected domain extraction are performed on the cable image to obtain multiple connected domains, and areas corresponding to the connected domains on the cable image are used as cable detection areas to be selected.

[0012] Furthermore, the determining the influence degree of the shape of the to-be-selected cable detection area in combination with the shape of the to-be-selected cable detection area includes:

[0013] The area of ​​the cable detection region to be selected is obtained, recorded as the first area; the distance between the cable detection region to be selected and the horizontal center line of the cable image is obtained, recorded as the first distance; and the normalized value of the product of the first area and the first distance is used as the shape influence degree of the cable detection region to be selected.

[0014] Furthermore, the step of comparing the shape influence of the cable detection region to be selected with other cable detection regions to be selected in the same row to obtain the information influence state of the cable detection region to be selected includes:

[0015] Obtaining the mean value of the shape influence degrees of other cable detection regions to be selected in the row to which the cable detection region to be selected belongs, and recording it as the first mean value;

[0016] The difference between the shape influence degree of the candidate cable detection region and the first mean is recorded as the first difference; and the negative correlation normalized value of the first difference is used as the information influence state of the candidate cable detection region.

[0017] Furthermore, matching and comparing the points in the cable detection area to be selected, and determining the deformation influence degree of different points in the cable detection area to be selected in combination with the information influence state of the cable detection area to be selected, includes:

[0018] Match and compare the points in the selected cable detection area to determine the matching difference between different points;

[0019] For the points in the cable detection area to be selected, the information influence state of each point is adjusted according to the matching difference of each point to determine the deformation influence degree of each point in the cable detection area to be selected; wherein the information influence state of the point is the information influence state of the cable detection area to which the point belongs.

[0020] Furthermore, matching and comparing points in the selected cable detection area to determine the matching difference between different points includes:

[0021] Obtain the average pixel value of the pixel points in the cable detection area to be selected;

[0022] For any point in the cable detection area to be selected, the difference between the pixel value of the point and the mean pixel value of the cable detection area to be selected is calculated as the pixel matching degree; the pixel matching degree is used as the weight value, the distance between the point and the horizontal center line of the cable image is weighted, and the normalized value of the weighted result value is used as the matching difference degree of the point.

[0023] Furthermore, for the points in the cable detection area to be selected, the information influence state of each point is adjusted according to the matching difference of each point to determine the deformation influence degree of each point in the cable detection area to be selected, including:

[0024] For the points in the selected cable detection area, the product of the matching difference degree of the point and the information influence state is taken as the deformation influence degree of the point.

[0025] Furthermore, matching cable images of the same cable segment at different viewing angles based on the deformation influence degree to obtain depth information of the cable segment includes:

[0026] Any point in the selected cable detection area of ​​the same cable segment under any viewing angle is taken as the target point;

[0027] Compare the differences in pixel values ​​and deformation influence between the target point and the points in the selected cable detection area of ​​the same cable segment under any other viewing angles, and determine the approximate matching degree between the target point and the points in the selected cable detection area of ​​the same cable segment under any other viewing angles; for any other viewing angles, the point with the largest approximate matching degree corresponding to the target point in the selected cable detection area is used as the matching point of the target point under any other viewing angles;

[0028] Based on the matching of the target point and the corresponding matching point, the cable images under different viewing angles are matched to obtain the depth information of the cable segment corresponding to the cable image.

[0029] Further, analyzing the depth information of the cable segment to determine the local defects of the cable segment includes:

[0030] Corner point detection is performed based on the depth information of the cable segment to determine the average depth distance between the current cable segment and the corner points in other cable segments that are closest to each other. When the average depth distance is greater than a preset defect threshold, it is determined that the current cable segment has a local defect. The two corner points with the smallest relative position distance are the corner points that are closest to each other. The relative position distance refers to the Euclidean distance between the coordinates of different corner points in the two cable segments.

[0031] In a second aspect, a cable surface defect detection system based on binocular vision is provided, the system comprising the following modules:

[0032] An initial module is used to obtain cable images of the cable segment under different viewing angles; perform initial detection on the cable images to determine a cable detection area to be selected;

[0033] A matching module, combining the connectivity distortion between different cable detection areas to be selected, determining the information influence state of the cable detection area to be selected; matching and comparing the points in the cable detection area to be selected, and combining the information influence state of the cable detection area to be selected, determining the deformation influence degree of different points in the cable detection area to be selected;

[0034] The detection module matches the cable images of the same cable segment under different viewing angles based on the influence degree of the deformation to obtain the depth information of the cable segment; analyzes the depth information of the cable segment to determine the local defects of the cable segment.

[0035] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, various possible embodiments of the first aspect are implemented.

[0036] In a fourth aspect, an embodiment of the present invention provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0037] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute various possible implementations of the first aspect.

[0038] The embodiments of the present invention have at least the following beneficial effects:

[0039] Since the internal structure of the cable outer sheath will present different shapes and textures on the surface, there are concave areas and convex areas in the collected cable image. Therefore, the present invention first performs initial detection on the cable images of the cable segments under different viewing angles to determine the cable detection area to be selected, so as to realize the division of possible abnormal areas in the cable image, so that the subsequent analysis is only for the analysis of possible abnormal areas; combined with the connectivity distortion between different cable detection areas to be selected, the points in the cable detection area to be selected are matched and compared to determine the degree of deformation influence of different points in the cable detection area to be selected. Since the surface of the cable outer sheath is affected by the distribution of the stranded wires and the shape of the cable, there are certain patterns, thereby presenting different uncertain areas. Therefore, the present invention determines the degree of deformation influence of different points in the cable detection area to be selected by analyzing the distortion caused by the circular shape of the cable and the matching between different points; based on the degree of deformation influence, the points in the cable images of the same cable segment under different viewing angles are matched to obtain the depth information of the cable segment. The depth information is combined with the analysis of the confidence change caused by the distortion, and the depth information obtained after the matching point pairs are corrected. Finally, the local defects of the cable segment are determined by the depth information of the cable segment. The present invention avoids the problem of misjudging normal stranded wire protrusions as defect information by correcting the depth information acquisition process, and improves the accuracy of cable surface defect detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A method flow chart of a cable surface defect detection method based on binocular vision provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a cable manufacturing process provided by an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of collecting a cable image corresponding to a cable segment by a single binocular camera provided by an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of a cable image corresponding to a cable segment under a single viewing angle provided by an embodiment of the present invention;

[0045] Figure 5 A schematic diagram of a cable detection area to be selected relative to a transverse center line in a cable image provided by an embodiment of the present invention;

[0046] Figure 6 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the specific implementation method, structure, characteristics and effects of the cable surface defect detection method based on binocular vision proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.

[0048] In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0049] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" refers to two or more than two.

[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0051] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0052] The embodiments of the present invention are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0053] The embodiment of the present invention provides a specific implementation method of a cable surface defect detection method based on binocular vision, which is suitable for cable defect detection scenarios. This scenario is for the production and manufacturing of cables. After the raw materials enter the factory, the metal materials are smelted and rolled; the metal primary processed materials are passed through one or several die holes of a wire drawing machine to reduce their cross-section, increase their length, and improve their strength; insulation is extruded to wrap the conductor with insulating materials to form an insulating layer; multi-core cables are twisted or cabled, and if necessary, there is a shielding layer production step, such as metal tape wrapping or braiding; then the sheath is extruded; then the insulation and sheath are cooled and solidified to stabilize; the cable is inspected for defect quality using the embodiment of the present invention to ensure that the cable performance meets the standards; and finally, the qualified cables are packaged and stored. Please refer to Figure 2 , Figure 2 Schematic diagram of the cable manufacturing process.

[0054] Accordingly, the embodiment of the present invention is directed to performing quality defect detection on the cable after the outer sheath is cooled and solidified by circulating water during the finished product inspection stage.

[0055] The specific scheme of the cable surface defect detection method based on binocular vision provided by the present invention is described in detail below with reference to the accompanying drawings.

[0056] See also Figure 1 , which shows a flowchart of a method for detecting cable surface defects based on binocular vision according to an embodiment of the present invention, the method comprising the following steps:

[0057] Step S100, acquiring cable images of the cable segment at different viewing angles; performing initial detection on the cable images to determine a cable detection area to be selected.

[0058] In the embodiment of the present invention, the inspection is performed on the cable after the outer sheath is cooled and solidified by circulating water during the finished product inspection stage. It should be noted that since the cable may be long, when collecting cable images, only one cable segment is collected at a time, and the cable segments collected continuously by the camera do not overlap.

[0059] As an embodiment of the present invention, a binocular camera can be used to collect cable images at different viewing angles. Figure 3 , Figure 3 Schematic diagram of collecting cable images corresponding to cable segments using a single binocular camera.

[0060] As another embodiment of the present invention, the camera may be fixed on a slidable sliding device, and the position of the camera may be changed by the sliding device, thereby obtaining cable images at different viewing angles.

[0061] As an optional embodiment of the present invention, four binocular cameras can be set in a ring to collect images of the cable segments in the field of view at the same time, and obtain cable images corresponding to the cable segments under different viewing angles. Each binocular camera is located in four directions of the three-dimensional coordinate axis with the center point of the cable segment as the origin, wherein the angle formed by the line connecting any two adjacent binocular cameras and the center point of the cable segment is 90 degrees, and the corresponding binocular cameras are at the same distance from the cable, and the parameters of the binocular cameras, such as focal length, viewing distance, etc. are the same and known, and the light source is annular light, which is used in conjunction with the binocular cameras. The left and right eye images obtained by the four binocular cameras can be recorded as P11, P12, P21, P22, P31, P32, P41, and P42, respectively. Then, the images taken by any binocular camera and the adjacent two binocular cameras overlap by one-quarter of the cable surface, but because the cable is cylindrical, the proportion of the cable surface part on the image is less than one-quarter.

[0062] See also Figure 4 , Figure 4 Schematic diagram of a cable image corresponding to a cable segment under a single viewing angle.

[0063] Correspondingly, in order to ensure that images at all positions of the cable can be captured, that is, there is no overlap of the cable surface area between two consecutive captures by the same binocular camera, it is necessary to control the discharge speed of the cable during the extrusion and cooling of the outer sheath to be consistent with the acquisition frequency of the binocular camera. The calculation formula for the acquisition frequency can be expressed as: , where f is the sampling frequency of a single binocular camera, c is the maximum length of the effective field of view of the binocular camera on the cable, which is understandably the length of the cable segment; v is the discharge speed of the cable.

[0064] At each sampling moment, the cable segment is captured by a camera, thereby obtaining cable images of the cable segment at different viewing angles at the current moment.

[0065] Since the internal structure of the cable outer sheath will present different shapes and textures on the surface, there are sunken areas and convex areas in the collected cable image. The detected sunken areas and convex areas may be defective parts in the cable segment, or they may be normal stranded wire convexities. Therefore, this embodiment first performs a preliminary detection on the collected cable image to achieve the division of possible abnormal areas in the cable image, so that the subsequent analysis is only for the possible abnormal areas, avoiding the problem of still needing to analyze the entire cable image, which has a large amount of calculation.

[0066] Therefore, further, an initial detection is performed on the cable image to determine the cable detection area to be selected.

[0067] Edge detection and connected domain extraction are performed on the cable image to obtain multiple connected domains, and areas corresponding to the connected domains on the cable image are used as cable detection areas to be selected.

[0068] More specifically: the cable image can be edge detected by using the Canny edge detection algorithm to obtain an edge detection image, and then all edge line segments on the edge detection image are connected to obtain multiple connected domains, and the area corresponding to the connected domain on the cable image is used as the cable detection area to be selected. Among them, the edge line of the connected domain and the internal area of ​​the connected domain both belong to the cable detection area to be selected.

[0069] Step S200, determining the information influence state of the cable detection area to be selected in combination with the connectivity distortion between different cable detection areas to be selected; matching and comparing the points in the cable detection area to be selected, and determining the deformation influence degree of different points in the cable detection area to be selected in combination with the information influence state of the cable detection area to be selected.

[0070] Since the binocular camera relies on the grayscale information of the image for cable surface defect detection, the surface of the cable outer sheath will be affected by the distribution of the strands and the shape of the cable. That is, although the twisting method of the strands inside the cable outer sheath will form a certain pattern, due to the thickness of the outer sheath and production tolerances, the regular pattern is displayed to different degrees on the shape of the outer sheath surface, that is, the patterned protrusions and depressions on the surface of the cable outer sheath appear as amorphous areas, making it difficult to extract the defective conditions of the cable surface on the image obtained by the binocular camera. Therefore, the image matching process of the binocular camera should refer to the regional division features of the surface to achieve accurate extraction of cable surface defects.

[0071] When collecting cable images, the camera's sight focus is located at the center of the image. A more detailed description is the horizontal straight line position where the image center is located. The closer the cable surface is to the two sides of the cable image, the greater the distortion of the surface information caused by the cylindrical shape of the surface, and the different shapes of the regional positions formed by the lines will also affect the accuracy of the surface shape information reflected at the corresponding position. That is, the closer the cable is to the two sides of the cable image, the greater the probability of distortion, and the lower the accuracy of the cable surface shape information. It should be noted that the horizontal straight line where the center of the cable image is located can be recorded as the horizontal center line of the cable image.

[0072] In step S100, a preliminary detection is performed on the possible abnormal areas in the cable image to obtain the corresponding candidate cable detection areas. For the shape of the cable outer sheath surface represented by each candidate cable detection area, whether it is a depression or protrusion formed by the internal structure, or the location area where the defect actually exists, the closer it is to the edge position, the more detailed analysis is required.

[0073] Therefore, this embodiment determines the information influence state of the cable detection area to be selected in combination with the connectivity distortion between different cable detection areas to be selected. It can be understood that the information influence state is not only based on the morphological analysis of the cable detection area to be selected, but also based on the analysis of the distortion possibility of the cable detection area to be selected, and the distortion possibility is analyzed in combination with the distance between the cable detection area to be selected and the horizontal center point of the cable image.

[0074] First, the positional relationship of the candidate cable detection area is analyzed. The area of ​​the cable surface represented by the candidate cable detection area is larger in the longitudinal direction of the image, indicating that the grayscale information change of the candidate cable detection area extends from the more reliable line of sight center to the position that is easily affected by distortion. For the pixel points closer to the edge of the cable image, the shape area of ​​the cable surface corresponding to the candidate cable detection area with a larger span. Relatively speaking, when the information of the cable surface reflected is relatively less affected by distortion, the corresponding information matching for the binocular camera image and the subsequent defect location positioning will be better.

[0075] See also Figure 5 , Figure 5 It is a schematic diagram of the cable detection area to be selected in the cable image relative to the horizontal center line.

[0076] After analyzing the distortion of the cable detection area to be selected, further matching analysis is performed on each point in the cable detection area to be selected, and the matching is specifically with the center of the viewing angle, that is, each point in the cable detection area to be selected is matched with the point closest to the horizontal center line of the cable image, and the distance between the matched points is weighted by the distortion. The distance matching is considered here because the closer the point in the cable detection area to the horizontal center point, the smaller the probability of deformation at the location of the point; the farther the point in the cable detection area to be selected is from the horizontal center point, the greater the probability of deformation at the location of the point.

[0077] In some possible implementations, the degree of deformation influence of different points in the selected cable detection area is determined by analyzing the distortion of the selected cable detection area, that is, the above step S200 can be implemented by the following steps S210 to S220 (not shown in the figure):

[0078] Step S210: determining the information influence state of the cable detection area to be selected in combination with the connectivity distortion conditions between the different cable detection areas to be selected.

[0079] First, the influence degree of the shape of the cable detection area to be selected is determined in combination with the shape of the cable detection area to be selected, specifically:

[0080] The area of ​​the cable detection region to be selected and the distance between the cable detection region to be selected and the transverse center line of the cable image are obtained, wherein the distance between the cable detection region to be selected and the transverse center line of the cable image is the shortest distance between the cable detection region to be selected and the transverse center line of the cable image.

[0081] The normalized value of the product of the area of ​​the cable detection region to be selected and the distance between the cable detection region to be selected and the horizontal center line of the cable image is used as the shape influence degree of the cable detection region to be selected. That is, the area of ​​the cable detection region to be selected is obtained, recorded as the first area; the distance between the cable detection region to be selected and the horizontal center line of the cable image is obtained, recorded as the first distance; the normalized value of the product of the first area and the first distance is used as the shape influence degree of the cable detection region to be selected. As an optional embodiment of the present invention, the product of the area of ​​the cable detection region to be selected and the distance between the cable detection region to be selected and the horizontal center line of the cable image can be normalized by a maximum and minimum value normalization algorithm. In other embodiments, other normalization algorithms can also be selected for normalization operations, such as a linear normalization algorithm.

[0082] As an optional embodiment of the present invention, the calculation formula of the shape influence degree is: ;in, is the degree of shape influence; It is the maximum and minimum value normalization algorithm; is the area of ​​the cable detection area to be selected; is the distance between the cable detection area to be selected and the horizontal center line of the cable image; for The normalized value of .

[0083] The degree of shape influence reflects the possibility of being affected by the edge area distortion caused by the cylindrical shape of the cable when analyzing the shape area of ​​the cable surface corresponding to the cable detection area to be selected from the perspective of shape. The greater the degree of shape influence, the greater the probability that the corresponding cable detection area to be selected will be distorted.

[0084] Secondly, the cable detection regions to be selected are sorted according to their positions in the cable image, and the row to which each cable detection region to be selected belongs is determined. Specifically:

[0085] Since the area on the cable surface is affected by the distortion, in addition to the position and shape of the connected domain, it is also related to the local range where the cable detection area to be selected is located. In the vertical direction, each cable detection area to be selected is adjacent to multiple cable detection areas to be selected, and each cable detection area to be selected has its own degree of shape influence. In the embodiment of the present invention, the cable detection areas to be selected are sorted according to the position of the center point of the cable detection area to be selected, and the cable detection areas to be selected that belong to the same row of the center point are first summarized into the same row, and each cable detection area to be selected has its own corresponding row.

[0086] Finally, the shape influence degree of the cable detection region to be selected is compared with other cable detection regions to be selected in the same row, and the information influence state of the cable detection region to be selected is obtained.

[0087] The difference in the degree of shape influence of adjacent cable detection regions to be selected can be expressed as the difference in the degree of shape influence of the cable detection region to be selected and the cable detection regions to which it belongs. The greater the difference in the degree of shape influence of the cable detection region to be selected and the cable detection regions to which it belongs, the smaller the value of the information influence status of the distortion influence on the region. Because if the probability of distortion of a cable detection region to be selected is greater, the probability of distortion of the corresponding longitudinally adjacent cable detection regions to be selected is also greater, so relatively speaking, the difference in the degree of shape influence between the longitudinally adjacent cable detection regions to be selected is smaller.

[0088] Therefore, the negative correlation normalized value of the difference between the shape influence degree of the cable detection area to be selected and the mean value of the shape influence degrees of other cable detection areas to be selected in the row to which it belongs is taken as the information influence state of the cable detection area to be selected. That is, the mean value of the shape influence degrees of other cable detection areas to be selected in the row to which the cable detection area to be selected belongs is obtained, which is recorded as the first mean value; the difference between the shape influence degree of the cable detection area to be selected and the first mean value is recorded as the first difference; and the negative correlation normalized value of the first difference is taken as the information influence state of the cable detection area to be selected. The information influence state combines the longitudinal characteristics of the cable detection area to be selected to reflect the distortion probability of the cable detection area to be selected. As an embodiment of the present invention, negative correlation normalization can be achieved by using an exponential function with a natural constant as the base and the inverse of the difference between the shape influence degree of the cable detection area to be selected and the mean value of the shape influence degree of other cable detection areas to be selected in the row to which it belongs as the exponent. The normalized value of the inverse of the difference between the shape influence degree of the candidate cable detection region and the average value of the shape influence degrees of other candidate cable detection regions in the corresponding row may also be directly used as the information influence state of the candidate cable detection region.

[0089] As an embodiment of the present invention, the calculation formula of the information impact state is: ;in, is the information impact state of the i-th cable detection area to be selected; is an exponential function with a natural constant as base; is the shape influence degree of the i-th selected cable detection area; is the average value of the shape influence of other candidate cable detection areas in the row to which the i-th candidate cable detection area belongs; is the absolute value symbol.

[0090] Step S220 , matching and comparing the points in the cable detection area to be selected, and determining the deformation influence degree of different points in the cable detection area to be selected in combination with the information influence state of the cable detection area to be selected.

[0091] Since binocular stereo vision technology simulates the principle of binocular imaging, two parallel cameras in the binocular camera are used to shoot the same section of the cable surface, and various matching algorithms are used to obtain the corresponding image points. Since the image plane shot by the camera and the objects in the scene constitute a series of geometric triangles, the triangulation method is used to calculate the binocular parallax of the spatial point in the actual scene in the two images to obtain the three-dimensional spatial coordinate value of the point. The matching algorithm mainly relies on the positional relationship and grayscale information of the pixel points in the image. The matching results for the pixel points affected by the distortion on the edge of the cable are not reliable enough. The information influence status of the cable surface area obtained in the previous step can be used as a reference for adjustment of the matching process.

[0092] First, the points in the cable detection area to be selected are matched and compared to determine the matching difference of different points. More specifically, the matching difference of each point is obtained from the grayscale information difference and position relationship of different points in the cable detection area to be selected.

[0093] The greater the difference between the point in the cable detection area to be selected and the grayscale mean in the cable detection area to be selected, and the farther the distance from the center line of the image, the more likely it is that the pixel point is greatly affected by the distortion, especially when there is a corresponding convex shape or defect position, more defect information is stacked in a smaller viewing angle at the edge of the cable, which will appear as a larger difference. It should be noted that in the embodiment of the present invention, the pixel value of the point in the image is the grayscale value of the point, and the pixel mean is also the grayscale mean.

[0094] For any point in the cable detection area to be selected, the difference between the pixel value of the point and the pixel mean of the cable detection area to be selected is calculated as the pixel matching degree; the distance between the point and the horizontal center line of the cable image is weighted by the pixel matching degree, and the normalized value of the weighted result value is used as the matching difference degree of the point.

[0095] That is to obtain the mean pixel value of the pixel points in the selected cable detection area; for any point in the selected cable detection area, the difference between the pixel value of the point and the mean pixel value of the selected cable detection area is calculated as the pixel matching degree; the pixel matching degree is used as the weight value, the distance between the point and the horizontal center line of the cable image is weighted, and the normalized value of the weighted result value is used as the matching difference degree of the point.

[0096] The distance from the point to the transverse center line of the cable image can be obtained by drawing a perpendicular line from the point to the transverse center line.

[0097] As an optional embodiment of the present invention, taking the jth point in the i-th cable detection area to be selected as an example, the calculation formula for the matching difference of the jth point in the i-th cable detection area to be selected is: ;in, is the matching difference of the jth point in the i-th selected cable detection area; is a linear normalization function; is the pixel value of the jth point in the i-th cable detection area to be selected; is the pixel mean of the i-th cable detection area to be selected; is the pixel matching degree of the jth point in the i-th cable detection area to be selected; is the distance between the jth point in the i-th selected cable detection area and the transverse center line of the cable image.

[0098] The matching difference can reflect the difference between a point and a horizontal center line. The greater the matching difference, the greater the difference between the point and the horizontal center line, and the greater the distance.

[0099] Furthermore, for the points in the cable detection area to be selected, the information influence state of each point is adjusted by the matching difference of each point to determine the deformation influence degree of each point in the cable detection area to be selected. The information influence state of the point is the information influence state of the cable detection area to which the point belongs.

[0100] As an embodiment of the present invention, for a point in the selected cable detection area, the product of the point matching difference and the information influence state can be used as the deformation influence degree of the point. The larger the value of the deformation influence degree, the less credible the corresponding matching result.

[0101] Step S300, based on the deformation influence degree, matching the cable images of the same cable segment under different viewing angles to obtain the depth information of the cable segment; analyzing the depth information of the cable segment to determine the local defects of the cable segment.

[0102] According to the deformation influence degree of all points obtained, the similarity of the pixel points in the binocular parallax matching process is adjusted, that is, the more similar the deformation influence degree of two pixel points in the left image and the right image is, and the more similar the grayscale values ​​of the two points are, the higher the similarity of the two points is. Therefore, based on the deformation influence degree, the points in the cable images of the same cable segment under different viewing angles are matched to obtain the depth information of the cable segment. This depth information is combined with the analysis of the confidence change caused by distortion, and the depth information is obtained after the matching point pairs are corrected. Finally, the local defects of the cable segment are determined through the depth information of the cable segment.

[0103] Any point in the selected cable detection area of ​​the same cable segment under any viewing angle is taken as the target point;

[0104] The differences in pixel values ​​and deformation influence between the target point and the points in the selected cable detection area of ​​the same cable segment at any other viewing angle are compared, and the point in the selected cable detection area of ​​the same cable segment at any other viewing angle that is most similar to the target point is determined as the matching point of the target point at any other viewing angle.

[0105] Among them, the difference in pixel values ​​and the difference in deformation influence between the target point and the points in the selected cable detection area of ​​the same cable segment at any other viewing angle are compared to determine the approximate matching degree between the target point and the points in the selected cable detection area of ​​the same cable segment at any other viewing angle. Then, based on the approximate matching degree, the matching point of the target point at any other viewing angle is determined. It should be noted that there is a matching point of the target point in the selected cable detection area at each viewing angle.

[0106] As an embodiment of the present invention, taking the ath point as the target point and the bth point in the selected cable detection area of ​​the same cable segment under any other viewing angle as an example, the calculation formula of the approximate matching degree is: ; is the approximate matching degree between the a-th point and the b-th point; is an exponential function with a natural constant as base; is the pixel value of the ath point; is the pixel value of the b-th point; is the information impact state of the a-th point; is the information influence state of the b-th point. The information influence state of the a-th point is also the information influence state of the cable detection area to which the a-th point belongs.

[0107] For any other viewing angles, the point with the maximum approximate matching degree corresponding to the target point in the selected cable detection area is used as the matching point of the target point at any other viewing angles.

[0108] Based on the matching of the target point and the corresponding matching point, the cable images under different viewing angles are matched to obtain the depth information of the cable segment corresponding to the cable image. As an optional embodiment of the present invention, it can also be understood as obtaining the matching points in the left eye image and the right eye image, and after obtaining the matching points, matching the left and right eye images to obtain the corresponding depth information. The embodiment of the present invention realizes the matching correction of the matching points in the binocular images.

[0109] Correspondingly process the left and right images of the binocular cameras at all single positions, and obtain the depth information of the cable segment in the cable image through the cable images at different viewing angles after matching. For the depth information of the binocular cameras at four positions at the same sampling time, the existing three-dimensional matching algorithm is used for matching and splicing processing. At this time, the depth information contains all the surface information of this cable segment within the effective field of view of the binocular camera.

[0110] Finally, the local defects of the cable segment are determined by analyzing the depth information of the cable segment.

[0111] According to the depth information of the cable segment, it is actually the distribution analysis of the three-dimensional coordinates of the points on the surface of the cable segment, which is mainly affected by the texture formed by the internal structure of the cable surface and the distribution changes caused by the existing defect types. Since the texture of the cable surface is not strictly periodic, corner point detection is used here to obtain the main structural information of the cable segment surface. At this time, the main structural information will effectively ignore the fluctuation error of the texture of the cable surface, and the difference in the main structural information of the cable segment surface is more affected by defects.

[0112] Thus, the corner point detection result of each cable segment surface is obtained. Here, the number of corner points can be controlled to the average number of corner points of all cable segments, and the defect degree of the cable surface can be expressed as the average value of the position difference of the matched corner points. If the defect degree of the cable segment is greater than the preset defect threshold, it is considered that there is a defect on the surface of the cable segment.

[0113] It can be understood that the corner point detection is performed based on the depth information of the cable segment, and the mean depth distance between the corner points in the current cable segment and the closest relative positions in other cable segments is determined. When the mean depth distance is greater than the preset defect threshold, it is judged that the current cable segment has local defects. The mean depth distance is also the defect degree. In the embodiment of the present invention, the preset defect threshold value is 0.93, and in other embodiments, the implementer can adjust the value according to actual conditions. It should be noted that the relative position here refers to the Euclidean distance between the coordinates (x1, y1) of a point b1 in one image and the coordinates (x2, y2) of a point b2 in another image, as the distance between the relative positions of point b1 and point b2. The two corner points with the smallest distance between the corresponding relative positions are the corner points with the closest relative positions.

[0114] As a preferred embodiment of the present invention, based on the obtained surface defect condition judgment result of the cable segment, the cable surface defect position is selected for further repair, or the cable segment is re-extruded with an outer sheath, and the corresponding defect information and the various parameters obtained in the above steps are recorded. A defect grading correspondence table can be selected to construct a statistical grading of the areas where the parameter values ​​are located and the specific types of defects, so as to facilitate the subsequent improvement of defect handling efficiency.

[0115] The embodiment of the present invention provides a cable surface defect detection system based on binocular vision, the system comprising:

[0116] An initial module is used to obtain cable images of the cable segment under different viewing angles; perform initial detection on the cable images to determine a cable detection area to be selected;

[0117] A matching module, combining the connectivity distortion between different cable detection areas to be selected, determining the information influence state of the cable detection area to be selected; matching and comparing the points in the cable detection area to be selected, and combining the information influence state of the cable detection area to be selected, determining the deformation influence degree of different points in the cable detection area to be selected;

[0118] The detection module matches the cable images of the same cable segment under different viewing angles based on the influence degree of the deformation to obtain the depth information of the cable segment; analyzes the depth information of the cable segment to determine the local defects of the cable segment.

[0119] Optionally, the transmission medium may be a wired link, such as but not limited to coaxial cable, optical fiber, and digital subscriber line, or a wireless link, such as but not limited to Wireless Fidelity (WIFI), Bluetooth, and mobile device network.

[0120] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the shopping guide device provided in the above embodiment and the image extension method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0121] Figure 6 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 6As shown, the computer device 600 includes: a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and running on the processor 620, wherein when the processor 620 executes the computer program 630, the computer device can execute any of the above-mentioned cable surface defect detection methods based on binocular vision.

[0122] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute the cable surface defect detection method based on binocular vision provided by an embodiment of the present invention.

[0123] The embodiment of the present invention can divide the functional modules of the device according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0124] In the case of dividing each module according to each function, the device may also include a signal uploading module, a determining module, an adjusting module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0125] It should be understood that the device provided in the embodiment of the present invention is used to execute the above-mentioned cable surface defect detection method based on binocular vision, and thus can achieve the same effect as the above-mentioned implementation method.

[0126] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the actions of the device. The storage module may be used to support the device to execute mutual program codes, etc. The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0127] In addition, the device provided in the embodiment of the present invention can specifically be a chip, a component or a module. The chip may include a connected processor and a memory; wherein the memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the cable surface defect detection method based on binocular vision provided in the above embodiment.

[0128] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer program code. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement the cable surface defect detection method based on binocular vision provided by the above embodiment.

[0129] An embodiment of the present invention further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the cable surface defect detection method based on binocular vision provided in the above embodiment.

[0130] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present invention are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Through the description of the above implementation methods, technicians in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways.

[0131] The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0132] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0133] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0134] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0135] The above contents are only specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention.

Claims

1. A cable surface defect detection method based on binocular vision, characterized in that: The method comprises the following steps: Acquire cable images of the cable segment at different viewing angles; perform initial detection on the cable images to determine a cable detection area to be selected; Combined with the connectivity distortion between the different cable detection areas to be selected, the information influence state of the cable detection area to be selected is determined; the points in the cable detection area to be selected are matched and compared, and combined with the information influence state of the cable detection area to be selected, the deformation influence degree of different points in the cable detection area to be selected is determined; Based on the influence degree of the deformation, cable images of the same cable segment under different viewing angles are matched to obtain depth information of the cable segment; the depth information of the cable segment is analyzed to determine local defects of the cable segment; Among them, combining the connectivity distortion between different cable detection areas to be selected, determining the information influence state of the cable detection area to be selected includes: combining the shape of the cable detection area to be selected, determining the shape influence degree of the cable detection area to be selected; sorting the cable detection areas to be selected according to the position of the cable detection areas to be selected in the cable image, and determining the row to which each cable detection area to be selected belongs; comparing the shape influence degree of the cable detection area to be selected with other cable detection areas to be selected in the row to which they belong, and obtaining the information influence state of the cable detection area to be selected; The determining of the influence degree of the shape of the cable detection area to be selected in combination with the shape of the cable detection area to be selected includes: The area of ​​the cable detection region to be selected is obtained, recorded as the first area; the distance between the cable detection region to be selected and the horizontal center line of the cable image is obtained, recorded as the first distance; the normalized value of the product of the first area and the first distance is used as the shape influence degree of the cable detection region to be selected; The step of comparing the shape influence of the cable detection region to be selected with other cable detection regions to be selected in the same row to obtain the information influence state of the cable detection region to be selected includes: Obtaining the mean value of the shape influence degrees of other cable detection regions to be selected in the row to which the cable detection region to be selected belongs, and recording it as the first mean value; The difference between the shape influence degree of the cable detection area to be selected and the first mean is recorded as the first difference; the negative correlation normalized value of the first difference is used as the information influence state of the cable detection area to be selected; The matching and comparison of points in the cable detection area to be selected and the determination of the deformation influence degree of different points in the cable detection area to be selected in combination with the information influence state of the cable detection area to be selected include: Match and compare the points in the selected cable detection area to determine the matching difference between different points; For the points in the cable detection area to be selected, the information influence state of each point is adjusted according to the matching difference of each point to determine the deformation influence degree of each point in the cable detection area to be selected; wherein the information influence state of the point is the information influence state of the cable detection area to which the point belongs; The matching and comparison of points in the selected cable detection area to determine the matching difference of different points includes: Obtain the average pixel value of the pixel points in the cable detection area to be selected; For any point in the cable detection area to be selected, the difference between the pixel value of the point and the mean pixel value of the cable detection area to be selected is calculated as the pixel matching degree; The pixel matching degree is used as a weight value, the distance between the point and the horizontal center line of the cable image is weighted, and the normalized value of the weighted result value is used as the matching difference degree of the point; Among them, for the points in the cable detection area to be selected, adjusting the information influence state of each point through the matching difference of each point, and determining the deformation influence degree of each point in the cable detection area to be selected, includes: For the points in the selected cable detection area, the product of the matching difference of the point and the information influence state is taken as the deformation influence degree of the point; The step of matching cable images of the same cable segment at different viewing angles based on the deformation influence to obtain depth information of the cable segment includes: Any point in the selected cable detection area of ​​the same cable segment under any viewing angle is taken as the target point; Compare the differences in pixel values ​​and deformation influence between the target point and the points in the selected cable detection area of ​​the same cable segment under any other viewing angles, and determine the approximate matching degree between the target point and the points in the selected cable detection area of ​​the same cable segment under any other viewing angles; for any other viewing angles, the point with the largest approximate matching degree corresponding to the target point in the selected cable detection area is used as the matching point of the target point under any other viewing angles; Based on the matching of the target point and the corresponding matching point, the cable images under different viewing angles are matched to obtain the depth information of the cable segment corresponding to the cable image; The analyzing the depth information of the cable segment to determine the local defects of the cable segment includes: Corner point detection is performed based on the depth information of the cable segment to determine the average depth distance between the current cable segment and the corner points in other cable segments that are closest to each other. When the average depth distance is greater than a preset defect threshold, it is determined that the current cable segment has a local defect; wherein the two corner points with the smallest relative position distance are the corner points that are closest to each other; the relative position distance refers to the Euclidean distance between the coordinates of different corner points in two cable segments; The calculation formula for approximate matching degree is: ; is the approximate matching degree between the a-th point and the b-th point; is an exponential function with a natural constant as base; is the pixel value of the ath point; is the pixel value of the b-th point; is the information impact state of the a-th point; is the information impact state of the b-th point.

2. The cable surface defect detection method based on binocular vision according to claim 1 is characterized in that: The performing initial detection on the cable image to determine a cable detection area to be selected includes: Edge detection and connected domain extraction are performed on the cable image to obtain multiple connected domains, and areas corresponding to the connected domains on the cable image are used as cable detection areas to be selected.