Wire harness terminal processing monitoring method and system based on machine vision

Through the dynamic correction of local grayscale differences and light source influence coefficient, the accurate identification of defects in terminal deformation under light interference is solved, and the detection accuracy and efficiency are improved.

CN120279022AInactive Publication Date: 2025-07-08DONGGUAN CITY JIEXIN ELECTROMECHANICAL EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510759443.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-07-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify and monitor deformation defects of wiring harness terminals under light interference, resulting in insufficient detection efficiency and accuracy.

Method used

By defining the local area of each pixel point, the degree of local grayscale difference and the light source influence coefficient are calculated, the grayscale value is dynamically corrected, and combined with the edge detection algorithm, the deformation defects of the wiring harness terminal are identified.

Benefits of technology

It improves the accuracy of edge detection, reduces the impact of light interference on deformation defect identification, and realizes accurate monitoring of deformation defects on the surface of the wiring harness terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279022A_ABST
    Figure CN120279022A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a wire harness terminal processing monitoring method and system based on machine vision, and the method comprises the steps: collecting a surface image of a current wire harness terminal in real time; determining the local gray difference degree of the pixel point according to the difference between the gray value of the pixel point and other gray values in the local area of the pixel point; determining a light source influence coefficient of the pixel points according to a collaborative change trend between a local gray difference degree corresponding to a left pixel point set of the pixel points and a local gray difference degree corresponding to a right pixel point set of the pixel points; and according to the relative size of the light source influence coefficient of the pixel point and the maximum light source influence coefficient, correcting the gray value of the pixel point, carrying out edge detection on the surface image after the gray value is corrected, and determining whether the current wire harness terminal is deformed or not. According to the method, the interference of non-uniform light is eliminated, and the accuracy of identifying and monitoring the deformation defect of the wire harness terminal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing. Specifically, it relates to a method and system for monitoring the processing of wire harness terminals based on machine vision. Background Art

[0002] In automobile manufacturing, wire harness terminals are key components connecting multiple electronic components in the automobile circuit network. The quality of wire harness terminals directly affects the performance of the automobile's electrical system. Therefore, it is necessary to strictly monitor the quality of wire harness terminals.

[0003] In the actual production process, due to factors such as long-term wear of the components of the riveting equipment, equipment aging, or power voltage fluctuations, the equipment pressure is often uneven, which in turn causes deformation defects such as deformation and depression of the terminal wire harness. These deformation defects often occur in the edge area of the terminal. The deformation defects located in the edge area will directly lead to poor crimping of the wire core or leakage, posing a very high safety risk. Therefore, it is necessary to strictly monitor the deformation defects on the surface of the terminal.

[0004] Traditional quality monitoring methods mainly rely on manual inspection or basic vision inspection techniques. However, these methods often cannot effectively and accurately detect all deformation defects under high-precision requirements, fast production rhythms, and complex working conditions. For this reason, image processing technology has been widely introduced in modern industrial production to improve the efficiency and accuracy of detection. Specifically, a high-resolution industrial camera is used to collect the surface image of the wire harness terminal, and an edge detection algorithm is used to extract the edge information on the surface of the terminal, and then it is judged whether there are deformation defects in the wire harness terminal.

[0005] However, since the wire harness terminal is a medium connecting the wire and other electrical equipment and is made of materials such as copper or copper alloy, due to the strong reflectivity of the surface of such materials, the obtained surface image is easily affected by light interference, resulting in the edge features of the wire harness terminal becoming blurred, thus making it impossible to accurately identify and monitor the deformation defects of the wire harness terminal.

[0006] Therefore, there is an urgent need for a monitoring method that can accurately extract the edge features on the surface of the wire harness terminal and accurately identify and monitor the deformation defects of the wire harness terminal under the consideration of light interference. Summary of the Invention

[0007] To solve the problem that the surface deformation defects of wire harness terminals cannot be accurately identified and monitored due to light interference, the present invention proposes a method and system for monitoring the processing of wire harness terminals based on machine vision.

[0008] On the one hand, a method for monitoring the processing of wire harness terminals based on machine vision provided by the present invention includes: Real-time collecting the surface image of the current wire harness terminal; Set the local area of each pixel point of the surface image; determine the local gray level difference degree of each pixel point according to the difference between the gray level value of each pixel point and the gray level values of other pixel points within its local area; Divide the left pixel point set and the right pixel point set of each pixel point, and determine the light source influence coefficient of this pixel point according to the co-variation trend of the local gray level differences of all pixel points corresponding to the left pixel point set and the local gray level difference degrees of all pixel points corresponding to the right pixel point set; Correct the gray level value of each pixel point according to the relative magnitude of the light source influence coefficient of each pixel point and the maximum light source influence coefficient of all pixel points of the surface image; perform edge detection based on the corrected gray level values of all pixel points; Determine whether the current wire harness terminal is deformed through the result of edge detection, so as to realize the processing monitoring of the wire harness terminal.

[0009] This technical solution defines the local area of each pixel point, enabling the algorithm to focus on the environment around the pixel point for more accurate analysis, which helps in the extraction of local information rather than simply relying on the global image. And by calculating the local gray level difference degree of the pixel point, it can accurately capture the subtle deformation areas, especially on irregular surfaces or minute defects, enhancing the sensitivity to surface details. Also, considering the influence of uneven illumination, it separately examines the gray level changes in the left and right regions of the pixel point, quantifies them as the light source influence coefficient, which can accurately reflect the likelihood of the pixel point being affected by light, and helps to accurately distinguish the regions affected by light interference from the real edge regions. Moreover, it corrects the gray level value of each pixel point to eliminate the gray level changes caused by uneven light source or reflection. The corrected gray level value can more accurately reflect the actual shape of the wire harness terminal surface. And the corrected gray level values of all pixel points improve the accuracy of the edge detection result, and thus can accurately identify and monitor the deformation defects on the wire harness terminal surface.

[0010] Further, the correction of the gray level value of each pixel point is carried out based on the following formula: ; In the formula, is the corrected gray level value of the th pixel point, is the gray level value of the th pixel point, is the light source influence coefficient of the th pixel point, is the maximum value of the light source influence coefficients of all pixel points of the surface image, is the ceiling symbol.

[0011] This technical solution standardizes the light source influence coefficient of each pixel point and makes dynamic correction according to the ratio of it to the maximum light source influence coefficient, so that the corrected image more accurately reflects the true shape of the terminal surface, thereby improving the accuracy of edge detection and reducing the influence of light interference on the identification of deformation defects.

[0012] Further, the method for determining whether there is deformation in the current wire harness terminal through the edge detection result is as follows: Pre-obtain the edge pixel point sequence in the surface image of the wire harness terminal that meets the standard as the standard edge pixel point sequence; Obtain the degree of difference between the edge pixel point sequence in the surface image of the current wire harness terminal and the standard edge pixel point sequence. If the degree of difference is greater than the preset threshold, it is determined that there is deformation in the current wire harness terminal; if the degree of difference is greater than or equal to the preset similarity threshold, it is determined that there is no deformation in the current wire harness terminal.

[0013] Further, the co-variation trend is determined according to the covariance between the local gray-scale differences of all pixel points corresponding to the left pixel point set and the local gray-scale differences of all pixel points corresponding to the right pixel point set.

[0014] Further, the method for setting the local area of each pixel point in the surface image is: taking each pixel point as the center, and taking the area composed of the surrounding pixel points as the local area of this pixel point.

[0015] Further, the method for dividing the left pixel point set and the right pixel point set of each pixel point is: In the local area of each pixel point, taking each pixel point as the center, all pixel points that are in the same row as this pixel point and on the left side of this pixel point are used as the left pixel point set of this pixel point, and all pixel points that are in the same row as this pixel point and on the right side of this pixel point are used as the right pixel point set of this pixel point.

[0016] This technical solution divides the left and right pixel points in the same row as each pixel point in the local area of each pixel point into the left pixel point set and the right pixel point set respectively, aiming to capture the gray-scale differences on the left and right sides of this pixel point, so as to more accurately analyze the influence of the light source on the image. Through this division, the local influence of the light source on the image can be effectively distinguished. Especially on the surface of reflective materials, the influence of light often shows asymmetrical gray-scale changes on the left and right.

[0017] Further, the light source influence coefficient is determined based on the following formula: ; In the formula, is the The light source influence coefficient of a pixel is the degree of local gray - scale difference of the th pixel, is the degree of local gray - scale difference of all pixels corresponding to the set of left - hand pixels of the th pixel, is the degree of local gray - scale difference of all pixels corresponding to the set of right - hand pixels of the and is the covariance between them, is the sign function.

[0018] This technical solution accurately identifies the illumination consistency on the left and right sides of the pixel by analyzing the co - variation trend between the local gray - scale differences of the left - hand pixel set and the right - hand pixel set, thereby effectively distinguishing the gray - scale change characteristics caused by uneven illumination from the gray - scale change characteristics caused by actual deformation, and reducing the interference of illumination changes on deformation detection.

[0019] Furthermore, the degree of difference between the edge pixel sequence and the standard edge pixel sequence in the current surface image of the wire harness terminal is determined according to the DTW distance between the sequences.

[0020] Furthermore, the degree of local gray - scale difference of each pixel is determined based on the following formula:

[0021] In the formula, is the degree of local gray - scale difference of the th pixel, is the serial number of the pixel in the local area of the th pixel, is the total number of pixels in the local area of the th pixel, is the gray - scale value of the th pixel, is the gray - scale value of the th pixel in the local area of the

[0022] This technical solution quantifies the degree of local gray - scale difference of a pixel by calculating the sum of the squares of the differences between the gray - scale value of each pixel and the gray - scale values of other pixels in the local area. Its scientific significance lies in that it converts the gray - scale change characteristics of the local area of the image into specific values, provides a quantitative basis for image analysis, and can effectively capture the local gray - scale change details of the pixels in the image.

[0023] On the other hand, a wire harness terminal processing monitoring system based on machine vision provided by the present invention includes a memory and a processor. A computer program is stored on the memory, and the processor executes the computer program to implement the steps of any one of the processing monitoring methods.

[0024] The present invention has the following effects: By analyzing the local gray details of pixel points, the present invention constructs a dynamic correction coefficient of the light source influence based on covariance to correct the gray level, eliminates the interference of uneven light, obtains a surface image that accurately conforms to the actual situation, improves the accuracy of the edge detection result, and can accurately identify and monitor the deformation defects on the surface of the wire harness terminal according to the edge detection result. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a schematic flow chart of the method of the present invention; Figure 2 is a block diagram of the system structure of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention.

[0027] A wire harness terminal processing monitoring method based on machine vision provided by the present invention, as Figure 1 shown in, includes: S1: Collect the surface image of the wire harness terminal on the production line.

[0028] According to the characteristic dimensions of the wire harness terminal (such as the width of the terminal pin, the details of the crimping part, etc.), in accordance with the Nyquist sampling theorem, a fixed industrial camera with a resolution not less than 2 times the pixel of the minimum characteristic dimension that can be clearly distinguished is selected. For example, if the minimum characteristic dimension of the wire harness terminal is 0.1 mm, it is necessary to ensure that each pixel corresponds to an actual size not greater than 0.05 mm within the field of view, and an industrial camera with a suitable resolution is selected accordingly. At the same time, it is necessary to ensure that the frame rate of the industrial camera meets the requirements of the production line conveyor speed to avoid missed shots due to insufficient image acquisition speed.

[0029] The industrial camera is firmly installed at a suitable position directly above or on the side of the production line, and the surface image of the wire harness terminal on the production line is collected. For each surface image of the wire harness terminal collected, preprocessing is performed, including: graying, denoising using the median filtering algorithm, histogram equalization processing, enhancing the contrast of the image, and making the details of the surface image clearer.

[0030] S2: Evaluate the degree of local gray difference of pixel points.

[0031] Due to the high reflective characteristics of the production material of the wire harness terminal, when collecting the surface image of the wire harness terminal, light is reflected on the surface of the wire harness terminal, making the collected image seriously interfered by light. Moreover, due to the differences in the shape and angle of the surface of the wire harness terminal, as well as the uneven distribution of the illumination angle and intensity of the light source, there will be obvious differences in the illumination intensity in local areas of the image.

[0032] In the surface image of the wire harness terminal, the pixel points at different positions receive different amounts of light energy, and this difference in light energy is directly reflected as local changes in gray values. Based on this characteristic, the degree of gray difference in a local area can be measured by evaluating the change in gray values within the local area of each pixel point. If the degree of gray difference in the local area of a certain pixel point is greater, it indicates that the local area of this pixel point is more affected by light, and this pixel point is more likely to be located in an area with uneven illumination. In this way, the pixel points affected by light interference in the image can be located, providing a basis for subsequent image correction and processing.

[0033] Therefore, for each pixel point in the surface image, with this pixel point as the center, the pixel points surrounding this pixel point form the local area of this pixel point. The empirical value of is 5, and then the gray value changes within the local area of each pixel point are analyzed to obtain the degree of gray difference in the local area. If the number of pixel points surrounding a certain pixel point is not enough

[0034] for

[0035] the formula, then the gray values of the missing several pixel points are uniformly supplemented with the gray value of this pixel point itself. For example, if the gray value of a certain pixel point is 80 and there are only 16 pixel points surrounding this pixel point, then the gray values of the missing 9 pixel points are also uniformly set to 80 for subsequent analysis.

[0034] In one embodiment, within the local area of each pixel point, serial numbers are set for the remaining pixel points in the local area except for this pixel point itself, and then the local gray difference degree of each pixel point is calculated according to the following formula:

[0035] In this formula, is the local gray difference degree of the th pixel point, is the serial number of the remaining pixel points in the local area of the th pixel point except for the th pixel point, is the total number of the remaining pixel points, is the gray value of the th pixel point, is the th in the local area of the The gray values of the remaining pixel points.

[0036] In this formula, represents the sum of the gray differences between the -th pixel point and the remaining pixel points within its local region. By quantifying the degree of local gray difference through the sum of gray differences, the larger the sum of gray differences, the more significant the gray change within the local region of the -th pixel point, and the greater the degree of gray difference in the local region of the -th pixel point, which means the -th pixel point is more likely to be affected by light, and this pixel point is more likely to be located in an area with uneven illumination.

[0037] S3: Calculate the light source influence coefficient according to the change trend of the degree of local gray difference in the same row.

[0038] In the riveting process, the wire harness terminals will have obvious edge features, such as the binding and riveting area, the area where the tail end is crimped to the wire. In the ideal situation (without light interference), if a pixel point is located in the edge area, the degree of gray difference in the local region of this pixel point will also be larger compared to the pixel points in the normal area. Therefore, only analyzing the influence of light based on the degree of gray difference within the local region of the pixel point may misjudge the normal gray change of the pixel point in the edge area as the influence of light.

[0039] To further accurately analyze the influence of light, this step takes into account the characteristic that light propagates in a straight line, and the light interference has a certain consistency or regularity in the horizontal direction (row direction). By analyzing the gray differences and co-variation trends of the pixel points in the same row, it is possible to more effectively capture the light changes in the row direction, such as problems like abnormal gray levels caused by too strong or too weak unilateral light. Because the pixel points in the same row are closer in physical space and are more similar in the light conditions they receive to a certain extent, their gray changes can better reflect the influence of light interference. That is to say, if a certain pixel point is affected by light, the pixel points on both sides corresponding to this pixel point in the same row will be affected by light interference and show a consistent trend of change. Therefore, this step accurately evaluates the light source influence coefficient of the pixel point by further analyzing whether there is a consistent trend of change in the degree of gray difference of the pixel points in the same row within the local region of the pixel point, so as to reflect the likelihood of the pixel point being affected by light.

[0040] Therefore, within the local region of each pixel point, with each pixel point as the center, all the pixel points that are in the same row as this pixel point and on the left side of this pixel point are used as the left pixel point set of this pixel point, and all the pixel points that are in the same row as this pixel point and on the right side of this pixel point are used as the right pixel point set of this pixel point.

[0041] Next, according to the co-variation trend (characterized by covariance) of the local gray-scale differences of all the pixel points corresponding to the left pixel point set and the local gray-scale differences of all the pixel points corresponding to the right pixel point set, the light source influence coefficient of this pixel point is determined. Specifically, by separately calculating the local gray-scale differences of the left pixel point set and the right pixel point set and their covariance, a more comprehensive understanding of the lighting environment around each pixel point can be obtained.

[0042] If at a certain pixel point, there is a large co-variation (large covariance) in the local gray-scale differences of the pixel point sets on the left and right sides of this pixel point, it means that there may be obvious uneven lighting or interference on both sides of this pixel point, and the greater the possibility that this pixel point is affected by lighting interference. On the contrary, it indicates that the possibility that this pixel point is affected by lighting interference is smaller. This method can more accurately identify the pixel points affected by lighting interference, providing a more reliable basis for subsequent calculation of the light source influence coefficient and image correction.

[0043] In one embodiment, the light source influence coefficient of each pixel point is calculated based on the following formula:

[0044] In this formula, is the light source influence coefficient of the th pixel point. The larger the light source influence coefficient, the greater the possibility that this pixel point is affected by light, and vice versa. is the degree of local gray-scale difference of the th pixel point, is the normalization function, is the degree of local gray-scale difference of all the pixel points corresponding to the left pixel point set of the th pixel point, is the degree of local gray-scale difference of all the pixel points corresponding to the right pixel point set of the th pixel point, is and the covariance between, is the sign function.

[0045] In this formula, reflects the co-variation trend of and in the way of covariance. Specifically: If , the sign function is 1, indicating that and The better the co-variation trend, the more consistent the change trends (both increasing or both decreasing), which usually occurs in areas with relatively uniform illumination. In such areas, since the direction and intensity of the light source irradiation are basically the same, the gray-scale changes of pixel points in the image also show a consistent pattern. Therefore, it means that the th pixel point is more likely to be affected by light interference, and the light source influence coefficient is larger. Directly use the gray-scale difference degree of the local area of the th pixel point as the light source influence coefficient of the th pixel point

[0046] If , the sign function is -1, indicating that the co-variation trend between and is worse, and the difference in the change trends is larger, that is, there are sudden increases and decreases or one increases and the other decreases. This usually occurs due to the gray-scale differences caused by the geometric characteristics of the area where the pixel point is located. For example, pixels in the edge area may show relatively drastic gray-scale changes due to deformation, surface irregularities, etc., rather than uneven illumination. Therefore, it is considered that the th pixel point is less likely to be affected by light, and the gray-scale difference degree of the local area of the th pixel point is more likely to be due to its location in the edge area. The th pixel point itself is more likely to be a normal edge pixel point. Then use the negative exponent to for reduction, so that the light source influence coefficient of the th pixel point is smaller, thereby reducing the interference judgment of light on the edge area.

[0047] If , the sign function is 0, indicating that there is no co-variation trend between and . It means that the gray-scale difference change of this pixel point mainly comes from the shape, surface structure or edge features of the object itself, rather than reflection or refraction phenomena caused by uneven illumination. The th pixel point is less likely to be affected by light. Therefore, reduce the gray-scale difference degree of the local area of the th pixel point to 1 as the light source influence coefficient of the pixel point. Compared with corresponding light source influence coefficient is larger, but compared with corresponding light source influence coefficient is smaller.

[0048] In summary, through the collaborative analysis of the gray-scale differences between the left and right of pixel points, the covariance is used to judge the lighting consistency, and the sign function is combined to adjust the light source influence coefficient, thereby effectively eliminating the influence of lighting interference on image analysis. Distinguishing the degree of gray-scale difference in the local area of pixel points by the light source influence coefficient is due to the influence of lighting or because the pixel points themselves are in the edge area, resulting in a normal degree of gray-scale difference in the local area, which helps to obtain the pixel points actually affected by lighting interference.

[0049] S4: Correct the gray-scale value of pixel points using the light source influence coefficient.

[0050] During the production process of wire harness terminals, in the riveting process, the edge part is often the key area where force is applied. The edge area is more vulnerable to lighting interference, and the uneven lighting makes the edge features blurred. Especially for those edge parts with obvious deformation, the accuracy of deformation recognition will be reduced.

[0051] Therefore, in order to accurately identify these deformations, in this step, the gray-scale value of each pixel point is adaptively corrected by the light source influence coefficient of each pixel point to eliminate the influence of lighting on the gray-scale value, making the gray-scale value in the edge area closer to its actual deformation characteristics, thereby improving the accuracy of image analysis.

[0052] In one embodiment, the correction of the gray-scale value of each pixel point is based on the following formula:

[0053] In the formula, is the corrected gray-scale value of the th pixel point, is the gray-scale value of the th pixel point, is the light source influence coefficient of the th pixel point, is the maximum value of the light source influence coefficients of all pixel points on the surface image, is the ceiling symbol, ensuring the numerical stability and rationality of the corrected gray-scale value, and avoiding unnatural gray-scale or overly subtle corrections caused by decimal points.

[0054] In this formula, reflects the relative magnitude of the degree of lighting influence on the th pixel point relative to the maximum lighting influence in the entire surface image, acts as the weight of the gray-scale value of the th pixel point to reasonably correct its gray-scale value. When and differ more, it indicates that the th pixel point is less likely to be affected by lighting. The more normal a pixel point behaves in the entire surface image, the less it is considered to be affected by the light source. At this time, the weight value tends to 1 more and more, and the weighted gray value remains basically unchanged. That is, the smaller the degree of adjustment of the gray value of the pixel point less affected by light. On the contrary, when and have a smaller difference, it indicates that the th pixel point is more likely to be affected by light, and the th pixel point is more likely to be in an area more affected by the light source. At this time, the weight value tends to 0 more and more, and a large correction is made to the gray value of the th pixel point to eliminate the influence of light. Because light will increase the gray value of the pixel point, when correcting the gray value, through a correction in the decreasing direction is made to the gray value of the pixel point.

[0055] In short, by adaptively correcting the gray value of each pixel point, the gray deviation caused by light can be reduced, the influence of uneven light can be removed, the true gray information of the pixel points in the edge area can be restored, and the clarity of the edge features can be enhanced.

[0056] S5: Edge detection, identifying the deformation defects of the wire harness terminals to achieve processing monitoring.

[0057] After correcting the gray value of each pixel point, a corrected surface image is obtained. The gray value of each pixel point in this surface image is more in line with the actual situation. Using the CANNY edge detection algorithm, edge detection is performed on the surface image to obtain the accurate edge pixel points on the current surface of the wire harness terminal.

[0058] In order to determine whether the current wire harness terminal has deformation defects, a surface image of a standard wire harness terminal (without deformation) is collected in the same environment in advance as the standard surface image. Similarly, the edge pixel points of the standard surface image are obtained using the CANNY edge detection algorithm as the standard edge pixel points.

[0059] Construct a sequence of edge pixel points from the surface image of the current wire harness terminal, and construct a sequence of standard edge pixel points. Use the DTW (Dynamic Time Warping) algorithm to obtain the DTW distance between these two sequences. Take the DTW as the degree of difference between the two sequences, and perform a normalization operation on the degree of difference (using min-max normalization to make the value of the degree of difference between 0 and 1). The larger the DTW distance, the greater the degree of difference, indicating that the coincidence degree of the edge pixel points of the surface image of the current wire harness terminal and the standard edge pixel points is worse, and the difference in shape and contour is greater, meaning that the current wire harness terminal is more likely to have undergone deformation. Conversely, the smaller the DTW distance, the smaller the degree of difference, indicating that the coincidence degree of the edge pixel points of the surface image of the current wire harness terminal and the standard edge pixel points is better, and the shape and contour are more consistent, meaning that the current wire harness terminal is less likely to have undergone deformation.

[0060] After obtaining the degree of difference between the sequence of edge pixel points and the sequence of standard edge pixel points in the surface image of the current wire harness terminal, a preset threshold is 0.6 (an empirical value). If the degree of difference is greater than 0.6, it indicates that the edge shape of the current wire harness terminal is further away from the standard, and it is considered that the current wire harness terminal has deformation and is marked as unqualified. If the degree of difference is less than or equal to 0.6, it indicates that the edge shape of the current wire harness terminal conforms more to the standard, and it is considered that the current wire harness terminal has no deformation and is marked as qualified.

[0061] A wire harness terminal processing monitoring system based on machine vision provided by the present invention, as Figure 2 shown, includes an image acquisition module S100, a light interference analysis module S200, an image correction module S300, and a monitoring module S400.

[0062] The image acquisition module S100 is used to acquire the surface image of the wire harness terminal on the production line. This module uses a fixed industrial camera. According to the characteristic dimensions of the wire harness terminal (such as the width of the terminal pin, the details of the crimping part, etc.), and in accordance with the Nyquist sampling theorem, select an appropriate camera resolution to ensure that the smallest characteristic dimension in the image can be clearly identified. The camera needs to be installed directly above or on the side of the production line to ensure that it can stably capture the surface image of each wire harness terminal on the production line. In addition, the image acquisition module also includes image preprocessing functions, such as grayscale processing, median filtering for denoising, histogram equalization, etc., to ensure the image quality, enhance the clarity of details, provide high-quality image data for subsequent analysis, and send the processed surface image of the wire harness terminal to the light interference analysis module S200.

[0063] The light interference analysis module S200 is used to evaluate the local gray - scale difference degree of each pixel point according to the surface image of the wire harness terminal, so as to preliminarily identify the pixel points affected by light interference. Further, by combining the feature of whether there is light consistency on both sides of the pixel point, the light source influence coefficient of the pixel point is quantified to reflect the size of the light interference received by the pixel point, and the light source influence coefficient is sent to the image correction module S300.

[0064] The image correction module S300 is used to adaptively correct the gray - scale value of each pixel point according to the light source influence coefficient, so as to reduce the influence of light interference on the image quality. After correction, a surface image that conforms to the actual situation is obtained, and the surface image is sent to the monitoring module S400.

[0065] The monitoring module S400 is used to perform edge detection and deformation defect identification according to the corrected surface image. First, the edge pixel points of the image are extracted through the CANNY edge detection algorithm and compared with the standard surface image of the wire harness terminal without deformation. The dynamic time warping (DTW) algorithm is used to calculate the difference degree between the edge pixel points. The larger the DTW distance, the more serious the deformation. The DTW distance is compared with a preset threshold. If the difference degree is greater than 0.6, it is considered that the current wire harness terminal has a deformation defect and is marked as unqualified. If the difference degree is less than or equal to 0.6, it is considered that the shape of the wire harness terminal is consistent with the standard and is marked as qualified.

Claims

1. A method for monitoring the processing of wire harness terminals based on machine vision, characterized in that, Including: Collecting the surface image of the current wire harness terminal in real time; Setting the local area of each pixel point of the surface image; Determining the local gray level difference degree of each pixel point according to the difference between the gray level value of each pixel point and the gray level values of other pixel points within its local area; Dividing the left pixel point set and the right pixel point set of each pixel point, and determining the light source influence coefficient of this pixel point according to the co-variation trend of the local gray level differences of all pixel points corresponding to the left pixel point set and the local gray level difference degrees of all pixel points corresponding to the right pixel point set; Correcting the gray level value of each pixel point according to the relative magnitude of the light source influence coefficient of each pixel point and the maximum light source influence coefficient of all pixel points of the surface image; Performing edge detection according to the corrected gray level values of all pixel points; Determining whether the current wire harness terminal is deformed through the result of edge detection, so as to realize the processing monitoring of the wire harness terminal.

2. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 1, wherein, The correction of the gray level value of each pixel point is carried out based on the following formula: ; Wherein, is the gray value after correction of the -th pixel point, is the gray value of the -th pixel point, is the light source influence coefficient of the -th pixel point, is the maximum value of the light source influence coefficients of all pixel points of the surface image, is the ceiling symbol.

3. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 1, wherein The method for determining whether the current wire harness terminal is deformed through the result of edge detection is: Pre-obtaining the edge pixel point sequence in the surface image of the wire harness terminal meeting the standard as the standard edge pixel point sequence; Obtaining the difference degree between the edge pixel point sequence in the surface image of the current wire harness terminal and the standard edge pixel point sequence, and if the difference degree is greater than the preset threshold, determining that the current wire harness terminal is deformed; If the difference degree is greater than or equal to the preset similarity threshold, determining that the current wire harness terminal is not deformed.

4. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 1, characterized in that, The co-variation trend is determined according to the covariance between the local gray level differences of all pixel points corresponding to the left pixel point set and the local gray level difference degrees of all pixel points corresponding to the right pixel point set.

5. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 1, wherein The method for setting the local area of each pixel point of the surface image is as follows: taking each pixel point as the center, the area composed of the surrounding pixel points is used as the local area of this pixel point, which is a preset value.

6. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 1, wherein, The method for dividing the left pixel point set and the right pixel point set of each pixel point is: Within the local area of each pixel point, taking each pixel point as the center, all pixel points that are in the same row as this pixel point and on the left side of this pixel point are used as the left pixel point set of this pixel point, and all pixel points that are in the same row as this pixel point and on the right side of this pixel point are used as the right pixel point set of this pixel point.

7. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 2, wherein, The light source influence coefficient is determined based on the following formula: ; Wherein, is the light source influence coefficient of the th pixel point, is the local gray level difference degree of the th pixel point, is the normalization function, is the local gray level difference degree of all pixel points corresponding to the left pixel point set of the th pixel point, is the local gray level difference degree of all pixel points corresponding to the right pixel point set of the th pixel point, is the and covariance between them, is the sign function.

8. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 3, wherein The difference degree between the edge pixel point sequence in the surface image of the current wire harness terminal and the standard edge pixel point sequence is determined according to the DTW distance between the sequences.

9. The method for monitoring the processing of wire harness terminals based on machine vision according to claim 5, wherein, The local gray level difference degree of each pixel point is determined based on the following formula: ; In the formula, is the degree of local gray difference of the th pixel point, is the serial number of the pixel point in the local area of the th pixel point, is the total number of pixel points in the local area of the th pixel point, is the gray value of the th pixel point, is the gray value of the th pixel point in the local area of the th pixel point.

10. A wire harness terminal processing monitoring system based on machine vision, characterized in that, The processing monitoring system includes a memory and a processor, and a computer program is stored on the memory, and the processor executes the computer program to implement the steps of the processing monitoring method according to any one of claims 1-9.