Visual detection method and device for process defects of electronic connector

By performing image preprocessing on electronic connectors, establishing three-dimensional model, computing center of mass coordinates and evaluating defects, the problem of difficulty in detecting subtle offset and deformation defects in the prior art is solved, and high-precision detection and real-time early warning are achieved.

CN119438217AInactive Publication Date: 2025-02-14GUANGDONG FUYING PRECISION ELECTRONIC TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411665223.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing optical detection technology is difficult to accurately detect subtle offsets and deformation defects in electronic connectors, resulting in low detection accuracy.

Method used

By obtaining the image data of the electronic connector, preprocessing to obtain the number and spacing of pins, establishing a three-dimensional model to obtain pin coordinates, collecting pin image data and performing center of mass coordinate calculation, calculating pin offset angle, and inputting it into the defect evaluation model Conduct evaluation. When the evaluation value exceeds the preset threshold, an early warning signal is generated.

Benefits of technology

It realizes accurate offset detection and quantitative evaluation of electronic connector pins, provides real-time early warning functions, and improves detection accuracy and quality control level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119438217A_ABST
    Figure CN119438217A_ABST
Patent Text Reader

Abstract

The invention discloses a visual detection method and device for process defects of an electronic connector. The method comprises the following steps: acquiring image data of the electronic connector, performing preprocessing operation to obtain the number of pins and the distance between the pins of the electronic connector, establishing a three-dimensional model of the electronic connector, and obtaining the coordinates of the pins of the electronic connector; acquiring pin image data of the electronic connector, processing the pin image data to obtain a pin standard image, and performing centroid coordinate calculation to obtain centroid coordinates of the pin standard image; according to the coordinates of the center of mass and the coordinates of the pins, the pin deviation angle is calculated, and the pin deviation angle of the electronic connector is obtained; the pin deviation angle and the pin number are input into a pin defect evaluation model, pin defect evaluation is carried out, and a pin defect evaluation value is obtained; when it is judged that the pin defect evaluation value is larger than the preset defect threshold value, an early warning signal is generated and sent to a user side. The method can realize accurate detection of the electronic connector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect detection, and in particular to a method and device for visually detecting process defects of electronic connectors. Background Art

[0002] In the manufacturing process of electronic products, electronic connectors are an important component for connecting circuits and are widely used in various electronic devices. Due to the large number of pins and the tight arrangement of electronic connectors, minor process defects may cause poor contact, unstable signal transmission, and even product failure. Therefore, process defect detection of electronic connectors plays an important role in production quality control. In order to ensure product quality and safety in use, manufacturers have put forward strict requirements for defect detection of electronic connectors, and expect that the detection method can efficiently and accurately identify and locate process defects in connectors.

[0003] In the prior art, process defect detection for electronic connectors mainly relies on manual inspection or semi-automated optical inspection methods. Manual inspection mainly relies on visual observation by the operator to check the number, spacing, offset angle, etc. of pins. However, this detection method is affected by human factors, is inefficient, and its accuracy is difficult to guarantee. With the development of industrial automation, some manufacturing companies have introduced optical inspection systems to scan the surface of connectors through image acquisition and processing technology to identify obvious defects. However, due to the large number of pins and small spacing of connectors, the resolution and stability of optical inspection are often insufficient, making it difficult to accurately detect subtle offset and deformation defects.

[0004] In summary, existing optical inspection technology is easily affected by image noise and has difficulty in accurately calculating tiny pin offset angles, resulting in low accuracy in detecting process defects in electronic connectors. Summary of the invention

[0005] The invention provides a method and a device for visually detecting process defects of an electronic connector, so as to realize accurate detection of the electronic connector.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a method for visually detecting process defects of electronic connectors, comprising: Acquire image data of the electronic connector, perform preprocessing operations, and obtain the number of pins and the pin spacing of the electronic connector; According to the number of pins and the pin spacing, a three-dimensional model of the electronic connector is established to obtain the pin coordinates of the electronic connector; Collecting pin image data of the electronic connector, processing the pin image data, and obtaining a pin standard image; Calculating the centroid coordinates of the standard stitch image to obtain the centroid coordinates of the standard stitch image; Calculating the pin offset angle according to the centroid coordinates and the pin coordinates to obtain the pin offset angle of the electronic connector; Inputting the stitch offset angle and the stitch number into a stitch defect assessment model to perform stitch defect assessment to obtain a stitch defect assessment value; When it is determined that the stitch defect evaluation value is greater than a preset defect threshold, a warning signal is generated and sent to a user terminal.

[0007] As an optional implementation, the acquiring of the image data of the electronic connector and performing a preprocessing operation to obtain the number of pins and the pin spacing of the electronic connector includes: Performing an image segmentation operation according to the image data to obtain a segmented image; Perform edge detection and connection operations according to the segmented image to obtain a dot trace image of the electronic connector; According to the dot trace image, the number of stitches is counted to obtain the number of stitches; Calculating the stitch spacing according to the dot trace image to obtain the stitch spacing; The pin spacing is the distance between two adjacent points in each segment of the dot trace.

[0008] As an optional implementation manner, establishing a three-dimensional model of the electronic connector according to the number of pins and the pin spacing to obtain the pin coordinates of the electronic connector includes: According to the number of pins, the electronic connector is divided into a matrix dot array on a horizontal plane; Determining the coordinate intervals of adjacent points in the matrix dot array according to the pin spacing; According to the matrix dot array and the coordinate interval, a spatial rectangular coordinate system is established with the electronic connector as the origin and mapped to obtain a three-dimensional distribution point set of the pins; Generate a coordinate matrix according to the three-dimensional distribution point set to obtain a pin coordinate matrix of the electronic connector; Based on the pin coordinate matrix, a three-dimensional model of the electronic connector is established to obtain the pin coordinates of the electronic connector.

[0009] As an optional implementation, the collecting of the pin image data of the electronic connector and processing the pin image data to obtain the pin standard image include: According to the stitch image data, image denoising and image enhancement processing are performed to obtain a preprocessed image; According to the pre-processed image, edge detection and contour extraction processing are performed to obtain a stitch contour image; According to the stitch outline image, stitch shape segmentation is performed to separate different stitch areas to obtain independent stitch area images; Extracting stitch features according to the stitch area image to obtain stitch feature parameters; According to the stitch characteristic parameters, the stitch area image is standardized to generate a stitch standard image; The stitch characteristic parameters include stitch length, stitch area and stitch width.

[0010] As an optional implementation, the calculating of the centroid coordinates according to the stitch standard image to obtain the centroid coordinates of the stitch standard image includes: According to the stitch standard image, a centroid coordinate system is constructed to obtain a stitch centroid coordinate system; According to the stitch centroid coordinate system, the centroid position of the stitch standard image is calculated to obtain the centroid coordinates; Based on the center of gravity coordinates, determining detection points along the length direction of the stitch to obtain a first detection point and a second detection point; According to the first detection point, a first stitch image is established, and the centroid coordinates of the first stitch image are calculated; According to the second detection point, a second stitch image is established, and the centroid coordinates of the second stitch image are calculated; The centroid coordinates of the first stitch image and the centroid coordinates of the second stitch image are weighted averaged to obtain the centroid coordinates of the stitch standard image.

[0011] As an optional implementation manner, the pin offset angle calculation is performed according to the centroid coordinates and the pin coordinates to obtain the pin offset angle of the electronic connector, including: Obtaining the preset standard angle of the pins of the electronic connector; Constructing a coordinate plane according to the centroid coordinates and the stitch coordinates to obtain a coordinate plane of the stitch offset angle; According to the coordinate plane, the angle between the line connecting the centroid coordinates to the pin coordinates and the horizontal plane is calculated to obtain the actual installation angle; The difference between the actual installation angle and the standard pin angle is calculated to obtain the pin offset angle.

[0012] As an optional implementation manner, the inputting the stitch offset angle and the stitch number into a stitch defect assessment model to perform stitch defect assessment to obtain a stitch defect assessment value includes: According to the pin offset angle, the deviation degree of each pin from the standard position is calculated to obtain the pin offset degree value; According to the number of pins, determine the standard pin density of the electronic connector to obtain a pin density reference value; Performing weight calculation according to the stitch offset degree value and the stitch density reference value to obtain a stitch offset weight; According to the stitch offset weight, the influence of each stitch on the overall structure is calculated to obtain a stitch influence factor; A defect evaluation value is calculated according to the stitch offset angle, the number of stitches and the stitch influence factor to obtain a stitch defect evaluation value.

[0013] As an optional implementation, the calculation formula of the defect assessment value is as follows:

[0014] in, is the pin defect evaluation value, For the The pin offset angle of each pin, For the The pin impact factor of each pin, For the Theoretical weight of each pin, It is the theoretical total weight of all pins of an electronic connector.

[0015] In a second aspect, the present invention provides a device for visually inspecting process defects of an electronic connector, comprising: A data acquisition module is used to acquire image data of the electronic connector, perform preprocessing operations, and obtain the number of pins and the pin spacing of the electronic connector; A three-dimensional modeling module, used to establish a three-dimensional model of the electronic connector according to the number of pins and the pin spacing, and obtain the pin coordinates of the electronic connector; The pin image acquisition module is used to acquire the pin image data of the electronic connector, process the pin image data, and obtain the pin standard image; A centroid calculation module, used to calculate the centroid coordinates according to the stitch standard image to obtain the centroid coordinates of the stitch standard image; An offset calculation module, used to calculate the pin offset angle according to the centroid coordinates and the pin coordinates, to obtain the pin offset angle of the electronic connector; A defect assessment module, used for inputting the pin offset angle and the pin number into a pin defect assessment model, performing pin defect assessment, and obtaining a pin defect assessment value; The early warning module is used to generate an early warning signal when it is determined that the stitch defect evaluation value is greater than a preset defect threshold, and send the early warning signal to the user end.

[0016] In a third aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for visual inspection of process defects of electronic connectors.

[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method for visually detecting process defects of an electronic connector, comprising: acquiring image data of an electronic connector, performing a preprocessing operation, and obtaining the number of pins and the pin spacing of the electronic connector; establishing a three-dimensional model of the electronic connector according to the number of pins and the pin spacing, and obtaining the pin coordinates of the electronic connector; collecting pin image data of the electronic connector, processing the pin image data, and obtaining a pin standard image; calculating centroid coordinates according to the pin standard image, and obtaining the centroid coordinates of the pin standard image; calculating a pin offset angle according to the centroid coordinates and the pin coordinates, and obtaining the pin offset angle of the electronic connector; inputting the pin offset angle and the number of pins into a pin defect assessment model, performing pin defect assessment, and obtaining a pin defect assessment value; when it is determined that the pin defect assessment value is greater than a preset defect threshold, generating a warning signal, and sending the warning signal to a user end.

[0018] In the present invention, by acquiring image data of an electronic connector and performing preprocessing, the number of pins and spacing information are obtained, which are used to construct a three-dimensional model of the electronic connector and obtain the precise coordinates of the pins. Next, the pin image is collected and the centroid coordinates are calculated to obtain the offset angle of the pin, and then the offset angle and the number of pins are input into the defect assessment model for evaluation. When the evaluation value exceeds the preset defect threshold, the system generates an early warning signal and sends it to the user end. Through this method, the present invention realizes accurate offset detection and quantitative evaluation of the pins of the electronic connector, and at the same time provides a real-time early warning function, so that users can identify and handle process defects more quickly, thereby effectively improving the detection accuracy and quality control level. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic flow chart of a method for visually inspecting process defects of an electronic connector provided by an embodiment of the present invention; Figure 2 It is a schematic structural diagram of a device for visually inspecting process defects of an electronic connector provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In the manufacturing process of electronic products, electronic connectors are an important component for connecting circuits and are widely used in various electronic devices. Due to the large number of pins and the tight arrangement of electronic connectors, minor process defects may cause poor contact, unstable signal transmission, and even product failure. Therefore, process defect detection of electronic connectors plays an important role in production quality control. In order to ensure product quality and safety in use, manufacturers have put forward strict requirements for defect detection of electronic connectors, and expect that the detection method can efficiently and accurately identify and locate process defects in connectors.

[0021] In the prior art, process defect detection for electronic connectors mainly relies on manual inspection or semi-automated optical inspection methods. Manual inspection mainly relies on visual observation by the operator to check the number, spacing, offset angle, etc. of pins. However, this detection method is affected by human factors, is inefficient, and its accuracy is difficult to guarantee. With the development of industrial automation, some manufacturing companies have introduced optical inspection systems to scan the surface of connectors through image acquisition and processing technology to identify obvious defects. However, due to the large number of pins and small spacing of connectors, the resolution and stability of optical inspection are often insufficient, making it difficult to accurately detect subtle offset and deformation defects.

[0022] In summary, existing optical inspection technology is easily affected by image noise and has difficulty in accurately calculating tiny pin offset angles, resulting in low accuracy in detecting process defects in electronic connectors.

[0023] In order to solve the above technical problems, the present invention provides a method and device for visually inspecting process defects of electronic connectors, so as to achieve accurate inspection of electronic connectors.

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Reference Figure 1 The first embodiment of the present invention provides a method for visually inspecting process defects of an electronic connector, comprising the following steps: S11, acquiring image data of the electronic connector, performing preprocessing operations, and obtaining the number of pins and the pin spacing of the electronic connector; S12, establishing a three-dimensional model of the electronic connector according to the number of pins and the pin spacing, and obtaining the pin coordinates of the electronic connector; S13, collecting pin image data of the electronic connector, processing the pin image data, and obtaining a pin standard image; S14, calculating the centroid coordinates according to the stitch standard image to obtain the centroid coordinates of the stitch standard image; S15, calculating the pin offset angle according to the centroid coordinates and the pin coordinates to obtain the pin offset angle of the electronic connector; S16, inputting the stitch offset angle and the stitch number into a stitch defect assessment model, performing stitch defect assessment, and obtaining a stitch defect assessment value; S17, when it is determined that the stitch defect evaluation value is greater than a preset defect threshold, a warning signal is generated and sent to a user terminal.

[0026] In step S11, the image data of the electronic connector is obtained, and a preprocessing operation is performed to obtain the number of pins and the pin spacing of the electronic connector, including: Performing an image segmentation operation according to the image data to obtain a segmented image; Perform edge detection and connection operations according to the segmented image to obtain a dot trace image of the electronic connector; According to the dot trace image, the number of stitches is counted to obtain the number of stitches; Calculating the stitch spacing according to the dot trace image to obtain the stitch spacing; The pin spacing is the distance between two adjacent points in each segment of the dot trace.

[0027] It should be noted that the pin number feature refers to the total number of pins on the electronic connector, which is obtained by analyzing the dot trace image in the image data. The pin number feature plays an important role in defect detection, because the pin number of the electronic connector is one of the basic parameters of the connector structure, which can directly reflect the integrity of the connector and the basic situation of the pin arrangement. In an embodiment of the present invention, the acquisition process of the pin number feature is based on image segmentation, edge detection and connection operations to ensure the accuracy of the extraction results and provide reliable basic data for subsequent defect analysis. The pin spacing feature refers to the distance between adjacent pins of the electronic connector, which is obtained by calculating the distance between each adjacent point in the dot trace image. The pin spacing feature is used to reflect the arrangement density and uniformity of the pins in the electronic connector, so as to determine whether there is abnormal offset or misalignment.

[0028] In an embodiment of the present invention, the calculation result of the pin spacing feature will be used to establish a three-dimensional model of the connector, so as to further calculate the offset angle and position deviation of the pin, and then perform defect assessment. The centroid coordinate feature refers to the center of gravity position coordinates calculated on the standard image of the pin. This feature reflects the center position of the pin and is used to analyze the symmetry and offset degree of the pin arrangement. In an embodiment of the present invention, by constructing a centroid coordinate system and calculating the centroid coordinates, the standard position of each pin can be effectively obtained, providing a benchmark for subsequent offset angle calculations. In addition, the introduction of this feature makes the offset detection more accurate, thereby improving the accuracy and reliability of the overall defect detection system.

[0029] It is worth noting that the image segmentation operation is used to separate the pin part of the electronic connector image from the background. Through this operation, the pin area can be extracted separately, reducing noise interference and improving the accuracy of subsequent feature extraction. Edge detection and connection operations are used to further process the segmented image data to generate a clear outline of the pin and connect the various pin parts. Edge detection can enhance the outline of the pin, making its shape and position clearer, while the connection operation ensures the integrity of the pin image to avoid breakage or defects.

[0030] In step S12, a three-dimensional model of the electronic connector is established according to the number of pins and the pin spacing to obtain the pin coordinates of the electronic connector, including: According to the number of pins, the electronic connector is divided into a matrix dot array on a horizontal plane; Determining the coordinate intervals of adjacent points in the matrix dot array according to the pin spacing; According to the matrix dot array and the coordinate interval, a spatial rectangular coordinate system is established with the electronic connector as the origin and mapped to obtain a three-dimensional distribution point set of the pins; Generate a coordinate matrix according to the three-dimensional distribution point set to obtain a pin coordinate matrix of the electronic connector; Based on the pin coordinate matrix, a three-dimensional model of the electronic connector is established to obtain the pin coordinates of the electronic connector.

[0031] It is worth noting that establishing a three-dimensional model means constructing a three-dimensional space model of an electronic connector based on the data of the number of pins and the spacing between pins to accurately restore its structural layout. This operation maps the pin information in the two-dimensional image into the three-dimensional space to obtain the true coordinate position of the pin. By establishing a three-dimensional model, the spatial distribution of the pins can be more intuitively and accurately reflected. In an embodiment of the present invention, by establishing a three-dimensional model, the spatial coordinates of each pin of the electronic connector, i.e., the pin coordinates, can be accurately obtained. These pin coordinates provide the necessary reference basis for the centroid calculation, offset angle calculation, and defect assessment in subsequent steps.

[0032] Among them, the number of pins and the pin spacing are the basic parameters for establishing a three-dimensional model. The number of pins is used to determine the total number of pins that need to be generated in the model, while the pin spacing determines the relative position between each pin, making the model more consistent with the actual connector structure. Through these parameters, the system can accurately locate the position of each pin in the three-dimensional coordinate system and generate an electronic connector model with a real size ratio.

[0033] In step S13, the pin image data of the electronic connector is collected, and the pin image data is processed to obtain a pin standard image, including: According to the stitch image data, image denoising and image enhancement processing are performed to obtain a preprocessed image; According to the pre-processed image, edge detection and contour extraction processing are performed to obtain a stitch contour image; According to the stitch outline image, stitch shape segmentation is performed to separate different stitch areas to obtain independent stitch area images; Extracting stitch features according to the stitch area image to obtain stitch feature parameters; According to the stitch characteristic parameters, the stitch area image is standardized to generate a stitch standard image; The stitch characteristic parameters include stitch length, stitch area and stitch width.

[0034] It should be noted that the acquisition and processing of stitch image data refers to a series of preprocessing and feature extraction operations on the image to obtain a unified and standardized stitch image, providing an accurate reference for subsequent detection and evaluation. Image denoising is to improve the clarity of the image by eliminating noise in the image (such as ambient light interference and other external noise). Image enhancement strengthens the details of the stitches in the image by adjusting the contrast, brightness, etc., so that its edges and features are more prominent. Among them, Gaussian filtering and median filtering are two commonly used image denoising methods. Gaussian filtering smoothes the image by performing a weighted average operation on the image. The central idea is to use the Gaussian distribution characteristics of pixels in the neighborhood of the image to suppress noise. The median filter replaces the gray value of the pixel with the median of the gray value of the pixel neighborhood. This nonlinear filtering method can effectively remove salt and pepper noise. Exemplarily, in the embodiment of the present invention, the two filtering methods are used in combination, which can complement each other, maintain the edge details of the image, and effectively suppress various types of noise. Of course, according to different actual application scenarios and user needs, other image denoising methods can also be used, and the present invention is not limited to this. Histogram equalization is a commonly used image enhancement method, which adjusts the grayscale value distribution of an image from the original concentrated distribution to a uniform distribution. Exemplarily, the present invention first counts the number of pixels at each grayscale level in the image, constructs a cumulative distribution function, and then maps the original grayscale value to a new grayscale value range through a mapping relationship. This processing can improve the contrast of the image and make the details of the image more clearly visible. Of course, other image enhancement methods can also be used according to different actual application scenarios and user needs, and the present invention is not limited to this.

[0035] It should be noted that edge detection is used to find the boundary of the stitch and generate a stitch contour image. Contour extraction further determines the shape of the stitch so that each stitch is clearly marked in the image. Stitch shape segmentation is used to separate different stitch areas from the overall image so that each stitch is independently identified. This step separates each stitch area into an image area for feature extraction. The extraction of stitch feature parameters is based on the principle of geometric measurement in image processing. The stitch length is obtained by calculating the maximum axis length of the area, the stitch area is obtained by counting the number of pixels in the area, and the stitch width is determined by calculating the maximum distance perpendicular to the length direction. The extraction of these parameters uses sub-pixel accuracy and can accurately reflect the geometric characteristics of the stitch. Standardization processing refers to unifying stitch images of different sizes and positions to the same scale and reference system. For example, the stitch area can be adjusted to a predefined standard size through affine transformation, and the stitch can be located at the center of the image through translation transformation. This processing makes different stitch images comparable, which is convenient for subsequent defect detection.

[0036] In step S14, the centroid coordinates are calculated according to the stitch standard image to obtain the centroid coordinates of the stitch standard image, including: According to the stitch standard image, a centroid coordinate system is constructed to obtain a stitch centroid coordinate system; According to the stitch centroid coordinate system, the centroid position of the stitch standard image is calculated to obtain the centroid coordinates; Based on the center of gravity coordinates, determining detection points along the length direction of the stitch to obtain a first detection point and a second detection point; According to the first detection point, a first stitch image is established, and the centroid coordinates of the first stitch image are calculated; According to the second detection point, a second stitch image is established, and the centroid coordinates of the second stitch image are calculated; The centroid coordinates of the first stitch image and the centroid coordinates of the second stitch image are weighted averaged to obtain the centroid coordinates of the stitch standard image.

[0037] It should be noted that the centroid coordinate calculation operation refers to a series of processing steps on the standard stitch image to accurately locate the center position of the stitch and form a stable reference point for subsequent evaluation. This operation ensures that the calculation of the centroid coordinates can represent the geometric center of the entire stitch and provide a reliable coordinate reference for offset detection. Exemplarily, in an embodiment of the present invention, the centroid coordinate calculation operation includes constructing a centroid coordinate system, calculating the center of gravity position, determining the detection point, generating a local stitch image, calculating the local centroid coordinates and performing weighted averaging, thereby generating high-precision centroid coordinates.

[0038] Among them, constructing a centroid coordinate system refers to defining a reference coordinate system based on the geometric features of the stitches on the standard stitch image, so as to locate the results of the subsequent centroid calculation in a unified coordinate frame. The purpose of this operation is to provide a consistent positioning reference for each stitch, ensure that all calculations can be completed based on the same reference system, and improve the comparability and stability of the data. The calculation of the centroid position is based on the distribution of each pixel in the standard stitch image, and the center point of the image is identified to obtain the geometric centroid coordinates of the stitch. The centroid position, as the starting point of the centroid coordinates, provides an accurate geometric center reference for the main area of ​​the stitch, thereby supporting the subsequent detection point positioning and centroid calculation. Determining the detection point along the length direction of the stitch refers to selecting two representative points along the main geometric axis of the stitch according to the centroid position, which are called the first detection point and the second detection point respectively. This operation ensures that the detection point can accurately represent the characteristics of both ends of the stitch, ensures that sufficient geometric information is collected within the length range of the stitch, and facilitates the establishment of complete centroid coordinates. The first and second stitch images are generated based on the detection points, that is, the local area containing the detection point is extracted from the standard stitch image to form two relatively independent stitch images. On the generated first and second stitch images, the centroid coordinates are calculated respectively to obtain the center position of each detection point area. The purpose of this operation is to ensure that the characteristics of the stitches in different areas are reflected, so that the calculation of the centroid has regional representativeness and improves the accuracy and stability of the centroid coordinates. The centroid coordinates of the first and second stitch images are weighted averaged to integrate the geometric information of different areas, and finally the centroid coordinates of the complete stitch standard image are obtained. The role of weighted averaging is to balance the feature contribution of each area, ensure that the centroid calculation result has overall representativeness and geometric accuracy, and make it more suitable for offset detection and quality assessment.

[0039] In step S15, the pin offset angle is calculated according to the centroid coordinates and the pin coordinates to obtain the pin offset angle of the electronic connector, including: Obtaining the preset standard angle of the pins of the electronic connector; Constructing a coordinate plane according to the centroid coordinates and the stitch coordinates to obtain a coordinate plane of the stitch offset angle; According to the coordinate plane, the angle between the line connecting the centroid coordinates to the pin coordinates and the horizontal plane is calculated to obtain the actual installation angle; The difference between the actual installation angle and the standard pin angle is calculated to obtain the pin offset angle.

[0040] It should be noted that the pin offset angle calculation refers to comparing the actual installation angle of the pin with the preset standard angle to determine the offset of the pin in the electronic connector, thereby evaluating its installation quality. This calculation accurately identifies the degree of pin installation deviation by constructing a coordinate plane and calculating the offset angle, providing support for subsequent defect detection and correction. In an embodiment of the present invention, the pin offset angle calculation operation includes obtaining the standard angle, constructing a coordinate plane, calculating the actual installation angle, and calculating the difference, thereby generating an accurate offset angle.

[0041] Among them, the standard angle of the pin is a preset ideal installation angle, which is used as a reference for offset calculation. This standard angle is set based on design requirements, and its function is to provide a standardized angle parameter for each pin, so as to compare and analyze the gap between the actual installation state and the ideal state. The standard angle of the pin is set to 90 degrees. This standard angle is set as the ideal vertical installation angle of the pin of the electronic connector to ensure that the pin is at right angles to the horizontal plane under normal installation conditions. Of course, according to different actual application scenarios and user needs, the standard angle of the pin can also be set to other angles such as 70 degrees and 80 degrees, which is not limited by the present invention. Constructing a coordinate plane according to the centroid coordinates and the pin coordinates means forming a spatial plane between the centroid and the pin coordinates for calculating the actual installation angle. The purpose of this operation is to establish a unified angle calculation benchmark so that the actual installation situation of the pin can be accurately projected onto the horizontal plane, which is convenient for further angle analysis. The calculation of the actual installation angle is achieved by measuring the angle between the line connecting the centroid coordinates to the pin coordinates and the horizontal plane on the constructed coordinate plane. The purpose of this operation is to obtain the actual installation angle of the pin in space, provide real angle parameters for offset calculation, and thus reflect the deviation during installation. The calculation of the pin offset angle is based on the difference between the actual installation angle and the preset standard angle, and the offset angle is obtained by direct subtraction. This operation quantifies the installation deviation of the pin in order to accurately determine whether the offset exceeds the preset allowable range, thereby providing a clear basis for defect detection.

[0042] In step S16, the stitch offset angle and the stitch number are input into a stitch defect assessment model to perform stitch defect assessment to obtain a stitch defect assessment value, including: According to the pin offset angle, the deviation degree of each pin from the standard position is calculated to obtain the pin offset degree value; According to the number of pins, determine the standard pin density of the electronic connector to obtain a pin density reference value; Performing weight calculation according to the stitch offset degree value and the stitch density reference value to obtain a stitch offset weight; According to the stitch offset weight, the influence of each stitch on the overall structure is calculated to obtain a stitch influence factor; A defect evaluation value is calculated according to the stitch offset angle, the number of stitches and the stitch influence factor to obtain a stitch defect evaluation value.

[0043] It should be noted that the pin defect assessment model comprehensively evaluates the pin installation status of the electronic connector through multiple parameters so as to accurately judge the potential connector pin defects. The pin offset angle refers to the deviation between the actual installation angle of each pin and the standard angle, which is used to characterize the degree of deviation of the pin from its standard installation position. The number of pins represents the total number of pins in the connector, which is used to calculate the reference value of the pin density, which is particularly important in connectors with dense pins and can reflect the overall requirements for installation accuracy. In an embodiment of the present invention, the pin offset weight is used to quantify the potential impact of the pin offset on the performance of the entire connector. The pin impact factor further numerically represents the impact of the offset of each pin on the overall structure, ensuring that the pin with a larger offset has a more significant impact on the defect assessment value. By combining the pin offset angle, the number of pins and the pin impact factor, the pin defect assessment value is finally obtained, which can provide a comprehensive quantitative indicator to facilitate the judgment of whether the pin installation quality of the electronic connector meets the preset standard.

[0044] It is worth noting that the calculation formula of the defect assessment value is as follows:

[0045] in, is the pin defect evaluation value, For the The pin offset angle of each pin, For the The pin impact factor of each pin, For the Theoretical weight of each pin, It is the theoretical total weight of all pins of an electronic connector.

[0046] It should be noted that the various parameters in the defect assessment value calculation formula are intended to provide an accurate quantitative evaluation for the detection of electronic connector pin defects. It is calculated by comprehensively considering the offset angle, influencing factors and their relative weights of each pin, and reflects the installation quality of the pins in the overall structure. For the The pin offset angle of the pin indicates the The deviation angle of a pin relative to its standard position is calculated through image processing and geometric analysis, and reflects the deviation between the actual position of the pin and the ideal position. For the The pin impact factor of the pin indicates the The impact factor is usually determined based on the functional importance of the pin in the connector, position sensitivity and other factors. The larger the value, the greater the impact of the pin offset on the overall performance. For the The theoretical weight of each pin, which is calculated based on the material and size of the pin and is used to quantify the physical importance of each pin in the connector. It is the theoretical sum of the weights of all pins of an electronic connector. This sum is used to normalize the defect assessment value to ensure that the assessment results are comparable and consistent.

[0047] In step S17, when it is determined that the stitch defect evaluation value is greater than the preset defect threshold, a warning signal is generated and sent to the user end.

[0048] It should be noted that when the pin defect evaluation value exceeds the preset defect threshold, the system will automatically generate a warning signal. The defect threshold is a safety limit value set in advance based on the use environment and quality requirements of the electronic connector, which is intended to ensure that the pin offset of the connector is within an acceptable range. Exemplarily, in an embodiment of the present invention, the defect threshold is set to 0.05. The setting of this value is based on the reliability requirements and offset tolerance range of the electronic connector in actual applications. In other words, when the pin defect evaluation value exceeds 0.05, the system will determine that the pin offset has reached a critical point that may affect the normal operation of the connector, thereby generating a warning signal. The generation of the warning signal indicates that the pin offset may affect the normal function or reliability of the connector, and corrective measures need to be taken immediately. Of course, depending on the actual application and user needs, the defect threshold can also be set to other values ​​such as 0.02, 0.1, etc., and the present invention is not limited to this.

[0049] Reference Figure 2 The second embodiment of the present invention provides a visual inspection device for process defects of electronic connectors, comprising: A data acquisition module is used to acquire image data of the electronic connector, perform preprocessing operations, and obtain the number of pins and the pin spacing of the electronic connector; A three-dimensional modeling module, used to establish a three-dimensional model of the electronic connector according to the number of pins and the pin spacing, and obtain the pin coordinates of the electronic connector; The pin image acquisition module is used to acquire the pin image data of the electronic connector, process the pin image data, and obtain the pin standard image; A centroid calculation module, used to calculate the centroid coordinates according to the stitch standard image to obtain the centroid coordinates of the stitch standard image; An offset calculation module, used to calculate the pin offset angle according to the centroid coordinates and the pin coordinates, to obtain the pin offset angle of the electronic connector; A defect assessment module, used for inputting the pin offset angle and the pin number into a pin defect assessment model, performing pin defect assessment, and obtaining a pin defect assessment value; The early warning module is used to generate an early warning signal when it is determined that the stitch defect evaluation value is greater than a preset defect threshold, and send the early warning signal to the user end.

[0050] It should be noted that the visual inspection device for process defects of an electronic connector provided in an embodiment of the present invention is used to execute all process steps of the visual inspection method for process defects of an electronic connector in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be elaborated upon.

[0051] In summary, in the present invention, by acquiring image data of an electronic connector and performing preprocessing, the number of pins and spacing information are obtained, which are used to construct a three-dimensional model of the electronic connector and obtain the precise coordinates of the pins. Next, the pin image is collected and the centroid coordinates are calculated to obtain the offset angle of the pin, and then the offset angle and the number of pins are input into the defect assessment model for evaluation. When the evaluation value exceeds the preset defect threshold, the system generates an early warning signal and sends it to the user end. Through this method, the present invention realizes accurate offset detection and quantitative evaluation of the pins of the electronic connector, and at the same time provides a real-time early warning function, so that users can identify and handle process defects more quickly, thereby effectively improving the detection accuracy and quality control level.

[0052] The embodiment of the present invention further provides a terminal device. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a visual inspection program for process defects of electronic connectors. When the processor executes the computer program, the steps in the above-mentioned embodiments of the visual inspection method for process defects of electronic connectors are implemented, such as Figure 1 Alternatively, the processor implements the functions of each module / unit in the above-mentioned system embodiments when executing the computer program.

[0053] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.

[0054] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of terminal devices and do not constitute a limitation on the terminal device. The terminal device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0055] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0056] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0057] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0058] It should be noted that the system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0059] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for visually inspecting process defects of electronic connectors, characterized in that: Executed by the server, including the following steps: Acquire image data of the electronic connector, perform preprocessing operations, and obtain the number of pins and the pin spacing of the electronic connector; According to the number of pins and the pin spacing, a three-dimensional model of the electronic connector is established to obtain the pin coordinates of the electronic connector; Collecting pin image data of the electronic connector, processing the pin image data, and obtaining a pin standard image; Calculating the centroid coordinates of the standard stitch image to obtain the centroid coordinates of the standard stitch image; Calculating the pin offset angle according to the centroid coordinates and the pin coordinates to obtain the pin offset angle of the electronic connector; Inputting the stitch offset angle and the stitch number into a stitch defect assessment model to perform stitch defect assessment to obtain a stitch defect assessment value; When it is determined that the stitch defect evaluation value is greater than a preset defect threshold, a warning signal is generated and sent to a user terminal.

2. The method for visually inspecting process defects of electronic connectors according to claim 1, characterized in that: The step of acquiring image data of the electronic connector and performing preprocessing operations to obtain the number of pins and the pin spacing of the electronic connector includes: Performing an image segmentation operation according to the image data to obtain a segmented image; Perform edge detection and connection operations according to the segmented image to obtain a dot trace image of the electronic connector; According to the dot trace image, the number of stitches is counted to obtain the number of stitches; Calculating the stitch spacing according to the dot trace image to obtain the stitch spacing; The pin spacing is the distance between two adjacent points in each segment of the dot trace.

3. The method for visually inspecting process defects of electronic connectors according to claim 1, characterized in that: The step of establishing a three-dimensional model of the electronic connector according to the number of pins and the pin spacing to obtain the pin coordinates of the electronic connector includes: According to the number of pins, the electronic connector is divided into a matrix dot array on a horizontal plane; Determining the coordinate intervals of adjacent points in the matrix dot array according to the pin spacing; According to the matrix dot array and the coordinate interval, a spatial rectangular coordinate system is established with the electronic connector as the origin and mapped to obtain a three-dimensional distribution point set of the pins; Generate a coordinate matrix according to the three-dimensional distribution point set to obtain a pin coordinate matrix of the electronic connector; Based on the pin coordinate matrix, a three-dimensional model of the electronic connector is established to obtain the pin coordinates of the electronic connector.

4. The method for visually inspecting process defects of electronic connectors according to claim 1, characterized in that: The collecting of the pin image data of the electronic connector and processing the pin image data to obtain the pin standard image includes: According to the stitch image data, image denoising and image enhancement processing are performed to obtain a preprocessed image; According to the pre-processed image, edge detection and contour extraction processing are performed to obtain a stitch contour image; According to the stitch outline image, stitch shape segmentation is performed to separate different stitch areas to obtain independent stitch area images; Extracting stitch features according to the stitch area image to obtain stitch feature parameters; According to the stitch characteristic parameters, the stitch area image is standardized to generate a stitch standard image; The stitch characteristic parameters include stitch length, stitch area and stitch width.

5. The method for visually inspecting process defects of electronic connectors according to claim 1, characterized in that: The method of calculating the centroid coordinates according to the stitch standard image to obtain the centroid coordinates of the stitch standard image includes: According to the stitch standard image, a centroid coordinate system is constructed to obtain a stitch centroid coordinate system; According to the stitch centroid coordinate system, the centroid position of the stitch standard image is calculated to obtain the centroid coordinates; Based on the center of gravity coordinates, determining detection points along the length direction of the stitch to obtain a first detection point and a second detection point; According to the first detection point, a first stitch image is established, and the centroid coordinates of the first stitch image are calculated; According to the second detection point, a second stitch image is established, and the centroid coordinates of the second stitch image are calculated; The centroid coordinates of the first stitch image and the centroid coordinates of the second stitch image are weighted averaged to obtain the centroid coordinates of the stitch standard image.

6. The method for visually inspecting process defects of electronic connectors according to claim 1, characterized in that: The step of calculating the pin offset angle according to the centroid coordinates and the pin coordinates to obtain the pin offset angle of the electronic connector includes: Obtaining the preset standard angle of the pins of the electronic connector; Constructing a coordinate plane according to the centroid coordinates and the stitch coordinates to obtain a coordinate plane of the stitch offset angle; According to the coordinate plane, the angle between the line connecting the centroid coordinates to the pin coordinates and the horizontal plane is calculated to obtain the actual installation angle; The difference between the actual installation angle and the standard pin angle is calculated to obtain the pin offset angle.

7. The method for visually inspecting process defects of electronic connectors according to claim 1, characterized in that: The step of inputting the pin offset angle and the pin number into a pin defect assessment model to perform pin defect assessment to obtain a pin defect assessment value includes: According to the pin offset angle, the deviation degree of each pin from the standard position is calculated to obtain the pin offset degree value; According to the number of pins, determine the standard pin density of the electronic connector to obtain a pin density reference value; Performing weight calculation according to the stitch offset degree value and the stitch density reference value to obtain a stitch offset weight; According to the stitch offset weight, the influence of each stitch on the overall structure is calculated to obtain a stitch influence factor; A defect evaluation value is calculated according to the stitch offset angle, the number of stitches and the stitch influence factor to obtain a stitch defect evaluation value.

8. The method for visually inspecting process defects of electronic connectors according to claim 7, characterized in that: The calculation formula of the defect assessment value is as follows: in, is the pin defect evaluation value, For the The pin offset angle of each pin, For the The pin impact factor of each pin, For the Theoretical weight of each pin, It is the theoretical total weight of all pins of an electronic connector.

9. A visual inspection device for process defects of electronic connectors, characterized in that: include: A data acquisition module is used to acquire image data of the electronic connector, perform preprocessing operations, and obtain the number of pins and the pin spacing of the electronic connector; A three-dimensional modeling module, used to establish a three-dimensional model of the electronic connector according to the number of pins and the pin spacing, and obtain the pin coordinates of the electronic connector; The pin image acquisition module is used to acquire the pin image data of the electronic connector, process the pin image data, and obtain the pin standard image; A centroid calculation module, used to calculate the centroid coordinates according to the stitch standard image to obtain the centroid coordinates of the stitch standard image; An offset calculation module, used to calculate the pin offset angle according to the centroid coordinates and the pin coordinates, to obtain the pin offset angle of the electronic connector; A defect assessment module, used for inputting the pin offset angle and the pin number into a pin defect assessment model, performing pin defect assessment, and obtaining a pin defect assessment value; The early warning module is used to generate an early warning signal when it is determined that the stitch defect evaluation value is greater than a preset defect threshold, and send the early warning signal to the user end.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for visually inspecting process defects of electronic connectors according to any one of claims 1 to 8.

Citation Information

Cited By

  • Identification detection method and system for radio frequency connector

    CN120891000A

  • Connector pin positioning method, storage medium and equipment

    CN121391986A