Analysis method for mechanical properties of micro-nano test piece
The keyframes of micro-nano specimens are extracted through template matching and inverted frames, and sub-pixel edge detection is performed, which solves the problems of cumbersome manual operation and low image accuracy in the prior art, and realizes efficient and accurate analysis of mechanical characteristics of micro-nano specimens.
Patent Information
- Application Number
- CN202411914948.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, manual operation is complicated, image blurring leads to a decrease in accuracy, lacks automation and efficiency, and cannot efficiently and accurately extract the mechanical properties of micro-nano specimens.
The micro-displacement area of interest is extracted through the template matching algorithm, and the video image is read frame by frame by frame by frame by frame, preprocessing and linear detection are performed, keyframes are determined, and subpixel edge detection is performed to calculate the mechanical characteristics of the micro-nano specimen.
It significantly improves detection efficiency, reduces labor costs, improves analysis accuracy and efficiency, enhances image edge performance, and improves edge extraction accuracy.
Smart Images

Figure CN120031793A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of semiconductor material performance testing, and specifically relates to a method for analyzing the mechanical properties of a micro-nano specimen. Background Art
[0002] Video key frame extraction technology refers to the use of a specific method to extract certain required image frames from all frame sequences. It is the basis of video summarization and video content retrieval, and is one of the key technologies in video processing. It greatly reduces the workload of computer processing video data, and also improves the efficiency of people quickly finding the required content and information from a large amount of video data. Video key frame extraction technology has attracted the attention of a large number of researchers at home and abroad. After continuous development and research, this technology has achieved certain results.
[0003] Template matching is a basic and classic target detection method. Template matching is not restricted by the environment. With its concise, efficient, robust and stable algorithm, it is the preferred target detection method in general scenarios. Template matching has a wide range of applications in the industrial field. For example, the position information of parts and chips is obtained by industrial cameras and template matching algorithms, and then transmitted to the motion control module of a six-axis robot to achieve automatic adjustment of the robot's position. However, template matching still faces computational efficiency issues when processing large-size images. In particular, the processing of high-resolution images may take a long time, and is easily affected by lighting changes and noise, and lacks understanding of the target's semantic information.
[0004] Nowadays, image measurement technology is used in modern industrial scenarios such as dimension measurement, displacement monitoring, defect detection, target identification and tracking. By recording, counting and analyzing key values in production to analyze and calculate object performance, the function of intelligent detection yield is realized. With the development of the semiconductor manufacturing industry, micro-nanoscale device and chip manufacturing have brought new challenges to dimension measurement and displacement monitoring. Traditional manual measurement methods are no longer applicable due to low accuracy, low efficiency and high cost. Image measurement technology has become an important detection method in modern industry with its advantages such as non-contact and high precision. However, sub-micron feature size measurement technology based on computer vision still faces the problem of low accuracy.
[0005] In order to improve the measurement accuracy, sub-pixel edge detection methods have been proposed. These methods achieve sub-pixel edge positioning by breaking through the limitations of the physical resolution of the camera, thereby significantly improving the detection accuracy of the image measurement system. When the accuracy of the algorithm is 0.1 pixel, it is equivalent to the hardware resolution of the detection system being increased by 10 times, further improving the measurement accuracy. There are three main methods for sub-pixel edge extraction: moment method, interpolation method and fitting method. The moment method infers the actual edge position through the grayscale moment characteristics of the image. The calculation is simple but susceptible to noise interference. The interpolation method interpolates the grayscale value or derivative of the pixel point to complete the detection of the sub-pixel edge. The algorithm complexity is low, but it is also easily affected by noise. The fitting method is based on the assumed edge model and uses polynomial fitting to achieve high-accuracy sub-pixel positioning, but the calculation complexity is high.
[0006] In summary, the main problems currently exist are: (1) cumbersome manual operation: the current calculation method relies on manual selection of key frames from the test video and manual reading of micro-displacement, which is a complex and inefficient process. (2) Image blur leads to reduced accuracy: because the key frame image may be blurred, the visual reading accuracy of micro-displacement is low, which affects the accurate calculation of mechanical properties. (3) Lack of automation and efficiency: the current method lacks automated processing means and cannot efficiently and accurately extract the mechanical properties of micro-nano specimens, resulting in a waste of time and energy. Summary of the invention
[0007] The purpose of the present invention is to provide an efficient method for analyzing the mechanical properties of micro-nano specimens, which solves the problems of cumbersome manual operation and low image accuracy in existing methods by automatically extracting key frames and accurately measuring micro-displacement, thereby improving the accuracy and efficiency of the analysis.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] A method for analyzing mechanical properties of a micro-nano specimen comprises the following steps:
[0010] S1: Read the image from the test video of the chip test machine and extract the micro-displacement area of interest in the image through the template matching algorithm;
[0011] S2: Read the video image frame by frame using the inverted frame method, pre-process and detect the line of interest of the micro-displacement of each frame, calculate the relative distance between the lines and determine the key frame;
[0012] S3: Enlarge the micro-displacement region of interest of the key frame image, and then perform edge-preserving detail enhancement processing, filter out weak edges and retain strong edges, and eliminate noise near strong edges;
[0013] S4: Perform sub-pixel edge detection on the image processed in step S3, extract and connect edge points;
[0014] S5: measuring the distance to be measured in the image outputted from step S4, and inputting the measured distance value into the mechanical property formula to calculate the mechanical properties of the micro-nano specimen.
[0015] Furthermore, in step S1, the template matching algorithm adopts the deformation diversity similarity matching algorithm DDIS, and the step of extracting the micro-displacement region of interest includes:
[0016] Define the template frame point set P and the target frame point set Q, which represent the areas to be matched in the template image and the test image respectively;
[0017] For each point q in the target box j , find the point in the template frame that matches q j The point p that looks most similar i , calculate the appearance distance;
[0018] Calculate each target box point q j The corresponding template frame point p i The distance between the positions r j ;
[0019] According to the appearance distance and position distance, calculate each point q j Contribution to DDIS similarity;
[0020] By calculating all points q in the target box j The contributions of are summed up to get the DDIS similarity score, and the position with the highest score is the position of the micro-displacement region of interest.
[0021] Furthermore, the step of preprocessing the micro-displacement region of interest of each frame of image in step S2 includes:
[0022] Perform contrast enhancement on the image based on standard deviation and then convert the image into a grayscale image;
[0023] Use adaptive Wiener filter denoising to reduce the noise in the image while retaining the details and edge information of the image;
[0024] Calculate the foreground segmentation threshold of the grayscale image to separate the foreground and background of the image;
[0025] The micro-displacement region of interest in the grayscale image is binarized to separate the target area from the background.
[0026] Furthermore, in step S2, the foreground and background are separated by a Shannon and Tsallis hybrid entropy method, and the steps include:
[0027] Calculate the probability distribution of each grayscale value in the grayscale image and obtain the probability distribution of grayscale values in the range of [0,255];
[0028] Use Shannon entropy to calculate the global threshold, and find the best segmentation point by maximizing the Shannon entropy of the foreground and background to divide the image into foreground and background;
[0029] The Tsallis entropy method is used to calculate the local threshold of the foreground, and the segmentation of the foreground and background is further refined by optimizing the Tsallis entropy formula.
[0030] Furthermore, in step S2, Canny edge detection and Hough transform are used to perform line detection, and the steps include:
[0031] Perform Canny edge detection on the binary image, smooth the image through Gaussian filtering, calculate the horizontal and vertical gradients of the image, and use the Sobel operator to obtain the gradient amplitude and direction of the image; then perform non-maximum suppression on the image to remove non-local maxima and only retain the maximum gradient value of each edge pixel; use the double threshold method to locate the edge points, extract the edges in the image, and obtain the final edge detection result;
[0032] The processed image is subjected to line detection through Hough transform, the straight lines in the image are converted into polar coordinate system, and the frequency of occurrence of the straight lines is recorded through an accumulator; the parameters representing the straight lines in the image are extracted according to the values in the accumulator, and the parameters are converted back to the original image coordinate system to obtain the detected straight lines.
[0033] Furthermore, the step of calculating the relative distance between straight lines and determining the key frames in step S2 includes:
[0034] According to the detected straight line parameters, the straight lines are sorted in the X direction and the midpoint value of each straight line is calculated;
[0035] Record the distance between the midpoints of the straight lines in each frame;
[0036] Perform differential operation on the distance value to find the frame number with the largest displacement change. The image corresponding to this frame number is the key frame.
[0037] Furthermore, in step S3, a weight-guided filter is used to perform edge-preserving detail enhancement processing, and the steps include:
[0038] Establishing a local linear relationship between the guide image and the filtered output image to solve the linear constant parameter in the local window;
[0039] Define a cost function and solve the linear parameters in the local window by minimizing the cost function. At the same time, introduce a regularization coefficient to control the size of the coefficient to avoid overfitting.
[0040] The local variance information of the guidance image is used to adjust the regularization coefficient. By calculating the local variance of the guidance image, different weights are assigned to each pixel. The edge area is given a smaller weight, and the flat area is given a larger weight to reduce the artifact impact of the edge area.
[0041] Furthermore, in step S3, an edge-preserving filter is used to filter the image to remove weak edges and retain strong edges. The steps include:
[0042] Given an input image and a guide image, the output image is smoothed by minimizing an objective function, which includes a data term and a smoothing term. The data term is responsible for minimizing the difference between the input image and the smoothed image, and the smoothing term constrains the difference between adjacent pixels.
[0043] In the data term, the difference between the input image and the smoothed image is calculated through a local area, and these differences are penalized by a truncated Huber penalty function to ensure the smoothness of the image;
[0044] In the smoothing term, by calculating the difference between adjacent pixels in the guidance image, smoothing is achieved in the flat areas of the image while maintaining details in the edge areas;
[0045] Preserve edge details and remove unnecessary noise by adjusting the parameters that control the smoothing intensity;
[0046] The guidance weights are used to control the influence of the data term and the smoothing term, so that details are effectively preserved in the edge area while avoiding halo artifacts.
[0047] Furthermore, in step S3, a fast bilateral filter is used to perform smoothing filtering on the image to eliminate noise near strong edges. The steps include:
[0048] Set the grayscale value of each pixel and calculate the weighted average of the neighboring pixels of each pixel through bilateral filtering;
[0049] Calculate the contribution of each neighboring pixel to the current pixel, weight it by combining the spatial and grayscale similarities, and get the new value after filtering;
[0050] Normalize each pixel to ensure that the weighted sum of all neighboring pixels to the target pixel is 1;
[0051] Adjust the smoothing effect of the filter by selecting the distance standard deviation and grayscale standard deviation.
[0052] Furthermore, in step S4, the improved Canny algorithm is used to perform sub-pixel edge detection on the image, and the steps include:
[0053] Use the first-order differential operator to calculate the gradient value of each pixel in the image and obtain the magnitude of the gradient;
[0054] Perform non-maximum suppression and determine the position of edge points by comparing the gradient values of each pixel in the horizontal and vertical directions;
[0055] The improved Deverney sub-pixel correction algorithm is used to fine-tune the edge points, and the sub-pixel coordinates of each edge point are calculated by quadratic curve interpolation;
[0056] Connect each independently calculated edge point according to its relative position to form a continuous edge curve;
[0057] The edge is further processed by the double threshold algorithm based on gradient variance, the final boundary is determined by hysteresis double threshold tracking, and weak edge points are removed;
[0058] Perform edge chain filtering, calculate the length of the edge chain and the average gradient amplitude, and set a threshold to filter out erroneous edge chains.
[0059] The beneficial effects achieved by the present invention are as follows:
[0060] 1) The present invention effectively locates the micro-displacement area of interest through the template matching algorithm, and combines the straight line detection and tracking algorithm to accurately and quickly detect the key frames in the micro-nano structure motion video, which significantly improves the detection efficiency and reduces the labor cost.
[0061] 2) The present invention adopts weight-guided filtering and introduces edge-aware weights into the guided filter, which can effectively retain image details during the processing, especially in the edge area, has wide practicality and enhances the performance of image edges.
[0062] 3) The present invention adopts an edge-preserving filter to effectively eliminate artifacts, gradient inversion and halos during the image smoothing process, especially to filter out weak edges while retaining stronger edges, thereby improving the quality of the processed image.
[0063] 4) The present invention adopts fast bilateral filtering, which significantly improves the filtering speed and effectively removes noise while retaining strong edges, thereby more accurately extracting strong edges in the image and improving the accuracy of edge extraction.
[0064] 5) The present invention introduces the Deverney sub-pixel correction algorithm, the dual threshold algorithm based on gradient variance and the edge chain filtering algorithm into the Canny edge detection model, which further improves the sub-pixel edge detection effect and edge positioning accuracy, and effectively extracts the edges of interest. Compared with the existing technology, the improved sub-pixel edge detection model has a higher sub-pixel edge extraction capability and significantly improves the accuracy of edge detection.
[0065] 6) The present invention designs an interactive measurement system, which interactively measures the displacement distance of the microstructure. Compared with the traditional manual measurement method, the resolution of the displacement reading is improved by three orders of magnitude, which greatly improves the accuracy of the calculation results of the mechanical properties of the micron-level structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 Flow chart of the method for analyzing the mechanical properties of micro-nano specimens in the embodiment.
[0067] Figure 2 The flowchart of video key frame extraction in the embodiment is shown in FIG.
[0068] Figure 3 A flow chart of a threshold algorithm based on Shannon and Tsallis hybrid entropy in an embodiment
[0069] Figure 4 The figure is a comparison chart of the results of the method of the present invention and the existing sub-pixel edge detection algorithm. DETAILED DESCRIPTION
[0070] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0071] This embodiment provides a method for analyzing the mechanical properties of micro-nano specimens, which is used to locate the micro-displacement region of interest (ROI) of micro-nano specimens manufactured by MEMS process, extract key frames from the test video using the positioning information, perform sub-pixel edge detection on the ROI region in the key frame to obtain key data, and finally calculate the mechanical properties of the micro-nano specimen based on the obtained data. Figure 1 , which comprises the following steps:
[0072] S1: Get the micro-displacement region of interest:
[0073] Collect and read the test video of the on-chip test machine, obtain the initial frame, and obtain the ROI area position through the template matching algorithm;
[0074] The template matching algorithm in this embodiment specifically adopts the deformation diversity similarity matching algorithm DDIS, and the position coordinates of the ROI area are calculated using the DDIS algorithm, but it is not limited to this algorithm. The DDIS algorithm is a new template matching metric method that relies on local appearance and geometric information. It is robust to background clutter, target deformation and occlusion. The matching accuracy is at the pixel level and the calculation speed is fast.
[0075] The goal of DDIS is to measure the template point set and target frame point set The similarity of i is the point in the i-th template, N is the total number of template points, q j The point within the jth target, M is the total number of target points; p t ,q g ∈R d , R is the set of template points and target points, d is the dimension. The symbol a represents appearance, and the symbol l represents position. Let p a Represents the appearance attributes of point p, p l Represents the position attribute of point p (same definition for point q in the target box).
[0076] For any point q in the target box j ∈Q, the nearest neighbor of its appearance model is defined as:
[0077]
[0078] Where d(p a ,q a ) is the distance function of the two appearance models, i.e., the appearance distance, such as the Euclidean distance. This formula represents the point p in the template box. i is the point q in the target box j The nearest neighbor on the appearance attribute, NN a . Because point p in the template box i It may be the nearest neighbor of multiple points in the target box, so we define κ(p i ) is the nearest neighbor in the target box is p i The total number of points, that is:
[0079] κ(p i )=|{q∈Q|NN a (q,P)=p i}∣
[0080] In addition, define q i With p i =NN a (q j ,P) is located within the frame at a distance of The larger the distance, the more i to q j The greater the deformation degree. After defining the appearance distance and position distance respectively, the analytical form of DDIS is finally obtained:
[0081]
[0082] Where c = 1 / min{M,N} is the regularization term, and M = N when the target box and the template box are the same size. The above formula can be regarded as the regularization term for all pixels q in the target box. j The sum of the contributions of . In particular, when q j When the nearest neighbor of is unique, that is, κ(NN a (q j ,P))=1, the exponential term reaches the maximum value of 1. When q j NN n When shared by other pointsκ(NN a (q j ,P))>1, then the exponential term is small, q j The contribution of q is also small. j With its NN a The larger the spatial distance of j The larger the value, the smaller its contribution. The template image is located at the target image position where DDIS has the maximum score.
[0083] S2: Video key frame extraction:
[0084] The inverted frame method is used to read the video images frame by frame, and the ROI area of each image is preprocessed. Then, straight line detection and tracking are performed, and the relative distance between straight lines is calculated. The relative distance obtained is differentiated, and the moment T when the distance mutation is the largest is calculated and the key frame image at moment T is extracted. Then, the ROI area in the key frame image is extracted and enlarged.
[0085] Reference Figure 2 ,The specific process of key frame extraction is:
[0086] S2-1: Perform image contrast stretching based on standard deviation on the read RGB image to enhance the contrast of the image; then perform grayscale processing; then perform adaptive Wiener filtering on the grayscale image to remove or reduce noise in the image and improve the clarity of the image while retaining important details and edges.
[0087] The contrast enhancement process based on standard deviation is as follows:
[0088] 1) Image average calculation:
[0089]
[0090] 2) Standard deviation calculation:
[0091]
[0092] 3) Perform contrast stretching on the image:
[0093]
[0094] Where M and N are the height and width of the image respectively. min ,new max ]=[0,255], I(x,y) represents the grayscale value of the output image at the point (x,y) and O(x,y) represents the grayscale value of the output image at the point (x,y).
[0095] In this embodiment, the process of using 4×4 local adaptive Wiener filtering is as follows:
[0096] For an image, the local mean around each pixel is calculated in an m×n local window: and local variance and the noise variance estimate Finally, the filter function Filter the image to remove noise.
[0097] S2-2: The grayscale image foreground segmentation threshold T is calculated based on the threshold algorithm of Shannon and Tsallis mixed entropy.
[0098] Reference Figure 3 , the specific process of calculating the threshold is as follows:
[0099] 1) Read the grayscale image and calculate the probability distribution p of the grayscale value in each interval [0,255] in the grayscale image 0 ~p 255
[0100] 2) Use Shannon entropy (formula) to find the global threshold (T0). The image can be divided into two parts, foreground and background, by T0.
[0101] t * (1) = Argmax t∈G [S A (t)+S B (t)]
[0102] Where S A (t),S B (t) are the Shannon entropies of foreground and background respectively.
[0103] 3) Calculate the local threshold T of the foreground using the following Tsallis entropy formula:
[0104]
[0105] where p A (t),p B (t) are the probabilities of category one and category two respectively.
[0106] S2-3: Binarize and segment the ROI area image in the grayscale image.
[0107] S2-4: Perform Canny edge detection and Hough transform line detection on the ROI area, select two edge lines, calculate the midpoints and midpoint distances of the lines, and calculate the changes in the midpoint distances of the lines frame by frame.
[0108] The specific method of straight line detection is:
[0109] 1) Perform Canny edge detection on the image output from step S2-3: Perform Gaussian filtering on the image and use the horizontal gradient template of the Sobel operator and vertical gradient template Calculate the horizontal and vertical amplitude G of the image x and G y , calculate the gradient amplitude and the gradient direction It traverses all gradient amplitudes and directions in the image, performs non-maximum suppression to remove all non-local maxima, retains the maximum value of the gradient intensity on each edge pixel, and finally locates the edge points of the image through the double threshold method to generate the extracted image.
[0110] 2) Extract line segments through Hough transform: The basic idea of Hough transform is to use the duality principle between points and lines in image space and parameter space to transform the straight lines in the image into polar coordinates. For any point (x, y) on the plane, the expression of the straight line set passing through the point in the polar coordinate system ρ-θ is: ρ=xcosθ+ysinθ. Connecting the points (ρ, θ) results in a sine curve. The straight line extraction process is as follows:
[0111] a: Discretization of polar coordinates. In Hough transform, polar coordinates are usually used to represent straight lines. In polar coordinates, a straight line can be represented by two parameters, polar diameter ρ and polar angle θ. The continuous values of the two parameters are converted into discrete values to form a discrete (ρ, θ) grid.
[0112] b: Hough transform mapping. Based on the point coordinates (x, y) and the angle θ, find the line ρ = xcosθ + ysinθ.
[0113] c: Application of accumulator and threshold setting. In the polar coordinate system, an accumulator is constructed for each discrete (ρ, θ) square to record the number of pixels in the square, perform statistics, and set an accumulator threshold. Only when the number of pixels in a square exceeds the threshold, the square represents a straight line in the image;
[0114] d: Extraction and output of line parameters. According to the squares in the accumulator that exceed the threshold, the corresponding (ρ, θ) values are extracted. These values represent the parameters of the line detected in the image. The line parameters in the polar coordinate system are converted back to the original image coordinate system, and the relevant parameters of the line in the image space are output.
[0115] S2-5: According to the detected straight line parameters, the straight lines are sorted in the X direction, the midpoint value of each straight line is calculated, and the distance value D between the midpoints is recorded. i , where i represents the i-th frame. According to the recorded {D i ..D k}, perform differential operation on it, calculate the frame with the largest displacement change, and the image corresponding to this frame is the key frame.
[0116] S3: Image enhancement and denoising:
[0117] The ROI region in the key frame image is extracted and enlarged by bicubic interpolation. The weight-guided filter is used to enhance the edge details of the enlarged ROI region image, and then the edge-preserving filter is used to filter the image to remove weak edges and retain strong edges. Finally, the fast bilateral filter is used to smooth the image and eliminate the noise near the strong edges.
[0118] For weight-guided filtering, the specific processing process is as follows:
[0119] By guiding the local linear constraint relationship between the image I and the filtered output image q, a model is established and the relevant parameters are solved. The linear relationship is:
[0120] q i =a k I i +b k ,
[0121] where w k is a square window with radius r, and assume that (a k ,b k ) is in the local window w k The linear constant coefficient is set in .
[0122] To determine (a k ,b k ), in window w k Minimize the following cost function, namely:
[0123]
[0124] Where p is the input image, λ is the value to prevent a k Too large regularization coefficient.
[0125] In order to avoid halo artifacts in the output image, the guide image is used to k The variance information in constantly changes the regularization coefficient and defines the edge-aware weight, i.e.
[0126]
[0127] in is the variance of the 3×3 window of the guidance image; N is the total number of pixels of the guidance image; ε is a small constant whose value is (0.001×L) 2 , L is the dynamic range of the input image. I All pixels in the guidance image I are used in the calculation of (p′). Using edge weights, pixels at the edge are assigned greater weights than pixels in flat areas, and the regularization coefficient at the edge is correspondingly smaller, which can amplify all fine details in the input image, but this also amplifies the noise.
[0128] For the edge-preserving filter, the specific process is as follows:
[0129] Given an input image f and a guidance image g, the smoothed output image u is the solution that gives the minimum of the following objective function:
[0130]
[0131] where h T is the truncated Huber penalty function N d is centered on i (2r d +1)×(2r d +1) size square area; N s (i) is centered on i (2r s +1)×(2r s +1) excluding pixel i; λ is a parameter that controls the overall smoothing strength. Different smoothing behaviors can be achieved under different parameter settings, thus completing various tasks that require different smoothing properties. The first term u in the above formula is i is called the data term, and the second term f j is called the smoothing term. For clarity, we use {a d ,b d} and {a s ,b s} to represent h T The data term in (·) and the parameters in the smoothing term. Gaussian spatial kernel Defined as:
[0132]
[0133] In all experiments, the data term is simply fixed to σ = r d , fix the smoothing term to σ = r s . Guide weights Defined as:
[0134]
[0135] Where α determines the sensitivity to the edge of g that can be used as the input image, that is, g = f. |·| represents the absolute value. δ is a small constant, set to δ = 10 -3 . Using h T (·) makes the model E u (u) It has strong flexibility. Under different parameter settings, different smoothing behaviors can be achieved, so that various tasks requiring different smoothing properties can be completed. In this task, the above parameters are set to a mode of strong edge preservation and weak edge removal.
[0136] For the fast bilateral filter, the specific process is as follows:
[0137] Assume that the gray value of image I at coordinate point p = (x, y) is I p The gray value of the filtered image BI at the coordinate point p is defined as BI p , the formula of bilateral filtering is as follows.
[0138]
[0139]
[0140] In the above formula, q = (u, v) is the neighborhood pixel of the center pixel p, and the neighborhood pixel set is S, W p is the weight value of each pixel value in the filter window, which is used for weight normalization. is the spatial proximity factor, is the grayscale similarity factor. Their expressions are given by the following formula,
[0141]
[0142]
[0143] where σ s is the distance standard deviation based on the Gaussian function, σ r It is the grayscale standard deviation based on the Gaussian function. The two control the radial range of the spatial domain filter kernel function and the grayscale filter kernel function respectively. Both are optional and variable parameters that directly determine the performance of the bilateral filter. Therefore, the above parameters should be set reasonably to achieve image denoising and edge sharpening enhancement processing.
[0144] S4: Sub-pixel edge extraction:
[0145] The image outputted in step S3 is subjected to sub-pixel edge detection using the improved Canny algorithm, and edge points are drawn on the image and connected into curves.
[0146] The specific process of sub-pixel edge detection is as follows:
[0147] S4-1: Use the first-order differential operator to calculate the gradient value g of each pixel (x, y) in the image x ,g y and the gradient magnitude G.
[0148] S4-2: Non-maximum suppression, calculate edge points:
[0149] When a pixel (x, y) is the local maximum of the gradient modulus in the horizontal direction, and the derivative value in the horizontal direction is greater than that in the vertical direction, that is,
[0150]
[0151] The point is then determined to be a horizontal edge point, and the same applies to vertical edge points.
[0152] S4-3: Calculate edge points using the improved Deverney sub-pixel correction algorithm. In order to find the offset of the edge point and calculate the sub-pixel coordinates, the Devernay operator performs quadratic curve interpolation between the same edge points in three adjacent gradient directions to calculate the displacement compensation value η. The specific calculation is as follows:
[0153]
[0154] Among them, ||G(A)||,||G(B)||,||G(C)|| represent the gradient amplitudes of edge points A, B, and C respectively.
[0155] S4-4: Connect edge points. Since each edge point is calculated independently of other edge points, points belonging to the same edge need to be connected to form a curve corresponding to the image contour. Therefore, the pixel edge points with the closest distance need to be connected to form a link.
[0156] S4-5: The double threshold algorithm based on gradient variance calculates the threshold, tracks the boundary through the hysteresis double threshold, and removes weak edge points from the linked edge points.
[0157] S4-6: Edge chain filtering. For edge chains, calculate their length edge l and the average of the local gradient magnitudes Average edge length of edge chain and the average gradient As the threshold for filtering the error edge chain. Two control factors k are introduced 1 and k 1 To adjust the threshold and filter out erroneous edge chains.
[0158] The final edge detection result is as follows: Figure 4 In order to verify the actual effect of sub-pixel edge detection in the scheme of the present invention, the scheme of the present invention is compared with the existing PAE, Canny-d and Zernike algorithms in this embodiment. It can be seen that the improved algorithm of the present invention has better image edge detection ability, the detected edge is thinner, and the edge positioning accuracy is relatively high.
[0159] S5: Distance measurement and calculation of the mechanical properties of the specimen:
[0160] In the interactive interface, for the result graph output from step S4, use interactive operations to measure the distance to be measured, and substitute the distance value into the mechanical property formula of the specimen to calculate the mechanical properties of the specimen and evaluate the MEMS process conditions.
[0161] The above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. All equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for analyzing the mechanical properties of micro-nano specimens, characterized in that: The steps include: S1: Read the image from the test video of the chip test machine and extract the micro-displacement area of interest in the image through the template matching algorithm; S2: Read the video image frame by frame using the inverted frame method, pre-process and detect the line of interest of the micro-displacement of each frame, calculate the relative distance between the lines and determine the key frame; S3: Enlarge the micro-displacement region of interest of the key frame image, and then perform edge-preserving detail enhancement processing, filter out weak edges and retain strong edges, and eliminate noise near strong edges; S4: Perform sub-pixel edge detection on the image processed in step S3, extract and connect edge points; S5: measuring the distance to be measured in the image outputted from step S4, and inputting the measured distance value into the mechanical property formula to calculate the mechanical properties of the micro-nano specimen.
2. The method according to claim 1, characterized in that In step S1, the template matching algorithm adopts the deformation diversity similarity matching algorithm DDIS, and the steps of extracting the micro-displacement region of interest include: Define the template frame point set P and the target frame point set Q, which represent the areas to be matched in the template image and the test image respectively; For each point q in the target box j , find the point in the template frame that matches q j The point p that looks most similar i , calculate the appearance distance; Calculate each target box point q j The corresponding template frame point p i The distance between the positions r j ; According to the appearance distance and position distance, calculate each point q j Contribution to DDIS similarity; By calculating all points q in the target box j The contributions of are summed up to get the DDIS similarity score, and the position with the highest score is the position of the micro-displacement region of interest.
3. The method according to claim 1, characterized in that The step of preprocessing the micro-displacement region of interest of each frame image in step S2 includes: Perform contrast enhancement on the image based on standard deviation and then convert the image into a grayscale image; Use adaptive Wiener filter denoising to reduce the noise in the image while retaining the details and edge information of the image; Calculate the foreground segmentation threshold of the grayscale image to separate the foreground and background of the image; The micro-displacement region of interest in the grayscale image is binarized to separate the target area from the background.
4. The method according to claim 3, characterized in that In step S2, the foreground and background are separated by the Shannon and Tsallis mixed entropy method, and the steps include: Calculate the probability distribution of each grayscale value in the grayscale image and obtain the probability distribution of grayscale values in the range of [0,255]; Use Shannon entropy to calculate the global threshold, and find the best segmentation point by maximizing the Shannon entropy of the foreground and background to divide the image into foreground and background; The Tsallis entropy method is used to calculate the local threshold of the foreground, and the segmentation of the foreground and background is further refined by optimizing the Tsallis entropy formula.
5. The method according to claim 3, characterized in that In step S2, Canny edge detection and Hough transform are used to perform line detection, and the steps include: Perform Canny edge detection on the binary image, smooth the image through Gaussian filtering, calculate the horizontal and vertical gradients of the image, and use the Sobel operator to obtain the gradient amplitude and direction of the image; then perform non-maximum suppression on the image to remove non-local maxima and only retain the maximum gradient value of each edge pixel; use the double threshold method to locate the edge points, extract the edges in the image, and obtain the final edge detection result; The processed image is subjected to line detection through Hough transform, the straight lines in the image are converted into polar coordinate system, and the frequency of occurrence of the straight lines is recorded through an accumulator; the parameters representing the straight lines in the image are extracted according to the values in the accumulator, and the parameters are converted back to the original image coordinate system to obtain the detected straight lines.
6. The method according to claim 1 or 5, characterized in that The step of calculating the relative distance between straight lines and determining the key frames in step S2 includes: According to the detected straight line parameters, the straight lines are sorted in the X direction and the midpoint value of each straight line is calculated; Record the distance between the midpoints of the straight lines in each frame; Perform differential operation on the distance value to find the frame number with the largest displacement change. The image corresponding to this frame number is the key frame.
7. The method according to claim 1, characterized in that In step S3, a weight-guided filter is used to perform edge-preserving detail enhancement processing, and the steps include: Establishing a local linear relationship between the guide image and the filtered output image to solve the linear constant parameter in the local window; Define a cost function and solve the linear parameters in the local window by minimizing the cost function. At the same time, introduce a regularization coefficient to control the size of the coefficient to avoid overfitting. The local variance information of the guidance image is used to adjust the regularization coefficient. By calculating the local variance of the guidance image, different weights are assigned to each pixel. The edge area is given a smaller weight, and the flat area is given a larger weight to reduce the artifact impact of the edge area.
8. The method according to claim 1, characterized in that In step S3, an edge-preserving filter is used to filter the image to remove weak edges and retain strong edges. The steps include: Given an input image and a guide image, the output image is smoothed by minimizing an objective function, which includes a data term and a smoothing term. The data term is responsible for minimizing the difference between the input image and the smoothed image, and the smoothing term constrains the difference between adjacent pixels. In the data term, the difference between the input image and the smoothed image is calculated through a local area, and these differences are penalized by a truncated Huber penalty function to ensure the smoothness of the image; In the smoothing term, by calculating the difference between adjacent pixels in the guidance image, smoothing is achieved in the flat areas of the image while maintaining details in the edge areas; Preserve edge details and remove unnecessary noise by adjusting the parameters that control the smoothing intensity; The guidance weights are used to control the influence of the data term and the smoothing term, so that details are effectively preserved in the edge area while avoiding halo artifacts.
9. The method according to claim 1, characterized in that In step S3, a fast bilateral filter is used to perform smoothing filtering on the image to eliminate noise near strong edges. The steps include: Set the grayscale value of each pixel and calculate the weighted average of the neighboring pixels of each pixel through bilateral filtering; Calculate the contribution of each neighboring pixel to the current pixel, weight it by combining the spatial and grayscale similarities, and get the new value after filtering; Normalize each pixel to ensure that the weighted sum of all neighboring pixels to the target pixel is 1; Adjust the smoothing effect of the filter by selecting the distance standard deviation and grayscale standard deviation.
10. The method according to claim 1, characterized in that In step S4, the improved Canny algorithm is used to perform sub-pixel edge detection on the image, and the steps include: Use the first-order differential operator to calculate the gradient value of each pixel in the image and obtain the magnitude of the gradient; Perform non-maximum suppression and determine the position of edge points by comparing the gradient values of each pixel in the horizontal and vertical directions; The improved Deverney sub-pixel correction algorithm is used to fine-tune the edge points, and the sub-pixel coordinates of each edge point are calculated by quadratic curve interpolation; Connect each independently calculated edge point according to its relative position to form a continuous edge curve; The edge is further processed by the double threshold algorithm based on gradient variance, the final boundary is determined by hysteresis double threshold tracking, and weak edge points are removed; Perform edge chain filtering, calculate the length of the edge chain and the average gradient amplitude, and set a threshold to filter out erroneous edge chains.
Citation Information
Patent Citations
Key frame detection method and device and online detection system
CN111739045A
Automated application of drift correction to sample studied under electron microscope
CN114041200A
Nanomechanical testing system
US20130319071A1