A visual recognition system for tool wear condition of a machined part

By constructing a visual recognition system for tool wear status of machined parts, the problems of response lag and unstable accuracy in tool wear detection in existing technologies have been solved. This system enables accurate, quantitative, and adaptive recognition of tool wear status, improving the accuracy and visualization of detection.

CN122299459APending Publication Date: 2026-06-30NANTONG YUNDING PRECISION METAL MFG CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANTONG YUNDING PRECISION METAL MFG CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-30

Smart Images

  • Figure CN122299459A_ABST
    Figure CN122299459A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent visual inspection technology, specifically to a visual recognition system for the wear state of cutting tools on machined parts. The system includes a liquid film interference suppression module, a multi-scale tool segmentation module, a wear feature generation module, a machining parameter acquisition module, an adaptive decision-making module, and a visualization output module. Specifically: the liquid film interference suppression module generates a liquid film interference-suppressed image; the multi-scale tool segmentation module outputs a tool body mask; the wear feature generation module calculates the cutting edge defect rate and surface mottledness, and generates a tool wear index; the machining parameter acquisition module acquires machine tool machining parameters; and the adaptive decision-making module outputs the wear level through a working condition matching decision tree. This invention, by fusing image feature extraction and working condition parameter determination, achieves accurate identification and visualization output of tool wear state, improving the efficiency of intelligent monitoring and decision-making in complex machining scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent vision inspection technology, and in particular to a visual recognition system for the wear state of cutting tools on machined parts. Background Technology

[0002] With the development of intelligent manufacturing and high-precision machining technologies, the wear state of cutting tools during the machining process has a direct impact on product quality, equipment operating efficiency, and machining safety. Traditional cutting tool wear detection methods mostly rely on manual visual inspection, timed shutdown observation, or single-point sensor monitoring, which have problems such as response lag, large subjective interference, and unstable accuracy, making it difficult to meet the needs of real-time, quantitative, and visual assessment of wear state under complex working conditions.

[0003] In recent years, image recognition and visual inspection technologies have been gradually applied to the field of tool monitoring. However, due to factors such as interference from liquid film reflection, complex image textures, and weak local features of the cutting edge, existing methods still suffer from low accuracy and poor stability in image preprocessing, key area extraction, and wear determination. Therefore, there is an urgent need for a visual recognition system for the wear state of machining tools to solve these problems. Summary of the Invention

[0004] To achieve the above objectives, the present invention provides a visual recognition system for the tool wear state of machined parts.

[0005] A visual recognition system for tool wear state of machined parts includes a liquid film interference suppression module, a multi-scale tool segmentation module, a wear feature generation module, a machining parameter acquisition module, an adaptive decision-making module, and a visualization output module; wherein:

[0006] Liquid film interference suppression module: used to acquire polarization image sequences of the tool machining area and generate liquid film interference suppression images by polarization angle fusion;

[0007] Multi-scale tool segmentation module: used to receive liquid film interference suppression images, perform texture entropy segmentation based on edge gradient constraints, and output tool body mask;

[0008] Wear feature generation module: Extracts the image of the cutting edge area based on the tool body mask, calculates the cutting edge defect rate and surface mottledness, and fuses them to generate tool wear index;

[0009] Machining parameter acquisition module: used to acquire machine tool machining parameters in real time, including spindle speed, feed rate and depth of cut;

[0010] Adaptive decision module: Based on tool wear indicators and machining parameters, it outputs wear level through working condition matching decision tree;

[0011] Visualization output module: used to map wear levels to a 3D heat map, which is then overlaid onto the original image to generate a visualization report.

[0012] Optionally, the liquid film interference suppression module includes a polarization image acquisition unit, a polarization channel separation unit, a polarization angle calculation unit, and an image fusion unit; wherein:

[0013] Polarization image acquisition unit: A polarization camera mounted directly above the tool processing area continuously acquires polarization image sequences of the tool processing area at 0°, 45°, 90° and 135° polarization directions at fixed exposure time intervals;

[0014] Polarization channel separation unit: used to receive the polarization image sequence output by the polarization image acquisition unit, extract the intensity matrix corresponding to each polarization direction image, and perform pixel-level alignment;

[0015] Polarization angle calculation unit: Based on the four polarization direction intensity matrices extracted by the polarization channel separation unit, the polarization angle value of each pixel position is calculated pixel by pixel to obtain a spatially continuous polarization angle map;

[0016] Image fusion unit: Based on the polarization angle map output by the polarization angle calculation unit, calculates the polarization consistency factor of each pixel, and uses the polarization consistency factor as the weight to perform weighted fusion of the intensity matrices of different polarization directions to obtain the final liquid film interference suppression image.

[0017] Optionally, the multi-scale tool segmentation module includes a multi-scale texture entropy calculation unit, an edge gradient calculation unit, a gradient constraint fusion unit, and a main body mask generation unit; wherein:

[0018] Multi-scale texture entropy calculation unit: It receives the liquid film interference suppression image output by the liquid film interference suppression module, uses local windows of different sizes to count the gray-level co-occurrence matrix in each pixel region of the image, and calculates the texture entropy value at each scale based on the gray-level co-occurrence matrix to generate a multi-scale texture entropy map.

[0019] Edge gradient calculation unit: used to perform gradient filtering on the liquid film interference suppression image, calculate the gradient intensity of the image in the horizontal and vertical directions pixel by pixel, and form an edge gradient magnitude map by synthesizing the gradient intensity in the two directions;

[0020] Gradient-constrained fusion unit: It receives the multi-scale texture entropy map output by the multi-scale texture entropy calculation unit and the edge gradient magnitude map output by the edge gradient calculation unit, and generates a gradient-constrained fusion feature map based on the pixel-by-pixel product of the texture entropy map and the edge gradient magnitude map.

[0021] The main body mask generation unit is used to determine the optimal segmentation threshold based on the fused feature map using the maximum inter-class variance method, and after image binarization, extract the largest connected region in the image as the main tool region through connected component analysis, and generate and output the main tool mask.

[0022] Optionally, the main body mask generation unit includes:

[0023] Global Histogram Construction Subunit: Used to perform grayscale statistics on all pixels in the fused feature map, construct a complete grayscale histogram, and calculate the normalized probability distribution function. ,in Indicates grayscale level;

[0024] The inter-class variance calculation sub-unit is based on the probability distribution function obtained by constructing the sub-unit from the global histogram, and enumerates each possible grayscale threshold in turn. Calculate the inter-class variance between the foreground and background corresponding to the current threshold. ;

[0025] Optimal threshold selection subunit: used to select the inter-class variance from all candidate thresholds. The largest corresponding As the optimal segmentation threshold;

[0026] Binary image generation subunit: used to segment the fused feature map according to the optimal segmentation threshold. Binarization is performed, and all grayscale values ​​are greater than or equal to The pixel is set to 1, below Set the pixels to 0 to output a binary image;

[0027] Connected region extraction sub-unit: used to label the binary image with 8-neighbor connected regions, count the number of pixels in all connected regions, and identify the connected region with the largest area as the candidate region for the main body of the tool, and then generate a binary mask image of the same size.

[0028] Optionally, the wear feature generation module includes a cutting edge area extraction unit, a defect rate calculation unit, a mottled degree calculation unit, and a wear index fusion unit; wherein:

[0029] Edge region extraction unit: Extracts the contour boundary of the tool body based on the tool body mask, selects the edge region located on one side of the tool feed direction, expands it in a strip shape according to the preset width, and extracts the corresponding edge region image from the original image;

[0030] The defect rate calculation unit receives images of the cutting edge area, identifies boundary fractures or gaps, and calculates the cutting edge defect rate by statistically analyzing the ratio between the number of pixels at the defective edge and the length of the intact edge. ;

[0031] The mottledness calculation unit is used to normalize the grayscale mean of the image of the cutting edge region, and to calculate the grayscale standard deviation within a local sliding window. Finally, the mottledness index is calculated by averaging the local standard deviations of the entire cutting edge region. ;

[0032] Wear index fusion unit: used to receive the defect rate With mottled Based on linear normalization, the two are mapped to a unified weight interval, and the tool wear index is calculated by weighted fusion. .

[0033] Optionally, the cutting edge region extraction unit includes:

[0034] Contour boundary extraction subunit: Used to receive the tool body mask, extract the outer boundary point set of the mask, generate a contour polygon sequence, and output the complete boundary in pixel coordinates;

[0035] Feed side identification subunit: It is used to combine the machine tool feed direction vector and the contour polygon sequence to calculate the angle projection value between the normal direction of each boundary point and the feed direction, and select the boundary with the smallest angle with the feed direction as the cutting edge reference boundary.

[0036] Strip-shaped expansion constructs sub-units: Based on the reference boundary output by the feed-side recognition sub-unit, it is equidistantly expanded along its normal direction to form a cutting edge region mask of the same size as the original image;

[0037] Image cropping subunit: used to apply a strip mask to the liquid film interference suppression image, extract the image region composed of corresponding pixels, and output the image as the blade region.

[0038] Optionally, the processing parameter acquisition module includes an industrial communication interface access unit, a parameter mapping and parsing unit, and a parameter time synchronization unit; wherein:

[0039] Industrial communication interface access unit: used to establish a communication connection with the machine tool CNC system through a standardized industrial bus protocol;

[0040] Parameter mapping and parsing unit: used to parse machining parameters from CNC data received from the industrial communication interface access unit, and extract real-time values ​​of spindle speed, feed rate and depth of cut according to field address and protocol definition;

[0041] Parameter time synchronization unit: used to synchronize and bind the acquired processing parameters with the current image acquisition timestamp to form a time-consistent working condition parameter frame.

[0042] Optionally, the adaptive decision-making module includes a working condition node construction unit, a sample classification training unit, and a decision path matching unit; wherein:

[0043] The working condition node construction unit is used to discretize and group all machining scenarios based on the spindle speed, feed rate, and depth of cut provided by the machining parameter acquisition module, constructing a multi-dimensional working condition parameter space, and forming a working condition node with each group of machining parameters; each working condition node is composed of triples. It means that, among them, Main spindle speed; For feed rate; This refers to the depth of cut.

[0044] Sample classification training unit: Tool wear index based on historical working conditions And corresponding wear level labels, train a multi-layer decision tree model; the multi-layer decision tree model uses the working condition node as the basis for the first layer of branches, and under each working condition, according to Numerical classification of wear level ranges;

[0045] Decision path matching unit: Used to receive the current tool wear index during actual operation. and its corresponding operating condition triplet The corresponding working condition node is located in the trained multi-layer decision tree model, and the node threshold is recursively matched along the current path to finally output the corresponding wear level. .

[0046] Optionally, the sample classification training unit includes:

[0047] Sample set construction sub-unit: used to collect spindle speed, feed rate, depth of cut and corresponding tool wear index TWI from historical machining samples, and to construct a training sample set containing working condition features and wear labels.

[0048] Optimal Feature Splitting Subunit: Used to calculate the splitting gain of each feature dimension in the training sample set. By calculating the Gini index gain of the feature dimension, the optimal feature dimension and corresponding threshold are selected to determine the optimal splitting rule of the current node of the decision tree.

[0049] Recursive tree building subunit: used to partition the sample set into subsets according to the optimal partitioning rule, and recursively perform feature selection and node construction until any stopping condition of purity, number of samples or maximum depth is met, thus completing the generation of a multi-level decision tree;

[0050] The pruning optimization subunit is used to prune the complexity of the generated initial decision tree structure and remove overfitting branches.

[0051] Optionally, the visualization output module includes a level color mapping unit, a heatmap construction unit, an image fusion unit, and a report output unit; wherein:

[0052] Wear level color mapping unit: used to receive the wear level output by the adaptive decision module and map it to the corresponding color code according to the preset standard. Different wear levels correspond to different color areas.

[0053] Heatmap construction unit: Used to receive the tool body mask and cutting edge area image output by the wear feature generation module, and color it within the mask area according to the color value corresponding to the wear level to form a basic heatmap layer;

[0054] Image fusion unit: used to overlay the heat map layer with the original liquid film interference suppression image and output an enhanced color visual image;

[0055] Report output unit: Used to combine and format visual images with textual information such as processing parameters, TWI indicators, and wear levels to generate a graphic and textual visualization report.

[0056] The beneficial effects of this invention are:

[0057] This invention, by constructing a multi-module system consisting of liquid film interference suppression, multi-scale tool segmentation, wear feature generation, machining parameter acquisition, adaptive decision-making, and visualization output, achieves full-process linkage from image preprocessing to wear level determination. The system can accurately extract the cutting edge area, quantitatively calculate key wear features such as defect rate and mottledness, and combine real-time machining parameters to complete adaptive identification of wear level using a decision tree model, significantly improving the accuracy of identification and adaptability to working conditions.

[0058] This invention achieves intuitive expression and data output of wear status by overlaying the recognition results into a heat map on the original image and generating a structured visualization report in combination with parameter information. Compared with traditional manual or single-dimensional sensor methods, it has the advantages of high judgment accuracy, fast response speed and high degree of result visualization, effectively supporting intelligent management and maintenance decision-making of tool health status in complex machining environments. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a schematic diagram of a visual recognition system according to an embodiment of the present invention;

[0061] Figure 2 This is a schematic diagram of the adaptive decision-making module according to an embodiment of the present invention. Detailed Implementation

[0062] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.

[0063] It should be noted that the use of terms such as "an embodiment," "an embodiment," "an exemplary embodiment," and "some embodiments" in the specification indicates that the described embodiment may include a specific feature, structure, or characteristic, but not every embodiment necessarily includes that specific feature, structure, or characteristic. Furthermore, when a specific feature, structure, or characteristic is described in connection with an embodiment, implementing such a feature, structure, or characteristic in conjunction with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the art.

[0064] Generally, terms can be understood at least partly from their use in context. For example, depending at least partly on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in a singular sense, or a combination of features, structures, or characteristics in a plural sense. Additionally, the term "based on" can be understood not necessarily to convey an exclusive set of factors, but rather, alternatively, depending at least partly on the context, to allow for the presence of other factors that are not necessarily explicitly described.

[0065] like Figures 1-2 As shown, a visual recognition system for tool wear state of machined parts includes a liquid film interference suppression module, a multi-scale tool segmentation module, a wear feature generation module, a machining parameter acquisition module, an adaptive decision-making module, and a visualization output module; wherein:

[0066] Liquid film interference suppression module: used to acquire polarization image sequences of the tool machining area and generate liquid film interference suppression images by polarization angle fusion;

[0067] Multi-scale tool segmentation module: used to receive liquid film interference suppression images, perform texture entropy segmentation based on edge gradient constraints, and output tool body mask;

[0068] Wear feature generation module: Extracts the edge area image based on the tool body mask, calculates the edge defect rate and surface mottledness, and fuses them to generate tool wear index (TWI).

[0069] Machining parameter acquisition module: used to acquire machine tool machining parameters in real time, including spindle speed, feed rate and depth of cut;

[0070] Adaptive decision module: Based on tool wear indicators and machining parameters, it outputs wear level through working condition matching decision tree;

[0071] Visualization output module: used to map wear levels to a 3D heat map, which is then overlaid onto the original image to generate a visualization report.

[0072] The liquid film interference suppression module includes a polarization image acquisition unit, a polarization channel separation unit, a polarization angle calculation unit, and an image fusion unit; wherein:

[0073] Polarization image acquisition unit: A polarization camera mounted directly above the tool processing area continuously acquires polarization image sequences of the tool processing area at 0°, 45°, 90° and 135° polarization directions at fixed exposure time intervals;

[0074] Polarization channel separation unit: used to receive the polarization image sequence output by the polarization image acquisition unit, extract the intensity matrix corresponding to each polarization direction image, and perform pixel-level alignment;

[0075] Polarization angle calculation unit: Based on the four polarization direction intensity matrices extracted by the polarization channel separation unit, the polarization angle value of each pixel position is calculated pixel by pixel to obtain a spatially continuous polarization angle map; let the polarization angle be... The calculation formula is as follows: ,in, These represent the image pixel intensities corresponding to the polarization directions;

[0076] Image fusion unit: Based on the polarization angle map output by the polarization angle calculation unit, it calculates the polarization consistency factor of each pixel. Using the polarization consistency factor as a weight, it performs weighted fusion on the intensity matrices of different polarization directions to obtain the final liquid film interference suppression image. The calculation formula for the fused image is:

[0077] ,in, For the merged image, For the first Pixel intensity values ​​of images in each polarization direction. The polarization consistency factor corresponding to this pixel is expressed as follows: ,in, , This represents the deviation between the intensity of each polarization direction and the local average polarization intensity. The larger the deviation, the stronger the interference information in the polarization direction, and the higher the weight is. Through the above unit, the system effectively suppresses the reflection interference caused by the liquid film during tool processing, ensuring that the tool image has high clarity and contrast, which is beneficial for the accurate identification and evaluation of tool wear status in the future.

[0078] The multi-scale tool segmentation module includes a multi-scale texture entropy calculation unit, an edge gradient calculation unit, a gradient constraint fusion unit, and a main body mask generation unit; wherein:

[0079] Multi-scale texture entropy calculation unit: This unit receives the liquid film interference suppressed image output by the liquid film interference suppression module. It uses local windows of different sizes to statistically analyze the gray-level co-occurrence matrix (GLCM) of each pixel region in the image, and calculates the texture entropy value at each scale based on the GLCM, generating a multi-scale texture entropy map. The formula for calculating the texture entropy of each pixel at different scales is as follows:

[0080] ,in, For scale Below, pixels Texture entropy value at the location; For scale Below, in pixels Gray levels within the center window and Normalized probability of co-occurrence; The total number of gray levels in the image; A small positive constant used to prevent the zero-value trap in logarithmic calculations, satisfying... ;

[0081] Edge gradient calculation unit: Used to perform gradient filtering on the liquid film interference suppression image, calculating the gradient intensity in the horizontal and vertical directions of the image pixel by pixel, and synthesizing the gradient intensity in the two directions to form an edge gradient magnitude map; the expression for the edge gradient magnitude of each pixel is:

[0082] ,in, For pixels Edge gradient magnitude at the location; For pixels The first-order gradient value in the horizontal direction; For pixels The first-order gradient value in the vertical direction;

[0083] Gradient-constrained fusion unit: Receives the multi-scale texture entropy map output by the multi-scale texture entropy calculation unit and the edge gradient magnitude map output by the edge gradient calculation unit. Based on the pixel-by-pixel product of the texture entropy maps at each scale and the edge gradient magnitude maps, it generates a gradient-constrained fusion feature map; the calculation expression is:

[0084] ,in, For scale Below, pixels fusion feature values;

[0085] The main body mask generation unit is used to determine the optimal segmentation threshold based on the fused feature map using the maximum inter-class variance method. After image binarization, it extracts the largest connected region in the image as the main tool region through connected component analysis, generating and outputting the main tool mask. Through the mathematical calculations and fusion strategies in the above units, the separability of the tool edge and background in the image is effectively enhanced, ensuring the stability and accuracy of the generated main tool mask, providing a reliable foundation for subsequent cutting edge region extraction and wear feature analysis.

[0086] The main mask generation unit includes:

[0087] Global Histogram Construction Subunit: Used to perform grayscale statistics on all pixels in the fused feature map, construct a complete grayscale histogram, and calculate the normalized probability distribution function. ,in Represents gray levels; the expression for the probability distribution function is: ,in, grayscale The normalized probability; The grayscale value in the fused feature map is The number of pixels; The total number of pixels in the fused feature map, i.e. ; For grayscale levels, the value range is... ,in This represents the total number of gray levels in the image (usually 256).

[0088] The inter-class variance calculation sub-unit is based on the probability distribution function obtained by constructing the sub-unit from the global histogram, and enumerates each possible grayscale threshold in turn. Calculate the inter-class variance between the foreground and background corresponding to the current threshold. And record the maximum value; the formula for calculating the inter-class variance is:

[0089] ,in, Threshold The total probability of the following pixels (background); Threshold The total probability of pixels of and above (foreground); These are the average grayscale values ​​for the background and foreground, respectively.

[0090] Optimal threshold selection subunit: used to select the inter-class variance from all candidate thresholds. The largest corresponding As the optimal segmentation threshold;

[0091] Binary image generation subunit: used to segment the fused feature map according to the optimal segmentation threshold. Binarization is performed, and all grayscale values ​​are greater than or equal to The pixel is set to 1, below Set the pixels to 0 to output a binary image;

[0092] The connected component extraction subunit is used to label the binary image with 8-neighbor connected components, count the number of pixels in all connected components, and identify the connected component with the largest area as the candidate region for the main tool. Then, it generates a binary mask image of the same size, which is used as the final mask for the main tool and output to the wear feature generation module. Through the joint operation of the above subunits, the global optimal threshold can be automatically selected based on the fused feature map, and the main tool region can be accurately extracted using the connected component analysis method. Background interference and isolated noise points are removed, providing a mask with a stable structure and clear boundaries for subsequent cutting edge feature localization and wear index calculation.

[0093] After the fused feature map is binarized using the Otsu's method, the image typically contains multiple independent white regions (with a value of 1). These regions include the tool body area, false detection areas caused by high background reflectivity or texture protrusions, image edges, and small connected structures caused by isolated noise points. To retain only the structural regions that truly belong to the tool, it is necessary to identify the region with the largest spatial area and coherent structure from all white connected regions, i.e., the tool body. This requires identification of the binary image using connected component analysis techniques. Compared to the 4-neighborhood labeling method, the 8-neighborhood labeling method can determine whether pixels are connected in eight directions (up, down, left, right, and diagonal), making the connected regions more continuous and the boundaries more complete. By using the 8-neighborhood connected component labeling method to perform structural recognition on the binary image, it is possible to effectively distinguish the tool from non-target regions, ensuring that the final generated tool body mask has good connectivity, boundary integrity, and positioning accuracy, providing clear target region segmentation results for subsequent edge extraction and wear index analysis.

[0094] The wear feature generation module includes a cutting edge area extraction unit, a defect rate calculation unit, a mottled degree calculation unit, and a wear index fusion unit; among which:

[0095] Edge region extraction unit: Extracts the contour boundary of the tool body based on the tool body mask, selects the edge region located on one side of the tool feed direction, expands it in a strip shape according to the preset width, and extracts the corresponding edge region image from the original image for subsequent analysis;

[0096] The defect rate calculation unit receives images of the cutting edge area, identifies boundary fractures or gaps, and calculates the cutting edge defect rate by statistically analyzing the ratio between the number of pixels at the defective edge and the length of the intact edge. Its expression is: ,in, This indicates the number of pixels identified as defective within the edge of the cutting edge. This represents the theoretical total number of pixels at the edge of the cutting edge;

[0097] The mottledness calculation unit is used to normalize the grayscale mean of the image of the cutting edge region, and to calculate the grayscale standard deviation within a local sliding window. Finally, the mottledness index is calculated by averaging the local standard deviations of the entire cutting edge region. Its expression is: ,in, Indicates the first The standard deviation of gray levels in a sliding window Indicates the total number of sliding windows;

[0098] Wear index fusion unit: used to receive the defect rate With mottled Based on linear normalization, the two are mapped to a unified weight interval, and the tool wear index is calculated by weighted fusion. Its expression is:

[0099] ,in, , The preset weighting coefficients for the system satisfy... This system is used to balance the combined impact of edge structure defects and surface texture degradation on the overall wear level. Through the collaborative processing of the above units, the system can accurately extract edge information from the main area of ​​the tool and quantitatively calculate two types of typical wear characteristics. Finally, it is integrated to form a unified index that reflects the true wear state of the tool, providing a stable, continuous, and quantifiable input basis for subsequent working condition matching and wear level determination.

[0100] Table 1 Weighting of Wear Feature Fusion

[0101] Wear level conditions Defect rate weight α Mottle weight β Application Notes D < 0.10 and B < 8 0.3 0.7 In the early stages of surface wear, the main feature is mottled changes. D∈[0.10,0.30] or B∈[8,15] 0.5 0.5 In the moderate wear stage, structural damage and surface aging coexist. D>0.30 or B>15 0.7 0.3 In the later wear stage, structural gaps dominate performance degradation.

[0102] By using the aforementioned preset weight configuration table, the influence of the two factors can be adaptively adjusted according to the actual range of the cutting edge defect rate and surface mottledness, thereby achieving a more reasonable assessment of the tool wear condition and improving the responsiveness and physical reliability of the wear index.

[0103] The cutting edge region extraction unit includes:

[0104] Contour boundary extraction subunit: Used to receive the tool body mask, extract the outer boundary point set of the mask, generate a contour polygon sequence, and output the complete boundary in pixel coordinates;

[0105] Feed-side identification subunit: This unit combines the machine tool feed direction vector with the contour polygon sequence to calculate the projection value of the angle between the normal direction and the feed direction at each boundary point, selecting the boundary with the smallest angle to the feed direction as the cutting edge reference boundary. Specifically, the formula for calculating the projection value of each boundary point is as follows: ,in, The normal vector of the boundary point; The feed direction vector set for the machine tool; This represents the vector dot product operation; This is the projected value; a larger value indicates that the normal of the boundary point is more consistent with the feed direction. (This applies to all...) The boundary with the largest value is connected to form a line as the reference boundary for the cutting edge;

[0106] Strip-shaped expansion constructs sub-units: Based on the reference boundary output by the feed-side recognition sub-unit, it is equidistantly expanded along its normal direction to form a blade edge region mask of the same size as the original image; for any point on the boundary, the calculation method for each point in its expanded strip region is as follows: ,in, ,in, These are the original boundary points on the reference boundary; This is the normal vector of the boundary point, pointing outwards from the cutting edge; The length of the strip extension is a variable, ranging from 0 to the preset bandwidth. ; These are the coordinates of the corresponding pixel points within the strip region; through all of the above... The dots form a closed mask, generating a complete blade-edge strip area;

[0107] Image cropping subunit: This subunit is used to apply a strip mask to the liquid film interference suppression image, extract the image region composed of corresponding pixels, and output the cutting edge region image for subsequent defect and mottled feature extraction. By introducing a feed side boundary determination mechanism based on normal projection calculation and a strip region expansion method, the above subunit not only ensures that the extracted cutting edge region strictly corresponds to the actual processing direction, but also effectively avoids interference from non-working edges, thereby improving the pertinence and robustness of subsequent wear feature extraction.

[0108] The processing parameter acquisition module includes an industrial communication interface access unit, a parameter mapping and parsing unit, and a parameter time synchronization unit; wherein:

[0109] Industrial communication interface access unit: used to establish a communication connection with the machine tool CNC system (CNC controller) through standardized industrial bus protocols, supporting Modbus TCP / IP, EtherCAT or Profinet protocols to ensure the real-time performance and compatibility of data transmission;

[0110] Parameter mapping parsing unit: Used to parse machining parameters from CNC data received from the industrial communication interface access unit, and extract real-time values ​​of spindle speed, feed rate, and depth of cut according to field address and protocol definition. Spindle speed is parsed from the real-time spindle speed register value, in rpm; feed rate is parsed from the feed rate per minute field, in mm / min; depth of cut is calculated from the difference between the current Z-axis tool position and the initial reference surface, in mm.

[0111] The parameter time synchronization unit is used to synchronize and bind the acquired machining parameters with the current image acquisition timestamp to form a time-consistent working condition parameter frame, which is then output to the adaptive decision module. Through the synergistic effect of the above units, the system can accurately and stably acquire machining parameters from the CNC system in real time and complete the time alignment processing of the image and working condition data, providing a complete working condition background and criterion basis for subsequent wear level judgment.

[0112] The adaptive decision-making module includes a working condition node construction unit, a sample classification training unit, and a decision path matching unit; wherein:

[0113] The working condition node construction unit is used to discretize and group all machining scenarios based on the spindle speed, feed rate, and depth of cut provided by the machining parameter acquisition module, constructing a multi-dimensional working condition parameter space, and forming a working condition node with each group of machining parameters; each working condition node is composed of triples. It means that, among them, Main spindle speed; For feed rate; This refers to the depth of cut.

[0114] Sample classification training unit: Tool wear index based on historical working conditions And corresponding wear level labels, train a multi-layer decision tree model; the multi-layer decision tree model uses the working condition node as the basis for the first layer of branches, and under each working condition, according to Numerical division of wear level ranges enables condition-sensitive classification modeling.

[0115] Decision path matching unit: Used to receive the current tool wear index during actual operation. and its corresponding operating condition triplet The corresponding working condition node is located in the trained multi-layer decision tree model, and the node threshold is recursively matched along the current path to finally output the corresponding wear level. The wear level is divided into multiple level ranges. The wear level is determined by the TWI threshold mapping. Through the collaborative work of the above units, the system can adaptively select the appropriate wear evaluation path according to the dynamic changes of the processing scenario, which improves the adaptability of wear identification to complex working conditions and the stability of the classification boundary, ensuring that the output wear level results are both engineering reliable and real-time.

[0116] The sample classification training unit includes:

[0117] Sample set construction sub-unit: used to collect spindle speed, feed rate, depth of cut and corresponding tool wear index TWI from historical machining samples, and to construct a training sample set containing working condition features and wear labels.

[0118] Optimal Feature Splitting Subunit: Used to calculate the splitting gain for each feature dimension in the training sample set. By calculating the Gini index gain of the feature dimension, the optimal feature dimension and its corresponding threshold are selected to determine the optimal splitting rule for the current node of the decision tree. (Gini index gain) The calculation formula is:

[0119] ,in, For dataset The Gini index before the division; The first segment after being divided according to the feature threshold A subset; Indicates the number of subsets after partitioning;

[0120] Recursive tree building subunit: used to partition the sample set into subsets according to the optimal partitioning rule, and recursively perform feature selection and node construction until any stopping condition of purity, number of samples or maximum depth is met, thus completing the generation of a multi-level decision tree;

[0121] The pruning optimization subunit is used to prune the complexity of the generated initial decision tree structure, remove overfitting branches, and improve the model's generalization ability. Its pruning evaluation function is: ,in, To verify the set error, The number of leaf nodes, The complexity weight coefficient is used. Through the synergistic effect of the above sub-units, the system can effectively construct a multi-layer decision tree model with stable training and good generalization ability, ensuring that the decision results are accurate, robust and easy to match with actual working conditions, thereby realizing reliable and adaptive evaluation of tool wear status.

[0122] The following is a complete example of a working condition matching decision:

[0123] Assume spindle speed 3200, feed rate 280, depth of cut The tool wear index is 1.0. It is 0.37;

[0124] The decision-making process is as follows:

[0125] Step 1: Perform working condition node matching. Based on the input parameters, locate the matching working condition node in the working condition space. This node represents a machining scenario with medium spindle speed, medium feed rate, and medium depth of cut;

[0126] Step 2: Enter subtree matching, at the working condition node The following decision paths have been trained, using TWI as the basis for splitting:

[0127] like Output level Slight wear;

[0128] like Output level Moderate wear;

[0129] like Output level Severe wear;

[0130] Step 3: The currently input tool wear index is ,satisfy: Therefore, the system matched the corresponding path and output the wear level result as follows: Moderate wear.

[0131] Table 2 Working Condition Node Matching Rules Table

[0132] Working condition node number Gi Spindle speed range n feed range f Cutting depth range d Operating condition description G1 n<2000 f<150 d<0.5 Low speed / low feed / shallow cutting conditions G2 2000≤n<3000 f<150 d<0.5 Medium speed / low feed / shallow cutting conditions G3 n≥3000 f<150 d<0.5 High-speed / low-feed / shallow-cutting conditions G4 n<2000 150≤f<300 0.5≤d<1.5 Low speed / medium feed / medium cutting conditions G5 2000≤n<3000 150≤f<300 0.5≤d<1.5 Medium speed / medium feed / medium cutting conditions G6 n≥3000 150≤f<300 0.5≤d<1.5 High-speed / medium feed / medium cutting conditions G7 2000≤n<3500 250≤f<400 d≥1.5 Medium-high speed / high feed / deep cutting conditions G8 n≥3500 f≥400 d≥1.5 High-speed / high-feed / heavy-load deep cutting conditions

[0133] Table 2 above shows that continuous processing parameters can be discretized and mapped to finite working condition nodes. The system can quickly construct a hierarchical decision structure for working conditions, reduce redundant model calculations, improve the efficiency and accuracy of wear judgment under multiple working conditions, and has good scalability and real-time response capabilities.

[0134] The visualization output module includes a level color mapping unit, a heatmap construction unit, an image fusion unit, and a report output unit; among which:

[0135] Level color mapping unit: used to receive the wear level output by the adaptive decision module, map it to the corresponding color code according to the preset standard, and different wear levels correspond to different color areas for subsequent heat map coloring;

[0136] Heatmap construction unit: Used to receive the tool body mask and cutting edge area image output by the wear feature generation module, and color it within the mask area according to the color value corresponding to the wear level to form a basic heatmap layer;

[0137] Image fusion unit: used to overlay the heat map layer with the original liquid film interference suppression image, while maintaining the original structural texture and enhancing the visual recognition effect of the wear area, and outputting an enhanced color visual image;

[0138] Report output unit: This unit combines visual images with textual information such as machining parameters, TWI indicators, and wear levels to generate a graphically visualized report, supporting export in image or document format. Through the streamlined processing of the above units, the system can intuitively reflect the degree of wear with color, enhancing the recognizability of wear areas in the image. At the same time, it combines parameter data to output a comprehensive report, providing operators with a fast, accurate, and graphical reference for tool health status.

[0139] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0140] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A visual recognition system of tool wear state of a machined piece, characterized in that, It includes a liquid film interference suppression module, a multi-scale tool segmentation module, a wear feature generation module, a machining parameter acquisition module, an adaptive decision-making module, and a visualization output module; among which: Liquid film interference suppression module: used to acquire polarization image sequences of the tool machining area and generate liquid film interference suppression images by polarization angle fusion; Multi-scale tool segmentation module: used to receive liquid film interference suppression images, perform texture entropy segmentation based on edge gradient constraints, and output tool body mask; Wear feature generation module: Extracts the image of the cutting edge area based on the tool body mask, calculates the cutting edge defect rate and surface mottledness, and fuses them to generate tool wear index; Machining parameter acquisition module: used to acquire machine tool machining parameters in real time, including spindle speed, feed rate and depth of cut; Adaptive decision module: Based on tool wear indicators and machining parameters, it outputs wear level through working condition matching decision tree; Visualization output module: used to map wear levels to a 3D heat map, which is then overlaid onto the original image to generate a visualization report.

2. A visual recognition system of a machining tool wear state according to claim 1, characterized in that, The liquid film interference suppression module includes a polarization image acquisition unit, a polarization channel separation unit, a polarization angle calculation unit, and an image fusion unit; wherein: Polarization image acquisition unit: A polarization camera mounted directly above the tool processing area continuously acquires polarization image sequences of the tool processing area at 0°, 45°, 90° and 135° polarization directions at fixed exposure time intervals; Polarization channel separation unit: used to receive the polarization image sequence output by the polarization image acquisition unit, extract the intensity matrix corresponding to each polarization direction image, and perform pixel-level alignment; Polarization angle calculation unit: Based on the four polarization direction intensity matrices extracted by the polarization channel separation unit, the polarization angle value of each pixel position is calculated pixel by pixel to obtain a spatially continuous polarization angle map; Image fusion unit: Based on the polarization angle map output by the polarization angle calculation unit, calculates the polarization consistency factor of each pixel, and uses the polarization consistency factor as the weight to perform weighted fusion of the intensity matrices of different polarization directions to obtain the final liquid film interference suppression image.

3. A visual recognition system of tool wear condition of a machined part according to claim 1, characterized in that, The multi-scale tool segmentation module includes a multi-scale texture entropy calculation unit, an edge gradient calculation unit, a gradient constraint fusion unit, and a main body mask generation unit; wherein: Multi-scale texture entropy calculation unit: It receives the liquid film interference suppression image output by the liquid film interference suppression module, uses local windows of different sizes to count the gray-level co-occurrence matrix in each pixel region of the image, and calculates the texture entropy value at each scale based on the gray-level co-occurrence matrix to generate a multi-scale texture entropy map. Edge gradient calculation unit: used to perform gradient filtering on the liquid film interference suppression image, calculate the gradient intensity of the image in the horizontal and vertical directions pixel by pixel, and form an edge gradient magnitude map by synthesizing the gradient intensity in the two directions; Gradient-constrained fusion unit: It receives the multi-scale texture entropy map output by the multi-scale texture entropy calculation unit and the edge gradient magnitude map output by the edge gradient calculation unit, and generates a gradient-constrained fusion feature map based on the pixel-by-pixel product of the texture entropy map and the edge gradient magnitude map. The main body mask generation unit is used to determine the optimal segmentation threshold based on the fused feature map using the maximum inter-class variance method, and after image binarization, extract the largest connected region in the image as the main tool region through connected component analysis, and generate and output the main tool mask.

4. A visual recognition system of a machining tool wear state according to claim 3, characterized in that, The main mask generation unit includes: A global histogram construction subunit is configured to perform gray scale statistics on all pixels in the fused feature map, construct a complete gray scale histogram, and calculate a normalized probability distribution function wherein represents a gray scale level. The inter-class variance calculation sub-unit: based on the probability distribution function obtained by the global histogram construction sub-unit, enumerating each possible gray threshold value in turn , calculating the inter-class variance of the foreground and the background corresponding to the current threshold value ; optimal threshold selection subunit: for selecting the inter-class variance from all candidate thresholds corresponding to the maximum as the optimal segmentation threshold The binary image generation subunit is configured to binarize the fused feature map according to the optimal segmentation threshold value all pixels with a gray value greater than or equal to are set to 1, and pixels with a gray value less than are set to 0, and output a binary image Connected region extraction sub-unit: used to label the binary image with 8-neighbor connected regions, count the number of pixels in all connected regions, and identify the connected region with the largest area as the candidate region for the main body of the tool, and then generate a binary mask image of the same size.

5. A visual recognition system of tool wear condition of a machined part according to claim 1, characterized in that, The wear feature generation module includes a cutting edge region extraction unit, a defect rate calculation unit, a mottled degree calculation unit, and a wear index fusion unit; wherein: Edge region extraction unit: Extracts the contour boundary of the tool body based on the tool body mask, selects the edge region located on one side of the tool feed direction, expands it in a strip shape according to the preset width, and extracts the corresponding edge region image from the original image; The defect rate calculation unit is configured to receive the edge region image, identify the boundary fracture or gap region, and calculate the edge defect rate by counting the ratio between the number of defective edge pixels and the length of the complete edge ; The mottling degree calculation unit is used for carrying out gray mean value normalization processing on the edge region image, and is used for calculating the gray standard deviation in a local sliding window, and finally calculates the mottling degree index through the average value of all local standard deviations of the entire edge region ; wear indicator fusion unit: for receiving a fraction defective and patchiness , mapping both to a uniform weight interval according to linear normalization, calculating a tool wear indicator by weighted fusion .

6. A visual recognition system of a machining tool wear state according to claim 5, characterized in that, The cutting edge region extraction unit includes: Contour boundary extraction subunit: Used to receive the tool body mask, extract the outer boundary point set of the mask, generate a contour polygon sequence, and output the complete boundary in pixel coordinates; Feed side identification subunit: It is used to combine the machine tool feed direction vector and the contour polygon sequence to calculate the angle projection value between the normal direction of each boundary point and the feed direction, and select the boundary with the smallest angle with the feed direction as the cutting edge reference boundary. Strip-shaped expansion constructs sub-units: Based on the reference boundary output by the feed-side recognition sub-unit, it is equidistantly expanded along its normal direction to form a cutting edge region mask of the same size as the original image; Image cropping subunit: used to apply a strip mask to the liquid film interference suppression image, extract the image region composed of corresponding pixels, and output the image as the blade region.

7. A visual recognition system of tool wear condition of a machined part according to claim 1, characterized in that, The processing parameter acquisition module includes an industrial communication interface access unit, a parameter mapping and parsing unit, and a parameter time synchronization unit; wherein: Industrial communication interface access unit: used to establish a communication connection with the machine tool CNC system through a standardized industrial bus protocol; Parameter mapping and parsing unit: used to parse machining parameters from CNC data received from the industrial communication interface access unit, and extract real-time values ​​of spindle speed, feed rate and depth of cut according to field address and protocol definition; Parameter time synchronization unit: used to synchronize and bind the acquired processing parameters with the current image acquisition timestamp to form a time-consistent working condition parameter frame.

8. A visual recognition system of tool wear condition of a machined part according to claim 1, characterized in that, The adaptive decision-making module includes a working condition node construction unit, a sample classification training unit, and a decision path matching unit; wherein: The working condition node construction unit is configured to discretize and group all machining scenes according to spindle speed, feed rate and cutting depth provided by the machining parameter acquisition module, construct a multi-dimensional working condition parameter space, and construct a working condition node for each group of machining parameters; each working condition node is represented by a triple wherein, is the spindle speed; is the feed rate; is the cutting depth; Sample classification training unit: Tool wear index based on historical working conditions And corresponding wear level labels, train a multi-layer decision tree model; the multi-layer decision tree model uses the working condition node as the basis for the first layer of branches, and under each working condition, according to Numerical classification of wear level ranges; Decision path matching unit: Used to receive the current tool wear index during actual operation. and its corresponding operating condition triplet The corresponding working condition node is located in the trained multi-layer decision tree model, and the node threshold is recursively matched along the current path to finally output the corresponding wear level. .

9. A visual recognition system for tool wear state of machined parts according to claim 8, characterized in that, The sample classification training unit includes: Sample set construction sub-unit: used to collect spindle speed, feed rate, depth of cut and corresponding tool wear index TWI from historical machining samples, and to construct a training sample set containing working condition features and wear labels. Optimal Feature Splitting Subunit: Used to calculate the splitting gain of each feature dimension in the training sample set. By calculating the Gini index gain of the feature dimension, the optimal feature dimension and corresponding threshold are selected to determine the optimal splitting rule of the current node of the decision tree. Recursive tree building subunit: used to partition the sample set into subsets according to the optimal partitioning rule, and recursively perform feature selection and node construction until any stopping condition of purity, number of samples or maximum depth is met, thus completing the generation of a multi-level decision tree; The pruning optimization subunit is used to prune the complexity of the generated initial decision tree structure and remove overfitting branches.

10. A visual recognition system for tool wear state of machined parts according to claim 1, characterized in that, The visualization output module includes a level color mapping unit, a heatmap construction unit, an image fusion unit, and a report output unit; wherein: Wear level color mapping unit: used to receive the wear level output by the adaptive decision module and map it to the corresponding color code according to the preset standard. Different wear levels correspond to different color areas. Heatmap construction unit: Used to receive the tool body mask and cutting edge area image output by the wear feature generation module, and color it within the mask area according to the color value corresponding to the wear level to form a basic heatmap layer; Image fusion unit: used to overlay the heat map layer with the original liquid film interference suppression image and output an enhanced color visual image; Report output unit: Used to combine and format visual images with textual information such as processing parameters, TWI indicators, and wear levels to generate a graphic and textual visualization report.