Disclosure of Invention
Aiming at the defects or improvement demands of the prior art, the invention provides a cable conductor sectional area measuring method and system based on an imaging method, which aim at obtaining the sectional area of a cable conductor by combining image recognition with multi-electrical parameter measurement and providing an effective and accurate detection means for cable conductor detection.
In order to achieve the purpose of the invention, according to one aspect of the invention, a cable conductor sectional area measuring method based on an imaging method is provided, and a local area of an end face image of a measured cable is subjected to primary segmentation by self-iterative clustering; the characteristic information of each segmented region is utilized to carry out homogeneous region combination, and an accurate segmentation result is obtained; extracting a target area based on an area correlation threshold value, obtaining a finely divided image of the cable conductor, and obtaining the number of pixels occupied by the cable conductor based on the finely divided image; obtaining a measured value of the cross section area of the cable conductor to be measured according to the number of pixels corresponding to the unit area of the cable conductor; and the number of pixels corresponding to the unit area is obtained by measuring a standard workpiece with a known size as a measurement target.
In order to achieve the object of the present invention, according to another aspect of the present invention, there is provided an imaging-based cable conductor sectional area measurement system comprising
The imaging unit is used for acquiring an end face high-resolution picture of the tested cable;
the image processing unit is used for processing the high-resolution picture and comprises the step of performing primary segmentation on local area self-iterative clustering; the characteristic information of each segmented region is utilized to carry out homogeneous region combination, and an accurate segmentation result is obtained; extracting a target region based on a region-related threshold value, and obtaining a finely divided image of the cable conductor;
the calculation unit is used for obtaining the number of pixels occupied by the cable conductor based on the finely divided image; and obtaining the measured value of the cross-sectional area of the cable conductor to be tested according to the pixel number corresponding to the unit area of the cable conductor.
In general, the above technical solutions conceived by the present invention, compared with the prior art, enable the following beneficial effects to be obtained:
according to the imaging method-based cable conductor sectional area measurement method and system, a high-resolution image of a detection target is used as a main carrier of detection information, and useful information is extracted from the high-resolution image to indirectly obtain parameters to be detected; obtaining a high-resolution photograph of the cable end face through an industrial lens, and then performing binarization treatment on the image to obtain a black-and-white image of the cable end face; based on the black-and-white image, measuring the number of pixel points occupied by the conductor in the image, and further obtaining the actual area of the conductor according to the number of pixels corresponding to the unit area of the cable conductor; the pixel number corresponding to the unit area is obtained by precisely measuring a standard workpiece with a known size as a measuring target; the method has the remarkable advantages of non-contact, high detection speed, high operation automation degree and the like, the effective sectional area of the end face of the cable is accurately measured through image analysis, the method can be used for measuring the diameter of various cables, and compared with the traditional method for measuring the diameter by using calipers, the accuracy is greatly improved.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
In the embodiment, a high-resolution picture of the end face of the cable is obtained through an industrial lens, and the digitized image is transmitted to a computer by an image acquisition card; the computer carries out binarization processing on the image to obtain a black-and-white image of the cable end face; on the basis, the number m of pixels corresponding to the unit area is determined by utilizing the relation that the actual sectional area of the cable conductor is in direct proportion to the size of the cable sectional image expressed by pixel points under the condition that the optical parameters of the imaging system are unchanged. In the embodiment, a standard workpiece with a known size is used as a measurement target to accurately measure the pixel number m; when the end face of the cable conductor is measured, the number N of pixels occupied by the conductor in the cable section image of the standard component is measured, and then the conductor section area N/m of the standard component is calculated.
Referring to fig. 1, in the imaging method-based cable conductor cross-sectional area measurement method provided by a preferred embodiment, a local area of a cable cross-sectional image is subjected to self-iterative clustering to perform rapid primary segmentation, and on the basis, color, texture and shape characteristic information of each area are comprehensively utilized to perform homogeneity area combination, so that an accurate segmentation result is obtained; and extracting a target region based on the region correlation threshold value, obtaining a finely divided image, and counting the number of copper coils according to the finely divided image to obtain the sectional area of the cable conductor. The method specifically comprises the following steps:
obtaining a cable section image pixel point N, a plurality of super pixels K and the size N/K of each super pixel according to a pre-obtained cable section image I, wherein the distance S between the super pixels is defined asThe superpixel feature set is +.>
(1) Stage I, coarse image segmentation stage
The method comprises the steps of performing primary segmentation on pixels by a pixel iterative clustering method, and firstly selecting the clustering centers of K super pixelsk∈{1,2,…K};
In an initial state, each pixel is associated with a cluster center in the range of 2S×2S; calculating gradient values of all pixel points in the neighborhood, and moving the seed point to the place with the minimum gradient in the neighborhood; each pixel point is assigned a class label (i.e., belonging to which cluster center) within a neighborhood around each seed point. Unlike standard k-means searches throughout the graph, the search range is limited to 2S in this embodiment to speed algorithm convergence.
Because each pixel point is searched by a plurality of seed points, each pixel point has a distance from surrounding seed points, and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point; the step of stage I is iterated until the error converges, e.g., the cluster center of each pixel point is no longer changed; these finely divided small areas will assign discrete superpixels, undersized superpixels, to adjacent superpixels by reassigning traversed pixel points to corresponding labels until all points have been traversed.
(2) Stage II, region merging stage
The image is divided into a plurality of small areas which are not fine yet through the stage I rough segmentation, and the area merging operation is carried out based on the similarity criteria of the characteristic information such as the color and the shape of the areas, so that a larger area with meaning in terms of semantics is generated.
(3) Stage III, target region extraction and region statistics output
Extracting the target region by using region-related attribute information such as region-related threshold values, obtaining a finely divided image of the target region, obtaining a target region duty ratio based on the finely divided image, and obtaining the number of copper lines and the sectional area information.
In a preferred embodiment, the method for performing primary segmentation on the local area self-iterative clustering of the measured cable end face image comprises the following steps:
calculating gradient values of all pixel points in a given range, and moving the seed points to the place with the minimum gradient in the neighborhood; assigning class labels to each pixel point in a neighborhood around each seed point;
each pixel point is searched by a plurality of seed points, each pixel point has a distance from surrounding seed points, and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point;
iteration is continued until the clustering center of each pixel point is not changed; distributing the traversed pixel points to corresponding labels until all the pixel points are traversed; the end face image of the cable to be tested is thus divided into several small areas.
In a preferred embodiment, the measured sectional area data is corrected according to the burr coefficient of the cable conductor cutting, so that the influence of burrs generated when the cable conductor cuts a section on the sectional area measurement accuracy is overcome.
In a preferred embodiment, the cable conductor cross-section noise points are processed to overcome the effects of cable conductor cross-section noise, cable inner conductor and insulation edge noise on measurement accuracy.
The noise points of the images acquired on the section of the cable conductor comprise the noise points of the surface of the cable conductor material and the noise of the boundary between the inner conductor of the cable and the insulating material; the noise points of the conductor material are mainly located in the cable conductor, and referring to fig. 2, linear shadows in the rectangular frame are typical noise points on the surface of the cable copper conductor, and the noise points are easy to be confused with gaps among stranded wires, so that the determination of the area of the imaging region of the conductor can be affected, and noise reduction treatment is needed for the noise points.
In an embodiment, the image is digitized to extract a gray value matrix of the image, which is a matrix of 68×65 in one example, and gray value information corresponding to the 30 th column of the noise in the matrix is extracted to obtain a gray value variation curve of the noise profile, and referring to fig. 3, the gray value width is about 3 to 5 pixels corresponding to a thicker gap width.
The gaps of the stranded wires in the cable inner conductor are usually in an irregular polygon, the gray value of the gaps is close to the minimum value in the image, and the gaps are different from the noise points on the metal surface, so that the gaps can be accurately found; the image segmentation results also illustrate this; noise points on the metal surface of the copper coil, which are in thin lines, can be removed by a filtering method; the pits with large areas and dark colors can be improved from the imaging aspect; in the specific processing, after a target region is extracted based on a region correlation threshold value to obtain a finely divided image, before counting the number of copper coils according to the finely divided image, determining the copper coils and the near-black small regions with a certain number of pixels inside the copper coils, and filtering the regions.
Whether the boundary between the cable inner conductor and the insulating material can be accurately identified directly influences the detection precision of the cable conductor; in the cable, the edge between the conductor and the insulating material is not a step in the image, but a steeper slope, and the accuracy of the imaging analysis is further improved by determining the gray value corresponding to the boundary between the conductor and the insulating material.
Reference 4 is an illustration of an image of the edge of a conductor at which the gray value curve corresponding to the measurement line is shown with reference to fig. 5 in one embodiment. As can be seen from this figure, the edge between the conductor and the insulating material has a width of several pixels; the rectangular frame area is the edge of the semi-conductive layer and the copper material, the width of the gray value section corresponding to the measuring line at the edge is about 5 pixels, namely the boundary line between the copper material and the semi-conductive layer is between the five pixels, and in an embodiment, the boundary of the two materials is determined by carrying out k-means cluster analysis on the multi-time measuring data.
As can be seen from fig. 5, the gray scale difference between the boundary pixels of the copper wire within this cross-sectional image is not significant enough and the image resolution is not high, and the coil may age, which will affect the accuracy of the cable imaging detection. Considering the gray level change information of the boundary pixels, the boundary is detected through clustering, and the detection rate of 100% in theory is achieved. In a preferred embodiment, the accuracy of the measurement is also improved by increasing the threshold.
The imaging device employed in a preferred embodiment comprises an optical imaging system and a hardware processing platform; the camera module in the optical imaging system is KS10A411, and specific parameters are shown in Table 1; the inner diameter of the lens barrel is 35mm, the length of the lens barrel is 60mm, and two groups of positioning bolts are arranged on the lens barrel and used for fixing a measured piece so that the central axis of the lens barrel is parallel to the optical axis; the distance baffle is attached to the section of the measured piece, and the object distance is controlled to be fixed to obtain a high-resolution image. The hardware processing platform CPU is an INTEL CORE i5-8500,8GB memory, and the processing time of a single image is not longer than 2s.
Table 1 example imaging device camera optical parameters
| Module model | KS10A411USB2.0 |
| Photosensitive model | MT9J003 |
| Photosensitive size | 1/2.3 inch |
| Pixel size | 1.67μm×1.67μm |
| Focal length | 16mm |
| Imaging distance | 1CM~∞ |
| Standard interface | USB2.0 |
| Resolution ratio | 3648×2736 |
| Signal to noise ratio | 34dB |
In the present invention, the pixel value corresponding to a unit area is measured by a standard bar; in the embodiment, two standard rods are adopted, wherein the diameter of a standard rod 1 is 8.061mm, and the diameter of a standard rod 2 is 12.13mm; binarization processing is carried out on the two standard rod imaging photos to obtain binarization images, wherein the pixel number corresponding to the standard rod 1 is 474267, and the pixel number corresponding to the standard rod 2 is 1070672; the pixel number corresponding to the unit area of the standard rod 1 is obtained by conversion to be 9293/mm2 The number of pixels corresponding to the unit area of the standard rod 2 is 9265/mm2 Taking the pixel number m corresponding to the unit area of the standard workpiece as 9280/mm2 。
In a specific example, a stranded power cable (150 mm gauge) is compacted at 10kV2 ) And 1kV compacting stranded cable (specification 50 mm)2 ) The imaging method-based cable conductor sectional area measuring method provided by the invention is verified for example, a high-resolution image of the end face of the cable is firstly obtained according to the method, and the high-resolution image is processed into a binarized image; obtaining a cable conductor cross-sectional area based on the binarized image, the measurement results referring to table 2; test data show that the cable guide provided by the inventionThe body cross-sectional area measuring method has the measuring error smaller than 2%, and meets the requirements of field practical detection application.
Table 2 example measurement results
| Number of pixels N | Actual cross-sectional area/mm2 | Corrected measured cross-sectional area S/mm2 |
| Cable 1 | 1404156 | 145.55 | 146.79 |
| Cable 2 | 430592 | 46.40 | 47.23 |
According to the cable conductor sectional area measuring method provided by the invention, the high-resolution image of the detection target is used as a carrier of detection information, and useful information is extracted from the high-resolution image to indirectly obtain parameters to be detected; can be realized by mobile terminal equipment, an upper computer, a PC or a server, etc.; the cable conductor cross-sectional area measurement system, which can be arranged at an engineering test site, comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit is caused to execute the cable conductor cross-sectional area measurement method. Or as a computer readable medium storing a computer program executable by a terminal device, which when run on the terminal device causes the terminal device to perform the above cable conductor cross-sectional area measurement method; the detection method and the detection system have the remarkable advantages of non-contact, high detection speed and high operation automation degree, are nondestructive detection means, and meet the requirements of accurate, rapid and nondestructive detection on the cable conductor.
It will be readily appreciated by those skilled in the art that the foregoing description is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.