Printer control method and device and 3D printing equipment
By acquiring and comparing the images of the 3D printer printing layer and controlling the printer's printing process, the problem of low printing accuracy of 3D printers is solved and the printing quality of the three-dimensional model is improved.
Patent Information
- Application Number
- CN202311051923.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2043-08-18
AI Technical Summary
During the printing process, existing 3D printers are prone to abnormal situations such as non-stickness on the first layer, pasta, and emptying, which leads to failure of printing of three-dimensional models, mainly due to the low printing accuracy.
By acquiring the model data of the three-dimensional model, the image of the target printing layer is determined under the target perspective, the first image is obtained, and then after the printing is completed, the image of the target printing layer is acquired through the camera and the second image is obtained. Based on the similarity between the two, the printing process of the three-dimensional printer is controlled to improve printing accuracy.
By comparing the first image and the second image, the printing process of the printer can be adjusted in time, the accuracy of the three-dimensional model can be improved, and the printing failure can be reduced.
Smart Images

Figure CN119489558A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of printers, and in particular to a control method and device for a printer and a 3D printing device. Background Art
[0002] 3D (3D) printing technology is a cutting-edge model manufacturing technology in recent years. During the printing process, various defects are often prone to occur, such as non-stick first layer, pasta, empty printing and other abnormal conditions. Among them, the printing layer problem accounts for the vast majority of all problems. The reason for the user's model printing failure is almost always due to the low printing accuracy of the printer, resulting in poor printing of the printing layer.
[0003] It can be seen that how to improve the accuracy of the three-dimensional model printed by the printer is a technical issue worthy of attention. Summary of the invention
[0004] In view of this, in order to solve some or all of the above technical problems, the embodiments of the present application provide a printer control method, device and 3D printing equipment.
[0005] In a first aspect, an embodiment of the present application provides a method for controlling a printer, the method comprising:
[0006] Acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model;
[0007] Based on the model data, determining an image of the target printing layer at a target viewing angle to obtain a first image;
[0008] After the 3D printer completes printing of the target printing layer, determining an image of the target printing layer captured by a camera at the target viewing angle to obtain a second image;
[0009] Based on the first image and the second image, the 3D printer is controlled to print the 3D model.
[0010] In a possible implementation, controlling the 3D printer to print the 3D model based on the first image and the second image includes:
[0011] Determine the similarity between the first image and the second image to obtain a first similarity;
[0012] Based on the first similarity, the 3D printer is controlled to print the 3D model.
[0013] In a possible implementation, controlling the 3D printer to print the 3D model based on the first image and the second image includes:
[0014] Divide the first image into a target number of blocks to obtain a first target set;
[0015] Divide the second image into the target number of blocks to obtain a second target set, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set;
[0016] Determine a similarity between a picture block in the first target set and a corresponding picture block in the second target set to obtain a second similarity;
[0017] Based on the second similarity, the 3D printer is controlled to print the 3D model.
[0018] In a possible implementation manner, dividing the first image into a target number of blocks includes:
[0019] Using a grid division method, the first image is divided into a target number of rectangular blocks; and
[0020] The step of dividing the second image into the target number of blocks includes:
[0021] The second image is divided into the target number of rectangular blocks using the grid division method.
[0022] In a possible implementation manner, the three-dimensional model includes a plurality of model parts, and the number of the model parts included in the three-dimensional model is the target number; and
[0023] The step of dividing the first image into a target number of blocks includes:
[0024] Determining, from the first image, a block including each of the target number of model parts; and
[0025] The step of dividing the second image into the target number of blocks includes:
[0026] For each image block in the target number of image blocks, a corresponding image block is determined from the second image based on a position of the image block in the first image.
[0027] In a possible implementation, controlling the 3D printer to print the 3D model includes:
[0028] Determine the operation type of the operation to be performed by the 3D printer; wherein the operation type includes one of the following: pause printing, print other model parts, reprint, and continue printing; the other model parts are: model parts in the 3D model other than the model parts currently being printed;
[0029] The three-dimensional printer is controlled to perform an operation of the operation type.
[0030] In a possible implementation manner, determining the image of the target printed layer captured by a camera at the target viewing angle to obtain a second image includes:
[0031] Acquire an image set, wherein the image set includes: images of the target printing layer at the target viewing angle captured by a camera at different exposure amounts;
[0032] Determining weights corresponding to images in the image set, wherein the weights corresponding to the images are negatively correlated with exposure of the images;
[0033] Based on the determined weights, the images in the image set are fused to obtain a second image, and the viewing angle of the second image is used as a target viewing angle.
[0034] In a possible implementation manner, the target printing layer includes a first printing layer.
[0035] In a second aspect, an embodiment of the present application provides a control device for a printer, the device comprising:
[0036] An acquisition unit, configured to acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model;
[0037] A first determining unit, configured to determine an image of the target printing layer at a target viewing angle based on the model data, to obtain a first image;
[0038] A second determining unit is used to determine the image of the target printing layer captured by the camera at the target viewing angle to obtain a second image after the 3D printer completes printing the target printing layer;
[0039] A control unit is used to control the 3D printer to print the 3D model based on the first image and the second image.
[0040] In a possible implementation, controlling the 3D printer to print the 3D model based on the first image and the second image includes:
[0041] Determine the similarity between the first image and the second image to obtain a first similarity;
[0042] Based on the first similarity, the 3D printer is controlled to print the 3D model.
[0043] In a possible implementation, controlling the 3D printer to print the 3D model based on the first image and the second image includes:
[0044] Divide the first image into a target number of blocks to obtain a first target set;
[0045] Divide the second image into the target number of blocks to obtain a second target set, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set;
[0046] Determine a similarity between a picture block in the first target set and a corresponding picture block in the second target set to obtain a second similarity;
[0047] Based on the second similarity, the 3D printer is controlled to print the 3D model.
[0048] In a possible implementation manner, dividing the first image into a target number of blocks includes:
[0049] Using a grid division method, the first image is divided into a target number of rectangular blocks; and
[0050] The step of dividing the second image into the target number of blocks includes:
[0051] The second image is divided into the target number of rectangular blocks using the grid division method.
[0052] In a possible implementation manner, the three-dimensional model includes a plurality of model parts, and the number of the model parts included in the three-dimensional model is the target number; and
[0053] The step of dividing the first image into a target number of blocks includes:
[0054] Determining, from the first image, a block including each of the target number of model parts; and
[0055] The step of dividing the second image into the target number of blocks includes:
[0056] For each image block in the target number of image blocks, a corresponding image block is determined from the second image based on a position of the image block in the first image.
[0057] In a possible implementation, controlling the 3D printer to print the 3D model includes:
[0058] Determine the operation type of the operation to be performed by the 3D printer; wherein the operation type includes one of the following: pause printing, print other model parts, reprint, and continue printing; the other model parts are: model parts in the 3D model other than the model parts currently being printed;
[0059] The three-dimensional printer is controlled to perform an operation of the operation type.
[0060] In a possible implementation manner, determining the image of the target printed layer captured by a camera at the target viewing angle to obtain a second image includes:
[0061] Acquire an image set, wherein the image set includes: images of the target printing layer at the target viewing angle captured by a camera at different exposure amounts;
[0062] Determining weights corresponding to images in the image set, wherein the weights corresponding to the images are negatively correlated with exposure of the images;
[0063] Based on the determined weights, the images in the image set are fused to obtain a second image, and the viewing angle of the second image is used as a target viewing angle.
[0064] In a possible implementation manner, the target printing layer includes a first printing layer.
[0065] In a third aspect, an embodiment of the present application provides a 3D printing device, including:
[0066] Memory for storing computer programs;
[0067] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the printer control method of the first aspect of the present application is implemented.
[0068] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method of any embodiment of the printer control method of the first aspect described above is implemented.
[0069] In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code is executed on a device, a processor in the device implements a method as in any embodiment of the printer control method of the first aspect described above.
[0070] The control method of the printer provided in the embodiment of the present application can obtain the model data of the three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for the three-dimensional printer to print the three-dimensional model. Then, based on the model data, the image of the target printing layer at the target viewing angle is determined to obtain a first image. Then, after the three-dimensional printer prints the target printing layer, the image of the target printing layer at the target viewing angle captured by the camera is determined to obtain a second image. Subsequently, based on the first image and the second image, the three-dimensional printer is controlled to print the three-dimensional model. Thus, the printing process of the printer can be controlled by comparing the first image and the second image, thereby improving the accuracy of the three-dimensional model obtained by the printer. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0073] One or more embodiments are exemplarily described by the images in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0074] Figure 1 A flowchart of a method for controlling a printer provided in an embodiment of the present application;
[0075] Figure 2 A flowchart of another method for controlling a printer provided in an embodiment of the present application;
[0076] Figure 3 A flowchart of another method for controlling a printer provided in an embodiment of the present application;
[0077] Figure 4A-4C A schematic diagram of a method for determining an edge contour involved in a printer control method provided in an embodiment of the present application;
[0078] Figure 5 A schematic diagram of a similarity calculation method involved in another printer control method provided in an embodiment of the present application;
[0079] Figure 6A schematic diagram of a flow chart of image fusion involved in a printer control method provided in an embodiment of the present application;
[0080] Figure 7 A schematic diagram of a second image in an overall image comparison scenario in a printer control method provided in an embodiment of the present application;
[0081] Fig. 8A A schematic diagram of a first target set provided in an embodiment of the present application;
[0082] Figure 8B A schematic diagram of a first second target set provided in an embodiment of the present application;
[0083] Figure 8C A schematic diagram of a second first target set provided in an embodiment of the present application;
[0084] Fig.8D A schematic diagram of a second second target set provided in an embodiment of the present application;
[0085] Fig. 9 A flowchart of another method for controlling a printer provided in an embodiment of the present application;
[0086] Fig.10 A schematic diagram of the structure of a control device for a printer provided in an embodiment of the present application;
[0087] Fig.11 A schematic diagram of the structure of a 3D printing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0088] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0089] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0090] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0091] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0092] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0093] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0094] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0095] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0096] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0097] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0098] In order to solve the technical problem of how to improve the accuracy of a three-dimensional model printed by a printer in the prior art, the present application provides a method for controlling a printer, which can improve the accuracy of a three-dimensional model printed by a printer.
[0099] Figure 1A flowchart of a control method for a printer provided in an embodiment of the present application. The method can be applied to one or more 3D printing devices such as printers, smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned 3D printing devices. For example, a single 3D printing device can execute the method, or multiple 3D printing devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0100] like Figure 1 As shown, the method specifically includes:
[0101] Step 101, obtaining model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model.
[0102] In this embodiment, the three-dimensional model may be any three-dimensional model to be printed and generated by a three-dimensional printer.
[0103] The model data is generated by the slicing software. In practice, when analyzing a three-dimensional model, the slicing software can obtain the contours of multiple sections of the model at a fixed distance in a certain direction of the three-dimensional model. Then, the slicing software can process the cross-sectional contours of the three-dimensional model. The software will process each layer of the cross section into a contour path, a fill path, and a support path, and then integrate the data of these working paths together, convert them into mechanical control commands that can be recognized by the 3D printer, and finally output the slicing file. The above-mentioned model data can be the data contained in the above-mentioned slicing file.
[0104] The target printing layer may be any one or more printing layers of the three-dimensional model determined by the slicing software. As an example, the target printing layer may not be the last printing layer, for example, the target printing layer may be the second printing layer.
[0105] In some optional implementations of this embodiment, the target printing layer includes a first printing layer.
[0106] The first printing layer may be the first printing layer printed by the 3D printer during the process of printing the 3D model.
[0107] It can be understood that among the many factors that cause printing problems in three-dimensional models, printing problems caused by the first printed layer often account for a higher proportion. Therefore, in the above-mentioned optional implementation method, the printing process of the printer can be controlled by comparing the image of the first printed layer determined based on the model data at the same viewing angle with the image of the first printed layer obtained by actual printing, thereby improving the timeliness of discovering printing problems.
[0108] Step 102: Based on the model data, determine the image of the target printing layer at a target viewing angle to obtain a first image.
[0109] In this embodiment, the first image may be an image of the target printing layer at a target viewing angle determined based on the model data.
[0110] As an example, based on the model file generated by the slicing software, a cross-sectional rendering at any viewing angle (including the target viewing angle) can be obtained, and then the cross-sectional rendering can be determined as the first image. Alternatively, the cross-sectional rendering can be binarized and the edge contour can be found, thereby determining the edge contour image as the first image.
[0111] Step 103, after the 3D printer completes printing of the target printing layer, determine the image of the target printing layer captured by the camera at the target viewing angle to obtain a second image.
[0112] In this embodiment, the second image can be determined based on an image of the target printed layer captured by a camera at the target viewing angle.
[0113] As an example, edge detection can be performed on the image captured by the camera through an edge detection algorithm, and a sliding window of the edge contour size corresponding to the standard slice is taken to scan the entire image. The taken window edge image and the expanded image are "ANDed". If they are in an incorrect position, the similarity with the operation result will be very low. If they are slid to the correct position, the overlap with the operation contour will be very high, thereby locating the correct model position, thereby obtaining the second image.
[0114] The edge detection process may include the following steps:
[0115] First, the image is passed through a filter, e.g., Gaussian, to suppress noise and output a smoothed image.
[0116] After that, the magnitude and direction of the gradient at each pixel of the smoothed image are calculated. Any known gradient operator, such as Prewitt, Sobel, Scharr, etc., can be applied in this step.
[0117] Then, a set of pixels, called anchors, are calculated, which have a very high probability of being an edge pixel. The anchors correspond to the pixels where the gradient operator produces the maximum value, i.e. the peak of the gradient map.
[0118] Finally, we connect the calculated anchors and draw edges between them. From one anchor (point), we use the gradient magnitude and direction of the adjacent pixels to walk to the next anchor through the gradient maximas.
[0119] The target viewing angle may be any viewing angle. As an example, the target viewing angle may be a preset viewing angle. As another example, the target viewing angle may be the viewing angle of the second image. That is, after obtaining the second image, the camera viewing angle of the second image may be determined as the target viewing angle.
[0120] In some cases, the second image may be the same size as the first image.
[0121] Step 104: Based on the first image and the second image, control the 3D printer to print the 3D model.
[0122] In this embodiment, the following method can be used to control the 3D printer to print the 3D model based on the first image and the second image:
[0123] First, at least one of the following steps is performed to obtain target similarity, wherein the target similarity includes at least one of similarity A, similarity B and similarity C.
[0124] Step 1: determine the similarity between the first image and the second image to obtain a first similarity (ie, similarity A).
[0125] Step 2: Divide the first image into a target number of rectangular blocks by grid division to obtain a first target set; divide the second image into the target number of rectangular blocks by grid division to obtain a second target set, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set; determine the similarity between the blocks in the first target set and the corresponding blocks in the second target set to obtain a second similarity (i.e., the above-mentioned similarity B).
[0126] Step three, from the first image, determine the blocks including each model part of the target number of model parts to obtain a first target set; for each block of the target number of blocks, based on the position of the block in the first image, determine the corresponding block from the second image, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set; determine the similarity between the blocks in the first target set and the corresponding blocks in the second target set to obtain a second similarity (i.e., the above-mentioned similarity C).
[0127] Afterwards, based on the target similarity, the 3D printer is controlled to print the 3D model.
[0128] As a first example, if the target similarity includes similarity A, similarity B and similarity C, and similarity A is greater than a first preset threshold, similarity B is greater than a second preset threshold, and similarity C is greater than a third preset threshold, then the 3D printer can be controlled to continue printing the 3D model.
[0129] As a second example, if the target similarity includes similarity A, and similarity A is less than or equal to a first preset threshold, then the three-dimensional printer may be controlled to reprint the three-dimensional model.
[0130] As a third example, if the three-dimensional model is a connected whole (rather than composed of two or more unconnected model parts), the target similarity includes similarity B, and similarity B is less than or equal to a second preset threshold, then the three-dimensional printer can be controlled to pause printing the three-dimensional model.
[0131] As a fourth example, if the three-dimensional model is not a connected whole (but is composed of two or more unconnected model parts), the target similarity includes similarity C, and the similarity C is less than or equal to a third preset threshold, then the three-dimensional printer can be controlled to pause printing the currently printed model parts and start printing the remaining model parts in the three-dimensional model.
[0132] Here, as for how to specifically execute the above steps 1, 2, and 3, please refer to the description below and will not be repeated here.
[0133] In some optional implementations of this embodiment, the following methods may be used to control the 3D printer to print the 3D model:
[0134] First, the operation type to be performed by the 3D printer is determined.
[0135] The operation type includes one of the following: pause printing, print other model parts, reprint, and continue printing.
[0136] The other model parts are: model parts in the three-dimensional model except the model parts currently being printed.
[0137] Afterwards, the three-dimensional printer is controlled to perform an operation of the operation type.
[0138] As an example, if the similarity between the first image as a whole and the second image as a whole is greater than a first preset threshold, then it can be determined that the probability of the target printing layer being correct is high at this time, and further, the 3D printer can be controlled to continue printing the 3D model; if the similarity between the first image as a whole and the second image as a whole is less than or equal to the above-mentioned first preset threshold, then it can be determined that the probability of the target printing layer being wrong is high at this time, and further, the print head of the 3D printer can be controlled to suspend material discharge to suspend printing the 3D model.
[0139] As another example, if a first image is divided into a target number of blocks by grid division to obtain a first target set, and a second image is divided into the target number of blocks by grid division to obtain a second target set, and the blocks in the first target set correspond one-to-one to the blocks in the second target set, then the similarity between the blocks in the first block and the corresponding blocks in the second block can be calculated, and if the similarity of each corresponding block is greater than a second preset threshold, then it can be judged that the probability of the target printing layer being correct at this time is high, and further, the 3D printer can be controlled to continue printing the 3D model; if the similarity of a corresponding block is less than or equal to the above-mentioned second preset threshold, then it can be judged that the probability of the target printing layer in the corresponding block is high, and further, the 3D printer can be controlled to pause printing the currently printed model parts and start printing the model parts corresponding to other blocks, or pause the print head discharge to suspend printing the 3D model.
[0140] It can be understood that in the above optional implementation method, the 3D printer can be controlled to pause printing, print other model parts, reprint or continue printing based on the first image and the second image. This can improve the timeliness of the 3D printer control and reduce the occurrence of glue overflow and printer damage.
[0141] In some optional implementations of this embodiment, the second image may be obtained in the following manner:
[0142] First, get the image collection.
[0143] The image set includes: images of the target printing layer at the target viewing angle captured by a camera at different exposure levels.
[0144] Afterwards, weights corresponding to the images in the image set are determined.
[0145] Among them, the weight corresponding to the image is negatively correlated with the exposure of the image.
[0146] Then, based on the determined weights, the images in the image set are fused to obtain a second image, and the viewing angle of the second image is used as the target viewing angle.
[0147] Specifically, first, multiple images of the target printing layer can be captured by a camera, and the exposure time of each image or the distance between the camera and the target printing layer is different to ensure that different light and dark areas in the scene can be captured. After that, all the captured images are read and converted into grayscale or RGB (Red Green Blue) format. Subsequently, the camera response function is estimated to correct the brightness difference of the image under different exposures. This process is to obtain the brightness value of each pixel under different exposures and convert it into a real brightness value. Usually, this process needs to be completed using a curve fitting algorithm based on the least squares method. Then, exposure alignment is performed to reduce the registration error caused by slight image offset. This process is to perform image registration by using feature points or masks of the image. Next, the images can be merged. In this process, the images under different exposures can be weighted averaged. Among them, the high-exposure image is assigned a lower weight, while the low-exposure image is assigned a higher weight. This process can be completed using the exposure merging technology based on the Debevec-Malik (camera response curve calculation) algorithm. Finally, color mapping is performed. In this process, the merged HDR (High Dynamic Range) image is converted to a standard 8-bit image for display and printing, thereby obtaining a second image. Typically, this process requires tone mapping of the image to maintain the rich details and light and dark changes in the shadow area of the HDR image.
[0148] It is understandable that in actual scenarios, since the photographic effect is greatly affected by environmental factors, overexposure or underexposure will cause a significant decrease in image quality. In order to improve this problem, a multiple exposure strategy can be introduced to obtain a high-quality second image through a multi-frame fusion algorithm.
[0149] The control method of the printer provided in the embodiment of the present application can obtain the model data of the three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for the three-dimensional printer to print the three-dimensional model. Then, based on the model data, the image of the target printing layer at the target viewing angle is determined to obtain a first image. Then, after the three-dimensional printer prints the target printing layer, the image of the target printing layer at the target viewing angle captured by the camera is determined to obtain a second image. Subsequently, based on the first image and the second image, the three-dimensional printer is controlled to print the three-dimensional model. Thus, the printing process of the printer can be controlled by comparing the first image and the second image, thereby improving the accuracy of the three-dimensional model obtained by the printer.
[0150] Figure 2 A flowchart of another method for controlling a printer provided in an embodiment of the present application is shown below. Figure 2 As shown, the method specifically includes:
[0151] Step 201 : acquiring model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model.
[0152] In this embodiment, step 201 and Figure 1 Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0153] Step 202: Based on the model data, determine the image of the target printing layer at a target viewing angle to obtain a first image.
[0154] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0155] Step 203, after the 3D printer completes printing the target printing layer, determine the image of the target printing layer captured by the camera at the target viewing angle to obtain a second image.
[0156] In this embodiment, step 203 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0157] Step 204: determine the similarity between the first image and the second image to obtain a first similarity.
[0158] In this embodiment, the first similarity may represent the similarity between the entire first image and the entire second image.
[0159] Step 205: Based on the first similarity, control the 3D printer to print the 3D model.
[0160] In this embodiment, the 3D printer may be controlled to print the 3D model based on the value of the first similarity.
[0161] As an example, if the first similarity is greater than a first preset threshold, the 3D printer may be controlled to continue printing the 3D model; if the first similarity is less than or equal to the first preset threshold, the 3D printer may be controlled to reprint the 3D model.
[0162] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For details, please refer to the technical effect of the control method of the printer shown in Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0163] The printer control method provided in the embodiment of the present application controls the 3D printer to print the 3D model through the similarity between the first image as a whole and the second image as a whole, and can judge whether the target printing layer is printed correctly as a whole.
[0164] Figure 3 A flowchart of another method for controlling a printer provided in an embodiment of the present application.
[0165] Specifically, if Figure 3 As shown, the method specifically includes:
[0166] Step 301 : acquiring model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model.
[0167] In this embodiment, step 301 and Figure 1 Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0168] Step 302: Based on the model data, determine the image of the target printing layer at a target viewing angle to obtain a first image.
[0169] In this embodiment, step 302 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0170] Step 303, after the 3D printer completes printing the target printing layer, determine the image of the target printing layer captured by the camera at the target viewing angle to obtain a second image.
[0171] In this embodiment, step 303 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0172] Step 304: Divide the first image into a target number of blocks to obtain a first target set.
[0173] In this embodiment, the target number may be a predetermined number (e.g., 4, 9) or a number determined based on the three-dimensional model. For example, the target number may be the number of model parts included in the three-dimensional model. The model parts may be unconnected parts in the three-dimensional model.
[0174] The first target set may be a set of target number of image blocks obtained by dividing the first image.
[0175] Here, by dividing the first image according to regions (ie, blocks), a set of images of printing components can be obtained, that is, a first target set can be obtained.
[0176] Step 305: Divide the second image into the target number of blocks to obtain a second target set, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set.
[0177] In this embodiment, the second target set may be: a set of the target number of blocks obtained by dividing the second image.
[0178] The number of tiles in the second target set is equal to the number of tiles in the first target set, and both are the above target numbers.
[0179] Here, by dividing the second image according to regions (ie, blocks), a set of images of printing components can be obtained, that is, a second target set can be obtained.
[0180] In some cases, the first image is divided in the same manner as the second image is divided.
[0181] In some optional implementations of this embodiment, the first image may be divided into a target number of blocks in the following manner: the first image may be divided into a target number of rectangular blocks in a grid division manner.
[0182] For example, the first image may be divided into a nine-square grid, thereby obtaining nine image blocks.
[0183] On this basis, the second image may be divided into the target number of blocks in the following manner: the second image may be divided into the target number of rectangular blocks in the grid division manner.
[0184] For example, the second image may be divided into a nine-square grid, thereby obtaining nine blocks.
[0185] It can be understood that in the above optional implementation, the first image and the second image are divided by grid division, which can complete the image division more quickly, thereby improving the timeliness of the subsequent judgment of whether the target printing layer is accurate.
[0186] In some optional implementations of this embodiment, the three-dimensional model includes a plurality of model parts. The number of the model parts included in the three-dimensional model is the target number, that is, the number of the model parts included in the three-dimensional model is determined to be the target number.
[0187] On this basis, the first image may be divided into a target number of image blocks in the following manner: from the first image, a image block including each model part of the target number of model parts is determined.
[0188] As an example, edge detection may be performed on the first image, thereby determining a block including each model part of the target number of model parts from the first image.
[0189] On this basis, the second image may be divided into the target number of image blocks in the following manner:
[0190] For each image block in the target number of image blocks, a corresponding image block is determined from the second image based on a position of the image block in the first image.
[0191] Here, if the image block A in the first image corresponds to the image block B in the second image, then the position of the image block A in the first image may be the same as the position of the image block B in the second image.
[0192] Step 306: determine the similarity between the image blocks in the first target set and the corresponding image blocks in the second target set to obtain a second similarity.
[0193] In this embodiment, the second similarity may be the similarity between the image blocks in the first target set and the corresponding image blocks in the second target set.
[0194] Step 307: Based on the second similarity, control the 3D printer to print the 3D model.
[0195] In this embodiment, the 3D printer may be controlled to print the 3D model based on the numerical value of the second similarity.
[0196] As an example, if the second similarities are all greater than the second preset threshold, then it can be judged that the probability of the target printing layer being printed correctly is high at this time, and further, the 3D printer can be controlled to continue printing the 3D model; if the second similarity of a corresponding block is less than or equal to the above-mentioned second preset threshold, then it can be judged that the probability of the target printing layer in the corresponding block being printed incorrectly is high at this time, and further, the 3D printer can be controlled to pause printing of part of the 3D model corresponding to the block (for example, stop printing the currently printed model parts), and start printing part of the 3D model corresponding to other blocks (for example, printing other model parts), or, pause the print head discharge to suspend printing the 3D model.
[0197] The control method of the printer provided in the embodiment of the present application can determine whether a part of the target printing layer is printed correctly by dividing the first image into the second image and then calculating the similarity between the corresponding blocks obtained by the division, thereby further improving the accuracy of the three-dimensional model obtained by the printer.
[0198] The following takes the target printing layer as the first printing layer as an example to exemplify the embodiment of the present application, but it should be noted that the embodiment of the present application may have the features described below, but the following description does not constitute a limitation on the protection scope of the embodiment of the present application.
[0199] 3D printing technology is a model manufacturing technology that has been popular in recent years. Various defects will inevitably occur during the printing process, such as non-stick first layer, pasta, empty printing and other abnormal conditions. Through research, the first layer problem accounts for more than 90% of all problems, and the user's model printing failure is almost always caused by the first layer not being printed properly. Therefore, this method proposes a high-precision first-layer printing recognition scheme that has high robustness in various lighting environments and does not require industrial-grade lighting and imaging conditions.
[0200] Reference Fig. 9 , Fig. 9 A flowchart of another method for controlling a printer provided in an embodiment of the present application is shown below. Fig. 9 As shown, this method can be divided into three modules:
[0201] 1. Take multiple exposure photos.
[0202] 1. Take multiple images (i.e. the image collection mentioned above), each with a different exposure time to ensure that different light and dark areas in the scene can be captured.
[0203] 2. Read all captured images and convert them to grayscale or RGB format.
[0204] 3. Estimation of the camera response function to correct the image brightness differences under different exposures. This process is to obtain the brightness value of each pixel under different exposures and convert it into the real brightness value. Usually, this process needs to be completed using a curve fitting algorithm based on the least squares method.
[0205] 4. Perform exposure alignment to reduce the registration error caused by slight image offset. This process is to use the image feature points or masks to perform image registration.
[0206] 5. Merge images. In this process, images with different exposures can be weighted averaged. Images with high exposure are assigned lower weights, while images with low exposure are assigned higher weights. This process is usually completed using exposure merging technology based on the Debevec-Malik algorithm.
[0207] 6. Color mapping. In this process, the merged HDR image is converted to a standard 8-bit image for easy display and printing. Usually, this process requires tone mapping of the image to maintain the rich details and light and dark changes in the shadow area of the HDR image.
[0208] Here, in actual scenes, since the photographic effect is greatly affected by the environment, whether it is overexposure or underexposure, the image quality will be significantly reduced. In order to improve this problem, a multiple exposure strategy can be introduced to obtain a high-quality image through a multi-frame fusion algorithm, such as Figure 6 As shown, Figure 6 A schematic diagram of a flow chart of image fusion involved in a printer control method provided in an embodiment of the present application.
[0209] Here, the second image may be generated based on images obtained by multiple exposure photography.
[0210] 2. Comparison of first floor outlines.
[0211] 1. According to the slicing software, obtain the cross-sectional rendering of the model file in the camera's perspective, perform binarization processing, find the edge contour, and perform expansion operations to obtain the above-mentioned first image.
[0212] The principle of image expansion is as follows: assuming that there is a foreground object in the original image, then the process of using a structure element to expand the original image is as follows: traverse each pixel of the original image, then align the center point of the structure element with the pixel currently being traversed, and then take the maximum value of all pixels in the corresponding area of the original image covered by the current structure element, and replace the current pixel value with this maximum value.
[0213] The contour search process is as follows:
[0214] First, find a black pixel and set it as the starting pixel. Locating a starting pixel can be done in many ways, for example, starting from the lower left corner of the grid, scanning each column of pixels from bottom to top, from the leftmost to the right, until a black pixel is encountered, which is used as the starting pixel.
[0215] After that, each time you hit a black pixel P, backtrack, that is, go back to the white pixel you were standing on before, and then go around pixel P in a clockwise direction, visiting every pixel in its Moore neighborhood until you hit a black pixel.
[0216] After that, the above process is repeated, and the algorithm terminates when the starting pixel is visited for the second time. The black pixels passed through during the entire operation process are the boundary pixels of the target. The black pixels passed through will become the outline of the pattern.
[0217] 2. Use edge detection algorithm to detect the edge of the camera image, take a sliding window of standard slice outline size to scan the whole image, and perform "AND operation" on the taken window edge image and the expansion image. If it is in an incorrect position, the similarity with the operation result will be very low. If it slides to the correct position, the overlap with the operation outline will be very high, thus locating the correct model position. For details, please refer to Figure 5 .
[0218] As an example, see Figure 4A-4C , Figure 4A-4C A schematic diagram of a method for determining edge contours involved in a printer control method provided in an embodiment of the present application. Figure 4A After edge detection of the image shown, we can obtain Figure 4B The edge profile shown, after that, Figure 4B After dilation of the edge contour shown, we can obtain Figure 4C Image shown.
[0219] 3. After locating the model, calculate the similarity of the overall contour, the partition contour and the contour of a single component.
[0220] 1. Overall profile comparison. For example, Figure 7 As shown, Figure 7 A schematic diagram of a second image in an overall image comparison scenario in a printer control method provided in an embodiment of the present application. Figure 7 The tile selected in the middle can be used as the second image.
[0221] 2. Grid partition component comparison: Divide the image into 9 grid partitions and perform similarity comparison on each partition. For example, please refer to Fig. 8A and Figure 8B , Fig. 8AA schematic diagram of a first target set provided in an embodiment of the present application; Figure 8B A schematic diagram of a first second target set provided in an embodiment of the present application. Fig. 8A and Figure 8B In the grid division method, Fig. 8A , 8B The first image and the second image in are divided into 9 blocks respectively.
[0222] 3. Single component comparison: Extract disconnected single components and compare each component one by one. For example, please refer to Figure 8C and Fig.8D , Figure 8C A schematic diagram of a second first target set provided in an embodiment of the present application; Fig.8D A schematic diagram of a second second target set provided in an embodiment of the present application. Figure 8C and Fig.8D In the example, based on the model parts, Figure 8C , 8D The first image and the second image in the image are divided to obtain the blocks corresponding to each model part.
[0223] Among them, the similarity of the overall contour is also the first similarity mentioned above.
[0224] Partition contour similarity, that is, the similarity between corresponding blocks obtained by grid partitioning.
[0225] The similarity of the contours of a single component, that is, the similarity between the corresponding blocks of the above model parts.
[0226] 3. Dynamic adjustment of path planning.
[0227] Here, the path planning is dynamically adjusted, that is, the above-mentioned control of the three-dimensional printer to perform one of the following: pausing printing, printing other model parts, reprinting, and continuing printing.
[0228] In practice, G-code is used as a command format to control 3D printers (or other CNC machine tools). It can be understood as a time sequence of a series of control commands for 3D printers. Different models correspond to different G-code codes. For multiple component models, the G-code code blocks can be divided internally, and different code blocks correspond to different component models (that is, the above-mentioned model parts). Combined with the above-mentioned first-level recognition results, it can be corresponded to which code block (or component) has an abnormality. Then, in the subsequent printing process, this G-code instruction is skipped and other printing commands are executed. In this way, it will not affect the printing of other normal components, nor will it invalidate the entire printing process.
[0229] It should be noted that, in addition to the contents recorded above, this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the control method of the printer shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0230] The control method of the printer provided in the embodiment of the present application can solve the problem of poor image quality in the product through a multiple exposure scheme, thereby affecting the recognition accuracy of the subsequent contour comparison method; through the comparison strategy of the contour comparison scheme (whole, partition, single part), it can detect the local detail errors of the first layer printing, with a high recall rate; dynamically adjust the path planning, and if there are problems with individual parts of the model, the remaining parts can be continued to be printed. Instead of a one-size-fits-all suspension of printing; and this method can effectively prevent the phenomenon of glue overflow and plugging caused by the non-sticking of the first layer, which damages the machine.
[0231] Fig.10 A schematic diagram of the structure of a control device for a printer provided in an embodiment of the present application. Specifically comprising:
[0232] An acquisition unit 401 is used to acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model;
[0233] A first determining unit 402 is used to determine an image of the target printing layer at a target viewing angle based on the model data to obtain a first image;
[0234] A second determining unit 403 is used to determine the image of the target printing layer captured by the camera at the target viewing angle to obtain a second image after the 3D printer completes printing the target printing layer;
[0235] The control unit 404 is used to control the 3D printer to print the 3D model based on the first image and the second image.
[0236] In a possible implementation, controlling the 3D printer to print the 3D model based on the first image and the second image includes:
[0237] Determine the similarity between the first image and the second image to obtain a first similarity;
[0238] Based on the first similarity, the 3D printer is controlled to print the 3D model.
[0239] In a possible implementation, controlling the 3D printer to print the 3D model based on the first image and the second image includes:
[0240] Divide the first image into a target number of blocks to obtain a first target set;
[0241] Divide the second image into the target number of blocks to obtain a second target set, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set;
[0242] Determine a similarity between a picture block in the first target set and a corresponding picture block in the second target set to obtain a second similarity;
[0243] Based on the second similarity, the 3D printer is controlled to print the 3D model.
[0244] In a possible implementation manner, dividing the first image into a target number of blocks includes:
[0245] Using a grid division method, the first image is divided into a target number of rectangular blocks; and
[0246] The step of dividing the second image into the target number of blocks includes:
[0247] The second image is divided into the target number of rectangular blocks using the grid division method.
[0248] In a possible implementation manner, the three-dimensional model includes a plurality of model parts, and the number of the model parts included in the three-dimensional model is the target number; and
[0249] The step of dividing the first image into a target number of blocks includes:
[0250] Determining, from the first image, a block including each of the target number of model parts; and
[0251] The step of dividing the second image into the target number of blocks includes:
[0252] For each image block in the target number of image blocks, a corresponding image block is determined from the second image based on a position of the image block in the first image.
[0253] In a possible implementation, controlling the 3D printer to print the 3D model includes:
[0254] Determine the operation type of the operation to be performed by the 3D printer; wherein the operation type includes one of the following: pause printing, print other model parts, reprint, and continue printing; the other model parts are: model parts in the 3D model other than the model parts currently being printed;
[0255] The three-dimensional printer is controlled to perform an operation of the operation type.
[0256] In a possible implementation manner, determining the image of the target printed layer captured by a camera at the target viewing angle to obtain a second image includes:
[0257] Acquire an image set, wherein the image set includes: images of the target printing layer at the target viewing angle captured by a camera at different exposure amounts;
[0258] Determining weights corresponding to images in the image set, wherein the weights corresponding to the images are negatively correlated with exposure of the images;
[0259] Based on the determined weights, the images in the image set are fused to obtain a second image, and the viewing angle of the second image is used as a target viewing angle.
[0260] In a possible implementation manner, the target printing layer includes a first printing layer.
[0261] The control device of the printer provided in this embodiment can be as follows Fig.10 The control device of the printer shown in can execute all the steps of the control methods of each printer described above, thereby achieving the technical effects of the control methods of each printer described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0262] Fig.11 A schematic diagram of the structure of a 3D printing device provided in an embodiment of the present application, Fig.11 The 3D printing device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the 3D printing device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not described in detail. Fig.11 Various buses are labeled as bus system 505 .
[0263] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0264] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0265] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0266] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.
[0267] In this embodiment, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:
[0268] Acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model;
[0269] Based on the model data, determining an image of the target printing layer at a target viewing angle to obtain a first image;
[0270] After the 3D printer completes printing of the target printing layer, determining an image of the target printing layer captured by a camera at the target viewing angle to obtain a second image;
[0271] Based on the first image and the second image, the 3D printer is controlled to print the 3D model.
[0272] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0273] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0274] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0275] The 3D printing device provided in this embodiment can be as follows Fig.11 The 3D printing device shown in can execute all the steps of the control method of each printer described above, thereby achieving the technical effects of the control method of each printer described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0276] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0277] When one or more programs in the storage medium can be executed by one or more processors, the printer control method executed on the 3D printing device side can be implemented.
[0278] The processor is used to execute the three-dimensional printing program stored in the memory to implement the following steps of the printer control method executed on the 3D printing device side:
[0279] Acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model;
[0280] Based on the model data, determining an image of the target printing layer at a target viewing angle to obtain a first image;
[0281] After the 3D printer completes printing of the target printing layer, determining an image of the target printing layer captured by a camera at the target viewing angle to obtain a second image;
[0282] Based on the first image and the second image, the 3D printer is controlled to print the 3D model.
[0283] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0284] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0285] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0286] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for controlling a printer, characterized in that: The method comprises: Acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model; Based on the model data, determining an image of the target printing layer at a target viewing angle to obtain a first image; After the 3D printer completes printing of the target printing layer, determining an image of the target printing layer captured by a camera at the target viewing angle to obtain a second image; Based on the first image and the second image, the 3D printer is controlled to print the 3D model.
2. The method according to claim 1, characterized in that The step of controlling the 3D printer to print the 3D model based on the first image and the second image includes: Determine the similarity between the first image and the second image to obtain a first similarity; Based on the first similarity, the 3D printer is controlled to print the 3D model.
3. The method according to claim 1, characterized in that The step of controlling the 3D printer to print the 3D model based on the first image and the second image includes: Divide the first image into a target number of blocks to obtain a first target set; Divide the second image into the target number of blocks to obtain a second target set, wherein the blocks in the first target set correspond one-to-one to the blocks in the second target set; Determine a similarity between a picture block in the first target set and a corresponding picture block in the second target set to obtain a second similarity; Based on the second similarity, the 3D printer is controlled to print the 3D model.
4. The method according to claim 3, characterized in that The step of dividing the first image into a target number of blocks includes: Using a grid division method, the first image is divided into a target number of rectangular blocks; and The step of dividing the second image into the target number of blocks includes: The second image is divided into the target number of rectangular blocks using the grid division method.
5. The method according to claim 3, characterized in that: The three-dimensional model includes a plurality of model parts, and the number of the model parts included in the three-dimensional model is the target number; as well as The step of dividing the first image into a target number of blocks includes: Determining, from the first image, a block including each of the target number of model parts; and The step of dividing the second image into the target number of blocks includes: For each image block in the target number of image blocks, a corresponding image block is determined from the second image based on a position of the image block in the first image.
6. The method according to any one of claims 1 to 5, characterized in that: The controlling the 3D printer to print the 3D model comprises: Determine the operation type of the operation to be performed by the 3D printer; wherein the operation type includes one of the following: pause printing, print other model parts, reprint, and continue printing; the other model parts are: model parts in the 3D model other than the model parts currently being printed; The three-dimensional printer is controlled to perform an operation of the operation type.
7. The method according to any one of claims 1 to 5, characterized in that: The determining the image of the target printed layer captured by the camera at the target viewing angle to obtain a second image includes: Acquire an image set, wherein the image set includes: images of the target printing layer at the target viewing angle captured by a camera at different exposure amounts; Determining weights corresponding to images in the image set, wherein the weights corresponding to the images are negatively correlated with exposure of the images; Based on the determined weights, the images in the image set are fused to obtain a second image, and the viewing angle of the second image is used as a target viewing angle.
8. The method according to any one of claims 1 to 5, characterized in that: The target printing layer includes a first printing layer.
9. A control device for a printer, characterized in that: The device comprises: An acquisition unit, configured to acquire model data of a three-dimensional model, wherein the three-dimensional model includes a target printing layer, and the model data is used for a three-dimensional printer to print the three-dimensional model; A first determining unit, configured to determine an image of the target printing layer at a target viewing angle based on the model data, to obtain a first image; A second determining unit is used to determine the image of the target printing layer captured by the camera at the target viewing angle to obtain a second image after the 3D printer completes printing the target printing layer; A control unit is used to control the 3D printer to print the 3D model based on the first image and the second image.
10. A 3D printing device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Printing monitoring system and method
CN111016181A
3D printing model detection method and related device
CN115195124A