A cable strand quality detection method based on image features
By calculating the grayscale characteristic quantity and rotation angle of the cable strand, establishing the characteristic curve and segmenting it, and combining with the Otsu method for threshold segmentation, the problem of difficulty in accurately identifying cable strand defects in the existing technology is solved, and higher detection accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202411621280.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The prior art is difficult to accurately divide the cable stranded gap and defects on the iron wire simultaneously, resulting in a decrease in product pass rate and overall quality.
By obtaining continuous image frames of cable strands, calculating grayscale feature quantities, establishing feature curves and segmenting, obtaining the rotation angle of the stranded wire, calculating the defects and defects of pixel points, adjusting the contrast of pixel points, using the Otsu method for threshold segmentation, accurately identifying the defect location of the cable stranded wire.
It improves the accuracy of identifying potential defects of cable strands, enhances contrast and makes the defect area more prominent, reduces the possibility of misjudgment and misjudgment, and improves the accuracy of defect detection.
Smart Images

Figure CN119151912B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and more specifically, to a cable strand quality detection method based on image features. Background Art
[0002] In the structure of cable strands, steel core is used to increase strength. Cables with this structure are called steel core aluminum stranded wire (LGJ) or steel core aluminum alloy stranded wire. The use of steel core is mainly to improve the mechanical strength of the cable, while aluminum stranded wire is used to transmit electrical energy. This combination allows the cable to have sufficient strength while maintaining good conductivity. Cable strands are widely used in overhead power transmission lines, connecting wires for electrical equipment, power cables, communication cables, etc. Different types of stranded wires, such as aluminum stranded wire, hard copper stranded wire, aluminum alloy stranded wire, etc., are used in different application scenarios according to their characteristics and advantages. At the same time, the quality of cable strands directly affects the performance, safety and service life of the cable. Combining computer vision and image processing technology to analyze the appearance characteristics of cable strands to judge quality and integrity can significantly improve detection efficiency and reduce the time and cost of manual detection.
[0003] The existing Chinese patent application document with publication number CN116912234A discloses a cable strand quality detection method based on image features, which belongs to the field of image processing technology. In the application document, the cable strand appearance image is collected, the cable strand appearance image is partitioned, the image feature set of each image sub-area is extracted, and the image feature set of each image sub-area is processed using a defect recognition model. When the defect degree value output by the defect recognition model is greater than the defect degree threshold, there is a defect in the image sub-area. The defect degree values corresponding to each image sub-area are then combined to evaluate the quality of the cable strand.
[0004] In the above application document, the image feature set of the cable strand appearance image is compared with the image feature set of the label. When there is a large defect degree value, it means that there is a defect. The larger the defect degree value, the worse the quality of the cable strand. At present, the partitioning of the cable strand appearance image often requires Otsu threshold segmentation. Because the defects of the cable strand exist in the gap between the strands and the iron wire, there is a difference in the grayscale of the two. At the same time, the iron wire itself also has a curved surface, which forms the randomness of the defect. The traditional Otsu method cannot accurately segment the defects in the gap between the strands and the iron wire at the same time, resulting in a decrease in the qualified rate and overall quality of the product. Summary of the invention
[0005] In order to solve the problem that defects of cable strands exist in the gaps between the strands and the iron wires, so there is a difference in grayscale between the two, and the iron wire itself also has a curved surface, and the defects in the gaps between the strands and the iron wires cannot be accurately separated at the same time, the present invention provides solutions in the following aspects.
[0006] A cable strand quality detection method based on image features, comprising: obtaining a grayscale image of a cable strand image of continuous image frames, constructing a preset window according to the grayscale image, and obtaining a grayscale feature quantity of a pixel point according to the grayscale feature of the pixel point in the preset window; establishing a feature curve according to the grayscale feature of the pixel point in the continuous image frame and segmenting it to obtain a segmented curve, and obtaining a strand rotation angle according to the moving trajectory of the pixel point in the segmented curve; calculating the difference between a central pixel point and a neighboring pixel point in the preset window according to the grayscale feature quantity, the segmented curve and the strand rotation angle to obtain the defectivity of the pixel point; obtaining the defectivity of the pixel point in the window based on the defectivity, adjusting the contrast of the pixel point according to the defectivity of the pixel point corresponding to each image frame, and performing threshold segmentation on the adjusted pixel point using the Otsu method to obtain the defect position of the cable strand; wherein the defectivity satisfies the following relationship: , where Indicates the first The defect degree of each pixel, Indicates Pixel defects, Indicates the number of image frames, Indicates The pixel corresponds to the front of the image frame. Frame image Pixel defects, Indicates The pixel corresponds to the front of the image frame. Frame image The defect of the pixel with the smallest contrast among the pixels.
[0007] The effect is as follows: by comprehensively considering the grayscale feature quantity, characteristic curve and twisted wire rotation angle, the local characteristics and time series information of the image are analyzed; by using the dynamic time warping (DTW) matching value, the algorithm is made more sensitive to small changes in the characteristic curve and more accurately identifies potential defects in the cable twisted wire; by adjusting the contrast of the pixels, the potential defective area can be made more prominent in the image; enhancing the contrast helps to improve the accuracy of the automated detection system using the Otsu threshold segmentation method, making the difference between the defect and the surrounding normal area more obvious, thereby reducing the possibility of misjudgment and missed judgment, and thus improving the accuracy of defect detection.
[0008] Preferably, the grayscale feature quantity includes:
[0009] Taking any pixel in the grayscale image as the center pixel, a preset window is constructed, and the sum of the absolute values of the grayscale differences between all pixels in the window and the center pixel is calculated and multiplied by the grayscale value of the center pixel to obtain the grayscale feature of the center pixel.
[0010] The effect is that through the local grayscale changes between the central pixel and its surrounding pixels, the grayscale feature of the central pixel can reflect the grayscale distribution of its surrounding area, thereby emphasizing local grayscale changes and enhancing texture and edge information to improve the accuracy and efficiency of image analysis.
[0011] Preferably, the establishing of the characteristic curve comprises:
[0012] Get each pixel point in the continuous image frame, take any pixel point as the target pixel point, and establish the characteristic curve of the target pixel point in time sequence, where one pixel point corresponds to one characteristic curve, the horizontal axis of the characteristic curve is the frame number, and the vertical axis is the grayscale feature value of the pixel point.
[0013] The effect is: by establishing the characteristic curve of the target pixel point in time sequence, the grayscale changes of the pixel point in continuous frames can be captured to form time series data; by analyzing the characteristic curve, abnormal patterns that do not conform to the normal periodic pattern can be identified, thereby locating potential defects.
[0014] Preferably, segmenting the characteristic curve comprises:
[0015] The wire gap spacing of the cable strands, the rotation speed of the test bench, and the time when the adjacent wires of the cable strands rotate to the overlapping position are obtained, and the time from the starting point of the wire to the overlapping position with the adjacent wire is defined as a cycle, and the curve is segmented according to the cycle time.
[0016] The effect is that by segmenting the characteristic curve according to the cycle time, the segmented curve can more accurately reflect the behavior changes of the cable strands in each cycle, and can capture the periodic characteristics of the cable strands during the rotation process.
[0017] Preferably, the twisted wire rotation angle includes:
[0018] According to each curve segment, any pixel point in the curve segment is taken as the target pixel point, and the difference between the grayscale feature value of the target pixel point and the grayscale feature value of the pixels in the neighborhood is taken as the contrast value of the target pixel point. The corresponding pixel point in the neighborhood with the smallest contrast value is obtained and connected with the target pixel point, and the angle between the connecting line and the vertical direction is taken as the twisting line rotation angle of the target pixel point.
[0019] The effect is that by obtaining the rotation angle of the cable strands, we can better understand the local deformation and damage of the cable strands, such as breakage, wear or corrosion. Since the cable strands are spiral, the traditional image analysis method may become complicated. By obtaining the rotation angle, we can better understand the spiral structure of the cable strands, enhance the understanding of the dynamic behavior of the cable strands, and thus improve the reliability and efficiency of the automated detection system.
[0020] Preferably, calculating the difference between the central pixel and the neighboring pixel in the preset window to obtain the defect of the pixel includes:
[0021] Taking the characteristic curve of any pixel point as the target curve and any segment in the target curve as the target segment, the dynamic time warping matching value between the target segment and other segments in the target curve is calculated and normalized;
[0022] Calculate the product difference of the grayscale feature quantity of the data points in the target segment and other segments in the target curve and the corresponding twisted wire rotation angle respectively;
[0023] The normalized dynamic time warping matching value is multiplied by the absolute value of the product difference to obtain the pixel defect.
[0024] Preferably, the step of calculating the difference between the central pixel and the neighboring pixel in the preset window to obtain the defect of the pixel further includes:
[0025] Taking the characteristic curve of any pixel point as the target curve and any segment in the target curve as the target segment, the dynamic time warping matching value between the target segment and the overall average characteristic curve is calculated and normalized; the absolute difference between the target segment in the target curve and the average value of the grayscale feature quantity in all segments is taken as the feature quantity deviation, and the absolute difference between the twist rotation angle of any data point in the target segment and the average value of the twist rotation angle in all segments is taken as the angle deviation;
[0026] The product of the normalized dynamic time warping matching value, the feature quantity deviation and the angle deviation is used as the defect of the pixel point.
[0027] Preferably, adjusting the contrast of the pixel points includes:
[0028] Take any image frame as the image to be segmented, and multiply the original grayscale value of each pixel in the image to be segmented by the defect degree corresponding to the pixel to obtain the new grayscale value of the pixel.
[0029] The present invention has the following effects:
[0030] 1. The present invention calculates the difference between the grayscale feature value of the pixel point in each curve segment and the grayscale feature value of the pixel point in the neighborhood, and connects the pixel point in the neighborhood corresponding to the minimum contrast value with the target pixel point, so as to accurately obtain the rotation angle of the twisted wire, which helps to capture the spiral structural characteristics of the cable twisted wire, thereby improving the detection accuracy of the shape and direction changes of the cable twisted wire.
[0031] 2. The present invention obtains the defect degree of pixel points in each image frame by analyzing the grayscale feature quantity, segmented curve and rotation angle of the cable strands, and adjusts the corresponding pixel grayscale value according to the defect degree of each pixel point corresponding to each image frame, so as to enhance the defective pixel points on the strand gap and the iron wire in the image, make their grayscale similar and increase the contrast between the defective pixel points and other pixel points, and then use the Otsu method threshold to perform threshold segmentation to obtain the precise defect position of the cable strands, and then make timely adjustments to improve the accuracy of defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0033] Figure 1 It is a method flow chart of steps S1 to S4 in a cable strand quality detection method based on image features in an embodiment of the present invention.
[0034] Figure 2 It is a schematic diagram of the rotation angle of the twisted wire in a cable twisted wire quality detection method based on image features in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0036] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0037] Specific implementation scenario: Place the cable strands horizontally on the detection machine, make the cable strands rotate at a constant speed for one circle, use a high-definition camera to shoot the cable strands, and obtain continuous frames of cable strand images as the images to be detected.
[0038] Reference Figure 1 A cable strand quality detection method based on image features includes steps S1 to S4, which are specifically as follows:
[0039] It should be noted that, when the cable strands are free of defects, since the gaps between each iron wire and the strands are the same, the grayscale features of the pixels at positions close to the gaps between the iron wires and the strands in the cable strand image are approximately the same.
[0040] S1: obtaining a grayscale image of a cable strand image of a continuous image frame, constructing a preset window according to the grayscale image, and obtaining a grayscale feature quantity of a pixel point according to a grayscale feature of a pixel point in the preset window.
[0041] Taking any pixel in the grayscale image as the center pixel, a preset window is constructed, and the sum of the absolute values of the grayscale differences between all pixels in the window and the center pixel is calculated and multiplied by the grayscale value of the center pixel to obtain the grayscale feature of the center pixel.
[0042] In this embodiment, the preset window is 5×5, and the grayscale characteristics of the pixel points are represented in combination with the window situation. Because the grayscale characteristics of the pixel points at the position close to the iron wire and the gap between the twisted wires in the cable twisted wire image are approximately the same, the difference in grayscale between the pixel point and other pixels in the window is reflected by the difference, which indirectly shows the position of the pixel point in the cable twisted wire.
[0043] Specifically, the grayscale feature quantity satisfies the following relationship:
[0044] ;
[0045] In the formula, Indicates The grayscale feature of each pixel, Indicates The gray value of a pixel, Indicates The pixel point and the The grayscale difference of pixels, Indicates the number of pixels in the window.
[0046] That is, if the grayscale value of the central pixel is very high (i.e., the central pixel is very bright or very dark), then even small grayscale changes will become important because they will be amplified by the grayscale feature of the central pixel; conversely, if the grayscale value of the central pixel is very low, then only larger grayscale changes will have a significant effect on the grayscale feature.
[0047] In addition, in another embodiment, an exponential function is combined to enhance local contrast, so as to better capture edge and texture features in the image;
[0048] Take any pixel in the grayscale image as the center pixel, build a preset window, calculate the grayscale mean of all pixels in the window, and use the ratio of the deviation of each pixel's grayscale value and all grayscale means to the standard deviation as an exponential function. The negative exponential power of the base is used to obtain the weight factor of the pixel, and the product of the weight factor and the grayscale mean is used as the grayscale feature of the central pixel.
[0049] Specifically, the grayscale feature quantity satisfies the following relationship:
[0050] ;
[0051] In the formula, Indicates The grayscale feature of each pixel, Represents the total number of pixels in the window. Indicates the first The gray value of a pixel, Indicates The exponential function with base , Represents the mean grayscale value of all pixels in the window. Represents the standard deviation of the grayscale values of all pixels in the window.
[0052] Through the attenuation characteristics of the exponential function, the contribution of grayscale values far from the mean (which may be caused by noise) to the feature quantity is reduced, thereby suppressing the influence of noise to a certain extent. In the application of cable strand defect detection, the enhanced local contrast can help to more accurately identify potential defects, because defects usually break the normal periodic pattern and thus produce anomalies in the characteristic curve.
[0053] To further illustrate, during the rotation of the cable strands, under normal circumstances, because the light source is fixed and the cable strands rotate at a constant speed during detection, the grayscale features of the pixels in the cable strand image are periodic.
[0054] S2: Establish a characteristic curve according to the grayscale features of the pixels in the continuous image frames and segment it to obtain a segmented curve, and obtain the rotation angle of the twisted wire according to the moving trajectory of the pixels in the segmented curve.
[0055] Get each pixel point in the continuous image frame, take any pixel point as the target pixel point, and establish the characteristic curve of the target pixel point in time sequence, where one pixel point corresponds to one characteristic curve, the horizontal axis of the characteristic curve is the frame number, and the vertical axis is the grayscale feature value of the pixel point.
[0056] It should be noted that the characteristic curve corresponding to a pixel is acquired based on time series, which means that the characteristic curve is constructed by continuously capturing images of the cable strands at different time frames and analyzing the grayscale changes of the pixel in these images. It is conducive to tracking and analyzing the dynamic behavior of the pixel points, thereby revealing the subtle changes of the cable strands during rotation or movement. In this way, the characteristic curve can reflect the periodic characteristics of the cable strands and the abnormal or defective areas.
[0057] The strand gap spacing of the cable strands, the rotation speed of the test bench, and the time when the adjacent iron wires of the cable strands rotate to the overlapping position are obtained, and the time from the starting point of the iron wire to the overlapping position with the adjacent iron wire is defined as a cycle. The curve is segmented according to the cycle time to obtain a segmented curve.
[0058] That is to say, under normal circumstances, the gap between each strand of the cable strand is the same as that of the iron wire, so when the light source is fixed, the characteristic change fluctuation of the pixel points of continuous image frames is fixed, so the corresponding characteristic curve is periodic fluctuation. When there is an abnormality in the characteristic curve, there is a pixel position corresponding to the abnormal image frame. However, the periodic state change of the characteristic curve will produce fluctuations. Because the defects are random, the pixels at the same position will change differently when encountering different defects. Therefore, the abnormal position is obtained through the periodicity of the grayscale change curve corresponding to the pixel point.
[0059] Obtaining the twisted wire rotation angle includes:
[0060] According to each curve segment, any pixel point in the curve segment is taken as the target pixel point, and the difference between the grayscale feature value of the target pixel point and the grayscale feature value of the pixels in the neighborhood is taken as the contrast value of the target pixel point. The corresponding pixel point in the neighborhood with the smallest contrast value is obtained and connected with the target pixel point, and the angle between the connecting line and the vertical direction is taken as the twisting line rotation angle of the target pixel point.
[0061] In this embodiment, refer to Figure 2 , the red box is the target pixel The 16 neighborhood pixel points of the target pixel are obtained. The 16 neighborhood pixel points refer to a circle of pixel points around the 8 neighborhoods with the target pixel point as the center. The comparison between the target pixel point and the 16 neighborhood pixel points is calculated respectively. The 16 neighborhood pixel points are obtained in order to obtain a more accurate twisting wire rotation angle.
[0062] That is to say, since the twisted wire is spiral, the spiral angle of the twisted wire appears as a slant line in the image, and the first line with the smallest contrast is selected. pixels, and get the line connecting two pixels and the vertical line Angle The twist angle as a pixel.
[0063] S3: Calculate the difference between the central pixel and the neighboring pixel in the preset window according to the grayscale feature quantity, the segmented curve and the twisted wire rotation angle to obtain the defect of the pixel.
[0064] Taking the characteristic curve of any pixel point as the target curve and any segment in the target curve as the target segment, the dynamic time warping matching value between the target segment and other segments in the target curve is calculated and normalized;
[0065] Calculate the product difference of the grayscale feature quantity of the data points in the target segment and other segments in the target curve and the corresponding twisted wire rotation angle respectively;
[0066] The normalized dynamic time warping matching value is multiplied by the absolute value of the product difference to obtain the pixel defect.
[0067] It should be noted that by combining time series analysis and local feature analysis, the behavior changes of pixels in the cable strand image are quantified to identify potential defects.
[0068] Specifically, the defectivity satisfies the following relationship:
[0069] ;
[0070] In the formula, Indicates Pixel defects, Indicates The pixel The characteristic curve of the first The pixel DTW matching value of the segment feature curve, Indicates The pixel The first segment of the characteristic curve The grayscale feature of the data point is Indicates The pixel The first segment of the characteristic curve The twist angle of the data point is Indicates The pixel The first segment of the characteristic curve The grayscale feature of the data point is Indicates The pixel The first segment of the characteristic curve The twist angle of the data point is represents the number of curve segments, Represents the normalization function.
[0071] That is to say, The greater the defect of a pixel, the greater the possibility that the pixel at that position in the corresponding image frame has a defect. At the same time, the smaller the DTW matching value, the more similar the segment is to other segments, and the less likely the pixel has a defect. Conversely, the greater the possibility of a defect.
[0072] In addition, in another embodiment, the characteristic curve of any pixel point is used as the target curve, and any segment in the target curve is used as the target segment. The dynamic time warping matching value between the target segment and the overall average characteristic curve is calculated, and normalized.
[0073] The absolute difference between the target segment and the average value of the grayscale feature quantity in all segments in the target curve is taken as the feature quantity deviation, and the absolute difference between the twist rotation angle of any data point in the target segment and the average value of the twist rotation angle in all segments is taken as the angle deviation;
[0074] The product of the normalized dynamic time warping matching value, the feature deviation and the angle deviation is taken as the defect of the pixel.
[0075] Specifically, the defectivity satisfies the following relationship:
[0076] ;
[0077] In the formula, Indicates Pixel defects, represents the number of characteristic curve segments, Indicates the number of pixels in each segment, represents the normalization function, Indicates The pixel The DTW matching value between the segment feature curve and the overall average feature curve, Indicates The pixel The first segment of the characteristic curve The grayscale feature of the data point is Indicates The average value of the grayscale feature value of a pixel in all segments is Indicates The pixel The first segment of the characteristic curve The twist angle of the data point is Indicates The average value of the twist angle in all segments at each pixel.
[0078] That is to say, by comprehensively considering the changes in grayscale feature quantities and rotation angles, potential defects in cable strands can be more accurately identified, improving the accuracy of defect detection, and combined with the DTW matching value, the algorithm is more sensitive to small changes in the characteristic curve.
[0079] It should be noted that the defects of each pixel point of each image frame are obtained, and an arbitrary image is taken as an example for analysis. When an abnormality occurs, the cable strands are round. During the rotation process, the same defect may be obvious at times and not obvious at other times. Because the cable strands rotate at a constant speed, the same defect on the cable strands will exist in the corresponding position of the subsequent continuous frames as the cable strands rotate.
[0080] S4: Based on the defectivity, the defect degree of the pixel points in the window is obtained, the contrast of the pixel points is adjusted according to the defect degree of the pixel points corresponding to each image frame, and the adjusted pixel points are threshold segmented using the Otsu method to obtain the defect position of the cable strand.
[0081] Specifically, the defectivity satisfies the following relationship:
[0082] ;
[0083] In the formula, Indicates the first The defect degree of each pixel, Indicates Pixel defects, Indicates the number of image frames, Indicates The pixel corresponds to the front of the image frame. Frame image Pixel defects, Indicates The pixel corresponds to the front of the image frame. Frame image The defect of the pixel with the smallest contrast among the pixels.
[0084] In this embodiment, , that is, to obtain the first three frames of images corresponding to the target pixel. By considering the first three frames, the time series of the pixels can be analyzed more comprehensively, improving the accuracy and robustness of defect detection. Furthermore, the larger the defect value, the greater the possibility that the pixel is a defect.
[0085] Take any image frame as the image to be segmented, and multiply the original grayscale value of each pixel in the image to be segmented by the defect degree corresponding to the pixel to obtain the new grayscale value of the pixel.
[0086] It is further explained that by increasing the grayscale value of the defective position and reducing the grayscale value of the normal pixel, the defective pixel is highlighted to enhance the contrast between the defective pixel and other pixels in the image, and then the Otsu threshold is used for threshold segmentation to more accurately obtain the defective position of the cable strand.
[0087] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0088] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A cable strand quality detection method based on image features, characterized in that: include: Obtaining a grayscale image of the cable strand image of a continuous image frame, constructing a preset window according to the grayscale image, and obtaining a grayscale feature quantity of a pixel point according to the grayscale feature of the pixel point in the preset window; Establish a characteristic curve and segment it according to the grayscale characteristics of the pixels in the continuous image frames; Segmenting the characteristic curve includes: obtaining the wire gap spacing and the rotation speed of the detection platform of the cable strands and the time when the adjacent iron wire positions of the cable strands rotate to the overlapping position, defining the time from the starting point of the iron wire to the overlapping position with the adjacent iron wire as a cycle, and segmenting the curve according to the cycle time to obtain a segmented curve; obtaining the wire rotation angle according to the moving trajectory of the pixel points in the segmented curve, including: according to each curve segment, taking any pixel point in the curve segment as the target pixel point, taking the difference between the grayscale feature value of the target pixel point and the grayscale feature value of the pixel point in the neighborhood as the contrast value of the target pixel point, obtaining the corresponding pixel point in the neighborhood with the smallest contrast value and the target pixel point to connect the line, and taking the angle between the connecting line and the vertical direction as the wire rotation angle of the target pixel point; Calculate the difference between the central pixel point and the neighboring pixel points in the preset window according to the grayscale feature quantity, the segmented curve and the twisted wire rotation angle to obtain the defect of the pixel point; Based on the defect degree of the pixel points in the defect acquisition window, the contrast of the pixel points is adjusted according to the defect degree of the pixel points corresponding to each image frame, and the adjusted pixel points are threshold segmented using the Otsu method to obtain the defect position of the cable strand; Wherein, the defect degree satisfies the following relationship: , where Indicates the first The defect degree of each pixel, Indicates Pixel defects, Indicates the number of image frames, Indicates The pixel corresponds to the front of the image frame. Frame image Pixel defects, Indicates The pixel corresponds to the front of the image frame. Frame image The defect of the pixel with the smallest contrast among the pixels.
2. The cable strand quality detection method based on image features according to claim 1 is characterized in that: The grayscale feature quantity includes: Taking any pixel in the grayscale image as the center pixel, a preset window is constructed, and the sum of the absolute values of the grayscale differences between all pixels in the window and the center pixel is calculated and multiplied by the grayscale value of the center pixel to obtain the grayscale feature of the center pixel.
3. The cable strand quality detection method based on image features according to claim 1 is characterized in that: The establishing of the characteristic curve comprises: Get each pixel point in the continuous image frame, take any pixel point as the target pixel point, and establish the characteristic curve of the target pixel point in time sequence, where one pixel point corresponds to one characteristic curve, the horizontal axis of the characteristic curve is the frame number, and the vertical axis is the grayscale feature value of the pixel point.
4. The cable strand quality detection method based on image features according to claim 1 is characterized in that: The calculating the difference between the central pixel point and the neighboring pixel points in the preset window to obtain the defect of the pixel point includes: Taking the characteristic curve of any pixel point as the target curve and any segment in the target curve as the target segment, the dynamic time warping matching value between the target segment and other segments in the target curve is calculated and normalized; Calculate the product difference of the grayscale feature quantity of the data points in the target segment and other segments in the target curve and the corresponding twisted wire rotation angle respectively; The normalized dynamic time warping matching value is multiplied by the absolute value of the product difference to obtain the pixel defect.
5. The cable strand quality detection method based on image features according to claim 1 is characterized in that: The calculating of the difference between the central pixel point and the neighboring pixel points in the preset window to obtain the defect of the pixel point also includes: Taking the characteristic curve of any pixel point as the target curve and any segment in the target curve as the target segment, the dynamic time warping matching value between the target segment and the overall average characteristic curve is calculated and normalized; the absolute difference between the target segment in the target curve and the average value of the grayscale feature quantity in all segments is taken as the feature quantity deviation, and the absolute difference between the twist rotation angle of any data point in the target segment and the average value of the twist rotation angle in all segments is taken as the angle deviation; The product of the normalized dynamic time warping matching value, the feature quantity deviation and the angle deviation is used as the defect of the pixel point.
6. The cable strand quality detection method based on image features according to claim 1 is characterized in that: The step of adjusting the contrast of the pixel points includes: Take any image frame as the image to be segmented, and multiply the original grayscale value of each pixel in the image to be segmented by the defect degree corresponding to the pixel to obtain the new grayscale value of the pixel.
Citation Information
Patent Citations
Cable stranded wire quality detection method based on image features
CN116912234A
Visual inspection system for workpiece appearance defects based on image processing
CN118470016A
Alloy anti-collision beam defect detection method based on image processing
CN118823020A