Male head type D-SUB connector multi-pin error measurement method and device and storage medium

Through the method based on point cloud processing technology, the problem of insufficient subjectivity and accuracy in the measurement of multi-pin skew error of male D-SUB connectors is solved, and efficient and accurate measurement results are achieved, suitable for various types of D -SUB connector.

CN119273667APending Publication Date: 2025-01-07TSINGHUA UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411420343.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-19
Filing Date
2024-10-12
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The prior art has problems of strong subjectivity, complex operation and insufficient accuracy in the measurement of multi-pin skew error of male D-SUB connectors, especially in the case of small skew detection and high efficiency measurement.

Method used

Using a method based on point cloud processing technology, by acquiring and processing point cloud data, using image feature invariance method and spatial proximity search method, the skew error of the pin is automatically identified and calculated to provide more accurate and efficient measurement results.

Benefits of technology

Accurate measurement of pin skew and height errors is achieved, the objectivity and efficiency of measurement is improved, and the stability and performance of the connector is ensured. It is suitable for D-SUB connectors of all types and specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273667A_ABST
    Figure CN119273667A_ABST
Patent Text Reader

Abstract

The invention provides a male head type D-SUB connector multi-pin error measurement method. The method comprises the following steps: establishing a D-type feature library for identifying the shape of a target male head type D-SUB connector; clustering the obtained initial point cloud to obtain a plurality of impure D-SUB point cloud clusters; sequentially calculating shape features of the impure D-SUB point cloud clusters under the two-dimensional silhouette by using an image feature invariance method, and comparing the shape features with the D-type feature library to obtain a pure D-SUB point cloud cluster closest to the target; plane fitting is carried out on the D-shaped end face and the multi-pin top end in the point cloud cluster; round hole edge points are extracted from all points in the D-shaped end face fitting plane and clustered, round hole point clouds corresponding to all pins are segmented, and 3D space circle fitting is conducted on all the round hole point clouds to obtain the circle centers of the round holes; clustering each point in the multi-pin top fitting plane, and segmenting pin point clouds corresponding to each circular hole; and calculating the space offset between the circle center of the circular hole and the mass center of the point cloud of the corresponding pin, namely the pin deflection error. The method and the device have relatively high measurement precision and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of error measurement of male D-SUB connectors, and in particular to a method, device and storage medium for measuring multi-pin errors of male D-SUB connectors. Background Art

[0002] In the application of male D-SUB connectors, accurate alignment and position of multiple pins are critical. Male D-SUB connectors consist of several round holes and their corresponding pins, and the layout and position of these pins in the connector need to meet specific specifications and standards. However, during the manufacturing and installation process, due to various reasons such as machining errors, slight deformation of materials, or errors during the installation process, the pins may be skewed. This skew means that the pins deviate from their expected theoretical position, and this deviation is technically called "skew error".

[0003] Pin skew error may cause a variety of problems. First, it may affect the insertion and removal process of the connector, making the use of the connector difficult or unstable. Second, skewed pins may cause unstable or interrupted signal transmission, thus affecting the performance and stability of the device. More seriously, long-term use may cause damage to the connector or other related components due to pin skew.

[0004] At present, the measurement methods for multi-pin skew errors of male D-SUB connectors mainly involve the following:

[0005] Visual inspection method: Visual inspection is the most traditional method for detecting multi-pin skew of male D-SUB connectors. The staff directly observes the pins of the connector to determine whether they are skewed. This method is simple and intuitive and does not require any special tools or equipment. The visual inspection method relies entirely on the operator's experience and judgment. The main disadvantage is that it is highly subjective and cannot provide accurate numerical results. In addition, visual inspection may not be able to detect slight deflections.

[0006] Microscope or optical measuring instrument: To improve the accuracy and reliability of measurement, many manufacturers and testing agencies use microscopes or optical measuring instruments to detect multi-pin deflection of male D-SUB connectors. These devices can magnify the image of the pins, making the deflection easier to detect. In addition, some advanced optical measuring instruments can also provide digitized measurement data, further improving the accuracy of the measurement. Although microscopes or optical measuring instruments can provide high-resolution images and precise measurement data, these devices are usually expensive and complicated to operate.

[0007] Dial gauge measurement method: The dial gauge is a precision measuring tool that can measure tiny dimensional changes of an object. In the multi-pin deflection detection of male D-SUB connectors, the dial gauge can be used to measure the diameter, length and position of the pins to determine whether there is deflection. However, the operation process of the dial gauge measurement method is cumbersome and requires experienced operators to ensure the accuracy of the measurement.

[0008] Micrometer measurement method: Similar to the micrometer, the micrometer is also a precision measuring tool. It is usually used to measure the dimensions of a flat surface, such as length, width, and thickness. In the multi-pin deflection detection of male D-SUB connectors, the micrometer can be used to measure the length and position of the pins to determine whether they are deflected. This method is simple and fast, but may not be as accurate as a micrometer and may be affected by the operator's skills and experience. Summary of the invention

[0009] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0010] To this end, the present invention provides a method, device and storage medium for measuring multi-pin errors of male D-SUB connectors based on point cloud processing technology. Compared with the prior art, the present invention is more efficient and accurate, can automatically process point cloud data in various formats, and use advanced algorithms for processing, thereby obtaining more accurate results.

[0011] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:

[0012] The first aspect of the present disclosure provides a method for measuring multi-pin errors of a male D-SUB connector, comprising the following steps:

[0013] A point cloud containing background and target male D-SUB connectors is obtained as an initial point cloud; a D-type feature library for identifying the shape of the target male D-SUB connector is established; the initial point cloud is clustered to obtain a number of impure D-SUB point cloud clusters; the shape features of each impure D-SUB point cloud cluster under a two-dimensional silhouette are calculated in turn using an image feature invariance method, and the shape features are compared with the D-type feature library, and the impure D-SUB point cloud cluster with a difference less than a set threshold is taken as the pure D-SUB point cloud cluster closest to the target;

[0014] Plane fitting is performed on the D-type end face and the multi-pin top in the pure D-SUB point cloud cluster closest to the target respectively; for each point in the obtained D-type end face fitting plane, the edge points belonging to the D-type end face or the circular hole edge points are extracted by using the spatial proximity search method, and then the edge points belonging to the D-type end face are filtered out to obtain the circular hole edge points, the circular hole edge points are clustered, and the circular hole point clouds corresponding to each stitch are segmented; for the circular hole point cloud corresponding to each stitch, 3D space circle fitting is performed on it, and the center of the circular hole is calculated; each point in the obtained multi-pin top fitting plane is clustered, and the stitch point cloud corresponding to the circular hole is segmented; the spatial offset between the center of the circular hole and the center of mass of the corresponding stitch point cloud is calculated, which is the stitch deflection error.

[0015] In some embodiments, the image feature invariance method adopts Hu invariant moment method, SIFT method or HOG method;

[0016] The method used for clustering the initial point cloud is the DBSCAN method, the OPTICS method or the HDBSCAN method.

[0017] In some embodiments, the difference used when comparing the shape features of each impure D-SUB point cloud cluster in the two-dimensional silhouette with the D-type feature library is characterized by the binary norm, one-norm or weighted one-norm of the shape features of the impure D-SUB point cloud cluster in the two-dimensional silhouette and the D-type feature library.

[0018] In some embodiments, the spatial proximity search method uses a kd tree, a quadtree, an octree, or an R-tree.

[0019] In some embodiments, for each point in the obtained D-shaped end face fitting plane, using a spatial proximity search method to extract edge points belonging to the D-shaped end face or circular hole edge points, and then filtering out the edge points belonging to the D-shaped end face to obtain circular hole edge points, specifically includes:

[0020] Traverse each point in the D-shaped end face fitting plane and establish a kd tree, find k nearest neighbors for each point, then calculate the normal n, the vector v obtained by the cross product of the normal and the z-axis, and the vector u obtained by the cross product of the normal n and the vector v for each point, wherein the z-axis represents the depth direction and represents the distance from the camera along its line of sight, and finally calculate the angle between the current point and each k nearest neighbor point, and compare with the set angle threshold θ, and determine the point greater than the angle threshold θ as the edge point of the D-shaped end face or the edge point of the circular hole;

[0021] A statistical outlier filter is constructed to filter out the edge points of the D-shaped end surface, and obtain the circular hole edge points corresponding to all pins.

[0022] In some embodiments, the circular hole edge points are clustered to segment the circular hole point clouds corresponding to each stitch, and a 3D space circle fitting is performed on the circular hole point cloud corresponding to each stitch to calculate the center of the circular hole, using any of the following two methods:

[0023] Method 1: Cluster the circular hole edge points corresponding to all stitches to obtain the point cloud of the circular hole edge points corresponding to each stitch; loop through the point cloud of the circular hole edge points corresponding to each stitch in turn, perform 3D space circle fitting on each circular hole edge point, and calculate the center of the circular hole;

[0024] Method 2: The 3D space circle fitting method is iteratively used for the circular hole edge points corresponding to all stitches. Each iteration segments a point cloud of the circular hole edge point corresponding to a stitch, and obtains the center of the circle obtained by the 3D space circle fitting method. The point cloud and the center of the circular hole edge point corresponding to each stitch are obtained until the iteration is completed.

[0025] In some embodiments, the error measurement method further comprises measuring the height error of multiple pins of the male D-SUB connector according to the following steps:

[0026] For the stitch point cloud corresponding to the segmented circular hole, obtain the point in each stitch point cloud that is closest to the D-shaped end face fitting plane in the z-axis direction, so as to obtain the height of each stitch point cloud to the D-shaped end face fitting plane, and subtract the distance between the D-shaped end face fitting plane and the multi-stitch top fitting plane from the height of each stitch point cloud, and take the absolute value to obtain the height error of each stitch.

[0027] A second aspect of the present disclosure provides an error measurement device according to the error measurement method described in any embodiment of the first aspect of the present disclosure, comprising:

[0028] A pure D-SUB point cloud cluster extraction module is used to obtain a point cloud containing a background and a target male D-SUB connector as an initial point cloud; establish a D-type feature library for identifying the shape of a target male D-SUB connector; cluster the initial point cloud to obtain a number of impure D-SUB point cloud clusters; use an image feature invariance method to calculate the shape features of each impure D-SUB point cloud cluster under a two-dimensional silhouette, compare it with the D-type feature library, and use the impure D-SUB point cloud cluster with a difference less than a set threshold as the pure D-SUB point cloud cluster closest to the target;

[0029] The multi-pin error measurement module is used to perform plane fitting on the D-type end face and the multi-pin top in the pure D-SUB point cloud cluster closest to the target respectively; for each point in the obtained D-type end face fitting plane, the edge points belonging to the D-type end face or the circular hole edge points are extracted by using a spatial proximity search method, and then the edge points belonging to the D-type end face are filtered out to obtain the circular hole edge points, the circular hole edge points are clustered, and the circular hole point clouds corresponding to each pin are segmented; for the circular hole point cloud corresponding to each pin, 3D space circle fitting is performed on it to calculate the center of the circular hole; each point in the obtained multi-pin top fitting plane is clustered, and the stitch point cloud corresponding to the circular hole is segmented; the spatial offset between the center of the circular hole and the center of mass of the corresponding stitch point cloud is calculated, which is the stitch deflection error.

[0030] In some embodiments, the multi-stitch error measurement module is also used to obtain the point in the z-axis direction closest to the D-shaped end face fitting plane in each stitch point cloud corresponding to the segmented circular hole, so as to obtain the height of each stitch point cloud to the D-shaped end face fitting plane, and subtract the distance between the D-shaped end face fitting plane and the multi-stitch top fitting plane from the height of each stitch point cloud, and take the absolute value as the height error of each stitch.

[0031] A third aspect of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the multi-pin error measurement method of the male D-SUB connector according to any embodiment of the first aspect of the present disclosure.

[0032] The present disclosure has the following beneficial effects:

[0033] The present disclosure proposes a method, device and storage medium for measuring the error of multiple pins of a male D-SUB connector based on point cloud processing technology. By deeply analyzing and calculating the point cloud data of the D-type end face and pins of the connector, the deflection and height difference of each pin can be accurately obtained. The present disclosure not only improves the accuracy of measurement, but also greatly improves the efficiency of measurement. By accurately measuring and adjusting the deflection and height of the pins, the stability and performance of the connector can be ensured, thereby improving the overall user experience and the life of the device. Specifically:

[0034] First, accuracy is the core advantage of the present invention. Through automated point cloud data analysis, the errors caused by human operation in traditional methods are eliminated, ensuring the objectivity and consistency of the measurement results. This means that no matter which operator uses this method, they can get the same and accurate measurement results.

[0035] Secondly, the present invention is far more efficient than other methods. It can quickly measure all pins of the entire male D-SUB connector at one time, rather than measuring them one by one, which greatly shortens the measurement time and improves production efficiency.

[0036] Furthermore, non-contact measurement is another advantage of the present disclosure, which not only ensures that the connector and the pins will not be damaged during the measurement process, but also avoids measurement errors caused by physical contact, further improving the accuracy of the measurement.

[0037] Finally, the flexibility and adaptability of the present invention is also one of the significant differences between it and the prior art. It can adapt to various types and specifications of male D-SUB connectors and provide accurate measurement results regardless of the number and layout of pins.

[0038] Taking all factors into consideration, the present disclosure not only improves the measurement accuracy and efficiency of multi-pin errors of male D-SUB connectors, but also ensures the safety and integrity of the connectors, providing an efficient, accurate and reliable measurement solution for modern manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0040] Figure 1 An overall flow chart of a method for measuring multi-pin errors of a male D-SUB connector provided in an embodiment of the first aspect of the present disclosure.

[0041] Figure 2 An example of a D-SUB silhouette involved in the measurement method provided in the embodiment of the first aspect of the present disclosure.

[0042] Figure 3 This is a flowchart of step S13 in the measurement method provided in the embodiment of the first aspect of the present disclosure.

[0043] Figure 4 This is a flowchart of step S22 in the measurement method provided in the embodiment of the first aspect of the present disclosure.

[0044] Figure 5 A schematic structural diagram of a multi-pin error measurement device for a male D-SUB connector provided in an embodiment of the second aspect of the present disclosure.

[0045] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the third aspect of the present disclosure. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] On the contrary, the present application covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present application as defined by the claims. Further, in order to make the public have a better understanding of the present application, some specific details are described in detail in the detailed description of the present application below. Those skilled in the art can fully understand the present application without the description of these details.

[0048] See also Figure 1 The method for measuring multi-pin errors of a male D-SUB connector provided by the first aspect of the present disclosure includes:

[0049] S1. Obtain a point cloud containing background and target male D-SUB connectors as an initial point cloud; establish a D-type feature library for identifying the shape of the target male D-SUB connector; cluster the initial point cloud to obtain a number of impure D-SUB point cloud clusters; use image feature invariance methods (including but not limited to Hu invariant moment method, SIFT method, HOG method) to calculate the shape features of each impure D-SUB point cloud cluster under a two-dimensional silhouette in turn, compare it with the established D-type feature library, and take the impure D-SUB point cloud cluster whose difference is less than a first set threshold as the pure D-SUB point cloud cluster closest to the target;

[0050] S2. Perform plane fitting on the D-type end face and the top of the multi-pin in the pure D-SUB point cloud cluster closest to the target respectively; for each point in the obtained D-type end face fitting plane, use a spatial proximity search method (including but not limited to kd tree, quadtree, octree and R tree, etc.) to extract the edge points belonging to the D-type end face or the edge points of the circular hole, and then filter out the edge points belonging to the D-type end face to obtain the edge points of the circular hole; cluster the edge points of the circular hole to segment the circular hole point cloud corresponding to each stitch; perform 3D space circle fitting on the circular hole point cloud corresponding to each stitch to calculate the center of the circular hole; cluster each point in the obtained multi-pin top fitting plane to segment the stitch point cloud corresponding to the circular hole; calculate the spatial offset between the center of the circular hole and the center of mass of the corresponding stitch point cloud, which is the stitch skew error.

[0051] In some embodiments, step S1 specifically includes the following steps:

[0052] S11, data acquisition and preprocessing: obtain the point cloud containing the background and target male D-SUB connector, whose data format includes but is not limited to .txt, .pcd, .ply, convert the obtained point cloud format to pcd point cloud format, and center the point cloud coordinates to obtain the initial point cloud, and at the same time obtain the camera's internal parameters for subsequent calculation of the shape features of each impure D-SUB point cloud cluster under the two-dimensional silhouette. It can be understood that centering the point cloud coordinates in this step will not affect the final error measurement results, and secondly, it is also beneficial to keep the point cloud in the center of the field of view at all times, avoiding the target shape exceeding the two-dimensional boundary when projected to two dimensions, resulting in the failure of subsequent method measurement, that is, eliminating silhouette misalignment.

[0053] S12. Establish a D-type feature library for identifying the shape of the target male D-SUB connector. Its geometric representation is shown in Figure 2 , the D-type feature library established in this embodiment is a Hu invariant moment dictionary library, and the specific establishment process is: through the steps of visualization and manual recognition, select the point cloud clusters that meet the D-type feature, calculate their Hu invariant moments respectively and add them to the Hu invariant moment dictionary library; by analogy, calculate the Hu invariant moments of the D-type features of any type of D-SUB connector and add them to the Hu invariant moment dictionary library. Combined with the Hu invariant moment dictionary library and using density clustering algorithms (such as DBSCAN, OPTICS, HDBSCAN algorithms, etc.), the initial point cloud (the initial point cloud contains both a messy background and a point cloud of the target male D-SUB connector) is density clustered, and noise clusters with less than a certain number of noise points are filtered out, that is, the point cloud clusters that obviously do not belong to the target male D-SUB connector are filtered out from the initial point cloud. Since the point cloud obtained after filtering still contains parts that do not belong to the target male D-SUB connector, the point cloud clusters obtained are impure D-SUB point cloud clusters.

[0054] S13, for all the impure D-SUB point cloud clusters obtained in step S12, the following steps are sequentially used to automatically obtain the pure D-SUB point cloud cluster closest to the target:

[0055] See also Figure 3First, the impure D-SUB point cloud cluster is centered to eliminate the silhouette misalignment, and then the distance between clusters is unified to eliminate the influence of near large and far small. Then, image visual processing is performed, including sequentially reprojecting the 3D point cloud into a 2D silhouette depth map plane, converting the depth map into a binary map and morphological filtering, etc. Finally, the Hu invariant moment of the point cloud cluster is calculated and compared with the standard Hu invariant moment dictionary library established in step S12, and the bi-norm of the two is calculated (in some other embodiments of the present disclosure, the bi-norm can also be replaced by a mono-norm, a weighted mono-norm or other variants), and the bi-norm is compared with the set threshold α (the threshold is set according to the difference between the Hu distance values ​​of the D-SUB end face shapes of all models, and α is set to -10 in this embodiment). 50 ) to find the closest target cluster.

[0056] It should be noted that if there are multiple closest target clusters, the measurement of step S13 will be performed on each of the multiple closest target clusters, which means that the acquired point cloud data must contain at least two male D-SUB connectors.

[0057] In some embodiments, step S2 specifically includes the following steps:

[0058] S21, filtering out boundary noise points from the pure D-SUB point cloud cluster closest to the target obtained in step S13, and then performing plane fitting on the D-type end face and the multi-pin top in the cluster respectively to obtain the D-type end face fitting plane and the multi-pin top fitting plane.

[0059] S22. Obtain the point cloud of the circular hole edge points corresponding to each pin from the D-shaped end surface fitting plane according to the following steps, and calculate the circular hole center of the circular hole point cloud corresponding to each pin:

[0060] See also Figure 4First, traverse each point in the D-type end face fitting plane and establish a kd tree, find k nearest neighbors for each point, then calculate the normal n, the vector v obtained by the cross product of the normal and the z-axis (assuming that the z-axis represents the depth direction, representing the distance from the camera along its line of sight), and the vector u obtained by the cross product of the normal n and the vector v for each point, and finally calculate the angle between the current point and each k nearest neighbor point, and compare it with the set angle threshold θ (the angle threshold θ can be set according to the desired density of the boundary points. The larger the angle threshold, the sparser the boundary points; the smaller the angle threshold, the denser the boundary points. For the commonly used D-SUB model point cloud, the angle threshold θ set in this embodiment can be in the range of [1.0,3.0]), and the points greater than the threshold are judged as D-type end face edge points or circular hole edge points. Then, a statistical outlier filter is constructed to filter out the edge points of the D-type end face. The filter uses the average distance of k nearest neighbors (the value of k is set according to the desired density of the boundary points. The larger the k, the sparser the boundary points, but the amount of calculation increases greatly and the calculation speed slows down; the smaller the k, the denser the boundary points, but the amount of calculation decreases greatly and the calculation speed increases. The recommended setting range is [20,40]) to determine whether a point is an outlier. Among them, any point whose distance from its k nearest neighbors is greater than m times the standard deviation of the distance (the smaller the value of m, the looser the judgment of outliers, and it is not easy to remove boundary points. The range set in this embodiment is (0,1)) will be regarded as an outlier. Filter out all outliers in the edge points of the D-type end face or the edge points of the circular hole to obtain the circular hole edge points corresponding to all pins. The circular hole edge points corresponding to all pins are clustered using the regional growing method to obtain the point cloud of the circular hole edge points corresponding to each pin. The point cloud of the circular hole edge points corresponding to each stitch is cycled in sequence, and a 3D space circle is fitted for each circular hole edge point using the least squares method to calculate the center of the circle;

[0061] S23, clustering each point in the obtained multi-pin top fitting plane using the region growing method to segment the pin point cloud corresponding to each circular hole;

[0062] S24, calculating the spatial offset between the center of the circular hole obtained in step S22 and the center of mass of the corresponding stitch point cloud obtained in step S23, which is the stitch deflection error.

[0063] In some other embodiments of the present disclosure, the process of segmenting the point cloud of the circular hole edge points corresponding to all the stitches to obtain the point cloud of the circular hole edge points corresponding to each stitch and calculating the center of the circle in S22 can be replaced by:

[0064] The 3D space circle fitting algorithm is iteratively used for the circular hole edge points corresponding to all the stitches, including but not limited to RANSAC, least squares method, genetic algorithm, etc., and the point cloud of the circular hole edge point corresponding to a stitch is segmented in each iteration, and the center of the circle obtained in the algorithm process is obtained. Until the end of the iteration, the point cloud and the center of the circular hole edge point corresponding to each stitch are obtained.

[0065] In some embodiments, the measuring method of the present disclosure further includes the following steps after step S21 to measure the multi-pin height error:

[0066] For the multi-pin top fitting plane obtained in step S21, directly perform step S23 to obtain each pin point cloud, and then obtain the point in each pin point cloud that is closest to the D-type end face fitting plane in the z-axis direction. The distance between the closest point and the D-type end face fitting plane is the height from the pin point cloud to the D-type end face fitting plane. Subtract the distance between the D-type end face fitting plane and the multi-pin top fitting plane from the height of each pin point cloud, and take the absolute value to obtain the height error of each pin.

[0067] See also Figure 5 The second aspect of the present disclosure provides a male D-SUB connector multi-pin error measuring device 10, comprising:

[0068] The pure D-SUB point cloud cluster extraction module 1 is used to obtain a point cloud containing a background and a target male D-SUB connector as an initial point cloud; establish a D-type feature library for identifying the shape of the target male D-SUB connector; cluster the initial point cloud to obtain a number of impure D-SUB point cloud clusters; use the image feature invariance method to calculate the shape features of each impure D-SUB point cloud cluster under a two-dimensional silhouette, compare it with the D-type feature library, and use the impure D-SUB point cloud cluster with a difference less than a set threshold as the pure D-SUB point cloud cluster closest to the target;

[0069] The multi-pin error measurement module 2 is used to perform plane fitting on the D-type end face and the multi-pin top in the pure D-SUB point cloud cluster closest to the target; for each point in the obtained D-type end face fitting plane, the edge points belonging to the D-type end face or the circular hole edge points are extracted by using the spatial proximity search method, and then the edge points belonging to the D-type end face are filtered out to obtain the circular hole edge points, the circular hole edge points are clustered, and the circular hole point clouds corresponding to each pin are segmented; for the circular hole point cloud corresponding to each pin, 3D space circle fitting is performed on it to calculate the center of the circular hole; each point in the obtained multi-pin top fitting plane is clustered, and the stitch point cloud corresponding to the circular hole is segmented; the spatial offset between the center of the circular hole and the center of mass of the corresponding stitch point cloud is calculated, which is the stitch deflection error.

[0070] In some embodiments, the multi-stitch error measurement module 2 is also used to obtain the point in the z-axis direction in each stitch point cloud that is closest to the D-shaped end face fitting plane for the stitch point cloud corresponding to the segmented circular hole, so as to obtain the height of each stitch point cloud to the D-shaped end face fitting plane, and subtract the distance between the D-shaped end face fitting plane and the multi-stitch top fitting plane from the height of each stitch point cloud, and take the absolute value as the height error of each stitch.

[0071] It should be noted that the aforementioned explanation of the embodiment of the method for measuring multi-pin errors of a male D-SUB connector is also applicable to the multi-pin error measuring device for a male D-SUB connector of this embodiment, and will not be repeated here.

[0072] In order to implement the above embodiment, the embodiment of the present disclosure further proposes a computer-readable storage medium, on which a computer program is stored. The program is executed by a processor to execute the multi-pin error measurement method of the male D-SUB connector of the above embodiment.

[0073] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. It should be noted that the electronic device in the embodiments of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, servers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0074] like Figure 6 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 to a random access memory (RAM) 103. In the RAM 103, various programs and data required for the operation of the electronic device are also stored. The processing device 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.

[0075] Typically, the following devices may be connected to the I / O interface 105: an input device 106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, etc.; an output device 107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 109. The communication device 109 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0076] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present embodiment includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 109, or installed from the storage device 108, or installed from the ROM 102. When the computer program is executed by the processing device 101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0077] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0078] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0079] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the multi-pin error measurement method of the male D-SUB connector.

[0080] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, python, and conventional procedural programming languages, such as "C-" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0081] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0082] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0083] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0084] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

[0085] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0086] A person of ordinary skill in the art may understand that all or part of the steps carried out in the above-mentioned embodiment method may be completed by instructing the relevant hardware through a program, and the developed program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.

[0087] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0088] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for measuring multi-pin errors of a male D-SUB connector, characterized in that: The following steps are involved: A point cloud containing background and target male D-SUB connectors is obtained as an initial point cloud; a D-type feature library for identifying the shape of the target male D-SUB connector is established; the initial point cloud is clustered to obtain a number of impure D-SUB point cloud clusters; the shape features of each impure D-SUB point cloud cluster under a two-dimensional silhouette are calculated in turn using an image feature invariance method, and the shape features are compared with the D-type feature library, and the impure D-SUB point cloud cluster with a difference less than a set threshold is taken as the pure D-SUB point cloud cluster closest to the target; Plane fitting is performed on the D-type end face and the multi-pin top in the pure D-SUB point cloud cluster closest to the target respectively; for each point in the obtained D-type end face fitting plane, the edge points belonging to the D-type end face or the circular hole edge points are extracted by using the spatial proximity search method, and then the edge points belonging to the D-type end face are filtered out to obtain the circular hole edge points, the circular hole edge points are clustered, and the circular hole point clouds corresponding to each stitch are segmented; for the circular hole point cloud corresponding to each stitch, 3D space circle fitting is performed on it, and the center of the circular hole is calculated; each point in the obtained multi-pin top fitting plane is clustered, and the stitch point cloud corresponding to the circular hole is segmented; the spatial offset between the center of the circular hole and the center of mass of the corresponding stitch point cloud is calculated, which is the stitch deflection error.

2. The method for measuring multi-pin errors of a male D-SUB connector according to claim 1, characterized in that: The image feature invariance method adopts Hu invariant moment method, SIFT method or HOG method; The method used for clustering the initial point cloud is the DBSCAN method, the OPTICS method or the HDBSCAN method.

3. The method for measuring multi-pin errors of a male D-SUB connector according to claim 1, characterized in that: The difference used when comparing the shape features of each impure D-SUB point cloud cluster under the two-dimensional silhouette with the D-type feature library is characterized by the binary norm, one-norm or weighted one-norm of the shape features of the impure D-SUB point cloud cluster under the two-dimensional silhouette and the D-type feature library.

4. The method for measuring multi-pin errors of a male D-SUB connector according to claim 1, characterized in that: The spatial proximity search method adopts a kd tree, a quadtree, an octree or an R tree.

5. The method for measuring multi-pin errors of a male D-SUB connector according to claim 1, characterized in that: The method of extracting edge points belonging to the D-shaped end face or circular hole edge points from each point in the obtained D-shaped end face fitting plane by using a spatial proximity search method, and then filtering out the edge points belonging to the D-shaped end face to obtain circular hole edge points specifically includes: Traverse each point in the D-shaped end face fitting plane and establish a kd tree, find k nearest neighbors for each point, then calculate the normal n, the vector v obtained by the cross product of the normal and the z-axis, and the vector u obtained by the cross product of the normal n and the vector v for each point, wherein the z-axis represents the depth direction and represents the distance from the camera along its line of sight, and finally calculate the angle between the current point and each k nearest neighbor point, and compare with the set angle threshold θ, and determine the point greater than the angle threshold θ as the edge point of the D-shaped end face or the edge point of the circular hole; A statistical outlier filter is constructed to filter out the edge points of the D-shaped end surface, and obtain the circular hole edge points corresponding to all pins.

6. The method for measuring multi-pin errors of a male D-SUB connector according to claim 1, characterized in that: The circular hole edge points are clustered to segment the circular hole point clouds corresponding to each stitch, and a 3D space circle fitting is performed on the circular hole point cloud corresponding to each stitch to calculate the center of the circular hole, using any of the following two methods: Method 1: Cluster the circular hole edge points corresponding to all stitches to obtain the point cloud of the circular hole edge points corresponding to each stitch; loop through the point cloud of the circular hole edge points corresponding to each stitch in turn, perform 3D space circle fitting on each circular hole edge point, and calculate the center of the circular hole; Method 2: The 3D space circle fitting method is iteratively used for the circular hole edge points corresponding to all stitches. Each iteration segments a point cloud of the circular hole edge point corresponding to a stitch, and obtains the center of the circle obtained by the 3D space circle fitting method. The point cloud and the center of the circular hole edge point corresponding to each stitch are obtained until the iteration is completed.

7. A method for measuring multi-pin errors of a male D-SUB connector according to any one of claims 1 to 6, characterized in that: It also includes measuring the height error of multiple pins of a male D-SUB connector by following these steps: For the stitch point cloud corresponding to the segmented circular hole, obtain the point in each stitch point cloud that is closest to the D-shaped end face fitting plane in the z-axis direction, so as to obtain the height of each stitch point cloud to the D-shaped end face fitting plane, and subtract the distance between the D-shaped end face fitting plane and the multi-stitch top fitting plane from the height of each stitch point cloud, and take the absolute value to obtain the height error of each stitch.

8. An error measurement device according to the error measurement method according to any one of claims 1 to 6, characterized in that: include: The pure D-SUB point cloud cluster extraction module is used to obtain the point cloud containing the background and target male D-SUB connectors as the initial point cloud; Establish a D-type feature library for identifying the shape of a target male D-SUB connector; cluster the initial point cloud to obtain a number of impure D-SUB point cloud clusters; use the image feature invariance method to calculate the shape features of each impure D-SUB point cloud cluster under a two-dimensional silhouette, compare it with the D-type feature library, and take the impure D-SUB point cloud cluster whose difference is less than a set threshold as the pure D-SUB point cloud cluster closest to the target; The multi-pin error measurement module is used to perform plane fitting on the D-type end face and the multi-pin top in the pure D-SUB point cloud cluster closest to the target respectively; for each point in the obtained D-type end face fitting plane, the edge points belonging to the D-type end face or the circular hole edge points are extracted by using a spatial proximity search method, and then the edge points belonging to the D-type end face are filtered out to obtain the circular hole edge points, the circular hole edge points are clustered, and the circular hole point clouds corresponding to each pin are segmented; for the circular hole point cloud corresponding to each pin, 3D space circle fitting is performed on it to calculate the center of the circular hole; each point in the obtained multi-pin top fitting plane is clustered, and the stitch point cloud corresponding to the circular hole is segmented; the spatial offset between the center of the circular hole and the center of mass of the corresponding stitch point cloud is calculated, which is the stitch deflection error.

9. An error measuring device according to claim 8, characterized in that: The multi-pin error measurement module is also used to obtain the point in the z-axis direction closest to the D-shaped end face fitting plane in each pin point cloud corresponding to the segmented circular hole, so as to obtain the height of each pin point cloud to the D-shaped end face fitting plane, and subtract the distance between the D-shaped end face fitting plane and the multi-pin top fitting plane from the height of each pin point cloud, and take the absolute value as the height error of each pin.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the multi-pin error measurement method of a male D-SUB connector according to any one of claims 1 to 7.

Citation Information

Cited By

  • Visual inspection method and device of connector and testing all-in-one machine

    CN120084217A