3D printer remote control method and system based on image tracking technology
Through the remote control system of 3D printers based on image tracking technology, the printing layer quality is monitored in real time and the parameters are automatically adjusted, which solves the problem that existing systems are difficult to monitor and flexibly adjust printing parameters in real time, and achieves efficient and accurate printing quality control and remote management.
Patent Information
- Application Number
- CN202411938708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The existing 3D printer monitoring system is difficult to accurately monitor the quality of the printing layer in real time, cannot detect and correct quality problems in a timely manner, and lacks flexibility in printing parameters and convenience of remote operation during jewelry manufacturing.
The 3D printer remote control system based on image tracking technology is adopted to determine the printing quality score through image tracking technology, and combine the printing environment hazard coefficients, and use the genetic PID control algorithm to adjust the printer control parameters to achieve automatic adjustment and remote control.
Real-time monitoring of the quality of the printing layer, automatic adjustment of printing parameters, reduce the need for manual intervention, improve the consistency of print quality and the convenience of remote management.
Smart Images

Figure CN119356632B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 3D printing, and in particular to a remote control method and system for a 3D printer based on image tracking technology. Background Art
[0002] With the development of 3D printing technology, its application in the jewelry manufacturing industry is becoming more and more extensive. 3D printing technology can not only improve production efficiency, but also realize personalized customization to meet the diverse needs of consumers. However, in the jewelry manufacturing process, 3D printing faces a series of challenges, especially in terms of quality control, process parameter adjustment and remote management.
[0003] Most 3D printers on the market still require manual intervention, such as regular checks on print quality and adjustments to print parameters. In addition, jewelry manufacturing often requires a high degree of precision and consistency, which places higher demands on the 3D printing process. Traditional monitoring methods cannot meet the requirements of jewelry manufacturing for precision and consistency, especially in terms of remote management and control.
[0004] For example, the existing Chinese patent with authorization announcement number CN104647756B discloses a control system for a 3D printer, which uses a host computer control terminal to receive touch commands input by a user, and converts the touch commands into corresponding operation codes, and generates control commands based on the operation codes, and sends the control commands to a central controller through a wireless network, and the control commands are used to control the operation of the central controller; the central controller receives the control commands sent by the host computer control terminal, parses the control commands to generate corresponding control codes, and sends the control codes to the main control board of the 3D printer so that the main control board controls the operation of the 3D printer; the central controller is connected to the control board of the 3D printer by wire or wireless means, and the control software is started through the host computer control terminal to control the 3D printer to complete tasks such as file printing and management, temperature setting and monitoring, etc., and multiple host computer control terminals can be connected to the 3D printer at the same time, and the normal operation of the 3D printer is not affected during the switching process, and the real-time performance is good.
[0005] However, when multiple host computer control terminals are simultaneously connected to the same 3D printer in the above document, if the software interface of the host computer control terminal is unfriendly or the operation is complicated and the management mechanism is poor, the user's training cost and learning curve may be increased; and jewelry manufacturing has extremely high requirements for printing quality, and the existing 3D printer monitoring system is often difficult to accurately monitor the quality of the printed layer in real time, and cannot timely discover and correct quality problems; in the jewelry manufacturing process, different materials and designs require different printing parameters; the existing system is often not flexible enough when adjusting the printing parameters, especially for remote operation. For this reason, the present invention provides a 3D printer remote control method and system based on image tracking technology. Summary of the invention
[0006] The purpose of the present invention is to provide a 3D printer remote control method and system based on image tracking technology to solve the existing problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: a 3D printer remote control system based on image tracking technology, comprising:
[0008] A print quality determination module, used to set a print quality monitoring strategy, determine the difference between the first image currently printed and the second image printed at the previous moment through image tracking technology, and determine whether the print quality score is less than or equal to the print quality score standard value according to the difference. If not, the system will continue to print according to the original instructions. If so, run the environment detection module;
[0009] The environmental detection module obtains the printing environment risk factor by real-time monitoring of the humidity and temperature of the printing environment and the stability of the printing platform;
[0010] The control module is used to set a printing genetic PID control algorithm, take the printing quality score and the printing environment risk factor as input, and output printer control parameters.
[0011] The comparing the difference between the first image and the stitched image includes:
[0012] Determining a boundary line between the difference partial image in the stitched image and the second image;
[0013] Taking the boundary line as the center, each point on the boundary line is moved forward N pixels and backward M pixels in a direction perpendicular to the boundary line, and then the pixel point on the boundary line, the corresponding pixel point moved forward N pixels, and the corresponding pixel point moved backward M pixels form a linear pixel vector, thereby obtaining a linear pixel vector corresponding to each pixel point on the boundary line;
[0014] According to each linear pixel vector, determine the pixel value change trend of the first N pixel positions of each linear pixel vector, the pixel value change trend of the last M pixel positions, and the fitting change trend of all pixel positions;
[0015] The pixel value change trends of the first N pixels of each linear pixel vector and the pixel value change trends of the last M pixels are spliced into a complete change trend, and each complete change trend is compared with the corresponding fitting change trend to calculate the corresponding difference.
[0016] Compare each complete change trend with the corresponding fitted change trend and calculate the corresponding difference, including:
[0017] Each complete change trend is overlapped with the corresponding fitted change trend, and the number and area of non-overlapping regions are weighted to obtain the difference degree; where the difference degree = q1 × number of non-overlapping regions + (1 / q2) × maximum area non-overlapping region + q3 × minimum area non-overlapping region, where q1 + q2 + q3 = 1.
[0018] The present invention is further improved in that the printing genetic PID control algorithm comprises the following specific steps:
[0019] Step 1: K p , K i , K d As the optimization parameter, calculate the printer control quality error at the current moment , the calculation formula is , and represents the weight adjustment parameter, peh represents the printing environment risk factor, Indicates the set printer control quality error standard value and calculates the environment-quality error , Indicates the standard value of print quality score. represents the print quality score, t represents the number of iterations at this time; and Fuzzy processing is performed to obtain the fuzzy printer control quality error deviation and fuzzy environment-quality error bias ;
[0020] Step 2: Establish the initial population, using real number coding, including controlling the number of withdrawals, printing speed, ambient temperature and ambient humidity;
[0021] Step 3: Control quality error deviation based on print quality score, print environment risk factor and fuzzy printer and fuzzy environment-quality error bias Construct fitness function F;
[0022] Step 4: Select the individual with the highest fitness in the population and keep it for the next generation. Suppose the population size is N, then the fitness of a certain individual in the population is The probability of an individual being selected is ;
[0023] Step 5: Set the crossover probability Pov, and generate a new printer control parameter individual according to the crossover probability;
[0024] Step 6: Repeat steps 2 to 4, and calculate the fitness of the new printer control parameter individual;
[0025] Step 7: When the print quality score of the new printer control parameter individual is less than or equal to the print quality score standard value, stop iteration and output the printer control parameter at this time.
[0026] The present invention is further improved in that the fitness function includes setting a maximum value Tpeh of the printing environment risk factor. When the printing environment risk factor is greater than the maximum value Tpeh of the printing environment risk factor, the fitness function is directly calculated according to the printing quality score. When the printing environment risk factor is less than or equal to the maximum value Tpeh of the printing environment risk factor, the fitness function is calculated by combining the printing environment risk factor and the printing quality score. First, the printer control objective function is defined as follows:
[0027]
[0028] in, , and Represents the weight of PID, fitness function .
[0029] The present invention is further improved in that the crossover probability Pov is obtained by obtaining a fitness change threshold through the initial crossover probability Pov(0), the print quality score and the print environment risk factor; when the print quality score is less than or equal to the print quality score standard value, the crossover probability is updated, and the update formula is: When the print quality score is greater than the print quality score standard value, determine whether the fitness of the control parameter in the genetic process is less than the fitness change threshold for three consecutive times. If it is judged to be yes, the crossover probability is increased by 30 times. If it is judged to be no, Pov(0) is returned.
[0030] A further improvement of the present invention is that the print quality determination module specifically performs the following steps:
[0031] Acquire a first image printed at the current moment and a second image printed at the previous moment by using an image tracking technology;
[0032] Aligning the first image and the second image by image coordinates, and cropping a difference portion between the first image and the second image to obtain a difference portion image;
[0033] splicing the difference partial image to the first image to obtain a spliced image;
[0034] comparing the difference between the first image and the stitched image, and calculating the print quality score according to the difference;
[0035] It is determined whether the print quality score is less than or equal to a print quality score standard value.
[0036] A further improvement of the present invention is that the printing quality monitoring strategy includes collecting a cross-sectional image of a printed object during the operation of the 3D printer, and extracting a cross-sectional division diagram of the printed object in the cross-sectional image of the printed object through a canny edge detection algorithm; setting a cross-sectional defect extraction algorithm to extract defective areas in the cross-sectional division diagram of the printed object; and converting the defect areas of all defective areas into a printing quality score by extracting the defect areas.
[0037] A further improvement of the present invention is that the cross-sectional defect extraction algorithm is implemented through the findContours function. Starting from each pixel point of the image, when encountering a pixel representing the edge of an object, that is, when the pixel value difference with the surrounding pixels is greater than the pixel difference standard value, the algorithm takes the pixel point as the starting point and tracks along the continuous edge pixels to form a closed contour line, thereby obtaining a printed object cross-sectional defect data set.
[0038] A further improvement of the present invention is that the cross-sectional defect extraction algorithm further includes a deep cross-sectional defect detection algorithm, by which the deep cross-sectional defect detection algorithm extracts the deep defect contours of all defects in the cross-sectional defect data set of the printed object, and the deep cross-sectional defect detection algorithm introduces a snake method to design an energy functional:
[0039]
[0040] Among them, ou represents the outline of the defect, Vertices, represents the weight of curvature, represents the weight of the length, Indicates the number of vertices whose pixel distance to the largest defect edge is less than the set pixel difference threshold The proportion of the total number of vertices, that is, ; Represents the gradient function of the image inside the defect.
[0041] A further improvement of the present invention is that the defect area is extracted by the contourArea function, and the actual area of the defect contour is calculated according to the pixel points of the contour and then normalized. The calculation formula of the print quality score is: , where Sar represents the defect area after standardized processing.
[0042] A further improvement of the present invention is that the environmental detection module further performs the following specific steps: collecting temperature and humidity data during the printing process in the 3D printer; substituting the collected temperature data into the printing environment temperature state calculation strategy to calculate the printing environment temperature state value; substituting the collected humidity data into the printing environment humidity state calculation strategy to calculate the printing environment humidity state value; obtaining the platform vibration threat value by acquiring the platform vibration condition in the printer; substituting the temperature state value, humidity state value and platform vibration threat value into the printing environment hazard factor calculation strategy to calculate the printing environment hazard factor, and inputting the printing environment hazard factor into the control module.
[0043] The present application further provides a 3D printer remote control method based on image tracking technology, which is implemented by the 3D printer remote control system based on image tracking technology as described above. The 3D printer remote control method includes:
[0044] The print quality monitoring strategy is set by the print quality determination module, and the difference image between the first image printed at the current moment and the second image printed at the previous moment is determined by the image tracking technology, and whether the print quality score is less than or equal to the print quality score standard value is determined according to the difference image. If not, the system will continue to print according to the original instruction, and if so, the environment detection module is run;
[0045] The environment detection module monitors the humidity and temperature of the printing environment and the stability of the printing platform in real time to obtain the printing environment risk factor;
[0046] The printing genetic PID control algorithm is set through the control module, the printing quality score and the printing environment risk factor are used as input, and the printer control parameters are output.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention firstly monitors the surface quality of the printed layer in real time through the print quality determination module, and evaluates the print quality score according to the image analysis result. When the print quality score exceeds the predetermined standard, the system automatically initiates the corresponding adjustment measures, thus reducing the need for manual inspection and intervention.
[0049] In addition, the present invention determines the difference partial image between the first image printed at the current moment and the second image printed at the previous moment through image tracking technology, and determines whether the print quality score is less than or equal to the print quality score standard value based on the difference partial image, thereby providing a new method for determining the print quality score. In addition, the previous and next captured frame images are directly compared to measure the print quality through the difference degree. In this way, the next frame data can be timely verified through the previous frame data. On the one hand, it is faster, and on the other hand, based on the printing continuity of the printed product, the quality determination is more accurate.
[0050] Furthermore, the crossover probability is adjusted more intelligently according to the print quality score of the printed cross section during the printing process, which enhances the overall search range of the algorithm, thereby improving the efficiency and effectiveness of the PID control algorithm as a whole. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a framework diagram of a 3D printer remote control system based on image tracking technology of the present invention;
[0052] Figure 2 This is a flow chart of a 3D printer remote control method based on image tracking technology of the present invention;
[0053] Figure 3 Printing genetic PID control algorithm flow chart for the 3D printer remote control method based on image tracking technology of the present invention;
[0054] Figure 4 It is a flow chart of the printing quality monitoring strategy of the 3D printer remote control method based on the image tracking technology of the present invention;
[0055] Figure 5 A schematic diagram of a scene of a 3D printer remote control system of the present invention;
[0056] Figure 6 A schematic diagram showing a first image and a second image of the present invention;
[0057] Figure 7 Schematic diagram of the analysis process of the change trend of the present invention.
[0058] Reference numerals:
[0059] 1. Printer body; 2. Printing product; 3. Print head; 4. Camera;
[0060] 50. First image; 51. Second image; 52. Difference image. DETAILED DESCRIPTION
[0061] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. The embodiments of the present invention and the technical features in the embodiments may be combined with each other unless there is a conflict.
[0062] The term "and / or" is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " generally indicates that the related objects are in an "or" relationship.
[0063] Example 1
[0064] Figure 1 The framework diagram of the 3D printer remote control system based on image tracking technology disclosed in this embodiment is shown. Figure 2 The flowchart of the 3D printer remote control method based on image tracking technology disclosed in this embodiment is shown, including:
[0065] A print quality determination module, used to set a print quality monitoring strategy, determine the difference between the first image currently printed and the second image printed at the previous moment through image tracking technology, and determine whether the print quality score is less than or equal to the print quality score standard value according to the difference. If not, the system will continue to print according to the original instructions. If so, run the environment detection module;
[0066] The environmental detection module obtains the printing environment risk factor by real-time monitoring of the humidity and temperature of the printing environment and the stability of the printing platform;
[0067] The control module is used to set a printing genetic PID control algorithm, take the printing quality score and the printing environment risk factor as input, and output printer control parameters.
[0068] The present invention firstly monitors the surface quality of the printed layer in real time through the print quality determination module, and evaluates the print quality score according to the image analysis result. When the print quality score exceeds the predetermined standard, the system automatically initiates the corresponding adjustment measures, thus reducing the need for manual inspection and intervention.
[0069] In addition, the present invention determines the difference partial image between the first image printed at the current moment and the second image printed at the previous moment through image tracking technology, and determines whether the print quality score is less than or equal to the print quality score standard value based on the difference partial image, thereby providing a new method for determining the print quality score. In addition, the previous and next captured frame images are directly compared to measure the print quality through the difference degree. In this way, the next frame data can be timely verified through the previous frame data. On the one hand, it is faster, and on the other hand, based on the printing continuity of the printed product, the quality determination is more accurate.
[0070] See below Figure 5 The printing scenario shown is as follows Figure 5 As shown, the present application can configure the camera above the printer, so as to collect image data of the product printed by the 3D printer. Specifically, the printed product 2 can be printed on the printer body 1, and the print head 3 prints on the printer body 1 to form the printed product 2. This process is gradual. The camera 4 is configured at a position with a better field of view above the print head 3, so that the printed product 2 being printed can be directly photographed.
[0071] In the embodiment of the present application, the present invention is further improved in that the print quality determination module specifically performs the following steps:
[0072] Acquire a first image printed at the current moment and a second image printed at the previous moment by using an image tracking technology;
[0073] Aligning the first image and the second image by image coordinates, and cropping a difference portion between the first image and the second image to obtain a difference portion image;
[0074] splicing the difference partial image to the first image to obtain a spliced image;
[0075] comparing the difference between the first image and the stitched image, and calculating the print quality score according to the difference;
[0076] It is determined whether the print quality score is less than or equal to a print quality score standard value.
[0077] See also Figure 6 As shown, the first image of the present application is 50 (i.e., 51+52), the second image is 51, and the difference image is 52. The first image 50 is the image captured by the current frame, and the second image 51 is the image captured by the previous frame. Since there is a time difference between the current frame and the previous frame, the difference image 52 is the part printed within the time difference. In the specific processing, since the camera 4 will not directly capture the difference image, the present application "cuts out" the difference image by means of coordinate alignment.
[0078] Furthermore, the embodiment of the present application provides a new method for calculating the difference. Specifically, the comparing the difference between the first image and the stitched image includes:
[0079] Determining a boundary line between the difference partial image in the stitched image and the second image;
[0080] Taking the boundary line as the center, each point on the boundary line is moved forward N pixels and backward M pixels in a direction perpendicular to the boundary line, and then the pixel point on the boundary line, the corresponding pixel point moved forward N pixels, and the corresponding pixel point moved backward M pixels form a linear pixel vector, thereby obtaining a linear pixel vector corresponding to each pixel point on the boundary line;
[0081] According to each linear pixel vector, determine the pixel value change trend of the first N pixel positions of each linear pixel vector, the pixel value change trend of the last M pixel positions, and the fitting change trend of all pixel positions;
[0082] The pixel value change trends of the first N pixels of each linear pixel vector and the pixel value change trends of the last M pixels are spliced into a complete change trend, and each complete change trend is compared with the corresponding fitting change trend to calculate the corresponding difference.
[0083] This application cleverly combines the characteristics of the printing process of printed products as a continuous process, calculates the trend difference changes along the printing direction, and thus obtains the difference degree corresponding to the difference part image, and cleverly finds the most appropriate comparison object, so as to determine the difference degree more accurately.
[0084] Specifically, Figure 7 As shown, the dotted box in the middle represents the pixel position on the boundary line between the first image and the second image. In this way, the pixel position can be advanced forward by N bits and advanced backward by M bits. Figure 7 It can be seen that the pixel bits that are pushed forward N bits are all configured on the first image, and the pixel bits that are pushed backward M bits are all configured on the second image. This can expand the change trend of the difference part of the image and improve the accuracy of quality analysis. Compared with direct comparison, the present application cleverly expands the change trend by searching the pixel bits forward and backward, avoiding the problem of unclear feature differences due to the short time interval between the two acquisition frames.
[0085] In addition, further, in the embodiment of the present application, each complete change trend is compared with the corresponding fitting change trend, and the corresponding difference degree is calculated, including:
[0086] Each complete change trend is overlapped with the corresponding fitted change trend, and the number and area of non-overlapping regions are weighted to obtain the difference degree; where the difference degree = q1 × number of non-overlapping regions + (1 / q2) × maximum area non-overlapping region + q3 × minimum area non-overlapping region, where q1 + q2 + q3 = 1.
[0087] The embodiment of the present application provides a new method for calculating the difference degree. Specifically, the fitting change trend can be performed by a conventional fitting method, which is not limited in the present application, such as interpolation method, etc. After obtaining the fitting change trend, the forward change trend and the backward change trend are spliced to form a complete change trend, and then overlapped with the fitting change trend. Since there are differences after the overlap, non-overlapping areas will inevitably be formed. The number and size of the non-overlapping areas are used to measure the difference degree. Specifically, the number of non-overlapping areas and the minimum area have relatively small weight effects, while the weight of the maximum area of the non-overlapping area has the largest weight effect. In this way, the present application configures q1+(1 / q2)+ q3, and q1+q2+ q3=1, which inevitably leads to the weight of the maximum area of the non-overlapping area being greater than 1, which forms a large difference in weight with q1 and q2, and is particularly suitable for the difference degree calculation system of the present application.
[0088] Furthermore, the present application is based on the difference degree. If the difference degree is smaller, the corresponding print quality score is higher. If the difference degree is larger, the corresponding print quality score is lower. Thus, the size of the quality score can be obtained through a negative correlation function. For example, y=L / x. The present application does not impose any restrictions on this.
[0089] After obtaining the quality score, if the quality score is less than or equal to the standard value of the quality score, quality improvement needs to be performed. Specifically, the quality improvement of this application is as follows: Figure 3 As shown, Figure 3 The flow chart of printing genetic PID control algorithm of the 3D printer remote control method based on image tracking technology disclosed in this embodiment is shown, and the printing genetic PID algorithm includes the following specific steps:
[0090] Step 1: K p , K i , K d As the optimization parameter, in the fuzzy PID controller, the parameter that affects the control effect is K p , K i , Kd, so these three parameters are used as optimization parameters;
[0091] Calculate the printer control quality error at the current moment , the calculation formula is , and represents the weight adjustment parameter, peh represents the printing environment risk factor, Indicates the set printer control quality error standard value and calculates the environment-quality error , Indicates the standard value of print quality score. represents the print quality score, t represents the number of iterations at this time; and Fuzzy processing is performed to obtain the fuzzy printer control quality error deviation and fuzzy environment-quality error bias ;
[0092] Step 2: Establish the initial population, use real number coding, and the fuzzy rule output corresponding to 1-7 , , The fuzzy language includes controlling the number of withdrawals, printing speed, ambient temperature and ambient humidity;
[0093] Step 3: Control quality error deviation based on print quality score, print environment risk factor and fuzzy printer and fuzzy environment-quality error bias Construct fitness function F;
[0094] The fitness function includes setting the maximum value Tpeh of the printing environment risk factor. When the printing environment risk factor is greater than the maximum value Tpeh, the fitness function is directly calculated according to the print quality score. When the printing environment risk factor is less than or equal to the maximum value Tpeh, the fitness function is calculated by combining the print environment risk factor and the print quality score. First, the printer control objective function is defined as follows:
[0095]
[0096] in, , and It represents the weight of PID. The individual fitness is obtained through the printer control objective function. From the above formula, we can see that the larger the error, the larger the objective function value obf. Therefore, the control parameter individual with the smallest obf is the optimal control parameter individual. Then the fitness function .
[0097] Step 4: Select the individual with the highest fitness in the population and keep it for the next generation. Suppose the population size is N, then the fitness of a certain individual in the population is The probability of an individual being selected is ;
[0098] Step 5: Set the crossover probability Pov, and generate new printer control parameter individuals according to the crossover probability; in the genetic algorithm, good genes are easily destroyed due to crossover and mutation, and the genetic algorithm is also prone to premature maturation. The specific manifestation of premature maturation is: set the fitness change threshold. When the fitness difference between two consecutive fitness values of the individual control parameter is less than the fitness change threshold for three consecutive times, that is, the new fitness value minus the previous fitness value is less than the fitness change threshold for three consecutive times, it is judged as premature. Therefore, it is necessary to set the crossover probability to jump out of the local optimal solution during the search process, which is specifically manifested as:
[0099] Set the initial crossover probability Pov(0). When the print quality score is less than or equal to the standard value of the print quality score, it indicates that the control parameter has a good tolerance for the printing environment, that is, it has a high tolerance for the optimal solution. At this time, the crossover probability can be reduced by the printing environment risk factor so that the control parameter jumps out of the local optimal solution. The updated crossover probability calculation formula is: ;
[0100] On the contrary, when the print quality score is greater than the standard value of the print quality score, it indicates that the control parameter has poor tolerance for the printing environment, that is, the tolerance for the optimal solution is low. At this time, in order to avoid the individual falling into the local optimal solution, the crossover probability should be greatly increased to determine whether the control parameter has premature phenomenon in the genetic process. If so, the crossover probability is increased by 30 times. If not, Pov(0) is returned.
[0101] The present application can more intelligently decide when to perform more frequent crossovers and adaptively adjust the crossover probability based on the print quality score of the printed cross section during the printing process; break the inherent pattern of the population, prompt the algorithm to explore new solution spaces, and avoid the algorithm from stagnating at a local optimal solution too early, so as to enhance the overall search range of the algorithm, thereby improving the efficiency and effectiveness of the algorithm as a whole.
[0102] Step 6: Repeat steps 2 to 4, and calculate the fitness of the new printer control parameter individual;
[0103] Step 7: When the print quality score of the new printer control parameter individual is less than or equal to the print quality score standard value, stop iteration and output the printer control parameter at this time.
[0104] Figure 4The present embodiment discloses a flow chart of a printing quality monitoring strategy for a 3D printer remote control method based on image tracking technology. The printing quality monitoring strategy includes collecting a cross-sectional image of a printed object during operation of the 3D printer, and extracting a cross-sectional division diagram of the printed object in the cross-sectional image of the printed object by using a canny edge detection algorithm; setting a cross-sectional defect extraction algorithm to extract defect areas in the cross-sectional division diagram of the printed object; and converting the defect areas of all defect areas into a printing quality score by extracting the defect areas.
[0105] The cross-sectional defect extraction algorithm is implemented through the findContours function. Starting from each pixel point of the image, when encountering a pixel representing the edge of an object, that is, when the pixel value difference with the surrounding pixels is greater than the standard value of the pixel difference, the algorithm takes the pixel point as the starting point and traces along the continuous edge pixels to form a closed contour line to obtain the printed object cross-sectional defect data set. In this process, the algorithm will intelligently determine the extension direction of the contour based on the brightness or color difference between the current pixel and its adjacent pixels to ensure that the complete boundary of the object can be accurately outlined.
[0106] The cross-sectional defect extraction algorithm also includes a deep cross-sectional defect detection algorithm, through which the deep cross-sectional defect detection algorithm is used to extract the deep defect contours of all defects in the cross-sectional defect data set of the printed object. Since the gap between defects is small, in order to more accurately distinguish the defect levels, the deep cross-sectional defect detection algorithm is used to further extract the data in the cross-sectional defect data set of the printed object. Once the energy functional is defined, the position of the contour can be adjusted by solving the minimum value of the energy functional. The optimization method in this embodiment is implemented by the gradient descent method. The position of the contour will be continuously adjusted with the minimization process of the energy functional, and finally converge to the target boundary in the image. Therefore, the deep cross-sectional defect detection algorithm introduces the snake method to design the energy functional:
[0107]
[0108] Among them, ou represents the outline of the defect, Vertices, represents the weight of curvature, represents the weight of the length, Indicates the number of vertices whose pixel distance to the largest defect edge is less than the set pixel difference threshold The proportion of the total number of vertices, that is, ; Represents the gradient function of the image inside the defect.
[0109] The defect area is extracted by the contourArea function, and the actual area of the defect contour is calculated based on the pixel points of the contour and then normalized. The calculation formula for the print quality score is: , where Sar represents the defect area after normalization. The use of an exponential function can emphasize the impact of a larger defect area on the overall score.
[0110] The environmental detection module includes the following specific steps: collecting temperature and humidity data during the printing process in the 3D printer; substituting the collected temperature data into the printing environment temperature state calculation strategy to calculate the printing environment temperature state value; substituting the collected humidity data into the printing environment humidity state calculation strategy to calculate the printing environment humidity state value; obtaining the platform vibration threat value by obtaining the platform vibration condition in the printer; substituting the temperature state value, humidity state value and platform vibration threat value into the printing environment risk factor calculation strategy to calculate the printing environment risk factor, and inputting the printing environment risk factor into the control module.
[0111] The printing environment temperature state calculation strategy includes evenly installing temperature sensors in the printer, obtaining a temperature sensor data set, and calculating the difference between the ratio of the mean value of the data in the temperature sensor data set and the printing environment temperature threshold and 1 to obtain the printing environment temperature state value; the printing environment humidity calculation strategy includes installing humidity sensors around the temperature sensors in the printer, obtaining a humidity sensor data set, and calculating the difference between the ratio of the mean value of the data in the humidity sensor data set and the printing environment humidity threshold and 1 to obtain the printing environment humidity state value; the platform vibration threat value includes installing a vibration sensor on the 3D printer platform and collecting amplitude data and vibration speed , get the vibration threat value of the equipment printing platform .
[0112] The printing environment risk factor calculation strategy obtains the printing environment risk factor by weighted summing up the printing environment temperature state value, the printing environment humidity state value and the platform vibration threat value.
[0113] The threshold and weight settings can be set by the operator.
[0114] The present application further provides a 3D printer remote control method based on image tracking technology, which is implemented by the 3D printer remote control system based on image tracking technology as described above.
[0115] Specifically, Figure 2 As shown, the method steps of the present application include:
[0116] The print quality monitoring strategy is set by the print quality determination module, and the difference image between the first image printed at the current moment and the second image printed at the previous moment is determined by the image tracking technology, and whether the print quality score is less than or equal to the print quality score standard value is determined according to the difference image. If not, the system will continue to print according to the original instruction, and if so, the environment detection module is run;
[0117] The environment detection module monitors the humidity and temperature of the printing environment and the stability of the printing platform in real time to obtain the printing environment risk factor;
[0118] The printing genetic PID control algorithm is set through the control module, the printing quality score and the printing environment risk factor are used as input, and the printer control parameters are output.
[0119] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0120] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. A 3D printer remote control system based on image tracking technology, characterized by: include: A print quality determination module, used to set a print quality monitoring strategy, determine the difference between the first image currently printed and the second image printed at the previous moment through image tracking technology, and determine whether the print quality score is less than or equal to the print quality score standard value according to the difference. If not, the system will continue to print according to the original instructions. If so, run the environment detection module; The environmental detection module obtains the printing environment risk factor by real-time monitoring of the humidity and temperature of the printing environment and the stability of the printing platform; A control module, used for setting a printing genetic PID control algorithm, taking the printing quality score and the printing environment risk factor as input, and outputting printer control parameters; The print quality determination module specifically performs the following steps: Acquire a first image printed at the current moment and a second image printed at the previous moment by using an image tracking technology; Aligning the first image and the second image by image coordinates, and cropping a difference portion between the first image and the second image to obtain a difference portion image; splicing the difference partial image to the first image to obtain a spliced image; comparing the difference between the first image and the stitched image, and calculating the print quality score according to the difference; Determining whether the print quality score is less than or equal to a print quality score standard value; The comparing the difference between the first image and the stitched image includes: Determining a boundary line between the difference partial image in the stitched image and the second image; Taking the boundary line as the center, each point on the boundary line is moved forward N pixels and backward M pixels in a direction perpendicular to the boundary line, and then the pixel point on the boundary line, the corresponding pixel point moved forward N pixels, and the corresponding pixel point moved backward M pixels form a linear pixel vector, thereby obtaining a linear pixel vector corresponding to each pixel point on the boundary line; According to each linear pixel vector, determine the pixel value change trend of the first N pixel positions of each linear pixel vector, the pixel value change trend of the last M pixel positions, and the fitting change trend of all pixel positions; The pixel value change trends of the first N pixels of each linear pixel vector and the pixel value change trends of the last M pixels are spliced into a complete change trend, and each complete change trend is compared with the corresponding fitting change trend to calculate the corresponding difference.
2. The 3D printer remote control system according to claim 1, characterized in that: Compare each complete change trend with the corresponding fitted change trend and calculate the corresponding difference, including: Each complete change trend is overlapped with the corresponding fitted change trend, and the number and area of non-overlapping regions are weighted to obtain the difference degree; where the difference degree = q1 × number of non-overlapping regions + (1 / q2) × maximum area non-overlapping region + q3 × minimum area non-overlapping region, where q1 + q2 + q3 = 1.
3. The 3D printer remote control system according to claim 2, characterized in that: The printing genetic PID control algorithm comprises the following specific steps: Step 1: K p , K i , K d As the optimization parameter, calculate the printer control quality error at the current moment , the calculation formula is , and represents the weight adjustment parameter, peh represents the printing environment risk factor, Indicates the set printer control quality error standard value and calculates the environment-quality error , Indicates the standard value of print quality score. represents the print quality score, t represents the number of iterations at this time; and Fuzzy processing is performed to obtain the fuzzy printer control quality error deviation and fuzzy environment-quality error bias ; Step 2: Establish the initial population, using real number coding, including controlling the number of withdrawals, printing speed, ambient temperature and ambient humidity; Step 3: Control quality error deviation based on print quality score, print environment risk factor and fuzzy printer and fuzzy environment-quality error bias Construct fitness function F; Step 4: Select the individual with the highest fitness in the population and keep it for the next generation. Suppose the population size is N, then the fitness of a certain individual in the population is The probability of an individual being selected is ; Step 5: Set the crossover probability Pov, and generate a new printer control parameter individual according to the crossover probability; Step 6: Repeat steps 2 to 4, and calculate the fitness of the new printer control parameter individual; Step 7: When the print quality score of the new printer control parameter individual is less than or equal to the print quality score standard value, stop iteration and output the printer control parameter at this time; The fitness function includes setting the maximum value Tpeh of the printing environment risk factor. When the printing environment risk factor is greater than the maximum value Tpeh, the fitness function is directly calculated according to the print quality score. When the printing environment risk factor is less than or equal to the maximum value Tpeh, the fitness function is calculated by combining the print environment risk factor and the print quality score. First, the printer control objective function is defined as follows: ; in, , and Represents the weight of PID, fitness function ; The crossover probability Pov is obtained by obtaining the fitness change threshold through the initial crossover probability Pov(0), the print quality score and the print environment risk factor; when the print quality score is less than or equal to the print quality score standard value, the crossover probability is updated, and the update formula is: When the print quality score is greater than the print quality score standard value, determine whether the fitness of the control parameter in the genetic process is less than the fitness change threshold for three consecutive times. If it is judged to be yes, the crossover probability is increased by 30 times. If it is judged to be no, Pov(0) is returned.
4. The 3D printer remote control system according to claim 3, characterized in that: The printing quality monitoring strategy includes collecting a cross-sectional image of a printed object during the operation of the 3D printer, and extracting a cross-sectional division diagram of the printed object in the cross-sectional image of the printed object through a canny edge detection algorithm; setting a cross-sectional defect extraction algorithm to extract defect areas in the cross-sectional division diagram of the printed object; and converting the defect areas of all defect areas into a printing quality score by extracting the defect areas.
5. The 3D printer remote control system according to claim 4, characterized in that: The cross-sectional defect extraction algorithm is implemented through the findContours function. Starting from each pixel point of the image, when encountering a pixel representing the edge of an object, that is, when the pixel value difference with the surrounding pixels is greater than the pixel difference standard value, the algorithm takes the pixel point as the starting point and traces along the continuous edge pixels to form a closed contour line, thereby obtaining a printed object cross-sectional defect data set.
6. The 3D printer remote control system according to claim 5, characterized in that: The cross-sectional defect extraction algorithm also includes a deep cross-sectional defect detection algorithm, through which the deep cross-sectional defect detection algorithm is used to extract the deep defect contours of all defects in the cross-sectional defect data set of the printed object. The deep cross-sectional defect detection algorithm introduces a snake method to design an energy functional: ; Among them, ou represents the outline of the defect, Vertices, represents the weight of curvature, represents the weight of the length, Indicates the number of vertices whose pixel distance to the largest defect edge is less than the set pixel difference threshold The proportion of the total number of vertices, that is, ; Represents the gradient function of the image inside the defect.
7. The 3D printer remote control system according to claim 6, characterized in that: The defect area is extracted by the contourArea function, and the actual area of the defect contour is calculated based on the pixel points of the contour and then normalized. The calculation formula for the print quality score is: , where Sar represents the defect area after standardized processing.
8. A 3D printer remote control method based on image tracking technology, characterized in that: The method is implemented by a 3D printer remote control system based on image tracking technology as claimed in any one of claims 1 to 7, wherein the 3D printer remote control method comprises: The print quality monitoring strategy is set by the print quality determination module, and the difference image between the first image printed at the current moment and the second image printed at the previous moment is determined by the image tracking technology, and whether the print quality score is less than or equal to the print quality score standard value is determined according to the difference image. If not, the system will continue to print according to the original instruction, and if so, the environment detection module is run; The environment detection module monitors the humidity and temperature of the printing environment and the stability of the printing platform in real time to obtain the printing environment risk factor; The printing genetic PID control algorithm is set through the control module, the printing quality score and the printing environment risk factor are used as input, and the printer control parameters are output.
Citation Information
Patent Citations
3D printer control system
CN104647756B
3D printer printing head control system and printing management board
CN110901073A
Printing path planning method and system and 3D printer
CN112677489A