A method and system for detecting the cross-sectional area of a building's power supply and distribution cable core
By obtaining the cross-sectional image of the cable core, extracting and segmenting the contour, combining deformation characteristics and distance characteristics, and using machine learning models, the problem of fuzzy impact detection of conductor boundary in the existing technology is solved, and efficient and accurate cable core quality assessment is achieved.
Patent Information
- Application Number
- CN202510652498.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The existing building power supply and distribution cable core detection methods are complex and costly, and the detection results are easily affected by the cable image quality, and the blurred conductor boundaries affect the computer vision quality inspection results.
By obtaining the cross-sectional image of the cable core, extracting the cable core area, performing edge detection and connection domain analysis, identifying the reference conductor, using sharp points to segment the external and internal contours, combining deformation characteristics and distance characteristics, inputting the machine learning model to obtain the inferred contours of the conductor, and performing quality assessment.
Accurately identify the position and number of conductors, avoid blurred boundary interference, improve detection accuracy, simplify operation processes, and reduce costs.
Smart Images

Figure CN120182257B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis, and particularly to a method and system for detecting the cross-section of a building power supply and distribution cable core. Background Art
[0002] In the process of urban power transmission, power cables are necessary power supply and distribution equipment. During the construction of modern buildings, in order to ensure the overall aesthetics of the building, underground cables or in-building pipeline cables are mostly used to replace urban overhead lines and in-building exterior wall cables. Cables are buried underground or in cable tunnels for a long time, and are affected by high-load currents and soil humidity. Once a cable fails, the stability of the entire building power distribution system will be seriously affected, greatly disturbing the normal working and operating environment inside the building.
[0003] Under the conditions of the operation of high-power electrical equipment inside buildings and the irregular use of electricity by users, the quality requirements for building power supply and distribution cables are further improved. Existing building power supply and distribution cable cores can be mainly classified into the following types according to the detection principle: X-ray type, ultrasonic type, photo-electromagnetic type, eddy current type, and microwave type. For the current detection of building power supply and distribution cable cores, although the cable core conditions can be obtained, there are generally problems of complex operation and high cost. At the same time, during the detection of building power supply and distribution cables using an industrial camera by a photo-electromagnetic type device, its detection results are easily affected by the quality of the cable image. Summary of the Invention
[0004] In order to solve the technical problem that the conductor boundary in the cable core is blurred, affecting the quality inspection results of computer vision, the purpose of the present invention is to provide a method and system for detecting the cross-section of a building power supply and distribution cable core, and the specific technical solutions adopted are as follows:
[0005] A method for detecting the cross-section of a building power supply and distribution cable core, the method comprising:
[0006] Obtaining a cross-sectional image of the cable core; extracting the cable core region in the cross-sectional image of the cable core; performing edge detection on each cable core region to obtain a connected domain; analyzing the similarity features between each connected domain and a preset conductor cross-section to obtain a reference conductor;
[0007] Taking the sharp points on the edge line of the cable core region as segmentation points, dividing the edge line of the cable core region boundary to obtain an external contour, and dividing the other edge lines to obtain an internal contour; obtaining the deformation degree of each external contour according to the morphological similarity between the external contours; obtaining the deformation degree of each internal contour according to the morphological similarity between the internal contours;
[0008] Match the inner contour with the outer contour according to the distribution characteristics of the outer contour and the inner contour and the relative relationship of the deformation degree; obtain the stress degree of the matched inner contour by combining the difference in the deformation degree between the matched outer contour and the inner contour, the distance characteristics between the outer contour and the inner contour, and the deformation degree of the outer contour.
[0009] Input the contour of the reference conductor, the deformation degree and the stress direction of the outer contour, and the stress degree and the stress direction of the matched inner contour into a pre-trained machine learning model to obtain the speculated contour of the outermost conductor; regard the image of the outermost conductor as the background layer, and iteratively obtain the speculated contours of all conductors.
[0010] Analyze the compliance of the conductors in terms of quantity and shape according to the speculated contours of all conductors, and evaluate the quality of the cable.
[0011] Further, the method for obtaining the reference conductor includes:
[0012] Based on coordinate system conversion, convert the image area of each connected domain into the actual area; obtain the roundness of each connected domain as the shape similarity parameter; obtain the actual area of the preset conductor cross-section as the reference area.
[0013] Take the reciprocal of the sum of the absolute value of the difference between the actual area of each connected domain and the reference area and a preset non-zero positive parameter as the area similarity parameter of each connected domain; take the product of the area similarity parameter and the shape similarity parameter of each connected domain as the reference possibility.
[0014] Take the connected domain with the largest reference possibility as the reference conductor.
[0015] Further, the method for obtaining the deformation degree of the outer contour includes:
[0016] Obtain the average curvature and the curvature range of each point on each outer contour.
[0017] Take the reciprocal of the sum of the product of the absolute value of the difference between the average curvatures of any two outer contours and the absolute value of the difference between the curvature ranges and a preset non-zero positive parameter as the first similarity between the corresponding two outer contours.
[0018] Group the outer contours with the first similarity greater than or equal to a preset first threshold into the same group; normalize the standard deviation of the average curvatures of all outer contours in the same group as the deformation degree of each outer contour in the corresponding group.
[0019] Further, the method for obtaining the deformation degree of the inner contour includes:
[0020] Obtain the average curvature of each point on each inner contour; after normalizing the standard deviation of the average curvature of all the inner contours, use it as the deformation degree of each inner contour.
[0021] Further, the method for matching the inner contour with the outer contour includes:
[0022] Obtain the image radius of the preset conductor cross-section; based on the least squares method and the image radius, obtain the fitted circle of each outer contour; select any one of the outer contours as the target outer contour; within the fitted circle of the target outer contour, match the inner contour that is closest to the target outer contour and whose deformation degree is less than that of the target outer contour with the target outer contour.
[0023] Further, the method for obtaining the stress level of the matched inner contour includes:
[0024] Use the deformation degree of the outer contour as the stress level of the outer contour;
[0025] According to the shortest distance between the matched outer contour and the inner contour, and the absolute value of the difference in the corresponding deformation degrees, obtain the deformation attenuation coefficient per unit distance;
[0026] Take the product of the image diameter of the preset conductor cross-section and the deformation attenuation coefficient as the stress attenuation degree; take the difference between the stress level of the matched outer contour and the stress attenuation degree as the stress level of the corresponding matched inner contour; the stress level of the matched inner contour is non-negative.
[0027] Further, the method for obtaining the deformation attenuation coefficient includes:
[0028] Take the ratio of the absolute value of the difference in the corresponding deformation degrees between the matched outer contour and the inner contour to the corresponding shortest distance as the deformation attenuation coefficient.
[0029] Further, the method for analyzing the compliance of the number and shape of conductors based on the inferred contours of all conductors and evaluating the quality of the cable includes:
[0030] Obtain the actual number of conductors according to the inferred contours of all conductors; obtain the quantity compliance parameter according to the difference between the actual number of conductors and the standard number of conductors;
[0031] Take the average value of the roundness of the inferred contours of all conductors as the shape compliance parameter;
[0032] After normalizing the product of the quantity compliance parameter and the morphological compliance parameter, it is used as the comprehensive compliance parameter;
[0033] When the comprehensive compliance parameter is greater than a preset second threshold, it is determined that the quality of the cable core is qualified.
[0034] Furthermore, the method for obtaining the quantity compliance parameter includes:
[0035] Take the reciprocal of the sum of the absolute value of the difference between the actually measured number of conductors and the standard number of conductors and a preset non-zero positive parameter as the quantity compliance parameter.
[0036] The present invention also proposes a cross-section detection system for a building power supply and distribution cable core. The system includes a memory, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the computer program, it implements the steps of any one of the cross-section detection methods for a building power supply and distribution cable core.
[0037] The present invention has the following beneficial effects:
[0038] The present invention first obtains the cross-section image of the cable core, extracts the core area to provide an object for subsequent analysis; further, from different connected domains, it identifies the reference conductors similar to the preset conductor cross-section, providing a basis for obtaining the speculated contour of the outermost conductor; further, taking the cusp as the segmentation point, it obtains the external contour and the internal contour, and analyzes the shape and boundary of the conductor through the contour of the conductor, so as to more accurately determine the position and quantity of each conductor; further, using the characteristic that the deformation of the conductor under external force extrusion will change the contour consistency of the conductor, it obtains the deformation degree of each external contour and the deformation degree of each internal contour; further, to obtain the complete contour of the conductor, it matches the internal contour with the external contour, and obtains the stress degree of the matched internal contour, providing more basis for subsequent speculation of the conductor contour; further, it inputs the contour of the reference conductor, the deformation degree and stress direction of the external contour, and the stress degree and stress direction of the matched internal contour into a pre-trained machine learning model to obtain the speculated contours of all conductors, avoiding the interference of blurred conductor boundaries, and preparing for the final cable quality assessment; finally, it analyzes the compliance of the conductors in terms of quantity and morphology according to the speculated contours of all conductors, and conducts a quality assessment of the cable. The present invention accurately speculates the contour of the conductor by analyzing the stress characteristics and deformation characteristics of the conductor, avoiding the interference of blurred boundaries between conductors, and thus accurately detecting the quality of the cable. Description of the Drawings
[0039] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0040] Figure 1 Flowchart of a method for detecting the cross-section of a building power supply and distribution cable core provided by an embodiment of the present invention;
[0041] Figure 2 An image of a cable core area provided by an embodiment of the present invention;
[0042] Figure 3 A schematic diagram of contour marking provided by an embodiment of the present invention;
[0043] Figure 4 Flowchart of a method for evaluating the quality of a cable provided by an embodiment of the present invention. Detailed implementation manners
[0044] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, a method and system for detecting the cross-section of a building power supply and distribution cable core proposed by the present invention, including its specific implementation manners, structures, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0046] The following specifically describes the specific solutions of a method and system for detecting the cross-section of a building power supply and distribution cable core provided by the present invention with reference to the accompanying drawings.
[0047] Please refer to Figure 1 , which shows the flowchart of a method for detecting the cross-section of a building power supply and distribution cable core provided by an embodiment of the present invention, specifically including:
[0048] Step S1: Obtain the cross-section image of the cable core; extract the cable core area in the cross-section image of the cable core; perform edge detection on each cable core area to obtain the connected domains; analyze the similarity features between each connected domain and the preset conductor cross-section to obtain the reference conductor.
[0049] To ensure the production quality of the cable, the produced cable is randomly inspected. By confirming whether the number of conductors in the randomly inspected cable meets the requirements and evaluating the states of the conductors in the wire core, the quality of the produced wire core is evaluated. The cable is cut, and an industrial camera is used to obtain the cross-sectional image of the cable.
[0050] It should be noted that to facilitate subsequent confirmation of the conductor cross-sectional dimensions in the captured image through the conversion rule between the camera coordinates and the world coordinates, the detection position and the position of the camera need to be fixed. The detection position and the position of the camera can be fixed with the help of a detection table to obtain the cross-sectional image of the randomly inspected cable.
[0051] To avoid the interference of irrelevant regions in the cross-sectional image of the cable wire core, first, image preprocessing is performed on the cross-sectional image of the cable wire core, including grayscale conversion, denoising processing, and linear enhancement processing, so that the contours of each part in the image are clearer, and the cable wire core region in the cross-sectional image of the cable wire core is extracted.
[0052] It should be noted that in an embodiment of the present invention, the cable wire core region in the cross-sectional image of the cable wire core is extracted by the region growing method. The region growing method, image grayscale conversion, denoising processing, and linear enhancement processing are already well-known technical means to those skilled in the art and will not be elaborated here.
[0053] Please refer to Figure 2 , which shows an image of a cable wire core region provided by an embodiment of the present invention.
[0054] Since the edges of some conductors are relatively clear and can be directly recognized as a single connected domain, while the edges of some conductors are blurred and may be recognized as a connected domain together with other conductors during recognition. It is necessary to identify the reference conductors similar to the preset conductor cross-section from these different connected domains to provide a basis for obtaining the speculated contour of the outermost conductor subsequently. Therefore, edge detection is performed on the cable wire core region to obtain connected domains; the similarity features between each connected domain and the preset conductor cross-section are analyzed to obtain the reference conductors.
[0055] Preferably, in an embodiment of the present invention, considering that the more similar the area of the connected domain is to the preset conductor cross-section and the closer it is to a circle, it indicates that the connected domain is more likely to be the connected domain of a single conductor, and the less it is squeezed, the more suitable it is as a reference conductor, and the more accurate the contours of other conductors can be speculated subsequently; and to compare the area of the connected domain with the preset conductor cross-section, it is necessary to convert the image area of each connected domain into the actual area based on coordinate system conversion; obtain the roundness of each connected domain as the shape similarity parameter; obtain the actual area of the preset conductor cross-section as the reference area;
[0056] Take the reciprocal of the sum of the absolute value of the difference between the actual area of each connected component and the reference area and a preset non - zero positive parameter as the area similarity parameter of each connected component; take the product of the area similarity parameter and the shape similarity parameter of each connected component as the reference possibility.
[0057] Take the connected component with the largest reference possibility as the reference conductor.
[0058] The calculation formula of the reference possibility includes:
[0059] ; where represents the reference possibility of the th connected component; represents the actual area of the preset conductor cross - section, which is also the reference area; represents the th connected component's actual area; represents the preset non - zero positive parameter; represents the th connected component's roundness, which is also the shape similarity parameter.
[0060] In the calculation formula of the reference possibility, the smaller it is, the greater the similarity between the actual area of the connected component and the reference area, the more likely it is a connected component composed of a single conductor, and the more likely it is to be used as the reference conductor, analyzing the similarity characteristics between the connected component and the preset conductor cross - section from the perspective of area similarity; the larger it is, the closer the connected component is to a circle, the more likely it is a connected component composed of a single conductor, and the more likely it is to be used as the reference conductor, analyzing the similarity characteristics between the connected component and the preset conductor cross - section from the perspective of shape similarity.
[0061] It should be noted that in the embodiments of the present invention, the preset non - zero positive parameter can be set to 0.1; in one embodiment of the present invention, using the Sobel operator to perform edge detection on the cable core area is a well - known technical means in the art and will not be elaborated; the preset conductor cross - section can be obtained by manually selecting a single conductor and then obtaining the cross - section as the preset conductor cross - section.
[0062] Step S2: Take the sharp points on the edge line of the cable core area as the segmentation points, divide the edge line of the cable core area boundary to obtain the outer contour, and divide the other edge lines to obtain the inner contour; according to the morphological similarity between the outer contours, obtain the deformation degree of each outer contour; according to the morphological similarity between the inner contours, obtain the deformation degree of each inner contour.
[0063] Considering that due to the extrusion and deformation between conductors, a connected domain may contain multiple conductors, it is not possible to directly analyze the number of conductors based on the number of connected domains. The contour of a conductor can provide more accurate information about the shape and boundary of the conductor. By analyzing the contour, the actual shape and position of the conductor can be identified, thereby more accurately determining the position and number of each conductor. Therefore, the contour of the conductor is analyzed. Considering that a cusp is a type of singularity in a curve, and a moving point on the curve will start to move in the opposite direction after moving to the cusp. For example There is a cusp at (0, 0). Cusps usually appear at the turning points of the contour, and the turning of the contour means the appearance of different conductors, that is, the cusp may be the demarcation point of the contours of different conductors. Therefore, the cusp is used to segment the contour line to distinguish different conductors. The arc between two cusps forms a section of the contour. At the same time, considering that the extrusion of conductors at different positions within the cable core area is different, in order to distinguish the external contour and the internal contour, the cusp on the edge line of the cable core area is used as the segmentation point, the edge line of the cable core area boundary is segmented to obtain the external contour, and other edge lines are segmented to obtain the internal contour.
[0064] Please refer to Figure 3 , which shows a schematic diagram of contour annotation provided by an embodiment of the present invention; Figure 4 In, the arc between point A and point B is an external contour; the arc between point C and point D is an internal contour.
[0065] It should be noted that since different cable core areas are separated by an insulating layer, etc., the boundaries of different cable core areas are clear and separated by a certain distance, and the conductors in different cable core areas will not interfere with each other during computer vision processing. Therefore, any cable core area can be selected as the target core area, and each cable core area is analyzed one by one; the edge line is obtained through edge detection, and the method for determining the cusp is already a well-known technical means in the art and will not be elaborated here.
[0066] Considering that when a conductor is extruded, it will cause the contour of the conductor to deform, and the morphological consistency is changed by the extrusion, resulting in various changes in the morphology of the external contour. Therefore, according to the morphological similarity between the external contours, the deformation degree of each external contour is obtained to prepare for subsequent analysis of the stress degree.
[0067] Preferably, in an embodiment of the present invention, considering that curvature refers to the degree of bending of a curve at a certain point, by calculating the curvature of each point on the contour, the morphological characteristics of the contour can be quantitatively described. The average curvature provides an overview of the overall bending degree of the contour, while the curvature range reflects the fluctuation range of the contour curvature. Therefore, the average curvature and the curvature range of each point on each external contour are obtained, and the morphological similarity between the external contours is analyzed from two angles: the difference in average curvature and the difference in curvature range. Considering that different external contours are subjected to different squeezes, resulting in different deformations of the external contours, in order to more accurately analyze the deformation degree of the external contours, the external contours are grouped for analysis. Considering that the external contours within the same group are similarly affected by the squeeze and have similar morphologies, the greater the fluctuation of the average curvature of the external contours within the same group and the greater the standard deviation of the average curvature, the greater the deformation of the external contours and the greater the degree of deformation.
[0068] Based on this, the reciprocal of the sum of the product of the absolute value of the difference in average curvature and the absolute value of the difference in curvature range of any two external contours and a preset non-zero positive parameter is used as the first similarity between the corresponding two external contours;
[0069] The external contours with the first similarity greater than or equal to a preset first threshold are grouped into the same group; after normalizing the standard deviation of the average curvature of all external contours within the same group, it is used as the deformation degree of each external contour within the corresponding group.
[0070] As an example, the first similarity is also linearly normalized. The preset first threshold is 0.9. The external contours with the linearly normalized first similarity greater than or equal to 0.9 are grouped into the same group, and after linearly normalizing the standard deviation of the average curvature of all external contours within the same group, it is used as the deformation degree of each external contour within the corresponding group.
[0071] It should be noted that the method for obtaining the curvature is already a well-known technical means for those skilled in the art and will not be elaborated here.
[0072] Similarly, when the conductor is deformed due to extrusion, the conductor inside the cable core area will also be extruded and deformed. Therefore, further based on the morphological similarity between the internal contours, the deformation degree of each internal contour is obtained, providing more basis for subsequent analysis of the force characteristics of the internal contours and speculation of the conductor's contour.
[0073] Preferably, in an embodiment of the present invention, considering the non-uniformity of the force on the conductor during transmission, and the force on the outer contour of the conductor may also cause misalignment and mutual friction of the conductors in the middle of the cable core area, resulting in a relatively small possibility of deformation of the inner contour. Moreover, the misalignment, mutual friction of the conductors, and the mutual contact of multiple conductors jointly absorb the extrusion force, resulting in a relatively small degree of deformation of the inner contour, and the deformation of the inner contour is relatively similar, reducing the necessity of grouped analysis. Therefore, grouped analysis is not performed, and the average curvature value of each point on each inner contour is obtained; after normalizing the standard deviation of the average curvature values of all inner contours, it is used as the deformation degree of each inner contour, simplifying the calculation process and improving the efficiency of the quality inspection system while maintaining the accuracy.
[0074] Step S3: Match the inner contour with the outer contour according to the distribution characteristics of the outer contour and the inner contour and the relative relationship of the deformation degree; according to the difference in the deformation degree between the matched outer contour and the inner contour, combined with the distance characteristics between the outer contour and the inner contour and the deformation degree of the outer contour, obtain the force degree of the matched inner contour.
[0075] Considering that both the outer contour and some inner contours are the conductor contours of the outermost layer of the conductor, in order to obtain the complete contour of the conductor, analyze the distribution position and quantity characteristics of the conductor, so as to evaluate the quality of the cable core, it is necessary to match the outer contour and the inner contour; considering that the cross-sectional deformation range of the conductor is limited, and the deformation degree of the inner contour is usually less than that of the outer contour, the inner contour is matched with the outer contour according to the distribution characteristics of the outer contour and the inner contour and the relative relationship of the deformation degree.
[0076] Preferably, in an embodiment of the present invention, considering that the cross-section of the conductor is usually close to a circle, although the force may cause a certain degree of deformation, its basic shape is still close to a circle. By fitting a circle using the least squares method, the shape of the conductor can be estimated, and the matching range of the outer contour can be limited; considering that the inner contour and the outer contour of the same conductor maintain a certain proximity on the image, the inner contour with a closer distance is more likely to be the corresponding conductor part, and the matching accuracy is higher.
[0077] Based on this, obtain the image radius of the preset conductor cross-section; based on the least squares method and the image radius, obtain the fitted circle of each outer contour; select any outer contour as the target outer contour; within the fitted circle of the target outer contour, match the inner contour that is closest to the target outer contour and has a deformation degree less than that of the target outer contour with the target outer contour.
[0078] It should be noted that in an embodiment of the present invention, when there are two or more pixel points on the internal contour within the fitting circle, it is considered that this internal contour is within the fitting circle of the external contour; the minimum Euclidean distance between the pixel points on the external contour and the pixel points on the internal contour is taken as the distance between the external contour and the internal contour; when there are multiple internal contours with the same distance from the target external contour, the longer internal contour is selected for matching. When there is no internal contour within the fitting circle of the target external contour, or the deformation degrees of the existing internal contours are all greater than or equal to the deformation degree of the target external contour, no matching is performed.
[0079] It should be noted that by mapping the preset conductor cross-section into an image to obtain the image area, and then obtaining the image radius of the preset conductor cross-section; using the image radius of the preset conductor cross-section as a constraint condition, the position of the center of the circle is optimized and adjusted by the least square method so that the sum of the squares of the distances from each point on the arc segment to the center of the circle reaches the minimum value. This is already an existing technology and will not be elaborated here.
[0080] In order to accurately evaluate the stress state of the conductor in the cable core, thereby more accurately infer the contour of the conductor, and then comprehensively evaluate the quality of the cable, it is also necessary to further obtain the stress degree of the matched internal contour; considering that the deformation degree and the stress degree are positively correlated, and the stress on the external contour will decay with distance, so according to the difference in the deformation degrees of the matched external contour and internal contour, combined with the distance characteristics between the external contour and the internal contour and the deformation degree of the external contour, the stress degree of the matched internal contour is obtained, providing more basis for subsequent inference of the conductor contour.
[0081] Preferably, in an embodiment of the present invention, considering that the greater the stress on the external contour of the conductor, the greater the deformation degree, in order to simplify the analysis, the deformation degree of the external contour is taken as the stress degree of the external contour.
[0082] Considering that the shortest distance between the external contour and the internal contour can represent the physical path of the conductor stress transmission, the extrusion external force gradually decays from the external contour to the internal contour, and the absolute value of the difference in deformation degrees represents the pressure decay situation. Through the shortest distance between the matched external contour and internal contour, and the absolute value of the corresponding difference in deformation degrees, the deformation attenuation coefficient per unit distance is obtained, which characterizes the pressure attenuation degree per unit distance;
[0083] Furthermore, the product of the image diameter of the preset conductor cross-section and the deformation attenuation coefficient is taken as the stress attenuation degree to quantify the attenuation situation when the external pressure is transmitted to the internal contour of the conductor; then the difference between the stress degree of the matched external contour and the stress attenuation degree is taken as the stress degree of the corresponding matched internal contour.
[0084] It should be noted that the stress level of the matched internal contour is a non - negative number; the calculation process of the stress level of the internal contour can be analogized to the relationship between speed, acceleration, and time: the shortest distance between the external contour and the internal contour is analogized to the change time, the absolute value of the difference in the deformation degree is analogized to the change in speed, and the deformation attenuation coefficient is analogized to the acceleration; then the stress level of the external contour is analogized to the initial speed, the image diameter of the preset conductor cross - section is analogized to the change time, and the stress level of the internal contour is analogized to the final speed.
[0085] It should be noted that in an embodiment of the present invention, the minimum Euclidean distance between the pixel points on the external contour and the pixel points on the internal contour is also used as the shortest distance between the external contour and the internal contour.
[0086] Preferably, in an embodiment of the present invention, the ratio of the absolute value of the difference in the corresponding deformation degree between the matched external contour and the internal contour to the corresponding shortest distance is used as the deformation attenuation coefficient.
[0087] Step S4: Input the contour of the reference conductor, the deformation degree and stress direction of the external contour, and the stress degree and stress direction of the matched internal contour into a pre - trained machine - learning model to obtain the speculated contour of the outermost conductor; regard the image of the outermost conductor as the background layer, and iteratively obtain the speculated contours of all conductors.
[0088] After obtaining multiple parameters of the conductor, the contour of the reference conductor, the deformation degree and stress direction of the external contour, and the stress degree and stress direction of the matched internal contour can be input into the machine - learning model. Machine learning can summarize effective speculation methods from historical data and complex features, so as to obtain the speculated contour of the outermost conductor and prepare for the final cable quality assessment.
[0089] Preferably, in an embodiment of the present invention, the pre - trained machine - learning model uses a CNN neural network model. The training process includes: first, collecting historical data for training as input, including: multiple binary groups composed of the contour of the reference conductor, the stress direction and stress degree of the external contour, and multiple binary groups composed of the stress direction and stress degree of the internal contour; among them, the contour of the reference conductor is represented by a chain code, and the speculated contour of the outermost conductor is output; and a validation set is set for validation, which is already the prior art. Input the contour of the reference conductor, the stress degree and stress direction of the external contour, and the stress degree and stress direction of the matched internal contour into the pre - trained machine - learning model to obtain the speculated contour of the outermost conductor.
[0090] It should be noted that in an embodiment of the present invention, the degree of force on the outer contour is the degree of deformation of the outer contour; the force direction at each part of the core is judged by the contact situation between each arc segment and other cable parts outside. Among them, the force direction at the outer contour is perpendicular to the contact surface between the core and the outer edge and points to the inside of the core. Due to extrusion, the force direction at the inner contour is opposite to the corresponding outer contour.
[0091] After confirming the outermost conductor contour, the image of the outermost conductor is regarded as the background layer, and the current second outermost layer is regarded as the foreground layer. In the same way, the speculated contours of all conductors are obtained iteratively.
[0092] It should be noted that in an embodiment of the present invention, after obtaining the speculated contours of all conductors, it may further include:
[0093] Considering that the speculated contours of the conductors may be inaccurate, resulting in a large difference between the speculated results and the acquired images, it is necessary to further test the speculated results: compare the speculated results with the cross-sectional images of the cable cores obtained, and combine the similarity between the speculated results and the cross-section of the preset model to screen out the conductors that need to be re-speculated, and re-speculate according to the contours of adjacent conductors and the surrounding background areas to obtain the speculated contours of the conductors that need to be re-speculated.
[0094] As an example:
[0095] Considering that the number of pixel points coinciding between the speculated contour and the edge detection result represents the consistency between the speculated contour and the edge detection result of the conductor in the actual image, the ratio of the number of pixel points coinciding between the speculated contour of a single conductor and the edge that can be detected during edge detection to the total number of pixel points of the speculated contour of the conductor is used as the accuracy evaluation parameter of the speculated contour of a single conductor; where the total number of pixel points of the speculated contour of the conductor is the denominator.
[0096] Considering that the extrusion during cable production is limited, the deformation of the overall core is limited, and the area of the overall core will not change significantly. Therefore, the areas of all speculated contours are used as the area of the currently identified core region. By comparing the difference between the area of the currently identified core region and the area of the core region of the known same-type wire, the area difference parameter is obtained, and the accuracy of the speculated result is quantified from the perspective of area difference. The smaller the area difference parameter, the higher the accuracy of the speculated result; the calculation formula of the area difference parameter includes: ; where represents the area difference parameter of the current speculated result; represents the area of the currently identified core region; represents the area of the core region of the known same-type wire.
[0097] Considering that the metal material of the conductor itself has a certain anti-extrusion ability and the deformation is small, the speculated contour of the conductor is relatively similar to the model contour of the conductor in the cross-section of the preset model. Therefore, any conductor is selected, and the speculated contour of the conductor and the model contour of the conductor in the cross-section of the preset model are uniformly scaled to the same coordinate system. The origin of the coordinate system is the centroid of the speculated contour and also the centroid of the model contour. The areas of the speculated contour and the model contour in the plane of the coordinate system are the same. Starting from the origin of the coordinate system and at intervals of every 1 degree, rays are obtained in the 360-degree direction. Each ray has intersections with the speculated contour and the model contour. The sum of the Euclidean distances between the two intersections corresponding to all the rays corresponding to the speculated contour of the selected conductor is used as the shape difference sub-parameter corresponding to the speculated contour of the conductor. The sum of the shape difference sub-parameters of all the speculated contours is used as the shape difference parameter to quantify the accuracy of the speculation result from the perspective of shape similarity. The smaller the shape difference parameter, the higher the accuracy of the speculation result.
[0098] All the conductors in the cross-section of the preset model are regarded as a group of conductors, and all the current conductors are regarded as a group. The current cross-section of the preset model and the cross-section of the cable core are mapped to the same coordinate system; the centroid of each conductor in the cross-section of the preset model is obtained, and the centroid in the speculated contour of all the current conductors is obtained; the mean vector and covariance matrix of the centroid coordinates of the two groups of conductors are calculated, and the Mahalanobis distance is used to measure the overall similarity of the distributions. The Mahalanobis distance is used as the distribution difference parameter; the accuracy of the speculation result is quantified from the perspective of distribution difference. The smaller the distribution difference parameter, the higher the accuracy of the speculation result.
[0099] The reciprocal of the product of the area difference parameter, the shape difference parameter, and the distribution difference parameter of the current speculation result is taken and linearly normalized with the sum value of the preset non-zero positive parameters, and then used as the speculation result accuracy; when the speculation result accuracy is less than the accuracy threshold of 0.8, it is determined that the speculation result is not ideal. The accuracy evaluation parameters are sorted from large to small, and the speculated contours of the conductors in the last 10% of the accuracy evaluation parameters are determined as the speculated contours that need to be speculated again; the areas corresponding to the speculated contours of the remaining conductors are set as the image background to exclude the interference of the remaining 90% of the conductors, and the remaining areas in the cable core area are speculated again in the same way.
[0100] It should be noted that both the Mahalanobis distance and the Euclidean distance are well-known technical means to those skilled in the art and will not be elaborated here.
[0101] Step S5: Analyze the compliance of the conductors in terms of quantity and morphology based on the speculated contours of all the conductors, and evaluate the quality of the cable.
[0102] After obtaining the speculated contours of all the conductors, the compliance of the conductors in terms of quantity and morphology can be analyzed with the help of the speculated contours, and the quality of the cable can be evaluated.
[0103] Preferably, in an embodiment of the present invention, please refer to Figure 4 , which shows a flowchart for quality assessment of a cable provided by an embodiment of the present invention, specifically including:
[0104] Step S501: Obtain the measured number of conductors according to the speculated profiles of all conductors; obtain the quantity compliance parameter according to the difference between the measured number of conductors and the standard number of conductors.
[0105] Considering that the greater the difference between the number of conductors presented in the cross-sectional image of the cable core participating in the detection and the standard number of conductors, the more the produced cable core does not meet the production standard and the lower the compliance; therefore, obtain the measured number of conductors according to the speculated profiles of all conductors; obtain the quantity compliance parameter according to the difference between the measured number of conductors and the standard number of conductors, and quantify the quality of the cable core from the perspective of the normativity of the number of conductors.
[0106] As an example: Take the reciprocal of the sum of the absolute value of the difference between the measured number of conductors and the standard number of conductors and a preset non-zero positive parameter as the quantity compliance parameter. The larger the quantity compliance parameter, the higher the quality of the cable core.
[0107] Step S502: Take the average value of the roundness of the speculated profiles of all conductors as the shape compliance parameter.
[0108] Considering that the ideal state of a conductor is circular, and it will be distorted and deformed to a certain extent after being squeezed, and the roundness of the speculated profile will decrease; the higher the roundness of the speculated profile, the smaller the influence of the extrusion on the conductor and the stronger the shape regularity, and the higher the quality of the cable core. Therefore, take the average value of the roundness of the speculated profiles of all conductors as the shape compliance parameter, and represent the overall characteristics of the roundness of all conductors through the average value. The larger the shape compliance parameter, the higher the quality of the cable core.
[0109] Step S503: Normalize the product of the quantity compliance parameter and the shape compliance parameter as the comprehensive compliance parameter.
[0110] Further integrate the quantity compliance parameter and the shape compliance parameter. Normalize the product of the quantity compliance parameter and the shape compliance parameter as the comprehensive compliance parameter. The larger the comprehensive compliance parameter, the higher the quality of the cable core, providing a basis for subsequent evaluation of the quality of the cable core.
[0111] Step S504: When the comprehensive compliance parameter is greater than the preset second threshold, determine that the quality of the cable core is qualified.
[0112] As an example, when the preset second threshold is 0.75, when the comprehensive compliance parameter is greater than 0.75, determine that the quality of the cable core is qualified; otherwise, determine that there is a quality problem with the cable core and issue an alarm to remind relevant personnel to check.
[0113] An embodiment of the present invention further provides a detection system for the cross-section of a building power supply and distribution cable core. The system includes a memory, a processor, and a computer program, where the memory is used to store the corresponding computer program, the processor is used to run the corresponding computer program, and when the computer program runs in the processor, it can implement a method for detecting the cross-section of a building power supply and distribution cable core described in steps S1 - S5.
[0114] In summary, in order to solve the technical problem that the conductor boundary in the cable core is blurred, affecting the quality inspection results of computer vision, the present invention proposes a method and system for detecting the cross-section of a building power supply and distribution cable core. The present invention first obtains the cross-section image of the cable core, extracts the cable core area, determines the reference conductor after edge detection of the cable core area; further uses the cusp points to segment the edge line to obtain the internal contour and the external contour; further analyzes the deformation characteristics exhibited by the contour, combines the distribution characteristics of the internal and external contours, obtains the deformation degree of the external contour and the stress degree of the matched internal contour, inputs them into the machine learning model to obtain the speculated contour of the outermost conductor; iteratively obtains the speculated contours of all conductors, and finally evaluates the quality of the cable according to the speculated contours of all conductors. The present invention accurately speculates the contour of the conductor by analyzing the stress characteristics and deformation characteristics of the conductor, avoids the interference of blurred boundaries between conductors, and thus accurately detects the quality of the cable.
[0115] It should be noted that the above sequence of embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the 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.
[0116] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key point of each embodiment is to illustrate the differences from other embodiments.
Claims
1. An intelligent quality inspection method for the cross-section of a cable core, characterized in that, The method includes: Obtain the cross-sectional image of the cable core; extract the cable core area in the cross-sectional image of the cable core; perform edge detection on each cable core area to obtain connected regions; analyze the similarity features between each connected region and a preset conductor cross-section to obtain a reference conductor. Using the cusp on the edge line of the cable core area as a segmentation point, divide the edge line of the boundary of the cable core area to obtain an outer contour, and divide other edge lines to obtain inner contours; according to the morphological similarity between the outer contours, obtain the deformation degree of each outer contour; according to the morphological similarity between the inner contours, obtain the deformation degree of each inner contour. Match the inner contours with the outer contours according to the distribution characteristics of the outer contours and the inner contours and the relative relationship of the deformation degrees; according to the difference in the deformation degrees of the matched outer contours and inner contours, combine the distance characteristics between the outer contours and the inner contours and the deformation degree of the outer contours to obtain the stress degree of the matched inner contours. Input the contour of the reference conductor, the deformation degree and the stress direction of the outer contour, and the stress degree and the stress direction of the matched inner contour into a pre-trained machine learning model to obtain the speculated contour of the outermost conductor; regard the image of the outermost conductor as the background layer and iteratively obtain the speculated contours of all conductors. Analyze the compliance of the conductors in terms of quantity and morphology according to the speculated contours of all conductors, and evaluate the quality of the cable. The method for matching the inner contours with the outer contours includes: Obtain the image radius of the preset conductor cross-section; based on the least squares method and the image radius, obtain the fitted circle of each outer contour; select any one of the outer contours as the target outer contour; within the fitted circle of the target outer contour, match the inner contour that is closest to the target outer contour and has a deformation degree less than that of the target outer contour with the target outer contour.
2. The intelligent quality inspection method for the cross-section of a cable core according to claim 1, wherein The method for obtaining the reference conductor includes: Based on coordinate system transformation, convert the image area of each connected region into a real area; obtain the roundness of each connected region as a shape similarity parameter; obtain the real area of the preset conductor cross-section as a reference area. Take the reciprocal of the sum of the absolute value of the difference between the real area of each connected region and the reference area and a preset non-zero positive parameter as the area similarity parameter of each connected region; take the product of the area similarity parameter and the shape similarity parameter of each connected region as the reference possibility. Take the connected region with the maximum reference possibility as the reference conductor.
3. The intelligent quality inspection method for the cross-section of a cable core according to claim 1, wherein The method for obtaining the deformation degree of the outer contour includes: Obtain the average curvature and the curvature range of each point on each outer contour. Take the reciprocal of the sum of the absolute value of the difference between the average curvatures of any two outer contours and the absolute value of the difference between the curvature ranges as the first similarity between the corresponding two outer contours. Group the outer contours whose first similarity is greater than or equal to a preset first threshold; after normalizing the standard deviation of the average curvature of all the outer contours within the same group, use it as the deformation degree of each outer contour within the corresponding group.
4. The intelligent quality inspection method for the cross-section of a cable core according to claim 1, characterized in that, The method for obtaining the deformation degree of the inner contour includes: Obtain the average curvature of each point on each inner contour; after normalizing the standard deviation of the average curvature of all the inner contours, use it as the deformation degree of each inner contour.
5. The intelligent quality inspection method for the cross-section of a cable core according to claim 1, characterized in that The method for obtaining the stress level of the matched inner contour includes: Use the deformation degree of the outer contour as the stress level of the outer contour; According to the shortest distance between the matched outer contour and the inner contour, and the absolute value of the difference in the corresponding deformation degree, obtain the deformation attenuation coefficient per unit distance; Use the product of the image diameter of the preset conductor cross-section and the deformation attenuation coefficient as the stress attenuation degree; use the difference between the stress level of the matched outer contour and the stress attenuation degree as the stress level of the corresponding matched inner contour; the stress level of the matched inner contour is non-negative.
6. The intelligent quality inspection method for the cross-section of a cable core according to claim 5, characterized in that, The method for obtaining the deformation attenuation coefficient includes: Use the ratio of the absolute value of the difference in the corresponding deformation degree between the matched outer contour and the inner contour to the corresponding shortest distance as the deformation attenuation coefficient.
7. A method for intelligent quality inspection of the cross-section of a cable core according to claim 1, characterized in that, The method for analyzing the compliance of the conductors in terms of quantity and shape based on the inferred contours of all conductors and evaluating the quality of the cable includes: Obtain the actual number of conductors based on the inferred contours of all conductors; obtain the quantity compliance parameter based on the difference between the actual number of conductors and the standard number of conductors; Use the average value of the roundness of the inferred contours of all conductors as the shape compliance parameter; After normalizing the product of the quantity compliance parameter and the shape compliance parameter, use it as the comprehensive compliance parameter; When the comprehensive compliance parameter is greater than a preset second threshold, determine that the quality of the cable core is qualified.
8. The intelligent quality inspection method for the cross-section of a cable core according to claim 7, characterized in that, The method for obtaining the quantity compliance parameter includes: Take the reciprocal of the sum of the absolute value of the difference between the actual number of conductors and the standard number of conductors and a preset non-zero positive parameter as the quantity compliance parameter.
9. An intelligent quality inspection system for the cross-section of a cable core. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for intelligent quality inspection of the cross-section of a cable core as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Pipeline end deformation monitoring system for deep earthing long-distance pipe jacking operation
CN119321751A
Crown cap surface defect online inspection method employing image processing
WO2020248439A1
Cited By
Cable interlayer structure detection method and system based on image processing
CN121998982A
A cable interlayer structure detection method and system based on image processing
CN121998982B