A parameter detection method of a cable, a cable intelligent detector and a detection method thereof
By using image processing technology to accurately identify the cable structure layers, the problem that existing intelligent cable detectors cannot accurately measure the thickness of the insulation layer and shielding layer is solved, and the functional diversification of intelligent cable detectors is achieved.
Patent Information
- Application Number
- CN202310975936.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-08-04
AI Technical Summary
Existing intelligent cable detectors cannot accurately identify the thickness of the insulation shielding layer, insulation layer, and wire core shielding layer, and lack the function of automatic cable identification and wire core area calculation.
Image processing technology is used to accurately identify cable structure layers and calculate thickness and area through brightness-grayscale image conversion, contour search and gradient analysis.
It realizes the precise measurement of the thickness of the insulation layer, shielding layer and core shielding layer, enriches the functions of the intelligent cable detector, and improves the detection accuracy and diversity.
Smart Images

Figure CN117008014B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a detection method, in particular to a cable parameter detection method, a cable intelligent detection instrument using the cable parameter detection method, and an intelligent detection method of the cable intelligent detection instrument. BACKGROUND
[0002] No matter whether it is a power cable or an overhead cable, it has its own specification requirements. The interpretation and representation method of the model specification of the cable is taken as an example of the power cable. The model and variety of the power cable mainly have the following aspects: 35kV and below power cable model and product representation method.
[0003] (1) The first letter of the Chinese pinyin in capital letters represents the insulation type, conductor material, inner protective layer material and structural characteristics. For example, Z represents paper (zhi); L represents aluminum (lv); Q represents lead (qian); F represents phase (fen); ZR represents flame retardant (zuran); NH represents fireproof (naihuo).
[0004] (2) The outer protective layer is represented by a number, which has two digits. No number represents no armored layer and no outer sheath. The first digit represents the armor, and the second digit represents the outer sheath. For example, thick steel wire armored fiber outer sheath is represented as 41.
[0005] (3) The cable model is generally arranged in the order of: insulation material; conductor material; inner protective layer; outer protective layer.
[0006] (4) The cable product is represented by the model, rated voltage and specification. The method is to add the Arabic numerals indicating the rated voltage, core number and nominal cross-sectional area after the model. For example, VV42-10 3x50 represents a copper core, polyvinyl chloride insulation, thick steel wire armored, polyvinyl chloride sheath, rated voltage 10kV, 3 core, nominal cross-sectional area 50mm2 power cable. The format can be: category-[1: type, use] / [2: conductor] / [3: insulation] / [4: inner protective layer] / [5: structural characteristics] / [6: outer protective layer or derivative] / [7: make the number]6. The code of each part of the power cable model and its meaning:
[0007] (5) Category: ZR (flame retardant); NH (fireproof); BC (low smoke low halogen); E (low smoke halogen-free); K (control cable class); DJ (electronic computer); N (agricultural direct burial); JK (overhead cable class); B (cloth wire).
[0008] Therefore, whether it is a power cable or an overhead cable, its specification has a national standard, not defined by the manufacturer at will. For example, Figure 1As shown, the left area is a schematic diagram of the port of the power cable, and the right area is a schematic diagram of the port of the overhead cable. The power cable comprises, from inside to outside, a core 1, a conductor shielding layer 2, an insulation layer 3, and an insulation shielding layer 4. The core 1 is a core area and comprises a plurality of inner cores 5 arranged in a plurality of concentric ring structures with one of the inner cores 5 as the center, one ring being sleeved on another ring. The overhead cable does not comprise the insulation shielding layer 4, and of course, there are some differences in respective size specifications.
[0009] The current cable intelligent detector has the function of calculating and detecting the thickness of the insulation layer through pictures, and although the accuracy needs to be improved, it is a great progress compared with the manual measurement method. However, the function is too single, lacks the cable automatic recognition function, and lacks the shielding layer thickness calculation function, the core 1 area calculation function, and the inner core 5 number calculation function. SUMMARY
[0010] To solve the technical problem that the existing cable intelligent detector cannot accurately identify the thicknesses of the insulation shielding layer, the insulation layer, and the core shielding layer, the present application provides a parameter detection method of a cable, a cable intelligent detector adopting the parameter detection method of the cable, and an intelligent detection method of the cable intelligent detector.
[0011] The present application adopts the following technical scheme: a parameter detection method of a cable, the parameters comprising the thicknesses of an insulation shielding layer, an insulation layer, and a core shielding layer, the parameter detection method comprising the following steps:
[0012] Step S11, converting a to-be-identified image into a luminance grayscale image, wherein the to-be-identified image is a front view image obtained by imaging the cable port of the cable at a target focal length and a target imaging distance and at a front view angle;
[0013] Step S13, according to the picture position and the picture diameter of the cable port in a reference image, circumscribing a corresponding picture area I on the luminance grayscale image, counting the minimum value of the pixel grayscale outside the picture area I as a threshold value, and using the threshold value to perform binaryzation processing on the luminance grayscale image; wherein the reference image is a front view image obtained by imaging the cable port of the cable with the largest size specification at the target focal length and the target imaging distance and at a front view angle;
[0014] Step S14, using a contour finding function to find the overall contour of the cable port in the to-be-identified image after binaryzation processing, and using the overall contour to calculate the outer frame of the corresponding overall area, i.e., the imaging area of the cable;
[0015] Step S15, at the center of the cable imaging area, a n*n pixel area is selected, n is selected to satisfy that the area of n*n is always within the area of the cable imaging area, and a rectangular area subgraph is obtained, and the lowest gray value of the part of pixels with a gray value greater than N in the rectangular area subgraph is counted as another threshold value, so as to perform binaryzation processing on the image in the cable imaging area;
[0016] Step S16, a contour finding function is used to find the core area contour of the cable in the cable imaging area after the binaryzation processing, and a corresponding core imaging area is obtained by finding the outer frame of the core area, that is, the core imaging area;
[0017] Step S27, the center points of the cable imaging area and the core imaging area are calculated respectively, the center point of the cable imaging area is moved to the center point of the core imaging area, and the cable imaging area is adjusted by increasing the width and height of the cable imaging area respectively, and the increase amounts of the width and height are the absolute values of the horizontal deviation and the vertical deviation between the two center points respectively;
[0018] Step S28, the width and height of the adjusted cable imaging area are taken as the major axis and the minor axis of an ellipse respectively, and the ellipse is unfolded into an equivalent rectangle I, and the pixel coordinate relationship of the adjusted cable imaging area is represented as:
[0019]
[0020] In the formula, (x, y) represents the coordinates of a pixel on the adjusted cable imaging area, θ is the angle of (x, y) on the ellipse coordinate system, (x1, y1) is the coordinates of a pixel on the equivalent rectangle I, a is the major axis of the ellipse, and b is the minor axis of the ellipse;
[0021] Step S29, for the equivalent rectangle I, the width and height are a pixels and H2 pixels respectively, the equivalent rectangle I is divided into H2 / 50 narrow strip areas every 50 pixels from top to bottom, each narrow strip area subgraph is obtained, and the narrow strip area subgraph is reduced to a narrow strip area subgraph with a height of 1 pixel by taking the average of the gray values, wherein H2=2*a+2*b;
[0022] Step S210, the gray value difference of every 2 pixels after b-2 pixels on the left of each narrow strip area subgraph is calculated to obtain a corresponding gradient graph;
[0023] Step S211, traverse all gradient values of the gradient map of each narrow strip region subgraph from left to right, find out multiple gradient maximum value points with maximum positive gradient change and maximum negative gradient change, and if multiple gradient maximum value points from the outermost edge of the cable imaging region to the middle part of the core imaging region meet positive, negative, positive, negative, and each gradient maximum value point is within the predetermined interval of the overall region outer frame and the core region outer frame, then the two edges of one layer are determined between the adjacent two positive and negative gradient maximum value points;
[0024] Step S212, determine the distance between the two edges of each layer under the pixel coordinate relationship, and then calculate the corresponding thickness according to the distance multiplied by the proportional relationship between the pixel and the actual size;
[0025] Step S213, define one of the layers to be calculated as layer A, count the thickness of layer A in H2 / 50 narrow strip regions, find out the region with the smallest thickness of layer A, and take it as the reference to obtain other narrow strip region data every 60°, a total of 6 equally spaced narrow strip region measurement data of layer A are returned.
[0026] As a further improvement of the above scheme, the predetermined interval is that the interval between each gradient maximum value point and the nearest outer frame is less than one tenth of the interval between the two outer frames.
[0027] As a further improvement of the above scheme, the following steps are further included before step S13:
[0028] Step S12, denoise the brightness grayscale image to remove noise points.
[0029] As a further improvement of the above scheme, n is 100 and N is 128.
[0030] As a further improvement of the above scheme, in step S13, the minimum value of the pixel grayscale of the outer region of the picture region and located at one corner of the brightness grayscale image is counted as the threshold value.
[0031] As a further improvement of the above scheme, if the cable is a power cable, then from left to right, the adjacent two positive and negative gradient maximum value points are determined as the insulation shielding layer, the insulation layer, the core shielding layer, and the core in turn.
[0032] If the cable is an overhead cable, then from left to right, the adjacent two positive and negative gradient maximum value points are determined as the insulation layer, the core shielding layer, and the core in turn.
[0033] As a further improvement of the above scheme, the parameter further includes the area of the core, and the parameter detection method further includes the following steps:
[0034] The line core imaging area is processed as an ellipse, and the width and height of the line core imaging area are respectively taken as the major axis and the minor axis of the corresponding ellipse.
[0035] The area of the ellipse corresponding to the line core imaging area is calculated according to the proportional relationship between the pixel and the actual size, as the area of the line core.
[0036] The application further provides a cable intelligent detector adopting any of the cable parameter detection methods.
[0037] As a further improvement of the above scheme, the cable intelligent detector comprises:
[0038] A camera is arranged for image capturing according to a target focal length.
[0039] A positioning frame is arranged for positioning the cable and positioning the cable port at the center area of the camera image, and the cable port is at a target distance from the camera.
[0040] The application further provides a detection method of the cable intelligent detector, which comprises any of the cable parameter detection methods.
[0041] Compared with the prior art, the application has the following beneficial effects:
[0042] (1) By accurately distinguishing the edges of the insulation layer and the shielding layer, the thicknesses of the insulation layer and the shielding layer are accurately calculated and measured, and the technical problem that the existing cable intelligent detector cannot accurately identify the thicknesses of the insulation shielding layer, the insulation layer and the line core shielding layer is solved.
[0043] (2) The line core imaging area is processed as an ellipse, and the line core area is framed as the major and minor axes of the ellipse, and the area of the line core is calculated according to the proportional relationship between the pixel and the actual size.
[0044] (3) The detection method of the cable intelligent detector of the application can also calculate the area of the line core, and in combination with the cable parameter detection method of the application, the intelligent detection function of the cable intelligent detector can be enriched, and the function diversification of the cable intelligent detector is realized. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 It is a schematic diagram of the port of the existing power cable and overhead cable.
[0046] Figure 2 It is a flowchart of the automatic identification method of the cable type provided in Embodiment 1 of the application.
[0047] Figure 3 It is a flowchart of the identification method of the cable imaging area and the line core imaging area adopted in the automatic identification method. Figure 2
[0048] Figure 4 For Figure 2 The schematic diagram of picture processing in the automatic identification method processing process.
[0049] Figure 5 The flow chart of the parameter detection method of the cable provided in Embodiment 2 of the present application.
[0050] Figure 6 The flow chart of the inner core counting method of the cable provided in Embodiment 3 of the present application.
[0051] Figure 7 For Figure 6 The schematic diagram of the equivalent rectangle II formed by the inner core counting method in the present application.
[0052] Figure 8 The flow chart of the intelligent detection method of the cable intelligent detector provided in Embodiment 4 of the present application. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0054] Embodiment 1
[0055] The present embodiment discloses an automatic identification method of cable type, which is used to automatically identify whether the cable belongs to power cable or overhead cable, and further identify the specific model of the cable after identifying the cable type. The automatic identification method of cable type can be embedded in the CPU of the cable intelligent detector in the form of software when applied, so that the cable intelligent detector can realize the automatic identification method of cable type of the present application when detecting.
[0056] Please refer to Figure 2 , the automatic identification method of cable type includes the following steps.
[0057] Firstly, step S10, identify the cable imaging area and the wire core imaging area in the image to be identified.
[0058] Please refer to Figure 3 The identification method of the cable imaging area and the wire core imaging area can be various, but the identification method of the cable imaging area and the wire core imaging area developed by the present application is adopted in the present application, which includes the following steps S11-S16.
[0059] Step S11, convert the image to be identified into a luminance gray image.
[0060] The image to be identified is an image taken at the cable port, and is a front view image taken at a front view angle. The existing cable intelligent detector can be used to focus on the cable port at a designed focal length. When taking the image, the focal length is designed, the distance between the camera and the cable port is also predetermined, and the cable port is located in the center of the image as much as possible. The advantage of this is that the front view image of the largest specification cable (whether it is a power cable or an overhead cable, the largest diameter cable) can be obtained at a fixed focal length and a fixed image taking distance. At this time, the parameters of the front view image are known, which provides a reference for subsequent automatic identification of the cable type.
[0061] Therefore, the image to be identified in step S11 is a front view image taken at a front view angle at a designed focal length and an image taking distance (i.e. at a target focal length and a target image taking distance). In actual operation, the cable intelligent detector can be provided with a positioning frame for positioning the cable and positioning the cable port in the center of the image of the camera of the cable intelligent detector, and the distance between the cable port and the camera is the target distance. Thus, the camera can take a front view image of the cable port in the center of the image at a front view angle at a target focal length and a target image taking distance.
[0062] The conversion of the luminance gray image can be performed by using the HSV color space conversion technology, and can also be performed by using image inversion, logarithmic transformation, gamma transformation, etc. as long as the luminance gray conversion can be performed.
[0063] Step S12, denoising the luminance gray image to remove noise points. Of course, this step can be skipped, but the denoising process can improve the accuracy of subsequent identification. The removal of noise points can be performed by using a Gaussian blur calculation method. Gaussian blur, also known as Gaussian smoothing, is a widely used processing effect in image processing software such as Adobe Photoshop, GIMP, and Paint.NET. Its function is to make the image blurred and smooth, and it is usually used to reduce image noise and reduce detail levels. The image generated by this blur technology has a visual effect similar to observing the image through a frosted glass, which is obviously different from the effect of out-of-focus imaging and ordinary lighting shadows. Gaussian filter is a linear smoothing filter, which is suitable for eliminating Gaussian noise and is widely used in the noise reduction process of image processing. In simple terms, Gaussian filtering is a process of weighted average of the entire image. The value of each pixel point is obtained by weighted average of itself and other pixel values in the neighborhood. The Gaussian blur calculation method is not described in detail here.
[0064] Step S13, according to the picture position and the picture diameter of the cable port in the reference image, a corresponding picture area one is circled on the denoised luminance gray image, the minimum value of the pixel gray scale outside the picture area one is counted and taken as a threshold, and the denoised luminance gray image is binarized.
[0065] The reference image can be an image stored in the cable intelligent detector in advance, and the reference image is a front view image obtained by imaging the cable port of the cable with the largest size specification at the target focal length and the target imaging distance and at a front view angle. Since the focal length and the imaging distance used in the to-be-identified image and the reference image are the same, the cable port in the center area of the imaging picture has the same size ratio and an approximately or even the same center point. Since the cable in the reference image has the largest size specification, the corresponding picture area one in the denoised luminance gray image is defined according to the picture position and the picture diameter of the cable port in the reference image, and the picture area one obtained must be the actual imaging area of the cable port of the to-be-identified cable. Therefore, the area outside the picture area one must be the background, and by taking the minimum value of the pixel gray scale outside the picture area one as a threshold, the to-be-identified image after the binarization processing can distinguish the imaging of the cable port from the background, thereby facilitating the subsequent identification of the overall contour of the cable port.
[0066] In actual operation, the minimum value of the pixel gray scale of one part selected outside the picture area one can be counted and taken as a threshold. As shown in FIG. 6, the left side is slightly blocked during imaging, resulting in incomplete imaging of the cable port. However, one advantage of the present application is that it does not affect the subsequent identification of the cable type and the model specification even in such a case. Figure 4 Figure 4 For the case shown in FIG. 6, the minimum value of the pixel gray scale outside the cable port imaging area of the upper right part of the picture (i.e., outside the picture area one) can be counted.
[0067] Step S14, a contour finding function is used to find the overall contour of the cable port in the to-be-identified image after the binarization processing, and the corresponding overall area frame 6 is calculated, that is, the cable imaging area.
[0068] The contour search function is widely used. Its typical application is in PS image processing, where it can better define the boundary between the image and the background. Contour search functions such as OpenCV contour functions correspond to a series of points, and these points represent a curve in the image in some way. In OpenCV, a contour function cv2.findContours() is represented by a series of two-dimensional vertices to calculate the contour from a two-dimensional image. The image it processes can be an image with edge pixels obtained from the cv2.Canny() function, or an image obtained from the cv2.threshold() and cv2.adaptiveThreshold() functions. In this case, the edge is the boundary between the positive and negative areas. The overall contour search technology will not be described in detail here. The focus of the present invention is not on designing a contour search function, but on calling the existing contour search function to search for the external overall contour of the cable port in the image to be identified after binarization. After the external overall contour is obtained, the points of the outermost edges in the upper, lower, left, right and positive directions can be set according to the external overall contour to set the corresponding overall area outer frame 6, such as Figure 4 The outermost wireframe in the overall area frame 6 is the cable imaging area of the cable port.
[0069] Step S15, obtaining a rectangular area sub-image at the position of the n×n pixel area at the center of the cable imaging area, and counting the lowest grayscale value of the pixels in the rectangular area sub-image whose grayscale value is greater than N as another threshold, thereby binarizing the image in the cable imaging area.
[0070] The value of n ensures that the n×n area always falls within the cable imaging region. Therefore, n cannot be too large, as a large value will prevent the rectangular sub-image from being fully filled with the cable core. In this embodiment, n = 100 is sufficient. The value of N is generally 128, based on empirical evaluation. The concept behind this step is somewhat similar to step S13 and will not be further elaborated here.
[0071] Step S16, using the contour search function, the cable core area contour is searched in the cable imaging area after the binary processing, and the corresponding core area outer frame 7 is obtained, which is the core imaging area. Figure 3 The concept of this step is similar to that of step S14, so it will not be repeated here.
[0072] Step S17: With the center of the cable core imaging area as the center, a narrow strip area with a width of W pixels and a height of h pixels is horizontally acquired to obtain a sub-image of the narrow strip area. The sub-image of the narrow strip area is then reduced to a sub-image of a narrow strip area with a height of 1 pixel by grayscale averaging. The width of the cable imaging area is W pixels, and the value of h is less than half the height of the cable core imaging area of a minimum-sized cable under the same imaging conditions.
[0073] In the embodiment, h takes the value of 100, which is an empirical value. The average gray value is obtained by averaging the pixel values.
[0074] In step S18, the gray value difference between every two pixels is calculated for the reduced horizontal narrow strip region subgraph, and a corresponding gradient graph is obtained.
[0075] In step S19, all gradient values of the gradient graph are traversed from left to right, and multiple points with the maximum positive gradient value and the maximum negative gradient value are obtained. The point with the maximum positive gradient value is defined as positive, and the point with the maximum negative gradient value is defined as negative. If the left half of the cable imaging region to the middle part of the cable imaging region or the right half of the cable imaging region to the middle part of the cable imaging region meets the positive-negative-positive-negative change rule, and the corresponding points are sequentially numbered as 1-4, if the distance between the points numbered 3-2 is greater than the distance between the points numbered 2-1 and the distance between the points numbered 4-3, it is determined that the left half of the cable imaging region meets the power cable characteristic or the right half of the cable imaging region meets the power cable characteristic. In the embodiment, the standard of much greater than is at least 3 times the distance.
[0076] In step S110, referring to steps S17 to S19, the acquisition of the vertical narrow strip region subgraph, the acquisition of the corresponding gradient graph, and the analysis of the corresponding gradient value are performed in the vertical direction, so as to evaluate whether the upper half and the lower half of the cable imaging region meet the power cable characteristic.
[0077] In step S111, the four power cable characteristic determination results of the upper half, the lower half, the left half, and the right half are comprehensively considered. If more than or equal to two power cable characteristic determination results are obtained, it is determined that the cable in the to-be-identified image meets the power cable characteristic and belongs to the power cable, otherwise, it is determined to belong to the overhead cable.
[0078] Once the type of the cable is identified, the cross-sectional area of the cable can be used to quickly identify the cable model corresponding to the cross-sectional area by comparing the cross-sectional area with the cross-sectional areas of various cables in the cable library. In the embodiment, the cable model identification method is as follows: under the premise of identifying the cable type, the cross-sectional area of the cable is compared with the cross-sectional areas of various cables of the corresponding cable type in the cable library, and the cable model corresponding to the matched cross-sectional area in the cable library is taken as the cable model of the cable.
[0079] The application can automatically identify the cable type without manual input of the user, reduces input errors, and compared with the existing cable type automatic identification method, the cable type automatic identification method of the application can normally identify even if the image to be identified is blocked a little or has defects. Moreover, the application automatically identifies the cable type according to the identification results of the four power cable features of the upper, lower, left and right four half edges, so that the possibility of misjudgment is almost nonexistent.
[0080] By the cable type automatic identification method of the application applied in the intelligent detection method of the cable intelligent detector, the intelligent detection function of the cable intelligent detector can be enriched, and the function diversification of the cable intelligent detector can be realized.
[0081] Embodiment 2
[0082] The embodiment discloses a parameter detection method of a cable, the parameters can include the thicknesses of an insulation shielding layer, an insulation layer and a wire core shielding layer, and relate to a calculation method of the insulation layer thickness of the cable, a calculation method of the insulation shielding layer thickness of the cable and a calculation method of the conductor shielding layer thickness of the cable. The parameters can also include the area of the wire core, and relate to a calculation method of the area of the wire core.
[0083] Please refer to Figure 5 The parameter detection method of the cable of the embodiment comprises the following steps.
[0084] In step S11, a to-be-identified image is converted into a luminance gray image, wherein the to-be-identified image is a front view image obtained by imaging the cable port of the cable at a target focal length and a target imaging distance with a front view angle.
[0085] In step S12, the luminance gray image is denoised to remove noise points.
[0086] In step S13, a corresponding picture area one is circled on the luminance gray image according to the picture position and the picture diameter of the cable port in a reference image, the minimum value of the pixel gray scale outside the picture area one is counted as a threshold value, and the luminance gray image is binarized according to the threshold value; wherein the reference image is a front view image obtained by imaging the cable port of the cable with the largest size specification at the target focal length and the target imaging distance with a front view angle.
[0087] In step S14, an overall contour of the cable port is found in the to-be-identified image after binarization by using a contour finding function, and an overall area frame corresponding to the overall contour is calculated, that is, a cable imaging area.
[0088] Step S15, at the center of the cable imaging area, a n*n pixel area is selected to obtain a rectangular area subgraph, n is selected to satisfy that the area of the n*n pixel area is always within the area of the cable imaging area, and the lowest gray value of the part of pixels with a gray value greater than N in the rectangular area subgraph is counted as another threshold value, so as to perform binaryzation processing on the image in the cable imaging area.
[0089] Step S16, a contour finding function is used to find the wire core area contour of the cable in the binaryzation processed cable imaging area, and the corresponding wire core area frame is obtained, that is, the wire core imaging area.
[0090] Steps S11-S16 can be referred to steps S11-S16 of embodiment 1, and will not be repeated here.
[0091] Step S27, the center points of the whole area frame 6 and the wire core area frame 7 are calculated respectively, the center point of the whole area frame 6 is moved to the center point of the wire core area frame 7, and the size of the whole area frame 6 is adjusted. The adjustment method is to increase the width and height of the whole area frame 6 respectively, and the increase amount of the width and height is the absolute value of the horizontal deviation and the absolute value of the vertical deviation between the two center points respectively.
[0092] Step S28, the width and height of the adjusted whole area frame are taken as the major axis and the minor axis of an ellipse respectively, and the formed ellipse is further unfolded into an equivalent rectangle I. According to the mapping relationship between the points on the ellipse and the points on the equivalent rectangle, the pixel coordinate relationship of the adjusted whole area frame is represented as:
[0093]
[0094] In the formula, (x, y) represents the coordinates of the pixel on the adjusted whole area frame; θ is the angle of (x, y) on the ellipse coordinate system, (x1, y1) is the coordinates of the pixel on the equivalent rectangle I, a is the major axis of the ellipse, and b is the minor axis of the ellipse.
[0095] Step S29, for the equivalent rectangle area I, the width and height are set as W2 and H2 respectively, the area is divided into a narrow strip area every 50 pixels from top to bottom, a total of H2 / 50 narrow strip areas, each narrow strip area subgraph is intercepted, and the narrow strip area subgraph is reduced to a narrow strip area subgraph with a height of 1 pixel in a gray average manner. Wherein, W2=a, H2=2*a+2*b.
[0096] Step S210, the gray difference value of each narrow strip area subgraph left W2-2 pixels is calculated, and the corresponding gradient graph is obtained.
[0097] Step S211, traverse all gradient values of the gradient map of each narrow strip subgraph from left to right, and find the maximum points of the maximum positive gradient change and the maximum negative gradient change. If the maximum points of the plurality of gradients from the outermost edge of the cable imaging region to the middle part of the core imaging region meet the positive (coded as No. 1), negative (coded as No. 2), positive (coded as No. 3), negative (coded as No. 4), and each gradient maximum point is within the predetermined interval of the outer frame 6 of the overall region and the outer frame 7 of the core region (i.e. the vicinity of the adjusted cable imaging region and the core imaging region), it is determined as the edge of the insulation layer and the edge of the shielding layer. In the embodiment, the "vicinity" means that the predetermined interval is the interval between each gradient maximum point and the nearest outer frame, which is less than one tenth of the interval between two outer frames. The edges of one layer are determined between the adjacent two positive and negative gradient maximum points.
[0098] If the cable is a power cable, the adjacent two positive and negative gradient maximum points are sequentially determined as the insulation shielding layer, the insulation layer, the core shielding layer, and the core from left to right. If the cable is an overhead cable, the adjacent two positive and negative gradient maximum points are sequentially determined as the insulation layer, the core shielding layer, and the core from left to right.
[0099] Step S212, determine the distance between the two edges of each layer under the pixel coordinate relationship, and then calculate the corresponding thickness according to the distance multiplied by the proportion relationship between the pixel and the actual size.
[0100] The proportion relationship between the pixel and the actual size is calculated according to the imaging rule, and the thicknesses of the insulation layer and the shielding layer are calculated according to the found edges of the insulation layer and the shielding layer. The imaging rule in the embodiment refers to the fixed focal length, the imaging distance, and the proportion relationship of the actual size. According to the pixel coordinate relationship, the coordinates of the edges of the insulation layer and the shielding layer in the to-be-identified image are known, so that the corresponding image thicknesses between the insulation layer, the insulation shielding layer, and the conductor shielding layer in the to-be-identified image are obtained, and then the actual thicknesses of the insulation layer, the insulation shielding layer, and the conductor shielding layer are obtained by multiplying the proportion between the pixel and the actual size.
[0101] Step S213, define one of the layers to be calculated as layer A, and count the thicknesses of layer A in H2 / 50 narrow strip regions, find the region with the smallest thickness of layer A, and take it as a reference to obtain the data of other narrow strip regions every 60°, and return the measurement data of layer A in 6 equally spaced narrow strip regions.
[0102] According to the national standard requirements, 6 measurement data are calculated every 60°. For example, the thickness of the insulation layer of H2 / 50 narrow strip regions is counted, the region with the minimum thickness is found, and the data of other narrow strip regions are obtained every 60°, and 6 insulation layer thickness measurement data of the narrow strip regions are returned. Therefore, the final insulation layer thickness measurement data has 6. By analogy, the cable intelligent detector can provide 6 groups of data, each group of data including the thickness of the insulation layer, the insulation shield layer and the core shield layer, and the measurement relationship between the adjacent two groups of data is 60° interval on the cable port.
[0103] The application accurately calculates the thicknesses of the insulation layer, the insulation shield layer and the core shield layer by distinguishing the insulation layer edge and the shield layer edge. The parameter detection method of the cable can enrich the intelligent detection function of the cable intelligent detector and realize the diversification of the function of the cable intelligent detector.
[0104] The detection method of the cable intelligent detector can also calculate the area of the core. Specifically, the core imaging area is processed as an ellipse, and the width and height of the core imaging area are respectively taken as the major axis and the minor axis of the corresponding ellipse. The area of the ellipse corresponding to the core imaging area is calculated according to the proportional relationship between the pixel and the actual size, and is taken as the area of the core.
[0105] Embodiment 3
[0106] The embodiment discloses a core counting method of a cable, please refer to Figure 6 The core counting method of the cable of the embodiment includes the following steps.
[0107] Step S11, convert the to-be-recognized image into a brightness grayscale image, wherein the to-be-recognized image is a front view image obtained by imaging the cable port in the center area of the picture at a target focal length and a target imaging distance with a front view angle.
[0108] Step S12, denoising the brightness grayscale image to remove noise points.
[0109] If the cable port is not necessarily in the center area of the picture, step S13 is performed, a corresponding picture area I is circled on the brightness grayscale image according to the picture position and the picture diameter of the cable port in the reference image, the minimum value of the pixel grayscale outside the picture area I is counted and taken as a threshold, and the brightness grayscale image is binarized in this way; wherein the reference image is a front view image obtained by imaging the cable port of the largest size specification cable at the target focal length and the target imaging distance with a front view angle.
[0110] Step S14, using a contour search function, find the overall contour of the cable port in the binary image, and find the corresponding overall area frame, which is the cable imaging area.
[0111] Step S15, in the center of the brightness gray image, get a rectangular region subgraph in n x n pixel area, the value of n satisfies that the area of n x n is always within the cable imaging area, and the lowest gray value of the part of pixels with gray value greater than N in the rectangular region subgraph is taken as another threshold value, so as to perform binaryzation processing on the brightness gray image.
[0112] Step S16, using a contour search function, find the wire core area contour in the binaryzation processed brightness gray image, and find the corresponding wire core area frame, which is the wire core imaging area.
[0113] Steps S11-S16 can be referred to steps S11-S16 of embodiment 1, which will not be repeated here.
[0114] Please refer to Figure 7 Step S38, take the width and height of the wire core imaging area (i.e. the wire core area frame 7) as the major axis and minor axis of an ellipse respectively, and then develop the formed ellipse into an equivalent rectangle two.
[0115] Step S39, reduce the equivalent rectangle two to 1 column to the left in the gray average mode, and count the minimum gray value one in it to get the horizontal segmentation line of each layer of wire core.
[0116] Step S310, divide the equivalent rectangle two into subgraphs of each layer with the horizontal segmentation line as the boundary, and reduce each layer to 1 row downward in the gray average mode, and count the minimum gray value two.
[0117] Step S311, count the number of pixels with the minimum gray value two less than the target threshold value as the gap between the inner cores of the wire core.
[0118] Step S312, calculate the interval between the minimum gray value two, and count the number of the same interval in the histogram mode, and take the maximum number interval value as the width of the inner core.
[0119] Step S313, calculate the number of inner cores of each layer according to the total width of the equivalent rectangle two minus the gap number of the inner core, and then divided by the width of the inner core.
[0120] Step S314, multi-layer summary, get the total inner core count.
[0121] Please refer to Figure 7The cable inner core counting method of the application can accurately count even if the profile between the inner cores is not clear. By applying the cable inner core counting method of the application in the intelligent detection method of the cable intelligent detector, the intelligent detection function of the cable intelligent detector can be enriched, and the function diversification of the cable intelligent detector can be realized.
[0122] Embodiment 4
[0123] The cable intelligent detector of the embodiment can adopt the cable type automatic identification method of embodiment 1, can also adopt the cable parameter detection method of embodiment 2, and can also adopt the cable inner core counting method of embodiment 3. Please refer to Figure 8 In addition to the above, the intelligent detection method of the cable intelligent detector can include the following steps.
[0124] In step S315, the cable intelligent detector can be networked through the 4G module, linked to the background, and remotely upgraded. Step S315 can ensure that the version of the cable intelligent detector is updated in time.
[0125] In step S316, the pictures that cannot be recognized by the cable intelligent detector can be returned through the 4G network, and the background can update the detector database through training. Step S316 can gradually improve the database and improve the recognition rate of the cable intelligent detector.
[0126] In the embodiment, the detection box of the cable intelligent detector can be designed as an integrated detector, the detection box space can be reasonably utilized, the overall volume of the detector can be reduced, and the weight of the detector can be reduced.
[0127] As can be seen from the above four embodiments, the cable intelligent detector of the application can intelligently identify the cable type, making detection more convenient and accurate. The calculation functions of the shielding layer, the core area (i.e. the inner core area), and the number of cores (i.e. the number of inner cores) are added. These parameters are important detection indicators in cable quality detection. Thus, the functions of the cable intelligent detector are more complete, and the performance is better. The 4G communication function is added, so that the cable intelligent detector can be online at all times, update the latest detection software in time, process unrecognized cables in time, and improve the product detection efficiency and applicability. The lightweight design of the cable intelligent detector reduces the weight of the equipment, and the equipment can be carried to the scene for on-site detection.
[0128] The advantages of the application are as follows:
[0129] (1) The application provides a cable type automatic identification method: judging whether the cable is a power cable or an overhead cable according to the different layered types of the power cable and the overhead cable; and then identifying the cross-sectional area of the cable, and quickly identifying the cable model according to the area comparison with the cable area of the cable library.
[0130] (2) The application provides a parameter detection method of a cable, in particular a calculation method of the thickness of an insulation layer of the cable, a calculation method of the thickness of an insulation shielding layer of the cable, and a calculation method of the thickness of a conductor shielding layer of the cable, which can accurately distinguish the edges of the insulation layer and the shielding layer and accurately calculate the thickness of the insulation layer and the thickness of the shielding layer.
[0131] (3) The application provides a calculation method of the area of a wire core, which processes the imaging area of the wire core as an ellipse, processes the outer frame of the wire core area as the major and minor axes of the ellipse, and calculates the area of the wire core according to the proportional relationship between the pixels and the actual size.
[0132] (4) The application provides a core counting method of a cable, which distinguishes the cores and the edges of the cores and counts the number of the cores according to the area.
[0133] (5) The application updates the intelligent detection method of the cable intelligent detector in real time: the equipment can be linked to the background through the 4G module, can remotely upgrade the machine, and can ensure that the equipment version is the latest.
[0134] (6) The application updates the database of the cable type or the cable model that cannot be recognized by the cable intelligent detector in a timely manner, returns the unrecognized pictures through the 4G network, updates the detector database through training in the background, gradually improves the database, and improves the recognition rate of the detector.
[0135] (7) The application uses a detection box as a box body, designs an integrated detector, reasonably utilizes the space of the detection box, reduces the overall volume of the detector, and reduces the weight of the detector.
[0136] Therefore, the cable intelligent detector has the following functions: (1) a function of automatically identifying the type of the cable; (2) a function of identifying the thickness of the shielding layer of the cable; (3) a function of calculating the cross section of the core (i.e., the wire core); (4) a function of calculating the number of the core wire core (i.e., the core of the wire core); (5) a function of remotely upgrading the cable intelligent detector by the system (i.e., the background); and (6) a function of manually identifying the unrecognized pictures returned by the cable intelligent detector and remotely updating the database of the cable intelligent detector by the system.
[0137] The above-mentioned embodiments only express several embodiments of the application, and the description is relatively specific and detailed, but it cannot be understood as a limitation on the scope of the patent. It should be pointed out that, for ordinary skilled persons in the art, without departing from the concept of the application, a number of modifications and improvements can be made, which belong to the protection scope of the application. Therefore, the protection scope of the patent of the application should be subject to the appended claims.
Claims
1. A method for detecting parameters of a cable, wherein the parameters include the thickness of the insulation shielding layer, the insulation layer, and the core shielding layer, characterized in that: The parameter detection method comprises the following steps: Step S11, converting the image to be identified into a brightness grayscale image, wherein the image to be identified is a front view image obtained by imaging the cable port of the cable at a target focal length and a target imaging distance from a front view perspective; Step S13: circling a corresponding image region 1 on the luminance grayscale image based on the image position and image diameter of the cable port in the reference image, counting the minimum grayscale value of pixels outside the image region 1 and using it as a threshold, thereby binarizing the luminance grayscale image; wherein the reference image is a front view image obtained by capturing the cable port of a cable of maximum size at the target focal length and the target imaging distance from a frontal perspective; Step S14, using a contour search function to search for the outer overall contour of the cable port in the binary image to be identified, and thereby obtain the corresponding overall area frame, which is the cable imaging area; Step S15, at the center of the cable imaging area n × n Pixel area position, get the rectangular area sub-image, n The value of n × n The area of the cable imaging area is always within the area of the cable imaging area, and the grayscale value of the rectangular area sub-image is greater than N The lowest grayscale value in that portion of pixels is used as another threshold value, thereby performing a binarization process on the image in the cable imaging area; Step S16, using a contour search function to search for the cable core area contour within the cable imaging area after the binary processing, and thereby obtain the corresponding core area outer frame, which is the core imaging area; Step S27, respectively calculating the center points of the cable imaging area and the wire core imaging area, and moving the center point of the cable imaging area to the center point of the wire core imaging area, and adjusting the cable imaging area: respectively increasing the width and height of the cable imaging area, and the increase in width and height is the absolute value of the horizontal deviation and the absolute value of the vertical deviation between the two center points; Step S28: The width and height of the adjusted cable imaging area are used as the major axis and minor axis of the ellipse, respectively. The formed ellipse is then expanded into an equivalent rectangle 1. Based on the mapping relationship between points on the ellipse and points on the equivalent rectangle 1, the pixel coordinate relationship of the adjusted cable imaging area is expressed as: Where, ( x , y ) represents the coordinates of the pixel on the adjusted cable imaging area; θ for( x , y ) is the angle in the elliptical coordinate system, ( x 1, y 1) is the coordinate of the pixel on the equivalent rectangle 1, a is the semi-major axis of the ellipse, b is the semi-minor axis of the ellipse; Step S29: for the equivalent rectangle 1, set the width and height to be a pixels, H2 pixels, divide the equivalent rectangle into a narrow strip area every 50 pixels from top to bottom, for a total of H2 / 50 narrow strip areas, intercept each narrow strip area sub-image, and reduce the narrow strip area sub-image downward to a narrow strip area sub-image with a height of 1 pixel by calculating the grayscale average; where H2=2*a+2*b; Step S210: For each narrow strip area sub-image on the left b -2 pixels calculate the grayscale difference of the next 2 pixels to get the corresponding gradient map; Step S211: traverse all gradient values of the gradient graph of each narrow strip area sub-graph from left to right, and find multiple gradient maximum points with the largest positive gradient change and the largest negative gradient change. If the multiple gradient maximum points from the outermost edge of the cable imaging area to the middle part of the core imaging area meet the positive, negative, positive, negative, and each gradient maximum point is within a predetermined distance between the overall area outer frame and the core area outer frame, then the area between two adjacent positive and negative gradient maximum points is determined as two edges of one layer. Step S212, determining the distance between the two edges of each layer based on the pixel coordinate relationship, and then calculating the corresponding thickness by multiplying the distance by the ratio between the pixel and the actual size; In step S213, one of the layers whose thickness is to be calculated is defined as layer A. The thickness of layer A in H2 / 50 narrow strip areas is counted, and the area with the smallest layer A thickness is found. Based on this area, data of other narrow strip areas are obtained at intervals of 60°, and the measurement data of layer A for a total of 6 equally spaced narrow strip areas are returned.
2. The cable parameter detection method according to claim 1, wherein: The predetermined spacing is: the spacing between each gradient maximum point and the nearest outer frame is less than one tenth of the spacing between the two outer frames.
3. The cable parameter detection method according to claim 1, wherein: Before step S13, the method further includes the following steps: Step S12: performing noise reduction on the brightness grayscale image to remove noise points.
4. The cable parameter detection method according to claim 1, wherein: n The value is 100. N The value is 128.
5. The cable parameter detection method according to claim 1, wherein: In step S13 , the minimum grayscale value of pixels outside the picture area and located at a corner of the brightness grayscale image is counted as the threshold.
6. The cable parameter detection method according to claim 1, wherein: If the cable is a power cable, starting from left to right, the points between the two adjacent positive and negative gradient maximum values are determined as the insulation shield layer, insulation layer, core shield layer, and core in sequence; If the cable is an overhead cable, starting from left to right, the areas between two adjacent positive and negative gradient maximum points are determined as the insulation layer, the core shielding layer, and the core.
7. The cable parameter detection method according to claim 1, wherein: The parameter also includes the area of the wire core, and the parameter detection method further includes the following steps: Treating the line core imaging area as an ellipse, and using the width and height of the line core imaging area as the major axis and minor axis of the corresponding ellipse respectively; The area of the ellipse corresponding to the imaging area of the line core is calculated according to the proportional relationship between the pixels and the actual size, and is used as the area of the line core.
8. A cable intelligent detector, characterized in that: It adopts the cable parameter detection method as described in any one of claims 1 to 7.
9. The intelligent cable detector according to claim 8, characterized in that: The cable intelligent detector comprises: A camera, which is used to capture images according to the target focal length; A positioning frame is used to position the cable and position the cable port in the center area of the camera's image, with the cable port being at a target distance from the camera.
10. A detection method for a cable intelligent detector, characterized in that: It includes the cable parameter detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cable section structure measuring and calculating method, system, and device and readable storage medium
CN110108219A
Detection method and detection equipment for thickness of cable insulation layer
CN114199139A