Self-adaptive electromagnetic interference detection method and system based on binocular vision and mechanical arm cooperation
Through the adaptive detection method of binocular vision and robotic arm collaboration, the board features are identified and detection trajectories are generated, which solves the problem of insufficient flexibility and accuracy of existing automation systems in complex scenarios, and realizes efficient and stable electromagnetic interference detection .
Patent Information
- Application Number
- CN202411476727.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-14
AI Technical Summary
The existing automated electromagnetic interference detection systems are not flexible, have insufficient detection accuracy, and lack of anti-interference capabilities in complex and changing application scenarios, which are particularly difficult to deal with changes in equipment shape and dynamic interference sources.
Adaptive detection method based on binocular vision and robotic arm collaboration is adopted to identify key features of the circuit board through binocular vision system, calculate key path points, generate detection trajectories, and use robotic arms to perform detection tasks, combining adaptive Kalman filtering algorithm Perform electromagnetic interference detection.
It improves the efficiency, accuracy and stability of detection, and enhances the adaptability of the system in complex application environments and the reliability of the detection results.
Smart Images

Figure CN119310371A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electromagnetic compatibility testing, and in particular relates to an adaptive electromagnetic interference detection method and system based on binocular vision and mechanical arm collaboration. Background Art
[0002] Electromagnetic interference detection is to identify and detect the interference generated by equipment or systems during operation to ensure that they comply with electromagnetic compatibility (EMC) standards. EMC standards require that equipment not only does not cause excessive interference to other equipment, but also resists external electromagnetic interference. Traditional near-field electromagnetic interference detection methods rely on manual operation, and engineers are usually required to manually adjust the probe position and angle to detect different areas of the equipment one by one. This method is not only inefficient and slow in detection, but the operation process is easily affected by human factors, resulting in poor repeatability of the test results. In addition, manual operation is prone to introduce subjective judgment bias, increasing the risk of misjudgment, especially in the face of complex equipment or when there are many electromagnetic interference sources.
[0003] Although existing near-field automated detection systems have achieved partial automation of the detection process through robotic arms or automated platforms, improving test efficiency and reducing manual intervention, they still have significant limitations in complex and changing application scenarios. Automated detection systems usually rely on preset paths or fixed detection modes, and it is difficult to flexibly respond to changes in equipment shape, layout, and environment. In particular, when the object under test may generate dynamic interference sources during operation, or when the interference sources are relatively scattered and difficult to accurately locate, traditional automated systems lack sufficient adaptability to dynamically adjust detection strategies. Therefore, although the current automated solutions have good effects in standardized testing, they are still insufficient when dealing with complex multi-dimensional interference problems in actual application scenarios.
[0004] Based on the above analysis, the main deficiencies in current research work in related fields are: (1) The automated detection system lacks flexibility. Traditional automated detection systems rely on preset paths or fixed detection modes. When the shape of the object being measured changes, it is necessary to reset the path or change the detection mode. (2) The automated detection system lacks detection accuracy. In a scattered and complex interference environment, the system cannot confirm the precise location of the path coordinate points, resulting in the inability to collect accurate location data. (3) The automated system lacks anti-interference detection capabilities. The automated system cannot effectively respond to dynamic interference generated during equipment operation. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides an adaptive electromagnetic interference detection method and system based on binocular vision and robotic arm collaboration, which accurately identifies key features on a circuit board through a binocular vision system and uses a robotic arm to accurately perform detection tasks, thereby improving detection efficiency, accuracy and stability.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides an adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration, comprising the following steps:
[0008] S101: Inputting circuit board image information captured by a binocular camera;
[0009] S102: Performing adaptive edge detection on the image to obtain contour information;
[0010] S103: Calculate key path points in the image according to the contour information;
[0011] S104: removing the path points that have been deviated to obtain path points without deviating;
[0012] S105: selecting adjacent path points with different heights from the path points without offset as key points, setting anti-collision transition points between the key points, and generating a detection trajectory;
[0013] S106: Perform adaptive electromagnetic interference detection according to the generated detection trajectory.
[0014] Optionally, step S102 specifically includes the following sub-steps:
[0015] S201: grayscale processing of the image;
[0016] S202: Divide the image pixels into two categories according to the gray level threshold k, and calculate the probability of the two categories appearing;
[0017] S203: Calculate the mean of the two types of pixels and the global pixel mean according to the probability of the two types of pixels appearing;
[0018] S204: Calculate the class variance δ 2 The largest value of k will make δ 2 The largest k value is recorded as the high threshold th;
[0019] S205: Determine whether the proportion of pixels below the high threshold th is less than the proportion target value K: if t≥K, generate a binary image according to the high threshold th, and return to step S202; if t<K, record the k value as the low threshold tl and retain the pixel;
[0020] S206: Perform Gaussian filtering on the grayscale image;
[0021] S207: using the Sobel operator to calculate the gradient magnitude and gradient direction of each pixel in the image, and suppressing non-maximum values accordingly;
[0022] S208: Determine whether the pixel after non-maximum suppression is greater than t1: if the pixel after non-maximum suppression is not greater than t1, delete the pixel; if the pixel after non-maximum suppression is greater than t1, merge the pixel after non-maximum suppression with the pixel retained in step S205 to generate a binary image;
[0023] S209: Determine whether the contour in the binary image is a closed contour: if it is a closed contour, the probability that the contour is true is 1, and the edge is determined to be a contour, and the contour information is obtained; if it is not a closed contour, the edge is determined to be a pseudo contour or a contour by comparing it with the contour threshold, and the contour information is obtained;
[0024] S210: Storing the contour information using the maximum envelope rectangle.
[0025] Optionally, in step S204, the class variance δ 2 The expression is:
[0026]
[0027] In the formula, μ T is the global pixel mean, ω1 is the probability of a class of pixels, p i is the probability distribution of pixel gray level i.
[0028] Optionally, in step S209, the comparison with the contour threshold is used to determine whether the edge is a pseudo contour or a contour, specifically:
[0029] If it is not a closed contour, the length of the false contour is calculated, and the probability that the false contour is true is calculated according to the following formula:
[0030]
[0031] In the formula, P(u r ) represents the pseudo contour u r The probability of being true, length(u r ) is the length of the rth pseudo contour, max(length(u r )) means to find the length of r pseudo contours length(u r ), r = 1, 2, ..., s, s is the total number of pseudo contours;
[0032] Calculate the average probability P(u) that a pseudo contour in the neighborhood is true:
[0033]
[0034] In the formula, u′ q represents the qth pseudo contour in the neighborhood, q = 1, 2, ..., M, M is the number of pseudo contours in the neighborhood, M ≤ s, and the pseudo contour u′ in the neighborhood q is the pseudo contour u r part of;
[0035] Determine whether the average probability P(u) is greater than the contour threshold T: if it is not greater than the contour threshold T, the edge is a pseudo contour; if it is greater than the contour threshold T, the edge is determined to be a contour and the contour information is obtained.
[0036] Optionally, step S103 is specifically as follows: the center position of the rectangle is calculated according to the path point positions recorded by the maximum envelope rectangle, and the actual height corresponding to the center position of the rectangle in the world coordinate system is filled into the rectangle. The height outside the rectangle is 0, and the path points with non-zero heights are the path points that need to be calculated; wherein, the contour information is stored using the maximum envelope rectangle for data.
[0037] Optionally, step S104 specifically includes the following sub-steps:
[0038] S401: Select a certain number of points from the path point set and set them as interior points, where the interior points represent points within a certain error range and the exterior points represent inappropriate noises; initialize the number of iterations d=1;
[0039] S402: fitting a mathematical model according to the interior points;
[0040] S403: Substitute other path points other than the interior point into the mathematical model to obtain the error e;
[0041] S404: Determine whether the error e is less than the difference threshold ε: if it is not less than the difference threshold, set the path point as an external point; if it is less than the difference threshold, set the path point as an internal point;
[0042] S405: Counting the number of inliers α and the number of outliers β;
[0043] S406: Determine whether the number of inliers α is greater than the number of outliers β: if not, return to step S402; if greater than the number of outliers, refit the mathematical model based on the inliers;
[0044] S407: Determine whether the number of iterations d is greater than the iteration target value D: If it is not greater than the iteration target value, then the number of iterations is d+1, and return to step S402; If it is greater than the iteration target value, then according to the mathematical model fitted in step S406, the path points that are not on the model are removed to obtain path points without offset.
[0045] Optionally, in step S407, the iterative target value D is calculated as follows:
[0046]
[0047] In the formula, H′ represents the probability that the selected points can sample all the correct m points in the case of D iterations, H′=1-(1-η m ) D , η represents the proportion of internal points.
[0048] Optionally, in step S105, the height of the anti-collision transition point is the higher value of the two path points before and after; the method of generating the detection trajectory is: setting an expansion mechanism, selecting the maximum side of the maximum envelope rectangular expansion area as the edge path point, and generating detection path points from the edge path points according to the shortest distance principle, and completing the robot arm motion trajectory planning through cubic polynomial interpolation, obtaining the robot arm motion trajectory as the detection trajectory, and solving the robot arm joint angles corresponding to each motion trajectory point through inverse kinematics.
[0049] Optionally, step S106 is specifically as follows: the robotic arm carries a near-field probe to scan the circuit board along the detection trajectory, the near-field probe converts the magnetic field signal into an electrical signal and transmits it to the spectrum analyzer through the probe output end, the spectrum analyzer displays the radiation power density value of the object under test in the frequency domain; an adaptive Kalman filter algorithm is used to calculate and analyze the radiation power density value of the object under test, the detection standard is adaptively adjusted, and the electromagnetic interference detection result is output.
[0050] In a second aspect, the present invention provides an adaptive electromagnetic interference detection system based on binocular vision and robotic arm collaboration, comprising:
[0051] A binocular vision module is used to obtain image information of the circuit board to be inspected taken by a binocular camera;
[0052] The image processing module is used to perform adaptive edge detection on the image to obtain contour information; calculate key path points in the image based on the contour information; remove the offset path points to obtain the non-offset path points;
[0053] The motion planning module is used to select adjacent path points with different heights from the non-offset path points as key points, set anti-collision transition points between the key points, and generate detection trajectories;
[0054] A motion execution module, comprising a mechanical arm carrying a near-field probe, the mechanical arm scanning the circuit board according to a detection track, the near-field probe converting a magnetic field signal into an electrical signal;
[0055] The adaptive detection module includes a spectrum analyzer and a host computer. The spectrum analyzer receives the electrical signal transmitted by the near-field probe and displays the radiation power density value of the object under test in the frequency domain; the host computer uses an adaptive Kalman filter algorithm to calculate and analyze the radiation power density value of the object under test, adaptively adjusts the detection standard and outputs the electromagnetic interference detection result.
[0056] The beneficial effects of the present invention are as follows: the present invention combines binocular vision and robotic arm technology to achieve rapid and accurate recognition and detection of circuit board features, and improves the work efficiency of near-field electromagnetic interference detection; the stability of the system in complex application environments is improved through an adaptive detection algorithm, and the reliability of the detection results is improved through data fusion of multiple sensors such as binocular vision cameras, near-field probes, and spectrum analyzers. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is an overall flow chart of the adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration.
[0058] Figure 2 It is a structural diagram of an adaptive electromagnetic interference detection system based on binocular vision and robotic arm collaboration.
[0059] Figure 3 It is the adaptive edge detection flow chart.
[0060] Figure 4 It is a flow chart for removing the path points that have deviated.
[0061] Figure 5 It is a flowchart of collision avoidance path planning.
[0062] Figure 6 It is a flow chart of adaptive electromagnetic interference detection.
[0063] Figure 7 This is the system architecture diagram of the adaptive electromagnetic interference detection system based on binocular vision and robotic arm collaboration.
[0064] Figure 8 This is the effect diagram of adaptive edge detection.
[0065] Fig. 9 It is a comparison diagram of the curve model results fitted by the method of the present invention and without removing the offset path points. DETAILED DESCRIPTION
[0066] The present invention will now be described in further detail with reference to the accompanying drawings.
[0067] In one embodiment, if Figure 1 As shown, an embodiment of the present invention provides an adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration, comprising the following steps.
[0068] Step 101: input image information captured by a binocular camera.
[0069] For example, Figure 2 As shown in the figure, the Intel RealSense D435 camera is used to shoot the circuit board to obtain the circuit board image information. The structures in the figure are as follows: 1. Host computer; 2. Robotic arm; 3. Spectrum analyzer; 4. Binocular camera; 5. Near-field probe; 6. Circuit board.
[0070] Step 102: adaptive edge detection to obtain contour information.
[0071] like Figure 3 As shown, this step includes:
[0072] S201, performing grayscale processing on the image.
[0073] Exemplarily, the grayscale formula is:
[0074] I gray =0.299*I R +0.587*I G +0.114*I B ;
[0075] Among them, I gray Represents the pixel value after grayscale conversion, I R ,I G ,I B Represents the pixel value on the red, green, and blue channels of the corresponding pixel in the original image.
[0076] S202, dividing the image pixels into two categories c1 and c2.
[0077] Exemplarily, the pixels are divided into two categories, c1 and c2, by a threshold of gray level k, where category c1 represents gray levels of [0, 1, ..., k], and category c2 represents gray levels of [k+1, ..., 255], k∈[0, 254].
[0078] Calculate the probability ω1, ω2 of the two categories c1 and c2 appearing:
[0079]
[0080] in, p i is the probability distribution of pixel gray level i, n i is the number of pixel gray levels i, i is an integer, i∈[0,255], N is the total number of pixels, k is the gray level threshold for classifying c1 and c2, k∈[0,254], in this embodiment, N=480×640=307200;
[0081] S203, calculate the mean values μ1 and μ2 of the two types of pixels, and calculate the global pixel mean μ T :
[0082]
[0083] S204, calculate the class variance δ 2 The largest value of k will make δ 2 The largest k is recorded as the high threshold th.
[0084] For example, the class variance expression is:
[0085]
[0086] in,
[0087] S205, determine whether the ratio of pixels below the high threshold th is less than the ratio target value K. In this embodiment, the target value K=0.73. If the pixel ratio t is not less than the ratio target value K, a binary image is generated according to the high threshold th, and the operation S202 is returned to be executed. Exemplarily, pixels below the high threshold th are assigned a value of 0, and pixels above the high threshold th are assigned a value of 1, thereby generating a binary image.
[0088] If the pixel ratio t is less than the ratio target value K, the k value is recorded as the low threshold tl and the pixel is retained. In this embodiment, the target value K=0.73.
[0089] S206, performing Gaussian filtering on the grayscale image pixels to eliminate noise.
[0090] S207, using the Sobel operator to calculate the gradient magnitude and direction of each pixel in the image.
[0091] Exemplarily, the Sobel operator formula is:
[0092]
[0093] Among them, G x , G y Represent the gradient values in the horizontal and vertical directions respectively, * represents the convolution operator, I gray is the grayscale pixel value calculated in step S201.
[0094] The formula for gradient magnitude and direction is:
[0095]
[0096] Among them, M(x, y), θ(x, y) represent the gradient magnitude and gradient direction of the pixel respectively, G x (x, y) and Gy (x, y) represents the image gradient in the horizontal and vertical directions, Respectively represent G x (x, y) and G y (x, y) squared, Express Find the inverse tangent.
[0097] S208, suppressing non-maximum values according to the gradient direction.
[0098] Exemplarily, the non-maximum suppression formula is:
[0099]
[0100] Wherein, t1 is the low threshold value set in step S205, δ x , δ y are the offset values in the gradient direction (δ x =cosθ(x, y),δ y =sinθ(x,y)).
[0101] Determine whether the pixel after non-maximum suppression is greater than tl.
[0102] For example, the judgment formula is as follows:
[0103]
[0104] If the pixel after non-maximum suppression is not greater than tl, the pixel is deleted.
[0105] If the number of pixels after non-maximum suppression is greater than t1, the pixels after non-maximum suppression are merged with the pixels retained in step S205 to generate a binary image.
[0106] S209, determining whether the contour in the binary image is a closed contour.
[0107] If it is a closed contour, the probability that the contour is true is set to 1, then the edge is determined to be a contour, and the contour information is obtained.
[0108] If it is not a closed contour, calculate the pseudo contour length (u r ), where u r represents the rth pseudo contour, r=1, 2, ..., s, s is the number of pseudo contours, and length() represents the length of the pseudo contour.
[0109] The probability that the false contour is true is calculated according to the following formula P(u r );
[0110]
[0111] Among them, P() represents the probability that the pseudo contour is true, length(u r ) represents the length of the rth pseudo contour, max(length(u r )) means to find the length of r pseudo contours length(u r ), r = 1, 2, ..., s, s is the total number of pseudo contours.
[0112] Calculate the average probability P(u) that the pseudo contour in the neighborhood is true;
[0113]
[0114] Among them, u′ q represents the qth pseudo contour in the neighborhood, q = 1, 2, ..., M, M is the number of pseudo contours in the neighborhood, M ≤ s, and the pseudo contour u′ in the neighborhood q is the pseudo contour u r part of.
[0115] It is determined whether the average probability is greater than the contour threshold T. In this embodiment, the threshold T is 0.6.
[0116] If it is not greater than the contour threshold T, the edge is a false contour.
[0117] If it is greater than the contour threshold T, the edge is determined to be a contour and the contour information is obtained.
[0118] S210, storing the contour information using the maximum envelope rectangle.
[0119] Step 103, calculating key path points in the image.
[0120] The center position of the rectangle is calculated according to the path point positions recorded by the maximum envelope rectangle, and the actual height in the world coordinate system corresponding to the center position of the rectangle is filled into the rectangle. The outer height of the rectangle is 0, and the path points with non-zero height are the key path points that need to be calculated.
[0121] Step 104, remove the path points that have been offset to obtain path points without offset, such as Figure 4 As shown, including:
[0122] S401, randomly select a certain number of points in the path point set and set them as interior points, and set the number of iterations d=1.
[0123] Exemplarily, the interior point represents a point within a certain error range, and the exterior point represents an inappropriate noise in the path point. In this embodiment, 8 points are selected as the interior points.
[0124] S402, fitting a mathematical model according to the interior points. In this embodiment, a curve model is fitted according to 8 interior points.
[0125] S403, substituting other path points into the calculation result of the mathematical model to obtain the error e.
[0126] S404, determine whether the error e is less than the difference threshold ε: if it is not less than the difference threshold, set the path point as an external point; if it is less than the difference threshold, set the path point as an internal point. In this embodiment, the threshold ε is set to 4.
[0127] S405, counting the number of inliers α and the number of outliers β.
[0128] S406, judging whether the number of inliers α is greater than the number of outliers β: if not, returning to S402; if greater than the number of outliers, refitting the mathematical model according to the number of inliers.
[0129] S407, determine whether the number of iterations d is greater than the iteration target value D.
[0130] For example, the proportion of inliers is η. When the model is used for calculation, the probability of selecting m points to include inliers is H=1-η. m , in the case of D iterations, the probability H′ of the selected points being able to sample all the correct m points is as follows:
[0131] H′=1-(1-η m ) D ;
[0132] In this embodiment, the number of iterations is calculated according to the above probability formula
[0133] If it is not greater than the iteration target value, the number of iterations is d+1, and the process returns to operation S402.
[0134] If it is greater than the iteration target value, then the path points that are not on the model are removed according to the mathematical model fitted in step S406, that is, the path points that are offset are removed to obtain path points without offset.
[0135] Step 105: Anti-collision path planning to obtain a detection trajectory.
[0136] As shown in 5, in this step, adjacent path points with different heights are selected from the unoffset path points obtained in step 104 as key points, and anti-collision transition points are set between adjacent key coordinate points. The height of the transition point is the higher value of the heights of the two previous and next path points.
[0137] Set up an expansion mechanism. In this embodiment, a pair of coordinate points with a difference of 100 pixels in the image are determined, and the coordinates of these two coordinate points in the robot base coordinate system (x1, y1), (x2, y2) are calculated according to the coordinate transformation matrix. Measure the x0, y0 dimensions of the actual near-field probe, and use the formula Calculate the horizontal and vertical expansion ranges of the expansion area.
[0138] The maximum side of the largest enveloping rectangular expansion area is selected as the edge path point. The detection path points are generated from the edge path points according to the shortest distance principle, and the robot trajectory planning is completed through cubic polynomial interpolation to obtain the robot motion trajectory, and the robot joint angles corresponding to each motion trajectory point are solved through inverse kinematics.
[0139] Step 106: Adaptive electromagnetic interference detection.
[0140] like Figure 6 As shown, in this step, the robot arm 2 carries the near-field probe 5 to scan the circuit board 6 according to the detection track of step 105. The near-field probe 5 converts the magnetic field signal into an electrical signal and transmits it to the spectrum analyzer 3 through the output end of the probe. The spectrum analyzer 3 displays the radiation power density value (W / m 2 ). The upper computer 1 uses an adaptive Kalman filter algorithm to calculate and analyze the radiation power density value of the object under test, adaptively adjusts the detection standard and outputs the electromagnetic interference detection result. In this embodiment. The circuit board components are divided into three categories: radiation interference components, conduction interference components and anti-interference components. The radiation interference components include oscillators, clock signal generators, Bluetooth chips, and LCD displays; the conduction interference components include switching power supplies and motor driver chips; the anti-interference components include: filters and capacitors. The detection signal of the radiation interference component is manifested as a continuous high radiation power density value signal, the detection signal of the conduction interference component is manifested as a transient high radiation power density value signal, and the detection signal of the anti-interference component is manifested as a continuous low radiation power density value signal. In this embodiment, the unit of the radiation power density value is dBmW / m 2 Indicates, where 1dBmW / m 2 =0.001W / m 2 The high radiation power density value must be greater than or equal to -60dBmW / m 2 (can be abbreviated as -60dBm), the low radiation power density value is less than -63dBmW / m 2 (can be abbreviated as -63dBm) In the embodiment, the test frequency range is 0 MHz to 1500 MHz.
[0141] In another embodiment, based on the same inventive concept, an embodiment of the present invention also provides an adaptive electromagnetic interference detection system based on binocular vision and robotic arm collaboration. Since the principle of solving the problem by this system is similar to that of the adaptive electromagnetic detection method based on binocular vision and robotic arm collaboration, the implementation of this system can refer to the implementation of the adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration, and the repeated parts will not be repeated.
[0142] like Figure 7 As shown, an embodiment of the present invention provides an adaptive electromagnetic interference detection system based on binocular vision and robotic arm collaboration, comprising:
[0143] The binocular vision module 10 is used to obtain stereoscopic image information of the circuit board.
[0144] The image processing module 20 is used to obtain image grayscale information and calculate key coordinate points in the image.
[0145] The motion planning module 30 is used to select and correctly modify the position of the coordinate point.
[0146] The motion execution module 40 is used to accurately execute the detection path.
[0147] The adaptive detection module 50 is used for adaptive circuit board electromagnetic interference detection.
[0148] For more specific working processes of the above modules, please refer to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0149] like Figure 8 As shown, the embodiment of the present invention provides a comparison diagram of the original circuit board image and the image after being processed by the adaptive edge detection algorithm. Figure 8 In the figure, the left image is the RGB image taken by the binocular camera, and the right image is the binary image extracted after adaptive edge detection.
[0150] like Fig. 9 As shown, a comparison diagram of the curve model results of the method of the present invention provided by an embodiment of the present invention and the curve model results of fitting without removing the offset path points. Fig. 9 In the figure, the blue line 1 is the motion line after removing the offset path points; the orange line 2 is the motion line after not removing the offset path points.
[0151] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. An adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration, characterized in that: It includes the following steps: S101: Input the image information of the circuit board captured by the binocular camera; S102: Perform adaptive edge detection on the image to obtain contour information; S103: Calculate the key path points in the image according to the contour information; S104: Remove the offset path points to obtain non-offset path points; S105: Select adjacent path points with different heights from the non-offset path points as key points, set anti-collision transition points between the key points, and generate a detection trajectory; S106: Perform adaptive electromagnetic interference detection according to the generated detection trajectory.
2. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 1, characterized in that: Step S102 specifically includes the following sub-steps: S201: Perform grayscale processing on the image; S202: Divide the image pixels into two categories according to the gray-level threshold k, and calculate the probabilities of the two categories; S203: Calculate the means of the two types of pixels and the global pixel mean according to the probabilities of the two categories; S204: Calculate the class variance δ 2 The largest value of k will make δ 2 The largest k value is recorded as the high threshold th; S205: Judge whether the pixel ratio below the high threshold th is less than the ratio target value K: If t≥K, generate a binary image according to the high threshold th, and return to execute step S202; If t<K, record the k value as the low threshold tl and retain the pixels; S206: Perform Gaussian filtering on the grayscale image; S207: Use the Sobel operator to calculate the gradient magnitude and gradient direction of each pixel in the image, and suppress non-maximum values accordingly; S208: Judge whether the pixel after non-maximum suppression is greater than tl: If the pixel after non-maximum suppression is not greater than tl, delete the pixel point; If the pixel after non-maximum suppression is greater than tl, merge the pixel after non-maximum suppression with the pixels retained in step S205 to generate a binary image; S209: Judge whether the contour in the binary image is a closed contour: If it is a closed contour, the probability that the contour is true is 1, determine the edge as the contour, and obtain the contour information; If it is not a closed contour, judge whether the edge is a false contour or a contour by comparing with the contour threshold, and obtain the contour information; S210: Store the contour information in a maximum bounding rectangle for data storage.
3. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 2, characterized in that: In step S204, the class variance δ 2 The expression is: In the formula, μ T is the global pixel mean, ω1 is the probability of a class of pixels, p i is the probability distribution of pixel gray level i.
4. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 2, characterized in that: In step S209, the method of judging whether the edge is a false contour or a contour by comparing with the contour threshold is specifically: If it is not a closed contour, calculate the length of the false contour, and calculate the probability that the false contour is true according to the following formula: In the formula, P(u r ) represents the pseudo contour u r The probability of being true, length(u r ) is the length of the rth pseudo contour, max(length(u r )) means to find the length of r pseudo contours length(u r ), r = 1, 2, ..., s, s is the total number of pseudo contours; Calculate the average probability P(u) that the false contour is true in the neighborhood; In the formula, u′ q represents the qth pseudo contour in the neighborhood, q = 1, 2, ..., M, M is the number of pseudo contours in the neighborhood, M ≤ s, and the pseudo contour u′ in the neighborhood q is the pseudo contour u r part of; Judge whether the average probability P(u) is greater than the contour threshold T: If it is not greater than the contour threshold T, the edge is a false contour; If it is greater than the contour threshold T, determine the edge as the contour and obtain the contour information.
5. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 1, characterized in that: Step S103 is specifically: Calculate the center position of the rectangle according to the path point positions recorded by the maximum bounding rectangle, fill the actual height in the world coordinate system corresponding to the center position of the rectangle into the rectangle, the height outside the rectangle is 0, and the path points with non-zero height are the path points to be calculated; Among them, the contour information is stored in a maximum bounding rectangle for data storage.
6. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 1, characterized in that: Step S104 specifically includes the following sub-steps: S401: Select a certain number of points from the path point set and set them as interior points, where the interior points represent points within a certain error range and the exterior points represent inappropriate noises; initialize the number of iterations d=1; S402: fitting a mathematical model according to the interior points; S403: Substitute other path points other than the interior point into the mathematical model to obtain the error e; S404: Determine whether the error e is less than the difference threshold ε: if it is not less than the difference threshold, set the path point as an external point; If it is less than the difference threshold, the path point is set as an interior point; S405: Counting the number of inliers α and the number of outliers β; S406: Determine whether the number of inliers α is greater than the number of outliers β: if not, return to step S402: if greater than the number of outliers, refit the mathematical model based on the inliers; S407: Determine whether the number of iterations d is greater than the iteration target value D: If it is not greater than the iteration target value, then the number of iterations is d+1, and return to step S402; If it is greater than the iteration target value, then according to the mathematical model fitted in step S406, the path points that are not on the model are removed to obtain path points without offset.
7. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 6, characterized in that: In step S407, the iterative target value D is calculated as follows: In the formula, H′ represents the probability that the selected points can sample all the correct m points in the case of D iterations, H′=1-(1-η m ) D , η represents the proportion of internal points.
8. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 1, characterized in that: In step S105, the height of the anti-collision transition point is the higher value of the two path points before and after; the method of generating the detection trajectory is: setting an expansion mechanism, selecting the maximum side of the maximum envelope rectangular expansion area as the edge path point, generating the detection path point from the edge path point according to the shortest distance principle, and completing the robot arm motion trajectory planning through cubic polynomial interpolation, obtaining the robot arm motion trajectory as the detection trajectory, and solving the robot arm joint angles corresponding to each motion trajectory point through inverse kinematics.
9. The adaptive electromagnetic interference detection method based on binocular vision and robotic arm collaboration as claimed in claim 8, characterized in that: Step S106 is specifically as follows: the robotic arm carries a near-field probe to scan the circuit board along the detection trajectory; the near-field probe converts the magnetic field signal into an electrical signal and transmits it to the spectrum analyzer through the output end of the probe; the spectrum analyzer displays the radiation power density value of the object under test in the frequency domain; an adaptive Kalman filter algorithm is used to calculate and analyze the radiation power density value of the object under test, the detection standard is adaptively adjusted, and the electromagnetic interference detection result is output.
10. Adaptive electromagnetic interference detection system based on binocular vision and robotic arm collaboration, characterized in that: include: A binocular vision module (10) is used to obtain image information of the circuit board (6) to be inspected captured by the binocular camera (4); An image processing module (20) is used to perform adaptive edge detection on the image to obtain contour information; calculate key path points in the image based on the contour information; remove path points that have been offset to obtain path points without offset; A motion planning module (30) is used to select adjacent path points with different heights from the non-offset path points as key points, set anti-collision transition points between the key points, and generate a detection trajectory; A motion execution module (40) comprises a mechanical arm (2) carrying a near-field probe (5), wherein the mechanical arm (2) scans the circuit board according to a detection track, and the near-field probe (5) converts a magnetic field signal into an electrical signal; The adaptive detection module (50) comprises a spectrum analyzer (3) and a host computer (1), wherein the spectrum analyzer (3) receives the electrical signal transmitted by the near-field probe (5) and displays the radiation power density value of the object under test in the frequency domain; the host computer (1) uses an adaptive Kalman filter algorithm to calculate and analyze the radiation power density value of the object under test, adaptively adjusts the detection standard and outputs the electromagnetic interference detection result.
Citation Information
Cited By
Automatic plugging test device for battery module connector
CN119511086A
Intelligent wearable watch outer ring watchcase precision detection method based on optical probe
CN120333340A