Method for detecting folding beam in MEMS gyroscope chip and measuring size of folding beam in MEMS gyroscope chip
By using a compensation function bilateral filtering algorithm and multi-line fast Hough detection algorithm in MEMS gyroscope chip, the problems of insufficient edge information at the micro-nano structure scale and low Hough linear detection efficiency are solved, and more efficient edge features are achieved Information storage and linear detection.
Patent Information
- Application Number
- CN202411488991.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-03
AI Technical Summary
Under the micro-nano structure scale, the machining error of MEMS gyroscopes leads to the failure to meet the requirements of high-precision application. Traditional bilateral filtering algorithms lack information on structural edges, and Hoff's linear detection efficiency is low.
Image processing is performed using a bilateral filtering algorithm with compensation function, sharpening edge feature information, and combining the multi-line fast Hough detection algorithm with MEMS geometric properties to improve linear detection efficiency and accuracy.
It improves the storage and filtering effect of edge feature information, solves the problem of insufficient edge information in traditional algorithms, shortens the Hoff straight line detection time, and improves detection efficiency and accuracy.
Smart Images

Figure CN119251478A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of target detection and image processing, and in particular to a method for detecting and measuring the size of a folded beam in a MEMS gyroscope chip. Background Art
[0002] The characteristics of MEMS design and manufacturing technology, such as miniaturization, high integration, and batch production, make it widely used in many fields of human life, such as mechanical processing, aerospace, communication electronics, and biomedicine. Although MEMS technology has achieved rapid and sustained development in the past two decades, the widespread application of highly integrated, miniaturized, and batch MEMS technology and the growing performance requirements have further posed new challenges to the design level and process technology of micro-nano structures: processing errors and performance bottlenecks of micro-nano structures. As the required size of micro-nano structures continues to decrease, in the absence of technological breakthroughs or innovations in micro-nano processing technology, the processing errors of microsensors at the micro-nano scale are becoming more and more obvious. Affected by the processing errors of micro-electro-mechanical (MEMS) gyroscopes, the various performance parameters of micro-nano structures usually cannot meet the requirements of high-precision applications. Summary of the invention
[0003] In order to solve the above problems, the present invention proposes a method for detecting and measuring the size of a folded beam in a MEMS gyroscope chip, comprising the following steps:
[0004] S1: Obtain an image of the MEMS gyroscope chip to be tested through an industrial camera;
[0005] S2: inputting the image into a target detection model to identify the folded beam area;
[0006] S3: Processing the identified folded beam area by image processing technology;
[0007] S4: Obtain the outline of the folded beam and measure the size of the folded beam.
[0008] Furthermore, the construction of the target detection model in step S2 includes: obtaining the original picture through the process camera, and obtaining the picture to be trained by screening the picture; combining the original image set and the picture to be trained into a data set for yolo target detection training; inputting the data set into the yolo target detection network model for learning, performing a large number of rounds of training, and constructing a target detection model that can identify the area of the folded beam in the MEMS gyroscope chip.
[0009] Furthermore, the image processing technology in step S3 includes shadow removal and image filtering processing.
[0010] Furthermore, the image filtering process includes performing filtering process using a bilateral filtering algorithm that introduces a compensation function to determine whether there is an edge point; if there is an edge point, the influence of the compensation function is added when filtering the window. The formula of the bilateral filtering algorithm that introduces the compensation function is:
[0011] Where e(x,y) is the compensation function, (x,y) is the coordinate of the pixel currently being processed, (i,j) is the coordinate of the neighboring pixel of the current (x,y) coordinate within the M(x,y) window, M(x,y) represents the (2n+1, 2n+1) window pixel set centered at (x,y), and f(i,j) and f(x,y) represent the pixel values at (i,j) and (x,y) within the M(x,y) window.
[0012] The rule for adding the compensation function is as follows: Calculate the window standard deviation S of each pixel in the window (1,1) ,S (2,2) ,S (3,3) ...S (i,j) , and get the median S of the window standard deviation set mid , taking the median as the condition for judging the edge, the formula for the window standard deviation is as follows:
[0013] where f(x,y) avg is the mean pixel value in the window; (x, y) is the coordinate of the pixel currently being processed, (i, j) is the coordinate of the neighboring pixel of the current (x, y) coordinate in the M(x, y) window, and f(i, j) and f(x, y) represent the pixel values at (i, j) and (x, y) in the M(x, y) window.
[0014] Compare the window standard deviation S(i,j) with the median S of the standard deviation set mid For comparison, the condition for the existence of edge points in the window is that the window standard deviation S(i,j)>S mid Otherwise, there is no edge point and the compensation function is set to 0.
[0015] Furthermore, the contour of the folding beam obtained in S4 includes edge detection and contour extraction. Sobel edge detection is performed on the folding beam area, and the contour is extracted using a contour extraction function. For the extracted contour, the correct contour is obtained by limiting the length of the contour points. Hough line detection is performed on the contour, and the inclination angle of the figure is obtained according to the angle. According to the obtained inclination angle, the contour points are rotated clockwise according to forward mapping; multi-line fast Hough detection is performed on the rotated image, and the size of the structure is calculated according to the properties of the detected lines.
[0016] Furthermore, the multi-line fast Hough detection includes comparing the detected lines, and obtaining a final line parameter slope by performing least squares fitting on each group of line points, which not only makes the result more accurate, but also reduces the complexity of line detection and improves detection efficiency.
[0017] Furthermore, the least squares straight line fitting method is to fit multiple points on the straight line. Assuming that the pixel points (x i ,y i ), i = 1, 2, 3...n, use the straight line equation formula to represent these points: y(x) = kx + b, where k is the slope of the line and b is the intercept. The straight line fitting formula using the least squares method is: Calculate the a and b values when P(a,b) is the minimum and determine the slope equation of the straight line parameters.
[0018] A computer-readable storage medium, wherein when the computer instructions are executed by a processor, the steps in the method described in any one of claims 1 to 7 are completed.
[0019] The beneficial effects of the present invention are as follows:
[0020] The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip of the present invention adopts a bilateral filtering algorithm that introduces a compensation function for sharpening the edge to enhance edge feature information, thereby solving the problem that the traditional bilateral filtering algorithm is insufficient in preserving structural edge information. It is concluded through the peak signal-to-noise ratio that the algorithm of the present invention is relatively excellent in filtering effect. In terms of straight line detection, in view of the multiple straight lines and low efficiency of the Hough straight line detection algorithm, a multi-straight line fast Hough detection based on MEMS geometry is proposed, which has a relatively obvious improvement on the problem of multiple straight lines and shortens the time of Hough straight line detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of the present invention.
[0022] Figure 2 It is a target detection parameter result diagram of the present invention.
[0023] Figure 3 It is the image result after the target detection of the present invention.
[0024] Figure 4 This is a comparison chart of PNSR values of the filtering algorithm processing results.
[0025] Figure 5 This is the effect picture after edge detection of the folded beam part.
[0026] Figure 6 This is the effect of the traditional Hough straight line detection on the folding beam part.
[0027] Figure 7 This is the effect of multi-straight line fast Hough detection on the folded beam part.
[0028] Figure 8 It is a comparison chart of processing time of line detection algorithms. DETAILED DESCRIPTION
[0029] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present invention, but should not be understood as limiting the present invention.
[0030] See also Figure 1 The present invention proposes a method for detecting and measuring the size of a folded beam in a MEMS gyroscope chip, comprising the following steps:
[0031] S1: Obtain an image of the MEMS gyroscope chip to be tested through an industrial camera;
[0032] S2: inputting the image into a target detection model to identify the folded beam area;
[0033] S3: Processing the identified folded beam area by image processing technology;
[0034] S4: Obtain the outline of the folded beam and measure the size of the folded beam.
[0035] The construction of the target detection model in step S2 includes: obtaining an original picture through a process camera and obtaining a picture to be trained by screening the picture; combining the original image set and the picture to be trained into a data set for yolo target detection training; inputting the data set into the yolo target detection network model for learning, performing a large number of rounds of training, and constructing a target detection model that can identify the area of the folded beam in the MEMS gyroscope chip.
[0036] See also Figure 2 This is the accuracy result of the target detection model after a lot of training, under certain threshold conditions, to identify the image. Figure 3 It is the location map and category of the folding beam area after specific identification.
[0037] The image processing technology in step S3 includes shadow removal and image filtering. Specifically, the extracted image is grayed to facilitate subsequent image processing.
[0038] The image filtering process includes using a bilateral filtering algorithm that introduces a compensation function to perform filtering process, and judging whether there is an edge point. If there is an edge point, the influence of the compensation function is added when filtering the window to sharpen the edge.
[0039] The basis for judging whether there is an edge point is: calculate the set median of the window standard deviation and the window standard deviation of all pixels in the sliding window, and compare the two for judgment.
[0040] The bilateral filtering algorithm formula introducing the compensation function is:
[0041] Where e(x,y) is the compensation function, (x,y) is the coordinate of the pixel currently being processed, (i,j) is the coordinate of the neighboring pixel of the current (x,y) coordinate within the M(x,y) window, M(x,y) represents the (2n+1, 2n+1) window pixel set centered at (x,y), and f(i,j) and f(x,y) represent the pixel values at (i,j) and (x,y) within the M(x,y) window.
[0042] The rule for adding the compensation function is as follows: Calculate the window standard deviation S of each pixel in the window (1,1) ,S (2,2) ,S (3,3) ...S (i,j) , and get the median S of the window standard deviation set mid , taking the median as the condition for judging the edge, the formula for the window standard deviation is as follows:
[0043] where f(x,y) avg is the mean pixel value in the window; (x, y) is the coordinate of the pixel currently being processed, (i, j) is the coordinate of the neighboring pixel of the current (x, y) coordinate in the M(x, y) window, and f(i, j) and f(x, y) represent the pixel values at (i, j) and (x, y) in the M(x, y) window.
[0044] Compare the window standard deviation S(i,j) with the median S of the standard deviation set mid For comparison, the condition for the existence of edge points in the window is that the window standard deviation S(i,j)>S mid Otherwise, there is no edge point and the compensation function is set to 0.
[0045] Bilateral filtering preserves edge features, but when processing images with blurred edges, some edge features are not obvious, which will make subsequent detection inaccurate due to blurred edges. Therefore, while filtering, it is necessary to sharpen the edges to enhance edge feature information, so that the subsequent size measurement part will have better edge feature information.
[0046] Since MEMS is small in size, the image resolution is large and the edges are blurred, and there is no obvious boundary at the edges, the difference between algorithms cannot be seen by comparison. Peak signal-to-noise ratio is usually used to compare the filtering quality. The formula for peak signal-to-noise ratio is as follows:
[0047] Where W and H represent the width and height of the image respectively. h(i,j) represents the pixel value before and after filtering. The peak signal-to-noise ratio of the two is calculated separately, see Figure 4 The larger the PNSR value is, the better the filtering and denoising effect of the image is. By observing the results in the above table, it is found that the filtering algorithm of the present invention is slightly better than the bilateral filtering algorithm introduced, and the effect of filtering and processing noise is also similar.
[0048] Experimental tests show that under the same window, the time required for the filtering algorithm of the present invention is slightly higher than that of the traditional bilateral filtering algorithm, and the PNSR value is slightly higher than that of the bilateral filtering algorithm, which to a certain extent reflects that the edge sharpening is greater, highlighting the edge feature information of the target image, and providing better edge information for the subsequent size measurement process. Therefore, the image filtering algorithm of the present invention has certain advantages in filtering and denoising effect.
[0049] See also Figure 5 The contour of the folding beam obtained in S4 includes edge detection and contour extraction. Sobel edge detection is performed on the folding beam area, and the contour is extracted using a contour extraction function. For the extracted contour, the correct contour is obtained by limiting the length of the contour points; Hough line detection is used for the contour, and the inclination angle of the figure is obtained according to the angle; according to the obtained inclination angle, the contour points are rotated clockwise according to forward mapping; multi-line fast Hough detection is performed on the rotated image, and the size of the structure is calculated according to the properties of the detected straight lines.
[0050] The multi-line fast Hough detection includes comparing the detected lines, and obtaining a final line parameter slope by performing least squares fitting on each group of line points, which not only makes the result more accurate, but also reduces the complexity of line detection and improves detection efficiency.
[0051] The least squares straight line fitting method is to fit multiple points on the straight line. Assuming that the pixel points (x i ,y i ), i = 1, 2, 3...n, use the straight line equation formula to represent these points: y(x) = kx + b, where k is the slope of the line and b is the intercept. The straight line fitting formula using the least squares method is: Calculate the a and b values when P(a,b) is the minimum and determine the slope equation of the straight line parameters.
[0052] See also Figure 6 , is the result of the Hough line detection with multiple straight line problems; see Figure 7, is the result of the multi-line fast Hough detection proposed by the present invention to solve the multi-line problem. Multi-line fast Hough detection is combined with the geometric properties of the MEMS sensor structure, most of which present regular shapes such as triangles and rectangles, which are conducive to line detection. Therefore, the present invention uses the structural properties of the MEMS sensor itself to reduce the occurrence of multiple lines, which will also reduce the complexity of line detection and improve the efficiency and accuracy of line detection.
[0053] When the parameter settings are not appropriate, multiple straight lines will be detected, and the least square method is used for straight line fitting. Most of the geometric structures of MEMS are straight lines, so multiple straight lines with similar slopes can be considered as one straight line, thus avoiding the incorrect impact of many straight lines on the subsequent results. After straight line fitting, each edge is merged into one edge, which solves the problem of multiple straight lines.
[0054] See also Figure 8 The measurement time of the multi-line fast Hough detection algorithm is about 45s, which is more efficient than the Hough line detection algorithm and meets the measurement time requirements, reduces the complexity of detecting other lines, speeds up the efficiency of line detection, and shortens the time.
[0055] A computer-readable storage medium, wherein when the computer instructions are executed by a processor, the steps in the method for identifying and measuring the size of a MEMS gyroscope chip are completed.
[0056] Although the above embodiments have been shown and described, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. Changes, modifications, substitutions and variations of the above embodiments by those of ordinary skill in the art are all within the scope of protection of the present invention.
Claims
1. A method for detecting and measuring the size of a folded beam in a MEMS gyroscope chip, characterized in that: The following steps are involved: S1: Obtain an image of the MEMS gyroscope chip to be tested through an industrial camera; S2: inputting the image into a target detection model to identify the folded beam area; S3: Processing the identified folded beam area by image processing technology; S4: Obtain the outline of the folded beam and measure the size of the folded beam.
2. The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip according to claim 1, characterized in that: The construction of the target detection model in step S2 includes: obtaining an original picture through a process camera and obtaining a picture to be trained by screening the picture; combining the original image set and the picture to be trained into a data set for yolo target detection training; inputting the data set into the yolo target detection network model for learning, performing a large number of rounds of training, and constructing a target detection model that can identify the area of the folded beam in the MEMS gyroscope chip.
3. The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip according to claim 1, characterized in that: The image processing technology in step S3 includes shadow removal and image filtering.
4. The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip according to claim 3, characterized in that: The image filtering process includes using a bilateral filtering algorithm that introduces a compensation function to perform filtering process, and determining whether there is an edge point; if there is an edge point, the influence of the compensation function is added when filtering the window, and the bilateral filtering algorithm formula that introduces the compensation function is: Where e(x,y) is the compensation function, (x,y) is the pixel coordinate of the current processing, (i,j) is the neighboring pixel coordinate of the current (x,y) coordinate in the M(x,y) window, M(x,y) represents the (2n+1,2n+1) window pixel set with (x,y) as the center point, f(i,j) and f(x,y) represent the pixel values at (i,j) and (x,y) in the M(x,y) window; The rule for adding the compensation function is as follows: Calculate the window standard deviation S of each pixel in the window (1,1) , S (2,2) , S (3,3) ...S (i,j) , and get the median S of the window standard deviation set mid , taking the median as the condition for judging the edge, the formula for the window standard deviation is as follows: where f(x, y) avg is the mean value of pixels in the window; (x, y) is the coordinate of the pixel currently being processed, (i, j) is the coordinate of the neighboring pixel of the current (x, y) coordinate in the M(x, y) window, and f(i, j) and f(x, y) represent the pixel values at (i, j) and (x, y) in the M(x, y) window; The window standard deviation S(i, j) is compared with the median S of the standard deviation set mid For comparison, the condition for the existence of edge points in the window is that the window standard deviation S(i, j)>S mid Otherwise, there is no edge point and the compensation function is set to 0.
5. The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip according to claim 1, characterized in that: The contour of the folding beam obtained in S4 includes edge detection and contour extraction. Sobel edge detection is performed on the folding beam area, and the contour is extracted using a contour extraction function. For the extracted contour, the correct contour is obtained by limiting the length of the contour points; Hough line detection is performed on the contour, and the inclination angle of the figure is obtained according to the angle; according to the obtained inclination angle, the contour points are rotated clockwise according to forward mapping; multi-line fast Hough detection is performed on the rotated image, and the size of the structure is calculated according to the properties of the detected straight lines.
6. The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip according to claim 5, characterized in that: The multi-line fast Hough detection includes comparing the detected lines, and obtaining a final line parameter slope by performing least squares fitting on each group of line points, which not only makes the result more accurate, but also reduces the complexity of line detection and improves detection efficiency.
7. The method for detecting and measuring the size of the folded beam in the MEMS gyroscope chip according to claim 6, characterized in that: The least squares straight line fitting method is to fit multiple points on the straight line. Assuming that the pixel points (x i ,y i ), i = 1, 2, 3...n, use the straight line equation formula to represent these points: y(x) = kx + b, where k is the slope of the line and b is the intercept. The straight line fitting formula using the least squares method is: Calculate the a and b values when P(a,b) is the minimum and determine the slope equation of the straight line parameters.
8. A computer-readable storage medium, characterized in that: When the computer instructions are executed by a processor, the steps in the method described in any one of claims 1 to 7 are completed.
