3D printing speed control method and device, equipment, medium and program product

By combining a high-precision industrial camera with a RISC microcontroller, the printing speed of a desktop 3D printer can be adjusted in real time, solving the problem that traditional printers cannot dynamically adjust their speed and improving printing quality and efficiency.

CN120840076APending Publication Date: 2025-10-28GUILIN UNIV OF AEROSPACE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511040750.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Traditional desktop 3D printers cannot adjust the printing speed in real time, making it difficult to achieve the best results and efficiency when printing complex models or different materials. In addition, existing automatic measurement devices are complex in structure and expensive.

Method used

A high-precision industrial camera is used to measure the diameter of the composite filament, and combined with a RISC-structured microcontroller control system, the printing speed is adjusted in real time through image processing technology to ensure the uniformity of the filament diameter.

Benefits of technology

It enables precise measurement of the composite filament diameter and dynamic adjustment of printing speed, improving printing quality, avoiding filament breakage and clogging issues, and enhancing printing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120840076A_ABST
    Figure CN120840076A_ABST
Patent Text Reader

Abstract

The invention provides a 3D printing speed control method and device, equipment, a medium and a program product, and relates to the technical field of 3D printing. The method comprises the steps that an original image which is shot by an industrial camera and comprises a ruler and a composite wire material used for 3D printing is obtained; processing the original image to obtain a target image; according to the pixel size of the scale in the target image, the pixel size of the composite wire and the actual size of the scale, the actual size of the width of the composite wire is determined; and according to the difference value between the actual size and the preset size of the width of the composite wire, the feeding speed of the composite wire is determined, and control over the 3D printing speed is achieved. According to the invention, the printing quality of the desktop 3D printer applying the high-molecular polymer and the composite material thereof for printing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of technology, and more specifically, to a method, apparatus, device, medium, and program product for controlling the speed of 3D printing. Background Technology

[0002] 3D printing, as an additive manufacturing technology, has developed rapidly in recent years and has been widely used in many fields, such as aerospace, medical devices, and automobile manufacturing. For polymers and their composites, printing speed and printing accuracy are two key factors in 3D printing technology.

[0003] Traditional methods for controlling composite speeds mostly rely on manual measurement, which is inefficient and lacks precision. While some automated measuring devices can achieve a certain level of accuracy, they are often complex and costly, making them unsuitable for controlling the printing speed of desktop 3D printers. Currently, most desktop 3D printers have relatively simple speed control methods, typically relying on preset fixed speed parameters and lacking the ability to dynamically adjust based on real-time printing conditions. This makes it difficult to achieve optimal printing results and efficiency when printing complex models or different materials. Summary of the Invention

[0004] In view of this, the present invention provides a method, apparatus, device, medium, and program product for controlling 3D printing speed that can improve the print quality of desktop 3D printers using polymers and their composite materials.

[0005] One aspect of the present invention provides a method for controlling 3D printing speed, comprising: acquiring an original image captured by an industrial camera, including a scale and a composite filament for 3D printing; processing the original image to obtain a target image; determining the actual size of the width of the composite filament based on the pixel size of the scale in the target image, the pixel size of the composite filament, and the actual size of the scale; and determining the feeding speed of the composite filament based on the difference between the actual size of the width of the composite filament and a preset size, thereby controlling the 3D printing speed.

[0006] According to an embodiment of the present invention, the above-described processing of the original image to obtain the target image includes: converting the original image into a grayscale image; filtering the grayscale image to obtain a filtered image; performing edge detection on the filtered image to obtain a binary edge image; filling holes in the binary edge image to obtain a filled image; extracting the boundaries of the filled image to obtain a binary boundary image; performing morphological dilation processing on the binary boundary image to obtain a dilated image; and performing denoising processing on the dilated image to obtain the target image.

[0007] According to an embodiment of the present invention, determining the feeding speed of the composite filament based on the difference between the actual size and the preset size of the width of the composite filament includes: obtaining the initial feeding speed of the composite filament under the current condition; when the difference is greater than or equal to a first preset threshold and less than or equal to a second preset threshold, the feeding speed of the composite filament is the initial feeding speed; when the difference is less than the first preset threshold or greater than the second preset threshold, the feeding speed of the composite filament is determined according to the difference and the initial feeding speed, and according to a preset speed adjustment rule.

[0008] According to an embodiment of the present invention, determining the actual width of the composite filament based on the pixel size of the scale in the target image, the pixel size of the composite filament, and the actual size of the scale includes: dividing the pixel size of the composite filament along the length direction of the composite filament into a predetermined number of segments to obtain the pixel size of each segment of the composite filament; determining the pixel size of each segment of the composite filament in the width direction based on the pixel size of each segment of the composite filament; obtaining a ratio value based on the ratio value and the actual size of the scale; determining the actual width of each segment of the composite filament based on the actual width of each segment of the composite filament.

[0009] According to an embodiment of the present invention, determining the actual width of the composite filament based on the actual width of each segment of the composite filament includes: adding the actual widths of each segment of the composite filament to obtain the total width of the composite filament of the preset number of segments; and dividing the total width by the preset number of segments to obtain the actual width of the composite filament.

[0010] According to an embodiment of the present invention, when the difference is less than the first preset threshold or the difference is greater than the second preset threshold, determining the feeding speed of the composite filament according to the difference and the initial feeding speed, and in accordance with a preset speed adjustment rule, includes: when the difference is less than the first preset threshold, obtaining a speed increase percentage based on the ratio of the difference to the first preset threshold, and determining the feeding speed of the composite filament based on the initial feeding speed and the speed increase percentage; when the difference is greater than the second preset threshold, obtaining a speed decrease percentage based on the ratio of the difference to the second preset threshold, and determining the feeding speed of the composite filament based on the initial feeding speed and the speed decrease percentage.

[0011] Another aspect of the present invention provides a 3D printing speed control device, comprising: an image acquisition module for acquiring an original image captured by an industrial camera, including a scale and a composite filament for 3D printing; an image processing module for processing the original image to obtain a target image; a width determination module for determining the actual width of the composite filament based on the pixel size of the scale in the target image, the pixel size of the composite filament, and the actual size of the scale; and a speed adjustment module for determining the feeding speed of the composite filament based on the difference between the actual width of the composite filament and a preset size, thereby controlling the 3D printing speed.

[0012] Another aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the methods described above.

[0013] Another aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the methods described above.

[0014] Another aspect of the present invention provides a computer program product comprising computer-executable instructions which, when executed, are used to implement the method described above.

[0015] According to embodiments of the present invention, an original image containing a ruler and a composite filament for 3D printing, captured by an industrial camera, is acquired and processed to obtain a target image. Then, based on the pixel dimensions of the ruler, the pixel dimensions of the composite filament, and the actual dimensions of the ruler in the target image, the actual width of the composite filament is determined. Furthermore, based on the difference between the actual width of the composite filament and a preset dimension, the feeding speed of the composite filament is determined, thereby controlling the 3D printing speed. By controlling the 3D printing speed, real-time control of the composite filament diameter is achieved, resulting in a more uniform diameter of the extruded composite filament. Compared to models printed without real-time diameter control, where the composite filament diameter is uneven, models printed using composite filaments with more uniform diameters have higher quality. Attached Figure Description

[0016] The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0017] Figure 1 A flowchart of a method for controlling 3D printing speed according to an embodiment of the present invention is shown;

[0018] Figure 2 A schematic diagram illustrating the process of processing an original image according to an embodiment of the present invention is shown.

[0019] Figure 3 A schematic diagram of the original image according to an embodiment of the present invention is shown;

[0020] Figure 4 A schematic diagram of a grayscale image according to an embodiment of the present invention is shown;

[0021] Figure 5 A schematic diagram of a filtered image according to an embodiment of the present invention is shown;

[0022] Figure 6 A schematic diagram of a binary edge image according to an embodiment of the present invention is shown;

[0023] Figure 7 A schematic diagram of the filled image according to an embodiment of the present invention is shown;

[0024] Figure 8 A schematic diagram of a binary boundary image according to an embodiment of the present invention is shown;

[0025] Figure 9 A schematic diagram of an inflated image according to an embodiment of the present invention is shown;

[0026] Figure 10 A schematic diagram of a target image according to an embodiment of the present invention is shown;

[0027] Figure 11 A schematic diagram illustrating the determination of the actual dimensions of the width of the composite filament according to an embodiment of the present invention is shown;

[0028] Figure 12 A flowchart illustrating the effect of the actual width of the composite filament on 3D printing speed control according to an embodiment of the present invention is shown.

[0029] Figure 13 A schematic diagram illustrating the practical application process of the 3D printing speed control method according to an embodiment of the present invention is shown.

[0030] Figure 14 An exploded view of a desktop 3D printer according to an embodiment of the present invention is shown. Detailed Implementation

[0031] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0032] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0033] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0034] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0035] In the embodiments of this invention, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.

[0036] In the embodiments of the present invention, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.

[0037] In the research and development stage of 3D printing filaments, especially in scientific research experiments, due to the small amount of filament used, relatively simple filament diameter control devices are often used, resulting in low diameter accuracy of the extruded filaments, which affects the overall quality and performance of the printed parts.

[0038] Most desktop 3D printers can only print using preset fixed speed parameters and cannot dynamically adjust according to real-time printing conditions, such as the complexity of the model and the diameter of the filament.

[0039] Therefore, while desktop filament 3D printing is widely used for printing polymers and their composites, the extruded composite filaments suffer from uneven diameter. This paper proposes a diameter measurement system based on a high-precision industrial camera to measure the diameter of the composite filaments, and a control system based on a RISC (Reduced Instruction Set Computer) microcontroller to regulate the printing speed. Since the filament used is a composite filament, extruded through a single-screw extruder, its diameter has a slight error compared to standard filaments. By accurately measuring the filament diameter with a high-precision diameter measuring instrument, the system can adjust the printing and extrusion speeds to ensure a stable filament supply during printing, thereby avoiding problems such as filament breakage and clogging, and improving print quality.

[0040] Research on the control of desktop 3D printing speed and the design of printing speed control systems not only helps improve the performance of individual 3D printers but also contributes to the development of the entire 3D printing industry. By continuously optimizing printing parameters and strategies, more efficient printing, wider applications, and lower costs can be achieved.

[0041] This invention uses a high-precision industrial camera to measure diameter and a RISC-structured microcontroller to adjust printing speed. It has significant scientific and engineering value for improving the printing quality of polymers and their composites and expanding the application range of 3D printing.

[0042] Figure 1 A flowchart of a method for controlling 3D printing speed according to an embodiment of the present invention is shown.

[0043] like Figure 1 As shown, an embodiment of the present invention provides a method for controlling 3D printing speed, comprising:

[0044] Step S1: Acquire raw images taken by an industrial camera, including the ruler and the composite filament for 3D printing.

[0045] Step S2: Process the original image to obtain the target image.

[0046] like Figure 2 As shown, S2 specifically includes:

[0047] Step S21: Convert the original image to a grayscale image.

[0048] In practical applications, before processing the original image, parameters such as the image threshold are set or adjusted according to the shape and dimensions of the composite filament to be tested. For example, roundness threshold, annotation position adjustment parameters, and scale threshold (adjustment range between 0 and 1) are set. Then, the image of the filament captured by the industrial camera is read using an image reading command. The filament image is as follows: Figure 3 As shown. The code for reading the original image can be:

[0049] % Read the original image

[0050] I=imread('D:\HuaweiMoveData\Users\zhangjie\Desktop\6.jpg');

[0051] figure('Visible','off');

[0052] imshow(I);

[0053] title('Original Image');

[0054] saveas(gcf,fullfile(output_dir,'0_Original.jpg'));

[0055] In the image processing stage, a grayscale conversion operation is performed on the original image. This can be done by calling an image conversion function to convert the input color image to a grayscale image. The purpose of this operation is to combine the red, green, and blue channel values ​​of each pixel in the color image into a single brightness value, facilitating subsequent processing. Afterward, an invisible graphics window can be created, and the grayscale image can be displayed using a display function, with the title "Grayscale Image". Finally, the image in this graphics window is saved as a file named 1_Grayscale.jpg in the specified directory. The grayscale image is as follows: Figure 4 As shown. The program code for grayscale image processing can be:

[0056] % Grayscale conversion

[0057] I_gray = rgb2gray(I);

[0058] figure('Visible','off');

[0059] imshow(I_gray);

[0060] title('Grayscale image');

[0061] saveas(gcf,fullfile(output_dir,'1_Grayscale.jpg'));

[0062] Step S22: Filter the grayscale image to obtain the filtered image.

[0063] In practical applications, calling the Gaussian filter function to perform Gaussian filtering on a grayscale image aims to reduce image noise while preserving as much detail as possible, resulting in a smoother image. Gaussian filtering is a crucial step in image processing. When performing Gaussian filtering, the standard deviation parameter can be set to 1.5, and a 5×5 Gaussian filter can be created using a two-dimensional filter function. This filter can be used to smooth the image and reduce noise interference. Using image processing functions, this filter is applied to the grayscale image by copying boundary pixels, resulting in the filtered image. The filtered image is then displayed in an invisible graphics window, a title containing the sigma value is added, and it is saved as a file named 2_GaussianFiltered.jpg. The filtered image is shown below. Figure 5 As shown. The program code for processing an image using Gaussian filtering can be:

[0064] %Gaussian filter

[0065] sigma = 1.5; % Adjust the Gaussian filter parameters

[0066] gausFilter=fspecial('gaussian',

[55] ,sigma);

[0067] I_filtered=imfilter(I_gray,gausFilter,'replicate');

[0068] figure('Visible','off');

[0069] imshow(I_filtered);

[0070] title(['Gaussian filter(\sigma='num2str(sigma)')']);

[0071] saveas(gcf,fullfile(output_dir,'2_GaussianFiltered.jpg'));

[0072] Step S23: Perform edge detection on the filtered image to obtain a binary edge image.

[0073] In practical applications, edge detection functions are used to identify edge information in images. An edge function is applied to the filtered image, employing a multi-stage edge detection algorithm. The sensitivity of edge detection is controlled by setting high and low thresholds [0.15-0.25], resulting in a binary edge image. This edge image is displayed in an invisible graphics window, titled "Edge Detection," and saved as a file named 3_CannyEdge.jpg. The binary edge image is shown below. Figure 6 As shown. The program code for applying edge detection to the filtered image can be:

[0074] %Canny edge detection

[0075] I_edge = edge(I_filtered, 'Canny', [0.15 0.25]); % Adjust the Canny threshold.

[0076] figure('Visible','off');

[0077] imshow(I_edge);

[0078] title('Canny Edge Detection');

[0079] saveas(gcf,fullfile(output_dir,'3_CannyEdge.jpg'));

[0080] Step S24: Fill the holes in the binary edge image to obtain the filled image.

[0081] In practical applications, the fill command is used to fill holes in binary edge images, the boundary extraction command is used to extract boundaries, and the thresholding command is used to remove the outline area of ​​other parts of the image besides the main subject. The fill function fills internal holes in binary edge images. Its working principle is to detect closed regions (holes) in the image that are not connected to the boundary and fill them with the foreground color. The key parameter 'holes' specifies the fill mode, suitable for repairing holes inside objects. It is typically used to repair internal fractures caused by uneven lighting or noise. The image after filling looks like... Figure 7 As shown. The program code for filling holes in an image can be:

[0082] % Pore filling

[0083] I_filled=imfill(I_edge,'holes');

[0084] figure('Visible','off');

[0085] imshow(I_filled);

[0086] title('hole filling');

[0087] saveas(gcf,fullfile(output_dir,'4_FilledHoles.jpg'));

[0088] Step S25: Extract the boundary of the filled image to obtain a binary boundary image.

[0089] In practical applications, after filling the outline holes, boundary extraction is performed. A binary image boundary processing function is called to extract the object's boundary from `I_filled`. Eight-neighborhood detection is used to determine if a pixel belongs to the boundary. The output features retain only the outermost edge of the object, while the inner regions turn black, providing accurate edge information for subsequent contour analysis and generating a binary boundary image. This boundary image is displayed in an invisible graphics window, titled "Object Boundary," and saved as a file named `5_Boundary.jpg`. The binary boundary image is shown below. Figure 8 As shown. The program code for edge extraction processing of the image can be:

[0090] % Boundary Extraction

[0091] I_boundary=bwperim(I_filled);

[0092] figure('Visible','off');

[0093] imshow(I_boundary);

[0094] title('Object Boundary');

[0095] saveas(gcf,fullfile(output_dir,'5_Boundary.jpg'));

[0096] Step S26: Perform morphological dilation on the binary boundary image to obtain a dilated image.

[0097] In practical applications, after extracting single-pixel boundaries, boundary breaks may occur. To connect these broken boundaries and increase the continuity of the contour, a 3×3 rectangular structuring element is used for morphological dilation. The image is dilated using a dilation function, which not only connects broken boundaries but also increases the edge thickness; here, the edges are expanded to 3 pixels. A rectangular structuring element is chosen because it better preserves edge orientation features compared to a circle. The dilated image is shown below. Figure 9 As shown. The program code for dilating an image can be:

[0098] % expansion treatment

[0099] se=strel('rectangle',

[33] );

[0100] I_dilated=imdilate(I_boundary,se);

[0101] figure('Visible','off');

[0102] imshow(I_dilated);

[0103] title('Inflation Processing');

[0104] saveas(gcf,fullfile(output_dir,'6_Dilated.jpg'));

[0105] Step S27: Denoise the dilated image to obtain the target image.

[0106] In practical applications, dilated images may still contain some small noise areas or small fragments. To preserve the main object, these small regions need to be filtered (removed). Finally, the small region removal operation is performed to achieve noise reduction. The region removal function is used to process the dilated image I_dilated, removing small regions with an area less than 1000 pixels, resulting in the denoised image I_cleaned. This image is displayed in an invisible graphics window, captioned "Denoising Image," and saved as a file named 7_Cleaned.jpg. The target image is shown below. Figure 10 As shown.

[0107] % Remove small areas

[0108] I_cleaned = bwareaopen(I_dilated, 1000); % Adjust the area threshold for removing small regions.

[0109] figure('Visible','off');

[0110] imshow(I_cleaned);

[0111] title('Denoising Image');

[0112] saveas(gcf,fullfile(output_dir,'7_Cleaned.jpg'));

[0113] Step S2 processes the original image to obtain a noise-removed object boundary image, providing a clearer and more accurate foundation for subsequent image analysis and processing. Finally, based on the size calculation code and auxiliary code, the final image size is calculated and output.

[0114] Starting with a binary edge image, internal holes are first filled, then single-pixel boundaries are extracted, followed by edge dilation and connection. Finally, small objects are filtered out to obtain a clear, complete, and noise-removed image. The ruler recognition code identifies a 20mm long and 5mm wide ruler from the processed image, such as... Figure 11 As shown in the rectangle at the top left, the actual size of the wire within the target area is calculated based on the proportional relationship between the set size of the ruler and the pixel size it occupies in the image. Figure 11 As shown in the lower right of the image. Due to the rough surface and uneven diameter of the filament, and because it has been in a bent state for a long time, this code divides the entire filament into two parts for measurement, takes the average value, and outputs the size information.

[0115] Step S3: Determine the actual width of the composite filament based on the pixel dimensions of the ruler in the target image, the pixel dimensions of the composite filament, and the actual dimensions of the ruler.

[0116] S3 specifically includes:

[0117] Step S31: Divide the pixel size of the composite filament into a preset number of segments along the length of the composite filament to obtain the pixel size of each segment of the composite filament.

[0118] In practical applications, the preset number of segments can be 10, or it can be related to the pixel size of the composite filament in the length direction. For example, the preset number of segments is equal to the ratio of the pixel size of the composite filament in the length direction to 10 and rounded down. The preset number of segments can be determined according to the actual situation.

[0119] Step S32: Determine the pixel size of each composite filament in the width direction based on the pixel size of each composite filament segment.

[0120] In practical applications, the length and width of each composite filament segment can be determined based on its pixel dimensions. Since this invention requires determining the diameter of the composite filament, only the pixel dimensions of the composite filament in the width direction need to be extracted.

[0121] Step S33: Obtain the ratio value based on the ratio of the pixel size of each composite filament segment in the width direction to the pixel size of the scale in the width direction.

[0122] Step S34: Determine the actual width of each section of composite filament based on the scale value and the actual dimensions of the ruler.

[0123] Step S35: Determine the actual width of the composite filament based on the actual width of each segment of the composite filament.

[0124] In practical applications, the actual width of the composite filament is calculated by averaging the actual dimensions of the composite filament across a preset number of segments.

[0125] When the preset number of segments equals the pixel size of the composite filament in the length direction, the average of the actual width of the composite filament with the preset number of segments can be applied to the pixel width size corresponding to each pixel in the length direction, thus obtaining a more accurate actual width size of the composite filament.

[0126] S35 includes:

[0127] Step S351: Add up the actual dimensions of the width of each composite filament segment to obtain the total width of the composite filament segment with a preset number of segments.

[0128] Step S352: Divide the total width by the preset number of segments to obtain the actual width of the composite wire.

[0129] Step S4: Determine the feeding speed of the composite filament based on the difference between the actual width and the preset width of the composite filament, thereby controlling the 3D printing speed.

[0130] S4 specifically includes:

[0131] Step S41: Obtain the initial feeding speed of the composite filament under the current conditions.

[0132] Step S42: When the difference is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, the feeding speed of the composite filament is the initial feeding speed.

[0133] In practical applications, the first preset threshold is less than the second preset threshold; the absolute values ​​of the first and second preset thresholds can be equal. In summary, the first preset threshold can be -b, and the second preset threshold can be b. In this invention, b is 0.05. The first and second preset thresholds can be set as needed.

[0134] Step S43: If the difference is less than the first preset threshold or the difference is greater than the second preset threshold, determine the feeding speed of the composite filament according to the difference and the initial feeding speed, and in accordance with the preset speed adjustment rules.

[0135] S43 specifically includes:

[0136] Step S431: If the difference is less than the first preset threshold, the percentage increase in speed is obtained based on the ratio of the difference to the first preset threshold, and the feeding speed of the composite filament is determined based on the initial feeding speed and the percentage increase in speed.

[0137] Step S432: If the difference is greater than the second preset threshold, the percentage reduction in speed is obtained based on the ratio of the difference to the second preset threshold, and the feeding speed of the composite filament is determined based on the initial feeding speed and the percentage reduction in speed.

[0138] like Figure 13 As shown, firstly, the industrial camera feeds back diameter image data to the controller, which can be a DSP, microcontroller, CPU, etc., such as the TMS320F280025 development board. Then, the raw image is processed, and the processed image is sent to the desktop 3D printer's mainboard. Next, the feed stepper motor's speed is adjusted according to a pre-set speed range based on the diameter feedback motor speed code. Finally, the motor feed speed is adjusted according to the change in filament diameter to achieve high-quality printing and allow for evaluation of print quality.

[0139] like Figure 12 As shown, the 3D printer receives the filament diameter X from the image captured by the industrial camera from the TMS320F280025 development board. It uses the formula 1.75 - X = Z to obtain the difference in composite filament diameters and imports it into the function -0.05a < Z < 0.05a, where a ∈ N+ and a ≠ 0. When a = 1, it checks if the range of Z is -0.05 < Z < 0.05. If the range of Z does not satisfy -0.05 < Z < 0.05, the value of a increases by 1, and it checks if the range of Z satisfies Z < -0.05a. If the range of Z does not satisfy Z < -0.05a, for every increase of 1 in the value of a, the feed motor speed decreases by 10%. If the range of Z satisfies Z < -0.05a, for every increase of 1 in the value of a, the feed motor speed increases by 10%. When the value of Z is within the range of -0.05 < Z < 0.05, the feed motor speed remains unchanged. The 3D printer motherboard printing speed control code can be:

[0140] %Assume the input wire diameter X (this can be replaced with the actual input value in practice).

[0141] X = 1.65; % Example value, representing wire diameter Z = 1.75 - X; % Calculate wire deviation

[0142] a = 1;

[0143] speed = 1; % Assuming the initial speed of the feed motor is 1 (unit customizable)

[0144] % Handling the case where a=1

[0145] if-0.05*a <Z&&Z<0.05*a

[0146] disp('Feed motor speed remains constant');

[0147] else

[0148] % Handling cases where a>1

[0149] while true

[0150] a = a + 1;

[0151] if Z < -0.05*a

[0152] speed = speed * 1.1; % Increase speed by 10%

[0153] fprintf('a=%d, feed motor speed increased by 10%%\n',a);

[0154] else

[0155] speed = speed * 0.9; % Speed ​​decreases by 10%

[0156] fprintf('a=%d, feed motor speed decreased by 10%%\n',a);

[0157] end

[0158] break; % According to the flowchart logic, exit the loop after completing one increment of 'a'.

[0159] end

[0160] end

[0161] disp('Start printing');

[0162] disp('End');

[0163] like Figure 14As shown, the base bracket 1 is made of aluminum alloy and is fixed to the 3D printer shell by bolts. The base 2 is fixed on the base bracket 1. The base 2 has a hole through which the tensioning base fixing bolt 4 passes. The tensioning base fixing nut 3 and the tensioning base fixing bolt 4 work together to fix the tensioning base 7 on the base 2. The tensioning base 7 also has a fixed axis end cap 5 and grooved wheels 6 fixed on it. The grooved wheels 6 are two grooved wheels responsible for tightening the wire. The industrial camera mounting post 8 is connected to the base 2 by a threaded connection. The light source 11 is fixed by fastening bolts 9 and fastening nuts 13. The tail of the light source 11 is designed to be flexible, which can be fastened by bolts and nuts, making it easy to adjust the position of the light source. The industrial camera host 12 passes through the industrial camera clamp 13 and is connected to the camera lens 14. The industrial camera host 12 and the camera lens 14 are connected by threads. The feeding motor 15 of the 3D printer is set inside the feeding housing 16. The grooved wheel 17, the feeding gear 18, and the feeding motor 15 cooperate to achieve the purpose of feeding. The composite filament 19 is conveyed to the shooting range of the camera lens 14.

[0164] The composite filament is conveyed by a feeding motor, and through the cooperation of feeding gears and grooved wheels, the composite filament is conveyed to the shooting range of the camera lens, and the industrial camera acquires the original image of the composite filament.

[0165] Using single-screw extruders to extrude polymers and their composites for printing is common in the current market, but the printing quality is inferior to that of standard filaments. This invention provides a method that utilizes a special optical imaging system to obtain the filament diameter value in real time and accurately through real-time calculation of the composite filament diameter data and a high-precision measurement device structure. This allows for the timely detection of subtle diameter deviations, thereby improving the quality of composite filament 3D printing.

[0166] Example 2

[0167] The present invention also provides a 3D printing speed control device, comprising: an image acquisition module, an image processing module, a width determination module, and a speed adjustment module.

[0168] The image acquisition module is used to acquire raw images taken by an industrial camera, including a scale and the composite filament used for 3D printing.

[0169] The image processing module is used to process the original image to obtain the target image.

[0170] The width determination module is used to determine the actual width of the composite filament based on the pixel size of the ruler in the target image, the pixel size of the composite filament, and the actual size of the ruler.

[0171] The speed adjustment module is used to determine the feeding speed of the composite filament based on the difference between the actual width of the composite filament and the preset width, thereby controlling the 3D printing speed.

[0172] Example 3

[0173] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the 3D printing speed control method of Embodiment 1.

[0174] Example 4

[0175] A computer program product includes a computer program that, when executed by a processor, implements the 3D printing speed control method of Embodiment 1.

[0176] Example 5

[0177] A computer device, which may be a database, may have an internal structure diagram as shown below. Figure 2 As shown, the computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores pending transactions. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the 3D printing speed control method described in Embodiment 1.

[0178] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0179] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided by this invention may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided by this invention may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0180] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0181] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for controlling 3D printing speed, characterized in that, The control method includes: Acquire raw images taken by an industrial camera, including a ruler and the composite filament used for 3D printing; The original image is processed to obtain the target image; The actual width of the composite filament is determined based on the pixel dimensions of the scale in the target image, the pixel dimensions of the composite filament, and the actual dimensions of the scale. The feeding speed of the composite filament is determined based on the difference between the actual width and the preset width, thereby controlling the 3D printing speed.

2. The method for controlling 3D printing speed according to claim 1, characterized in that, The process of processing the original image to obtain the target image includes: Convert the original image to a grayscale image; The grayscale image is filtered to obtain the filtered image; Edge detection is performed on the filtered image to obtain a binary edge image; The holes in the binary edge image are filled to obtain the filled image; Extract the boundaries of the filled image to obtain a binary boundary image; The binary boundary image is subjected to morphological dilation to obtain a dilated image; The dilated image is then denoised to obtain the target image.

3. The method for controlling 3D printing speed according to claim 1, characterized in that, The feeding speed of the composite filament is determined based on the difference between the actual width and the preset width, including: Obtain the initial feeding speed of the composite filament under the current conditions; When the difference is greater than or equal to a first preset threshold and less than or equal to a second preset threshold, the feeding speed of the composite filament is the initial feeding speed. If the difference is less than the first preset threshold or the difference is greater than the second preset threshold, the feeding speed of the composite filament is determined according to the difference and the initial feeding speed, and in accordance with the preset speed adjustment rules.

4. The method for controlling 3D printing speed according to claim 1, characterized in that, Based on the pixel dimensions of the scale in the target image, the pixel dimensions of the composite filament, and the actual dimensions of the scale, the actual dimensions of the width of the composite filament are determined, including: The pixel size of the composite filament is divided into a preset number of segments along the length of the composite filament to obtain the pixel size of each segment of the composite filament. Based on the pixel size of each composite filament segment, determine the pixel size of each composite filament segment in the width direction; The ratio value is obtained by comparing the pixel size of each composite filament segment in the width direction with the pixel size of the scale in the width direction. Based on the stated ratio and the actual dimensions of the scale, determine the actual width of each section of composite filament. The actual width of the composite filament is determined based on the actual dimensions of the width of each segment of the composite filament.

5. The method for controlling 3D printing speed according to claim 4, characterized in that, Determining the actual width of the composite filament based on the actual width of each segment of the composite filament includes: The actual dimensions of the width of each segment of the composite filament are added together to obtain the total width of the preset number of composite filament segments; Divide the total width by the preset number of segments to obtain the actual width of the composite filament.

6. The method for controlling 3D printing speed according to claim 1, characterized in that, When the difference is less than the first preset threshold or the difference is greater than the second preset threshold, the feeding speed of the composite filament is determined according to the difference and the initial feeding speed, following a preset speed adjustment rule, including: If the difference is less than the first preset threshold, the percentage increase in speed is obtained based on the ratio of the difference to the first preset threshold, and the feeding speed of the composite filament is determined based on the initial feeding speed and the percentage increase in speed. If the difference is greater than the second preset threshold, the percentage reduction in speed is obtained based on the ratio of the difference to the second preset threshold, and the feeding speed of the composite filament is determined based on the initial feeding speed and the percentage reduction in speed.

7. A 3D printing speed control device, characterized in that, The control device includes: The image acquisition module is used to acquire raw images taken by an industrial camera, including a scale and composite filament material for 3D printing; An image processing module is used to process the original image to obtain a target image; The width determination module is used to determine the actual width of the composite filament based on the pixel size of the scale in the target image, the pixel size of the composite filament, and the actual size of the scale. The speed adjustment module is used to determine the feeding speed of the composite filament based on the difference between the actual size and the preset size of the width of the composite filament, thereby controlling the 3D printing speed.

8. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-6.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of any one of claims 1-6.

10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.