Electric connector plug pin shrinkage detection method based on three-dimensional vision

By using binocular 3D vision technology, the pin retraction of electrical connector plugs can be automatically and quantitatively inspected, solving the problem that manual visual inspection cannot quantify, and improving the accuracy and consistency of inspection.

CN120807458APending Publication Date: 2025-10-17CHINESE PEOPLES LIBERATION ARMY UNIT 63601
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510949916.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Current methods for detecting pin retraction in electrical connector plugs still rely on manual visual inspection, which cannot quantify the degree of pin retraction. This results in test results being affected by the experience and mental state of the personnel, making it easy to make false or missed detections.

Method used

A detection method based on binocular 3D vision is adopted. Two images of the electrical connector plug are acquired by a binocular camera, pin feature points are extracted, feature pixel matching is performed using random sampling consistency algorithm and global perspective transformation, the 3D coordinates of feature points are calculated, and pin shrinkage detection is performed by setting a threshold.

Benefits of technology

It enables automated and quantitative inspection of the pin retraction of electrical connector plugs, improving the accuracy and consistency of inspection and reducing the possibility of false detection and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807458A_ABST
    Figure CN120807458A_ABST
Patent Text Reader

Abstract

The invention provides an electric connector plug pin shrinkage detection method based on three-dimensional vision, and relates to the technical field of image processing. Firstly, a binocular vision technology is selected to carry out three-dimensional reconstruction on a feature point representing the extension length of a stitch, and for a key stereo matching link in binocular vision, the stereo matching is divided into two steps of feature pixel extraction and feature pixel matching; a feature pixel extraction method based on a burning algorithm and a feature pixel matching method using global perspective transformation are provided; and finally, after the three-dimensional coordinates of the feature points are obtained, needle shrinkage detection is carried out by adopting a random sampling consistency algorithm. The device is suitable for a quality inspection link for pin shrinkage detection in industrial production of the electric connector plug, and solves the problems that the existing pin shrinkage detection of the electric connector plug is still based on manual visual inspection and the pin shrinkage degree cannot be quantified.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a method for detecting needle shrinkage of an electrical connector plug based on three-dimensional vision. BACKGROUND

[0002] As an important supporting component of aerospace products, electrical connectors provide signal interfaces for various single machines on the rocket and various cabinets of ground launch control systems. In the process of plugging, if needle bending or needle shrinkage occurs, it is easy to cause open circuit and failure, and even lead to tragic consequences. Therefore, in the production process of electrical connectors and the on-site assembly process at the launch site, detecting needle bending and needle shrinkage of the pins is an important part of quality inspection. Generally speaking, the position deviation of the pin top should be within 0.8mm, and the height deviation should be within 0.6mm.

[0003] Currently, in the on-site assembly process at the launch site, the needle shrinkage is still detected by manual visual inspection and image retention. The detection results are affected by personnel experience, mental state, etc., and false positives and false negatives are likely to occur. At the same time, manual visual inspection cannot quantify defects, which is not conducive to subsequent analysis and disposal. SUMMARY

[0004] The technical problem solved by the present application is to solve the problem that the existing detection of electrical connector plug needle shrinkage is still based on manual visual inspection and cannot quantify the degree of needle shrinkage.

[0005] The technical solution adopted by the present application to solve the above technical problem is a detection method based on binocular three-dimensional vision, comprising the following steps: S1, obtaining two images of the electrical connector plug by a binocular camera, each image containing all the pins of the electrical connector plug; S2, selecting a feature point representing the length of the pin in the real space in each pin, extracting the pixel point corresponding to each feature point as a feature pixel point from the left and right two images, and the number of pins and feature pixel points on each image is equal; S3, performing global matching by solving the four-point perspective relationship, so as to one-to-one match all the feature pixel points extracted from the left and right two images, and obtain the corresponding relationship of the feature pixel points in the left and right two images; S4, calculating the three-dimensional coordinates of each feature point by using the coordinates of each pair of corresponding feature pixel points and the projection matrix of the binocular camera, and all the feature points form a feature point set; S5, performing plane fitting on the feature point set based on the random sample consensus algorithm, and performing needle shrinkage detection by setting a threshold for the distance of the feature points to the plane.

[0006] Further, in S2, the following steps are included: S21, the stitch is spliced by a hemisphere and a cylinder, and in the image, it is a semicircle and a rectangle. The ball center of the hemispherical part of the stitch is taken as a feature point, and the corresponding feature pixel point in the image is the center of the semicircle; S22, each captured image is cropped to crop the images corresponding to all the stitches, and the feature pixel point corresponding to each stitch, i.e. the center of the semicircle, is extracted, including S221 to S223; S221, in order to exclude the influence of the background environment and the frame, the high-reflectivity characteristic of the top of the stitch is used, and the image is preliminarily cropped according to the position of the stitch; S222, in the cropped image, the stitch and the remaining background are obviously two colors, in order to remove the remaining background image, the cropped RGB image is converted to the Hue color space, and the remaining background image is removed by using the majority law binaryzation, and the image corresponding to each stitch is accurately cropped; S223, based on the burning grass algorithm, the center coordinates of the semicircle at the top of the stitch are located from the image corresponding to each stitch, and the center is taken as a feature pixel point.

[0007] Further, in S3, the following steps are included: S31, the left and right images are rectified to make the imaging origin coordinates of the two images consistent, the optical axes of the binocular camera parallel, the imaging planes coplanar, and the epipolar lines aligned; S32, in the three-dimensional space, all the feature points are approximately on a spatial plane, based on the stereoscopic correction result, the perspective relationship of the left image to the right image corresponding to the spatial plane where the feature points are located is calculated, and the perspective relationship is used to match the centers in the left and right images.

[0008] Further, in S4, the three-dimensional coordinates of each feature point are calculated by using the coordinates of each pair of corresponding feature pixel points and the projection matrix of the binocular camera, and the formula used is: and wherein, , are the projection matrices of the left and right cameras respectively, represents the coordinates of the feature pixel point in the left image, represents the coordinates of the feature pixel point in the right image, represents the three-dimensional coordinates of the feature point, represents the projection scale factor of the left image, represents the projection scale factor of the right image, and the three-dimensional coordinates are obtained by using the least square method.

[0009] Further, in S5, the following steps are included: S51, the three-dimensional coordinates of three feature points not in a line are randomly selected for plane fitting to obtain a fitting plane, and the fitting plane is: wherein, 、 、 and fitting plane parameters; S52, verifying the fitting plane with the three-dimensional coordinates of the remaining feature points, calculating the error, and the error calculation formula is: wherein, represents the error corresponding to the first remaining feature point, represents the three-dimensional coordinates of the first remaining feature point; S53, setting a threshold, dividing the feature points with an error less than the threshold into inliers, and dividing the feature points with an error greater than the threshold into outliers; S54, randomly selecting three feature points that are not collinear from the inliers, performing plane fitting again, updating the fitting plane parameters, and thereby updating the inliers and the outliers; S55, setting the number of iterations, repeating S54, comparing the number of inliers in each iteration, and when the number of inliers is the largest, the corresponding outliers are the pin shrinking feature points.

[0010] The beneficial effects of the present application: the present application provides a kind of based on binocular three-dimensional vision's electric connector plug pin shrinking detection method.First, the stereo matching link of binocular vision is researched, and the feature pixel extraction method based on burning algorithm and the feature pixel matching method using global perspective transformation are proposed;Finally, after obtaining the three-dimensional coordinates of feature points, random sampling consistency algorithm is used to carry out pin shrinking detection.The existing electric connector plug pin shrinking detection is still based on artificial visual inspection, and the problem that the pin shrinking degree cannot be quantified is solved. BRIEF DESCRIPTION OF DRAWINGS

[0011] Figure 1 is a flowchart of the electric connector plug pin shrinking detection method based on three-dimensional vision provided by the present application; Figure 2 is a basic model diagram photographed by binocular camera in the electric connector plug pin shrinking detection method based on three-dimensional vision provided by the present application; Figure 3 is a schematic diagram corresponding to the left and right two image pairs of the electric connector obtained in the electric connector plug pin shrinking detection method based on three-dimensional vision provided by the present application; Figure 4 is a principle schematic diagram of the binocular camera capturing the electric connector pin image in the electric connector plug pin shrinking detection method based on three-dimensional vision provided by the present application; Figure 5 is a schematic diagram of high-light discrete pixel points extracted from the left image in the electric connector plug pin shrinking detection method based on three-dimensional vision provided by the present application; Figure 6It is the highlight discrete pixel point extracted from the left image in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application, and the image schematic diagram after morphological inflation aggregation is shown in the figure; Figure 7 It is the schematic diagram of the left image after removing part of the background in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 8 It is the schematic diagram of the left image after removing part of the background and converting to Hue color space in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 9 It is the schematic diagram of the Hue color space in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 2 Figure 10 It is the schematic diagram of the circle center solved by the fire burning algorithm in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 11 It is the schematic diagram of the left and right images after stereo correction in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 12 It is the schematic diagram of the perspective relationship in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 13 It is the schematic diagram of the detection result in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application; Figure 14 It is the schematic diagram of the single instance repeatability experiment process in the three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application. DETAILED DESCRIPTION

[0012] Firstly, the binocular vision technology is selected to perform three-dimensional reconstruction on the feature points representing the pin foot extension length, the stereo matching is divided into feature pixel extraction and feature pixel matching two steps for the key stereo matching link in the binocular vision, and the feature pixel extraction method based on the fire burning algorithm and the feature pixel matching method using global perspective transformation are proposed; finally, the random sample consensus algorithm is used for needle shrinkage detection after obtaining the three-dimensional coordinates of the feature points.

[0013] As shown in Figure 1 The three-dimensional vision-based electric connector plug needle shrinkage detection method provided by the application includes the following steps: S1, two images of the electric connector plug are obtained by a binocular camera, and each image contains all the pin feet of the electric connector plug.

[0014] ​Specifically, the binocular camera has completed calibration, and the focal length, actual width of a single pixel of a photosensitive element, projection matrix, and projection scale factor of each camera of the binocular camera are known, and the calibration method can adopt Zhang Zhengyou calibration method. A basic model of the binocular camera is shown in Figure 2 . For any point on the electrical connector, if observed by the camera, it is seen at the image point of the camera is located at , and for the camera, the image point is located at . Since the space point is located at the intersection of the two straight lines and , its three-dimensional position is uniquely determined. The left and right two images of the electrical connector plug obtained by the binocular camera are shown in Figure 3 .

[0015] S2, selecting a feature point representing the pin extension length on the pin in the real space, and extracting a pixel point corresponding to each feature point as a feature pixel point from the left and right two images, respectively, and the number of pins and the number of feature pixel points on each image are equal.

[0016] Specifically, the following steps are included: S21, from Figure 4 , the pin is composed of a hemisphere and a cylinder, which is represented as a semicircle and a rectangle in the image, and the center of the hemisphere corresponds to the center of the semicircle (perspective distortion is ignored because the shooting distance is much larger than the pin size). Accordingly, the center of the hemisphere of the pin is taken as the feature point, and the corresponding feature pixel point in the image is the center of the semicircle.

[0017] S22, cropping each captured image to crop the images corresponding to all pins, and then extracting the feature pixel point corresponding to each pin, i.e., the center of the semicircle, including S221 to S223.

[0018] S221, in order to exclude the influence of the background environment and the frame, the high-reflectivity feature of the top of the pin is used to preliminarily crop the image according to the position of the pin.

[0019] Specifically, in order to exclude the influence of the background environment and the frame, the image is preliminarily cropped according to the position of the pin. As shown in Figure 3 , the pin at the top is represented as a high-brightness golden yellow, i.e., the values , in the red and green color channels are close to 255, and the value in the blue channel is small, and accordingly, a threshold value 、 , let 、 、 If the above conditions are met, the highlight pixel points at the top of the needle can be screened out. The threshold 、 is related to the detection of environmental light, camera exposure, shooting distance, etc. and needs to be selected by experiment. For Figure 3 , , take 245, take 175. Take the left image as an example, the discrete pixel points with high brightness in the image are screened out, as shown in Figure 5 . After aggregation of the discrete pixel points by morphological dilation, a plurality of closed regions are obtained, and each closed region corresponds to a high-reflective top of a needle. Take the left image as an example, after aggregation of the discrete pixel points by morphological dilation, it is shown in Figure 6 . The pixel barycentric coordinates of each closed region are calculated, and the image is circularly cropped with all barycenters as centers and a preset value as a radius, that is: , wherein is the coordinate of the reserved pixel, represents a preset radius. The image containing the needle in the circle is reserved, thereby eliminating part of the background image, and the calculation formula of the preset radius is: , wherein represents a proportionality coefficient, represents the focal length of the camera, represents the shooting distance, represents the diameter of the needle cylinder, represents the actual width of a single pixel of the photosensitive element of the binocular camera, The value of should meet the condition that each circle only acts on one needle and can cover the top pixel of the needle angle. Take the left image as an example, after eliminating part of the background, it is shown in Figure 7 , and the corresponding is 1.8.

[0020] S222, in the cropped image, the needle and the remaining background are obviously two colors, in order to eliminate the remaining background image, the cropped RGB image is converted to the Hue color space, and the remaining background image is eliminated by using the majority law binaryzation, and the image corresponding to each needle is accurately cropped. Take the left image as an example, convert to the Hue color space as shown in Figure 8 , and after eliminating the remaining background image by using the majority law binaryzation, it is shown in Figure 9 .

[0021] S223, based on the burning grass algorithm, the center coordinates of the semicircle at the top of the needle are located from the image corresponding to each needle, and the center is taken as a feature pixel point.

[0022] Specifically, the hemispheres at the top of the pin head appear as incomplete regular semicircles in the image, and the error in locating the center of the circle is large by using the Hough transform, the random sample consensus algorithm, the Fourier descriptor and other methods due to insufficient constraints. Therefore, the burning grass algorithm is used to locate the center of the circle. The burning grass algorithm is a skeleton processing of the image. It can be imagined that a piece of grass with the same shape as the object is ignited at the same time along the outer points of the grass. When the fire spreads inward, the locus of the points where the advancing fire lines meet is the skeleton of the image. Obviously, at the top of the pin, the fire lines will converge at the center of the circle and be located at the top point of the skeleton. Therefore, the left top point or the right top point of the skeleton can be selected as the center of the circle according to the angle deviation of the left and right cameras, as shown in Figure 10 .

[0023] S3, global matching is performed by solving the four-point perspective relationship, so as to one-to-one match all the feature pixel points extracted from the left and right images, and obtain the corresponding relationship of the feature pixel points in the left and right images.

[0024] Specifically, the following steps are included: S31, in order to reduce the matching difficulty, first, stereo rectification is performed, so that the imaging origin coordinates of the left and right views are consistent, the optical axes of the left and right cameras are parallel, the left and right imaging planes are coplanar, and the epipolar lines are aligned. In this way, any point on the electrical connector is located in the same row in the two images, as shown in Figure 11 .

[0025] S32, in the three-dimensional space, all the feature points are approximately on a spatial plane, on the basis of the stereo rectification result, the perspective relationship of the left image to the right image corresponding to the spatial plane on which the feature points are located is calculated, and the perspective relationship is used to match the centers of the circles in the left and right images.

[0026] Specifically, in the three-dimensional space, all the feature points are approximately on a spatial plane, the pixel in the left image and the pixel in the right image correspond to any point on the spatial plane, according to the spatial conversion principle, the perspective relationship equation set can be obtained: , wherein, is a set of perspective transformation parameters to be solved, represented by , after the coordinates of four pairs of pixel points are determined, the set of perspective transformation parameters is solved by substituting the perspective relationship equation set, and then the perspective relationship of the left image to the right image corresponding to the spatial plane is established. As shown in Figure 12 , the determination of the coordinates of the four pairs of pixel points includes: in the left image, drawing a circle center point set circumscribed rectangle parallel to the epipolar line, taking the four vertices of the rectangle, and marking the coordinates as , , and , assuming that the coordinates of the corresponding points of the four vertices in the right image are , , and . Thanks to the stereoscopic rectification, the row coordinates of the pixel pairs are equal, i.e. , , the values of , , and determine the coordinates of the four pixel pairs, and the perspective transformation parameter set can be obtained by substituting the perspective relationship equations. , , and . The selection criteria of is that the perspective relationship corresponding to the perspective transformation parameter set approximates the real perspective relationship of the left and right circle centers, i.e., the perspective relationship corresponding to the perspective transformation parameter set transforms the left image circle center point set as much as possible to coincide with the right image circle center point set. In order to measure the degree of coincidence, the total deviation is defined, where denotes the total deviation, denotes the total number of feature points, is the th circle center coordinate in the left image, and is the circle center coordinate closest to in the right image, and is the minimum value of , , and . In order to reduce the amount of calculation, the values of , , and are constrained, and the constraint formula is: , where denotes the minimum value of the column coordinates of the four vertices of the circumscribed rectangle of the circle center point set parallel to the epipolar line in the right image, denotes the maximum value of the column coordinates of the four vertices, denotes the constraint parameter, is determined by factors such as image resolution and perspective degree, and Figure 12 , take 100. Solving the perspective relationship corresponding to the spatial plane on which the feature points are located is converted into finding the optimal , , and , so that the total deviation: is minimized, i.e., the multi-variable nonlinear programming is solved by using the traversal method: .

[0027] S33. Perform perspective transformation on the coordinates of the center of the circle in the left image through the perspective relationship equation group to obtain corresponding perspective coordinates, and match the perspective coordinates with the coordinates of the center of the circle in the right image based on the minimum Euclidean distance between the perspective coordinates and the coordinates of the center of the circle in the right image to obtain a matching relationship between the center of the circle in the two images.

[0028] S4. Using the coordinates of each pair of corresponding feature pixel points and the projection matrix of the binocular camera, the three-dimensional coordinates of each feature point are calculated, and all feature points constitute a feature point set.

[0029] Specifically, the three-dimensional coordinates of each feature point are calculated using the matched feature pixel coordinates and the binocular camera projection matrix. The formula used is: and ,in, 、 are the projection matrices of the left and right cameras respectively, Represents the coordinates of the feature pixel points in the left image, Represents the coordinates of the feature pixel points in the right image, Represents the three-dimensional coordinates of the feature points, represents the projection scale factor of the left image, It represents the projection scale coefficient of the right image, and the three-dimensional coordinates are obtained by the least squares method.

[0030] S5. Perform plane fitting on the feature point set based on a random sampling consistency algorithm, and perform needle shrinkage detection by setting a threshold on the distance from the feature point to the plane.

[0031] Specifically, the following steps are included: S51. Randomly select the three-dimensional coordinates of three non-collinear feature points and perform plane fitting to obtain a fitting plane. The fitting plane is: ,in, 、 、 and are the fitting plane parameters.

[0032] S52. Use the three-dimensional coordinates of the remaining feature points to verify the fitting plane and calculate the error. The error calculation formula is: ,in, Indicates the The error corresponding to the remaining feature points is Indicates the The three-dimensional coordinates of the remaining feature points.

[0033] S53. Setting threshold , the feature points with errors less than the threshold are classified as inliers, and the feature points with errors greater than the threshold are classified as outliers, that is: ,in represents the fitting plane.

[0034] S54, randomly select three feature points that are not collinear from the inliers, perform plane fitting again, update the fitting plane parameters, and thus update the inliers and the outliers.

[0035] S55, set the number of iterations, repeat S54, compare the number of inliers in each iteration, and the corresponding outliers are the pin shrinking feature points when the number of inliers is the most. Figure 13

[0036] Embodiment: Two RER-USB4K CAM01H-XCQ cameras were selected, and the monocular resolution was 8000x6000. Taking three models of electrical connectors, AY2-7ZJLM15001540, Y2-10ZJLM14031537, and Y2-24ZJLM15001353, as examples, 30 intact samples and 10 defective samples were taken for each model, totaling 90 intact samples and 30 defective samples.

[0037] First, a single-limb repeatability experiment was performed: We placed an AY2-7ZJLM15001540 electrical connector on the checkerboard calibration board. The electrical connector pin feature points and the checkerboard corner points were simultaneously three-dimensionally imaged. The camera and the calibration board were kept stationary, the electrical connector was rotated and three-dimensionally imaged, and the process was repeated 10 times, as shown in Figure 14 In the three-dimensional coordinate system, the checkerboard corner points were used to perform plane fitting to obtain a reference plane, and the relative height of the electrical connector pin feature points and the reference plane was calculated. The relative heights of the 7 pin feature points in 10 experiments were counted, and the standard deviation and the range were calculated, as shown in Table 1. It can be seen that the standard deviation is less than 0.04mm and the range is less than 0.11mm, which is an acceptable value relative to the maximum allowable height deviation of 0.6mm.

[0038] Table 1 Single-limb repeatability experiment results

[0039] Second, a multi-model detection experiment was performed: Different thresholds were set to detect whether the pins were shrunk or not for 120 electrical connector samples, and the detection accuracy and recall rate corresponding to different thresholds were counted, as shown in Table 2. It can be seen that as the threshold increases, the accuracy of the algorithm gradually increases, while the recall rate gradually decreases. According to Table 2, we recommend setting the threshold to 0.35, which can consider both, but in actual application, the threshold needs to be selected according to the detection platform parameters and specific detection needs.

[0040] Table 2 Correspondence between threshold and accuracy and recall rate ​

Claims

1. A method for detecting shrinkage of electrical connector plugs based on three-dimensional vision, characterized in that: The following steps are involved: S1. Obtain two images of the electrical connector plug using a binocular camera, each image containing all pins of the electrical connector plug; S2. Select feature points on the stitches that represent the extended length of the stitches in the physical space, and extract the pixels corresponding to each feature point from the left and right images as feature pixels. The number of stitches in each image is equal to the number of feature pixels. S3, performing global matching by solving the four-point perspective relationship, thereby matching all feature pixels extracted from the left and right images one by one to obtain the correspondence between the feature pixels in the left and right images; S4. Using the coordinates of each pair of corresponding feature pixels and the projection matrix of the binocular camera, the three-dimensional coordinates of each feature point are calculated, and all feature points constitute a feature point set; S5. Perform plane fitting on the feature point set based on a random sampling consistency algorithm, and perform needle shrinkage detection by setting a threshold on the distance from the feature point to the plane.

2. The electrical connector plug shrinkage detection method based on three-dimensional vision according to claim 1, characterized in that: S2 includes the following steps: S21. The stitch is composed of a hemisphere and a cylinder, which are correspondingly a semicircle and a rectangle in the image. The center of the hemisphere of the stitch is used as the feature point, and the corresponding feature pixel point in the corresponding image is the center of the semicircle. S22, cropping each captured image to obtain images corresponding to all stitches, and extracting the characteristic pixel point corresponding to each stitch, i.e., the center of the semicircle, including S221 to S223; S221. To eliminate the influence of the background environment and the outer frame, the image is initially cropped based on the position of the pins using the high reflective properties of the pin tops. S222. In the cropped image, the stitches and the remaining background are clearly two different colors. To remove the remaining background image, the cropped RGB image is converted to Hue hue space, and the remaining background image is removed using the large-scale binarization method, accurately cropping the image corresponding to each stitch. S223. Based on the burning grass algorithm, locate the center coordinates of the semicircle at the top of each stitch from the image corresponding to each stitch, and use the center as the feature pixel point.

3. The electrical connector plug shrinkage detection method based on three-dimensional vision according to claim 1, characterized in that: In S3, the following steps are included: S31, performing stereo correction on the left and right images so that the imaging origin coordinates of the two images are consistent, the optical axes of the binocular cameras are parallel, the imaging planes are coplanar, and the epipolar lines are aligned; S32. In three-dimensional space, all feature points are approximately on a spatial plane. Based on the stereo correction results, the perspective relationship between the left image and the right image corresponding to the spatial plane where the feature points are located is calculated, and the center of the circle in the left and right images is matched with the help of the perspective relationship.

4. The electrical connector plug shrinkage detection method based on three-dimensional vision according to claim 1, characterized in that: In S4, the three-dimensional coordinates of each feature point are calculated using the matched feature pixel coordinates and the binocular camera projection matrix. The formula used is: and ,in, 、 are the projection matrices of the left and right cameras respectively, Represents the coordinates of the feature pixel points in the left image, Represents the coordinates of the feature pixel points in the right image, Represents the three-dimensional coordinates of the feature points, represents the projection scale factor of the left image, It represents the projection scale coefficient of the right image, and the three-dimensional coordinates are obtained by the least squares method.

5. The method for detecting electrical connector plug shrinkage based on three-dimensional vision according to claim 1, characterized in that: S5 includes the following steps: S51. Randomly select the three-dimensional coordinates of three non-collinear feature points and perform plane fitting to obtain a fitting plane. The fitting plane is: ,in, 、 、 and is the fitting plane parameter; S52. Use the three-dimensional coordinates of the remaining feature points to verify the fitting plane and calculate the error. The error calculation formula is: ,in, Indicates the The error corresponding to the remaining feature points is Indicates the The three-dimensional coordinates of the remaining feature points; S53, setting a threshold, classifying feature points with errors less than the threshold as inliers, and classifying feature points with errors greater than the threshold as outliers; S54, randomly selecting three non-collinear feature points from the interior points, performing plane fitting again, updating the fitting plane parameters, and thus updating the interior points and exterior points; S55. Set the number of iterations, repeat S54, and compare the number of inner points in each iteration. When the number of inner points is the largest, the corresponding outer point is the shrinking feature point.