A method and a detection system for detecting the cutting accuracy of a milling cutter

By preprocessing and feature extraction of milling cutter images, combining cutting speed and feed rate, the milling cutter loss degree is evaluated using the support vector machine model, which solves the problems of high cost and low efficiency of milling cutter cutting accuracy detection in the prior art, and realizes real-time and accurate cutting accuracy evaluation.

CN118864429BActive Publication Date: 2025-07-18DONGGUAN XINBANG CNC TOOLS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411043815.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-07-18
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In the prior art, milling cutter cutting accuracy detection requires high-precision measurement equipment and can only be performed after cutting, and the use status of milling cutters cannot be monitored in real time, resulting in high detection cost and low efficiency.

Method used

By acquiring the original image of the milling cutter, performing grayscale processing, filtering and local thresholding, identifying the loss area profile, and combining cutting speed and feed rate, the loss degree and cutting accuracy of the milling cutter is evaluated using the support vector machine model.

Benefits of technology

It realizes low-cost and efficient milling cutter cutting accuracy detection, which can monitor the milling cutter status in real time, simplify the inspection process and improve the detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864429B_ABST
    Figure CN118864429B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and a detection system for detecting the cutting accuracy of a milling cutter, including obtaining an original image of the milling cutter to be measured, performing grayscale processing on it, filtering the grayscale image using a median filter, and performing local threshold processing on the filtered image to obtain a first image; detecting the contour of the first image using an edge detection algorithm, screening out the contour of the wear area according to the size and shape of the contour, and filling the contour of the wear area to obtain a second image; extracting features from the second image, inputting the extracted features into a preset support vector machine model to obtain the wear degree of the milling cutter to be measured; obtaining the cutting speed and feed rate of the milling cutter to be measured, and determining the cutting accuracy according to the cutting speed, feed rate and wear degree of the milling cutter to be measured. The present invention can quickly and accurately detect the wear degree of the milling cutter, and calculate the cutting accuracy according to the cutting speed, feed rate and wear degree, and has the advantages of low cost, short time consumption and high detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of milling cutter cutting accuracy detection, and particularly to a milling cutter cutting accuracy detection method and detection system. Background Art

[0002] In the metal processing industry, as an important cutting tool, the usage condition of a milling cutter directly affects the processing quality and production efficiency. At present, for the detection of the cutting accuracy of a milling cutter, it is mostly based on directly measuring the cut object. For example, detecting the surface roughness of the cut item to reflect the cutting accuracy of the milling cutter. However, this method usually requires high-precision measuring equipment to measure the surface condition of the cut object. The measuring process is complex and requires a large amount of time, manpower, and material resources, which will greatly increase the detection cost of the milling cutter cutting accuracy. In addition, this method can only evaluate the cutting result after cutting, and cannot monitor the usage state of the milling cutter in real time, resulting in limited ability to predict the future performance of the milling cutter, thereby affecting the energy efficiency in subsequent work, and having strong limitations. Summary of the Invention

[0003] In order to solve at least one of the above-mentioned technical problems, the present invention provides a milling cutter cutting accuracy detection method and detection system.

[0004] In a first aspect, the present invention provides a milling cutter cutting accuracy detection method, and the method includes:

[0005] Obtain the original image of the milling cutter to be measured, perform grayscale processing on the original image, filter the grayscale image using a median filter, and perform local threshold processing on the filtered image to obtain a first image;

[0006] Detect the contour of the first image using an edge detection algorithm, screen out the contour of the wear area according to the size and shape of the contour, and fill the contour of the wear area to obtain a second image;

[0007] Extract features from the second image, input the extracted features into a preset support vector machine model to obtain the wear degree of the milling cutter to be measured;

[0008] Obtain the cutting speed and feed rate of the milling cutter to be measured, and determine the cutting accuracy according to the cutting speed, feed rate, and wear degree of the milling cutter to be measured.

[0009] Preferably, before performing local threshold processing on the filtered image, it includes:

[0010] Convert the filtered image to the frequency domain according to the Fourier transform, and identify the frequency components of the stripe noise of the milling cutter to be measured;

[0011] Remove the frequency components of the stripe noise through a mask, and convert the image back to the spatial domain through the inverse Fourier transform.

[0012] Preferably, the median filter is used to filter the grayscale image, and local threshold processing is performed on the filtered image, including:

[0013] Divide the grayscale image into multiple windows, and select any one of them as the target window;

[0014] Obtain the grayscale histogram of the pixel points in the target window, and use the OSTU algorithm to identify the grayscale value that maximizes the between-class variance as the grayscale threshold;

[0015] Divide the pixel points in the target window into a foreground area and a background area according to the grayscale threshold, and calculate the degree of grayscale change based on the background area and the foreground area:

[0016]

[0017] In the formula, c is the degree of grayscale change, is the average grayscale value of the background area, is the average grayscale value of the foreground area, and g0 is the grayscale threshold;

[0018] Judge whether the degree of grayscale change is greater than a preset threshold; if so, then is used as the new grayscale threshold, and the remaining windows are processed; if not, then is used as the local threshold of the target window, and the remaining windows are processed.

[0019] Preferably, the feature extraction of the second image includes:

[0020] Use a detection frame to perform partition feature extraction on the second image to obtain multiple feature sub-images;

[0021] Obtain a preset convolutional neural network model, and use multi-scale feature fusion to extract the texture features, spectral features, and spatial distribution features of each feature sub-image at different scales to generate an original feature set;

[0022] Among them, the convolutional neural network model is added with an attention mechanism for assigning weights to different features in the original feature set and sorting the importance of each feature through feature selection;

[0023] Based on the result of the feature importance ranking, select the target features that meet the preset conditions to generate a target feature set. Preferably, the determination of the cutting accuracy according to the cutting speed, feed rate, and wear degree of the milling cutter to be measured includes:

[0024] P = a×e -w + bln(v) + cln(f) + k

[0025] Wherein, P represents the cutting accuracy, w, v, and f respectively represent the wear degree, cutting speed, and feed rate; a, b, and c respectively represent the influence intensities of the wear degree, cutting speed, and feed rate on the cutting accuracy, all of which are obtained by fitting using a non - linear regression algorithm; k is a constant term, representing the cutting accuracy when the wear degree, cutting speed, and feed rate are all zero; e represents the base of the natural logarithm.

[0026] In a second aspect, the present invention also provides a milling cutter cutting accuracy detection system, which includes:

[0027] A filtering processing unit, configured to obtain the original image of the milling cutter to be measured, perform grayscale processing on the original image, filter the grayscale image using a median filter, and perform local threshold processing on the filtered image to obtain a first image;

[0028] A contour extraction unit, configured to detect the contour of the first image using an edge detection algorithm, screen out the wear area contour according to the size and shape of the contour, and fill the wear area contour to obtain a second image;

[0029] A wear degree prediction unit, configured to extract features from the second image, input the extracted features into a preset support vector machine model, and obtain the wear degree of the milling cutter to be measured;

[0030] A cutting accuracy determination unit, configured to obtain the usage parameters of the milling cutter to be measured, including cutting speed, feed rate, and usage duration; and determine the cutting accuracy according to the usage parameters and wear degree of the milling cutter to be measured.

[0031] In a third aspect, the present invention also provides an electronic device, including a processor and a memory. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method according to the first aspect and any one of its possible implementation manners as described above.

[0032] In a fourth aspect, the present invention also provides a computer - readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by the processor of an electronic device, the processor is caused to execute the method according to the first aspect and any one of its possible implementation manners as described above.

[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0034] 1) When detecting the cutting accuracy of the milling cutter, the present invention mainly evaluates the wear degree of the milling cutter first, and then monitors the cutting speed and feed rate of the milling cutter in the working state, and jointly determines the cutting accuracy according to the cutting speed, feed rate and wear degree of the milling cutter. Through this indirect measurement method, compared with evaluating the cutting accuracy from the perspective of the cutting object, there is no need to conduct a large number of experiments to collect data for testing, which greatly simplifies the detection process and can save costs while taking into account the measurement results of the cutting accuracy.

[0035] 2) When evaluating the degree of wear, the present invention first obtains the original image of the milling cutter to be tested, grays the original image, filters the grayed image using a median filter, and performs local threshold processing on the filtered image to obtain a first image; through image preprocessing steps such as grayscaling, median filtering, and local threshold processing, image noise can be effectively removed and image quality can be improved. By performing edge detection on the preprocessed image and screening out the contour of the wear area according to the size and shape of the contour, the wear part of the milling cutter can be accurately identified.

[0036] 3) The present invention uses multi-scale feature fusion to extract the texture features, spectral features and spatial distribution features of each feature sub-graph at different scales, and uses the attention mechanism to select important features, which can greatly increase the quality of feature extraction and avoid the interference of redundant features to improve the prediction accuracy. By inputting the extracted features into the preset support vector machine model, the extracted important features can be classified, and the degree of milling cutter loss can be quickly and accurately evaluated, providing a reliable basis for subsequent cutting accuracy evaluation.

[0037] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0039] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.

[0040] Figure 1 A schematic diagram of a flow chart of a method for detecting cutting accuracy of a milling cutter provided in an embodiment of the present invention;

[0041] Figure 2 A certain embodiment of the present invention provides Figure 1 Schematic diagram of the process of the sub-steps of step S10;

[0042] Figure 3 For another embodiment of the present invention Figure 1 The flowchart of the sub - steps of step S10 in

[0043] Figure 4 The structural schematic diagram of a milling cutter cutting accuracy detection system provided by an embodiment of the present invention. Specific embodiments

[0044] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0045] The mention of "embodiment" in this article means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various positions in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0046] Currently, the detection of the cutting accuracy of a milling cutter is mostly based on the cutting object for measurement. This method can only be carried out after cutting, and cannot monitor the usage status of the milling cutter in real time to evaluate the subsequent performance of the milling cutter. At the same time, the measurement cost is high and the efficiency is low. For this reason, the present invention provides a method for detecting the cutting accuracy of a milling cutter, which can evaluate the wear degree of the milling cutter, and accurately calculate the cutting accuracy by combining the wear degree, cutting speed and feed rate, and has the advantages of low cost, high efficiency and high accuracy.

[0047] Please refer to Figure 1 , Figure 1 The flowchart of a method for detecting the cutting accuracy of a milling cutter provided by an embodiment of the present invention. As Figure 1 shown, the method includes:

[0048] S10. Obtain the original image of the milling cutter to be measured, perform gray - scale processing on the original image, filter the gray - scaled image using a median filter, and perform local threshold processing on the filtered image to obtain a first image.

[0049] First, take an image of the milling cutter to be measured using a camera or scanner. Ensure that the image is clear and the light is uniform during shooting to avoid overexposure or underexposure. Grayscale processing is the process of converting a color image into a grayscale image. A grayscale image only has grayscale values and no color information, which helps to simplify the image processing process and reduce the computational amount. Preferably, grayscale processing can take the average value of the RGB values of each pixel as the grayscale value. Through grayscale processing, the complexity of image processing can be reduced, converting it into a single-channel image, and the grayscale image can better display the contrast and details in the image, which is more conducive to edge detection, threshold processing, etc. in subsequent processing.

[0050] In one embodiment, a median filter is used to filter the grayscale image, and local threshold processing is performed on the filtered image, including:

[0051] Divide the grayscale image into multiple windows, and select any one of them as the target window;

[0052] Obtain the grayscale histogram of the pixel points in the target window, and use the OSTU algorithm to identify the grayscale value that maximizes the between-class variance as the grayscale threshold;

[0053] Divide the pixel points in the target window into a foreground region and a background region according to the grayscale threshold, and calculate the degree of grayscale change based on the background region and the foreground region:

[0054]

[0055] In the formula, c is the degree of grayscale change, is the average grayscale value of the background region, is the average grayscale value of the foreground region, and g0 is the grayscale threshold;

[0056] Judge whether the degree of grayscale change is greater than a preset threshold; if so, then is used as the new grayscale threshold, and the remaining windows are processed; if not, then is used as the local threshold of the target window, and the remaining windows are processed.

[0057] The median filter is a non-linear filter that removes noise by sliding a window over the image and calculating the median of the pixel values within the window at each position. For example, the median filter is very effective in removing salt-and-pepper noise because it replaces the value of the central pixel by selecting the median instead of the average value. Even if the window contains noise points, the median is less likely to be affected by them. Compared with the mean filter, the median filter can better preserve the edges and details of the image because the median filter does not smooth out the pixel values at the edges, but selects the pixel values adjacent to the edges, thus retaining the details of the edges. When the sliding window covers the stripe noise, the median filter tends to select the values of the surrounding normal pixels as the median, thus removing or weakening the influence of the stripe noise. Therefore, filtering by the median filter can greatly improve the image quality.

[0058] Specifically, in this embodiment, first, the grayscale image is divided into multiple windows, and any one of them is selected as the target window; then, the grayscale histogram of the pixel points in the target window is obtained, and the OSTU algorithm is used to identify the grayscale value that maximizes the between-class variance as the grayscale threshold. The OSTU algorithm is a commonly used automatic threshold selection method, which can facilitate subsequent image feature extraction, etc. By traversing all the thresholds, a grayscale threshold that can maximize the between-class variance is found, and this threshold should be set as the optimal grayscale threshold. Further, according to the grayscale threshold, the pixel points in the target window are divided into a foreground region and a background region, and the degree of grayscale change is calculated according to the above formula, and it is judged whether it is greater than a preset threshold to decide whether to adjust the grayscale threshold. If it is greater, then is used as the new grayscale threshold, that is, based on the grayscale average value of the background region and the grayscale average value of the foreground region, and then the average value of the two is taken, and the previously set grayscale threshold is updated using this value. Then, for the remaining windows, the same method is used for processing. Conversely, if the degree of grayscale change does not exceed the preset threshold, then is used as the local threshold of the target window, and the remaining windows are processed in the same way. After processing all the windows, the first image can be generated.

[0059] It should be noted that the milling cutter stripe noise has a greater impact on the loss degree evaluation. For example:

[0060] Reducing contrast: The stripe noise reduces the contrast between the milling cutter loss area and the background in the image, making it difficult to accurately identify the loss area.

[0061] Increasing false detection: The stripe noise may lead to incorrect edge detection and feature extraction, thus affecting the correct segmentation of the loss area.

[0062] Affecting threshold processing: The stripe noise will affect the selection of the automatic threshold, which may lead to inaccurate binarization results and affect the subsequent loss evaluation.

[0063] Although the above steps use median filtering to eliminate stripe noise to a certain extent, due to the directionality and periodicity of stripe noise, the denoising effect of median filtering is relatively limited, which in turn leads to the subsequent steps. Therefore, in one embodiment, before performing local threshold processing on the filtered image, steps S01 and S02 are further included, as Figure 2 shown below:

[0064] S01. Convert the filtered image to the frequency domain according to the Fourier transform, and identify the frequency components of the stripe noise of the milling cutter to be measured;

[0065] S02. Remove the frequency components of the stripe noise through a mask, and convert the image back to the spatial domain through the inverse Fourier transform.

[0066] In this embodiment, first, the filtered image is converted to the frequency domain by using the Fourier transform, then the frequency components corresponding to the stripe noise are identified by observing the spectrogram, a mask is designed to remove the frequency components of the stripe noise, and finally, the frequency domain image after mask processing is converted back to the spatial domain by using the inverse Fourier transform. Removing stripe noise by means of the Fourier transform can enhance the contrast of the image, making the loss area of the milling cutter more obvious. In addition, removing stripe noise helps to improve the accuracy of image segmentation, reduce the possibility of false detection, and improve the reliability of loss degree evaluation.

[0067] S20. Detect the contour of the first image by using an edge detection algorithm, select the loss area contour according to the size and shape of the contour, and fill the loss area contour to obtain a second image.

[0068] Edge detection is a common image processing technique used to identify positions where pixel intensity changes significantly in an image. Canny edge detection is a commonly used edge detection algorithm that can effectively find clear edges and suppress noise. Preferably, this embodiment uses the Canny edge detection algorithm. When detecting the contour of the first image, once the edges are detected, a contour detection algorithm can be used to identify the closed regions formed by these edges. When screening the contours, selection can be made according to the size, shape or other geometric attributes of the contours. For example, a minimum area threshold can be set to filter out smaller contours, or the approximate circularity of the contours can be calculated to exclude non-circular contours. Finally, the selected loss area contour is filled to obtain the second image.

[0069] Edge detection in this embodiment can accurately determine the boundaries of objects in an image. Using Canny edge detection can effectively reduce the influence of noise and improve the accuracy of edge detection. Additionally, edge detection helps extract key features in the image, which are crucial for understanding the image content. By screening the size and shape of the contours, the features of the loss area can be further highlighted. By filling the contours of the loss area, the content of the image can be simplified, making subsequent processing more efficient. The filled image is easier to further analyze, such as calculating the area of the loss area, etc., which can help quickly identify and locate problems, thus saving time and resources. Therefore, through the method of this embodiment, the accuracy and efficiency of image analysis can be improved, the complexity of subsequent processing can be reduced, and easy-to-understand visualization results can be provided.

[0070] S30. Extract features from the second image, and input the extracted features into a preset support vector machine model to obtain the wear degree of the milling cutter to be measured.

[0071] In this step, first, features can be extracted from the second image, including texture features, spectral features, and spatial distribution features, etc. Then, the extracted features are input into a preset support vector machine model, and the wear degree of the milling cutter to be measured can be quickly output.

[0072] When training the support vector machine model, it includes the following steps:

[0073] Data preparation: Compose the extracted features into a feature vector and prepare the corresponding label data;

[0074] Model training: Use the existing labeled training dataset to train the support vector machine model;

[0075] Model testing: Use the test dataset to evaluate the performance of the model;

[0076] Model application: Input the extracted features into the trained support vector machine model to predict the wear degree of the milling cutter to be measured.

[0077] See Figure 3 , in one embodiment, the extracting features from the second image includes:

[0078] S101. Use a detection frame to perform partition feature extraction on the second image to obtain multiple feature sub-images;

[0079] S102. Obtain a preset convolutional neural network model, and use multi-scale feature fusion to extract the texture features, spectral features, and spatial distribution features of each feature sub-image at different scales to generate an original feature set;

[0080] Among them, an attention mechanism is added to the convolutional neural network model to assign weights to different features in the original feature set and rank the importance of each feature through feature selection;

[0081] S103. Screen out target features that meet the preset conditions based on the result of the feature importance ranking to generate a target feature set.

[0082] In this embodiment, the detection box refers to the bounding box commonly used in object detection, which is used to locate the region of interest in the image, that is, the ROI region. The image is segmented into several sub-regions using the bounding box, and these sub-regions may correspond to different parts of the milling cutter. This can enable the model to focus on important local features. Among them, each sub-region can be regarded as a "feature sub-map", and they can be separately subjected to feature extraction.

[0083] Convolutional neural network (CNN) models are widely used in fields such as image classification and object detection. In this embodiment, the model uses a multi-scale feature fusion technique for feature extraction. To capture features of different sizes, different-sized receptive fields can be used to extract features, which is usually achieved through different-sized convolutional kernels or a pyramid structure. Specifically, the texture features, spectral features, and spatial distribution features respectively include:

[0084] Texture features, extract gray-level co-occurrence matrix features, such as contrast, energy, entropy, gray-level standard deviation, etc.

[0085] Spectral features, including multi-spectral images and hyper-spectral images; multi-spectral images contain images of multiple bands, and each band represents a different spectral range. Hyper-spectral images are similar to multi-spectral images but have more bands and can provide more detailed spectral information.

[0086] Spatial distribution features, including contour features, which are used to describe the shape features of the object edge. Histogram of oriented gradients, which is used to calculate the gradient direction distribution in the local region of the image. Scale-invariant feature transform, which is used to detect key points and their descriptors, and these descriptors are invariant to scale and rotation changes. Fast feature transform, which is used to quickly detect corner points in the image. Directional features, which are used for, such as the main axis direction, angle distribution, etc.

[0087] Furthermore, adding an attention mechanism to the convolutional neural network can help the model focus on the most important parts while suppressing irrelevant information. Specifically, it assigns weights to different features in the original feature set and ranks the importance of each feature through feature selection; then, based on the result of the feature importance ranking, it screens out target features that meet the preset conditions to generate a target feature set. This helps to remove redundant information, reduce the computational burden, and improve the generalization ability of the model and reduce the risk of overfitting.

[0088] Therefore, in this embodiment, by pre-training a support vector machine model, this model can automatically evaluate the wear degree of the milling cutter, reducing the subjectivity and uncertainty of manual judgment. The support vector machine model can capture the complex relationships between features, improving the accuracy of wear degree evaluation. When applied, this model can quickly give the evaluation result of the wear degree, improving the detection efficiency. And the model can be continuously improved and expanded with more training data to adapt to different milling cutter types and wear degrees. Due to the stability of the model itself, it can ensure the consistency and stability under different evaluation results, laying a foundation for subsequent detection of cutting accuracy.

[0089] S40. Obtain the cutting speed and feed rate of the milling cutter to be measured, and determine the cutting accuracy according to the cutting speed, feed rate and wear degree of the milling cutter to be measured.

[0090] Specifically, the determining the cutting accuracy according to the cutting speed, feed rate and wear degree of the milling cutter to be measured includes:

[0091] P = a×e -w + bln(v)+ cln(f)+ k

[0092] In the formula, P represents the cutting accuracy, w, v, f respectively represent the wear degree, cutting speed, feed rate; a, b, c respectively represent the influence intensity of the wear degree, cutting speed, feed rate on the cutting accuracy, all obtained by fitting with the non-linear regression algorithm; k is a constant term, representing the cutting accuracy when the wear degree, cutting speed, feed rate are all zero; e represents the base of the natural logarithm.

[0093] It should be noted that the cutting speed is a measure of the speed of the milling cutter along its rotation direction, usually expressed in meters per minute (m / min). This value can be determined according to the diameter and rotational speed of the milling cutter. The influence of the cutting speed on the cutting accuracy is usually non-linear, and a logarithmic function is used here to simulate this non-linear relationship. As the cutting speed increases, its influence on the cutting accuracy will gradually slow down. Similar to the cutting speed, the influence of the feed rate on the cutting accuracy is also non-linear, and a logarithmic function is also used to simulate the non-linear relationship. As the feed rate increases, its influence on the cutting accuracy will also gradually slow down. The influence of the wear degree is simulated by an exponential function, usually the higher the wear degree, the lower the cutting accuracy. This relationship reflects the trend of the cutting performance of the milling cutter decreasing as the wear degree of the milling cutter increases. The constant term k represents the cutting accuracy of the milling cutter when there is no influence of wear degree, cutting speed and feed rate, that is, when these three values are all 0. Therefore, the above formula quantifies the influence of wear degree, cutting speed and feed rate on the cutting accuracy, providing a mathematical model for evaluating and predicting the cutting accuracy. The parameters a, b obtained by fitting with the non-linear regression algorithm

[0094] c and k can be used to optimize cutting parameters to achieve the best cutting accuracy. Once the model is established, the cutting accuracy can be predicted based on the loss degree, cutting speed, and feed rate monitored in real time, which is very important for real-time monitoring and adjustment during the production process. For example, during the milling cutter cutting process, if the evaluated cutting accuracy does not meet the requirements, the work can be stopped in time, and a new milling cutter can be replaced to ensure the quality of the cut product and improve production efficiency.

[0095] In summary, the milling cutter cutting accuracy detection method provided by the embodiments of the present invention has at least the following effects:

[0096] 1) When detecting the cutting accuracy of the milling cutter, the present invention mainly evaluates the loss degree of the milling cutter first, and then monitors the cutting speed and feed rate of the milling cutter during the working state. The cutting accuracy is jointly determined according to the cutting speed, feed rate, and loss degree of the milling cutter. By this indirect measurement method, compared with evaluating the cutting accuracy from the perspective of the cut object, there is no need to conduct a large number of experiments to collect data for testing, which greatly simplifies the detection process and can take into account the measurement results of the cutting accuracy while saving costs.

[0097] 2) When evaluating the loss degree, the present invention first obtains the original image of the milling cutter to be measured, performs grayscale processing on the original image, filters the grayscale image using a median filter, and performs local threshold processing on the filtered image to obtain the first image; through image preprocessing steps such as grayscale processing, median filtering, and local threshold processing, image noise can be effectively removed and the image quality can be improved. By performing edge detection on the preprocessed image and screening out the loss area contour according to the size and shape of the contour, the loss part of the milling cutter can be accurately identified.

[0098] 3) The present invention extracts the texture features, spectral features, and spatial distribution features of each feature sub-image at different scales by using multi-scale feature fusion, and uses an attention mechanism to select important features. In this way, the quality of feature extraction can be greatly increased, the interference of redundant features can be avoided, and the prediction accuracy can be improved. By inputting the extracted features into a preset support vector machine model, the important features extracted can be classified, and the loss degree of the milling cutter can be quickly and accurately evaluated, providing a reliable basis for subsequent cutting accuracy evaluation.

[0099] See Figure 4 , in an embodiment, the present invention also provides a milling cutter cutting accuracy detection system, and the system includes:

[0100] A filtering processing unit 100, configured to obtain the original image of the milling cutter to be measured, perform grayscale processing on the original image, filter the grayscale image using a median filter, and perform local threshold processing on the filtered image to obtain the first image;

[0101] The contour extraction unit 200 is configured to detect the contour of the first image by using an edge detection algorithm, screen out the contour of the loss area according to the size and shape of the contour, and fill the contour of the loss area to obtain a second image;

[0102] The wear degree prediction unit 300 is configured to extract features from the second image, input the extracted features into a preset support vector machine model, and obtain the wear degree of the milling cutter to be measured;

[0103] The cutting accuracy determination unit 400 is configured to obtain the usage parameters of the milling cutter to be measured, including cutting speed, feed rate, and usage duration; determine the cutting accuracy according to the usage parameters and wear degree of the milling cutter to be measured.

[0104] It can be understood that the functions or modules included in the system provided in this embodiment can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0105] An embodiment of the present invention provides an electronic device, including a processor and a memory. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the milling cutter cutting accuracy detection method described in any one of the above embodiments.

[0106] An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by the processor of the electronic device, the processor is caused to execute the milling cutter cutting accuracy detection method described in any one of the above embodiments.

[0107] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein. Those skilled in the art can also clearly understand that each embodiment of the present invention has different emphases in description. For the convenience and brevity of description, the same or similar parts may not be elaborated in different embodiments. Therefore, for the parts not described or not described in detail in a certain embodiment, reference can be made to the descriptions in other embodiments.

[0109] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes various media that can store program codes, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

Claims

1. A method for detecting the cutting accuracy of a milling cutter, characterized in that, The method includes: Obtain the original image of the milling cutter to be measured, perform grayscale processing on the original image, filter the grayscale image using a median filter, and perform local threshold processing on the filtered image to obtain a first image; The step of filtering the grayscale image using a median filter and performing local threshold processing on the filtered image includes: Divide the grayscale image into multiple windows, and select any one of them as the target window; Obtain the grayscale histogram of the pixel points in the target window, and use the OSTU algorithm to identify the grayscale value that maximizes the between-class variance as the grayscale threshold; Divide the pixel points in the target window into a foreground region and a background region according to the grayscale threshold, and calculate the degree of grayscale change based on the background region and the foreground region: where c is the degree of gray-scale change, is the average gray-scale value of the background area, is the average gray-scale value of the foreground area, and g0 is the gray-scale threshold; Determine whether the degree of gray-scale change is greater than a preset threshold; if so, then use as the new gray-scale threshold and process the remaining windows; if not, then use as the local threshold of the target window and process the remaining windows; Use an edge detection algorithm to detect the contour of the first image, screen out the contour of the wear region according to the size and shape of the contour, and fill the contour of the wear region to obtain a second image; Extract features from the second image, and input the extracted features into a preset support vector machine model to obtain the wear degree of the milling cutter to be measured; The step of extracting features from the second image includes: Use a detection box to perform partition feature extraction on the second image to obtain multiple feature sub-images; Obtain a preset convolutional neural network model, and use multi-scale feature fusion to extract the texture features, spectral features, and spatial distribution features of each feature sub-image at different scales to generate an original feature set; Among them, the convolutional neural network model is added with an attention mechanism to assign weights to different features in the original feature set, and perform importance ranking on each feature through feature selection; Screen out target features that meet preset conditions based on the result of feature importance ranking to generate a target feature set; Obtain the cutting speed and feed rate of the milling cutter to be measured, and determine the cutting accuracy according to the cutting speed, feed rate, and wear degree of the milling cutter to be measured; The step of determining the cutting accuracy according to the cutting speed, feed rate, and wear degree of the milling cutter to be measured includes: P = a×e -w + b ln(v) + c ln(f) + k In the formula, P represents the cutting accuracy, w, v, and f respectively represent the wear degree, cutting speed, and feed rate; a, b, and c respectively represent the influence intensity of the wear degree, cutting speed, and feed rate on the cutting accuracy, and are all obtained by fitting using a non-linear regression algorithm; k is a constant term, representing the cutting accuracy when the wear degree, cutting speed, and feed rate are all zero; e represents the base of the natural logarithm.

2. The milling cutter cutting accuracy detection method according to claim 1, characterized in that Before performing local threshold processing on the filtered image, it includes: Convert the filtered image to the frequency domain according to Fourier transform, and identify the frequency components of the stripe noise of the milling cutter to be measured; Remove the frequency components of the stripe noise through a mask, and convert the image back to the spatial domain through inverse Fourier transform.

3. A milling cutter cutting accuracy detection system, characterized in that, The system includes: A filtering processing unit, configured to obtain the original image of the milling cutter to be measured, perform grayscale processing on the original image, filter the grayscale image using a median filter, and perform local threshold processing on the filtered image to obtain a first image; The step of filtering the grayscale image using a median filter and performing local threshold processing on the filtered image includes: Divide the grayscale image into multiple windows, and select any one of them as the target window; Obtain the grayscale histogram of the pixels in the target window, and use the OSTU algorithm to identify the grayscale value that maximizes the between-class variance as the grayscale threshold. Divide the pixels in the target window into a foreground region and a background region according to the grayscale threshold, and calculate the degree of grayscale change based on the background region and the foreground region. where c is the degree of gray-scale change, is the average gray-scale value of the background area, is the average gray-scale value of the foreground area, and g0 is the gray-scale threshold; Determine whether the degree of gray-scale change is greater than a preset threshold; if so, then use as the new gray-scale threshold and process the remaining windows; if not, then use as the local threshold of the target window and process the remaining windows; A contour extraction unit is used to detect the contour of the first image using an edge detection algorithm, screen out the contour of the loss region according to the size and shape of the contour, and fill the contour of the loss region to obtain a second image. A wear degree prediction unit is used to extract features from the second image, input the extracted features into a preset support vector machine model, and obtain the wear degree of the milling cutter to be measured. The extracting features from the second image includes: Use a detection frame to perform partition feature extraction on the second image to obtain multiple feature sub-images. Obtain a preset convolutional neural network model, and use multi-scale feature fusion to extract the texture features, spectral features, and spatial distribution features of each feature sub-image at different scales to generate an original feature set. Among them, the convolutional neural network model is added with an attention mechanism to assign weights to different features in the original feature set, and perform importance ranking on each feature through feature selection. Screen out the target features that meet the preset conditions based on the result of the feature importance ranking to generate a target feature set. A cutting accuracy determination unit is used to obtain the usage parameters of the milling cutter to be measured, including cutting speed, feed rate, and usage duration; determine the cutting accuracy according to the usage parameters and wear degree of the milling cutter to be measured. The determining the cutting accuracy according to the cutting speed, feed rate, and wear degree of the milling cutter to be measured includes: P = a×e -w + b ln(v) + c ln(f) + k In the formula, P represents the cutting accuracy, w, v, and f respectively represent the wear degree, cutting speed, and feed rate; a, b, and c respectively represent the influence intensities of the wear degree, cutting speed, and feed rate on the cutting accuracy, and are all obtained by fitting using a non-linear regression algorithm; k is a constant term, representing the cutting accuracy when the wear degree, cutting speed, and feed rate are all zero; e represents the base of the natural logarithm.

4. An electronic device, characterized in that, Includes: A processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the milling cutter cutting accuracy detection method according to any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by the processor of the electronic device, the processor executes the milling cutter cutting accuracy detection method according to any one of claims 1 to 2.