Nozzle model identification method of 3D printer and related equipment thereof

By setting a nozzle model component on the nozzle and using the 3D printer's imaging module to automatically identify the nozzle coding information, the problem of low efficiency in manual nozzle model identification is solved, achieving efficient and accurate nozzle model identification.

CN121893540APending Publication Date: 2026-04-21SHENZHEN CREALITY 3D TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN CREALITY 3D TECH CO LTD
Filing Date
2025-12-10
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing 3D printers, nozzle model identification relies on manual identification, which is inefficient and prone to errors, and cannot meet the requirements for automation and accuracy.

Method used

A nozzle model component is set on the nozzle, and nozzle coding information is engraved on the nozzle model component. The nozzle image is captured by the imaging module of the 3D printer, and the nozzle model is automatically identified by matching the preset coding template and the pre-trained character recognition model.

Benefits of technology

It enables automatic and accurate identification of nozzle types without increasing hardware costs, improving the printer's automation and identification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121893540A_ABST
    Figure CN121893540A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of 3D printing, in particular to a nozzle model identification method of a 3D printer and related equipment thereof. The 3D printer comprises a detachable nozzle assembly, the 3D printer is further provided with a shooting module used for nozzle calibration, the nozzle assembly comprises a nozzle and a nozzle model assembly, and nozzle code information of the nozzle is set on the nozzle model assembly. The preset position is within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly is located in a shooting view area; obtaining a nozzle image shot by a shooting module, wherein the nozzle image comprises nozzle coding information; matching the preset coding template image with the nozzle image, and determining a nozzle coding information image; and identifying the nozzle coding information image based on a pre-trained character identification model, and determining a nozzle model based on an identification result. According to the invention, the nozzle model can be automatically and accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of three-dimensional (3D) printing technology, specifically to a nozzle model identification method for a 3D printer and related equipment. Background Technology

[0002] A 3D printer is a rapid prototyping device. Fused deposition modeling (FDM) is a widely used printing technology in 3D printing, utilizing powdered materials such as metal or plastic to construct three-dimensional objects layer by layer. Specifically, an FDM 3D printer uses a feeding mechanism to supply molten filament material to the hot end of the printer. The molten filament is heated to a molten state within the hot end, then flows out of the nozzle orifice and solidifies at the designated location. To meet different printing speed and accuracy requirements, nozzle designs vary. During the processing stage, nozzle models are typically identified manually to facilitate subsequent printing parameter settings; however, manual identification is inefficient and prone to errors. Summary of the Invention

[0003] In view of the above, embodiments of this application provide a method and related equipment for identifying nozzle models of a 3D printer, which can automatically and accurately identify nozzle models.

[0004] In a first aspect, embodiments of this application provide a nozzle model identification method for a 3D printer. The 3D printer includes a detachable nozzle assembly and is further equipped with an imaging module for nozzle calibration. The nozzle assembly includes a nozzle and a nozzle model component, the nozzle model component being provided with nozzle coding information. The nozzle model identification method includes: controlling the nozzle assembly to move to a preset position, the preset position being within the focal length range of the imaging module, and the nozzle coding information on the nozzle model component being located in the field of view; acquiring a nozzle image captured by the imaging module, the nozzle image including the nozzle coding information; matching a preset coding template image with the nozzle image to determine a nozzle coding information image; recognizing the nozzle coding information image based on a pre-trained character recognition model, and determining the nozzle model based on the recognition result.

[0005] The above technical solution involves setting a nozzle model component on the nozzle, engraving / printing nozzle code information representing the nozzle model on the nozzle model component, and reusing the imaging module used for nozzle calibration to acquire nozzle images. The nozzle code information can be acquired simultaneously. By matching a preset code template image with the nozzle image, the nozzle code information image can be quickly located and segmented in the nozzle image. Then, a pre-trained recognition model is used to recognize the nozzle code information image to determine the nozzle model. This achieves automatic identification of the nozzle model without increasing the hardware cost of the 3D printer, and the recognition accuracy is high.

[0006] In some embodiments, the nozzle model component is a rectangular block made of plastic or metal attached to the nozzle, and the rectangular surface with nozzle coding information can face the shooting module after being moved to the preset position. The nozzle coding information consists of multiple character feature codes, including a positioning identifier code, a nozzle diameter code, a nozzle material code, a nozzle orifice type code, and a nozzle length code arranged in sequence.

[0007] In some embodiments, the nozzle coding information includes a first code and a second code. The first code is used for identifying and locating the coding information, and the second code is used to characterize the nozzle model. The step of matching a preset coding template image with the nozzle image to determine the nozzle coding information image includes: matching the preset coding template image with the nozzle image to determine a first position region of the first code in the nozzle image, wherein the preset coding template image includes a template image of the first code; determining a second position region of the nozzle coding information in the nozzle image based on the first position region and a preset positional relationship between the first code and the second code; and determining the nozzle coding information image based on the second position region.

[0008] In some embodiments, matching the preset encoding template image with the nozzle image to determine the first location region of the first encoding in the nozzle image includes: preprocessing the nozzle image, the preprocessing including region of interest cropping, grayscale conversion, and noise reduction; and matching the preprocessed nozzle image with the preset encoding template image to determine the first location region of the first encoding in the nozzle image.

[0009] In some embodiments, matching the preset encoding template image with the nozzle image to determine a first position region of the first encoding in the nozzle image includes: matching the preset encoding template image with the nozzle image to determine first coordinate position information of the first position region in the nozzle image, wherein the first coordinate position information includes the coordinate information of each vertex of the first position region in the nozzle image, or the first coordinate position information includes the coordinate information of any vertex of the first position region in the nozzle image, the length of the first position region, and the width of the first position region; determining a second position region of the nozzle encoding information in the nozzle image based on the first position region and a preset positional relationship between the first encoding and the second encoding includes: determining second coordinate position information of the second position region in the nozzle image based on the first coordinate position information and the preset positional relationship, wherein the second coordinate position information includes the coordinate information of each vertex of the second position region in the nozzle image, or the second coordinate position information includes the coordinate information of any vertex of the second position region in the nozzle image, the length of the second position region, and the width of the second position region.

[0010] In some embodiments, recognizing the nozzle-encoded information image based on a pre-trained character recognition model includes: segmenting the characters in the nozzle-encoded information image to determine multiple single-character images; and recognizing each single-character image among the multiple single-character images based on the pre-trained character recognition model.

[0011] In some embodiments, segmenting the characters in the nozzle coding information image to determine multiple single-character images includes: performing projection processing on the nozzle coding information image to determine a projected image; traversing the grayscale value of each pixel in the projected image and recording the number of pixels in each column whose grayscale value is less than a preset threshold; determining multiple character dividing lines based on the number of pixels in each column whose grayscale value is less than the preset threshold; and segmenting the nozzle coding information image based on the multiple character dividing lines to determine the multiple single-character images.

[0012] In some embodiments, the pre-trained character recognition model is a character recognition model trained based on a support vector machine. After determining the nozzle model, the method further includes: setting printing parameters according to the nozzle model, wherein the printing parameters include model slicing parameters.

[0013] In some embodiments, the 3D printer further includes a supplementary lighting module for providing supplementary lighting for the imaging module. The imaging module is fixedly installed on the side wall of the 3D printer, and the imaging lens of the imaging module is set upwards. The preset position is a position above the imaging lens.

[0014] Secondly, embodiments of this application also provide a nozzle model identification device for a 3D printer. The 3D printer includes a detachable nozzle assembly and is further equipped with an imaging module for nozzle calibration. The nozzle assembly includes a nozzle and a nozzle model component, the nozzle model component being provided with nozzle coding information of the nozzle. The device includes: a movement control unit for controlling the nozzle assembly to move to a preset position, the preset position being within the focal length range of the imaging module, and the nozzle coding information on the nozzle model component being located in the field of view; an acquisition unit for acquiring a nozzle image captured by the imaging module, the nozzle image including the nozzle coding information; a matching unit for matching a preset coding template image with the nozzle image to determine a nozzle coding information image; and a recognition unit for recognizing the nozzle coding information image based on a pre-trained character recognition model and determining the nozzle model based on the recognition result.

[0015] Thirdly, embodiments of this application also provide an electronic device, the electronic device including a processor and a memory, the memory being used to store instructions, and the processor being used to call the instructions in the memory, causing the electronic device to execute the nozzle model identification method for a 3D printer as described in the first aspect.

[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the nozzle model identification method for a 3D printer as described in the first aspect.

[0017] One of the above technical solutions has the following advantages or beneficial effects: by setting nozzle coding information that represents the nozzle model on the nozzle, the nozzle coding information can be collected at the same time when the nozzle image is acquired. By matching the preset coding template image with the nozzle image, it is easy to quickly locate and segment the nozzle coding information image in the nozzle image. Then, a pre-trained recognition model is used to recognize the nozzle coding information image to determine the nozzle model, thereby achieving automatic identification of the nozzle model with high recognition accuracy. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the structure of a 3D printer provided in an embodiment of this application.

[0019] Figure 2This is a flowchart illustrating one step of a nozzle model identification method for a 3D printer provided in an embodiment of this application.

[0020] Figure 3 A flowchart illustrating one step of a nozzle model identification method for a 3D printer, as provided in another embodiment of this application.

[0021] Figure 4 This is a schematic diagram illustrating the determination of a first position region and a second position region in a nozzle image, provided as an embodiment of this application.

[0022] Figure 5 This is a schematic diagram illustrating the segmentation of a nozzle coding information image according to an embodiment of this application.

[0023] Figure 6 A flowchart illustrating one step of a nozzle model identification method for a 3D printer, as provided in another embodiment of this application.

[0024] Figure 7 This is a schematic diagram of the functional modules of a nozzle model identification device for a 3D printer provided in an embodiment of this application.

[0025] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0027] Numerous specific details are set forth in the following description to provide a full understanding of this application. The described embodiments are only a part of, and not all, of the embodiments of this application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0028] It should be further noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0029] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence. In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0030] Fused deposition modeling (FDM) is a widely used printing technology in 3D printers. It utilizes powdered materials such as metal or plastic to construct three-dimensional objects layer by layer. In practice, an FDM 3D printer supplies molten filament material to the hot end of the printer via a feeding mechanism. The molten filament is heated to a molten state within the hot end, then flows out of the nozzle orifice and solidifies at the designated location. To meet different printing speed and accuracy requirements, nozzle designs vary widely. For example, nozzles can be classified according to their orifice shape, such as short, thick nozzles and long, pointed nozzles. Short, thick nozzles flatten the filament during printing, resulting in a smoother outer wall; long, pointed nozzles can more precisely reproduce the details of the printed part, especially noticeable at the top of curved surfaces. Furthermore, nozzle diameters can range from 0.1 to 2.0 mm; larger diameter nozzles are chosen for higher printing speeds, while smaller diameter nozzles are chosen for higher accuracy. Finally, the material and processing technology of the nozzle significantly affect its performance and lifespan. Brass nozzles are widely used, cost-effective, and suitable for printing with common consumables such as PLA, ABS, TPU, PA, PP, PC, ASA, Nylon, PETG, PVA, and HIPS. Copper alloy nozzles are high-temperature resistant and suitable not only for common consumables but also for high-temperature consumables such as PEEK, PEKK, PEI, PSU, and PPSU. Stainless steel nozzles are suitable for 3D printing in food and biomedical fields. Hardened steel nozzles are wear-resistant and high-temperature resistant, suitable not only for common consumables but also for printing with composite consumables containing abrasive additives such as carbon fiber, steel, wood, boron carbide, tungsten, and phosphorescent pigments. Gemstone nozzles are compatible with all consumables and possess wear resistance and high-temperature resistance.

[0031] During the processing stage, the relevant technology generally involves manually identifying the nozzle model to facilitate the setting of subsequent printing parameters. However, manual identification is inefficient and prone to errors.

[0032] Based on this, embodiments of this application provide a nozzle model identification method and related equipment for a 3D printer, which can automatically and accurately identify the nozzle model, so that the 3D printer can use the printing parameters corresponding to the nozzle model for subsequent printing, thereby improving printing speed and quality.

[0033] The nozzle model identification method for 3D printers disclosed in this application can be applied to 3D printers or to devices that communicate with 3D printers, whereby the device transmits the identified nozzle information to the 3D printer. The following explanation uses the application of the nozzle model identification method to a 3D printer as an example.

[0034] like Figure 1 As shown, the 3D printer 100 may include a printhead module 101, a processing platform 102, an imaging module 103, a supplementary lighting module 104, and a control module 105. The printhead module 101 may include a printhead body and a nozzle assembly. The nozzle assembly is detachably connected to the printhead body; that is, the nozzle assembly can be installed on the printhead body or removed from it. The nozzle assembly may include a nozzle and a nozzle model component. The nozzle model component has nozzle coding information engraved or printed on it to identify the nozzle model. The processing platform 102 can be used to hold the object to be processed. The imaging module 103 can be used to capture images of the nozzle assembly or the nozzle model component to obtain a nozzle image. The nozzle model can be determined by identifying the nozzle coding information in the nozzle image. For example, the imaging module 103 includes a camera. The supplementary lighting module 104 can be used to provide supplementary lighting for the captured image, ensuring the brightness and clarity of the captured nozzle image, facilitating accurate identification of the nozzle coding information later. For example, the supplementary lighting module 104 includes a ring light. The control module 105 can serve as the control center of the 3D printer 100 and can be used to control related functional modules. The control module 105 can also be used to execute the nozzle model identification method of the 3D printer of this application.

[0035] In some embodiments, for the 3D printer 100, nozzle calibration is achieved by setting up an imaging module 103 to avoid deviations in the relative position / state of the detachable nozzle assembly and the printed object / printing platform. This application achieves nozzle model identification by reusing the existing imaging module 103, without incurring additional hardware costs.

[0036] For example, the control module 105 may include a chip with data processing / control functions, which may be at least one of a processor, a microprogrammed control unit (MCU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), etc.

[0037] The following describes in detail the steps of the nozzle model identification method for 3D printers provided in the embodiments of this application.

[0038] Please refer to the following: Figure 2 As shown, Figure 2 This is a flowchart illustrating the steps of an embodiment of the nozzle model identification method for 3D printers provided in this application. The nozzle model identification method for 3D printers can be applied to 3D printers, for example, in applications... Figure 1 The control module shown. Depending on different needs, Figure 2 The order of steps in the flowchart shown can be changed, and some steps can be omitted or combined.

[0039] The nozzle model identification method for this 3D printer may include the following steps: Step S101: Control the nozzle assembly to move to a preset position. The preset position is within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly is located in the shooting field of view.

[0040] In some embodiments, the nozzle assembly can move along with the printhead module. The movement of the printhead module can be controlled to move the nozzle assembly to a preset position. The preset position can be within the focal length range of the imaging module, and the nozzle coding information on the nozzle model assembly is located in the field of view, thereby enabling the imaging module to capture a nozzle image containing clear and complete nozzle coding information.

[0041] Step S102: Obtain the nozzle image captured by the imaging module. The nozzle image includes nozzle coding information.

[0042] In some embodiments, the nozzle image can be captured by the imaging module, and the control module can communicate with the imaging module to acquire the nozzle image. For example, the imaging module can be connected to the control module via a USB cable.

[0043] In some embodiments, the imaging module and the supplementary lighting module can be fixed to the inner wall of the 3D printer cavity, for example, fixed to the side wall of the 3D printer cavity. The nozzle assembly can move to the center of the imaging module's field of view as the printhead body moves. For example, as the printhead body moves, the camera's shooting angle can be directly facing the nozzle assembly. Specifically, the control module can control the printhead module to move to a preset position, adjust the shooting angle of the imaging module, align the focus, and activate the supplementary lighting module to provide supplementary illumination, so that the nozzle assembly is located in the center area of ​​the imaging field of view and within the focal length range of the imaging module. Then, the imaging module is controlled to take a picture to obtain a clearly visible nozzle image, for example, a nozzle image with a resolution of 1920*1080.

[0044] In some instances, the parameters controlling the movement of the printhead module and the parameters controlling the imaging module can be saved as configuration files, which can be directly called by the 3D printer later. This allows the 3D printer to automatically move the nozzle assembly to the center of the imaging module's field of view and within the focal length range of the imaging module, and control the imaging module to take pictures without human intervention.

[0045] For example, the camera lens is positioned upwards, meaning the shooting angle is vertically upwards. As the nozzle body moves, the nozzle model assembly can move above the shooting lens, with the shooting angle directly facing the nozzle model assembly. The nozzle model assembly can be made of plastic or metal, for example, a rectangular metal block attached to the nozzle, with its rectangular surface engraved with nozzle coding information facing the camera, enabling clear and complete capture of the nozzle coding information.

[0046] It is understood that the orientation of the shooting lens and the moving direction of the printing nozzle module can be set according to the actual application scenario, and this application embodiment does not limit this.

[0047] Step S103: Match the preset encoding template image with the nozzle image to determine the nozzle encoding information image.

[0048] In some embodiments, the preset coding template image may refer to a template image that includes nozzle coding information. For example, the preset coding template image can be obtained by taking a picture of a preset nozzle model component using a camera to obtain a high-resolution sample image, and then manually segmenting the image containing the nozzle coding information from the sample image. This image containing the nozzle coding information can be stored as the preset coding template image in the 3D printer. In other embodiments, images containing nozzle coding information can also be obtained from the Internet or a preset image library as preset coding template images.

[0049] In some embodiments, a nozzle coding information image is determined by matching a preset coding template image with a nozzle image. The image area of ​​the nozzle coding information image generally only includes nozzle coding information and does not include information about the nozzle or other components.

[0050] Step S104: Based on the pre-trained character recognition model, the nozzle encoding information image is recognized, and the nozzle model is determined based on the recognition result.

[0051] In some embodiments, the pre-trained character recognition model can be trained based on support vector machines, neural networks, etc., and this application does not limit this. Taking a character recognition model trained based on support vector machines as an example, it can be trained in the following ways: (1) Construct sample images. Sample images may include positive sample images (character images) and negative sample images (non-character images), or may include only positive sample images. Divide the sample images into training set and test set according to a preset ratio (such as 7:3 or 8:2).

[0052] In some embodiments, the sample images may be preprocessed before or after the training and test set splits. Preprocessing may include size normalization, grayscale conversion, denoising, and enhancement.

[0053] (2) Add labels to the sample images in the training and test sets.

[0054] (3) The support vector machine with preset parameters is trained based on the training set (feature vector of each sample image in the training set). The preset parameters can be set according to actual needs, and this application embodiment does not limit this.

[0055] (4) Test the intermediate model trained based on the test set (feature vector of each sample image in the test set), optimize the model parameters based on the test results, until the model trained meets the preset requirements, that is, the character recognition model that can be used for character recognition is obtained.

[0056] In some embodiments, a nozzle coding information image (feature vector of the nozzle coding information image) can be input into a character recognition model, which then outputs the character recognition results for each character in the nozzle coding information image. The control module can obtain the character recognition results from the character recognition model and then determine the nozzle model based on each character recognition result.

[0057] For example, if the identification result is "@0111", the control module can look up the nozzle model corresponding to "@0111" in the preset coding table. The preset coding table can be stored in the 3D printer in advance. The preset coding table can record the mapping relationship between each possible nozzle model and nozzle coding information, and each nozzle model uniquely corresponds to one nozzle coding information.

[0058] Compared with the prior art, the embodiments of this application have at least the following advantages: In this embodiment, a nozzle model component is set on the nozzle, and nozzle coding information representing the nozzle model is engraved / printed on the nozzle model component. The nozzle image is acquired by reusing the shooting module used for nozzle calibration, and the nozzle coding information can be acquired at the same time. By matching the preset coding template image with the nozzle image, the nozzle coding information image can be quickly located and segmented in the nozzle image. Then, a pre-trained recognition model is used to recognize the nozzle coding information image to determine the nozzle model. This achieves automatic identification of the nozzle model without increasing the hardware cost of the 3D printer, and the recognition accuracy is high.

[0059] Please refer to the following: Figure 3 As shown, Figure 3 This is a flowchart illustrating another embodiment of the nozzle model identification method for 3D printers provided in this application. The nozzle model identification method for 3D printers can be applied to 3D printers, for example, in applications... Figure 1 The control module shown. Depending on different needs, Figure 3 The order of steps in the flowchart shown can be changed, and some steps can be omitted or combined.

[0060] The nozzle model identification method for this 3D printer may include the following steps: Step S200: Control the nozzle assembly to move to a preset position. The preset position is within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly is located in the shooting field of view.

[0061] Step S200 in this embodiment is similar to step S101 in the previous embodiment. To avoid repetition, it will not be described again here.

[0062] Step S201: Obtain the nozzle image captured by the imaging module. The nozzle image includes nozzle coding information.

[0063] In some embodiments, the acquisition and acquisition of nozzle images can be referred to the description of step S102, which will not be repeated here.

[0064] In some embodiments, the nozzle image includes nozzle coding information, which may include a first code and a second code. The first code can be used to identify and locate the coded information, while the second code can be used to characterize the nozzle model. For example, the first code may be a specific character that identifies the current string of information as nozzle coding information, rather than other information, and by recognizing the position of the first code in the nozzle image, the approximate location of the nozzle coding information can be determined. As another example, the second code may include one or more of the following: nozzle diameter code, nozzle material code, nozzle orifice type code, and nozzle length code. The nozzle model can be identified through one or more of these codes.

[0065] Taking the second coding system, which includes nozzle diameter, nozzle material, nozzle orifice type, and nozzle length, as an example, the nozzle coding information consists of five coded characters, which, from left to right, are: positioning identifier code (first coding), nozzle diameter code, nozzle material code, nozzle orifice type code, and nozzle length code. The positioning identifier code can use preset characters; that is, the positioning identifier code is the same for different nozzle coding information. For example, such as... Figure 4 As shown, the location identifier is encoded as the character "@". In other embodiments, the location identifier may be encoded as other preset characters, and this application does not limit this.

[0066] Nozzle diameter, nozzle material, nozzle orifice type, and nozzle length codes can all be assigned using numbers (0-9) or letters (A-Z) to represent different nozzle diameters, materials, orifice types, and lengths. For example, numbers can be used for fewer types of codes, while letters can be used for more types, to meet different coding requirements.

[0067] Taking nozzle diameter encoding as an example, numbers (0-9) are used for numbering, with each number corresponding to a different diameter. Similarly, for nozzle material encoding, numbers (0-9) are used, with each number corresponding to a different material. For nozzle orifice type encoding, numbers (0-9) are used, with each number corresponding to a different nozzle orifice type. For nozzle length encoding, numbers (0-9) are used, with each number corresponding to a different nozzle length. The specific mapping relationship between the numbers and nozzle diameter, nozzle material, nozzle orifice type, and nozzle length can be set according to actual needs. This application example does not limit this. This mapping relationship can be organized into a mapping table and pre-stored in the 3D printer for easy identification of nozzle models later.

[0068] Step S202: Match the preset encoding template image with the nozzle image to determine the first position region of the first encoding in the nozzle image.

[0069] In some embodiments, the preset encoding template image may refer to a template image containing a positioning identifier code. For example, the preset encoding template image can be obtained by taking a picture of a preset nozzle model component with a camera to obtain a high-resolution sample image, and then manually segmenting the image containing the positioning identifier code from the sample image. This image containing the positioning identifier code is then stored in the 3D printer as the preset encoding template image. In other embodiments, images containing positioning identifier codes can also be obtained from the Internet or a preset image library as preset encoding template images.

[0070] In some embodiments, by matching a preset coding template image with a nozzle image, a first position region of the first code in the nozzle image is determined, thereby achieving coarse localization of the nozzle image, determining whether the nozzle image contains nozzle coding information, and the approximate location of the nozzle coding information.

[0071] In some embodiments, matching a preset encoding template image with a nozzle image to determine a first location region of the first encoding in the nozzle image may specifically include: matching the preset encoding template image with the nozzle image to determine first coordinate position information of the first location region in the nozzle image. The first coordinate position information may include the coordinate information of each vertex of the first location region in the nozzle image (applicable to location regions of various shapes), or the first coordinate position information may include the coordinate information of any vertex of the first location region in the nozzle image, the length of the first location region, and the width of the first location region (generally applicable to rectangular location regions).

[0072] For example, the control module can call a pre-stored preset encoded template image and use the template matching function of OpenCV (an open-source computer vision and machine learning software library) to match the preset encoded template image with the nozzle image. Specifically, the preset encoded template image and the nozzle image can be substituted into the function matchTemplate(blurImage, templateImage, rect, TM_CCOEFF_NORMED), where blurImage is the nozzle image, templateImage is the preset encoded template image, TM_CCOEFF_NORMED is the set matching parameter, and rect is the position of the rectangle matched by the preset encoded template image in the nozzle image. rect can be represented by (x, y, width, height), where (x, y) coordinates are the coordinates of the top left vertex of the preset encoded template image in blurImage, and width and height are the width and height of the rectangle, respectively.

[0073] like Figure 4 As shown in (a) of this application embodiment, the position of the rectangular box Rec1 in the nozzle image is illustrated by the preset encoded template image matched by OpenCV. It is assumed that the position of the rectangular box Rec1 in the blurImage is: rect=(41,35, 45, 45).

[0074] Step S203: Based on the first position region and the preset positional relationship between the first code and the second code, determine the second position region of the nozzle code information in the nozzle image, and determine the nozzle code information image based on the second position region.

[0075] In some embodiments, since the nozzle coding information is generally machine-engraved or printed on the nozzle model component, the size and spacing of each character in the nozzle coding information are fixed and known, that is, the characters in the nozzle coding information have a preset positional relationship. For example, taking the case where each character has the same size and spacing, the length and width of the rectangle corresponding to each character are both (45, 45).

[0076] After determining the first location region of the first code in the nozzle image, the second location region of the nozzle code information in the nozzle image can be determined based on the first location region and the preset positional relationship between the first code and the second code. Specifically, determining the second location region of the nozzle code information in the nozzle image based on the first location region and the preset positional relationship between the first code and the second code may include: determining the second coordinate position information of the second location region in the nozzle image based on the first coordinate position information and the preset positional relationship. The second coordinate position information includes the coordinate position information of each vertex of the second location region in the nozzle image, or the second coordinate position information includes the coordinate position information of any vertex of the second location region in the nozzle image, the length of the second location region, and the width of the second location region.

[0077] Assuming the first location area is (41, 35, 45, 45), and taking the second code as including four codes: nozzle diameter code, nozzle material code, nozzle orifice type code, and nozzle length code, with each character having the same size and spacing, according to the preset positional relationship between the positioning identifier code and the other four codes, the rectangle Rec2 corresponding to the second location area can be determined as: (41, 35, 45×5, 45). This allows us to determine... Figure 4 The rectangular frame Rec2 shown in (b) can be represented as (41, 35, 225, 45). Based on the rectangular frame Rec2, the nozzle image can be segmented as follows: Figure 5 The nozzle coding information image I1 is shown in (a) of the image.

[0078] Step S204: Segment the characters in the nozzle encoding information image to determine multiple single-character images.

[0079] In some embodiments, after determining the second coordinate position information, the control module can segment the nozzle coding information image corresponding to the second position region from the nozzle image, and then segment the characters in the nozzle coding information image to determine multiple single character images (including images of a single character).

[0080] For example, the characters in the nozzle encoding information image can be segmented according to the size of the rectangle corresponding to each character to determine multiple single-character images, that is, the length and width of each single-character image are (45, 45).

[0081] In some embodiments, to reduce the computational burden of character recognition based on a pre-trained character recognition model and minimize the background area of ​​the single-character image, the characters in the second location region can be segmented to determine multiple single-character images as follows: The nozzle coding information image is projected to determine a projected image; the grayscale value of each pixel in the projected image is traversed, and the number of pixels with grayscale values ​​less than a preset threshold in each column is recorded; multiple character segmentation lines are determined based on the number of pixels with grayscale values ​​less than the preset threshold in each column; the nozzle coding information image is segmented based on the multiple character segmentation lines to determine multiple single-character images. For example, the preset threshold is used to distinguish black pixels in the projected image. For a binary image, the value corresponding to a black pixel is 0, and the value corresponding to a white pixel is 255. The preset threshold can be set slightly larger than 0, for example, a preset threshold of 10.

[0082] like Figure 5 As shown in (b) of the diagram, the projection processing of the nozzle coding information image I1 is illustrated to determine the projected image I2. Figure 5 As shown in (c), the nozzle encoding information image I1 is segmented based on multiple defined character segmentation lines L, resulting in 5 single-character images.

[0083] The following example uses OpenCV to segment characters in the second position region to determine multiple single-character images: (1) Project the nozzle coding information image I1 vertically onto the horizontal plane to form a projection image.

[0084] (2) Assuming the length and width of the nozzle-encoded information image I1 are represented as (L1, W1), an array of length L1 is initialized based on the length L1 of the nozzle-encoded information image I1. This array is used to record the number of black pixels in each column of the projected image I2. Specifically, by traversing the pixels in each column (0~W1) and each row (0~L1), if the value of a pixel is less than a preset threshold (piex[i, j]≤TH), the pixel is recorded as a black pixel. Based on this method, the number of black pixels in each column can be counted. TH is the preset threshold, i∈(0, W1], j∈(0, L1).

[0085] (3) For each character in the projected image, each character can be considered as a connected component. The OpenCV's findContours() operator can be used to extract the connected component based on the number of black pixels in each column, thus achieving segmentation to obtain multiple single-character images.

[0086] Step S205: Based on the pre-trained character recognition model, each single character image in the multiple single character images is recognized, and the nozzle model is determined based on the recognition results.

[0087] In some embodiments, each single-character image (the feature vector of each single-character image) can be sequentially input into a character recognition model, which then outputs the character recognition result for each single-character image. The control module can obtain the character recognition result from the character recognition model and then determine the nozzle model based on each character recognition result. For example, the character recognition results of each single-character image can be spliced ​​together according to the position of the single-character image in the nozzle coding information image to obtain the nozzle coding information.

[0088] For example, if the identification result is "@0111", the control module can look up the nozzle model corresponding to "@0111" in the preset coding table. The preset coding table can be stored in the 3D printer in advance. The preset coding table can record the mapping relationship between each possible nozzle model and nozzle coding information, and each nozzle model uniquely corresponds to one nozzle coding information.

[0089] In some embodiments, the control module may first determine whether the identification result contains a positioning identifier code. If it is determined that the positioning identifier code is included, the control module may continue to search for the nozzle model corresponding to the identification result in the preset code table. If it is determined that the positioning identifier code is not included, an abnormal prompt message may be output directly, such as a prompt message indicating that the nozzle model could not be identified.

[0090] Compared with the prior art, the embodiments of this application have at least the following advantages: In this embodiment, a nozzle model component is set on the nozzle, and nozzle coding information representing the nozzle model is engraved / printed on the nozzle model component. The nozzle image is acquired by reusing the imaging module used for nozzle calibration, and the nozzle coding information can be acquired at the same time. The nozzle coding information includes a positioning identification code and a model code. The positioning identification code is used for the identification and positioning of the nozzle code, which facilitates the rapid location and segmentation of the nozzle coding information image in the image. Then, a recognition model is used to identify the nozzle coding information image to determine the nozzle model. This achieves automatic identification of the nozzle model without increasing the hardware cost of the 3D printer, and the identification accuracy is high.

[0091] Please refer to Figure 6 This is a flowchart illustrating the steps of another embodiment of the nozzle model identification method for 3D printers provided in this application. The nozzle model identification method for 3D printers can be applied to 3D printers, for example, in applications... Figure 1 The control module shown. Depending on different needs, Figure 6 The order of steps in the flowchart shown can be changed, and some steps can be omitted or combined.

[0092] Step S300: Control the nozzle assembly to move to a preset position. The preset position is within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly is located in the shooting field of view.

[0093] Step S300 in this embodiment is similar to step S101 in the previous embodiment, and will not be repeated here to avoid repetition.

[0094] Step S301: Obtain the nozzle image captured by the imaging module. The nozzle image includes nozzle coding information. Step S301 in this embodiment is similar to step S102 in the previous embodiment. To avoid repetition, it will not be described again here.

[0095] Step S302: Preprocess the nozzle image, including region of interest cropping, grayscale conversion and noise reduction.

[0096] In some embodiments, region-of-interest (ROI) cropping can involve cropping the nozzle image to remove redundant background portions. For example, this can be achieved by using contour or texture feature recognition algorithms to distinguish the target from the background before cropping. Grayscale conversion can refer to converting the cropped image into a grayscale image. For instance, this can be accomplished using the OpenCV function cvtColor(roiImage, grayImage, COLOR_BGR2HSV), where roiImage is the cropped image (color image), COLOR_BGR2HSV is the parameter for color-to-grayscale conversion, and grayImage is the converted grayscale image.

[0097] In some embodiments, denoising can be performed on the converted grayscale image using algorithms such as Gaussian blur. For example, denoising can be achieved using the OpenCV function GaussianBlur(grayImage, blurImage, (3, 3)), where blurImage is the denoised grayscale image. The filtering window is 3*3.

[0098] Step S303: Match the preprocessed nozzle image with the preset coding template image to determine the first position region of the first code in the nozzle image.

[0099] In this embodiment, matching the preprocessed nozzle image with the preset coding template image can be done by referring to the content of matching the preset coding template image with the nozzle image in the foregoing embodiment. To avoid repetition, it will not be repeated here.

[0100] Step S304: Based on the first position region and the preset positional relationship between the first code and the second code, determine the second position region of the nozzle code information in the preprocessed nozzle image, and determine the nozzle code information image based on the second position region.

[0101] Step S304 in this embodiment is similar to step S203 in the previous embodiment, and will not be repeated here to avoid repetition.

[0102] Step S305: Segment the characters in the nozzle encoding information image to determine multiple single-character images.

[0103] Step S305 in this embodiment is similar to step S204 in the previous embodiment, and will not be repeated here to avoid repetition.

[0104] Step S306: Based on the pre-trained character recognition model, recognize each single character image in the multiple single character images, and determine the nozzle model based on the recognition results.

[0105] Step S306 in this embodiment is similar to step S205 in the previous embodiment, and will not be repeated here to avoid repetition.

[0106] Step S307: Set the printing parameters according to the nozzle model. The printing parameters include the model slicing parameters.

[0107] In some embodiments, after determining the nozzle model, printing parameters corresponding to the nozzle model can be set, which can help improve print quality and / or print speed. For example, printing parameters include model slicing parameters, and the slicing software in the 3D printer can set the model slicing parameters based on the nozzle model to improve print speed and / or quality.

[0108] Compared with the prior art, the embodiments of this application have at least the following advantages: In this embodiment, the nozzle image is acquired by reusing the imaging module used for nozzle calibration, and the nozzle coding information can be acquired simultaneously. The nozzle coding information, which represents the nozzle model, is set on the nozzle assembly. The nozzle coding information includes a positioning identifier code and a model code. The positioning identifier code is used for the identification and positioning of the nozzle code, which facilitates the rapid location and segmentation of the nozzle coding information image in the image. By preprocessing the nozzle image, the position of the nozzle coding information in the image can be quickly and accurately located, which facilitates the subsequent accurate segmentation of the nozzle coding information image. It can also improve the recognition efficiency and accuracy of the recognition model for single-character images. Not only can the nozzle model be automatically and accurately identified without increasing the hardware cost of the 3D printer, but the printing quality and / or printing speed of the 3D printer can also be improved by setting printing parameters corresponding to the nozzle model.

[0109] Please see Figure 7 This application provides a nozzle model identification device 200 for a 3D printer. The 3D printer includes a detachable nozzle assembly and is also equipped with an imaging module for nozzle calibration. The nozzle assembly includes a nozzle and a nozzle model component, the nozzle model component being provided with nozzle coding information. Figure 7 As shown, the nozzle model identification device 200 of the 3D printer includes: The motion control unit 2000 is used to control the nozzle assembly to move to a preset position, which is within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly is located in the shooting field of view area.

[0110] Acquisition unit 2001 is used to acquire a nozzle image, the nozzle image including nozzle coding information.

[0111] The matching unit 2002 is used to match the preset encoding template image with the nozzle image to determine the nozzle encoding information image.

[0112] The recognition unit 2003 is used to recognize the nozzle coded information image based on a pre-trained character recognition model, and to determine the nozzle model based on the recognition result.

[0113] The aforementioned modules can be programmable software instructions stored in memory and executable by the processor. It is understood that in other embodiments, the aforementioned modules can also be program instructions or firmware embedded in the processor.

[0114] Figure 8 This is a schematic diagram of an embodiment of the electronic device of this application.

[0115] The electronic device 1000 includes a memory 1001, a processor 1002, and a computer program 1003 stored in the memory 1001 and executable on the processor 1002. The processor 1002 is used to implement the steps in the above-described embodiment of the nozzle model identification method for 3D printers when executing the computer program 1003.

[0116] The electronic device 1000 can be integrated into the 3D printer or stand alone, and can control the 3D printer by communicating with it.

[0117] For example, computer program 1003 can also be divided into one or more modules / units, which are stored in memory 1001 and executed by processor 1002. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 1003 in electronic device 1000.

[0118] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1000 and does not constitute a limitation on the electronic device 1000. It may include more or fewer components than shown in the diagram, or combine certain components, or different components. For example, the electronic device 1000 may also include input / output devices, network access devices, buses, etc.

[0119] Processor 1002 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), etc. General-purpose processors can be microprocessors, single-chip microcomputers, or any conventional processor.

[0120] The memory 1001 can be used to store computer programs 1003 and / or modules / units. The processor 1002 implements various functions of the electronic device 1000 by running or executing the computer programs and / or modules / units stored in the memory 1001 and by calling data stored in the memory 1001. The memory 1001 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0121] This application also provides a computer-readable storage medium that stores computer instructions. When the computer instructions are executed on a 3D printer, the 3D printer performs the above-described nozzle model identification method for the 3D printer.

[0122] This application also provides a 3D printer, which may include the above-described electronic device or a functional module for performing the nozzle model identification method.

[0123] If the modules / units integrated in the electronic device 1000 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), etc.

[0124] In the several embodiments provided in this application, it should be understood that the disclosed 3D printer and method can be implemented in other ways. For example, the nozzle model identification device embodiments described above are merely illustrative; for instance, the division of the units is only a logical functional division, and other division methods may be used in actual implementation.

[0125] Furthermore, the functional units in the various embodiments of this application can be integrated into the same processing unit, or each unit can exist physically separately, or two or more units can be integrated into the same unit. The integrated units described above can be implemented in hardware or in the form of hardware plus software functional modules.

[0126] Compared with the prior art, the embodiments of this application have at least the following advantages: This application embodiment sets nozzle coding information representing the nozzle model on the nozzle, so that the nozzle coding information can be collected at the same time when the nozzle image is acquired. By matching the preset coding template image with the nozzle image, it is easy to quickly locate and segment the nozzle coding information image in the nozzle image. Then, a pre-trained recognition model is used to recognize the nozzle coding information image to determine the nozzle model, thereby achieving automatic identification of the nozzle model with high recognition accuracy.

[0127] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects. The multiple units or nozzle model identification devices described in the nozzle model identification device description may also be implemented by the same unit or nozzle model identification device through software or hardware.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A method for identifying nozzle type in a 3D printer, characterized in that, The 3D printer includes a detachable nozzle assembly and is further equipped with an imaging module for nozzle calibration. The nozzle assembly includes a nozzle and a nozzle model component, the nozzle model component being provided with nozzle coding information of the nozzle. The method includes: The nozzle assembly is controlled to move to a preset position, which is within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly is located in the shooting field of view. The nozzle image captured by the imaging module is obtained, and the nozzle image includes the nozzle encoding information; The nozzle image is matched with the preset encoding template image to determine the nozzle encoding information image; Based on a pre-trained character recognition model, the nozzle coded information image is recognized, and the nozzle model is determined based on the recognition results.

2. The nozzle model identification method for a 3D printer as described in claim 1, characterized in that, The nozzle coding information includes a first code and a second code. The first code is used for identification and positioning of the coding information, and the second code is used to characterize the nozzle model. Matching the preset coding template image with the nozzle image to determine the nozzle coding information image includes: The preset encoding template image is matched with the nozzle image to determine the first position region of the first encoding in the nozzle image, wherein the preset encoding template image includes the template image of the first encoding; Based on the first location region and the preset positional relationship between the first code and the second code, the second location region of the nozzle coding information in the nozzle image is determined; Based on the second location region, the nozzle coding information image is determined.

3. The nozzle model identification method for a 3D printer as described in claim 2, characterized in that, The step of matching the preset encoded template image with the nozzle image to determine the first location region of the first code in the nozzle image includes: The nozzle image is preprocessed, including region of interest cropping, grayscale conversion, and noise reduction. The preprocessed nozzle image is matched with the preset encoding template image to determine the first location region of the first encoding in the nozzle image.

4. The nozzle model identification method for a 3D printer as described in claim 2, characterized in that, The step of matching the preset encoded template image with the nozzle image to determine the first location region of the first code in the nozzle image includes: The preset encoding template image is matched with the nozzle image to determine the first coordinate position information of the first position region in the nozzle image. The first coordinate position information includes the coordinate information of each vertex of the first position region in the nozzle image, or the first coordinate position information includes the coordinate information of any vertex of the first position region in the nozzle image, the length of the first position region, and the width of the first position region. Determining the second location region of the nozzle coding information in the nozzle image based on the first location region and the preset positional relationship between the first code and the second code includes: Based on the first coordinate position information and the preset position relationship, the second coordinate position information of the second position region in the nozzle image is determined. The second coordinate position information includes the coordinate information of each vertex of the second position region in the nozzle image, or the second coordinate position information includes the coordinate information of any vertex of the second position region in the nozzle image, the length of the second position region, and the width of the second position region.

5. The nozzle model identification method for a 3D printer as described in claim 2, characterized in that, The pre-trained character recognition model identifies the nozzle-encoded information image, including: The characters in the nozzle encoding information image are segmented to determine multiple single-character images; Based on the pre-trained character recognition model, each single character image in the plurality of single character images is recognized.

6. The nozzle model identification method for a 3D printer as described in claim 5, characterized in that, The step of segmenting the characters in the nozzle encoding information image to determine multiple single-character images includes: The nozzle encoding information image is projected to determine the projected image; Iterate through the grayscale value of each pixel in the projected image and record the number of pixels in each column whose grayscale value is less than a preset threshold. Based on the number of pixels in each column whose grayscale value is less than a preset threshold, multiple character dividing lines are determined. The nozzle encoding information image is segmented based on the multiple character segmentation lines to determine the multiple single-character images.

7. The nozzle model identification method for a 3D printer as described in claim 1, characterized in that, The pre-trained character recognition model is a character recognition model trained based on support vector machines. After determining the nozzle model, the method further includes: Based on the nozzle model, set the printing parameters, which include model slicing parameters.

8. A nozzle model identification device for a 3D printer, the 3D printer including a detachable nozzle assembly, the 3D printer further being equipped with an imaging module for nozzle calibration, the nozzle assembly including a nozzle and a nozzle model component, the nozzle model component being provided with nozzle coding information of the nozzle, characterized in that, The device includes: A motion control unit is used to control the nozzle assembly to move to a preset position, the preset position being within the focal length range of the shooting module, and the nozzle coding information on the nozzle model assembly being located in the shooting field of view area; An acquisition unit is used to acquire a nozzle image captured by the shooting module, the nozzle image including the nozzle encoding information; A matching unit is used to match a preset encoding template image with the nozzle image to determine the nozzle encoding information image; The recognition unit is used to recognize the nozzle coded information image based on a pre-trained character recognition model, and to determine the nozzle model based on the recognition result.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store instructions, and the processor being used to invoke the instructions in the memory, causing the electronic device to execute the nozzle model identification method for the 3D printer according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the nozzle model identification method for a 3D printer as described in any one of claims 1 to 8.