CN116823808A - Intelligent detection method for cable stranded wire based on machine vision - Google Patents
Intelligent detection method for cable stranded wire based on machine vision Download PDFInfo
- Publication number
- CN116823808A CN116823808A CN202311061566.0A CN202311061566A CN116823808A CN 116823808 A CN116823808 A CN 116823808A CN 202311061566 A CN202311061566 A CN 202311061566A CN 116823808 A CN116823808 A CN 116823808A
- Authority
- CN
- China
- Prior art keywords
- cable
- suspected
- gray
- stranded wire
- edge
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 32
- 230000008859 change Effects 0.000 claims abstract description 11
- 230000009466 transformation Effects 0.000 claims abstract description 5
- 238000007781 pre-processing Methods 0.000 claims abstract description 4
- 238000000034 method Methods 0.000 claims description 14
- 238000013139 quantization Methods 0.000 claims description 12
- 238000009825 accumulation Methods 0.000 claims description 8
- 238000005260 corrosion Methods 0.000 claims description 8
- 230000007797 corrosion Effects 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 6
- 238000003708 edge detection Methods 0.000 claims description 5
- 238000009499 grossing Methods 0.000 claims description 3
- 239000004020 conductor Substances 0.000 description 6
- 239000004973 liquid crystal related substance Substances 0.000 description 6
- 230000000737 periodic effect Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000556 factor analysis Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/001—Industrial image inspection using an image reference approach
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/155—Segmentation; Edge detection involving morphological operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/168—Segmentation; Edge detection involving transform domain methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20048—Transform domain processing
- G06T2207/20061—Hough transform
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention relates to the technical field of image processing, and provides a machine vision-based intelligent detection method for cable strands, which comprises the following steps: acquiring cable stranded wire images and preprocessing; obtaining suspected cable edge lines by Hough transformation, calculating edge matching degree among the suspected cable edge lines, obtaining suspected cable areas and representative line segments of the suspected cable areas, calculating line helicity of each suspected cable area according to change of pixel point gray values on the representative line segments, and further judging whether each suspected cable area is a cable stranded wire area; and judging whether stranding occurs or not according to the difference value between the actual length and the predicted length of each wave peak section on the gray scale waveform curve corresponding to the cable stranded wire area. The invention aims to solve the problem that the cable stranded wire is difficult to distinguish from the background environment, so that the detection result is inaccurate and a larger error is generated.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an intelligent detection method for a cable stranded wire based on machine vision.
Background
The electric wires and cables are widely applied to facilities and equipment used in the operation of an economic system, particularly a huge power transmission system and an information transmission system, are used for all social activities and go deep into daily life of each family and individual, but the electric wires and cables are wide in distribution range, unlike a motor, a transformer or information transmitting equipment, a program control switch and the like which are arranged on a certain node, are easy to control and maintain, and if one node fails, other nodes are not generally involved, and the electric wires and cables are generally not maintainable and can only be replaced. Therefore, the intelligent detection of the cable stranded wire has very important practical significance.
However, because the environment where the cable is located is generally complex, it is difficult to distinguish the cable from the background, so that the detection result of the cable stranded wire is not accurate enough.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide an intelligent detection method for a cable stranded wire based on machine vision, so as to solve the problem that the existing cable stranded wire is difficult to distinguish from a background environment, so that a detection result is inaccurate and a larger error is generated, and the adopted technical scheme is as follows:
the embodiment of the invention provides a machine vision-based intelligent detection method for cable strands, which comprises the following steps:
acquiring a cable stranded wire image, and preprocessing the cable stranded wire image to acquire a cable gray level image;
acquiring a suspected cable edge line and a start point and an end point of the suspected cable edge line in the cable gray image by using Hough transformation;
acquiring the edge matching degree between the suspected cable edge lines according to the starting point and the ending point of the suspected cable edge lines; acquiring a suspected cable area according to the edge matching degree between the suspected cable edge lines;
acquiring a representative line segment of the suspected cable region according to the starting point and the ending point of the suspected cable edge line; acquiring a gray waveform curve of the suspected cable region according to the gray value change of the pixel points on the representative line segment of the suspected cable region;
acquiring corresponding peak distance consistency and trough distance consistency according to the gray scale waveform curve;
obtaining the line helicity based on the crest distance consistency, the trough distance consistency and the gray waveform curve, and judging whether the suspected cable area is a cable stranded wire area or not;
acquiring the predicted length of each wave peak section according to the gray scale waveform curve of the cable stranded wire area; and judging whether stranding occurs in the cable stranded wire area at each wave crest section according to the difference value of the actual length and the predicted length of each wave crest section.
Optionally, the acquiring the suspected cable edge line and the start point and the end point of the suspected cable edge line in the cable gray image by using hough transform includes the following specific methods:
acquiring edge information of the cable gray level image by using an edge detection operator to obtain a binarized image; performing expansion corrosion on the binarized image to obtain an expansion corrosion image;
detecting a straight line in the expansion corrosion image by using a straight line detection algorithm to obtain a Hough straight line space accumulator array;
setting a first preset threshold value, and when the element value of the quantization parameter in the Hough straight line space accumulator array is larger than the first preset threshold value, primarily judging that the straight line represented by the corresponding quantization parameter is a suspected cable edge line;
and taking the end point with the smaller ordinate of the suspected cable edge line as a starting point and the end point with the larger ordinate as an ending point.
Optionally, the obtaining the edge matching degree between the suspected cable edge lines according to the start point and the end point of the suspected cable edge lines includes the specific method that:
calculating the length corresponding to the suspected cable edge line according to the starting point and the ending point of the suspected cable edge line in the cable gray image;
calculating the corresponding length according to the starting point and the ending point of the suspected cable edge line;
taking the absolute value of the difference between the lengths of the two suspected cable edge lines as a first absolute value, and taking the absolute value of the difference between the angle quantization parameters of the two suspected cable edge lines in the Hough linear space accumulator array as a second absolute value;
taking the opposite number of the product of the first absolute value and the second absolute value as a first opposite number, taking the first opposite number as an exponential function based on a natural constant, and recording the exponential function as the edge matching degree between two suspected cable edge lines.
Optionally, the obtaining the suspected cable area according to the edge matching degree between the suspected cable edge lines includes the specific method that:
and when the edge matching degree between the suspected cable edge lines is larger than a second preset threshold value, the two suspected cable edge lines are successfully matched, and the starting points and the ending points of the two suspected cable edge lines which are successfully matched are used as vertexes to form a suspected cable area.
Optionally, the obtaining the representative line segment of the suspected cable area according to the start point and the end point of the suspected cable edge line includes the specific method that:
and taking the midpoints of the starting points of the two suspected cable edge lines of the suspected cable area as the starting point of the representative line segment, and taking the midpoints of the ending points as the ending points of the representative line segment to obtain the representative line segment corresponding to the suspected cable area.
Optionally, the obtaining the gray waveform curve of the suspected cable region according to the gray value change of the pixel point on the representative line segment of the suspected cable region includes the specific method that:
marking each pixel point on the representative line segment of the suspected cable region according to the appearance sequence from the starting point of the representative line segment;
taking the marks representing the pixel points on the line segments as the abscissa and the gray value as the ordinate, and establishing a gray fluctuation line graph;
and sequentially connecting corresponding points of each adjacent pixel point in the gray fluctuation line graph to obtain the gray fluctuation line graph, and performing smoothing on the gray fluctuation line graph by using a filtering algorithm to obtain the gray waveform curve of the suspected cable region.
Optionally, the obtaining the corresponding peak distance consistency and trough distance consistency according to the gray scale waveform curve includes the specific steps of:
acquiring each extreme point of the gray waveform curve, and marking the maximum point as a wave crest and the minimum point as a wave trough;
recording positions and gray values of wave crests and wave troughs, calculating the distance between two adjacent wave crests, and obtaining the polar difference and standard deviation of the distance between the adjacent wave crests on the gray waveform curve;
taking the product of the polar difference and the standard deviation of the distance between adjacent wave peaks on the gray waveform curve as a first product, and taking the reciprocal of the first product as the corresponding consistency of the wave peak distance;
and obtaining the trough distance consistency corresponding to the gray scale waveform curve.
Optionally, the specific method includes obtaining a line spiral degree based on the peak distance consistency, the trough distance consistency and the gray waveform curve, and judging whether the suspected cable region is a cable stranded wire region, where the specific method includes:
taking the sum of the peak distance consistency and the trough distance consistency as a first accumulation sum, taking the sum of the numbers of peaks and troughs as a second accumulation sum, and taking the product of the first accumulation sum and the second accumulation sum as a second product;
normalizing the second product to obtain the screw degree of the texture;
and when the line helicity of the suspected cable area is larger than a third preset threshold value, judging the area as a cable stranded wire area.
Optionally, the method for obtaining the predicted length of each peak segment according to the gray scale waveform curve of the cable stranded wire area includes the following specific steps:
obtaining a wave crest distance sequence according to the distance between adjacent wave crests on a gray scale waveform curve corresponding to a cable stranded wire area, forming wave crest sections between the adjacent wave crests, wherein the element value of the wave crest distance sequence is equal to the length of each wave crest section, and predicting the element value according to a first preset number of element values in the wave crest distance sequence by using a time sequence prediction model to obtain the predicted length of each wave crest section.
Optionally, the method for judging whether the cable strand area is scattered at each peak section according to the difference value between the actual length and the predicted length of each peak section includes the following specific steps:
acquiring absolute values of difference values of the actual length and the predicted length of each wave peak section, and recording the absolute values as first difference values;
and when the first difference value is larger than a fourth preset threshold value, judging that stranding occurs in the cable stranded wire area at the corresponding wave peak section, otherwise, no stranding occurs.
The beneficial effects of the invention are as follows: according to the matching criterion that two edges of the same cable are almost parallel and the lengths are approximately equal, the suspected cable edge line with the highest matching degree is obtained for each suspected cable edge line, and the accuracy of cable stranded wire detection is improved; inside the cable areas, the gray value change of the pixel points on the middle straight line parallel to the edges of the cable areas is less influenced by external environment, the midpoints of the starting points and the ending points of the two suspected cable edge lines of each suspected cable area are connected to form corresponding representative line segments, and then whether the suspected cable areas are cable areas or not is judged according to whether the gray value change of the pixel points on the representative line segments has periodic characteristics or not, so that the accuracy of cable stranded wire detection is further improved; because the cable is formed by twisting the stranded wires and is in a spiral area, a large number of wave peaks and wave troughs exist on a gray waveform curve of the cable area, the wave peak distance consistency and the wave trough distance consistency are integrated, the total number of the wave peaks and the wave troughs are determined together through multi-factor analysis, and then whether the suspected cable area is the cable stranded wire area is judged, the problem that a detection result is inaccurate and a large error is generated due to the fact that the cable stranded wire is difficult to distinguish from a background environment is solved, and the reliability of cable stranded wire detection is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic flow chart of a machine vision-based intelligent detection method for cable strands according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a representative line segment of a suspected cable region.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a machine vision-based intelligent detection method for cable strands according to an embodiment of the invention is shown, and the method includes the following steps:
s001, acquiring a cable stranded wire image, and preprocessing the cable stranded wire image to acquire a cable gray level image.
The purpose of this embodiment is that cable stranded conductor carries out intellectual detection system, because the environment that cable stranded conductor is located is comparatively complicated to when cable stranded conductor takes place to scatter the strand, often the defect is comparatively tiny, and industry camera has the characteristics of high resolution, can catch the tiny defect on the cable stranded conductor, consequently, this embodiment uses industry camera to acquire high accuracy cable stranded conductor image, and the implementer also can use other cameras to acquire cable stranded conductor image.
And the NLM non-local mean filtering is used for carrying out image enhancement on the obtained cable stranded wire image, so that the accuracy of subsequent analysis is improved, an implementer can also adopt other image enhancement and denoising methods, and then the obtained RGB image of the cable stranded wire is converted into a cable gray image, so that the subsequent image processing is convenient.
So far, the preprocessed cable gray level image is obtained.
Step S002, firstly obtaining suspected cable edge lines by using Hough transformation, then obtaining the starting points and the ending points of the suspected cable edge lines, obtaining the edge matching degree between the suspected cable edge lines according to the starting points and the ending points of the suspected cable edge lines, and then obtaining the suspected cable region according to the edge matching degree between the suspected cable edge lines.
It should be noted that, because the environment where the cable is located is complex, when detecting the cable stranded wire, the cable stranded wire needs to be distinguished from the background environment first.
Specifically, the edge detection operator is used to obtain the edge information of the cable gray level image, so as to obtain a binarized image, and the embodiment uses the canny edge detection operator, so that an operator can also adopt other edge detection algorithms.
It should be further noted that, the whole cable presents a long straight line, but the interior of the cable presents a spiral shape, and the surrounding environment is complex, if the cable stranded wire area in the image is extracted by directly using the straight line detection algorithm, the cable stranded wire area may be interfered by the edges of other objects in the external environment or the straight line in the cable, so that the cable stranded wire area is extracted erroneously, therefore, the expansion corrosion operation is needed to be used for the binarized image, the influence of stranded wire stranded edges in the cable is weakened, and the accuracy of extracting the cable area is improved; and then detecting the straight line in the image by using Hough straight line transformation on the binarized image after the expansion corrosion to obtain a Hough straight line space accumulator matrix, and the practitioner can also adopt other straight line detection algorithms.
Specifically, one dimension of the Hough straight line spatial accumulator matrix is the quantization angleThe other dimension is the quantization distance +.>The value of each element of the matrix +.>Equal to the quantization parameter ∈>The sum of the points or pixels on the line represented. Since the cable is usually relatively long, in order to reduce interference of other linear objects in the environment, a first preset threshold is set, when the element value of the Hough linear spatial accumulator array is +.>When the quantization parameter is larger than a first preset threshold value, primarily judging the quantization parameterThe straight line is a suspected cable edge line, the starting point and the ending point of the suspected cable edge line in the cable gray level image are obtained, and the first preset threshold empirical value is half of the width of the cable gray level image.
It should be further noted that, in order to obtain a complete suspected cable area, two edges of the same cable are almost parallel and have approximately equal lengths, an edge matching degree between the suspected cable edge lines needs to be calculated according to a matching criterion that angles are not different greatly and the lengths are approximately equal, and a suspected cable edge line matched with each suspected cable edge line is obtained.
Specifically, the specific calculation method of the edge matching degree between the suspected cable edge lines comprises the following steps:
wherein, the liquid crystal display device comprises a liquid crystal display device,is an exponential function with a natural constant as a base; />Between the ith and jth suspected cable edge linesEdge matching degree; />、/>The angle quantization parameters of the ith suspected cable edge line and the jth suspected cable edge line in the Hough straight line space are respectively; />、/>The lengths of the ith suspected cable edge line and the jth suspected cable edge line are respectively.
It should be noted that, when the angles of the two suspected cable edge lines are smaller and the lengths are approximately equal, the more likely that the two edges are parallel and belong to the same object, the higher the edge matching degree is.
Specifically, when the edge matching degree is greater than a second preset threshold, the two suspected cable edge lines are successfully matched, starting points and ending points of the two suspected cable edge lines which are successfully matched are used as vertexes to form a suspected cable area, and the second preset threshold experience value is 0.5.
Thus, a suspected cable area in the cable gray level image is obtained.
Step S003, obtaining representative line segments of each suspected cable region, obtaining peak distance consistency and trough distance consistency on the representative line segments according to gray value changes of pixel points on the representative line segments, calculating corresponding line helicity, and further judging whether each suspected cable region is a cable stranded wire region.
In the cable twisted line region, the gray value of the pixel point on the middle straight line parallel to the edge of the cable twisted line region is less affected by the external environment, so that the middle straight line parallel to the edge line of the suspected cable corresponding to the suspected cable region can be used as a representative line segment of the suspected cable region, and the change of the gray value of the pixel point on the representative line segment can be used for representing the longitudinal change condition of the gray value of the suspected cable region.
Specifically, a midpoint of a start point of two suspected cable edge lines in each suspected cable area is taken as a start point of a representative line segment, a midpoint of a stop point is taken as a stop point of the representative line segment, the start point and the stop point of the representative line segment are connected to form the representative line segment, a schematic diagram of the representative line segment of the suspected cable area is shown in fig. 2, wherein (x 1, y 1) is an abscissa of the start point of one suspected cable edge line in the suspected cable area, (x 2, y 2) is an abscissa of the start point of another suspected cable edge line in the suspected cable area, (x 3, y 3) is an abscissa of the stop point of the one suspected cable edge line in the suspected cable area, and (x 4, y 4) is an abscissa of the stop point of the other suspected cable edge line in the suspected cable area.
It should be further noted that, because the gray value of the cable stranded wire is relatively single inside the cable region, the gray value at the stranded gap of the outer stranded wire is relatively small and is presented as a spiral region, and the gray value of the pixel point presents a certain periodic variation on a straight line parallel to the edge inside the cable, whether the region is the cable region can be judged according to whether the gray value variation of the pixel point on the representative line segment of the suspected cable region has a periodic feature or not; when the region is a spiral region, the distance between adjacent peaks of the gray waveform curve is consistent to a higher degree, the distance between adjacent troughs is consistent to a higher degree, and the number of peaks and troughs is more.
Specifically, each pixel point on a representative line segment of a suspected cable area is marked according to the appearance sequence from the starting point of the representative line segment, then the mark of each pixel point on the representative line segment is used as an abscissa, a gray value is used as an ordinate, a scatter diagram is drawn according to the position and the gray value of each pixel point, then each adjacent pixel point is connected to obtain a gray waveform curve, and before the gray waveform curve is analyzed, a filtering algorithm is used for smoothing the gray waveform curve to reduce errors caused by accidental factors, and in this embodiment, an average filtering algorithm is adopted, and an embodiment can also adopt other filtering algorithms.
Further, each extreme point of the gray waveform curve is obtained, the maximum point is a peak, the minimum point is a trough, the position and the gray value are recorded, the distance between two adjacent peaks is obtained, and the peak distance consistency is calculated. The specific calculation method of the peak distance consistency comprises the following steps:
wherein, the liquid crystal display device comprises a liquid crystal display device,the consistency of the wave crest distance; />Is the maximum value of the distance between adjacent wave peaks, +.>Is the minimum value of the distance between adjacent wave peaks; />The degree of dispersion of the distance between adjacent peaks is reflected as the standard deviation of the distance between adjacent peaks.
When the difference between the maximum value and the minimum value of the distances between the adjacent wave peaks is larger, the fluctuation range of the distances between the adjacent wave peaks is larger, and the consistency of the wave peak distances of the gray waveform curve is lower; when the standard deviation of the distance between the adjacent peaks is larger, the higher the degree of dispersion of the distance between the adjacent peaks is, the lower the peak distance consistency of the gray waveform curve is.
It should be further noted that, because the cable is stranded by the stranded wire and presents as the heliciform district, there are a large amount of crests, troughs on the gray waveform curve of cable district, and the degree of uniformity of distance between adjacent crest, the adjacent trough is higher, therefore can be suspected cable district represent crest distance uniformity, trough distance uniformity and crest, trough total number on the line segment, calculate suspected cable district's line helicity, and then whether this district is cable district according to gray waveform curve has periodic characteristic.
Specifically, according to the same method, the corresponding trough distance consistency is obtained according to the polar difference and standard deviation of the distance between two adjacent troughs on the gray waveform curve. Texture helicity of suspected cable regionThe specific calculation method of (a) is as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,represents an exponential function based on natural constants, < ->The consistency of the wave crest distance of the gray scale waveform curve on the representing line segment in the suspected cable region; />The valley distance consistency of the gray waveform curve on the representing line segment in the suspected cable area; />The number of extreme points on the gray waveform curve representing the line segment represents the total number of wave crests and wave troughs.
When the distance between adjacent wave crests and adjacent wave troughs on the gray waveform curve is higher, the gray value change corresponding to the pixel points on the representative line segment has periodic characteristics, and the line spiral degree is higher; when the total number of the wave crests and the wave troughs is larger, the period of the corresponding change of the gray value of the pixel points on the representative line segment is smaller, and the line helicity is higher; when the line helicity of the suspected cable area is larger than a third preset threshold, the area is judged to be a cable stranded wire area, and the third preset threshold is empirically valued to be 0.7.
Thus, a cable region in the cable gray scale image is acquired.
Step S004, judging whether stranding occurs at each wave peak section according to the difference value between the actual length and the predicted length of each wave peak section on the gray scale waveform curve corresponding to the cable stranded wire area.
It should be noted that, under normal conditions, the cable strands are tightly twisted together, the twisting gaps of the outer strands are smaller and have the same width, but when stranding occurs, the distance between adjacent peaks also increases at the position corresponding to the position where stranding occurs on the gray waveform curve due to the increase of the gaps between the strands.
Specifically, a wave crest distance sequence is constructed according to the distance between each two adjacent wave crests on the gray scale waveform curve corresponding to the cable stranded wire area, and wave crest sections are formed between the adjacent wave crests;
predicting the post element values according to the first preset number of element values in the wave crest distance sequence by using a time sequence prediction model to obtain the prediction length of each wave crest segment, wherein the first preset number of experience values are 5;
when the first difference value is larger than a fourth preset threshold value, judging that stranding occurs in the cable stranded wire area at the corresponding wave peak section, otherwise, stranding does not occur, and the fourth preset threshold value is obtained through experience and is 8.
Thus, intelligent detection of the stranding defects on the cable twisted wire is completed.
It should be noted that the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (10)
1. The intelligent detection method for the cable stranded wire based on the machine vision is characterized by comprising the following steps of:
acquiring a cable stranded wire image, and preprocessing the cable stranded wire image to acquire a cable gray level image;
acquiring a suspected cable edge line and a start point and an end point of the suspected cable edge line in the cable gray image by using Hough transformation;
acquiring the edge matching degree between the suspected cable edge lines according to the starting point and the ending point of the suspected cable edge lines; acquiring a suspected cable area according to the edge matching degree between the suspected cable edge lines;
acquiring a representative line segment of the suspected cable region according to the starting point and the ending point of the suspected cable edge line; acquiring a gray waveform curve of the suspected cable region according to the gray value change of the pixel points on the representative line segment of the suspected cable region;
acquiring corresponding peak distance consistency and trough distance consistency according to the gray scale waveform curve;
obtaining the line helicity based on the crest distance consistency, the trough distance consistency and the gray waveform curve, and judging whether the suspected cable area is a cable stranded wire area or not;
acquiring the predicted length of each wave peak section according to the gray scale waveform curve of the cable stranded wire area; and judging whether stranding occurs in the cable stranded wire area at each wave crest section according to the difference value of the actual length and the predicted length of each wave crest section.
2. The machine vision-based cable twisted intelligent detection method according to claim 1, wherein the acquiring the start point and the end point of the suspected cable edge line and the suspected cable edge line in the cable gray level image by using hough transform comprises the following specific steps:
acquiring edge information of the cable gray level image by using an edge detection operator to obtain a binarized image;
performing expansion corrosion on the binarized image to obtain an expansion corrosion image;
detecting a straight line in the expansion corrosion image by using a straight line detection algorithm to obtain a Hough straight line space accumulator array;
when the element value of the quantization parameter in the Hough straight line space accumulator array is larger than a first preset threshold value, primarily judging that a straight line represented by the corresponding quantization parameter is a suspected cable edge line;
and taking the end point with the smaller ordinate of the suspected cable edge line as a starting point and the end point with the larger ordinate as an ending point.
3. The machine vision-based intelligent detection method for cable strands according to claim 1, wherein the obtaining the edge matching degree between the suspected cable edge lines according to the start point and the end point of the suspected cable edge lines comprises the following specific steps:
calculating the corresponding length according to the starting point and the ending point of the suspected cable edge line;
taking the absolute value of the difference between the lengths of the two suspected cable edge lines as a first absolute value, and taking the absolute value of the difference between the angle quantization parameters of the two suspected cable edge lines in the Hough linear space accumulator array as a second absolute value;
taking the opposite number of the product of the first absolute value and the second absolute value as a first opposite number, taking the first opposite number as an exponential function based on a natural constant, and recording the exponential function as the edge matching degree between two suspected cable edge lines.
4. The machine vision-based intelligent detection method for cable strands according to claim 1, wherein the obtaining a suspected cable area according to the edge matching degree between the suspected cable edge lines comprises the following specific steps:
and when the edge matching degree between the suspected cable edge lines is larger than a second preset threshold value, the two suspected cable edge lines are successfully matched, and the starting points and the ending points of the two suspected cable edge lines which are successfully matched are used as vertexes to form a suspected cable area.
5. The machine vision-based intelligent detection method for cable strands according to claim 1, wherein the obtaining representative line segments of the suspected cable areas according to the start points and the end points of the suspected cable edge lines comprises the following specific steps:
and taking the midpoints of the starting points of the two suspected cable edge lines of the suspected cable area as the starting point of the representative line segment, and taking the midpoints of the ending points as the ending points of the representative line segment to obtain the representative line segment corresponding to the suspected cable area.
6. The machine vision-based cable twisted line intelligent detection method according to claim 1, wherein the obtaining the gray scale waveform curve of the suspected cable region according to the gray scale value change of the pixel points on the representative line segment of the suspected cable region comprises the following specific steps:
marking each pixel point on the representative line segment of the suspected cable region according to the appearance sequence from the starting point of the representative line segment;
taking the marks representing the pixel points on the line segments as the abscissa and the gray value as the ordinate, and establishing a gray fluctuation line graph;
and sequentially connecting corresponding points of each adjacent pixel point in the gray fluctuation line graph to obtain the gray fluctuation line graph, and performing smoothing on the gray fluctuation line graph by using a filtering algorithm to obtain the gray waveform curve of the suspected cable region.
7. The intelligent detection method for the cable stranded wires based on machine vision according to claim 1, wherein the obtaining the corresponding peak distance consistency and trough distance consistency according to the gray scale waveform curve comprises the following specific steps:
acquiring each extreme point of the gray waveform curve, and marking the maximum point as a wave crest and the minimum point as a wave trough;
recording positions and gray values of wave crests and wave troughs, calculating the distance between two adjacent wave crests, and obtaining the polar difference and standard deviation of the distance between the adjacent wave crests on the gray waveform curve;
taking the product of the polar difference and the standard deviation of the distance between adjacent wave peaks on the gray waveform curve as a first product, and taking the reciprocal of the first product as the corresponding consistency of the wave peak distance;
and obtaining the trough distance consistency corresponding to the gray scale waveform curve.
8. The intelligent detection method for cable stranded wires based on machine vision according to claim 1, wherein the specific method for obtaining the line spiral degree and judging whether the suspected cable area is a cable stranded wire area based on the peak distance consistency, the trough distance consistency and the gray scale waveform curve comprises the following steps:
taking the sum of the peak distance consistency and the trough distance consistency as a first accumulation sum, taking the sum of the numbers of peaks and troughs as a second accumulation sum, and taking the product of the first accumulation sum and the second accumulation sum as a second product;
normalizing the second product to obtain the screw degree of the texture;
and when the line helicity of the suspected cable area is larger than a third preset threshold value, judging the area as a cable stranded wire area.
9. The intelligent detection method for the cable stranded wires based on machine vision according to claim 1, wherein the obtaining the predicted length of each wave peak section according to the gray scale waveform curve of the cable stranded wire area comprises the following specific steps:
obtaining a wave crest distance sequence according to the distance between adjacent wave crests on a gray scale waveform curve corresponding to the cable stranded wire area, wherein wave crest sections are formed between the adjacent wave crests, and the element value of the wave crest distance sequence is equal to the length of each wave crest section;
and predicting the post element values according to the first preset number of element values in the wave crest distance sequence by using a time sequence prediction model to obtain the prediction length of each wave crest section.
10. The intelligent detection method for cable stranded wires based on machine vision according to claim 1, wherein the judging whether the cable stranded wire area is scattered at each peak section according to the difference value between the actual length and the predicted length of each peak section comprises the following specific steps:
acquiring absolute values of difference values of the actual length and the predicted length of each wave peak section, and recording the absolute values as first difference values;
and when the first difference value is larger than a fourth preset threshold value, judging that stranding occurs in the cable stranded wire area at the corresponding wave peak section, otherwise, no stranding occurs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311061566.0A CN116823808B (en) | 2023-08-23 | 2023-08-23 | Intelligent detection method for cable stranded wire based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311061566.0A CN116823808B (en) | 2023-08-23 | 2023-08-23 | Intelligent detection method for cable stranded wire based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116823808A true CN116823808A (en) | 2023-09-29 |
CN116823808B CN116823808B (en) | 2023-11-17 |
Family
ID=88113022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311061566.0A Active CN116823808B (en) | 2023-08-23 | 2023-08-23 | Intelligent detection method for cable stranded wire based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116823808B (en) |
Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140168414A1 (en) * | 2012-12-19 | 2014-06-19 | Tenaris Connections Limited | Straightness Measurements of Linear Stock Material |
US20170263139A1 (en) * | 2014-08-01 | 2017-09-14 | Shenzhen Cimc-Tianda Airport Support Ltd. | Machine vision-based method and system for aircraft docking guidance and aircraft type identification |
WO2018077165A1 (en) * | 2016-10-24 | 2018-05-03 | 北京进化者机器人科技有限公司 | Door positioning method on the basis of binocular vision target detection for use in home environment |
EP3556576A1 (en) * | 2018-04-18 | 2019-10-23 | Bridgestone Europe NV/SA | Process and system for the detection of defects in a tyre |
CN112381848A (en) * | 2018-12-27 | 2021-02-19 | 浙江大学台州研究院 | Anti-interference method of instrument visual reading on-line monitoring system in complex environment |
CN113744197A (en) * | 2021-08-09 | 2021-12-03 | 福建工程学院 | Cable fault detection method based on red and ultraviolet composite imaging |
WO2022057607A1 (en) * | 2020-09-21 | 2022-03-24 | 杭州睿琪软件有限公司 | Object edge recognition method and system, and computer readable storage medium |
CN114387438A (en) * | 2022-03-23 | 2022-04-22 | 武汉锦辉压铸有限公司 | Machine vision-based die casting machine parameter regulation and control method |
CN114757949A (en) * | 2022-06-15 | 2022-07-15 | 济宁市海富电子科技有限公司 | Wire and cable defect detection method and system based on computer vision |
CN114972197A (en) * | 2022-04-28 | 2022-08-30 | 江苏启灏医疗科技有限公司 | X-ray film imaging quality evaluation method and system |
CN115082462A (en) * | 2022-08-22 | 2022-09-20 | 山东海鑫达石油机械有限公司 | Method and system for detecting appearance quality of fluid conveying pipe |
CN115205295A (en) * | 2022-09-16 | 2022-10-18 | 江苏新世嘉家纺高新科技股份有限公司 | Method for detecting tensile strength of garment fabric |
CN115239704A (en) * | 2022-09-19 | 2022-10-25 | 南通友联新材料科技有限公司 | Accurate detection and repair method for wood surface defects |
CN115272321A (en) * | 2022-09-28 | 2022-11-01 | 山东军冠纺织有限公司 | Textile defect detection method based on machine vision |
CN115311260A (en) * | 2022-09-29 | 2022-11-08 | 南通羿云智联信息科技有限公司 | Road surface quality detection method for highway traffic engineering |
CN115330762A (en) * | 2022-10-12 | 2022-11-11 | 纵驰电子科技(南通)有限责任公司 | Fuse wire breakage detection method of X-ray image |
CN115641329A (en) * | 2022-11-15 | 2023-01-24 | 武汉惠强新能源材料科技有限公司 | Lithium battery diaphragm defect detection method and system |
CN116205906A (en) * | 2023-04-25 | 2023-06-02 | 青岛豪迈电缆集团有限公司 | Nondestructive testing method for production abnormality in cable |
CN116503394A (en) * | 2023-06-26 | 2023-07-28 | 济南奥盛包装科技有限公司 | Printed product surface roughness detection method based on image |
CN116563282A (en) * | 2023-07-10 | 2023-08-08 | 东莞市博思特数控机械有限公司 | Drilling tool detection method and system based on machine vision |
-
2023
- 2023-08-23 CN CN202311061566.0A patent/CN116823808B/en active Active
Patent Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140168414A1 (en) * | 2012-12-19 | 2014-06-19 | Tenaris Connections Limited | Straightness Measurements of Linear Stock Material |
US20170263139A1 (en) * | 2014-08-01 | 2017-09-14 | Shenzhen Cimc-Tianda Airport Support Ltd. | Machine vision-based method and system for aircraft docking guidance and aircraft type identification |
WO2018077165A1 (en) * | 2016-10-24 | 2018-05-03 | 北京进化者机器人科技有限公司 | Door positioning method on the basis of binocular vision target detection for use in home environment |
EP3556576A1 (en) * | 2018-04-18 | 2019-10-23 | Bridgestone Europe NV/SA | Process and system for the detection of defects in a tyre |
CN112381848A (en) * | 2018-12-27 | 2021-02-19 | 浙江大学台州研究院 | Anti-interference method of instrument visual reading on-line monitoring system in complex environment |
WO2022057607A1 (en) * | 2020-09-21 | 2022-03-24 | 杭州睿琪软件有限公司 | Object edge recognition method and system, and computer readable storage medium |
CN113744197A (en) * | 2021-08-09 | 2021-12-03 | 福建工程学院 | Cable fault detection method based on red and ultraviolet composite imaging |
CN114387438A (en) * | 2022-03-23 | 2022-04-22 | 武汉锦辉压铸有限公司 | Machine vision-based die casting machine parameter regulation and control method |
CN114972197A (en) * | 2022-04-28 | 2022-08-30 | 江苏启灏医疗科技有限公司 | X-ray film imaging quality evaluation method and system |
CN114757949A (en) * | 2022-06-15 | 2022-07-15 | 济宁市海富电子科技有限公司 | Wire and cable defect detection method and system based on computer vision |
CN115082462A (en) * | 2022-08-22 | 2022-09-20 | 山东海鑫达石油机械有限公司 | Method and system for detecting appearance quality of fluid conveying pipe |
CN115205295A (en) * | 2022-09-16 | 2022-10-18 | 江苏新世嘉家纺高新科技股份有限公司 | Method for detecting tensile strength of garment fabric |
CN115239704A (en) * | 2022-09-19 | 2022-10-25 | 南通友联新材料科技有限公司 | Accurate detection and repair method for wood surface defects |
CN115272321A (en) * | 2022-09-28 | 2022-11-01 | 山东军冠纺织有限公司 | Textile defect detection method based on machine vision |
CN115311260A (en) * | 2022-09-29 | 2022-11-08 | 南通羿云智联信息科技有限公司 | Road surface quality detection method for highway traffic engineering |
CN115330762A (en) * | 2022-10-12 | 2022-11-11 | 纵驰电子科技(南通)有限责任公司 | Fuse wire breakage detection method of X-ray image |
CN115641329A (en) * | 2022-11-15 | 2023-01-24 | 武汉惠强新能源材料科技有限公司 | Lithium battery diaphragm defect detection method and system |
CN116205906A (en) * | 2023-04-25 | 2023-06-02 | 青岛豪迈电缆集团有限公司 | Nondestructive testing method for production abnormality in cable |
CN116503394A (en) * | 2023-06-26 | 2023-07-28 | 济南奥盛包装科技有限公司 | Printed product surface roughness detection method based on image |
CN116563282A (en) * | 2023-07-10 | 2023-08-08 | 东莞市博思特数控机械有限公司 | Drilling tool detection method and system based on machine vision |
Non-Patent Citations (2)
Title |
---|
曾洁;张德营;贾世杰;邹娟;: "基于边缘检测的焊缝图像自动识别算法", 大连交通大学学报, no. 01, pages 5 - 8 * |
石涵;都东;邹怡蓉;邵家鑫;王力;: "直缝钢管X射线图像焊缝缺陷检测降噪算法", 中国科技论文, no. 08, pages 59 - 61 * |
Also Published As
Publication number | Publication date |
---|---|
CN116823808B (en) | 2023-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115841493B (en) | Cable detection method based on image processing | |
CN116934740B (en) | Plastic mold surface defect analysis and detection method based on image processing | |
CN110827311B (en) | Imaging method-based cable conductor sectional area measurement method and system | |
CN108489996A (en) | A kind of defect inspection method of insulator, system and terminal device | |
CN116137036B (en) | Gene detection data intelligent processing system based on machine learning | |
CN113920122B (en) | Cable defect detection method and system based on artificial intelligence | |
CN112365475A (en) | Power transmission line icing monitoring method and system based on image processing mode | |
CN115330790B (en) | Image-based cable strand quality detection method and system | |
CN115858832A (en) | Method and system for storing production data of steel strand | |
CN111123263B (en) | Tunnel reinforcing steel bar identification and detection system and method based on geological radar detection data | |
CN116823808B (en) | Intelligent detection method for cable stranded wire based on machine vision | |
CN115908431A (en) | Cable positioning and accommodating method for power transmission and transformation project | |
CN110084814B (en) | Surface coating measuring method, device, computer equipment and storage medium | |
CN114663755A (en) | Neural network training method for intelligent detection of semiconductor wafer roughness | |
CN115063337A (en) | Intelligent maintenance decision-making method and device for buried pipeline | |
CN117011280A (en) | 3D printed concrete wall quality monitoring method and system based on point cloud segmentation | |
CN116612176A (en) | Method and device for measuring size of rolled bar and wire shearing waste | |
CN110927159A (en) | Method for rapidly detecting conductor core compression coefficient of distribution network cable | |
CN115631370A (en) | Identification method and device of MRI (magnetic resonance imaging) sequence category based on convolutional neural network | |
CN116958138B (en) | Sampling control method, system, equipment and medium for bridge detection | |
CN117291916B (en) | Polyimide film surface detection method and system based on machine vision | |
CN112381799A (en) | Method and device for confirming broken strands of conducting wires, electronic equipment and computer readable storage medium | |
CN111649804A (en) | Oil level monitoring method and device with storage function | |
CN117115152B (en) | Steel strand production monitoring method based on image processing | |
CN118037735B (en) | Cable insulation skin damage identification method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |