Printing defect detection method and device, printer and storage medium

By taking nozzle images and analyzing them during 3D printing, identifying and prompting nozzle defects, the shortcomings in defect detection in 3D printing are solved, and printing quality and efficiency are improved.

CN120334229APending Publication Date: 2025-07-18SHENZHEN TUOZHU TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510319149.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Uncontrollable factors during the 3D printing process lead to printing defects, such as collapse, warping, cracking of layers and unstable filling, and lack of timely detection and prompt mechanisms, resulting in waste of consumables.

Method used

Images are taken during printing through the nozzle of the 3D printer, defect detection is performed using the imaging module, nozzle defects are identified based on image analysis, and prompt information is generated.

Benefits of technology

Real-time detection and prompting of printing defects is realized, reducing waste of consumables, and improving print quality and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334229A_ABST
    Figure CN120334229A_ABST
Patent Text Reader

Abstract

The invention discloses a printing defect detection method and device, a printer and a storage medium, and the method comprises the steps: printing a preset printing piece through a nozzle of a 3D printer, and shooting the nozzle through a camera module in the printing process to obtain m first images; m is a positive integer; performing defect detection on the nozzle based on the m first images to obtain a target defect detection result; determining target prompt information according to the target defect detection result; the target prompt information is used for prompting a user to process the printing defect of the nozzle. By adopting the embodiment of the invention, the functions of detecting printing defects and giving out prompts are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of defect detection, and particularly to a printing defect detection method, device, printer, and storage medium. Background Art

[0002] With the rapid progress of industrial technology, traditional machining can no longer meet the current high requirements of people for product manufacturing. Advanced new manufacturing technologies have become the current development trend. For example, 3D printing technology. However, there are some uncontrollable factors in the 3D printing process, which makes the reliability of the 3D printing process unable to be guaranteed. Situations such as 3D printed parts collapsing, warping, layer cracking, and poor filling often occur. If printing errors are not detected in time, it will cause a large amount of waste of consumables. Therefore, in the process of 3D printing, how to detect printing defects and give a prompt has become an urgent problem to be solved. Summary of the Invention

[0003] Embodiments of this application provide a printing defect detection method, device, printer, and storage medium, which can detect printing defects and give a prompt.

[0004] In a first aspect, embodiments of this application provide a printing defect detection method, and the method includes:

[0005] Print a preset printed part through the nozzle of a 3D printer, and photograph the nozzle through a camera module during the printing process to obtain m first images; m is a positive integer;

[0006] Perform defect detection on the nozzle based on the m first images to obtain a target defect detection result;

[0007] Determine a target prompt message according to the target defect detection result; the target prompt message is used to prompt the user to handle the printing defect of the nozzle.

[0008] In a second aspect, embodiments of this application provide a printing defect detection device, and the device includes: a printing unit, a defect detection unit, and a prompt unit, where:

[0009] The printing unit is used to print a preset printed part through the nozzle of a 3D printer, and photograph the nozzle through a camera module during the printing process to obtain m first images; m is a positive integer;

[0010] The defect detection unit is used to perform defect detection on the nozzle based on the m first images to obtain a target defect detection result;

[0011] The prompt unit is used to determine a target prompt message according to the target defect detection result; the target prompt message is used to prompt the user to handle the printing defect of the nozzle.

[0012] In a third aspect, an embodiment of the present application provides a printer, including: a processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory so that the printer executes the method described in the first aspect.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program enables a computer to execute the method described in the first aspect.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer is operable to enable the computer to execute the method described in the first aspect.

[0015] Implementing the embodiments of the present application has the following beneficial effects:

[0016] It can be seen that in the embodiments of the present application, first, a preset printed part is printed through the nozzle of a 3D printer, and during the printing process, the nozzle is photographed by a camera module to obtain m first images; the nozzle is defect-detected based on the m first images to obtain a target defect detection result; a target prompt message is determined according to the target defect detection result; the target prompt message is used to prompt the user to process the printing defect of the nozzle. Thus, the m first images obtained by photographing the nozzle by the camera module during the printing process can comprehensively record the working state of the nozzle when printing the preset printed part. Then, features related to the nozzle defect are extracted from these m first images for defect detection to obtain a target defect detection result. Finally, a target prompt message is determined according to the target defect detection result, realizing the function of detecting printing defects and sending out prompts. Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the following will describe the drawings required to be used in the embodiments of the present application or the background art.

[0018] Figure 1 is a schematic structural diagram of a 3D printer provided by an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of an application scenario of a printing defect detection method provided by an embodiment of the present application;

[0020] Figure 3 is a schematic flowchart of a printing defect detection method provided by an embodiment of the present application;

[0021] Figure 4It is a schematic diagram of an application scenario of another printing defect detection method provided by an embodiment of the present application;

[0022] Figure 5 It is a schematic diagram of an application scenario of yet another printing defect detection method provided by an embodiment of the present application;

[0023] Figure 6 It is a flowchart of a working process of a printing defect detection method provided by an embodiment of the present application;

[0024] Figure 7 It is a block diagram of the functional units of a printing defect detection device provided by an embodiment of the present application;

[0025] Figure 8 It is a schematic diagram of the structure of a printer provided by an embodiment of the present application. Detailed implementation manners

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

[0027] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0028] It should be understood that the term "and / or" in this article is only an association relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship. The "multiple" mentioned in the embodiments of the present application refers to two or more.

[0029] The "at least one (piece)" or its similar expression in the embodiments of the present application refers to any combination of these items, including any combination of a single item (piece) or plural items (pieces), meaning one or more, and multiple means two or more. For example, at least one (piece) of a, b, or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.

[0030] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not make any limitations on this.

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

[0032] The computer described in the embodiments of the present application may include a printer. It should be noted that the printer involved in the present application, unless otherwise specified, generally refers to a 3D printer.

[0033] Some proprietary terms or phrases related to the present application will be explained below:

[0034] 3D printing: A type of additive manufacturing technology. It is a technology that constructs objects by layer-by-layer printing using powdered metals, plastics, or other bondable materials based on digital model files. Different from traditional subtractive manufacturing (such as cutting, grinding, etc.), 3D printing creates three-dimensional entities by gradually stacking materials from scratch and can manufacture objects with complex shapes, and has a wide range of applications in multiple fields such as industrial manufacturing, healthcare, architecture, and education. For example, in the healthcare field, it can print human organ models to assist in surgical planning, and in the industrial field, it can directly print components, etc.

[0035] 3D Printer: It is a device that realizes 3D printing technology. Through specific printing technologies and mechanisms, it stacks various materials layer by layer according to a pre-designed three-dimensional model, and finally manufactures a three-dimensional solid object. Common 3D printers can be divided into various types according to different printing technologies, such as Fused Deposition Modeling (FDM), Stereolithography (SLA), Selective Laser Sintering (SLS), etc. Taking the FDM type 3D printer as an example, it usually consists of a nozzle, an extrusion mechanism, a heating device, a printing platform, a control system, etc. During operation, the heating device heats the filamentous printing material (such as PLA, ABS, etc.) to a molten state, the extrusion mechanism extrudes the molten material from the nozzle, and the nozzle moves on the printing platform according to the preset path, stacking the materials layer by layer, thereby constructing a three-dimensional object.

[0036] Printing Defects: It refers to various defects or problems that occur during the 3D printing process, where the printed object does not meet the expected design requirements or quality standards due to various factors. Common printing defects include but are not limited to the following: Appearance Defects: Such as rough surface, burrs, bubbles, layer separation, warping, etc., which affect the appearance quality and aesthetics of the object. Dimensional Accuracy Defects: The size of the printed object deviates from the designed size, which may be too large or too small, exceeding the allowable tolerance range, resulting in the object being unable to be assembled or used normally. Internal Defects: Such as internal pores, cracks, etc., which will reduce the mechanical properties and strength of the object, affecting its service life and reliability. Structural Defects: For example, the residual support structure, model collapse, and loose connection parts, etc., which affect the overall structural integrity and stability of the object.

[0037] Defect Detection: It refers to the process of inspecting and analyzing 3D printed products through various technologies and methods to identify and locate the existing printing defects. The purpose of defect detection is to timely discover problems in the printing process, so as to take corresponding measures for improvement and optimization, and improve the printing quality and product qualification rate. Common defect detection methods include: Visual Inspection: Using devices such as cameras to obtain images of the printed object, and through image processing and analysis technologies, such as edge detection, feature extraction, image comparison, etc., to identify defects on the surface of the object. Laser Scanning Detection: Using a laser scanner to scan the printed object to obtain the three-dimensional contour data of the object, and detecting defects such as dimensional deviation and surface unevenness by comparing with the design model. X-ray Detection: Passing X-rays through the printed object to obtain images of the internal structure for detecting internal pores, cracks, etc. This method is very effective for detecting internal defects, but the equipment cost is relatively high.

[0038] Deep learning-based classification algorithm: A type of algorithm that uses deep learning technology to classify data. Deep learning is a branch of machine learning that enables a computer to automatically learn features and patterns from a large amount of data by constructing a neural network model with multiple layers, thereby achieving tasks such as data classification, prediction, and generation. It can be applied to 3D printing defect detection.

[0039] Please refer to Figure 1 , Figure 1 which is a schematic structural diagram of a 3D printer provided by an embodiment of this application. The 3D printer may include the following components: a control module, a camera module, a printing platform, a nozzle, a guide rail module, etc., which are not limited herein. Among them:

[0040] The control module is the core control unit of the 3D printer, used to coordinate the work of each module. On the one hand, it is used to control the nozzle to perform printing operations according to preset printing paths and parameters. On the other hand, it is also used to receive the image data captured by the camera module, process and analyze these data, perform defect detection on the nozzle based on the images, obtain the target defect detection result, and determine the corresponding target prompt information according to this result to prompt the user to handle the printing defects of the nozzle.

[0041] The camera module is responsible for photographing the nozzle during the process of the 3D printer printing a preset printed part through the nozzle, obtaining m first images. These images are the data sources for subsequent defect detection. By continuously photographing, the working state of the nozzle at different times can be recorded, providing a basis for judging whether there are defects in the nozzle based on image analysis.

[0042] The printing platform is the basic carrier for the formation of the printed part. The material extruded by the nozzle will be stacked layer by layer on the printing platform, finally forming a complete printed part. During the entire printing defect detection process, it provides a stable basis for printing, and its state will also indirectly affect the printing quality and the working condition of the nozzle.

[0043] The nozzle is a key execution component of the 3D printer, used to extrude printing materials. During the printing process, according to the instructions of the control module, the filamentous printing materials are heated and melted and then extruded layer by layer to build a preset printed part on the printing platform. During the printing defect detection process, it is the core object to be monitored, and its working state directly affects the printing quality. The camera module will photograph it to obtain image information for judging whether there are defects.

[0044] The guide rail module provides guidance and support for the movement of components such as the nozzle and the printing platform. During the printing process, the nozzle needs to move in three-dimensional space to complete the printing task. The guide rail module can ensure that the nozzle moves along an accurate path, guaranteeing the printing precision and stability. At the same time, in some printers, the printing platform may also move up and down or in other directions through the guide rail module to cooperate with the nozzle to complete the printing operation. Its normal operation is also crucial for printing quality and defect detection.

[0045] Please refer to Figure 2 , Figure 2 which is a schematic diagram of the application scenario of a printing defect detection method provided by an embodiment of the present application. Among them, the printing defect detection method provided by the present application can be applied to a 3D printer. Specifically, the printing defect detection method is applied to a single-nozzle 3D printer.

[0046] It can be seen that the control module, the printing platform, the nozzle, and the camera module are all parts of the 3D printer. The camera module can be set on the right side of the nozzle, and the printed part is the object printed by the 3D printer. The nozzle of the 3D printer can print a printed part on the printing platform based on preset parameters. Among them, the printed part can be a model, a line, a single point, etc., which is not limited here.

[0047] Among them, the control module can receive the user's command, control the nozzle to extrude the printing material to perform printing on the printing platform. During the printing process, the control module can also receive the image data of the nozzle taken by the camera module and analyze and process these data to determine whether there are defects such as blockage and abnormal extrusion in the nozzle during the printing process. The specific implementation process is as follows:

[0048] Print a preset printed part through the nozzle of the 3D printer, and take pictures of the nozzle through the camera module during the printing process to obtain m first images; m is a positive integer;

[0049] Perform defect detection on the nozzle based on the m first images to obtain a target defect detection result;

[0050] Determine a target prompt message according to the target defect detection result; the target prompt message is used to prompt the user to handle the printing defect of the nozzle.

[0051] It can be seen that in the embodiments of the present application, first, a preset printed part is printed through the nozzle of a 3D printer. During the printing process, the nozzle is photographed by a camera module to obtain m first images. Based on the m first images, defect detection is performed on the nozzle to obtain a target defect detection result. According to the target defect detection result, a target prompt message is determined. The target prompt message is used to prompt the user to handle the printing defect of the nozzle. Thus, the m first images obtained by photographing the nozzle by the camera module during the printing process can comprehensively record the working state of the nozzle when printing the preset printed part. Then, features related to the nozzle defect are extracted from these m first images for defect detection to obtain a target defect detection result. Finally, according to the target defect detection result, a target prompt message is determined, realizing the function of detecting printing defects and issuing prompts.

[0052] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of a printing defect detection method provided by an embodiment of the present application. The printing defect detection method can be applied to a 3D printer, and the method may include but is not limited to the following steps:

[0053] S301. Print a preset printed part through the nozzle of a 3D printer. During the printing process, photograph the nozzle by a camera module to obtain m first images; m is a positive integer.

[0054] In the embodiments of the present application, the camera module may include at least one of the following: industrial camera, macro camera, network camera, thermal imaging camera, etc., which is not limited herein.

[0055] In a specific embodiment, a 3D model file of a preset printed part can be obtained or created by oneself using 3D modeling software (such as Blender, SolidWorks, etc.), or a 3D model file of a suitable preset printed part can be downloaded from an online model library (such as Thingiverse, MyMiniFactory, etc.). Then, the 3D model file can be converted into a general format recognizable by the 3D printer, such as the STL format. If there are problems with the obtained model, such as broken surfaces and overlapping surfaces, repair tools (such as Netfabb, Meshmixer, etc.) can also be used to repair it to ensure that the model can be printed smoothly.

[0056] Next, according to the requirements of the preset printed part for the material, a suitable printing material (such as PLA, ABS, etc.) can be selected from the 3D printer, the printing material is installed on the material tray of the 3D printer, and the printing material is introduced near the nozzle through a feeding structure. The preset printed part is printed on the printing platform of the 3D printer through the nozzle. Further, during the printing process, the nozzle can be periodically photographed by the camera module, so as to obtain m first images.

[0057] It should be noted that the 3D printer in the embodiments of the present application may be a 3D printer as shown in Figure 1 the figure. Specifically, it may be a single-nozzle 3D printer. Those skilled in the art can also apply this method to a multi-nozzle 3D printer. Among them, the method for detecting printing defects of a multi-nozzle 3D printer is similar to the method in the embodiments of the present application, which will not be elaborated here.

[0058] Optionally, in the embodiments of the present application, the distance between the imaging module and the nozzle is within a preset range, and / or both the nozzle and the imaging module can be installed on the tool head. The tool head can move along at least two intersecting directions for 3D printing. Among them, the preset range can be preset in advance or by default; the 3D printer may include a tool head. The tool head can accurately control the position and shape of the material extruded by the nozzle according to the model data received by the 3D printer. At the same time, the imaging module can provide real-time feedback on the printing situation for adjustment and optimization to ensure that an object meeting the design requirements is printed.

[0059] It should be explained that the above tool head can be a detachable tool head, and the tool head can be separated from the 3D printer and sold as an independent device.

[0060] Please refer to Figure 4 , Figure 4 which is a schematic diagram of an application scenario of another method for detecting printing defects provided by the embodiments of the present application. It can be seen that the 3D printer may include: a control module, a printing platform, a nozzle, an imaging module, etc. The imaging module can be arranged on the left side of the nozzle, and the printed part is an object printed by the 3D printer. The nozzle of the 3D printer can print the printed part on the printing platform based on preset parameters.

[0061] It should be explained that the imaging module can also be arranged on any one of the front, back, left, and right sides of the nozzle, as long as the distance between the imaging module and the nozzle is within the preset range.

[0062] In a certain embodiment, the preset range can be determined according to the device parameters of the imaging module. Specifically, first, clarify the degree of detail of the nozzle to be captured, such as the size of the smallest detectable defect. Then, according to the resolution parameter of the imaging module, calculate the distance range that can clearly present these details. For example, if a 0.1-mm fine wear needs to be detected, an appropriate distance needs to be selected so that this size occupies at least a certain number of pixels in the image to ensure that the algorithm can identify it. This can be determined by testing the images taken at different distances and comparing the detail clarity to determine the preset range.

[0063] For example, assume that after adjusting the distance multiple times and testing the images taken at different distances, it is found that when the distance between the camera module and the nozzle is between 13 mm and 15 mm, the taken images can clearly show the fine wear of 0.1 mm and ensure the appropriate proportion of the overall nozzle in the image, meeting the requirements of algorithm recognition and detection. Then this range of 13 mm to 15 mm can be used as the preset range between the camera module and the nozzle.

[0064] In one embodiment, the preset range can be determined according to the shooting field of view range of the camera module. Specifically, the surrounding area of the nozzle that needs to be photographed can be considered, such as the material extrusion range, the hot end part, etc. If the field of view is too small, it may not be possible to obtain complete working state information; if the field of view is too large, the nozzle will occupy too small a proportion in the image. By adjusting the distance, the field of view of the camera module can include the key areas and highlight the main body of the nozzle. Generally, it can be estimated using the field of view angle parameter of the camera module and the size of the area to be photographed, so as to determine the preset range.

[0065] For example, assume that after adjusting the distance multiple times and testing the images taken at different distances, and comparing the observation effects, it is finally determined that when the distance between the camera module and the nozzle is between 28 mm and 32 mm, the field of view of the camera module can completely include key areas such as the material extrusion range and the hot end part, and the main body of the nozzle can occupy an appropriate proportion in the image, facilitating subsequent defect detection and analysis. Then this range of 28 mm to 32 mm can be used as the preset range between the camera module and the nozzle.

[0066] Optionally, a supplementary lighting module is provided at a preset position of the 3D printer; the supplementary lighting module is used to provide sufficient and uniform lighting for the camera module when the lighting is insufficient; the supplementary lighting module can include at least one of the following: LED supplementary lights, reflectors, flashlights, sun lamps, etc., which are not limited herein. The preset position can be preset in advance or by default.

[0067] Please refer to Figure 5 , Figure 5 FIG. is a schematic diagram of an application scenario of another printing defect detection method provided by an embodiment of the present application. It can be seen that in addition to including a control module, a printing platform, a nozzle, and a camera module, the 3D printer may further include a supplementary lighting module, and the printed part is an object printed by the 3D printer. The nozzle of the 3D printer can print a printed part on the printing platform based on preset parameters. When the lighting is insufficient, the control module can control the supplementary lighting module to illuminate the camera module so that the camera module can take clear images.

[0068] Optionally, in step S301, the step of taking m first images of the nozzle by the camera module may include the following steps:

[0069] S11. Perform self-test through the imaging module to determine whether the imaging module is in a normal state;

[0070] S12. If so, obtain a preset frequency; use the imaging module to capture the nozzle at the preset frequency to obtain the m first images;

[0071] In the embodiments of the present application, self-test can be performed through the imaging module to determine whether the imaging module is in a normal state. Specifically, the image sensor in the imaging module has a series of parameters, such as sensitivity (ISO), pixel size, dynamic range, etc. These parameters can be read through the driver or relevant setting software of the imaging module and compared with the module's specification manual. If the parameters show abnormalities, it means that there is a fault in the sensor or a problem with the module's settings. For example, if the read sensitivity far exceeds the normal range, it may be that the photosensitive element of the sensor is damaged, or the circuit controlling the sensitivity fails, that is, the imaging module is not in a normal state. On the contrary, if these parameters all show normal, it can be confirmed that the imaging module is in a normal state.

[0072] If the imaging module is in a normal state, obtain a preset frequency. The preset frequency can be preset in advance or default. For example, if it is necessary to monitor the rapidly changing state of the nozzle, a relatively high shooting frequency can be preset; if it is only necessary to regularly check the state of the nozzle, a relatively low shooting frequency is sufficient. Then, the imaging module can be used to capture the nozzle at the preset frequency to obtain m first images. Specifically, the control module can set the shooting frequency of the imaging module to the preset frequency, and then control the imaging module to automatically capture the nozzle at the preset frequency.

[0073] It should be noted that in addition to the shooting frequency, the control module can also set other shooting parameters of the imaging module, such as resolution, exposure time, gain, etc. The resolution determines the clarity of the captured image, and an appropriate resolution should be selected according to actual needs; the exposure time affects the brightness of the image and can be adjusted according to the light conditions of the shooting environment; the gain can enhance the signal strength of the image, but too high a gain will increase the noise of the image, and it is necessary to balance according to the actual situation.

[0074] If the imaging module is not in a normal state, stop shooting, and an alarm can also be issued to notify the user to perform manual detection or repair on the imaging module until the imaging module returns to a normal state.

[0075] In this way, self-testing through the camera module can identify hardware problems such as sensor dead pixels and lens contamination of the camera module, avoid blurry, noisy or images lacking key details during shooting, reduce the probability of invalid shooting, and invalid shooting will generate a large amount of meaningless data, occupying computing resources for processing and storage resources for saving. By excluding abnormal situations through self-testing and only shooting when the camera module is normal, unnecessary data generation can be reduced, saving computing resources (such as the computing resources of the CPU and GPU) and storage resources (such as hard disk space), and improving the overall operating efficiency of the system.

[0076] In addition, when the self-test of the camera module fails, the control module will clearly prompt that there is a problem and abort the shooting. This enables the user to quickly locate the possible faults of the camera module, perform troubleshooting and repair in a timely manner, reduce system downtime, and improve the maintainability of the device. For example, if the self-test finds that the connection cable of the camera module is loose, the maintenance personnel can quickly find the problem and repair it, rather than spending a lot of time looking for the reason due to sudden image abnormalities during the printing process.

[0077] Optionally, the process of obtaining the preset frequency may include the following steps:

[0078] A1. Obtain the target structure information corresponding to the preset printed matter;

[0079] A2. Determine the first frequency according to the target structure information;

[0080] A3. Obtain the printing speed of the 3D printer for the preset printed matter to obtain the first printing speed;

[0081] A4. Determine the moving speed of the nozzle according to the first printing speed to obtain the first moving speed;

[0082] A5. Determine the first adjustment factor corresponding to the first moving speed;

[0083] A6. Adjust the first frequency according to the first adjustment factor to obtain the second frequency;

[0084] A7. Obtain the reference frame rate corresponding to the camera module;

[0085] A8. Obtain the target usage parameters corresponding to the camera module;

[0086] A9. Determine the target optimization factor corresponding to the target usage parameters;

[0087] A10. Adjust the reference frame rate according to the target optimization factor to obtain the target frame rate;

[0088] A11. When the second frequency is less than or equal to the target frame rate, determine the preset frequency according to the second frequency;

[0089] A12. When the second frequency is greater than the target frame rate, determine the preset frequency according to the target frame rate.

[0090] In the embodiments of the present application, the target structure information may include at least one of the following: size, geometric shape, topological information, etc., which is not limited herein; the target usage parameters may include at least one of the following: usage frequency, usage duration, etc., which is not limited herein.

[0091] In a specific embodiment, the target structure information corresponding to the preset printed matter can be obtained. Specifically, the 3D model file of the preset printed matter can be obtained first. The 3D model file contains information such as the geometric dimensions, shape, and topology of the preset printed matter. The target structure information can be extracted from the 3D model file. Then, the first frequency can be determined according to the target structure information. Specifically, the structural complexity of the preset 3D printer can be evaluated according to the target structure information, and then the corresponding frequency can be determined according to the structural complexity to obtain the first frequency.

[0092] For example, if the structure of the preset printed matter is simple, such as a regular cube, cylinder, etc., its changes during the printing process are relatively easy to predict and capture. In this case, the requirement for the shooting frequency of the camera module is relatively low, and the first frequency can be set to a smaller value, for example, 2 frames per second. Another example is that when the preset printed matter has a complex geometric shape, fine details, or internal structure, more unpredictable changes may occur during the printing process. For example, a printed matter with complex hollowing, curved surface modeling, or multi-layer nested structure requires a higher shooting frequency to capture every key change moment, and the first frequency can be set to a larger value, for example, 10 frames per second.

[0093] Then, the printing speed of the 3D printer for the preset printed matter can be obtained to get the first printing speed. Specifically, the technical document of the 3D printer can be obtained. The technical document will list the typical printing speeds of the printer for different types of printed matters, so as to obtain the printing speed of the preset printed matter, that is, the first printing speed. Or, the operation panel of the 3D printer can be viewed, and by entering the printing settings or task information menu through the operation panel, relevant information such as the expected printing speed or the real-time speed of the currently ongoing printing task can generally be found, so as to obtain the first printing speed.

[0094] For example, in the operation interface of a common FDM (Fused Deposition Modeling) 3D printer, the printing speed parameter, that is, the first printing speed, can be viewed in options such as "Print Task Details" or "Set Parameters".

[0095] Furthermore, the moving speed of the nozzle can be determined according to the first printing speed to obtain the first moving speed. Specifically, the mapping relationship between the preset printing speed and the moving speed can be stored in advance, and the first moving speed corresponding to the first printing speed can be determined based on this mapping relationship. Alternatively, the first moving speed can also be calculated according to an empirical formula, as follows:

[0096] Assume that the first printing speed is Vp, the cross-sectional area of the nozzle is A, and the material extrusion rate is r, where Vp = A * r. Given the printing speed and nozzle size, the material extrusion rate can be calculated according to this formula. To some extent, the material extrusion rate is related to the nozzle moving speed. Generally, the nozzle moving speed Vn can be calculated through an empirical formula, as follows:

[0097] Vn = k * r;

[0098] where k is a preset empirical coefficient, which is related to the printing material, nozzle characteristics, etc. The value range of k is generally between 1.2 and 2. The first moving speed can be calculated according to the above formula.

[0099] Then, the first adjustment factor corresponding to the first moving speed can be determined. For example, the mapping relationship between the preset moving speed and the adjustment factor can be stored in advance, and the first adjustment factor corresponding to the first moving speed can be determined based on this mapping relationship. The value range of the first adjustment factor can be -0.2 to 0.2. Next, the first frequency can be adjusted according to the first adjustment factor. The specific calculation formula is as follows:

[0100] Second frequency = First frequency * (1 + First adjustment factor);

[0101] According to the above formula, the second frequency can be obtained. Then, the reference frame rate corresponding to the camera module can be obtained. Specifically, the device type of the camera module can be obtained first to get the target device type. Then, the reference frame rate can be determined according to the target device type. For example, the mapping relationship between the preset device type and the frame rate can be stored in advance, and the reference frame rate corresponding to the target device type can be determined based on this mapping relationship.

[0102] It should be noted that the frame rate of the camera module refers to the maximum number of images it can capture and process per second, that is, the maximum frequency of image acquisition by the camera module.

[0103] Then, the target usage parameters corresponding to the camera module can be obtained. Specifically, the usage data of the camera module can be stored in the database of the control module, and the target usage parameters can be determined from the usage data. For example, the target usage parameter can be the usage frequency. The number of usage times of the camera module and the corresponding usage time period can be obtained from the above usage data, and the usage frequency can be obtained by dividing the usage time period by the number of usage times, that is, the target usage parameter.

[0104] Then, the target optimization factor corresponding to the target usage parameter can be determined. Specifically, the mapping relationship between the preset usage parameter and the optimization factor can be stored in advance, and the target optimization factor corresponding to the target usage parameter can be determined based on this mapping relationship. The value range of the target optimization factor can be -0.3 to 0.3. Then, the reference frame rate can be adjusted according to the target optimization factor. The specific calculation formula is as follows:

[0105] Target frame rate = reference frame rate * (1 + target optimization factor);

[0106] According to the above formula, the target frame rate can be obtained. When the second frequency is less than or equal to the target frame rate, the second frequency can be directly set as the preset frequency;

[0107] When the second frequency is greater than the target frame rate, the target frame rate can be directly set as the preset frequency.

[0108] In this way, by obtaining the target structure information of the preset print and determining the first frequency accordingly, the frequency setting can be matched with the specific structure of the print. For example, for a print with a complex structure and rich details, a relatively high first frequency may be required to more accurately capture the detailed changes during the printing process in order to timely detect possible printing problems, such as irregular lines and uneven filling; while for a print with a simple structure, a lower first frequency may be sufficient to meet the monitoring requirements, which can reduce unnecessary data collection and processing while ensuring the monitoring effect.

[0109] In addition, by obtaining the printing speed of the 3D printer for the preset print and determining the nozzle movement speed, the frequency setting can be associated with the dynamic situation of the actual printing process. The printing speed and the nozzle movement speed will affect the time interval and change rate of each stage during the printing process. Further determining the frequency based on this speed information helps ensure that the camera module can capture the printing situation of the nozzle at different positions and movement states at an appropriate rhythm, avoiding problems such as missed shots or overly dense shooting resulting in data redundancy.

[0110] S302. Perform defect detection on the nozzle based on the m first images to obtain a target defect detection result.

[0111] In the embodiments of the present application, a suitable defect detection algorithm based on deep learning, such as classification, detection, or segmentation, can be selected according to the actual functional requirements of the user and the limitations of the control module. The m first images are analyzed through the defect detection algorithm to determine whether there are defects in the state of the nozzle at this time, thereby obtaining the target defect detection result.

[0112] In one embodiment, the defect detection algorithm can be the nozzle defect detection based on the deep learning classification algorithm; the actual functional requirements of the user: the user only needs to quickly determine whether there are defects in the nozzle, without needing to accurately know the location of the defects, and has a relatively high requirement for the detection speed, hoping to process a large number of images in a short time to monitor the state of the nozzle in real time. Limitations of the control module: The computing resources of the control module are limited and cannot support overly complex model operations. The specific operation process is as follows:

[0113] Data preparation: Collect a large number of images of 3D printer nozzles, where a part are images of normal nozzles and the other part are images of nozzles with various defects (such as blockage, wear, etc.). These images are labeled to mark whether the nozzles in the images are "normal" or "defective". The image dataset is divided into a training set, a validation set, and a test set according to the ratio of 70%, 20%, and 10%.

[0114] Model selection: Considering the computing resource limitations and the requirements for speed, a relatively simple-structured MobileNet model can be selected as the classifier.

[0115] Model training: During the training process, the training set images are input into the MobileNet model. The model calculates the prediction results through forward propagation, and then compares them with the labeled true results to calculate the cross-entropy loss. Optimization algorithms such as stochastic gradient descent are used for backpropagation to update the model parameters and continuously reduce the loss value. During the training process, the validation set is regularly used to evaluate the model performance, and hyperparameters (such as learning rate, batch size, etc.) are adjusted to prevent overfitting.

[0116] Defect detection: The m first images are input into the trained MobileNet model, and the model outputs the prediction results ("normal" or "defective") of the state of the nozzle in each image, thereby obtaining the target defect detection result. For example, when the model outputs "defective" for one of the images, the user knows that there is a problem with the nozzle at that moment and can take further measures.

[0117] In one embodiment, the defect detection algorithm can be nozzle defect detection based on a deep learning detection algorithm. The actual functional requirements of the user are as follows: The user not only needs to know whether there are defects in the nozzle but also needs to accurately know the specific location of the defects on the nozzle in order to more accurately judge the type and severity of the defects and provide detailed information for maintenance. There are relatively high requirements for the accuracy of detection. Control module limitations: The control module has a certain computing power and can support relatively complex model operations, but there are also certain requirements for the detection speed and it cannot be too slow. The specific operation process is as follows:

[0118] Data preparation: Collect nozzle images, and make detailed annotations on the nozzles and defects in the images. Mark the positions of the defects on the nozzle with bounding boxes, and at the same time annotate the types of the defects (such as small holes, cracks, etc.). Perform data augmentation operations on the data set, such as random flipping, rotation, etc., to increase data diversity.

[0119] Model selection: Select the YOLOv5 model, which has high accuracy and speed in object detection tasks and can meet the user's balanced requirements for position accuracy and detection speed.

[0120] Model training: Input the training set images into the YOLOv5 model. The model first extracts image features through the feature extraction network, and then uses operations such as region proposal and classification regression to predict the positions and categories of the defects in the image. Calculate the loss between the prediction results and the true annotations (including classification loss and regression loss), and use the optimizer to update the model parameters. During the training process, adjust the model hyperparameters through the validation set to optimize the model performance.

[0121] Defect detection: Input m first images into the trained YOLOv5 model, and the model outputs the bounding box coordinates and category information of the defects in each image. For example, the model detects that there is a "crack" defect in the nozzle of an image and gives the depth information of the "crack" (such as the position coordinates of the "crack"), and the user can perform targeted maintenance or replacement on the nozzle based on this information.

[0122] In one embodiment, the defect detection algorithm can be nozzle defect detection based on a deep learning segmentation algorithm. The actual functional requirements of the user are as follows: The user needs to conduct a very detailed analysis of the surface state of the nozzle and hopes to accurately identify each defect area on the nozzle surface and the boundary between the defect area and the normal area in order to deeply study the development process of the defects and their impact on the printing quality. Control module limitations: The control module has strong computing power and can support the operation of complex models, but has extremely high requirements for the accuracy of the algorithm. The specific operation process is as follows:

[0123] Data Preparation: Collect a large number of nozzle images and perform pixel-level annotation. Each pixel in the image is annotated as categories such as "background", "normal nozzle", or "defect". The images can also be preprocessed, such as normalization, to improve the model training effect.

[0124] Model Selection: The U-Net model is adopted, which performs well in semantic segmentation tasks and can accurately segment different regions.

[0125] Model Training: Input the training set images into the U-Net model. The model extracts image features through the encoder, then gradually restores the image resolution through the decoder, and outputs the category prediction for each pixel. Calculate the loss between the prediction result and the true annotation (such as cross-entropy loss or Dice loss), and use the optimization algorithm to update the model parameters. During the training process, continuously adjust the model parameters through the validation set to improve the segmentation accuracy of the model.

[0126] Defect Detection: Input m first images into the trained U-Net model, and the model outputs the pixel-level segmentation results for each image. Users can clearly see the defective areas, normal areas on the nozzle surface, and the boundaries between them through visualizing the segmentation results. For example, users can see an irregular defective area on the nozzle surface, and further study the impact of the defect on the printing process by analyzing the size, shape, and position of this area.

[0127] In this way, by selecting a suitable defect detection algorithm according to the actual functional requirements of users, diverse requirements can be met. Different user functional requirements have different focuses on defect detection. Classification algorithms can quickly determine whether there are defects in the nozzle and are suitable for scenarios where only a simple understanding of the overall state of the nozzle is needed; detection algorithms can locate the defect positions and are very helpful for situations that require precise maintenance; segmentation algorithms can carefully analyze the defective areas and meet the needs of in-depth research on defects. By choosing the appropriate algorithm, various actual needs can be accurately met.

[0128] In addition, deep learning algorithms can fully exploit the information in the images, not only the surface features but also the deep semantic information, etc. Through the analysis of m first images, valuable information can be extracted from a large amount of image data, providing data support for subsequent equipment maintenance, process improvement, etc.

[0129] Optionally, in step S302, the defect detection of the nozzle based on the m first images to obtain the target defect detection result may include the following steps:

[0130] S21. Obtain the current printing state of the 3D printer at the current moment;

[0131] S22. Determine the detectable defect types corresponding to the current printing state;

[0132] S23. Detect defects of the nozzle according to the detectable defect types and the m first images to obtain the target defect detection result.

[0133] In the embodiments of the present application, the current printing state may include one of the following: ready to print, printing, paused printing, printing completed, printing error, etc., which are not limited herein; the detectable defect types may include at least one of the following: wrapped head, empty printing, fried noodles, wire drawing, etc., which are not limited herein.

[0134] In a specific embodiment, the current printing state of the 3D printer at the current moment can be obtained first. Specifically, the nozzle and the heating bed of the 3D printer are usually equipped with temperature sensors. By reading the data of the temperature sensors, the current temperature states of the nozzle and the heating bed can be understood, and it can be judged whether the set temperature is reached and whether the temperature is stable, etc. This is very important for ensuring that the printing material can be correctly melted and adhered. The 3D printer may also include motion sensors. For example, limit switches, encoders, etc. The limit switch can determine whether the position of the print head on the coordinate axis reaches the limit position to prevent the print head from exceeding the working range and causing damage. The encoder can accurately measure the moving distance and speed of the print head. Thus, the current motion state of the print head can be understood, such as whether it is moving normally and whether the moving speed conforms to the set value. Based on the temperature state and the motion state of the 3D printer, the current printing state can be determined. For example, when the temperature gradually approaches the set value and the print head remains stationary at the initial position for a period of time, it can be judged as the ready-to-print state. At this time, the printer is preheating to prepare for the upcoming printing task. Another example is that if the temperature remains stable and the print head continuously moves regularly and extrudes materials, it can be determined that the printer is in the printing state.

[0135] Next, the detectable defect types corresponding to the current printing state can be determined. Specifically, the mapping relationship between the preset printing state and the detection defect types can be stored in advance, and the detectable defect types corresponding to the current printing state can be determined based on this mapping relationship.

[0136] Finally, the nozzle can be defect-detected according to the detectable defect types and the m first images to obtain the target defect detection result. Specifically, relevant defect features can be extracted from the m first images according to the detectable defect types to obtain m defect feature data. For example, for defects such as surface roughness and warping, edge detection algorithms such as Canny edge detection and Sobel edge detection can be used to extract the edge information in the image. By analyzing features such as the shape, position, and continuity of the edges, it can be determined whether there are defects. For example, the edges of a normal nozzle should be continuous and smooth. If the edges are discontinuous or serrated, it may indicate the presence of surface defects. For another example, for some texture-related defects such as delamination and wire drawing, texture analysis algorithms such as gray-level co-occurrence matrix (GLCM) and local binary pattern (LBP) can be used to extract the texture features of the image. By comparing the texture features of different regions, it can be found whether there are regions with abnormal textures, and thus it can be determined whether there are defects. For still another example, for defects such as dimensional deviation and shape deformation, shape analysis algorithms such as contour extraction and shape descriptors (such as roundness and rectangularity) can be used to extract the shape features of the nozzle in the image. The extracted shape features are compared with the standard shape to determine whether there are shape defects. Then, based on the m defect feature data extracted, each image can be analyzed to determine whether there are printing defects of the detectable defect types, and the target defect detection result can be obtained.

[0137] In this way, by obtaining the current printing state of the 3D printer, the printing process can be understood in real time, such as information about the position of the print head, temperature changes, printing speed, etc. This is like the dashboard of a car, which enables users to always grasp the running state of the vehicle. Once an abnormality is found, measures can be taken in time to avoid printing failure or serious quality problems.

[0138] In addition, different printing states may correspond to different defect types. Identifying the detectable defect types in the current printing state can make the detection more targeted. For example, in the high-speed printing state, defects such as wire drawing and poor interlayer adhesion are more likely to occur, and these aspects can be focused on during detection to improve the detection efficiency and accuracy.

[0139] Optionally, in step S23, the defect-detecting the nozzle according to the detectable defect types and the m first images to obtain the target defect detection result may include the following steps:

[0140] S231. Preprocess the m first images to obtain m second images;

[0141] S232. Determine the target image algorithm corresponding to the detectable defect type;

[0142] S233. Analyze each of the m second images based on the target image algorithm to obtain m defect detection results;

[0143] S234. Fuse the m defect detection results to obtain the target defect detection result.

[0144] In the embodiments of the present application, the m first images can be preprocessed to obtain m second images. Specifically, the m first images can be adjusted to the same size first. A suitable target size can be selected and interpolation methods can be used for scaling to obtain m first images of the same size. Then, preprocessing operations such as image enhancement, noise removal, and image normalization can be performed on the m first images, thereby obtaining m second images. Specifically, for image enhancement: Image enhancement algorithms such as histogram equalization and contrast enhancement can be used to improve the visual effect of the image, making the details in the image clearer and facilitating defect detection.

[0145] For example, assume that the images captured by the camera module are darker due to insufficient light. Then, the gray scale range of the image can be stretched and the contrast can be enhanced through histogram equalization. For noise removal: Filtering algorithms such as Gaussian filtering and median filtering are adopted to remove the noise in the image. Noise may interfere with defect detection, so it needs to be removed. For example, median filtering can effectively remove salt-and-pepper noise in the image. For image normalization: The pixel values of the image are normalized to a certain range, such as [0, 1] or [0, 255], to ensure the comparability of pixel values between different images.

[0146] Next, the target image algorithm corresponding to the detectable defect type can be determined. Specifically, the mapping relationship between the preset defect types and image algorithms can be stored in advance, and the target image algorithm corresponding to the detectable defect type can be determined based on this mapping relationship.

[0147] Furthermore, the target image algorithm can be used to analyze each of the m second images to obtain m defect detection results. For example, the target image algorithm can be nozzle defect detection based on a deep learning classification algorithm. The specific detection process has been described in step S302 and will not be elaborated here.

[0148] Finally, the m defect detection results can be fused to obtain the target defect detection result. For example, for each possible defect category, count the number of times this category appears in the m detection results. The category with the most occurrences is used as the target defect detection result. Another example is that different weights can be assigned according to factors such as the accuracy and reliability of each detection method or model. For example, method A has a higher accuracy rate and is assigned a weight of 0.4, while methods B and C have slightly lower accuracy rates and are assigned weights of 0.3 and 0.3 respectively. Then, for each defect category, calculate the weighted number of votes, and the category with the highest number of votes is the target defect detection result.

[0149] In this way, by preprocessing the m first images, the visual effect of the images can be improved. For example, through operations such as brightness adjustment and contrast enhancement, the details in the images become clearer and the defect features become more obvious, thereby improving the accuracy of subsequent defect detection. For example, for some images that are darker due to insufficient lighting, after brightness adjustment, the originally blurred defect parts may become easier to identify.

[0150] In addition, different detectable defect types have different characteristics and manifestation forms. Determining the corresponding target image algorithm can perform more accurate detection for these specific defect types. For example, for defects such as rough surfaces, edge detection algorithms may be more effective; while for defects such as internal bubbles, segmentation algorithms based on deep learning may be required to identify. By selecting the appropriate algorithm, the accuracy and efficiency of detection can be improved.

[0151] Optionally, in an embodiment, step S233, analyzing each of the m second images based on the target image algorithm to obtain m defect detection results may specifically include the following steps:

[0152] B1. Obtain a target second image; the target second image is any one of the m second images;

[0153] B2. Extract defect images corresponding to the detectable defect type from a preset defect image library to obtain j defect images; j is a positive integer;

[0154] B3. Determine the similarity between the target second image and each of the j defect images to obtain j similarities;

[0155] B4. Determine the average similarity and the target variance corresponding to the j similarities;

[0156] B5. Determine the target adjustment parameter corresponding to the target variance;

[0157] B6. Adjust the average similarity according to the target adjustment parameter to obtain the target similarity;

[0158] B7. Determine the target defect probability corresponding to the target similarity;

[0159] B8. When the target defect probability is greater than the preset defect probability, determine the defect detection result corresponding to the target second image as: there is a printing defect of the detectable defect type in the nozzle during the printing process;

[0160] B9. When the target defect probability is not greater than the preset defect probability, determine the defect detection result corresponding to the target second image as: there is no printing defect of the detectable defect type in the nozzle during the printing process.

[0161] In the embodiments of the present application, both the preset defect image library and the preset defect probability can be preset or defaulted in advance.

[0162] In a specific embodiment, the target second image can be obtained first; then, the defect images corresponding to the detectable defect type can be extracted from the preset defect image library to obtain j defect images. Specifically, each defect image stored in the preset defect image library corresponds to a labeling information, and the labeling information includes the corresponding defect type. The j defect images corresponding to the detectable defect type can be screened according to the defect type field in the labeling information. For example, for the image library stored in the database, an SQL query statement can be written to select the image records in the database table whose defect type fields match the detectable defect type, obtain the corresponding image file path or number, and then extract the images to obtain j defect images.

[0163] Then, the similarity between the target second image and each of the j defect images can be determined to obtain j similarities. Specifically, a preset similarity algorithm can be used to calculate the similarity between the target second image and each of the j defect images to obtain j similarities. For example, the preset similarity algorithm can be the sum of squared differences matching method. The sum of squared differences matching method measures the similarity by calculating the sum of the squared differences of the pixel values of the target second image (template) and each possible position in the defect image. The smaller the sum of squared differences, the more similar the two images are. The specific implementation can include the following steps:

[0164] First, convert the target second image and the j defect images into the same data type (such as uint8), and the size is suitable for matching operations;

[0165] Second, use the target second image as a template and slide it on each defect image to calculate the sum of the squared differences of the pixel values in the corresponding area between the template and the defect image;

[0166] Finally, the similarity is determined according to the sum of squared differences. Specifically, the smaller the sum of squared differences, the higher the similarity. The reciprocal of the sum of squared differences can be taken or normalization processing can be performed to facilitate comparison.

[0167] Next, the average similarity and the target variance corresponding to the j similarities can be determined. Specifically, the j similarities can be added up first, and then divided by the number of similarities to obtain the average similarity. Then, the j similarities and the average similarity can be substituted into the variance calculation formula to calculate the target variance.

[0168] Next, the target adjustment parameter corresponding to the target variance can be determined. Specifically, the mapping relationship between the preset variance and the adjustment parameter can be stored in advance, and the target adjustment parameter corresponding to the target variance can be determined based on this mapping relationship. The value range of the target adjustment parameter can be -0.25 to 0.25. Further, the average similarity can be adjusted according to the target adjustment parameter. The specific calculation formula is as follows:

[0169] Target similarity = average similarity * (1 + target adjustment parameter);

[0170] According to the above formula, the target similarity can be obtained. Then, the target defect probability corresponding to the target similarity can be determined. Specifically, the defect probability between the preset similarity and the adjustment parameter can be stored in advance, and the target defect probability corresponding to the target similarity can be determined based on this mapping relationship. The greater the similarity, the greater the defect probability.

[0171] When the target defect probability is greater than the preset defect probability, it is determined that the defect detection result corresponding to the target second image is: there are printing defects of detectable defect types in the nozzle during the printing process;

[0172] When the target defect probability is not greater than the preset defect probability, it is determined that the defect detection result corresponding to the target second image is: there are no printing defects of detectable defect types in the nozzle during the printing process.

[0173] In this way, by comparing the similarity between the target second image and the j defect images, rather than just comparing with a single image, multiple possible defect images are comprehensively considered, which can more comprehensively cover various possible defect situations, avoid misjudgment caused by the limitation of single-image comparison, and make the detection result more accurate.

[0174] In addition, by calculating the target variance and determining the target adjustment parameter accordingly, the distribution of similarity data is considered. If the variance is large, it indicates that the similarity data fluctuates greatly and there may be some uncertain factors. Through the target adjustment parameter, the average similarity can be appropriately adjusted, so that the final target similarity can more reliably reflect the real situation, enhancing the stability and reliability of the detection result.

[0175] S303. Determine target prompt information according to the target defect detection result; the target prompt information is used to prompt the user to handle the printing defect of the nozzle.

[0176] In the embodiments of the present application, the target defect detection result can be analyzed in detail to clarify the specific type of the defect, such as head wrapping, air printing, fried noodles, dimensional deviation, surface roughness, etc. At the same time, the severity of the defect can be determined, which can be evaluated by quantitative indicators (such as defect area, deviation value, etc.) or according to a preset grading standard (such as mild, moderate, severe).

[0177] For example, if the detected defect is surface roughness, the degree of roughness can be further analyzed, whether it is slight surface unevenness or severe unevenness. Then, according to the specific type and severity of the defect, the target prompt information is generated. For example, for a mild head wrapping defect, the target prompt information can be "A slight head wrapping phenomenon is detected in the nozzle. It is recommended to appropriately reduce the nozzle temperature or check the fluidity of the material." For a severe air printing defect, the target prompt information can be "There is a serious air printing problem, which may be caused by nozzle blockage or material supply interruption. Please stop printing immediately and check the nozzle and material supply system."

[0178] Optionally, in step S303, the determining the target prompt information according to the target defect detection result may include the following steps:

[0179] S31. Determine whether there is a printing defect in the nozzle according to the target defect detection result;

[0180] S32. If so, determine the target defect level of the printing defect of the nozzle;

[0181] S33. Determine the target prompt information corresponding to the target defect level;

[0182] S34. If not, determine that the target prompt information is empty, and continue printing and defect detection until printing is completed.

[0183] In the embodiments of the present application, the target defect level may include one of the following: mild defect level, moderate defect level, severe defect level, etc., which are not limited herein.

[0184] In a specific embodiment, it can be determined whether there is a printing defect in the nozzle according to the target defect detection result. Specifically, the target defect detection result may include the printing defect type and the occurrence time. If the printing defect type in the target defect detection result is not empty, it can be determined that there is a printing defect in the nozzle. If the printing defect type in the target defect detection result is empty, it can be determined that there is no printing defect in the nozzle.

[0185] If so, the target defect level of the printing defect of the nozzle can be determined. Specifically, multiple factors such as the severity of the printing defect of the nozzle, the impact on printing quality and subsequent use can be considered to determine a defect level, that is, the target defect level. The specific defect level classification is as follows:

[0186] Minor defect level: There are only slight defects on the appearance of the printed part, which are difficult to detect without careful observation; the dimensional deviation is within a small range and does not affect assembly and function; the defect occurrence frequency is low, and it occasionally appears on a few printed parts and only exists in a small local area. It has basically no impact on the subsequent use of the printed part, does not reduce the service life, and does not affect the realization of its normal function.

[0187] Moderate defect level: There are obvious defects on the appearance of the printed part, but it does not affect the overall recognition and basic function; the dimensional deviation exceeds a certain range, but it can still be used through appropriate adjustment or processing; the defect occurrence frequency is moderate, it appears on some printed parts, and the affected range is relatively large. It has a certain impact on the subsequent use of the printed part, may reduce the service life to a certain extent or affect the function under specific conditions.

[0188] Severe defect level: The appearance of the printed part is severely damaged, with a large number of obvious defects, deformations, or material shortages, etc.; the dimensional deviation is severe and cannot meet the use requirements through adjustment or processing; the defect occurrence frequency is high, and it appears almost every time during printing and affects the entire printed part. It has a serious impact on the subsequent use of the printed part, resulting in inability to be used normally, or severely shortening the service life, making the printed part lose its original function.

[0189] Next, the target prompt information corresponding to the target defect level can be determined. Specifically, the mapping relationship between the preset defect level and the prompt information can be pre-stored, and the target prompt information corresponding to the target defect level can be determined based on this mapping relationship.

[0190] If not, the target prompt information can be set to be empty, and the 3D printer can be controlled to continue printing, and defect detection can be continuously performed during the printing process until the printing is completed.

[0191] For ease of understanding, please refer to Figure 6 , Figure 6 which is the flowchart of a printing defect detection method provided by an embodiment of the present application, specifically as follows:

[0192] Start printing: The starting point of the entire printing process, marking the start of the printing task.

[0193] Self - test of the camera module status: Perform a status check on the camera module used for defect detection to see if it can work properly. Conduct a self - test on the camera module before printing to ensure that the key device for defect detection is in normal working condition, which can avoid inaccurate or impossible defect detection caused by camera module failures and lay a foundation for subsequent reliable defect detection.

[0194] Normal status judgment: Judge the result of the self - test of the camera module.

[0195] If the status is normal (Y), then proceed to the next step;

[0196] If the status is abnormal (N), then execute the step of "exit defect detection" and continue printing until printing is completed.

[0197] Enable defect detection: When the camera module is in normal status, start the defect detection function during the printing process to prepare for monitoring the printing process.

[0198] Defect detection judgment: Collect images through the camera module and use algorithms to detect whether defects occur during the printing process. By performing real - time defect detection during printing, printing defects can be discovered in a timely manner. Different handling methods are adopted for defects of different severities. For minor and moderate defects, the printing is not interrupted, only the user is reminded to ensure printing efficiency; for severe defects, the printing is paused to give the user an opportunity to handle the problem and avoid producing more unqualified products.

[0199] If no defect is detected (N), then continue to execute "continue printing and detection";

[0200] If a defect is detected (Y), then it is necessary to further judge the severity of the defect.

[0201] Handling of minor and moderate defects: If minor and moderate defects are detected, the system alarms through the screen, PC software, and mobile app to remind the user of the existence of defects, but the printing process continues.

[0202] Handling of severe defects: When severe defects are detected, the printing is paused and the error message is displayed on the printer screen so that the user can understand the problem in a timely manner. For severe defects, let the user judge whether to accept, and hand over the decision - making power to the user to meet different users' different quality requirements for printed products and improve the user experience and printing flexibility.

[0203] Defect acceptability judgment: For the detected defects, judge whether the user can accept the defects.

[0204] If acceptable (Y), then execute the step of "continue printing and detection";

[0205] If unacceptable (N), then execute the step of "user stops printing".

[0206] Continue printing and detection: In the case where no defect is detected or the user accepts the defect, continue the printing operation and maintain the defect detection status.

[0207] Printing completed: When the entire printing task ends, the process is completed here. Whether or not a defect is detected, the entire process can guide the printing task to completion, or the user can stop the printing when necessary, making the printing process start and end properly and be standardized and orderly.

[0208] In this way, the entire process records and processes the printing process and the defect detection results in an orderly manner. Once a problem occurs, it is convenient to trace each link in the printing process, analyze the cause of the defect, provide data support for subsequent optimization of the printing process and improvement of the equipment performance. Moreover, when a severe defect is detected, pausing the printing can prevent the printer from continuously working in an abnormal state, reduce the damage to the equipment caused by excessive wear or incorrect printing, extend the service life of the equipment, and reduce the equipment maintenance cost and the material cost caused by printing waste.

[0209] In summary, by implementing the embodiments of the present application, the following beneficial effects are achieved:

[0210] It can be seen that in the embodiments of the present application, first, a preset printed part is printed through the nozzle of a 3D printer. During the printing process, the nozzle is photographed by a camera module to obtain m first images; based on the m first images, defect detection is performed on the nozzle to obtain a target defect detection result; a target prompt message is determined according to the target defect detection result; the target prompt message is used to prompt the user to process the printing defect of the nozzle. Thus, the m first images obtained by photographing the nozzle by the camera module during the printing process can comprehensively record the working state of the nozzle when printing the preset printed part. Then, features related to the nozzle defect are extracted from these m first images for defect detection to obtain a target defect detection result. Finally, a target prompt message is determined according to the target defect detection result, realizing the function of detecting printing defects and sending out prompts.

[0211] Please refer to Figure 7 , Figure 7 which is a functional unit composition block diagram of a printing defect detection device 700 provided by the embodiments of the present application. The printing defect detection device 700 includes: a printing unit 701, a defect detection unit 702, and a prompt unit 703, where:

[0212] The printing unit 701 is configured to print a preset printed part through the nozzle of a 3D printer, and photograph the nozzle by a camera module during the printing process to obtain m first images; m is a positive integer;

[0213] The defect detection unit 702 is configured to perform defect detection on the nozzle based on the m first images to obtain a target defect detection result;

[0214] The prompt unit 703 is configured to determine target prompt information according to the target defect detection result; the target prompt information is used to prompt the user to handle the printing defect of the nozzle.

[0215] Optionally, the distance between the imaging module and the nozzle is within a preset range, and / or the nozzle and the imaging module are installed on a tool head, and the tool head can move in at least two intersecting directions for 3D printing.

[0216] Optionally, in terms of obtaining the m first images by photographing the nozzle through the imaging module, the printing unit 701 is specifically configured to:

[0217] Perform self-test through the imaging module to determine whether the imaging module is in a normal state;

[0218] If so, obtain a preset frequency; photograph the nozzle through the imaging module at the preset frequency to obtain the m first images.

[0219] Optionally, in terms of performing defect detection on the nozzle based on the m first images to obtain a target defect detection result, the defect detection unit 702 is specifically configured to:

[0220] Obtain the current printing state of the 3D printer at the current moment;

[0221] Determine the detectable defect types corresponding to the current printing state;

[0222] Perform defect detection on the nozzle according to the detectable defect types and the m first images to obtain the target defect detection result.

[0223] Optionally, in terms of performing defect detection on the nozzle according to the detectable defect types and the m first images to obtain the target defect detection result, the defect detection unit 702 is specifically configured to:

[0224] Preprocess the m first images to obtain m second images;

[0225] Determine the target image algorithm corresponding to the detectable defect types;

[0226] Analyze each of the m second images based on the target image algorithm to obtain m defect detection results;

[0227] Fuse the m defect detection results to obtain the target defect detection result.

[0228] Optionally, in determining the target prompt information according to the target defect detection result, the prompt unit 703 is specifically configured to:

[0229] Determine whether there is a printing defect in the nozzle according to the target defect detection result;

[0230] If so, determine the target defect level of the printing defect of the nozzle;

[0231] Determine the target prompt information corresponding to the target defect level;

[0232] If not, determine that the target prompt information is empty, and continue printing and defect detection until printing is completed.

[0233] Optionally, a supplementary light module is provided at a preset position of the 3D printer; the supplementary light module is used to provide sufficient and uniform light for the imaging module when the light is insufficient.

[0234] In specific implementation, the printing defect detection device 700 described in the embodiments of the present invention may also execute other implementation manners described in the above-mentioned printing defect detection method based on image processing provided by the embodiments of the present invention, which will not be elaborated here.

[0235] Please refer to Figure 8 , Figure 8 is a schematic structural diagram of a printer provided by an embodiment of the present application. The printer includes a processor, a memory, a communication interface, and one or more programs. The processor, the memory, and the communication interface are interconnected through a bus. The above one or more programs are stored in the above memory and are configured to be executed by the above processor. In the embodiments of the present application, the above programs include instructions for performing the following steps:

[0236] Print a preset printed part through the nozzle of the 3D printer, and photograph the nozzle through the imaging module during the printing process to obtain m first images; m is a positive integer;

[0237] Perform defect detection on the nozzle based on the m first images to obtain a target defect detection result;

[0238] Determine target prompt information according to the target defect detection result; the target prompt information is used to prompt the user to process the printing defect of the nozzle.

[0239] Optionally, the distance between the imaging module and the nozzle is within a preset range, and / or, the nozzle and the imaging module are installed on a tool head, and the tool head can move in at least two intersecting directions for 3D printing.

[0240] Optionally, in the aspect of obtaining m first images by photographing the nozzle through the imaging module, the above program further includes instructions for performing the following steps:

[0241] Perform self-test through the imaging module to determine whether the imaging module is in a normal state;

[0242] If so, obtain a preset frequency; photograph the nozzle through the imaging module at the preset frequency to obtain the m first images.

[0243] Optionally, in the aspect of performing defect detection on the nozzle based on the m first images to obtain a target defect detection result, the above program further includes instructions for performing the following steps:

[0244] Obtain the current printing state of the 3D printer at the current moment;

[0245] Determine the detectable defect type corresponding to the current printing state;

[0246] Perform defect detection on the nozzle according to the detectable defect type and the m first images to obtain the target defect detection result.

[0247] Optionally, in the aspect of performing defect detection on the nozzle according to the detectable defect type and the m first images to obtain the target defect detection result, the above program further includes instructions for performing the following steps:

[0248] Preprocess the m first images to obtain m second images;

[0249] Determine the target image algorithm corresponding to the detectable defect type;

[0250] Analyze each of the m second images based on the target image algorithm to obtain m defect detection results;

[0251] Fuse the m defect detection results to obtain the target defect detection result.

[0252] Optionally, in the aspect of determining target prompt information according to the target defect detection result, the above program further includes instructions for performing the following steps:

[0253] Determine whether there is a printing defect in the nozzle according to the target defect detection result;

[0254] If so, determine the target defect level of the printing defect of the nozzle;

[0255] Determine the target prompt information corresponding to the target defect level;

[0256] If not, determine that the target prompt information is empty, and continue printing and defect detection until printing is completed.

[0257] Optionally, a supplementary light module is provided at a preset position of the 3D printer; the supplementary light module is used to provide sufficient and uniform light for the imaging module when the light is insufficient.

[0258] In specific implementation, the printer described in the embodiments of the present invention may also execute other implementation manners described in the printing defect detection method provided in the embodiments of the present invention above, which will not be elaborated here.

[0259] The embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute some or all of the steps of any method described in the method embodiments above. The computer includes a printer.

[0260] The embodiments of the present application also provide a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to enable a computer to execute some or all of the steps of any method described in the method embodiments above. The computer program product may be a software installation package, and the computer includes a printer.

[0261] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, some steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0262] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, some steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0263] In the above embodiments, the descriptions of the various embodiments have their respective emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0264] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.

[0265] Those of ordinary skill in the art can understand all or part of the processes in the methods of the above embodiments. These processes can be completed by relevant hardware instructed by a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disks, or optical discs and other media that can store program codes.

[0266] The steps of the methods or algorithms described in the embodiments of the present application can be implemented in a hardware manner or by a processor executing software instructions. The software instructions can be composed of corresponding software modules. The software modules can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable hard disks, compact disc read-only memory (CD-ROM), or any other form of storage medium well known in the art.

[0267] An exemplary storage medium is coupled to the processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also exist as discrete components in the terminal device or the management device.

[0268] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.

[0269] The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media.

[0270] Among them, the available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0271] Each device and product described in the above embodiments includes various modules / units, which can be software modules / units, hardware modules / units, or partly software modules / units and partly hardware modules / units. For example, for each device and product applied to or integrated into a chip, each of the modules / units it includes can be implemented in the form of hardware such as circuits. Alternatively, at least some of the modules / units can be implemented in the form of a software program that runs on a processor integrated within the chip, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits. For each device and product applied to or integrated into a chip module, each of the modules / units it includes can be implemented in the form of hardware such as circuits. Different modules / units can be located in the same component (such as a chip, a circuit module, etc.) or different components of the chip module. Alternatively, at least some of the modules / units can be implemented in the form of a software program that runs on a processor integrated within the chip module, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits. For each device and product applied to or integrated into a terminal device, each of the modules / units it includes can be implemented in the form of hardware such as circuits. Different modules / units can be located in the same component (such as a chip, a circuit module, etc.) or different components within the terminal device. Alternatively, at least some of the modules / units can be implemented in the form of a software program that runs on a processor integrated within the terminal device, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits.

[0272] The specific embodiments described above further elaborate on the objectives, technical solutions, and beneficial effects of the embodiments of the present application. It should be understood that the above description is only the specific embodiments of the embodiments of the present application and is not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included within the protection scope of the embodiments of the present application.

Claims

1. A method for detecting printing defects, characterized in that, The method includes: Printing a preset printed part through the nozzle of a 3D printer, and during the printing process, photographing the nozzle through a camera module to obtain m first images; m is a positive integer; Performing defect detection on the nozzle based on the m first images to obtain a target defect detection result; Determining target prompt information according to the target defect detection result; the target prompt information is used to prompt the user to handle the printing defect of the nozzle.

2. The method according to claim 1, wherein The distance between the camera module and the nozzle is within a preset range, and / or, The nozzle and the camera module are installed on a tool head, and the tool head can move in at least two intersecting directions for 3D printing.

3. The method according to claim 1, wherein The photographing the nozzle through the camera module to obtain m first images includes: Performing self-test through the camera module to determine whether the camera module is in a normal state; If so, obtaining a preset frequency; photographing the nozzle through the camera module at the preset frequency to obtain the m first images.

4. The method according to any one of claims 1 to 3, characterized in that The performing defect detection on the nozzle based on the m first images to obtain a target defect detection result includes: Obtaining the current printing state of the 3D printer at the current moment; Determining the detectable defect type corresponding to the current printing state; Performing defect detection on the nozzle according to the detectable defect type and the m first images to obtain the target defect detection result.

5. The method according to claim 4, wherein The performing defect detection on the nozzle according to the detectable defect type and the m first images to obtain the target defect detection result includes: Performing preprocessing on the m first images to obtain m second images; Determining a target image algorithm corresponding to the detectable defect type; Analyzing each of the m second images based on the target image algorithm to obtain m defect detection results; Fusing the m defect detection results to obtain the target defect detection result.

6. The method according to any one of claims 1 to 3, characterized in that The determining target prompt information according to the target defect detection result includes: Determining whether there is a printing defect in the nozzle according to the target defect detection result; If so, determining the target defect level of the printing defect of the nozzle; Determining the target prompt information corresponding to the target defect level; If not, determining that the target prompt information is empty, and continuing printing and defect detection until printing is completed.

7. The method according to any one of claims 1 to 3, characterized in that A supplementary light module is provided at a preset position of the 3D printer; the supplementary light module is used to provide sufficient and uniform light for the camera module when the light is insufficient.

8. A printing defect detection device, characterized in that, The device includes: a printing unit, a defect detection unit, and a prompt unit, where: The printing unit is used to print a preset printed part through the nozzle of a 3D printer, and during the printing process, photograph the nozzle through a camera module to obtain m first images; m is a positive integer; The defect detection unit is used to perform defect detection on the nozzle based on the m first images to obtain a target defect detection result; The prompt unit is used to determine target prompt information according to the target defect detection result; the target prompt information is used to prompt the user to handle the printing defect of the nozzle.

9. A printer, characterized in that, Includes: A processor, a memory for storing one or more programs and configured to be executed by the processor, the programs including instructions for performing the steps in the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program for electronic data interchange, wherein the computer program causes a computer to execute the method according to any one of claims 1-7.

Citation Information

Cited By

  • Fault monitoring equipment and method, 3D printing system and fault monitoring method of 3D printing system

    CN120985927A

  • Fault monitoring device, method and 3D printing system and fault monitoring method thereof

    CN120985927B