Cutting quality determination method and device for numerical control machine tool based on image recognition
By acquiring and identifying chip images during the CNC machine tool cutting process, the cutting quality can be judged in real time, solving the problem that existing technologies cannot provide real-time feedback on machining quality during the machining process and reducing material waste.
Patent Information
- Application Number
- CN202311488191.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-11-08
AI Technical Summary
In existing technologies, the processing quality can only be determined after the workpiece is processed, and real-time feedback is not possible during the processing, resulting in material waste.
By acquiring chip images during the cutting process of a CNC machine tool, image recognition technology is used to determine the chip area, and the chip type is determined based on the relationship between the area ratio of the chip area and a predetermined threshold, thereby providing real-time feedback on machining quality.
It enables real-time monitoring of cutting quality during workpiece machining, reduces material waste, and improves the real-time feedback efficiency of the machining process.
Smart Images

Figure CN117400065B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machine tool control technology, and more specifically, to a method and apparatus for determining the cutting quality of a CNC machine tool based on image recognition. Background Technology
[0002] Currently, mechanical processing and manufacturing are developing towards the goal of intelligence and automation. The key issue is how to detect, judge, and even predict processing quality.
[0003] Currently, the inspection of machining quality is often carried out after the test cut is completed, and the machined parts are inspected to determine the cutting quality. However, this method requires inspection after the machining is completed, so it cannot provide real-time feedback on the machining quality and may lead to material waste.
[0004] There is currently no effective solution to the problem that the processing quality of the workpiece can only be determined after the workpiece is processed, which makes it impossible to provide real-time feedback on the processing quality during the workpiece processing and easily leads to material waste. Summary of the Invention
[0005] This invention provides a method and apparatus for determining the cutting quality of CNC machine tools based on image recognition, which at least solves the technical problem in related technologies that the machining quality of a workpiece can only be determined after the workpiece is machined, thus making it impossible to provide real-time feedback on the machining quality during the workpiece machining process, which easily leads to material waste.
[0006] According to one aspect of the present invention, a method for determining the cutting quality of a CNC machine tool based on image recognition is provided, comprising: triggering an image acquisition device to acquire a chip image during the cutting process of a target cutting object using a cutting component of a CNC machine tool, wherein the chip image is an image corresponding to chips generated during the cutting process of the cutting component on the target cutting object; performing image recognition on the chip image to obtain a chip region in the chip image; determining the type of chip based on the relationship between the ratio of a first area of the chip region to a second area of the chip image and a predetermined threshold; determining that the cutting quality of the CNC machine tool is lower than the cutting quality threshold when the chip type is determined to be random chips, wherein random chips represent chips with shapes different from predetermined chips; and determining that the cutting quality of the CNC machine tool is not lower than the cutting quality threshold when the chip type is determined to be non-random chips.
[0007] Optionally, performing image recognition on the chip image to obtain the chip region in the chip image includes: performing grayscale processing on the chip image to obtain the grayscale processed chip image; determining other regions in the grayscale processed chip image excluding the background region; and determining the other regions as the chip region.
[0008] Optionally, determining the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold includes: determining the first area of the chip region and the second area of the chip image; determining the ratio of the first area to the second area; comparing the ratio with the predetermined threshold to obtain a comparison result; determining the chip as non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and determining the chip as random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
[0009] Optionally, before determining the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold, the method further includes: acquiring multiple historical chip images of the cutting component within a historical time period; performing grayscale processing on the multiple historical chip images, and identifying historical chip regions in the multiple historical chip images from the grayscale processed images; determining the historical chip types corresponding to the multiple historical chip regions; obtaining the actual chip quality corresponding to the multiple historical chip images; and establishing a mapping relationship between the historical chip types and the actual chip quality.
[0010] Optionally, after establishing the mapping relationship between the historical chip type and the actual chip quality, the method further includes: storing the mapping relationship.
[0011] Optionally, the method for determining the cutting quality of a CNC machine tool based on image recognition further includes: when the type of the chip is determined to be non-random chip, mirroring the chip image to obtain a mirror image of the chip image; superimposing the chip image and the mirror image to obtain a superimposed image; and determining the chip shape of the chip image based on the superimposed image.
[0012] Optionally, determining the chip shape of the chip image based on the superimposed image includes: when the chip shape is elliptical, determining the chip to be a C-shaped chip; when the chip shape is X-shaped, determining the type of the chip to be a spiral chip.
[0013] Optionally, when the machining type of the CNC machine tool is determined to be drilling pin, the method further includes: when the type of the chip is determined to be the scrambled chip or the C-shaped chip, generating a cutting adjustment strategy to adjust the cutting mode of the cutting component.
[0014] According to another aspect of the present invention, a cutting quality determination device for a CNC machine tool based on image recognition is also provided, comprising: a first acquisition unit, configured to trigger an image acquisition device to acquire a chip image during the cutting process of a target cutting object by a cutting component of a CNC machine tool, wherein the chip image is an image corresponding to chips generated during the cutting process of the cutting component on the target cutting object; a first acquisition unit, configured to perform image recognition on the chip image to obtain a chip region in the chip image; a first determination unit, configured to determine the type of chip based on the relationship between the ratio of a first area of the chip region to a second area of the chip image and a predetermined threshold; a second determination unit, configured to determine that the cutting quality of the CNC machine tool is lower than the cutting quality threshold when the type of chip is determined to be random chips, wherein random chips represent chips with shapes different from predetermined chips; and a third determination unit, configured to determine that the cutting quality of the CNC machine tool is not lower than the cutting quality threshold when the type of chip is determined to be non-random chips.
[0015] Optionally, the first acquisition unit includes: a first acquisition module, configured to perform grayscale processing on the chip image to obtain the grayscale processed chip image; a first determination module, configured to determine other regions in the grayscale processed chip image excluding the background region; and a second determination module, configured to determine the other regions as the chip region.
[0016] Optionally, the first determining unit includes: a third determining module, configured to determine the first area of the chip region and the second area of the chip image; a fourth determining module, configured to determine the ratio of the first area to the second area; a second obtaining module, configured to compare the ratio with the predetermined threshold to obtain a comparison result; a fifth determining module, configured to determine the chip as the non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and a sixth determining module, configured to determine the chip as the random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
[0017] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a second acquisition unit, used to acquire multiple historical chip images of the cutting component within a historical time period before determining the chip type based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold; an identification unit, used to identify historical chip regions in the multiple historical chip images after performing grayscale processing on the multiple historical chip images; a fourth determination unit, used to determine the historical chip types corresponding to the multiple historical chip regions respectively; a second acquisition unit, used to acquire the actual chip quality corresponding to the multiple historical chip images respectively; and an establishment unit, used to establish a mapping relationship between the historical chip types and the actual chip quality.
[0018] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a storage unit for storing the mapping relationship after establishing the mapping relationship between the historical chip type and the actual chip quality.
[0019] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a third acquisition unit, used to mirror the chip image when the chip type is determined to be non-random chip, to obtain a mirror image of the chip image; a fourth acquisition unit, used to overlay the chip image and the mirror image to obtain an overlaid image; and a fifth determination unit, used to determine the chip shape of the chip image based on the overlaid image.
[0020] Optionally, the fifth determining unit includes: a seventh determining module, used to determine that the chip is a C-shaped chip when the chip shape is elliptical; and an eighth determining module, used to determine that the type of the chip is a spiral chip when the chip shape is X-shaped.
[0021] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a generation unit, used to generate a cutting adjustment strategy to adjust the cutting mode of the cutting component when it is determined that the machining type of the CNC machine tool is drilling and the type of the chip is the random chip or the C-shaped chip.
[0022] According to another aspect of the present invention, a cutting quality determination system for CNC machine tools based on image recognition is also provided, wherein the cutting quality determination system for CNC machine tools based on image recognition uses any of the above-described methods for determining the cutting quality of CNC machine tools based on image recognition.
[0023] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any of the above-described methods for determining the cutting quality of CNC machine tools based on image recognition.
[0024] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes any of the above-described methods for determining the cutting quality of CNC machine tools based on image recognition.
[0025] In this embodiment of the invention, during the cutting process of a target object by the cutting component of a CNC machine tool, an image acquisition device is triggered to acquire a chip image, wherein the chip image is an image corresponding to the chips generated during the cutting process of the cutting component on the target object; image recognition is performed on the chip image to obtain the chip region in the chip image; the type of chip is determined according to the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold; when the type of chip is determined to be random chips, the cutting quality of the CNC machine tool is determined to be lower than the cutting quality threshold, wherein random chips refer to chips with shapes different from the predetermined chips; when the type of chip is determined to be non-random chips, the cutting quality of the CNC machine tool is determined to be not lower than the cutting quality threshold. The above technical solutions achieve the goal of acquiring chip images in real time during workpiece processing, analyzing the chip images to determine the chip type, and determining the workpiece processing quality based on the chip type. This realizes the technical effect of real-time feedback on processing quality during workpiece processing, which improves monitoring efficiency and reduces material waste. It also solves the technical problem in related technologies that the processing quality of the workpiece can only be determined after the workpiece is processed, thus making it impossible to provide real-time feedback on processing quality during workpiece processing and easily leading to material waste. Attached Figure Description
[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0027] Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of determining the cutting quality of a CNC machine tool based on image recognition, according to an embodiment of the present invention.
[0028] Figure 2 This is a flowchart of a method for determining the cutting quality of a CNC machine tool based on image recognition, according to an embodiment of the present invention.
[0029] Figure 3 This is a flowchart of an optional image recognition-based method for determining the cutting quality of a CNC machine tool according to an embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram of an image analysis system according to an embodiment of the present invention;
[0031] Figure 5(a) is a schematic diagram of C-shaped chips according to an embodiment of the present invention;
[0032] Figure 5(b) is a schematic diagram of spiral-shaped chips according to an embodiment of the present invention;
[0033] Figure 5(c) is a schematic diagram of debris according to an embodiment of the present invention;
[0034] Figure 6 This is a schematic diagram of the chips after grayscale processing according to an embodiment of the present invention;
[0035] Figure 7(a) is a schematic diagram of C-shaped chips after grayscale processing according to an embodiment of the present invention;
[0036] Figure 7(b) is a schematic diagram of the spiral-shaped chips after grayscale processing according to an embodiment of the present invention;
[0037] Figure 7(c) is a schematic diagram of the debris after grayscale processing according to an embodiment of the present invention;
[0038] Figure 8(a) is a schematic diagram of optional C-shaped chips after grayscale processing according to an embodiment of the present invention;
[0039] Figure 8(b) is a schematic diagram of Figure 8(a) after being horizontally flipped according to an embodiment of the present invention;
[0040] Figure 8(c) is a schematic diagram after superimposing Figure 8(a) and Figure 8(b) according to an embodiment of the present invention;
[0041] Figure 9(a) is a schematic diagram of optional spiral-shaped chips after grayscale processing according to an embodiment of the present invention;
[0042] Figure 9(b) is a schematic diagram of Figure 9(a) after being horizontally flipped according to an embodiment of the present invention;
[0043] Figure 9(c) is a schematic diagram after superimposing Figure 9(a) and Figure 9(b) according to an embodiment of the present invention;
[0044] Figure 10 This is a schematic diagram of a cutting quality determination device for a CNC machine tool based on image recognition according to an embodiment of the present invention. Detailed Implementation
[0045] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0046] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0047] As described in the background section, related technologies require the workpiece to be machined before its quality can be determined, making it impossible to provide real-time feedback on the machining quality during the process, which can easily lead to material waste. To address these shortcomings, this invention provides a method and apparatus for determining the cutting quality of a CNC machine tool based on image recognition.
[0048] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0049] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of determining the cutting quality of a CNC machine tool based on image recognition, according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0050] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the image recognition-based CNC machine tool cutting quality determination method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0051] According to an embodiment of the present invention, a method embodiment for determining the cutting quality of a CNC machine tool based on image recognition is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0052] Figure 2 This is a flowchart of a method for determining the cutting quality of a CNC machine tool based on image recognition according to an embodiment of the present invention, as shown below. Figure 2 As shown, the method includes the following steps:
[0053] Step S202: During the process of cutting the target object using the cutting component of the CNC machine tool, the image acquisition device is triggered to acquire chip images, wherein the chip images are the images corresponding to the chips generated during the cutting process of the cutting component on the target object.
[0054] Optionally, the aforementioned cutting components generally refer to sharp cutting tools suitable for cutting parts made of hard materials.
[0055] Optionally, the target cutting object mentioned above generally refers to hard material parts that require high precision and need to be mass-produced. Of course, the hard material parts include, but are not limited to: high-speed steel, cemented carbide, and ceramic materials.
[0056] Optionally, the aforementioned image acquisition devices include, but are not limited to, devices with image acquisition capabilities such as cameras, pinhole cameras, and scanners.
[0057] The following is combined with Figure 3 and Figure 4 The embodiments of the present invention will be described in detail below. Figure 3 This is a flowchart of an optional image recognition-based method for determining the cutting quality of a CNC machine tool according to an embodiment of the present invention. Figure 4 This is a schematic diagram of an image analysis system according to an embodiment of the present invention. Figure 3 As shown, the above-mentioned method for determining the cutting quality of CNC machine tools based on image recognition mainly consists of three parts: establishing an image analysis system, identifying chip morphology, and judging machining quality. When establishing the image analysis system, it is first necessary to collect relevant image data, such as... Figure 4 As shown, a high-precision camera is used to acquire images of the object being measured (the target object to be cut), and the acquired image data is uploaded to a computer system for processing.
[0058] Before image acquisition, a high-precision camera for image acquisition can be installed facing the cutting part to obtain an image of the chip in the positive direction. During subsequent grayscale processing, the projection of the chip in the positive direction can be directly obtained. In the subsequent processing of image data, deviations caused by angle problems can be avoided, thus improving the accuracy of detection.
[0059] In addition, during the cutting process, the common chip shapes can be divided into three types: C-shaped chips, spiral chips, and random chips. The following figures (Figure 5) illustrate these three chip shapes. Figure 5(a) is a schematic diagram of C-shaped chips according to an embodiment of the present invention, Figure 5(b) is a schematic diagram of spiral chips according to an embodiment of the present invention, and Figure 5(c) is a schematic diagram of random chips according to an embodiment of the present invention. Referring to these figures, it can be clearly seen that chips with a C-shaped shape are C-shaped chips, chips with a spiral shape are spiral chips, and chips with irregular and varied shapes can be considered random chips.
[0060] Step S204: Perform image recognition on the chip image to obtain the chip region in the chip image.
[0061] According to the above embodiments of the present invention, in step S204, image recognition is performed on the chip image to obtain the chip region in the chip image, including: performing grayscale processing on the chip image to obtain a grayscale processed chip image; determining other regions in the grayscale processed chip image excluding the background region; and determining the other regions as chip regions.
[0062] As above Figure 3 and Figure 4 As shown, when establishing an image analysis system, image data needs to be processed after it is collected. After receiving the collected image data, the computer system performs grayscale processing on it according to the usual image processing methods. After the processing is completed, the result is displayed on the display device.
[0063] The following is combined with Figure 6 To demonstrate the effect of grayscale processing, Figure 6 This is a schematic diagram of the chips after grayscale processing according to an embodiment of the present invention. Figure 6 As shown, when processing an image in grayscale, blackening the background of the image will obtain the projection of the chip in the positive direction. This projection is displayed in white, that is, the white part in the image is the chip area in the chip image.
[0064] Step S206: Determine the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold.
[0065] Optionally, the aforementioned predetermined threshold is a standard used to determine the type of chips.
[0066] According to the above embodiments of the present invention, in step S206, determining the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold includes: determining the first area of the chip region and the second area of the chip image; determining the ratio of the first area to the second area; comparing the ratio with a predetermined threshold to obtain a comparison result; determining the chip as non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and determining the chip as random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
[0067] The following diagrams, with reference to Figure 7, illustrate the image effects of the C-shaped chips, spiral chips, and random chips after grayscale processing. Figure 7(a) is a schematic diagram of C-shaped chips after grayscale processing according to an embodiment of the present invention; Figure 7(b) is a schematic diagram of spiral chips after grayscale processing according to an embodiment of the present invention; and Figure 7(c) is a schematic diagram of random chips after grayscale processing according to an embodiment of the present invention. In the above schematic diagrams, the black areas represent the background, and the white areas represent the projection of the chips in the positive direction, which is the corresponding chip area in the chip image.
[0068] As above Figure 3 As shown, the chip morphology identification process includes the following steps: First, the images of previously acquired C-shaped chips, spiral chips, and random chips are processed in grayscale using a computer system; then, the total area (S) of each image is calculated using the computer system. 总 ) and the projected area of the chips in the image (S) 屑 ), where, in calculating S 屑 To identify irregular chips, the image can be divided into several regular blocks, and the projected area of the chips in each block can be calculated. These areas are then summed to obtain the area of the irregular chips. Finally, the grayscale area method is used to identify the chips, based on the formula... Determine the proportion of chips in the image. When Z ≥ 0.5, the chips in the image are determined to be random chips. When Z < 0.5, the chips in the image are determined to be C-shaped chips or spiral chips. In this case, a second determination is needed using image transformation method to identify the chip type (the process of further distinguishing between C-shaped chips and spiral chips using image transformation method is described below).
[0069] According to the above embodiments of the present invention, before step S206, that is, before determining the chip type based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold, the method further includes: acquiring multiple historical chip images of the cutting component within a historical time period; performing grayscale processing on the multiple historical chip images, and identifying historical chip regions in the multiple historical chip images from the grayscale processed multiple historical chip images; determining the historical chip types corresponding to the multiple historical chip regions respectively; obtaining the actual chip quality corresponding to the multiple historical chip images respectively; and establishing a mapping relationship between historical chip types and actual chip quality.
[0070] In practice, a large number of chip images need to be pre-collected and processed to obtain their corresponding chip types. With the help of manual methods or models, the actual chip quality corresponding to each chip type is obtained, thereby establishing a mapping relationship between chip types and actual chip quality. This mapping relationship is then stored in the system. When subsequently judging the machining quality (chip quality) of the workpiece, the pre-stored mapping relationship between chip types and actual chip quality can be used for judgment. In the above embodiments of the present invention, after establishing the mapping relationship between historical chip types and actual chip quality, the method further includes: storing the mapping relationship.
[0071] When storing the above mapping relationships, a mapping relationship table can be created to store them in tabular form; alternatively, a data model can be created to store the mapping relationships in the form of an entity-relationship diagram. Of course, there are many other ways to store these mapping relationships, which will not be elaborated here.
[0072] Step S208: When the type of chip is determined to be random chips, the cutting quality of the CNC machine tool is determined to be lower than the cutting quality threshold, wherein random chips refer to chips with a shape different from the predetermined chips.
[0073] Optionally, the aforementioned predetermined chips refer to chips whose type can be determined based on their shape.
[0074] For example, C-shaped chips resemble the letter C, while spiral chips are spiral-shaped. Therefore, C-shaped and spiral chips are relatively easy to identify based on the chip shape in the acquired image. However, random chips come in a variety of shapes and are not easy to identify based on their shape. Therefore, these chips without a fixed shape are collectively referred to as random chips.
[0075] Step S210: When the type of chip is determined to be non-random chip, the cutting quality of the CNC machine tool is determined to be no less than the cutting quality threshold.
[0076] As above Figure 3 As shown, when judging machining quality, the mapping relationship between chip type and actual chip quality stored in the system can be used. However, in actual machining, the quality of the same type of chip can vary depending on the cutting method.
[0077] For example, C-shaped chips are a good chip type for turning but a bad chip type for drilling; continuous spiral chips are a good chip type for roughing but a bad chip type for finishing; and random chips, due to the large number and mixing of chip types, indicate an unstable machining state and are generally considered a bad chip type.
[0078] According to the above embodiments of the present invention, regarding how to further distinguish between C-shaped chips and spiral-shaped chips using image transformation when the chip type is determined to be non-random chips, the cutting quality determination method for CNC machine tools based on image recognition further includes: when the chip type is determined to be non-random chips, mirroring the chip image to obtain a mirror image of the chip image; superimposing the chip image and the mirror image to obtain a superimposed image; and determining the chip shape of the chip image based on the superimposed image.
[0079] Due to the complexity and variability of processing methods, the morphology of chips is also diverse. Even chips of the same shape will produce different images depending on the angle from which the image is captured, which makes identification difficult. Therefore, when the chip type is determined to be non-random chips, image transformation methods can be used for secondary identification to further determine its chip type. In the above embodiments of the present invention, determining the chip shape based on the superimposed image includes: when the chip shape is elliptical, determining the chip to be C-shaped; when the chip shape is X-shaped, determining the chip type to be spiral-shaped.
[0080] The embodiments of the present invention will now be described in detail with reference to Figures 8 and 9. Figure 8(a) is a schematic diagram of optional C-shaped chips after grayscale processing according to an embodiment of the present invention; Figure 8(b) is a schematic diagram of Figure 8(a) after horizontal flipping according to an embodiment of the present invention; Figure 8(c) is a schematic diagram of Figure 8(a) and Figure 8(b) superimposed according to an embodiment of the present invention; Figure 9(a) is a schematic diagram of optional spiral-shaped chips after grayscale processing according to an embodiment of the present invention; Figure 9(b) is a schematic diagram of Figure 9(a) after horizontal flipping according to an embodiment of the present invention; Figure 9(c) is a schematic diagram of Figure 9(a) and Figure 9(b) superimposed according to an embodiment of the present invention.
[0081] Figures 8(a) and 9(a) show the grayscale images of C-shaped chips and spiral chips, respectively. First, these images are horizontally flipped by 180° to obtain the horizontally flipped images of C-shaped chips and spiral chips shown in Figures 8(b) and 9(b). Then, Figures 8(a) and 8(b) and Figures 9(a) and 9(b) are superimposed to obtain Figures 8(c) and 9(c). It can be seen that the shapes of C-shaped chips and spiral chips are significantly different after superposition. As shown in Figure 8(c), the superimposed C-shaped chips form a circle, while the superimposed spiral chips form an X-shape, as shown in Figure 9(c). Therefore, the shapes of C-shaped chips and spiral chips after superposition are clearly different. Thus, this method can be used to distinguish the chip types a second time.
[0082] According to the above embodiments of the present invention, when the machining type of the CNC machine tool is determined to be drilling pin, the method further includes: when the chip type is determined to be random chips or C-shaped chips, generating a cutting adjustment strategy to adjust the cutting mode of the cutting component.
[0083] When using CNC machine tools for drilling and finishing, the machining quality is judged based on the obtained chip morphology. If the obtained chips are scrambled, it indicates that the machining process is unstable and the machining quality may not be good, requiring timely follow-up and improvement of chip conditions. If the obtained chips are spiral-shaped, the machining quality is good and a relatively ideal machining quality can be obtained. If the obtained chips are C-shaped, since C-shaped chips are mostly broken by colliding with the tool's flank face or the workpiece surface, it may affect the surface roughness of the machined material, also indicating that the machining quality may not be good, requiring timely improvement of chip conditions.
[0084] Furthermore, existing methods for judging machining quality typically monitor parameters such as cutting force and cutting heat during the cutting process. However, the analysis systems for these parameters are complex and slow to respond. Moreover, the force causing chip breakage has a weak correlation with the cutting force, and the relationship between chip breakage and the force component in the feed direction is more pronounced. Additionally, due to the complexity of the workpiece and the frequent changes in the feed direction, the curling direction and breakage form of the chips are constantly changing, thus significantly limiting the application of this quasi-monitoring method. In contrast, using a vision-based inspection method to detect chip morphology can effectively avoid interference from changes in cutting conditions and workpiece materials, allowing for more accurate feedback and judgment of machining quality.
[0085] As described above, through the above steps, according to the technical solution provided by the above embodiments of the present invention, during the cutting process of the target cutting object by the cutting component of a CNC machine tool, an image acquisition device is triggered to acquire chip images, wherein the chip images are images corresponding to the chips generated during the cutting process of the cutting component on the target cutting object; then, image recognition is performed on the chip images to obtain the chip regions in the chip images; then, the type of chip is determined according to the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold; then, when the type of chip is determined to be random chips, the cutting quality of the CNC machine tool is determined to be lower than the cutting quality threshold, wherein random chips refer to chips with shapes different from the predetermined chips; finally, when the type of chip is determined to be non-random chips, the cutting quality of the CNC machine tool is determined to be not lower than the cutting quality threshold. This achieves the purpose of acquiring chip images in real time during the workpiece processing, analyzing the chip images to determine the chip type, and determining the workpiece processing quality based on the chip type. This realizes the technical effect of real-time feedback of processing quality during the workpiece processing, which improves monitoring efficiency and reduces material waste.
[0086] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art that the processing quality of the workpiece can only be determined after the workpiece is processed, which makes it impossible to provide real-time feedback on the processing quality during the workpiece processing process and easily leads to material waste.
[0087] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0089] According to embodiments of the present invention, an image recognition-based CNC machine tool cutting quality determination apparatus is also provided for implementing the above-described image recognition-based CNC machine tool cutting quality determination method. Figure 10 This is a schematic diagram of a cutting quality determination device for a CNC machine tool based on image recognition according to an embodiment of the present invention, as shown below. Figure 10 As shown, the device includes: a first acquisition unit 101, a first acquisition unit 103, a first determination unit 105, a second determination unit 107, and a third determination unit 109. The following is a detailed description of this image recognition-based CNC machine tool cutting quality determination device.
[0090] The first acquisition unit 101 is used to trigger an image acquisition device to acquire chip images during the process of cutting a target object using the cutting part of a CNC machine tool. The chip images are images of chips generated during the cutting process of the cutting part on the target object.
[0091] The first acquisition unit 103 is used to perform image recognition on the chip image to obtain the chip region in the chip image.
[0092] The first determining unit 105 is used to determine the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold.
[0093] The second determining unit 107 is used to determine that the cutting quality of the CNC machine tool is lower than the cutting quality threshold when the type of chip is determined to be random chips, wherein random chips refer to chips with a shape different from the predetermined chips.
[0094] The third determining unit 109 is used to determine that the cutting quality of the CNC machine tool is not lower than the cutting quality threshold when the type of chip is determined to be non-random chip.
[0095] It should be noted that the first acquisition unit 101, the first acquisition unit 103, the first determination unit 105, the second determination unit 107, and the third determination unit 109 mentioned above correspond to steps S202 to S210 in the above embodiments. The five units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.
[0096] As can be seen from the above, in the scheme described in the above embodiments of the present invention, the first acquisition unit can trigger the image acquisition device to acquire chip images during the cutting process of the target cutting object by the cutting part of the CNC machine tool. The chip images are images corresponding to the chips generated during the cutting process of the cutting part on the target cutting object. Then, the first acquisition unit performs image recognition on the chip images to obtain the chip regions in the chip images. Next, the first determination unit determines the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold. Finally, the second determination unit... When the first determining unit identifies the chip type as scrambled chips, it determines that the cutting quality of the CNC machine tool is below the cutting quality threshold. Scrambled chips refer to chips with shapes different from the predetermined chips. Finally, when the third determining unit identifies the chip type as non-scrambled chips, it determines that the cutting quality of the CNC machine tool is not below the cutting quality threshold. This achieves the goal of acquiring chip images in real time during workpiece machining, analyzing the chip images to determine the chip type, and determining the workpiece machining quality based on the chip type. This realizes the technical effect of real-time feedback on machining quality during workpiece machining, which improves monitoring efficiency and reduces material waste.
[0097] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art that the processing quality of the workpiece can only be determined after the workpiece is processed, which makes it impossible to provide real-time feedback on the processing quality during the workpiece processing process and easily leads to material waste.
[0098] Optionally, the first acquisition unit includes: a first acquisition module, configured to perform grayscale processing on the chip image to obtain a grayscale-processed chip image; a first determination module, configured to determine other regions in the grayscale-processed chip image excluding the background region; and a second determination module, configured to determine the other regions as chip regions.
[0099] Optionally, the first determining unit includes: a third determining module for determining a first area of the chip region and a second area of the chip image; a fourth determining module for determining the ratio of the first area to the second area; a second obtaining module for comparing the ratio with a predetermined threshold to obtain a comparison result; a fifth determining module for determining that the chip is non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and a sixth determining module for determining that the chip is random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
[0100] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a second acquisition unit, used to acquire multiple historical chip images of the cutting component within a historical time period before determining the chip type based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold; an identification unit, used to identify historical chip regions in the multiple historical chip images after performing grayscale processing on the multiple historical chip images; a fourth determination unit, used to determine the historical chip types corresponding to the multiple historical chip regions respectively; a second acquisition unit, used to acquire the actual chip quality corresponding to the multiple historical chip images respectively; and an establishment unit, used to establish a mapping relationship between historical chip types and actual chip quality.
[0101] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes a storage unit for storing the mapping relationship after establishing the mapping relationship between historical chip types and actual chip quality.
[0102] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a third acquisition unit, used to mirror the chip image when the chip type is determined to be non-random chip, to obtain a mirror image of the chip image; a fourth acquisition unit, used to superimpose the chip image and the mirror image to obtain a superimposed image; and a fifth determination unit, used to determine the chip shape of the chip image based on the superimposed image.
[0103] Optionally, the fifth determining unit includes: a seventh determining module, used to determine that the chip is a C-shaped chip when the chip shape is elliptical; and an eighth determining module, used to determine that the type of chip is a spiral chip when the chip shape is X-shaped.
[0104] Optionally, the image recognition-based CNC machine tool cutting quality determination device further includes: a generation unit, used to generate a cutting adjustment strategy to adjust the cutting mode of the cutting parts when it is determined that the machining type of the CNC machine tool is drilling and the chip type is random chips or C-shaped chips.
[0105] According to another aspect of the present invention, a cutting quality determination system for CNC machine tools based on image recognition is also provided, wherein the cutting quality determination system for CNC machine tools based on image recognition uses any of the above-described methods for determining the cutting quality of CNC machine tools based on image recognition.
[0106] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any of the above-described methods for determining the cutting quality of a CNC machine tool based on image recognition.
[0107] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any communication device in a group of communication devices.
[0108] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: during the cutting process of a target cutting object using the cutting component of a CNC machine tool, triggering an image acquisition device to acquire a chip image, wherein the chip image is an image corresponding to the chips generated during the cutting process of the cutting component on the target cutting object; performing image recognition on the chip image to obtain the chip region in the chip image; determining the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold; when the type of chip is determined to be random chips, determining that the cutting quality of the CNC machine tool is lower than the cutting quality threshold, wherein random chips represent chips with shapes different from predetermined chips; when the type of chip is determined to be non-random chips, determining that the cutting quality of the CNC machine tool is not lower than the cutting quality threshold.
[0109] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: performing grayscale processing on the chip image to obtain a grayscale processed chip image; determining other regions in the grayscale processed chip image excluding the background region; and determining the other regions as chip regions.
[0110] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a first area of the chip region and a second area of the chip image; determining the ratio of the first area to the second area; comparing the ratio with a predetermined threshold to obtain a comparison result; determining that the chip is non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and determining that the chip is random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
[0111] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: acquiring multiple historical chip images of the cutting component within a historical time period; performing grayscale processing on the multiple historical chip images, and identifying historical chip regions in the multiple historical chip images from the grayscale processed multiple historical chip images; determining the historical chip types corresponding to the multiple historical chip regions respectively; obtaining the actual chip quality corresponding to the multiple historical chip images respectively; and establishing a mapping relationship between historical chip types and actual chip quality.
[0112] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: storing mapping relationships.
[0113] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: when the type of chip is determined to be non-random chip, the chip image is mirrored to obtain a mirror image of the chip image; the chip image and the mirror image are superimposed to obtain a superimposed image; and the chip shape of the chip image is determined based on the superimposed image.
[0114] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: when the chip shape is elliptical, determining that the chip is a C-shaped chip; when the chip shape is X-shaped, determining that the type of the chip is a spiral chip.
[0115] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: when it is determined that the type of chip is random chips or C-shaped chips, a cutting adjustment strategy is generated to adjust the cutting mode of the cutting component.
[0116] According to another aspect of the present invention, a processor is also provided, which is used to run a program, wherein the program executes any of the above-described methods for determining the cutting quality of a CNC machine tool based on image recognition.
[0117] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0118] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0119] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0120] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0121] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0122] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0123] 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 method for determining the cutting quality of a CNC machine tool based on image recognition, characterized in that, include: During the process of cutting a target object using the cutting component of a CNC machine tool, an image acquisition device is triggered to acquire chip images, wherein the chip images are images corresponding to the chips generated during the cutting process of the cutting component on the target object; Image recognition is performed on the chip image to obtain the chip region in the chip image; The type of chip is determined based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold. When the type of the chip is determined to be random chip, the cutting quality of the CNC machine tool is determined to be lower than the cutting quality threshold, wherein the random chip refers to a chip with a shape different from the predetermined chip. When the type of the chips is determined to be non-random chips, the cutting quality of the CNC machine tool is determined to be no less than the cutting quality threshold. The cutting quality determination method further includes: when the type of the chip is determined to be non-random chip, mirroring the chip image to obtain a mirror image of the chip image; superimposing the chip image and the mirror image to obtain a superimposed image; and determining the chip shape of the chip image based on the superimposed image. The method of determining the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold includes: determining the first area of the chip region and the second area of the chip image; determining the ratio of the first area to the second area; comparing the ratio with the predetermined threshold to obtain a comparison result; determining the chip as non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and determining the chip as random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
2. The method for determining the cutting quality of a CNC machine tool based on image recognition according to claim 1, characterized in that, Image recognition is performed on the chip image to obtain the chip region in the chip image, including: The chip image is processed into grayscale to obtain the grayscale processed chip image; Identify the regions other than the background region in the grayscale processed chip image; The other regions are identified as the cutting regions.
3. The method for determining the cutting quality of a CNC machine tool based on image recognition according to claim 1, characterized in that, Before determining the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold, the method further includes: Collect multiple historical chip images of the cutting component within a historical time period; After performing grayscale processing on the multiple historical chip images, the historical chip regions in the multiple historical chip images are identified from the grayscale processed images. Determine the historical chip type corresponding to each of the multiple historical chip regions; Obtain the actual chip quality corresponding to each of the multiple historical chip images; Establish a mapping relationship between the historical chip type and the actual chip quality.
4. The method for determining the cutting quality of a CNC machine tool based on image recognition according to claim 3, characterized in that, After establishing the mapping relationship between the historical chip type and the actual chip quality, the method further includes: storing the mapping relationship.
5. The method for determining the cutting quality of a CNC machine tool based on image recognition according to claim 1, characterized in that, Determining the chip shape of the chip image based on the superimposed image includes: When the chip shape is elliptical, the chip is determined to be a C-shaped chip; When the chip shape is X-shaped, the type of the chip is determined to be a spiral chip.
6. The method for determining the cutting quality of a CNC machine tool based on image recognition according to claim 5, characterized in that, When determining that the machining type of the CNC machine tool is drilling pins, the method further includes: When the type of the chip is determined to be either scrambled chips or C-shaped chips, a cutting adjustment strategy is generated to adjust the cutting mode of the cutting component.
7. A cutting quality determination device for CNC machine tools based on image recognition, characterized in that, include: The first acquisition unit is used to trigger an image acquisition device to acquire chip images during the process of cutting a target object using the cutting component of a CNC machine tool. The chip images are images of chips generated during the cutting process of the cutting component on the target object. The first acquisition unit is used to perform image recognition on the chip image to obtain the chip region in the chip image; The first determining unit is configured to determine the type of chip based on the relationship between the ratio of the first area of the chip region to the second area of the chip image and a predetermined threshold. The second determining unit is used to determine that the cutting quality of the CNC machine tool is lower than the cutting quality threshold when the type of the chip is determined to be random chips, wherein the random chips refer to chips with a shape different from the predetermined chips; The third determining unit is used to determine that the cutting quality of the CNC machine tool is not lower than the cutting quality threshold when the type of the chip is determined to be non-random chip. The cutting quality determination device further includes: a third acquisition unit, used to mirror the chip image when the chip type is determined to be non-random chip, to obtain a mirror image of the chip image; a fourth acquisition unit, used to superimpose the chip image and the mirror image to obtain a superimposed image; and a fifth determination unit, used to determine the chip shape of the chip image based on the superimposed image. The first determining unit includes: a third determining module, configured to determine the first area of the chip region and the second area of the chip image; a fourth determining module, configured to determine the ratio of the first area to the second area; a second obtaining module, configured to compare the ratio with a predetermined threshold to obtain a comparison result; a fifth determining module, configured to determine the chip as non-random chip when the comparison result indicates that the ratio is less than the predetermined threshold; and a sixth determining module, configured to determine the chip as random chip when the comparison result indicates that the ratio is not less than the predetermined threshold.
8. A processor, characterized in that, The processor is used to run a program, wherein the program executes the cutting quality determination method for CNC machine tools based on image recognition as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Machining center control system
CN116673750A