An adaptive cable entanglement detection method
By using a linear red laser and a visual inspection system to analyze the cable winding status in real time, the problem that existing winding devices cannot detect cable winding is solved, enabling real-time adjustment and efficient winding of cables.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGZHOU INST OF ADVANCED MFG TECH
- Filing Date
- 2023-07-20
- Publication Date
- 2026-05-26
Smart Images

Figure CN116697893B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of equipment manufacturing technology and relates to a method for detecting cable winding. Background Technology
[0002] Wires and cables are measured in length. All wires and cables are manufactured by adding layers of insulation, shielding, cabling, and sheathing around the conductor, starting with conductor processing. The more complex the product structure, the more layers are added. During cable manufacturing, a winding core is used to wind the cable. Existing winding methods, using a motor in a fixed pattern, have certain drawbacks.
[0003] Existing winding devices use motors for automatic winding. There are no detection devices during the winding process, and they can only wind according to a fixed frequency and pattern. During the winding process, it is impossible to detect whether the winding is too loose or too tight, let alone predict it, which often results in winding errors. Summary of the Invention
[0004] The present invention addresses the shortcomings of the prior art by proposing an adaptive cable winding detection method. This method aims to update the direction of cable winding deviation in real time, overcoming the problem of excessively large or small cable spacing caused by the inability to detect the deviation during winding and the inability to wind according to a fixed frequency and pattern. This method can prevent the cable from being wound too loosely or too tightly and improve the efficiency of cable winding.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0006] The adaptive cable entanglement detection method of this invention is characterized by its application in a detection environment consisting of a linear red laser, a laser rangefinder, a filter, an industrial camera, and an industrial control computer. The linear red laser illuminates the cable under test at an X-angle. The industrial camera is vertically mounted above the cable under test to acquire image data D of the cable. The filter is mounted at the end of the lens of the industrial camera to filter out other color components in the acquired image data D, obtaining image data D1 that retains only the red component. The laser rangefinder is vertically mounted above the industrial camera to acquire the distance Z from the industrial camera to the cable under test. The cable entanglement detection method is performed according to the following process:
[0007] Step 1: Calibrate the images captured by the industrial camera:
[0008] Step 1.1: Let the difference between the actual measured x-coordinates of the two ends of any rectangular block on the chessboard calibration board be ΔXc and the difference between the y-coordinates be ΔYc;
[0009] Step 1.2: The industrial camera acquires image data F of the checkerboard calibration board and sends it to the industrial control computer, thereby calculating the difference in the horizontal coordinate ΔXf and the difference in the vertical coordinate ΔYf between the two endpoints of any rectangular square on the checkerboard calibration board in the camera target surface coordinate system according to equation (1):
[0010]
[0011] In equation (1), f represents the focal length of the lens of the industrial camera, and Zc represents the distance of the laser rangefinder;
[0012] Step 1.3: The industrial control computer performs Gaussian denoising and adaptive local segmentation on the image data F to remove background noise interference and obtain the segmented image data F1.
[0013] Step 1.4: Detect the difference in pixel x-coordinates of the two endpoints of any rectangular square in image data F1 using the corner detection algorithm, and the difference in pixel y-coordinates is ΔXu. Then, calculate the calibration coefficient g according to equation (2):
[0014]
[0015] Step 1.5: Change the distance Zc between the industrial camera and the checkerboard calibration plate several times, and repeat the process of steps 1.2-1.4 to obtain the calibration coefficients under different conditions and take the average value to obtain the optimal calibration coefficient g*.
[0016] Step 1.6: The industrial control computer calculates the mapping relationship between the target size difference and the imaging pixel difference of the industrial camera according to formula (3):
[0017]
[0018] In equation (3), Z represents the distance from the industrial camera to the checkerboard calibration plate in the current measurement;
[0019] Step 2: The industrial camera acquires the outermost layer image data D of the cable to be inspected during the winding process and sends it to the industrial control computer. The industrial control computer performs Gaussian denoising and adaptive local segmentation on the outermost layer image data D to remove background noise interference and obtain the segmented cable image data D1.
[0020] Step 3: The industrial control computer uses an octet to fill the segmented cable image data D1 with directional holes to obtain the filled cable image data D2.
[0021] Step 4: The industrial control computer sets a rectangular region of interest in the filled cable image data D2, and uses a feature extraction algorithm to extract the outline data D3 of the outermost cable from the rectangular region of interest. It then statistically analyzes the horizontal outline data of the outermost cable outline D3 to obtain the coordinate value array Data of the corrected cable outline on the horizontal axis. Next, it selects coordinate points m where the vertical axis coordinate value changes significantly and coordinate points n where the vertical axis coordinate value remains unchanged from the coordinate value array Data, and uses these as the coordinates of the dividing points between the cables. Specifically, a coordinate point where the vertical axis coordinate value changes significantly is defined as a vertical axis coordinate value whose difference from its two adjacent vertical axis coordinate values both exceed a threshold height M; a coordinate point where the vertical axis coordinate value remains unchanged is defined as a vertical axis coordinate value whose difference from its two adjacent vertical axis coordinate values both are less than a threshold height N.
[0022] Record the coordinate values on the horizontal axis between each dividing point as the offset Y of the adjacent cable between each dividing point. If the Y value is greater than the normal width Ys of the cable, then set the vertical offset ΔYu′ of the pixel in the cable image data D2 to Y-Ys. If the Y value is less than Ys, then set the vertical offset ΔYu′ of the pixel in the cable image data D2 to Ys-Ys.
[0023] Step 5: The industrial control computer uses Equation (3) to obtain the actual longitudinal coordinate difference ΔYc′ of the cable under test based on the distance Z′ from the industrial camera to the cable under test in the current measurement and ΔYu′.
[0024] The adaptive cable winding detection method described in this invention is characterized by calculating the required offset adjustment of the motor of the cable under test based on the actual longitudinal coordinate difference ΔYc′ of the cable under test, thereby controlling the motor of the cable under test:
[0025] Step 6: Calculate the predicted walking distance C0 of the cable to be detected when the industrial camera acquires the outermost image data D:
[0026] C0 = V m ×(1 / N+Tc) (4)
[0027] In equation (4), Tc represents the time between the acquisition of the outermost image data D and the acquisition of the actual ordinate difference ΔYc′ of the cable under test, and N represents the acquisition frame rate of the industrial camera; V m The speed at which the motor moves at a constant speed;
[0028] Step 7: The industrial control computer uses formula (5) to calculate the required offset ΔYc of the motor. * It also sends corresponding adjustment signals to the motor to adjust the direction of travel of the cable being tested.
[0029]
[0030] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the method, and the processor is configured to execute the program stored in the memory.
[0031] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program is executed by a processor to perform the steps of the method.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] 1. The adaptive cable winding detection method of the present invention uses a visual detection algorithm to detect the wound cable in real time, which can analyze the direction of the wound cable in real time and update the coordinate difference of the cable winding adjustment in real time, thereby improving the problem of excessive or insufficient cable spacing caused by cable winding.
[0034] 2. This invention adopts an adaptive cable winding detection method, which predicts the current position offset in real time based on the time used by the machine vision detection module and the speed of the motor. This can avoid the problem of offset change caused by secondary errors during motor movement, thereby improving the accuracy of cable displacement adjustment.
[0035] 3. The present invention has a simple structure. For different cables, only the actual width of the cable and the detection parameters need to be reset, which is convenient to operate. It overcomes the problem that the traditional winding process cannot detect and can only be wound according to a fixed frequency and pattern, thereby improving the efficiency of cable winding and making it easy for operators to quickly change product models. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of an adaptive cable winding detection method according to the present invention;
[0037] Figure 2 This is a schematic diagram illustrating the predictive principle of a cable winding method according to the present invention. Detailed Implementation
[0038] In this embodiment, an adaptive cable entanglement detection method is described, such as... Figure 1The diagram illustrates an inspection environment comprised of a linear red laser, a laser rangefinder, a filter, an industrial camera, and an industrial control computer. The linear red laser illuminates the cable under inspection at an X-angle. The industrial camera is mounted vertically above the cable to capture image data D. A filter, installed at the end of the camera lens, removes other color components from image data D, resulting in image data D1 that retains only the red component. The laser rangefinder, also mounted vertically above the industrial camera, measures the distance Z from the camera to the cable under inspection. Figure 1 As shown, this cable entanglement detection method consists of three parts: checkerboard image calibration, cable offset conversion, and motor offset prediction, and is performed as follows:
[0039] Step 1: Calibrate the images acquired by the industrial camera:
[0040] Step 1.1: Select a high-resolution checkerboard calibration board, and let the actual measured difference of the horizontal coordinates of the two ends of any rectangular block on the checkerboard calibration board be ΔXc and the difference of the vertical coordinates be ΔYc.
[0041] Step 1.2: Let the focal length of the industrial camera lens be f, and the distance of the laser rangefinder be Zc. The industrial camera collects image data F of the checkerboard calibration board and sends it to the industrial control computer. Then, according to formula (1), the difference in the horizontal coordinate ΔXf and the difference in the vertical coordinate ΔYf between the two endpoints of any rectangular square on the checkerboard calibration board in the camera target surface coordinate system are calculated:
[0042]
[0043] Step 1.3: The industrial control computer performs image preprocessing on the chessboard image data F, mainly including (Gaussian denoising and adaptive local segmentation) to remove background noise interference and obtain the segmented image data F1.
[0044] Step 1.4: Detect the difference in pixel x-coordinates of the two endpoints of any rectangular square in image data F1 using the corner detection algorithm, and the difference in pixel y-coordinates is ΔXu. Then, calculate the calibration coefficient g according to equation (2):
[0045]
[0046] Step 1.5: Change the distance Zc between the industrial camera and the checkerboard calibration plate five times, and repeat the process of steps 1.2-1.4 to obtain five sets of calibration coefficients under different conditions and take the average value to obtain the optimal calibration coefficient g*.
[0047] Step 1.6: The industrial control computer combines equations (1) and (2) to calculate the mapping relationship between the target size difference and the imaging pixel difference of the industrial camera using equation (3), where Z represents the distance from the industrial camera to the checkerboard calibration board in the current measurement.
[0048]
[0049] Step 2: The industrial camera acquires the outermost layer image data D of the cable to be inspected during the winding process and sends it to the industrial control computer. The industrial control computer performs Gaussian denoising and adaptive local segmentation on the outermost layer image data D to remove background noise interference and obtain the segmented cable image data D1.
[0050] Step 3: The industrial control computer uses an octet to fill the segmented cable image data D1 with directional holes, resulting in the filled cable image data D2.
[0051] Step 4: The industrial control computer sets a rectangle of interest in the filled cable image data D2, and uses a feature extraction algorithm to extract the outline data D3 of the outermost cable from the rectangle of interest. It then statistically analyzes the horizontal outline data of the outermost cable outline D3 to obtain the coordinate value array Data of the corrected cable outline on the horizontal axis. Next, it selects coordinate points m where the vertical axis coordinate value changes significantly and coordinate points n where the vertical axis coordinate value remains unchanged from the coordinate value array Data, and uses these as the coordinates of the dividing points between the cables. Specifically, a coordinate point where the vertical axis coordinate value changes significantly is defined as a vertical axis coordinate value whose difference from its two adjacent vertical axis coordinate values both exceed a threshold height M; a coordinate point where the vertical axis coordinate value remains unchanged is defined as a vertical axis coordinate value whose difference from its two adjacent vertical axis coordinate values both are less than a threshold height N.
[0052] Record the coordinate values on the horizontal axis between each dividing point as the offset Y of the adjacent cable between each dividing point. If the Y value is greater than the normal width Ys of the cable, then set the vertical offset ΔYu′ of the pixel in the cable image data D2 to Y-Ys. If the Y value is less than Ys, then set the vertical offset ΔYu′ of the pixel in the cable image data D2 to Ys-Ys.
[0053] Step 5: The industrial control computer obtains the distance Z′ and ΔYu′ of the cable under test at the current measurement. Combined with the optimal calibration coefficient g* after the previous calibration and the focal length f of the camera, the actual longitudinal coordinate difference ΔYc′ of the cable under test is obtained by using equation (3).
[0054] Step 6: Analyze the offset position information at the current moment of image acquisition during the cable winding process using analytical and predictive methods. Combine this with the motor speed and program execution time to predict the actual offset position information of the cable at the moment of motor execution. For example... Figure 2As shown, an image is acquired at a fixed time interval T. The system intelligently analyzes the actual longitudinal coordinate difference ΔYc′ of the cable under test and calculates the required offset adjustment for the motor of the cable under test according to the following steps, thereby controlling the motor of the cable under test:
[0055] Step 6.1: Set the camera frame rate to N frames per second, and the time to acquire one image is 1 / N seconds. Acquire one image within a fixed time interval, with the image acquisition time being 1 / N. Calculate Tc, which is the time between acquiring the outermost image data D and obtaining the actual ordinate difference ΔYc′ of the cable under test. Read V. m The speed at which the motor moves at a constant speed;
[0056] When the outermost image data D is acquired by the industrial camera, the predicted walking distance C0 of the cable to be detected is calculated using equation (4).
[0057] C0 = V m ×(1 / N+Tc) (4)
[0058] Step 6.2: The industrial control computer uses formula (5) to calculate the required offset ΔYc of the motor. * It also sends corresponding adjustment signals to the motor to adjust the direction of travel of the cable being tested.
[0059]
[0060] In equation (5), C0 is the predicted walking distance of the cable to be detected. C0 is calculated by equation (4). Based on the principle of similar triangles, the adjustment signal of the motor output by the intelligent prediction algorithm is obtained by equation (5) as ΔYc. * The direction of motor offset is based on ΔYc * The positive and negative values are used to determine the direction, when ΔYc * When ΔYc is positive, the motor corrects to the right. * When the value is negative, the motor corrects to the left.
[0061] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0062] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
Claims
1. An adaptive cable wrap detection method, characterized by, This method is applied in an inspection environment consisting of a linear red laser, a laser rangefinder, a filter, an industrial camera, and an industrial control computer. The linear red laser illuminates the cable under inspection at an X-angle. The industrial camera is vertically mounted above the cable to acquire image data D of the cable. The filter is mounted at the end of the lens of the industrial camera to filter out other color components in the acquired image data D, obtaining image data that retains only the red component. The laser rangefinder is vertically mounted above the industrial camera to acquire the distance Z from the industrial camera to the cable under inspection. The cable winding detection method is performed as follows: Step 1: Calibrate the images captured by the industrial camera; Step 2: The industrial camera acquires the outermost layer image data D of the cable to be inspected during the winding process and sends it to the industrial control computer. The industrial control computer performs Gaussian denoising and adaptive local segmentation on the outermost layer image data D to remove background noise interference and obtain the segmented cable image data D1. Step 3: The industrial control computer uses an octet to fill the segmented cable image data D1 with directional holes to obtain the filled cable image data D2. Step 4: The industrial control computer sets a rectangular region of interest in the filled cable image data D2, and uses a feature extraction algorithm to extract the outline data D3 of the outermost cable from the rectangular region of interest. It then statistically analyzes the horizontal outline data of the outermost cable outline D3 to obtain the coordinate value array Data of the corrected cable outline on the horizontal axis. Next, it selects coordinate points m where the vertical axis coordinate value changes significantly and coordinate points n where the vertical axis coordinate value remains unchanged from the coordinate value array Data, and uses these as the coordinates of the dividing points between the cables. Specifically, a coordinate point where the vertical axis coordinate value changes significantly is defined as a vertical axis coordinate value whose difference from its two adjacent vertical axis coordinate values both exceed a threshold height M; a coordinate point where the vertical axis coordinate value remains unchanged is defined as a vertical axis coordinate value whose difference from its two adjacent vertical axis coordinate values both are less than a threshold height N. Record the coordinate values on the horizontal axis between each split point as the offset of adjacent cables between each split point. ,like The value is greater than the normal width of the cable. This will cause the horizontal offset of the pixels in the cable image data D2 to... ,like Value less than This will cause the horizontal offset of the pixels in the cable image data D2 to... ; Step 5: The industrial control computer calculates the distance from the industrial camera to the cable under test in the current measurement. as well as The actual abscissa difference of the cable under test is obtained by using the mapping relationship between the target size difference and the imaging pixel difference of the industrial camera. ; Step 6: Calculate the predicted walking distance of the cable to be detected when the industrial camera acquires the outermost image data D using formula (4). : (4) In equation (4), Tc represents the time difference between acquiring the outermost image data D and obtaining the actual abscissa of the cable under test. The time interval between these intervals, where N represents the frame rate of the industrial camera; V m The speed at which the motor moves at a constant speed; Step 7: The industrial control computer uses formula (5) to calculate the required offset adjustment of the motor. It also sends corresponding adjustment signals to the motor to adjust the direction of travel of the cable being tested. (5)。 2. The adaptive cable entanglement detection method according to claim 1, characterized in that, Step 1 includes: Step 1.1: Let the difference in the actual measured x-coordinates of the two endpoints of any rectangular block on the chessboard calibration board be... The difference between the ordinate and the vertical axis is ; Step 1.2: The industrial camera acquires image data F of the checkerboard calibration board and sends it to the industrial control computer, thereby calculating the difference in the horizontal coordinates of the two endpoints of any rectangular square on the checkerboard calibration board in the camera target surface coordinate system according to equation (1). ordinate difference : (1) In equation (1), This indicates the focal length of the lens of the industrial camera. This indicates the distance from the industrial camera to the checkerboard calibration plate; Step 1.3: The industrial control computer performs Gaussian denoising and adaptive local segmentation on the image data F to remove background noise interference and obtain the segmented image data F1. Step 1.4: Detect the difference in pixel x-coordinates between the two endpoints of any rectangular square in image data F1 using a corner detection algorithm. The difference in pixel ordinates is Therefore, the calibration coefficient g is calculated according to equation (2): (2) Step 1.5: Change the distance between the industrial camera and the checkerboard calibration plate several times. Repeat steps 1.2-1.4 to obtain calibration coefficients under different conditions and take the average value to obtain the optimal calibration coefficient g*. Step 1.6: The industrial control computer calculates the mapping relationship between the target size difference and the imaging pixel difference of the industrial camera according to formula (3): (3)。 3. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a computer program that supports a processor in executing the method of claim 1 or 2, the processor being configured to execute the computer program stored in the memory.
4. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the method of claim 1 or 2.