A method and device for detecting the appearance of crimped connector contacts

Computer vision technology is used to perform image preprocessing, feature recognition and template comparison on crimp connector contacts, which solves the problems of low efficiency and human resource occupation of traditional inspection methods, achieves efficient contact qualification judgment, and improves the quality of cables. Net product production efficiency.

CN112598632BActive Publication Date: 2024-09-06BEIJING SATELLITE MFG FACTORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011492715.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-16
Publication Date
2024-09-06
Estimated Expiration
2040-12-16

AI Technical Summary

Technical Problem

The traditional appearance inspection method of crimp connector contacts is inefficient and takes up a lot of human resources, resulting in high inspection quality and time costs, which affects the production efficiency of cable network products.

Method used

Computer vision technology is used to preprocess the contact image, identify the area to be detected, filter the feature map and compare it with the template threshold, and achieve non-contact qualification through means filtering, grayscale processing, deep learning and image histogram characterization. sexual judgment.

Benefits of technology

It improves the efficiency of contact qualification determination, saves a lot of human resources, and improves detection accuracy and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112598632B
    Figure CN112598632B
Patent Text Reader

Abstract

The present invention discloses a method and device for detecting the appearance of crimped connector contacts, wherein the method comprises: preprocessing an input contact image to obtain a target image; identifying an area to be detected in the target image; screening a feature map in the area to be detected; and comparing the feature map with a corresponding template threshold to determine whether the feature map is qualified. The crimped connector contact appearance detection method disclosed by the present invention can improve the efficiency of determining the qualified contacts and save a lot of human resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision detection, and in particular relates to a method and a device for detecting the appearance of a crimped connector contact. Background Art

[0002] At present, crimp connectors dominate cable network products.

[0003] Generally speaking, the number of crimping terminals required for a model is huge. However, at present, the qualification judgment of crimping contacts of crimping connectors basically relies entirely on manual visual inspection, and omissions and mistakes are inevitable in the process; in addition, manual inspection requires rest time, which reduces the efficiency of cable network product production in terms of inspection quality and time required. The contacts used in commonly used crimping electrical connectors need to be crimped with the wires before being installed in the connector. The crimping quality of the contacts will directly determine the performance of the crimping connector after docking. After unqualified crimping parts are installed in the electrical connector, in the subsequent docking and use process, it will lead to risks such as unqualified electrical performance and the generation of excess materials, which will pose a serious threat to related equipment. Summary of the invention

[0004] The technical problem to be solved by the present invention is that the traditional appearance inspection method of the crimping connector contact is inefficient and occupies a large amount of human resources.

[0005] In order to solve the above technical problems, the present invention discloses a method for detecting the appearance of a crimped connector contact, wherein the method comprises:

[0006] Preprocessing the input contact image to obtain a target image;

[0007] Identifying a region to be detected in the target image;

[0008] Filter the feature map in the area to be detected;

[0009] The feature map is compared with the corresponding template threshold to determine whether the feature map is qualified.

[0010] Optionally, the step of preprocessing the input contact element image to obtain the target image includes:

[0011] Performing mean filtering on the input contact element image to obtain a first image;

[0012] Grayscale processing is performed on the first image to obtain a target image.

[0013] Optionally, the step of identifying the area to be detected in the target image includes:

[0014] Dividing the target image into grid images according to a preset ratio;

[0015] Taking a grid as a prediction unit, respectively predicting a plurality of bounding boxes in each prediction unit;

[0016] For each of the bounding boxes, the confidence of the bounding box of the contained object is calculated, and the possibility that the contained target belongs to a preset category is calculated.

[0017] Optionally, the step of comparing the feature map with a corresponding template threshold to determine whether the feature map is qualified includes:

[0018] In the case where the feature map is a feature map in an observation hole, an image histogram is used to characterize pixel distribution of the feature map;

[0019] Determining a matching degree between the image histogram and a corresponding template threshold;

[0020] When the matching degree is higher than a preset matching degree, determining that a wire core is stored in the observation hole;

[0021] Determining the pixel value of each metric ratio according to the resolution magnification of the contact element image and a preset reference size of the contact element;

[0022] Determine the indentation position and the wire core length value according to the pixel value of each metric ratio;

[0023] Whether the characteristic diagram is qualified is determined based on the indentation position and the wire core length value.

[0024] In order to solve the above technical problems, the present invention also discloses a crimp connector contact appearance detection device, comprising:

[0025] A preprocessing module, used for preprocessing the input contact image to obtain a target image;

[0026] A recognition module, used for identifying the area to be detected in the target image;

[0027] A screening module, used for screening the feature graph in the area to be detected;

[0028] The comparison module is used to compare the feature map with the corresponding template threshold to determine whether the feature map is qualified.

[0029] Optionally, the preprocessing module includes:

[0030] The first submodule is used to perform mean filtering on the input contact image to obtain a first image;

[0031] The second submodule is used to perform grayscale processing on the first image to obtain a target image.

[0032] Optionally, the identification module includes:

[0033] A third submodule is used to divide the target image into grid images according to a preset ratio;

[0034] A fourth submodule is used to use a grid as a prediction unit and predict a plurality of bounding boxes in each prediction unit respectively;

[0035] The fifth submodule is used to calculate the confidence of the bounding box of the contained object for each of the bounding boxes, and calculate the possibility that the contained target belongs to a preset category.

[0036] Optionally, the comparison module includes:

[0037] A sixth submodule, for characterizing pixel distribution of the feature map by using an image histogram when the feature map is a feature map in an observation hole;

[0038] A seventh submodule, used to determine the matching degree between the image histogram and the corresponding template threshold;

[0039] An eighth submodule is used to determine that a wire core is stored in the observation hole when the matching degree is higher than a preset matching degree;

[0040] A ninth submodule, for determining a pixel value of each metric ratio according to a resolution magnification of the contact element image and a preset reference size of the contact element;

[0041] A tenth submodule, used to determine the indentation position and the wire core length value according to the pixel value of each metric ratio;

[0042] The eleventh submodule is used to determine whether the characteristic diagram is qualified according to the indentation position and the wire core length value.

[0043] The present invention has the following advantages:

[0044] The embodiment of the present invention discloses a method and device for detecting the appearance of crimped connector contacts, which preprocesses an input contact image to obtain a target image; identifies an area to be detected in the target image; screens a feature map in the area to be detected; and compares the feature map with a corresponding template threshold to determine whether the feature map is qualified. This scheme can perform non-contact judgment on the qualification of crimped contacts of electrical connectors, and can improve the efficiency of contact qualification judgment through computer vision methods, while also saving a lot of human resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of the steps of a method for detecting the appearance of a crimp connector contact according to an embodiment of the present invention;

[0046] Figure 2 Schematic diagram of the appearance of the crimp connector contacts;

[0047] Figure 3 This is a schematic diagram of the mean filtering principle;

[0048] Figure 4 Schematic diagram of the process of training crimped contact features through convolutional neural networks;

[0049] Figure 5 The present invention is a schematic structural diagram of a device for inspecting the appearance of crimped connector contacts according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The present invention will be described in detail below based on specific embodiments and in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] Computer vision detection and control technology is the key to the technical problem of environmental perception and autonomous control of intelligent manufacturing equipment. Computer vision technology is an intelligent measurement and control technology that replaces human eyes, brains, and hands to detect, measure, analyze, judge, and make decisions. It is an important means for humans to imitate their own visual perception ability to achieve automated measurement and control. Compared with other detection and control technologies, the advantage of machine vision detection and control technology is that it is non-contact, which can greatly ensure that the product's own properties are not changed. It is very suitable for systems such as the aerospace industry that have strict requirements on product quality.

[0052] The use of computer vision technology for target detection in industrial production has become a very mature application field. Intelligent assistance or even replacement of manual judgment of the status of assembly parts can greatly improve processing and manufacturing efficiency and reduce the high cost caused by manual inefficiency.

[0053] Industrial target detection originates from the target detection branch of computer vision technology. The target detection task is to use a rectangular frame to enclose the area where the target appears in the image and identify the target category, including positioning and classification. The target detection method is to use a sliding window method to detect the image region by region, and feature extraction mainly relies on manual design. With the rapid development of deep learning technology, target detection has greatly improved the detection precision and accuracy with the support of deep learning.

[0054] When using computer vision technology to detect and judge the appearance of crimp connector contacts, the current industrial target detection method cannot be directly applied. Direct application will have the following problems:

[0055] Problem 1: Uncertainty in lighting conditions

[0056] Problem 2: Uncertainty in the angle of the crimped part being tested

[0057] Problem 3: Feature extraction of crimped contacts

[0058] Problem 4: Size measurement problem

[0059] In view of the appearance characteristics of crimp-type connector contacts, this design intends to adopt the following technical solutions to solve the above problems.

[0060] (1) Uncertainty of lighting conditions

[0061] In response to this problem, due to the large number of interfering light sources in the production environment, the problem of inconsistent light brightness cannot be avoided at the production site of the cable network workshop, which will cause noise interference in the image, so the image needs to be processed in advance to ensure the subsequent process. The present application intends to use the mean filtering method to pre-process the input image. Mean filtering is a spatial domain filtering method, that is, the pixel points of the image are directly processed without calculation by methods such as Fourier transform. This method can well smooth some pixel points with large pixel value fluctuations to be similar to the surrounding pixel information, thereby achieving a filtering effect. In addition, the number of channels of the input image is transformed, and the image containing RGB (red, green, and blue color channels) information is converted into a single-channel grayscale value image. By converting the grayscale information, the influence of the light source on the image to be processed can be greatly reduced.

[0062] (2) Uncertainty of angle of the crimped part being tested

[0063] When photographing the crimped contact to be tested, there will be a small range of changes in the shooting angle. Although this change does not interfere much with the judgment of the human eye, for machine vision, the features have changed significantly. The present application intends to use deep learning to locate the image processing area. Traditional pattern recognition requires sliding a window of a fixed size on the image for detection. When the window slides to the target area, the features are extracted and compared to obtain the detection result. The traditional method has a large amount of calculation, and for the size of the window, it is necessary to assume that the width and height of the target are unchanged. This adds a lot of unnecessary computing costs for the detection of contacts and the accuracy is relatively low. By training the neural network for features, the test area can be accurately searched and located after the test image is preprocessed, reducing computing costs. This application is mainly aimed at Figure 2 The crimp connector contact shown in the figure can extract the corresponding areas of the three features in the input image after the neural network training (0 <a<1mm)。

[0064] (3) Feature extraction of crimped contacts

[0065] Combined with the output of the neural network (2), the feature areas that need to be detected and screened in this application are detected and judged separately; among them, the indentation position and Figure 2 The size of a in the figure belongs to the same detection problem, which will be described in detail in this (4). Regarding the problem of whether the wire core in the observation hole is visible, the present application further segments the image fragments after feature screening, and then matches them with the pre-set template according to the spatial histogram features in the observation hole. When the similarity exceeds the preset matching degree, it can be judged as qualified. Therefore, the present application specifically selects the edge feature extraction algorithm of the crimped contact, and inputs the image into the histogram comparison calculation module after accurately segmenting the image.

[0066] (4) Dimension measurement issues

[0067] For the determination of the indentation position of the crimped contact and the qualified length of the wire core, it is necessary to test the calibration and resolution of the camera based on the hardware shooting platform. After the hardware parameters are confirmed, the size in the picture can be converted to the actual size in a fixed ratio. This method is also the main method of measuring the size of two-dimensional pictures. Under the condition of accurate positioning conversion, the error can be controlled within 0.1mm.

[0068] Figure 1 A flowchart of the steps of a method for inspecting the appearance of contacts of a crimp connector provided by an embodiment of the present invention.

[0069] The method for detecting the appearance of a crimp connector contact provided by an embodiment of the present invention comprises the following steps:

[0070] Step 101: pre-process the input contact image to obtain a target image.

[0071] In an optional embodiment, the input contact image is preprocessed to obtain the target image in the following manner: first, the input contact image is processed by mean filtering to obtain a first image; second, the first image is processed by grayscale to obtain a target image. The contact image is the contact image of the crimp connector to be detected.

[0072] In the actual implementation process, the contact part image, that is, the image to be tested, can be read into the processing host in the form of matrix storage, so that the subsequent modules can traverse every pixel in the image. Then the image to be tested is smoothed using the mean filtering method. The mean filter can filter out the high-frequency noise in the input image to be tested and some unnecessary noise points. In the embodiment of the present application, the basic implementation principle is to "slide" a "window" of a fixed size on the image to be tested, and replace the value of the original center pixel with the mean of the pixels in the window. After analyzing the sample image, in the embodiment of the present application, a 5x5 size window is selected for traversal operation, such as Figure 3As shown in the schematic diagram of the mean filtering principle, the edge features of the crimped contact can be retained to the greatest extent.

[0073] The image after mean filtering is grayed out. The gray image is an image whose channel number becomes 1, and the dynamic value range of each pixel is within the range of 0 to 255. This conversion can simplify the texture information in the image. Since the contact features to be extracted are irrelevant to the texture information when inspecting the appearance of the crimped connector contact, the simplification can reduce the subsequent computational cost.

[0074] Step 102: Identify the area to be detected in the target image.

[0075] An optional method of identifying the area to be detected in the target image is as follows:

[0076] First, the target image is divided into grid images according to a preset ratio. Second, the grid is used as the prediction unit to predict multiple bounding boxes in each prediction unit. Finally, for each bounding box, the confidence of the bounding box of the contained object is calculated, and the possibility that the contained target belongs to the preset category is calculated.

[0077] In the actual implementation process, after preprocessing the image, it is necessary to locate the image in the area where the contact part needs to be detected. In the embodiment of the present application, relevant algorithms in deep learning are used to realize the positioning of the detection area. Early target detection algorithms based on deep learning used selective search to reduce the number of bounding boxes that must be tested (the bounding box in the embodiment of the present application refers to a rectangle that frames the object on the picture after predicting the suspected identified target). The method used in the embodiment of the present application is to perform a one-time forward processing of the image with a neural network. Figure 4 As shown in the figure, the specific processing process is as follows: first, the original image is evenly decomposed into a picture with a 13x13 grid in proportion. These 169 units will change according to the size of the original image. For example, for a 416x416 pixel image, the size of each image unit is 32x32 pixels. When processing an image, multiple bounding boxes in the unit are predicted based on the image unit. For each bounding box, the network calculates the confidence of the bounding box of the object contained, and calculates the possibility that the contained target belongs to a specific category. Non-maximum suppression can eliminate low-confidence bounding boxes, as well as eliminate multiple high-confidence bounding boxes that surround a single object at the same time until only one is left.

[0078] Step 103: Filter the feature map in the area to be detected.

[0079] The area to be detected is further segmented to determine the feature map. The method used in the embodiment of the present application belongs to the regional growing method, because after the positioning in the aforementioned steps, the edge of the characteristic area of ​​the crimped contact, that is, the area to be detected, remains obvious. Specifically, the uniformity of the pixel features in the observation hole of the crimped contact is used to achieve image segmentation, and the 8-neighborhood growth method and the threshold termination rule are used to take the observation hole part with the largest area in the contact feature map as the detection area. Let the random seed pixel point of the detection area be X. If the neighborhood image block of X∈T intersects with multiple categories, then x∈Am. The specific expression is shown in the following formula:

[0080]

[0081] Among them, x is a random seed pixel, y is a pixel in the area to be tested, Am is the set to be detected, and g is the gray value.

[0082] Step 104: Compare the feature map with the corresponding template threshold to determine whether the feature map is qualified.

[0083] In an optional embodiment, comparing the feature map with the corresponding template threshold to determine whether the feature map is qualified includes the following sub-steps:

[0084] Sub-step 1: when the feature map is a feature map in the observation hole, using an image histogram to characterize the pixel distribution of the feature map; secondly, determining the matching degree between the image histogram and the corresponding template threshold;

[0085] Step 2: when the matching degree is higher than a preset matching degree, determining that there is a wire core in the observation hole;

[0086] Sub-step three: determining the pixel value of each metric ratio according to the resolution magnification of the contact image and the preset reference size of the contact;

[0087] Sub-step 4: Determine the indentation position and the wire core length value according to the pixel value of each metric ratio;

[0088] Sub-step 5: Determine whether the characteristic diagram is qualified based on the indentation position and the wire core length value.

[0089] In the actual implementation process, for the feature map in the observation hole obtained by segmentation, the image histogram is used to reflect its pixel distribution statistics, and compared with the template threshold set in advance. When the similarity reaches the preset matching degree, such as more than 80%, it can be considered that there is a wire core in the contact observation hole. In addition, the indentation and wire core length need to be magnified by the resolution of the image input by the hardware device, and the pixel value of each metric ratio is converted by using the contact reference measured in advance as the standard, so as to obtain the indentation position and wire core length value, and determine whether it meets the specification.

[0090] The embodiment of the present application provides a method for detecting the appearance of crimped connector contacts. The embodiment of the present invention discloses a method and device for detecting the appearance of crimped connector contacts, which pre-processes an input contact image to obtain a target image; identifies an area to be detected in the target image; screens a feature map in the area to be detected; and compares the feature map with a corresponding template threshold to determine whether the feature map is qualified. This scheme can perform non-contact judgment on the qualification of crimped contacts of electrical connectors. The efficiency of contact qualification judgment can be improved through computer vision methods, and a large amount of human resources can be saved.

[0091] Figure 5 A flowchart of the steps of a method for detecting the appearance of contacts of a crimp connector provided by an embodiment of the present invention.

[0092] The crimp connector contact appearance inspection device provided by the embodiment of the present invention includes the following modules:

[0093] A preprocessing module 501 is used to preprocess the input contact image to obtain a target image;

[0094] An identification module 502 is used to identify the area to be detected in the target image;

[0095] A screening module 503 is used to screen the feature graphs in the area to be detected;

[0096] The comparison module 504 is used to compare the feature map with the corresponding template threshold to determine whether the feature map is qualified.

[0097] Optionally, the preprocessing module includes:

[0098] The first submodule is used to perform mean filtering on the input contact image to obtain a first image;

[0099] The second submodule is used to perform grayscale processing on the first image to obtain a target image.

[0100] Optionally, the identification module includes:

[0101] A third submodule is used to divide the target image into grid images according to a preset ratio;

[0102] A fourth submodule is used to use a grid as a prediction unit and predict a plurality of bounding boxes in each prediction unit respectively;

[0103] The fifth submodule is used to calculate the confidence of the bounding box of the contained object for each of the bounding boxes, and calculate the possibility that the contained target belongs to a preset category.

[0104] Optionally, the comparison module includes:

[0105] A sixth submodule, for characterizing pixel distribution of the feature map by using an image histogram when the feature map is a feature map in an observation hole;

[0106] A seventh submodule, used to determine the matching degree between the image histogram and the corresponding template threshold;

[0107] An eighth submodule is used to determine that a wire core is stored in the observation hole when the matching degree is higher than a preset matching degree;

[0108] A ninth submodule, for determining a pixel value of each metric ratio according to a resolution magnification of the contact element image and a preset reference size of the contact element;

[0109] A tenth submodule, used to determine the indentation position and the wire core length value according to the pixel value of each metric ratio;

[0110] The eleventh submodule is used to determine whether the characteristic diagram is qualified according to the indentation position and the wire core length value.

[0111] The embodiment of the present invention discloses a device for inspecting the appearance of crimped connector contacts, which pre-processes an input contact image to obtain a target image; identifies an area to be inspected in the target image; screens a feature map in the area to be inspected; and compares the feature map with a corresponding template threshold to determine whether the feature map is qualified. The device can perform non-contact judgment on the qualification of crimped contacts of electrical connectors, and can improve the efficiency of contact qualification judgment through computer vision methods, while also saving a lot of human resources.

[0112] It should be noted that the above description is only a preferred embodiment of the present invention. It should be understood that for those skilled in the art, several changes and improvements can be made without departing from the technical concept of the present invention, which are all included in the protection scope of the present invention.

[0113] The contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.

Claims

1. A method for detecting the appearance of a crimped connector contact, characterized in that: include: Preprocessing the input contact image to obtain a target image; Specifically, it includes: performing mean filtering processing on the input contact image to obtain a first image; performing grayscale processing on the first image to obtain a target image; Identifying a region to be detected in the target image; Screening the feature map in the area to be detected; The feature map is compared with the corresponding template threshold to determine whether the feature map is qualified; specifically comprising: when the feature map is a feature map in the observation hole, using an image histogram to characterize the pixel distribution of the feature map; Determining a matching degree between the image histogram and a corresponding template threshold; When the matching degree is higher than a preset matching degree, determining that a wire core is stored in the observation hole; Determining the pixel value of each metric ratio according to the resolution magnification of the contact element image and a preset reference size of the contact element; Determine the indentation position and the wire core length value according to the pixel value of each metric ratio; Whether the characteristic diagram is qualified is comprehensively determined based on whether there is a wire core in the observation hole, the indentation position and the wire core length value.

2. The method according to claim 1, characterized in that: The step of identifying the area to be detected in the target image comprises: Dividing the target image into grid images according to a preset ratio; Taking a grid as a prediction unit, respectively predicting a plurality of bounding boxes in each prediction unit; For each of the bounding boxes, the confidence of the bounding box of the contained object is calculated, and the possibility that the contained target belongs to a preset category is calculated.

3. A device for inspecting the appearance of crimped connector contacts, characterized in that: include: The preprocessing module is used to preprocess the input contact image to obtain the target image; it includes: The first submodule is used to perform mean filtering on the input contact image to obtain a first image; A second submodule is used to perform grayscale processing on the first image to obtain a target image; A recognition module, used for identifying the area to be detected in the target image; A screening module, used for screening the feature graph in the area to be detected; A comparison module, used for comparing the feature map with a corresponding template threshold to determine whether the feature map is qualified; including a sixth submodule, used for characterizing the pixel distribution of the feature map using an image histogram when the feature map is a feature map in an observation hole; A seventh submodule, used to determine the matching degree between the image histogram and the corresponding template threshold; An eighth submodule is used to determine that a wire core is stored in the observation hole when the matching degree is higher than a preset matching degree; A ninth submodule, for determining a pixel value of each metric ratio according to a resolution magnification of the contact element image and a preset reference size of the contact element; A tenth submodule, used to determine the indentation position and the wire core length value according to the pixel value of each metric ratio; The eleventh submodule is used to determine whether the characteristic diagram is qualified according to the indentation position and the wire core length value.

4. The device according to claim 3, characterized in that The identification module comprises: A third submodule is used to divide the target image into grid images according to a preset ratio; A fourth submodule is used to take a grid as a prediction unit and predict a plurality of bounding boxes in each prediction unit respectively; The fifth submodule is used to calculate the confidence of the bounding box of the object contained in each of the bounding boxes, and calculate the possibility that the contained target belongs to a preset category.