Automobile connector pin detection method and system based on machine vision

By applying machine vision technology in automotive connector pin detection, using methods such as significance detection and Hough linear detection, the problem of inaccurate detection results in the prior art is solved, and higher detection accuracy and reliability are achieved.

CN120147318AInactive Publication Date: 2025-06-13DONGGUAN CITY JIEXIN ELECTROMECHANICAL EQUIP CO LTD

Patent Information

Application Number
CN202510622863.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When detecting the pin quality of the automotive connector, the prior art ignores the influence of diagonal point screening in the lighting environment and the arrangement rules between the pins, resulting in inaccurate detection results.

Method used

Using machine vision-based detection method, the significance value in the connector pin brightness image is obtained through the significance detection algorithm, significance neighborhood features are constructed, candidate pin points are screened, and the target pin points are accurately positioned through Hoff straight line detection, and finally the quality detection results are obtained based on the grayscale feature similarity of the target pin points.

Benefits of technology

It improves the accuracy of pin quality detection of automotive connectors, can effectively distinguish between highlighted area points and pin points, reduce errors, and obtain more reliable detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147318A_ABST
    Figure CN120147318A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an automobile connector pin detection method and system based on machine vision, and the method comprises the steps: obtaining the significance of each position point in a connector pin brightness image; constructing a significant neighborhood feature of each position point; determining candidate pin insertion points according to the saliency neighborhood features and the saliency; performing Hough straight line detection on each candidate contact pin point to obtain a plurality of candidate straight lines, taking a confidence mean value of the candidate straight lines where the candidate contact pin points are located as a contact pin probability, and taking the candidate contact pin point of which the contact pin probability is greater than a probability threshold as a target contact pin point; and obtaining a quality detection result according to the similarity of the gray features of each target pin point in the sampling distance in the connector pin gray image. According to the technical scheme of the invention, the accuracy of the quality detection of the pin of the automobile connector can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a method and system for detecting pins of automotive connectors based on machine vision. Background Art

[0002] Automotive connector pins are crucial components in automotive electronic systems, responsible for transmitting electrical signals or power between circuits. The quality of the connector affects whether the product can operate properly. When there are quality problems such as deformation or misalignment of automotive connector pins, it will lead to the inability to transmit electrical signals or power normally. Therefore, it is necessary to detect the quality of automotive connector pins during the production process.

[0003] Currently, the patent application document with the publication number CN117876376A discloses a method for visually detecting the quality of a high-speed and multi-functional connector. The method includes: screening out pin corner points from the corner points of the template connector terminal surface image, screening out the positioning pixel points of each pin corner point from the corner points of the to-be-tested connector terminal surface image, and obtaining the matching corner points of each pin corner point based on the distance between the positioning pixel points of the pin corner points and the corner points in the to-be-tested connector terminal surface image; combining the difference between the number of pin corner points and the number of their corresponding matching corner points, and the position distribution between the positioning corner points and the matching corner points of the pin corner points, obtaining the pin matching degree of the to-be-tested connector terminal surface image, and detecting the quality of the high-speed and multi-functional connector based on the pin matching degree.

[0004] The above method screens the corner points in the to-be-tested connector terminal surface image according to the pin corner points in the template connector terminal surface image to obtain the matching corner points of each pin corner point. However, the above method ignores the influence of the lighting environment on corner point screening and the arrangement rule between pins, resulting in errors in the matching corner points, and further leading to inaccurate quality detection results of automotive connector pins. Summary of the Invention

[0005] To solve the technical problem of inaccurate quality detection results of automotive connector pins, this application provides a method and system for detecting pins of automotive connectors based on machine vision, which can improve the accuracy of quality detection of automotive connector pins.

[0006] In the first aspect of the present application, a method for detecting pins of an automotive connector based on machine vision is provided. The detection method includes: obtaining the saliency of each position point in the brightness image of the connector pins by using a saliency detection algorithm; constructing the saliency neighborhood features of each position point, including: obtaining the saliency sequence within the sampling distance along multiple preset directions at any position point, marking the mutation points in the saliency sequence as 1 and the non-mutation points as 0 to obtain the saliency features in each preset direction, so as to construct the saliency neighborhood features; determining candidate pin points based on the saliency neighborhood features and saliency; performing Hough line detection on each candidate pin point to obtain multiple candidate lines, taking the average confidence of the candidate lines where the candidate pin points are located as the pin probability, and taking the candidate pin points with the pin probability greater than the probability threshold as the target pin points, and the confidence of the candidate line is negatively correlated with the variance of the distances between adjacent candidate pin points on the candidate line; obtaining the quality detection result based on the similarity of the gray-scale features within the sampling distance of each target pin point in the gray-scale image of the connector pins.

[0007] Since the pins of the automotive connector are made of metal and the automotive connector is made of plastic, the pins will appear as high-brightness points, and the pins are arranged regularly at equal intervals. Therefore, candidate pin points are screened out from all position points according to the saliency values and saliency neighborhood features in the brightness image; Hough line detection is performed on the candidate pin points to obtain multiple candidate lines. If the variance of the distances between adjacent candidate pin points on the candidate line is smaller, it indicates that the probability that the candidate line is composed of pin position points is greater, and the confidence of the candidate line is greater; when the average confidence of the candidate line where the candidate pin point is located is greater, it indicates that the probability that the candidate pin point is a pin position point is greater. The candidate pin points are secondarily screened according to the average confidence, so as to accurately locate the target pin points, and then the accurate quality detection result is obtained based on the similarity of the gray-scale features of the target pin points in the gray-scale image of the connector pins.

[0008] Preferably, before constructing the saliency neighborhood features of each position point, the detection method further includes: sequentially performing Gaussian filtering and closing operation on the saliency of each position point.

[0009] Eliminate the influence of noise points and isolated points in the brightness image on the saliency neighborhood features to ensure the accuracy of the candidate pin points.

[0010] Preferably, the multiple preset directions include 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, and 315 degrees.

[0011] Preferably, the sampling distance is: , is the spatial distance of the pins of the automotive connector, is the spatial distance corresponding to one pixel point in the brightness image, represents Round up.

[0012] Preferably, determining candidate pin insertion points based on the significant neighborhood feature and significance includes: clustering the significant features of all position points in any preset direction, taking the clustering cluster with the largest number of position points as the standard cluster, and the clustering center of the standard cluster is the standard significant feature in the preset direction; calculating the difference between the significant features of any position point in each preset direction and the standard significant feature, if the difference is less than the difference threshold, the marking value of this preset direction is 1, otherwise, the marking value of this preset direction is 0, and taking the sum of the marking values of each preset direction as the neighborhood score; in response to the significance being greater than the significance threshold and the neighborhood score being greater than the score threshold, taking the position point as a candidate pin insertion point.

[0013] The pins of the automotive connector are arranged in a regular equidistant pattern, and the significant neighborhood features of the pin position points will show consistency. On the contrary, for the highlighted area points, the reason for their generation is uneven illumination, etc., and there are no consistent significant features within the neighborhood range of the highlighted area points; therefore, screening the position points based on the significance of the position points and the significant neighborhood features can distinguish the highlighted area points from the connector pins, delete a large number of highlighted area points, complete the preliminary screening of the position points, and obtain candidate pin insertion points.

[0014] Preferably, the candidate straight line confidence is: , where is the variance of the spacing between adjacent candidate pin insertion points on the candidate straight line

[0015] When the variance of the spacing between adjacent candidate pin insertion points on the candidate straight line tends to 0, it indicates that the candidate pin insertion points on the candidate straight line are regularly distributed at equal intervals, and this candidate straight line is the straight line composed of pin position points. Therefore, the confidence can accurately represent the probability that this candidate straight line is composed of pin position points.

[0016] Preferably, obtaining the quality inspection result includes: taking the target pin insertion point as the center point, constructing a rectangular area with both the length and width being half of the sampling distance, and taking the gray values of each position point within the rectangular area in the gray image of the connector pins as the gray features of the target pin insertion point; in response to the similarity of the gray features between the target pin insertion points being greater than the similarity threshold, the quality inspection result is qualified, otherwise, the quality inspection result is unqualified.

[0017] Preferably, the similarity threshold between the target pin insertion point and the target pin insertion point is: In the brightness image of the connector pins, the target pin insertion point The brightness values of the position points within the rectangular area are used as the target pin point rectangle of the brightness feature; the target pin point and the target pin point The product of the similarity of the brightness features between them and the initial threshold is used as the target pin point and the target pin point similarity threshold between them.

[0018] Since the brightness features of each target pin point may vary, and the differences in brightness features will further affect the similarity of gray-scale features. If a fixed value is used for the similarity threshold between each target pin point, the differences in brightness features between each target pin point are ignored. Therefore, the similarity threshold between each target pin point is adaptively adjusted according to the differences in brightness features between each target pin point, improving the accuracy of the quality inspection results.

[0019] Preferably, the saliency detection algorithm is the LC algorithm or the HC algorithm.

[0020] In the second aspect of the present application, a pin detection system for an automotive connector based on machine vision is further provided, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for detecting pins of an automotive connector based on machine vision according to the first aspect of the present application is implemented.

[0021] The technical solution of the present application has the following beneficial technical effects: Since the pins of the automotive connector are made of metal, while the automotive connector is made of plastic, the pins will appear as high-brightness points, and the pins are arranged regularly at equal intervals. Therefore, candidate pin points are screened out from all position points according to the saliency value and saliency neighborhood feature in the brightness image; Hough line detection is performed on the candidate pin points to obtain multiple candidate lines. If the variance of the distances between adjacent candidate pin points on the candidate line is smaller, it indicates that the probability that the candidate line is composed of pin position points is greater, and the confidence of the candidate line is greater; when the average confidence of the candidate line where the candidate pin point is located is greater, it indicates that the probability that the candidate pin point is a pin position point is greater. The candidate pin points are secondarily screened according to the average confidence, so as to accurately locate the target pin point, and then an accurate quality inspection result is obtained based on the similarity of the gray-scale features of the target pin point in the gray-scale image of the connector pins. Description of the Drawings

[0022] Figure 1 is a flowchart of a method for detecting pins of an automotive connector based on machine vision according to an embodiment of the present application.

[0023] Figure 2 is a schematic diagram of multiple preset directions according to an embodiment of the present application.

[0024] Figure 3 It is a structural block diagram of a pin detection system for automotive connectors based on machine vision according to an embodiment of the present application. Specific implementation manners

[0025] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are a part of the embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0026] According to the first aspect of the present application, the present application provides a method for detecting pins of automotive connectors based on machine vision. Figure 1 It is a flowchart of a method for detecting pins of automotive connectors based on machine vision according to an embodiment of the present application. As Figure 1 shown, the method for detecting pins of automotive connectors based on machine vision includes steps S101 to S105, which will be described in detail below.

[0027] S101. Obtain the saliency of each position point in the brightness image of the connector pins by using a saliency detection algorithm.

[0028] In one embodiment, a top view of the automotive connector pins is collected by using an image acquisition device. The top view is an RGB image, and the RGB image is converted to the YUV color space. Among them, the Y channel, U channel, and V channel represent the brightness channel, blue channel, and red channel respectively. The image information of the Y channel is used as the brightness image of the connector pins; the image acquisition device is a mobile phone, an industrial camera, or other terminals with image acquisition functions.

[0029] Since the connector pins are made of metal, compared with the connector made of plastic material, the connector pins are high-brightness areas, that is, the connector pins are position points with relatively high saliency in the brightness image. Therefore, a saliency detection algorithm is used to perform saliency detection on the brightness image to obtain the saliency of each position point.

[0030] Among them, the saliency detection algorithm is the LC algorithm or the HC algorithm.

[0031] S102. Construct the saliency neighborhood features of each position point.

[0032] In one embodiment, affected by the illumination environment, in addition to the position points where the connector pins are located, the position points in the high-brightness area in the brightness image also have relatively high saliency. Therefore, in order to distinguish the high-brightness area points from the connector pins, it is necessary to construct the saliency neighborhood features of each position point.

[0033] Before constructing the significant neighborhood features of each position point, to exclude the influence of noise points and isolated points on the significant neighborhood features, the detection method further includes: performing Gaussian filtering and closing operation on the significance of each position point in sequence.

[0034] Among them, the significance of each position point constitutes the significance map of the automotive connector pin; Gaussian filtering is performed on the significance of each position point in the significance map to remove the noise information in the significance map; the closing operation is to first perform a dilation operation and then an erosion operation, which can fill the holes and small gaps in the significance map and can effectively remove the isolated points in the significance map.

[0035] After removing the noise points and isolated points, the significant neighborhood features of each position point can be constructed. Specifically, the construction of the significant neighborhood features of each position point includes: obtaining the significance sequence within the sampling distance along multiple preset directions of any position point, marking the mutation points in the significance sequence as 1 and the non-mutation points as 0 to obtain the significance features in each preset direction, so as to construct the significant neighborhood features.

[0036] Among them, please refer to Figure 2 , which is a schematic diagram of multiple preset directions according to an embodiment of the present application. The multiple preset directions include a total of 8 preset directions: 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, and 315 degrees.

[0037] Taking the position point as an example, taking the position point as the starting point, obtaining the significance of each position point within the sampling distance along the preset direction to obtain the significance sequence; performing mutation point detection on the significance sequence to determine the mutation points and non-mutation points in the significance sequence, marking the mutation points in the significance sequence as 1 and the non-mutation points as 0 to obtain the significance feature of the position point along the preset direction . This significance feature can reflect the distribution feature of the significance around the position point in the preset direction ; in the same way, obtain the significance features of the position point in each preset direction, and arrange the significance features in each preset direction in a fixed order to obtain the significant neighborhood feature. The significant neighborhood feature is a vector with d rows and 8 columns, where d is the sampling distance, and is used to represent the distribution feature of the significance of the position point along each preset direction. The mutation point detection can be realized based on the first-order difference sequence. After obtaining the first-order difference sequence of the significance sequence, the position points with values greater than the average value of the first-order difference sequence are used as mutation points.

[0038] Among them, the sampling distance is related to the spatial distance of the automotive connector pin. Specifically, the sampling distance is: , is the spatial distance of the pins of the automotive connector, is the spatial distance corresponding to a pixel point in the luminance image, represents the ceiling function of rounding up.

[0039] Understandably, since the pins of the automotive connector are arranged regularly at equal intervals, that is, generally, the regularly arranged pins will generate consistent significant features in the same direction. In other words, the significant neighborhood features of the pin position points will show consistency. On the contrary, for the high-brightness area points, the reason for their generation is uneven illumination, etc. There are no consistent significant features in the neighborhood range of the high-brightness area points. Therefore, by comprehensively screening the position points based on the significance of the position points and the significant neighborhood features, the high-brightness area points and the connector pins can be distinguished, and a large number of high-brightness area points can be deleted.

[0040] S103. Determine candidate pin points according to the significant neighborhood features and significance.

[0041] In one embodiment, determining candidate pin points according to the significant neighborhood features and significance includes: clustering the significant features of all position points in any preset direction, taking the clustering cluster with the largest number of position points as the standard cluster, and the clustering center of the standard cluster corresponds to the standard significant feature in the preset direction; calculating the difference between the significant features of any position point in each preset direction and the standard significant feature. If the difference is less than the difference threshold, the marking value in the preset direction is 1. Otherwise, the marking value in the preset direction is 0, and the sum of the marking values in each preset direction is used as the neighborhood score; in response to the significance being greater than the significance threshold and the neighborhood score being greater than the score threshold, taking the position point as a candidate pin point.

[0042] Among them, distance clustering algorithms such as Kmeans or Kmeans++ can be used to cluster the significant features of all position points in any preset direction, and the elbow method can be used to determine the number of clustering clusters, thereby obtaining multiple clustering clusters, and each clustering cluster includes at least one significant feature. The distance between any two significant features in the clustering process can use the Hamming distance or the Euclidean distance, which is not limited here.

[0043] Since the significant neighborhood features of the pin position points show consistency, while the significant neighborhood features of the high-brightness area points are different, therefore, taking the clustering center of the clustering cluster with the largest number of position points as the standard significant feature can reflect the distribution law of the pin position points in the corresponding preset direction.

[0044] Among them, the value of the difference threshold is 0.1, and the significance threshold is the average significance of each position point in the luminance image; the scoring threshold is 3. That is, if a position point satisfies the distribution rule in more than 3 preset directions, it is determined that the significance neighborhood feature of this position point conforms to the pin feature. In this way, the pin position points located at the edges and vertices can be used as candidate pin points to avoid missing detection of pin position points.

[0045] In this way, candidate pin points are determined by comprehensively considering the significance of position points and the significance neighborhood features. While deleting a large number of high-brightness area points, missing detection of pin position points is avoided.

[0046] S104. Perform Hough line detection on each candidate pin point to obtain multiple candidate lines. Take the average confidence of the candidate lines where the candidate pin points are located as the pin probability, and use the candidate pin points with a pin probability greater than the probability threshold as the target pin points. The confidence of the candidate line is negatively correlated with the variance of the distances between adjacent candidate pin points on the candidate line.

[0047] In one embodiment, since the pins of the automotive connector are arranged regularly at equal intervals and the pin position points can form multiple lines, Hough line detection is performed on each candidate pin point, and the candidate pin points are further screened by determining whether the candidate pin points are on the lines to obtain the target pin points.

[0048] Among them, Hough line detection is a well-known technology to those skilled in the art and will not be elaborated here. In the Hough line detection algorithm, the number of votes needs to be set. This number of votes is used to ensure the number of candidate pin points on the line and can be set according to the actual situation of the pins of the automotive connector. In the embodiment of the present application, the value of this number of votes is 3; after setting the number of votes, multiple candidate lines can be obtained.

[0049] In one embodiment, calculate the confidence of each candidate line. The confidence is used to represent the probability that the candidate line is composed of pin position points; the confidence of the candidate line is: , where is the variance of the distances between adjacent candidate pin points on the candidate line . When the variance of the distances between adjacent candidate pin points on the candidate line tends to 0, it indicates that the candidate pin points on the candidate line are regularly distributed at equal intervals, and this candidate line

[0050] A candidate pin insertion point lies on multiple candidate lines. Calculate the average confidence of each candidate line as the pin insertion probability. Consider the candidate pin insertion points with a pin insertion probability greater than the probability threshold as the target pin insertion points to achieve precise detection of the target pin insertion points. Among them, the value of the probability threshold is 0.5.

[0051] S105. Obtain the quality inspection result based on the similarity of the gray-scale features within the sampling distance of each target pin insertion point in the connector pin gray-scale image.

[0052] In one embodiment, after determining the target pin insertion points, convert the RGB image in step S101 into a connector pin gray-scale image, and construct the gray-scale features of each target pin insertion point in the connector pin gray-scale image. Ideally, the gray-scale features between the target pin insertion points have a high similarity. When the difference in the gray-scale features between the target pin insertion points is large, it indicates quality problems such as deformation or misalignment of the automotive connector pins. Therefore, the quality inspection of the automotive connector pins can be achieved through the similarity of the gray-scale features.

[0053] Specifically, obtaining the quality inspection result includes: taking the target pin insertion point as the center point, constructing a rectangular area with both the length and width being half of the sampling distance. In the connector pin gray-scale image, take the gray-scale values of each position point within the rectangular area as the gray-scale features of the target pin insertion point. In response to the similarity of the gray-scale features between the target pin insertion points being greater than the similarity threshold, the quality inspection result is qualified; otherwise, the quality inspection result is unqualified.

[0054] Among them, the similarity uses a similarity calculation method based on the Euclidean distance. In this embodiment, the value of the similarity threshold is 0.8. When the similarity of the gray-scale features between any two target pin insertion points is greater than 0.8, it indicates that the two target pin insertion points have similar gray-scale features. When the gray-scale features between all target pin insertion points are similar, the quality inspection result is qualified.

[0055] It can be understood that the sampling distance is the distance between adjacent pins in the image, and half of the sampling distance corresponds to the position of the midpoint between adjacent pins, that is, the rectangular area of the target pin insertion point can cover the neighborhood range of each pin.

[0056] In another embodiment, the similarity threshold between the target pin insertion points is a fixed value. However, there may be differences in the brightness features of the target pin insertion points, and the differences in the brightness features will further affect the similarity of the gray-scale features. Therefore, using a fixed value for the similarity threshold between the target pin insertion points ignores the differences in the brightness features between the target pin insertion points. Therefore, the similarity threshold between the target pin insertion points can be adaptively adjusted according to the differences in the brightness features between the target pin insertion points. When the difference in the brightness features between any two target pin insertion points is large, reduce the similarity threshold between the two target pin insertion points.

[0057] Specifically, the similarity threshold between the target pin points and the target pin points is as follows: In the connector pin brightness image, the brightness values of each position point within the rectangular area of the target pin point are used as the brightness features of the target pin point rectangle ; The product of the similarity of the brightness features between the target pin point and the target pin point and the initial threshold is used as the similarity threshold between the target pin point and the target pin point .

[0058] Among them, the value of the initial threshold is 0.8.

[0059] It should be noted that before obtaining the quality inspection result based on the similarity of the gray - scale features of each target pin point within the sampling distance in the connector pin gray - scale image, the number of target pin points can also be compared with the theoretical number of automotive connector pins to determine whether there is a defect of missing pins. When there is a missing pin, the quality inspection result is directly determined to be unqualified.

[0060] In this way, candidate pin points are screened out from all position points according to the saliency value and saliency neighborhood features in the brightness image, and then, according to the characteristic that the pins are arranged regularly at equal intervals, the Hough line detection is performed on the candidate pin points. The target pin points are accurately located based on the variance of the distances between adjacent candidate pin points on the candidate lines where the candidate pin points are located, and then the quality inspection result is obtained based on the similarity of the gray - scale features of the target pin points in the connector pin gray - scale image.

[0061] According to the second aspect of the present application, the present application also provides a machine - vision - based automotive connector pin detection system. Figure 3 is a structural block diagram of a machine - vision - based automotive connector pin detection system according to an embodiment of the present application. As Figure 3 shown, the system 50 includes a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine - vision - based automotive connector pin detection method according to the first aspect of the present application is implemented. The system also includes a communication bus and a communication interface and other components well - known to those skilled in the art. Their settings and functions are known in the art, so they will not be described in detail here.

[0062] It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can be made, and these all belong to the protection scope of the present application.

Claims

1. A method for detecting automotive connector pins based on machine vision, characterized in that: The detection method comprises: The saliency of each position point in the connector pin brightness image is obtained by using a saliency detection algorithm; Constructing the significant neighborhood features of each position point, including: obtaining the significant sequences within the sampling distance along multiple preset directions of any position point, marking the mutation points in the significant sequences as 1, and marking the non-mutation points as 0, and obtaining the significant features of each preset direction to construct the significant neighborhood features; Determine candidate pin points based on significant neighborhood features and significance; Perform Hough line detection on each candidate pin point to obtain multiple candidate lines. The mean confidence value of the candidate line where the candidate pin point is located is used as the pin probability. The candidate pin point with a pin probability greater than the probability threshold is used as the target pin point. The confidence of the candidate line is negatively correlated with the variance of the spacing between adjacent candidate pin points on the candidate line. The quality inspection result is obtained based on the similarity of the grayscale features of each target pin point within the sampling distance in the connector pin grayscale image.

2. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: Before constructing the significant neighborhood features of each position point, the detection method further includes: performing Gaussian filtering and closing operations on the significance of each position point in turn.

3. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: The plurality of preset directions include 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees.

4. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: The sampling distance for: , is the spatial distance between the pins of the automotive connector, is the spatial distance corresponding to a pixel in the brightness image, Express Round up.

5. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: The candidate pin points determined based on the significant neighborhood features and significance include: Clustering the significant features of all position points in any preset direction, taking the cluster with the largest number of position points as the standard cluster, and the cluster center of the standard cluster is the standard significant feature of the preset direction; Calculate the difference between the significant feature and the standard significant feature in each preset direction of any location point. If the difference is less than the difference threshold, the mark value of the preset direction is 1. Otherwise, the mark value of the preset direction is 0. The sum of the mark values ​​of each preset direction is used as the neighborhood score. In response to the significance being greater than the significance threshold and the neighborhood score being greater than the score threshold, the location point is taken as a candidate pin point.

6. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: Candidate Line Confidence for: , Candidate straight line The variance of the spacing between adjacent candidate pin points.

7. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: The obtaining of quality inspection results comprises: Taking the target pin point as the center point, construct a rectangular area with a length and width of half the sampling distance, and use the grayscale value of each position point in the rectangular area in the connector pin grayscale image as the grayscale feature of the target pin point; In response to the similarity of the grayscale features between the target pin points being greater than the similarity threshold, the quality detection result is qualified, otherwise, the quality detection result is unqualified.

8. The method for detecting automotive connector pins based on machine vision according to claim 7, characterized in that: Target pin point and target pin point The similarity threshold between is: Place the target pin point in the connector pin intensity image. The brightness value of each point in the rectangular area is used as the target pin point rectangle Brightness characteristics; The target pin point and target pin point The similarity of the brightness feature between the two images and the initial threshold is used as the target pin point. and target pin point The similarity threshold between .

9. The method for detecting automotive connector pins based on machine vision according to claim 1, characterized in that: The saliency detection algorithm is an LC algorithm or a HC algorithm.

10. An automotive connector pin detection system based on machine vision, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for detecting automobile connector pins based on machine vision according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Visual detection method for quality of high-speed multifunctional connector

    CN117876376A

Cited By

  • Plug-in quality detection method and system based on machine vision

    CN120707565A