Device and method for simultaneously measuring abrasion of tool nose and rear tool face of turning tool in place

By combining backlight and sidelight sources with a microscope, and utilizing a series of zoom image processing and adaptive gradient direction focusing evaluation operators, the problem of simultaneous detection of wear conditions on the tool tip and back face was solved, achieving efficient and accurate wear detection.

CN121042944APending Publication Date: 2025-12-02INST OF MACHINERY MFG TECH CHINA ACAD OF ENG PHYSICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511598167.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-04
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

Existing technologies cannot achieve simultaneous and accurate detection of the wear state of the cutting edge and the back face of a lathe tool. In particular, optical in-situ detection devices have functional limitations and cannot simultaneously acquire depth information and edge features.

Method used

Using a microscope in conjunction with backlight and sidelight sources, and through a series of zoom image processing and adaptive gradient direction focusing evaluation operators, the tool tip profile and back face wear state are extracted respectively. By using microscope movement and image processing technology, depth information and gradient matrix are obtained, and three-dimensional reconstruction of tool wear is achieved.

Benefits of technology

It enables precise detection of the wear status of the cutting tool tip and flank face simultaneously, reducing interference from non-clarity factors and improving the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121042944A_ABST
    Figure CN121042944A_ABST
Patent Text Reader

Abstract

The invention discloses a device and a method for simultaneously measuring abrasion of a tool nose and a rear tool face of a turning tool in place, and relates to the technical field of tool state monitoring. The device comprises a backlight source, a sidelight source, a precision displacement table and a microscope; the backlight source is arranged on the back surface of the detected cutter and is used for providing projection illumination; the side light source is arranged on one side of the rear tool face of the detected tool and irradiates the rear tool face obliquely and downwards so as to provide oblique illumination; the microscope is arranged on the precise displacement table in a sliding mode and can move at a constant speed in the direction of the optical axis of the microscope. According to the invention, simultaneous and accurate detection of the wear states of the tool nose cutting edge and the rear tool face can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tool condition monitoring technology, specifically to a device and method for simultaneously measuring the wear of the cutting tool tip and flank face in situ. Background Technology

[0002] As the direct actuator in precision lathe machining, the condition of the cutting tool directly affects the machining accuracy and surface quality of the workpiece. Therefore, it is necessary to accurately monitor its condition during the machining process. In actual machining, the wear of the cutting tool mainly occurs at the tool tip and the flank face. The tool tip and flank face are considered the main references for evaluating tool life.

[0003] Previously, the detection of turning tool wear required either experience-based judgment or offline inspection. Experience-based judgment is highly subjective, while offline inspection not only affects production continuity but also introduces secondary errors. Therefore, in-situ detection of turning tool wear is of greater practical significance for improving machining quality. Currently, in-situ detection of turning tools mainly employs two methods: indirect measurement and direct measurement. Indirect measurement is not only complex but also affects the machining process. Direct measurement involves obtaining a model through three-dimensional reconstruction of the tool, typically using optical imaging. However, existing optical in-situ detection devices generally have functional limitations. Constrained by the spatial structure of the turning tool and the limited depth of field of the microscope, most devices can only extract wear conditions from the tool tip contour or the flank face. Flank face wear extraction relies on the continuous fitting of depth information, requiring a smooth-transition planar model representation to capture the overall shape of the wear area. In contrast, tool tip contour measurement requires locking edge features and using sharpened linear detection to highlight detailed changes in the cutting edge. Therefore, there is a fundamental conflict in the data processing logic between the two methods, preventing current devices from simultaneously and accurately detecting the wear conditions of the tool tip and flank face. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention aims to provide an apparatus and method for simultaneously measuring the wear of a cutting tool tip and flank face in situ, thereby solving the problem of the inability to simultaneously detect the wear status of the cutting tool tip and flank face.

[0005] This invention is achieved through the following technical solution:

[0006] A method for simultaneously measuring the wear of a lathe tool tip and flank face in situ includes the following steps:

[0007] S1: Place the tool to be tested;

[0008] S2: Turn on the backlight source located on the back of the tool under test, and set up a microscope in front of the tip of the tool under test. The optical axes of the backlight source, the tool under test, and the microscope are in the same straight line.

[0009] S3: Control the microscope to move along the optical axis in a fixed step size toward the tool being tested, and sample at intervals to obtain a series of zoom images; evaluate the focus of the series of zoom images, obtain the focus evaluation curve of each pixel, and obtain depth information; then calculate the signal-to-noise ratio of the focus evaluation curve of each pixel, and retain the points with a signal-to-noise ratio greater than the threshold.

[0010] S4: Select the image with the highest average evaluation result to extract the contour, and take the union of the contour with the points whose signal-to-noise ratio is greater than the threshold. Combine the depth information to obtain the spatial curve of the blade tip contour, thereby realizing the extraction of the blade tip edge wear state.

[0011] S5: Turn on the side light source located on one side of the back face of the tool under test, the side light source can provide oblique illumination downwards; the optical axis of the microscope coincides with the central axis of the measured feature area on the back face of the tool under test;

[0012] S6: Control the microscope to move along the optical axis in a fixed step size toward the tool being tested, and sample at intervals to obtain a sequence of zoomed images; calculate the gradient matrices in the width and height directions of the image respectively, and use the sum of the squares of the two matrices to perform preliminary reconstruction to obtain a rough model of the back face of the tool.

[0013] S7: Smooth the rough model and calculate the gradient direction. Based on the obtained gradient direction and two gradient matrices, refocus the evaluation to obtain the focus evaluation matrix. Finally, use the focus evaluation matrix to re-reconstruct the three-dimensional model using the focus method to extract the wear state of the back face.

[0014] The order of steps S2-S4 and steps S5-S7 can be reversed.

[0015] Further optimization, in step S3, the specific steps for performing focus evaluation on a series of zoom images, obtaining the focus evaluation curve for each pixel, and obtaining depth information include:

[0016] The Tenengrad algorithm was used to process a series of zoom images I1, ..., I N Perform focused evaluation and obtain focused evaluation results F1, ..., F2. n ;

[0017] For each pixel, evaluate the focus result F1…F N In the depth direction, curve fitting is performed with (d, 2d, ..., N*d) as independent variables to obtain the focus evaluation curve for each pixel; d is the fixed step size when measuring the blade tip with a microscope, and N is the number of images acquired.

[0018] The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel to obtain depth information.

[0019] Further optimization, in step S3, the specific steps of subsequently calculating the signal-to-noise ratio of the focus evaluation curve for each pixel and retaining points with a signal-to-noise ratio greater than a threshold include:

[0020] The signal-to-noise ratio of the focus evaluation curve for each pixel is evaluated by calculating the peak value of the focus evaluation curve as the signal amplitude and the local variance of the region outside the peak value as the noise amplitude.

[0021] Remove pixels whose signal-to-noise ratio (SNR) in the focus evaluation curve is below the threshold, and retain pixels whose SNR is above the threshold.

[0022] Further optimization, step S4 specifically includes the following steps:

[0023] Select the image with the largest global mean of focus evaluation result F among the zoom images in the sequence, and perform edge extraction on it;

[0024] The extraction result is combined with the pixels with a signal-to-noise ratio higher than the threshold in step S3 to obtain the final retained pixels, which is the projection curve of the blade tip contour on the plane.

[0025] Finally, the pixel depth h obtained in step S3 is assigned to the ultimately retained pixels to obtain the spatial curve of the blade tip contour, thereby realizing the extraction of the blade tip edge.

[0026] Further optimization involves the following steps in step S6: calculating the gradient matrices in the width and height directions of the image, and using the sum of the squares of the two matrices for preliminary reconstruction to obtain a rough model of the back face:

[0027] Two first-order derivative gradient operators in the width and height directions are used to calculate the gradient matrices in the width and height directions, respectively, where the width direction is defined as the x-direction and the height direction as the y-direction, to obtain two sets of matrices with a depth of M: the x-direction gradient matrix sequence FW1, ..., FW M , and the gradient matrix sequence FH1, ..., FH in the y-direction M ;

[0028] For the same depth m, calculate the corresponding FW for each pixel. m With FH m The arithmetic square root of the sum of squares yields the preliminary focused evaluation matrix sequence FM1, ..., FM2. M ;

[0029] For each pixel, evaluate the focus along the results FM1, ..., FM M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel;

[0030] The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel; the depth is assigned to each pixel to obtain the preliminary reconstructed back face point cloud set.

[0031] Further optimization yields the following formula for the initial focused evaluation matrix:

[0032] ;

[0033] Where i and j represent the positions of pixels in the image.

[0034] In a further optimization, step S7 involves smoothing and filtering the coarse model and calculating the gradient direction. Based on the obtained gradient direction and two gradient matrices, the evaluation is refocused. The specific steps for obtaining the focused evaluation matrix include:

[0035] The initially reconstructed back face point cloud set is smoothed by filtering. First, the gradient components of the pixels in the x and y directions in the point cloud set are calculated by the gradient operator.

[0036] Then, the gradient direction is calculated using the arctangent function to obtain the gradient direction θ of each pixel in the smoothed point cloud M;

[0037] Using the gradient direction θ and the gradient matrix sequence FW1, ..., FW in the x direction M and the gradient matrix sequence FH1, ..., FH in the y-direction M The focused evaluation matrix FS is reconstructed through directional weighted fusion. Obtain the adaptive gradient direction focusing evaluation results FS1, ..., FS2. M .

[0038] Further optimization, in step S7, the specific steps for re-performing the three-dimensional reconstruction using the focusing evaluation matrix to extract the wear state of the flank face include:

[0039] For each pixel, evaluate the focus along the results FS1, ..., FS M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel;

[0040] The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel.

[0041] Depth is assigned to each pixel to obtain the final reconstructed back face point cloud set, so as to realize the extraction of the back face wear state.

[0042] For further optimization, the fixed step size in steps S3 and S6 is 0.5 to 5 times the microscope depth of field.

[0043] Further solutions:

[0044] The present invention also provides an apparatus for simultaneously measuring the wear of a lathe tool tip and flank face in situ, comprising:

[0045] Backlight source, sidelight source, precision displacement stage and microscope;

[0046] The backlight source is located on the back of the tool being tested and is used to provide projection illumination;

[0047] The side light source is located on one side of the back face of the tool being tested and illuminates the back face at an angle downwards to provide oblique illumination;

[0048] The microscope is slidably mounted on the precision displacement stage and can move at a constant speed along its own optical axis.

[0049] The precision displacement stage is located on one side of the back face of the tool being tested, and the microscope field of view can completely cover the feature area being tested at the tool tip and the feature area being tested on the back face.

[0050] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0051] This invention provides an apparatus and method for simultaneously measuring the wear of a lathe tool tip and flank face in situ. Utilizing a series of zoomed images and the high signal-to-noise ratio of the tool tip contour pixel focusing evaluation curve, the tool tip contour is successfully extracted and the contour space curve is reconstructed to detect tool tip edge wear. Furthermore, an adaptive gradient direction focusing evaluation operator is proposed to implement the focusing method, reducing interference from non-sharpness factors and solving the problem of low image signal-to-noise ratio caused by the steep tool face, thereby enabling the detection of tool flank face wear.

[0052] The present invention provides an apparatus and method for simultaneously measuring the wear of the cutting edge and the back face of a lathe tool in situ. It only requires a microscope, a light source and a precision displacement stage to achieve simultaneous and accurate detection of the wear state of the cutting edge and the back face. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0054] Figure 1 A structural diagram of the device for simultaneously measuring the wear of the cutting tool tip and the flank face in situ, provided by the present invention;

[0055] Figure 2Flowchart of the method for simultaneously measuring the wear of the cutting tool tip and the flank face in situ according to the present invention;

[0056] Figure 3 Example image of the blade tip outline under backlight projection provided by the present invention;

[0057] Figure 4 An example image of the back face of the cutting tool under side lighting illumination with backlight projection provided by the present invention.

[0058] The attached diagram shows the markings and corresponding component names:

[0059] 1-Backlight source, 2-Sidelight source, 3-Precision displacement stage, 4-Microscope, 5-Test tool. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0061] Example 1: This Example 1 provides a device for simultaneously measuring the wear of a lathe tool tip and flank face in situ, such as... Figure 1 As shown, it consists of a backlight source 1, a sidelight source 2, a precision displacement stage 3, and a microscope 4.

[0062] The backlight source 1 is disposed on the back of the tool 5 being tested and is used to provide projection illumination;

[0063] The side light source 2 is located on one side of the back face of the tool 5 being tested, and illuminates the back face at an angle downward to provide oblique illumination;

[0064] The microscope 4 is slidably mounted on the precision displacement stage 3 and can move at a constant speed along its own optical axis.

[0065] The precision displacement stage 3 is located on one side of the back face of the tool 5 under test. The field of view of the microscope 4 can completely cover the measured feature area of ​​the tool tip and the measured feature area of ​​the back face. That is, the optical axis of the microscope 4 can coincide with the central axis of the measured feature area of ​​the tool 5 under test, and the field of view can completely cover the measured area.

[0066] Example 2: This Example 2 provides a method for simultaneously measuring the wear of the cutting tool tip and flank face in situ, such as... Figure 1 and Figure 2 As shown, the specific steps include the following:

[0067] S1: Install the tool to be tested 5, install the detection device, and ensure that the tool image is centered in the image.

[0068] S2: Blade tip contour extraction. This includes the following steps:

[0069] S2a: Turn on the backlight source 1, turn off the sidelight source 2, and set the scanning range of the precision displacement stage 3. The scanning range of the precision displacement stage 3 needs to ensure that the focal plane of the microscope 4 can cover the total depth of the tip of the tested tool 5 along the optical axis. Start the device, and the microscope 4 acquires a sequence of zoomed images of the tool tip profile at sampling intervals d, acquiring a series of zoomed images I1, I2, ..., I N N is the number of images captured, and I is the number of images per image. n The corresponding depth is D = n*d.

[0070] S2b: Using the image sharpness operator to process a series of zoom images I1, I2, ..., I N Perform focused evaluation to obtain focused evaluation results F1, F2, ..., F N .

[0071] S2c: Evaluate the focus result F1…F for each pixel. N In the depth direction, curve fitting is performed with (d, 2d, ..., N*d) as independent variables to obtain the focus evaluation curve of each pixel. The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel.

[0072] S2d: By calculating the peak value of the curve as the signal amplitude and the local variance of the region outside the peak value as the noise amplitude, the signal-to-noise ratio (SNR) of the focus evaluation curve for each pixel is evaluated. Pixels with low SNR in the focus evaluation curve are removed, while pixels with high SNR are retained.

[0073] S2e: Select the image with the largest global mean of the focus evaluation result F in the sequence of images, and extract its edges. Take the union of the extracted result with the pixels retained in S2d. The retained pixels are the projection curve of the blade tip contour on the plane.

[0074] S2f: Assign the pixel depth h from S2c to the pixel obtained in S2e to obtain the spatial curve of the blade tip contour.

[0075] S3: Extraction of flank wear condition. This includes the following steps:

[0076] S3a: Turn off the backlight source 1, turn on the sidelight source 2, and set the scanning range of the precision displacement stage 3. The scanning range of the precision displacement stage 3 needs to ensure that the focal plane of the microscope 4 can scan the depth of the entire flank face of the tested tool 5 along the optical axis. Start the device, and the microscope 3 acquires a series of zoomed images of the flank face at equal intervals, collecting a series of zoomed images I1, I2, ..., I M M is the number of images captured, and I is the number of images per image. m The corresponding depth is D = m * d.

[0077] S3b: Apply two first-order derivative gradient operators in the width direction (defined as the x-direction) and the height direction (defined as the y-direction) to the acquired zoom image to calculate the gradient matrices in the x and y directions respectively, obtaining two sets of matrices with depth M: the x-direction gradient matrix sequence FW1, ..., FW M , and the gradient matrix sequence FH1, ..., FH in the y-direction M For the same depth m, calculate the corresponding FW for each pixel. m With FH m The arithmetic square root of the sum of squares yields the preliminary focused evaluation matrix sequence FM1, ..., FM2. M , Right now , where i and j represent the positions of pixels in the image.

[0078] S3c: For each pixel, evaluate the focus result FM1, ..., FM. M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel. The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel. The depth is assigned to each pixel to obtain the preliminary reconstructed back face point cloud set.

[0079] S3d: Smooth filtering is applied to the initially reconstructed back face point cloud set. First, the gradient components of the pixels in the x and y directions in the point cloud set are calculated using the gradient operator. Then, the gradient direction is calculated using the arctangent function to obtain the gradient direction θ of each pixel in the smoothed point cloud set M.

[0080] S3e: Using the gradient direction θ obtained from S3d and the sequence of gradient matrices FW1, ..., FW1 obtained from S3b in the x-direction. M , and the gradient matrix sequence FH1, ..., FH in the y-direction M The focused evaluation matrix FS is reconstructed through directional weighted fusion. Obtain the adaptive gradient direction focusing evaluation results FS1, ..., FS2. M .

[0081] S3f: For each pixel, evaluate the focus result FS1, ..., FS2 along the focus path. M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel. The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel. The depth is assigned to each pixel to obtain the reconstructed back face point cloud set.

[0082] The selection of step size d in S2a and S3a needs to consider the balance between the depth of field of microscope 4 and the detection efficiency, and is generally selected as 0.5 to 5 times the depth of field of microscope 4. For ease of distinction, the above operation steps divide the blade tip contour extraction and the back face detection into two independent processes. In actual detection operations, the parameters of both processes can be set, and then the measuring device can be started to perform the two measurements sequentially.

[0083] Example 3: Based on Example 2, Example 3 provides a specific implementation case. It includes the following specific steps:

[0084] S1: Place the tool to be tested 5, install the detection device, and ensure that the image of the tool to be tested 5 is centered in the image.

[0085] S2: Turn on the backlight source 1 and turn off the sidelight source 2. Adjust the initial position of the precision displacement stage 3 so that the distance between the tip of the tool 5 being measured and the working distance of the microscope 4 is slightly greater than the working distance of the microscope 4. The displacement stage begins to move closer to the tool, with a total stroke of 2.1 mm. The precision displacement stage 3 moves in steps of d = 15 μm. The microscope 4 acquires one image per step. Acquire a series of zoom images I1, ..., I N N is the number of images captured, and each image is I n Corresponding depth D n = n*15μm.

[0086] S3: Use the Tenengrad algorithm to process a series of zoom images I1, ..., I N Perform focused evaluation and obtain focused evaluation results F1, ..., F2. n For each pixel, evaluate the focus result F1…F1. N In the depth direction, curve fitting is performed with (d, 2d, ..., N*d) as independent variables to obtain the focus evaluation curve of each pixel. The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel.

[0087] S4: The signal-to-noise ratio (SNR) of the focus evaluation curve for each pixel is evaluated by calculating the peak value of the curve as the signal amplitude and the local variance of the region outside the peak value as the noise amplitude. A threshold of 20 is set, and points with an SNR greater than the threshold are retained.

[0088] S5: Use the Canny edge detection algorithm to process image I n / 2 Extract a contour with a width of 11 pixels, and take the union of it with the points retained in S4 to obtain the accurate blade tip contour with a width of 2-3 pixels. Assign the depth h obtained in S3 and extract the spatial curve of the blade tip contour.

[0089] S6: Turn off backlight 1, turn on sidelight 2, adjust the initial position of precision stage 3 so that the distance between the back face of the tool 5 being tested and the working distance of microscope 4 is slightly greater than that of the tool 5. Precision stage 3 begins to move closer to the tool, with a total stroke of 4.5 mm. Each step of precision stage 3 is d = 15 μm. Microscope 4 acquires one image. Acquire a series of zoom images I1, ..., I M N is the number of images captured, and each image is I m Corresponding depth D m = m*15μm.

[0090] S7: Apply two first-order derivative gradient operators in the width direction (defined as the x-direction) and the height direction (defined as the y-direction) to the acquired zoom image to calculate the gradient matrices in the x and y directions, respectively, obtaining two sets of matrices with a depth of M: the x-direction gradient matrix sequence FW1, ..., FW M , and the gradient matrix sequence FH1, ..., FH in the y-direction M For the same depth m, calculate the corresponding FW for each pixel. m With FH m The arithmetic square root of the sum of squares yields the preliminary focused evaluation matrix sequence FM1, ..., FM2. M , Right now Where i, j represent the positions of pixels in the image. For each pixel, along the focus evaluation results FM1, ..., FM M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel. The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel. The depth is assigned to each pixel to obtain the preliminary reconstructed back face point cloud set.

[0091] S8: Apply mean filtering with a window size of 9*9 to the coarse model to obtain model S. First, convolve the model S with Sobelx and Sobely gradient operators to calculate the gradient components of pixels in the point cloud set in the x and y directions. Then, use the arctangent function to calculate the gradient direction, obtaining the gradient direction θ of each pixel in the smoothed point cloud set M, where:

[0092] ;

[0093] The gradient matrix sequence in the x-direction is FW1, ..., FW1. M , and the gradient matrix sequence FH1, ..., FH in the y-direction M The focused evaluation matrix FS is reconstructed through directional weighted fusion. Obtain the adaptive gradient direction focusing evaluation results FS1, ..., FS M .

[0094] S9: Evaluate the focus results FS1, ..., FS for each pixel along the focus evaluation path. M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel. The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel. The depth is assigned to each pixel to obtain the reconstructed back face point cloud set, realizing the extraction of the wear state of the back face.

[0095] Steps S2-S5 involve wear detection of the tool tip profile, while steps S6-S9 involve wear detection of the flank face. The order is not fixed, and the images acquired throughout the process are shown in the attached figures. Figure 3 Appendix Figure 4 .

[0096] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for simultaneously measuring the wear of a lathe tool tip and flank face in situ, characterized in that, Includes the following steps: S1: Place the tool to be tested (5); S2: Turn on the backlight source (1) located on the back of the tool (5) under test, and set up a microscope (4) in front of the tip of the tool (5) under test. The optical axes of the backlight source (1), the tool (5) under test and the microscope (4) are on the same straight line. S3: Control the microscope (4) to move along the optical axis in a fixed step size toward the tool under test (5), and sample at intervals to obtain a series of zoom images; evaluate the focus of the series of zoom images, obtain the focus evaluation curve of each pixel, and obtain depth information; then calculate the signal-to-noise ratio of the focus evaluation curve of each pixel, and retain the points with a signal-to-noise ratio greater than the threshold. S4: Select the image with the highest average evaluation result to extract the contour, and take the union of the contour with the points whose signal-to-noise ratio is greater than the threshold. Combine the depth information to obtain the spatial curve of the blade tip contour, thereby realizing the extraction of the blade tip edge wear state. S5: Turn on the side light source (2) located on one side of the back face of the tool (5) under test. The side light source (2) can provide oblique illumination downwards. The optical axis of the microscope (4) coincides with the central axis of the measured feature area on the back face of the tool (5) under test. S6: Control the microscope (4) to move along the optical axis in a fixed step size toward the tool (5) under test, and sample at intervals to obtain a sequence of zoom images; calculate the gradient matrix in the width and height directions of the image respectively, and use the sum of the squares of the two matrices to perform preliminary reconstruction to obtain a rough model of the back face; S7: Smooth the rough model and calculate the gradient direction. Based on the obtained gradient direction and two gradient matrices, refocus the evaluation to obtain the focus evaluation matrix. Finally, use the focus evaluation matrix to re-reconstruct the three-dimensional model using the focus method to extract the wear state of the back face. The order of steps S2-S4 and steps S5-S7 can be reversed.

2. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 1, characterized in that, In step S3, the specific steps for evaluating the focus of a series of zoom images, obtaining the focus evaluation curve for each pixel, and obtaining depth information include: The Tenengrad algorithm was used to process a series of zoom images I1, ..., I N Perform focused evaluation and obtain focused evaluation results F1, ..., F2. n ; For each pixel, evaluate the focus result F1…F N In the depth direction, curve fitting is performed with (d, 2d, ..., N*d) as independent variables to obtain the focus evaluation curve of each pixel; d is the fixed step length when the microscope (4) measures the knife tip, and N is the number of images acquired; The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel to obtain depth information.

3. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 2, characterized in that, In step S3, the specific steps for subsequently calculating the signal-to-noise ratio (SNR) of the focus evaluation curve for each pixel and retaining points with an SNR greater than a threshold include: The signal-to-noise ratio of the focus evaluation curve for each pixel is evaluated by calculating the peak value of the focus evaluation curve as the signal amplitude and the local variance of the region outside the peak value as the noise amplitude. Remove pixels whose signal-to-noise ratio (SNR) in the focus evaluation curve is below the threshold, and retain pixels whose SNR is above the threshold.

4. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 3, characterized in that, The specific steps of step S4 include: Select the image with the largest global mean of focus evaluation result F among the zoom images in the sequence, and perform edge extraction on it; The extraction result is combined with the pixels with a signal-to-noise ratio higher than the threshold in step S3 to obtain the final retained pixels, which is the projection curve of the blade tip contour on the plane. Finally, the pixel depth h obtained in step S3 is assigned to the ultimately retained pixels to obtain the spatial curve of the blade tip contour, thereby realizing the extraction of the blade tip edge.

5. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 1, characterized in that, In step S6, the gradient matrices in the width and height directions of the image are calculated respectively, and the sum of the squares of the two matrices is used for preliminary reconstruction to obtain a rough model of the back face. The specific steps include: Two first-order derivative gradient operators in the width and height directions are used to calculate the gradient matrices in the width and height directions, respectively, where the width direction is defined as the x-direction and the height direction as the y-direction, to obtain two sets of matrices with a depth of M: the x-direction gradient matrix sequence FW1, ..., FW M , and the gradient matrix sequence FH1, ..., FH in the y-direction M ; For the same depth m, calculate the corresponding FW for each pixel. m With FH m The arithmetic square root of the sum of squares yields the preliminary focused evaluation matrix sequence FM1, ..., FM2. M ; For each pixel, evaluate the focus along the results FM1, ..., FM M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel; The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel; the depth is assigned to each pixel to obtain the preliminary reconstructed back face point cloud set.

6. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 5, characterized in that, The formula for the preliminary focused evaluation matrix is: ; Where i and j represent the positions of pixels in the image.

7. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 5, characterized in that, In step S7, the coarse model is smoothed and filtered, and the gradient direction is calculated. Based on the obtained gradient direction and two gradient matrices, the evaluation is refocused. The specific steps for obtaining the focused evaluation matrix include: The initially reconstructed back face point cloud set is smoothed by filtering. First, the gradient components of the pixels in the x and y directions in the point cloud set are calculated by the gradient operator. Then, the gradient direction is calculated using the arctangent function to obtain the gradient direction θ of each pixel in the smoothed point cloud M; Using the gradient direction θ and the gradient matrix sequence FW1, ..., FW in the x direction M and the gradient matrix sequence FH1, ..., FH in the y-direction M The focused evaluation matrix FS is reconstructed through directional weighted fusion. Obtain the adaptive gradient direction focusing evaluation results FS1, ..., FS2. M .

8. The method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to claim 7, characterized in that, In step S7, the specific steps for re-reconstructing the three-dimensional structure using the focusing evaluation matrix to extract the wear state of the flank face include: For each pixel, evaluate the focus along the results FS1, ..., FS M In the depth direction, curve fitting is performed with (d, 2d, ..., M*d) as independent variables to obtain the focus evaluation curve for each pixel; The depth h corresponding to the extreme value of the focus evaluation curve is taken as the depth of the pixel. Depth is assigned to each pixel to obtain the final reconstructed back face point cloud set, so as to realize the extraction of the back face wear state.

9. A method for simultaneously measuring the wear of a lathe tool tip and flank face in situ according to any one of claims 1-8, characterized in that, The fixed step size in steps S3 and S6 is 0.5 to 5 times the depth of field of the microscope (4).

10. A device for simultaneously measuring the wear of a lathe tool tip and flank face in situ, characterized in that, include: Backlight source (1), sidelight source (2), precision displacement stage (3) and microscope (4); The backlight source (1) is located on the back of the tool under test (5) to provide projection illumination; The side light source (2) is set on one side of the back face of the tool (5) being tested, and illuminates the back face obliquely downward to provide oblique illumination; The microscope (4) is slidably mounted on the precision displacement stage (3) and can move at a constant speed along its own optical axis. The precision displacement stage (3) is located on one side of the back face of the tool (5) being tested, and the field of view of the microscope (4) can completely cover the feature area of ​​the tool tip being tested and the feature area of ​​the back face being tested. The device for simultaneously measuring the wear of the cutting tool tip and the flank face in situ is used to implement the method described in any one of claims 1-9.