Method for detecting gradient of pressure head and sample of nanoindenter
Through image acquisition and processing technology, the inclination between the indenter head and the sample of the nano-indenter head is detected, which solves the test error and morphological asymmetry caused by the inclination of the indenter head and the sample in the nano-indentation test, and improves the accuracy of the test.
Patent Information
- Application Number
- CN202411447451.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-25
AI Technical Summary
During nanoindentation testing, the inclination between the indenter and the surface of the test piece results in test errors and indentation morphology asymmetry.
The image acquisition device collects the top and frontal projections of the indenter base formed under the parallel light source, performs image preprocessing and Hough transformation detection, and calculates the inclination between the indenter and the stage.
Effectively detect and correct the inclination between the indenter and the specimen, and improve the accuracy and reliability of nano-indentation testing.
Smart Images

Figure CN119509412A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of nano indentation testing, and in particular to a method for detecting the inclination of a nano indenter head and a sample. Background Art
[0002] The indentation test instrument is a complex instrument with multiple functions, so there are many potential factors that cause the indenter to tilt with the specimen surface, which in turn leads to test errors. An indentation instrument mainly includes a positioning platform, an axis positioning platform, an indenter mounting unit, and other auxiliary measurement and transition components. Processing and assembly errors during the processing and assembly process are potential factors for the indenter to tilt with the specimen surface. These include: the indenter mounting unit is not vertical, the axis positioning platform is not installed vertically, the specimen is not prepared or installed flat, etc. These factors will eventually lead to the indenter and the specimen surface tilt.
[0003] During the nanoindentation test, asymmetric indentation morphology often occurs. These asymmetric morphologies are largely caused by the non-perpendicularity between the indenter and the specimen. Therefore, the non-perpendicularity may have a certain impact on the results. Summary of the invention
[0004] In view of the defects existing in the prior art, the purpose of the present invention is to provide a method for detecting the inclination of the indenter head and the sample of a nanoindenter, so as to solve the inclination between the indenter head and the specimen surface existing in the prior art, and the asymmetric indentation morphology occurring during the nanoindentation test.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The present invention provides a method for detecting the inclination of a nanoindenter indenter and a sample, comprising the following steps: step S1, collecting a top view projection and a front view projection of an indenter base formed under a parallel light source by using an image acquisition device; step S2, preprocessing the image, using Opencv to convert the image into a grayscale image, performing image binarization, image bilateral filtering, and image sequential grid super sampling; step S3, using Hough transform to detect a rectangular part in the front view projection after image preprocessing; step S4, obtaining the areas of the rectangular parts of the top view projection and the front view projection, and calculating the inclination between the indenter and the stage according to the areas.
[0007] Preferably, the multifunctional stage for a nanoindenter comprises the following structures: a parallel light source generating device, an indenter base, an indenter, and a stage.
[0008] The pressure head is glued to the pressure head base;
[0009] The pressure head base is screwed together with the parallel light source generating device.
[0010] Preferably, the parallel light source generating device comprises a focusing chamber, an LED lamp bead, a light guide tube, a shell, a large single-sided concave lens, a large convex lens, a refracting mirror, a light-transmitting glass, a first spherical lens, and a second spherical lens; the focusing chamber is screwed together with the LED lamp bead; the light guide tube is installed at a small hole on the thin wall of the focusing chamber facing the LED lamp bead; the shell and the focusing chamber are welded together; the large single-sided concave lens and the large convex lens are glued to the groove on the outer inner wall of the shell; the refracting mirror is glued to the groove on the inner wall of the vertical part of the shell and forms an angle of 45° with the horizontal plane; the light-transmitting glass is concentrically glued to the bottom of the vertical part of the shell; the first spherical lens and the second spherical lens are glued to the groove on the inner wall of the inner side of the shell.
[0011] Preferably, step S1 specifically includes:
[0012] Step S10: turning on the parallel light source generating device, so that the parallel light generated by the device passes through the light-transmitting glass to project the top-view inclined shadow of the indenter base onto the stage;
[0013] Step S11: Create a beam of parallel light from the outside and directly illuminate the indenter base; project the inclined shadow of its front side onto the backlight plate.
[0014] Preferably, step S2 specifically includes:
[0015] Step S20 converts the acquired image into a grayscale image. The collected image is converted into a grayscale image by using the cv2.cvtColor function and specifying the cv2.COLOR_BGR2GRAY conversion code;
[0016] Step S21 converts the grayscale image into a binary image, converting each pixel in the image into two values, 0 and 255 respectively;
[0017] Step S22 performs bilateral filtering on the binary image, processing the spatial kernel and the range kernel of the input image;
[0018] Step S23 performs sequential grid super sampling on the processed image, by pre-enlarging the image and mapping it to a cache, and then using super sampling to sample the enlarged image pixels to generate smooth edges.
[0019] Preferably, step S3 specifically includes:
[0020] Step S30 uses a custom Hough transform function to find ρ and θ in the image that can form a straight line, including setting the accuracy parameters of the detection distance and angle, setting the number of passing points that will be identified as a straight line, specifying the parameters of the adjacent distances to retain a single straight line, and specifying the value of the pixel that will be identified as an edge;
[0021] Step S31 creates the horizontal axis theta of the Hough space, creates the vertical axis rho of the Hough space, creates an empty Hough space coordinate system, fills the edge pixels in the image into the Hough space coordinate system, and filters the obtained lines;
[0022] Step S32 searches for pairs of parallel straight lines, compares each set of parallel lines two by two, removes duplicates, searches for the four corners of the rectangle, and reorders the four corners.
[0023] Preferably, step S4 specifically includes:
[0024] Step S40 detects and draws the contours of the processed top-view oblique projection of the indenter base and the oblique rectangular projection of the front of the indenter base, and calculates the projection area by using the ContourArea function;
[0025] Step S41 compares the two obtained inclined projection areas with the projection area of the normal view to calculate the inclination angle of the indenter base relative to the stage along the XY axis;
[0026] In step S42, the sample to be tested is placed on the stage, and the top-view tilted shadow of the indenter base is projected onto the sample, and the tilt of the sample to be tested and the tilt of the sample are calculated by the projection method. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart of the method for detecting the inclination of the nanoindenter indenter and the sample of the present invention;
[0028] Figure 2 It is a structural schematic diagram of the parallel light source generating device of the present invention;
[0029] Figure 3 It is a schematic diagram of the principle of the parallel light source generating device of the present invention;
[0030] Figure 4 The top view projection and the front view projection of the indenter base acquired by the image acquisition device of the present invention;
[0031] Figure 5 This is a picture showing the effect of the present invention after processing the collected pictures;
[0032] Figure 6 A schematic diagram of rectangle detection using Hough transform in the present invention;
[0033] Figure 7 The schematic diagram of the present invention for calculating the projection area using the convexity of solid geometry;
[0034] Figure 8 A schematic diagram of calculating the tilt angle of the indenter base relative to the stage according to the present invention;
[0035] In the figure: 1. parallel light source generating device; 10. focusing chamber; 11. LED lamp beads; 12. light guide tube; 13. shell; 14. large single-sided concave lens; 15. large convex lens; 16. refractive flat mirror; 17. light-transmitting glass; 18. first spherical lens; 19. second spherical lens; 2. indenter base; 3. indenter; 4. stage. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0037] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0038] like Figure 1 As shown, the present invention provides a method for detecting the inclination of a nanoindenter indenter and a sample, comprising:
[0039] Step S1, collecting the top view projection and the front view projection of the indenter base formed under the parallel light source by an image acquisition device, specifically includes:
[0040] like Figure 2 , Figure 3 , Figure 4 As shown, step S10: turn on the parallel light source generating device 1, so that the parallel light generated by it passes through the light-transmitting glass 17 to project the top-view inclined shadow of the indenter base 2 onto the stage 4, and use the image acquisition device to take a high-definition photo;
[0041] Step S11: Create a beam of parallel light from the outside to directly illuminate the pressure head base 2; project the inclined shadow of its front side onto the backlight plate, and use an image acquisition device to take a high-definition photo.
[0042] Preferably, step S2 further comprises:
[0043] like Figure 5 As shown, step S20 converts the acquired image into a grayscale image, converting the collected image into a grayscale image is completed by using the cv2.cvtColor function and specifying the cv2.COLOR_BGR2GRAY conversion code, making it easier to process and analyze;
[0044] Step S21 converts the grayscale image into a binary image, converting each pixel in the image into two values, 0 and 255 respectively;
[0045] Furthermore, in order to prevent uneven lighting and the existence of shadows, the adaptive threshold function adaptiveMethod is used for binarization processing, the maximum value function maxVal is set to 255, the neighborhood size function blockSize in adaptiveThreshold is set to 3*3, and the weighted average value calculated by the function ADAPTIVE_THRESH_GAUSSIAN_C is subtracted from the C constant, which is 1;
[0046] Step S22 performs bilateral filtering on the binary image, processing the spatial kernel and the range kernel of the input image;
[0047] Furthermore, we set the kernel size to 7, the spatial kernel sigmaColor to 20, and the range kernel sigmaSpace to 50;
[0048] Step S23 performs sequential grid super sampling on the processed image, by pre-enlarging the image and mapping it to a cache, and then using super sampling to sample the enlarged image pixels to generate smooth edges.
[0049] Preferably, step S3 further comprises:
[0050] like Figure 6 As shown, step S30 uses a custom Hough transform function to find ρ and θ in the image that can form a straight line, including setting the accuracy parameters of the detection distance and angle, setting the number of passing points that will be identified as a straight line, specifying the parameters of the adjacent distances to retain a single straight line, and specifying the value of the pixel that will be identified as an edge;
[0051] Furthermore, the distance precision rho_res is specified in pixels, the angle precision theta_res is specified in radians, the horizontal axis is θ in the polar coordinate Hough space, the vertical axis is ρ = x·cosθ+y·sinθ, the threshold thresholdVotes is specified in the accumulation plane, so that only lines greater than it are returned, the function filterMultiple is specified, and only one line with the largest value is left within a certain distance, and the edge threshold thresholdPixels is specified as 0, and all pixels greater than it are considered edges;
[0052] Step S31 creates the horizontal axis theta of the Hough space, creates the vertical axis rho of the Hough space, creates an empty Hough space coordinate system, fills the edge pixels in the image into the Hough space coordinate system, and filters the obtained lines;
[0053] Furthermore, create the horizontal axis theta of the Hough space, with a range of [-90, 90], set np.linspace to create an arithmetic progression, set the starting value to -90, set the end value to 0, set the number of points to 2*(90 / theta_res)+1, create the vertical axis rho of the Hough space, with a range of [-image diagonal length, image diagonal length], set the number of points to 2*(image diagonal length / rho_res)+1, and use the zero matrix np.zeros to create an empty Hough space coordinate system with a size of rho rows and th eta column, fill the edge pixels in the image into the Hough space coordinate system. If it is an edge pixel, loop through all possible θ values, calculate the corresponding ρ, find the θ and ρ indexes in the accumulator and add them at that position. In order to prevent the lines from sticking too tightly, only the one with the highest value is kept among the close lines, and the others are removed. Traverse the current cluster. If the distance between this line and other lines in it is less than the threshold, put them in the same cluster. Only one line with the maximum value is kept in each cluster, and the others become 0. Draw the lines in the Hough space, use the original image as the base, and draw the straight lines corresponding to each ρ and θ on it;
[0054] Step S32: finding pairs of parallel straight lines, comparing each set of parallel lines in pairs, removing duplicates, finding the four corners of the rectangle, and reordering the four corners;
[0055] Going further, find pairs of parallel straight lines and put their θ pairs together to get several groups of paired parallel lines. Then compare each group of parallel lines with other groups, put two groups of parallel lines that can form right angles together, remove duplicate items in the array, sort the array through the np.sort() function, perform multi-level sorting through the np.lexsort() function, prioritize sorting from the following columns from small to large, calculate the nth-order discrete difference between each element and the previous element through the np.diff() function, and determine whether there is at least one true value in the array through numpy.array.any() to remove duplicate items.
[0056] Step S3 provides support for simplifying the calculation of step S4 and the feasibility of the calculation method.
[0057] Preferably, step S4 further comprises:
[0058] Step S40 detects and draws the contours of the processed top-view oblique projection of the indenter base 2 and the oblique rectangular projection of the front of the indenter base 2, and calculates the projection area by using the ContourArea function;
[0059] like Figure 7 , Figure 8As shown, step S41 compares the obtained two inclined projection areas with the projection area of the normal view to calculate the inclination angle of the pressure head base 2 relative to the stage 4 along the XY axis;
[0060] Furthermore, the projection area of the pixel point calculated by the ContourArea function in step S40 is compared with the area of the standard reference object to obtain the real projection area S of the top view and the front view of the indenter base 2. 1 , S 2 ;
[0061] The S obtained in this step 2 Only the rectangular area of the upper end of the indenter base 2 identified by the Hough transform needs to be considered. Because the volume of the cube at the upper end of the indenter base 2 is large enough and the inclination of the indenter base 2 generally does not exceed 5°, the other parts of the indenter base 2 can be completely ignored and will not affect the projection S 2 The area affected;
[0062] First, consider only the projection area of one face of the cube. Assume that the quadrilateral is inclined 3° relative to the upper surface of the stage. Take the normal vector at the midpoint of the quadrilateral. Consider a plane passing through the normal vector. Then cut the quadrilateral into many thin strips, and these thin strips are parallel to the quadrilateral. The projection of a single thin strip on the stage can be obtained as:
[0063] l×cos(θ)=l s
[0064] Where l is the length of the strip, l s is the length of the thin strip projection, θ is the tilt angle between the thin strip and the stage;
[0065] Through the idea of calculus, we can find the projection of the quadrilateral on the stage:
[0066] S quadrilateral =|cos(θ)s 2
[0067] Where s is the side length of the quadrilateral;
[0068] like Figure 7 As shown, according to the convexity of the cube, when any line connecting two points in a set is completely contained in the set, for a cube, a beam of parallel light will always enter from the illuminated side of the cube and shine out from the backlit side. Therefore, it can be concluded that when calculating the projection area of a tilted cube, the projection area is often an irregular figure, which is the result of the overlap of the projection areas of the six surfaces. According to the above idea, the light will always pass through the cube twice, so its projection area is equal to half of the sum of the projection areas of the six faces of the cube, that is:
[0069]
[0070] like Figure 8 As shown, taking the upper surface of the cube as an example, a Cartesian coordinate system is established on the upper surface of the cube. The inclination angle between the upper surface and the stage can be divided into α around the X-axis and β around the Y-axis. The inclination angle between the upper surface and the stage can be obtained as:
[0071]
[0072] By analogy, the inclination angle γ between the six surfaces and the stage can be obtained: 1 , γ 2 …γ 6 ;
[0073] The projected area of each surface of the cube can be calculated based on the S derived above. quadrilateral =|cos(θ)|s 2 Find out, respectively S quadrilateral-γ1 , S quadrilateral-γ2 ……S quadrilateral-γ6 , and then through the formula Find the projected area of the cube;
[0074] Now we have obtained the top view projection area and front view projection area S1, S2 of the indenter base 2 by the image processing method, and obtained the method for calculating the projection area by the above calculation. According to the reverse method, there are now two unknown quantities and two known quantities, that is, the angles α and β are obtained;
[0075] Taking the stage as the reference, the inclination between the pressure head base and the stage is calculated. Since the pressure head base and the pressure head are generally produced in pairs and there is no error between the two after qualified testing, the inclination between the pressure head base and the stage is equal to the inclination between the pressure head and the stage.
[0076] Step S42: placing the sample to be tested on the stage 4, projecting the top-view tilted shadow of the indenter base 2 onto the sample, and calculating the tilt of the sample to be tested and the tilt of the stage by the projection method;
[0077] Furthermore, by comparing the collected top-view projection area of the indenter base 2 on the stage with the top-view projection area of the indenter base 2 on the sample, the inclination of the sample and the stage can be obtained:
[0078]
[0079] Where θ 2 is the tilt angle between the sample and the stage;
[0080] If the inclination between the indenter and the stage and the inclination between the sample and the stage are known, the indenter or the sample can be corrected to achieve the purpose of accurate measurement of the instrument.
[0081] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A method for detecting the inclination of a nanoindenter indenter and a sample, characterized in that: The following steps are involved: Step S1: using an image acquisition device to capture a top view projection and a front view projection of the indenter base formed under a parallel light source; Step S2 preprocesses the image, converts the image into a grayscale image using Opencv, performs image binarization, image bilateral filtering, and image sequential grid super sampling; Step S3 uses Hough transform to detect the rectangular part in the orthographic projection after image preprocessing; Step S4 obtains the area of the rectangular part of the top view projection and the front view projection, and calculates the inclination between the indenter and the stage through the area.
2. A method for detecting the inclination of a nanoindenter indenter and a sample as claimed in claim 1, characterized in that: The invention comprises the following structures: a parallel light source generating device (1), a pressure head base (2), a pressure head (3), and a loading platform (4); The pressure head (3) is glued to the pressure head base (2); The pressure head base (2) is screwed together with the parallel light source generating device (1).
3. A method for detecting the inclination of a nanoindenter indenter and a sample as claimed in claim 2, characterized in that: The parallel light source generating device (1) comprises a light collecting chamber (10), an LED lamp bead (11), a light guide tube (12), a housing (13), a large single-sided concave lens (14), a large convex lens (15), a refracting mirror (16), a light-transmitting glass (17), a first spherical lens (18), and a second spherical lens (19); the light collecting chamber (10) is screwed together with the LED lamp bead (11); the light guide tube (12) is installed at a small hole on the thin wall of the light collecting chamber (10) facing the LED lamp bead (11); The shell (13) and the condensing chamber (10) are welded together; the large single-sided concave lens (14) and the large convex lens (15) are glued into the groove on the outer inner wall of the shell (13); the refractive flat mirror (16) is glued into the groove on the inner wall of the vertical part of the shell (13) and forms an angle of 45° with the horizontal plane; the light-transmitting glass (17) is concentrically glued to the bottom of the vertical part of the shell (13); the first spherical lens (18) and the second spherical lens (19) are glued into the groove on the inner wall of the inner side of the shell (13).
4. A method for detecting the inclination of a nanoindenter indenter and a sample as claimed in claim 1, characterized in that: In step S1, an image acquisition device is used to photograph the projection of the pressure head base (2) generated by parallel light to obtain a projection image, which specifically includes: Step S10: turning on the parallel light source generating device (1) so that the parallel light generated by the device passes through the light-transmitting glass (17) to project the top-view inclined shadow of the indenter base (2) onto the stage (4); Step S11: a beam of parallel light is generated from the outside to directly illuminate the pressure head base (2); and an inclined shadow of the front side thereof is projected onto a backlight plate.
5. A method for detecting the inclination of a nanoindenter indenter and a sample as claimed in claim 1, characterized in that: The step S2 preprocesses the image, converts the image into a grayscale image using Opencv, performs image binarization, image bilateral filtering, and image sequential grid super sampling, specifically including: Step S20 converts the acquired image into a grayscale image. The collected image is converted into a grayscale image by using the cv2.cvtColor function and specifying the cv2.COLOR_BGR2GRAY conversion code; Step S21 converts the grayscale image into a binary image, converting each pixel in the image into two values, 0 and 255 respectively; Step S22 performs bilateral filtering on the binary image, processing the spatial kernel and the range kernel of the input image; Step S23 performs sequential grid super sampling on the processed image, by pre-enlarging the image and mapping it to a cache, and then using super sampling to sample the enlarged image pixels to generate smooth edges.
6. A method for detecting the inclination of a nanoindenter indenter and a sample as claimed in claim 1, characterized in that: The step S3 performs Hough transform on the collected orthographic projection image of the pressure head base (2) to detect rectangles, specifically comprising: Step S30 uses a custom Hough transform function to find ρ and θ in the image that can form a straight line, including setting the accuracy parameters of the detection distance and angle, setting the number of passing points that will be identified as a straight line, specifying the parameters of the adjacent distances to retain a single straight line, and specifying the value of the pixel that will be identified as an edge; Step S31 creates the horizontal axis theta of the Hough space, creates the vertical axis rho of the Hough space, creates an empty Hough space coordinate system, fills the edge pixels in the image into the Hough space coordinate system, and filters the obtained lines; Step S32 searches for pairs of parallel straight lines, compares each set of parallel lines in pairs, removes duplicates, searches for the four corners of the rectangle, and reorders the four corners.
7. A method for detecting the inclination of a nanoindenter indenter and a sample as claimed in claim 1, characterized in that: The step S4 calculates the inclination between the indenter and the stage based on the projection area collected by OpenCV, and specifically includes: Step S40: detecting the processed top-view oblique projection of the indenter base (2) and the contour of the oblique rectangular projection of the front of the indenter base (2) and drawing them out, and calculating the projection area by using the ContourArea function; Step S41: Compare the two obtained inclined projection areas with the projection area of the normal view to calculate the inclination angle of the pressure head base relative to the stage (4) along the XY axis; In step S42, the sample to be tested is placed on the stage (4), and the top-view tilted shadow of the indenter base (2) is projected onto the sample, and the tilt of the sample to be tested and the tilt of the stage are calculated by the projection method.