Image processing-based numerical control machining quality detection method and system

By using an improved fractional-order differential edge detection and adaptive segmentation method, the problem of low accuracy in CNC machining quality inspection was solved, achieving high-precision and robust defect identification and quality assessment.

CN122134628APending Publication Date: 2026-06-02DONGGUAN DIOR CNC EQUIP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGGUAN DIOR CNC EQUIP CO LTD
Filing Date
2026-01-28
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing CNC machining quality inspection technologies suffer from low inspection accuracy and poor robustness, especially when faced with uneven lighting, specular reflection, and noise interference, making it difficult to accurately identify minute defects.

Method used

An improved edge detection algorithm based on fractional derivatives is adopted, combined with adaptive segmentation and connected component geometric analysis. By adaptively adjusting the fractional derivative order and the maximum entropy threshold segmentation method, high-precision and robust detection of CNC machined surfaces is achieved.

Benefits of technology

It significantly improves the accuracy and robustness of surface defect identification in CNC machining, enabling accurate extraction of defect contours and objective quality assessment under complex conditions, thereby enhancing the level of automation in inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134628A_ABST
    Figure CN122134628A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image data processing, in particular to a numerical control machining quality detection method and system based on image processing, which comprises the following steps: acquiring a numerical control machining surface image to be detected; performing enhancement processing on the numerical control machining surface image to be detected by using an improved edge detection algorithm based on fractional differential to obtain an enhanced numerical control machining surface image to be detected; performing segmentation processing on the enhanced numerical control machining surface image to be detected by using an image segmentation algorithm to extract a defect contour, and applying a connected domain marking method to acquire geometric attributes of the defect contour; and if the geometric attributes are not within an allowable error range of standard geometric attributes, it is determined that the numerical control machining surface image to be detected has quality abnormalities. The application solves the problem of low quality detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology. More specifically, this invention relates to a method and system for CNC machining quality inspection based on image processing. Background Technology

[0002] With the widespread application of CNC machining technology in fields such as machinery manufacturing, aerospace, automotive parts, and precision molds, the surface quality of parts has become one of the important indicators for measuring machining accuracy and product reliability. During CNC machining, due to the combined effects of various factors such as tool wear, clamping deviations, feed rate fluctuations, spindle vibration, and uneven material properties, quality defects such as scratches, chipping, pits, cracks, or abnormal tool marks are easily generated on the machined surface. These defects not only directly affect the appearance quality and assembly accuracy of parts, but may also reduce the mechanical properties and service life of parts, and even cause serious safety hazards in the field of high-end equipment manufacturing. Therefore, how to quickly, accurately, and objectively inspect the surface quality of CNC-machined parts after machining or during machining has become a key technical problem that urgently needs to be solved in the fields of intelligent manufacturing and quality control.

[0003] Existing CNC machining quality inspection methods mainly include manual visual inspection, contact measurement, and machine vision-based non-contact inspection methods. Manual visual inspection relies on operator experience and subjective judgment, resulting in inconsistent inspection results and making it difficult to meet the demands of high-volume, high-paced industrial production. While contact measurement methods offer high accuracy in dimensional and geometrical precision, their inspection efficiency is low, and they can easily cause secondary damage to the workpiece surface during measurement, making them unsuitable for inspecting complex curved surfaces or minute defects. In contrast, image processing-based CNC machining quality inspection methods, with their advantages of being non-contact, highly efficient, and easily integrated into automation systems, are gradually becoming a research and application hotspot.

[0004] However, existing image processing-based CNC machining quality inspection technologies still have many shortcomings. First, CNC machined surfaces typically have obvious periodic textures and strong metallic reflective properties, making them susceptible to uneven lighting, specular reflection, and noise interference. This results in insufficient contrast between defect features and normal textures in the acquired images, thus affecting the stability of subsequent image processing algorithms. Second, many existing methods rely on fixed parameters or empirical thresholds for image enhancement, edge detection, and segmentation, making it difficult to adapt to variations in surface characteristics under different materials, processing techniques, and equipment conditions. This leads to poor versatility and robustness, resulting in low quality inspection accuracy. Summary of the Invention

[0005] To address the problem of low quality inspection accuracy mentioned in the background art, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a CNC machining quality inspection method based on image processing, comprising: acquiring an image of a CNC machined surface to be inspected; enhancing the image of the CNC machined surface to be inspected using an improved edge detection algorithm based on fractional derivative to obtain an enhanced image of the CNC machined surface to be inspected; segmenting the enhanced image of the CNC machined surface to be inspected using an image segmentation algorithm to extract defect contours, and applying a connected component labeling method to obtain the geometric properties of the defect contours; if the geometric properties are not within the allowable error range of the standard geometric properties, then determining that the image of the CNC machined surface to be inspected has a quality abnormality; In the improved fractional derivative-based edge detection algorithm, the fractional derivative order is positively correlated with the distortion degree of the target pixel in the CNC machining surface image to be detected. The distortion degree is positively correlated with the anisotropic destruction degree of the target pixel. The anisotropic destruction degree is positively correlated with the gradient magnitude of the target pixel and the difference in gradient direction angles between the target pixel and all pixels within a set neighborhood centered on the target pixel, and negatively correlated with the gradient magnitudes of all pixels within a set neighborhood centered on the target pixel. The target pixel is any pixel in the CNC machining surface image to be detected.

[0007] The above technical solution establishes a multi-level association from pixel gradient direction consistency to anisotropic destruction degree, then to distortion degree, and finally adaptively adjusts the fractional-order differential edge detection order. This achieves intelligent enhancement of local structural anomalies on CNC machined surfaces, making minor scratches, cracks, pits, and other defects more prominent in the enhanced image. At the same time, it suppresses regular machining textures and noise interference. Combined with adaptive segmentation and connected component geometric analysis, it can accurately extract defect contours and determine the quality of the machined surface. This achieves high-precision and robust automated detection from pixel-level features to overall quality assessment, effectively improving the accuracy, reliability, and industrial application value of CNC machined surface defect identification.

[0008] Furthermore, pixels fractional derivative order for: , The fundamental order, The peak order is... For the natural constant An exponential function with base 0. For pixels The degree of distortion.

[0009] The above technical solution adaptively correlates the fractional derivative order with the degree of pixel distortion, enabling the response of the edge detection operator to dynamically adjust with the intensity of local anomalies. In areas with stable surface structures, it maintains a lower order to suppress noise and regular texture interference, while in areas with obvious anomalies or distortion, it rapidly increases the order to enhance the detection capability of small defects and abrupt edges. This achieves an adaptive balance between noise suppression and defect enhancement, improving the accuracy, robustness, and adaptability of edge extraction to complex CNC machined surfaces.

[0010] Furthermore, pixels The degree of distortion for: , For pixels The degree of anisotropic destruction, , For pixels , The degree of anisotropic destruction, The pixels in the previous frame image Compared to the pixels in the current frame image offset length, For the pixels in the next frame image Compared to the pixels in the current frame image offset length, These are the preset hyperparameters.

[0011] The above technical solution compares and fuses the structural damage state of the current pixel with its corresponding state in adjacent frames, introduces a temporal consistency constraint, suppresses regions that are stable in consecutive frames, and significantly enhances abnormal regions that only change significantly at the current moment, thereby effectively distinguishing between real processing defects and transient interference caused by noise, illumination fluctuations or imaging jitter.

[0012] Furthermore, pixels Anisotropic destruction degree for: , For pixels gradient magnitude, For pixels The gradient direction angle, In pixels Pixels within the set neighborhood of the center The gradient direction angle, The total number of pixels within the defined neighborhood. It is a non-zero constant.

[0013] The above technical solution uses a weighted measurement of the consistency of pixel gradient directions within a local neighborhood, so that regular and continuous processed textures receive a lower damage evaluation when the directions are highly consistent, thereby effectively suppressing the interference of normal tool marks and structural edges. When the gradient directions in the neighborhood are obviously dispersed or disordered, the corresponding evaluation results are significantly improved, thus generating a stronger response to abnormal features such as cracks, scratches and local structural damage.

[0014] Furthermore, the defined neighborhood range is 5. 5.

[0015] Furthermore, the geometric properties include area and aspect ratio.

[0016] Furthermore, the image segmentation algorithm is the maximum entropy threshold segmentation method.

[0017] The above technical solution, by adopting the maximum entropy threshold segmentation method, can adaptively determine the segmentation threshold between the foreground and the background based on the statistical characteristics of the overall grayscale distribution of the enhanced image, so that the defect area and the normal processing area can be optimally distinguished in terms of information content, thereby effectively reducing the segmentation instability caused by uneven illumination, surface reflection differences or texture complexity.

[0018] Furthermore, an image of the CNC machined surface to be inspected is acquired using a CCD camera.

[0019] Furthermore, it also includes performing grayscale processing on the image of the CNC machined surface to be detected.

[0020] In a second aspect, the present invention provides a CNC machining quality inspection system based on image processing, including a memory and a processor. The memory stores computer program instructions, which, when executed by the processor, implement the CNC machining quality inspection method based on image processing described above.

[0021] The beneficial effects of this invention are as follows: This invention achieves high-precision highlighting of minute defects and abnormal structures on CNC machined surfaces by combining adaptive fractional-order differential edge enhancement, pixel-level distortion assessment, and anisotropic damage analysis. Simultaneously, it utilizes image segmentation and connected-domain geometric attribute extraction to quantitatively characterize defects and achieves automated quality judgment by comparing with standard geometric attributes. The entire process suppresses noise and regular texture interference while considering temporal continuity and spatial structural information, significantly improving the accuracy, robustness, and automation level of CNC machined surface defect detection, providing an effective technical means for high-reliability quality monitoring in industrial settings. Attached Figure Description

[0022] Figure 1This is a flowchart illustrating an image processing-based CNC machining quality inspection method according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the recognition effect of a traditional algorithm in a CNC machining quality inspection method based on image processing according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the recognition effect of the improved algorithm in the image processing-based CNC machining quality inspection method according to an embodiment of the present invention; Figure 4 This is a schematic block diagram illustrating the structure of an image processing-based CNC machining quality inspection system according to an embodiment of the present invention. Detailed Implementation

[0023] Example of a CNC machining quality inspection method based on image processing.

[0024] like Figure 1 As shown in the flowchart of the image processing-based CNC machining quality inspection method of the present invention, the method includes the following steps: S1: Acquire the image of the CNC machined surface to be inspected.

[0025] In a preferred embodiment, a high-resolution industrial-grade CCD camera is used to image the CNC machined surface to be inspected. The CCD camera is preferably mounted on a fixed bracket on the CNC machine tool or an independent inspection station, with its imaging optical axis maintaining a preset angle or approximately perpendicular relationship with the CNC machined surface to effectively reduce geometric distortion caused by viewing angle deviation. By finely adjusting the CCD camera's focal length, aperture parameters, and exposure time, it can stably acquire images of CNC machined surfaces with clear texture and moderate contrast under complex industrial lighting conditions, thus providing a high-quality raw data foundation for subsequent image processing and defect analysis.

[0026] Furthermore, after image acquisition, the image of the CNC machined surface to be detected is subjected to grayscale processing. Specifically, the red, green, and blue channels in the original color image are weighted and fused according to preset weights, or the color information is mapped to a single-channel grayscale image based on a brightness model, thereby obtaining the grayscale image of the CNC machined surface. Through grayscale processing, the dimensionality of the image data can be significantly reduced while preserving the surface morphology, texture changes, and brightness distribution characteristics. This reduces the interference of redundant color information on subsequent algorithms and helps to concentrate the tool marks, machining roughness differences, and defects such as minor scratches and pits on the CNC machined surface in the grayscale value changes. This makes the contrast between light and dark areas in different regions of the same machined surface more prominent, thereby improving the distinguishability between defective areas and normal areas.

[0027] S2: The image of the CNC machining surface to be detected is enhanced by using an improved edge detection algorithm based on fractional derivative to obtain an enhanced image of the CNC machining surface to be detected.

[0028] like Figure 2 The image shown is a diagram illustrating the recognition effect of a traditional algorithm in the image processing-based CNC machining quality inspection method of this invention.

[0029] In a preferred embodiment, the improved fractional derivative-based edge detection algorithm includes the fractional derivative order and the number of pixels. fractional derivative order for: , The fundamental order, The peak order is... For the natural constant An exponential function with base 0. For pixels The degree of distortion.

[0030] By adaptively associating the order of the fractional derivative with the distortion state corresponding to the pixel, the response intensity of the edge detection operator can dynamically change with the degree of local structural anomaly: in areas with stable surface structures and good continuity, the derivative order remains at a low level, thereby effectively suppressing the excessive enhancement of high-frequency noise and regular processing textures, ensuring the smoothness and consistency of edge extraction results; while in areas with obvious structural damage or high distortion, the derivative order increases rapidly, enabling the operator to produce a stronger response to abrupt grayscale, discontinuous structures and abnormal edges, thereby significantly enhancing the detection capability of small defects, fracture boundaries and irregular contours.

[0031] pixel The degree of distortion for: , For pixels The degree of anisotropic destruction, , For pixels , The degree of anisotropic destruction, The pixels in the previous frame image Compared to the pixels in the current frame image offset length, For the pixels in the next frame image Compared to the pixels in the current frame image offset length, These are the preset hyperparameters.

[0032] By jointly modeling the structural damage level of the current pixel with the structural damage level at the corresponding position in the preceding and following frames, and introducing a temporal comparison and proportional modulation mechanism, the distortion evaluation result is effectively suppressed when the same position presents a stable and consistent structural state in consecutive frames, thereby reducing the instantaneous abnormal response caused by illumination fluctuations, noise interference, or imaging micro-jitter. When the structural damage level in the current frame deviates significantly from that in the preceding and following frames, the evaluation result is significantly amplified, thus showing higher sensitivity to the evolution of real surface defects, sudden damage, or processing anomalies.

[0033] pixel Anisotropic destruction degree for: , For pixels gradient magnitude, For pixels The gradient direction angle, In pixels Pixels within the set neighborhood of the center The gradient direction angle, The total number of pixels within the defined neighborhood. It is a non-zero constant. The defined neighborhood range is 5. 5. Of course, you can also set it according to the actual situation.

[0034] By comprehensively considering the consistency of pixel gradient intensity and gradient direction within a local neighborhood, and introducing weighted statistics on the degree of directional deviation, the evaluation result of the degree of damage is significantly reduced when the target pixel and its surrounding pixels maintain a high degree of consistency in the gradient direction. This effectively suppresses misjudgments introduced by regular processed textures or continuous edges. Conversely, when the gradient direction within the neighborhood is significantly dispersed or disordered, the evaluation result is significantly increased, thus exhibiting higher response sensitivity to anisotropic abnormal areas such as surface microcracks, chipping, and scratches. By combining gradient amplitude modulation, this scheme can highlight the directional inconsistencies of real defect areas while maintaining stability for structural edges, avoiding over-amplification of weak texture areas. At the same time, neighborhood statistics and normalization processing improve robustness to noise and local brightness fluctuations, enabling stable and accurate characterization of surface structure integrity even under complex CNC machined surface conditions, providing a reliable criterion basis for subsequent defect detection and quality assessment.

[0035] like Figure 3 The figure shown is a diagram illustrating the recognition effect of the improved algorithm in the image processing-based CNC machining quality inspection method of this invention.

[0036] S3: The enhanced CNC machining surface image to be detected is segmented using an image segmentation algorithm to extract the defect contour, and the geometric properties of the defect contour are obtained by applying the connected component labeling method.

[0037] In a preferred embodiment, after enhancing the image of the CNC machined surface to be inspected, an image segmentation algorithm is further used to perform refined segmentation on the enhanced image to effectively distinguish between defective areas and normal machined areas. Through the aforementioned enhancement process, the gray-level abrupt changes in the CNC machined surface caused by scratches, chipping, pits, cracks, or abnormal tool marks are significantly amplified, while the gray-level distribution of the background area tends to be stable, thus providing good prior conditions for subsequent segmentation, effectively reducing the segmentation difficulty and improving segmentation stability.

[0038] Furthermore, the image segmentation algorithm preferably employs the maximum entropy thresholding method. This method analyzes the gray-level histogram distribution characteristics of the enhanced image and searches globally for the optimal threshold that maximizes the sum of the information entropy of the foreground and background regions, thereby achieving adaptive segmentation of defective regions. Compared to fixed thresholding or simple statistical thresholding methods, maximum entropy thresholding can fully consider the uncertainty and complexity of the overall gray-level information of the image. Even in scenarios with uneven illumination, significant differences in surface reflection, or complex background textures in CNC machining, it can still stably distinguish between defective and non-defective regions, effectively reducing the probability of missegmentation and missed segmentation.

[0039] After maximum entropy thresholding, the enhanced CNC machined surface image can be converted into a binary image, making potential defect regions explicitly appear as connected regions. Based on this, a connected component labeling method is further introduced to number and identify each independent connected region in the binary image, thereby achieving accurate differentiation of different defect candidate regions. This process effectively avoids interference between multiple defect regions, providing a clear data structure foundation for subsequent defect attribute analysis and classification.

[0040] In a further preferred embodiment, after completing the connected component labeling, the geometric attribute information of each labeled defect connected region is extracted. The geometric attributes include at least the area and aspect ratio of the defect region. The area characterizes the spatial scale of the defect on the CNC machined surface, reflecting the severity of the defect; the aspect ratio describes the morphological features of the defect region, effectively distinguishing between elongated and blocky defects. Through comprehensive analysis of the above geometric attributes, different types of defects can be effectively distinguished. For example, elongated regions with high aspect ratios can be identified as scratches or cracks, while regions with larger areas and relatively concentrated shapes can be identified as pits, chips, or machining abnormalities.

[0041] S4: If the geometric properties are not within the allowable error range of the standard geometric properties, it is determined that the CNC machining surface image to be detected has quality abnormalities.

[0042] In a preferred embodiment, after extracting the defect contour and calculating the corresponding geometric attributes, the obtained geometric attributes are compared and analyzed with pre-established standard geometric attributes. The standard geometric attributes can be set based on statistical results of qualified CNC machined surface samples, historical production data, or process specification requirements; they characterize the permissible spatial scale and morphological range of defect features under normal machining conditions. By introducing an allowable error range, minor fluctuations that may occur in different machining batches, different equipment states, and imaging conditions are reasonably tolerated, thereby avoiding misjudgments caused by unavoidable system errors or environmental interference.

[0043] Furthermore, when the geometric attributes extracted from the image of the CNC machined surface exceed the allowable error range corresponding to the standard geometric attributes, the CNC machined surface is determined to have a quality abnormality. Specifically, if the area of ​​the defect region is significantly larger than the normal range, it indicates that problems such as tool wear, abnormal feed, or localized material peeling may have occurred during the machining process; if the morphological characteristics of the defect region are significantly inconsistent with the standard morphology, such as exhibiting an abnormally elongated or irregular distribution, it may reflect surface damage caused by scratches, cracks, or machining vibration. Through the above judgment mechanism, the quantitative characteristics of defects can be directly mapped to the machining quality status, realizing the transformation from subjective experience-based judgment to objective data-driven judgment.

[0044] This invention organically combines the acquisition of CNC machined surface images, grayscale processing, fractional-order differential edge enhancement, distortion-aware adaptive adjustment, image segmentation, and connected-domain geometric analysis to achieve accurate extraction and intelligent judgment of minute surface defects and abnormal structures. This solution can adaptively enhance the edge features of abnormal regions while suppressing noise and interference from regular machining textures. It improves sensitivity to sudden or localized defects by combining temporal consistency and spatial local gradient information, and achieves objective evaluation of machining quality through comparison of geometric attributes with standard attributes. This significantly improves the accuracy, robustness, and automation level of CNC machined surface defect detection, providing a reliable and efficient technical means for quality control in industrial production.

[0045] Example of an image processing-based CNC machining quality inspection system: like Figure 4 As shown in the figure, the structural block diagram of the image processing-based CNC machining quality inspection system of the present invention includes a processor and a memory.

[0046] This invention also provides a CNC machining quality inspection system based on image processing. For example... Figure 4As shown, the system includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the image processing-based CNC machining quality inspection method according to the present invention.

[0047] The image processing-based CNC machining quality inspection system also includes other components well known to those skilled in the art, such as communication interfaces. Their settings and functions are known in the art and will not be described in detail here.

[0048] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.

[0049] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.

[0050] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A method for CNC machining quality inspection based on image processing, characterized in that, include: Acquire an image of the CNC machined surface to be inspected; An improved edge detection algorithm based on fractional derivative is used to enhance the image of the CNC machining surface to be detected, so as to obtain an enhanced image of the CNC machining surface to be detected. The enhanced CNC machining surface image to be detected is segmented using an image segmentation algorithm to extract the defect contour, and the geometric properties of the defect contour are obtained by applying the connected component labeling method. If the geometric properties are not within the allowable error range of the standard geometric properties, the CNC machining surface image to be detected is determined to have quality abnormalities. Among them, the improved edge detection algorithm based on fractional derivative includes a fractional derivative order, which is positively correlated with the degree of distortion of the target pixel in the image of the CNC machining surface to be detected, and the degree of distortion is positively correlated with the degree of anisotropy destruction of the target pixel; The degree of anisotropy destruction is positively correlated with the gradient magnitude of the target pixel and the difference in gradient direction angles between the target pixel and all pixels within a set neighborhood centered on the target pixel. It is also negatively correlated with the gradient magnitudes of all pixels within a set neighborhood centered on the target pixel. The target pixel is any pixel in the CNC machining surface image to be detected.

2. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, pixel fractional derivative order for: , The fundamental order, The peak order is... For the natural constant An exponential function with base 0. For pixels The degree of distortion.

3. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, pixel The degree of distortion for: , For pixels The degree of anisotropic destruction, , For pixels , The degree of anisotropic destruction, The pixels in the previous frame image Compared to the pixels in the current frame image offset length, For the pixels in the next frame image Compared to the pixels in the current frame image offset length, These are the preset hyperparameters.

4. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, pixel Anisotropic destruction degree for: , For pixels gradient magnitude, For pixels The gradient direction angle, In pixels Pixels within the set neighborhood of the center The gradient direction angle, The total number of pixels within the defined neighborhood. It is a non-zero constant.

5. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, The defined neighborhood range is 5.

5.

6. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, The geometric properties include area and aspect ratio.

7. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, The image segmentation algorithm is the maximum entropy threshold segmentation method.

8. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, Use a CCD camera to acquire images of the CNC machined surface to be inspected.

9. The image processing-based CNC machining quality inspection method according to claim 1, characterized in that, It also includes performing grayscale processing on the image of the CNC machined surface to be detected.

10. A CNC machining quality inspection system based on image processing, characterized in that, It includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the image processing-based CNC machining quality inspection method according to any one of claims 1 to 9 is implemented.