Method for determining offset of double nozzles and 3D printer
The image of the double-nozzle printed line segment is illuminated and collected by the contourmeter, which solves the problem of high reflectivity in the prior art that the material line image is unclear, and improves the accuracy of offset measurement.
Patent Information
- Application Number
- CN202510335810.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, by collecting images of parallel line segments for double nozzle alignment calibration, the reflective characteristics of the material line are high, resulting in unclear images of transparent, translucent or black material line, thereby reducing the accuracy of offset measurement.
The two line segments printed by the double nozzle are illuminated by a contourmeter, and the illuminated line segment images are collected, and the offset of the double nozzle in the perpendicular direction to the line segment is calculated. The light source provided by the profiler can make the collected images clearer and is suitable for material lines with high reflective characteristics.
Improve the measurement accuracy of the double nozzle offset, ensure accurate measurement of transparent, translucent or black material lines, etc., and reduce errors in offset measurement.
Smart Images

Figure CN120096088A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of 3D printing technology, and in particular to a method for determining an offset of a dual nozzle and a 3D printer. Background Art
[0002] With the development of science and technology, 3D printing technology has been widely used in people's lives. Among them, 3D printers with two nozzles can better print multi-color parts, or print parts with support materials. But the two nozzles must be strictly aligned, otherwise there will be relatively large defects. Due to mechanical precision limitations, it is difficult to achieve complete physical alignment, which requires the subsequent calibration of their offsets and calibration based on the offsets.
[0003] In the traditional technical solution, dual-head alignment calibration is performed by collecting images of parallel line segments. However, this method has high requirements on the reflective properties of the material line. If the material line is transparent, translucent, black, etc., the collected image is not clear, which will result in low measurement accuracy of the offset. Summary of the invention
[0004] In order to solve the above-mentioned problems existing in the prior art, an embodiment of the present application provides a method for determining the offset of a dual nozzle and a 3D printer, wherein a profilometer is used to illuminate two line segments printed by the dual nozzles, and images corresponding to the two illuminated line segments are collected, so as to obtain the offset of the dual nozzle in a direction perpendicular to the two line segments based on the images corresponding to the two line segments. Since the profilometer can effectively illuminate the two line segments and obtain a clear image of the material line, the offset can be calculated through the image to improve the measurement accuracy of the offset.
[0005] In a first aspect, an embodiment of the present application provides a method for determining an offset of a dual nozzle, the method being applied to a controller of a 3D printer, the dual nozzle being arranged on a tool head of the 3D printer, the 3D printer comprising a printing platform and a profilometer, the tool head and the printing platform being capable of relative movement; the method comprising:
[0006] Controlling the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment; wherein the first line segment and the second line segment are parallel in a first direction, and the first direction is any direction on the printing platform;
[0007] Controlling the profilometer to illuminate the first line segment and the second line segment, and collecting images of the illuminated line segments to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image;
[0008] Based on the first image and the second image, the offset of the double nozzles in a second direction is obtained, and the second direction is perpendicular to the first direction.
[0009] In a second aspect, an embodiment of the present application provides a controller, the controller is located in a 3D printer, the 3D printer comprises: a tool head, a printing platform and a profilometer, the tool head is provided with a double nozzle; the controller comprises a control unit and a processing unit;
[0010] The control unit is used to control the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment; wherein the first line segment and the second line segment are parallel in a first direction, and the first direction is any direction on the printing platform;
[0011] Controlling the profilometer to illuminate the first line segment and the second line segment, and collecting images of the illuminated line segments to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image;
[0012] The processing unit is used to obtain an offset of the double nozzles in a second direction based on the first image and the second image, where the second direction is perpendicular to the first direction.
[0013] In a third aspect, an embodiment of the present application provides a 3D printer, comprising: a controller, a tool head, a printing platform and a profilometer, wherein a dual nozzle is arranged on the tool head, and the tool head and the printing platform can move relative to each other; the controller comprises: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method as described in the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method described in the first aspect.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program product is operable to cause a computer to execute the method described in the first aspect.
[0016] Implementing the embodiments of the present application has the following beneficial effects:
[0017] It can be seen that in the embodiment of the present application, the controller of the 3D printer first controls the dual nozzles to print two parallel line segments in the first direction on the printing platform to obtain the first line segment and the second line segment. Then, the profilometer is controlled to illuminate the first line segment and the second line segment, and the image of the illuminated line segment is collected to obtain the first image corresponding to the first line segment and the second image corresponding to the second line segment. Finally, based on the first image and the second image, the offset of the dual nozzle in the second direction perpendicular to the first direction is obtained. Based on this, the first line segment and the second line segment are illuminated by the profilometer, and then the images of the first line segment and the second line segment are collected. The light source provided by the profilometer can make the collected image clearer. For material lines with higher requirements for reflective properties, first images and second images with higher clarity can also be obtained. Therefore, based on the first image and the second image, a more accurate offset is calculated, thereby improving the measurement accuracy of the offset. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of the structure of a 3D printer provided in an embodiment of the present application;
[0020] Figure 2 A schematic flow chart of a method for determining an offset of a dual nozzle provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a printing pattern provided in an embodiment of the present application;
[0022] Figure 4 A comparison chart of various shooting methods provided in the embodiments of the present application;
[0023] Figure 5 A schematic diagram of a laser line and a raised material line provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of detecting the center coordinates of a raised material line provided in an embodiment of the present application;
[0025] Figure 7 A block diagram of the functional units of a controller provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of the functional composition of a 3D printer provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0029] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. In an example, it can be a fixed connection, or a detachable connection, or an integral connection; it can be a mechanical connection, or an electrical connection, or they can communicate with each other; it can be a direct connection, or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements.
[0031] First, see Figure 1 , Figure 1 The schematic diagram of the structure of a 3D printer provided in the embodiment of the present application is shown in FIG. 3D printer 100 may be a dual-nozzle 3D printer. Figure 1 As shown, the 3D printer 100 may include: a controller 101, a tool head 102, a printing platform 103 and a profilometer 104. The tool head 102 is provided with a double nozzle, such as Figure 1 The first nozzle 105 and the second nozzle 106 are shown. The tool head 102 and the printing platform 103 can move relative to each other.
[0032] Among them, the 3D printer 100, also known as a three-dimensional printer, can print a three-dimensional model using a variety of raw materials. The controller 101 is a core control unit that executes program control instructions and data transmission and reception processing in the 3D printer, and is mainly used to control the operation of other components of the 3D printer. The controller 101 may include: a microcontroller unit (MCU), a single-board computer (SBC), a field programmable gate array (FPGA), and the like. Optionally, the 3D printer 100 may include controllers 101 located at multiple different positions, and the present application does not limit the number and placement of the controllers. The tool head 102 is connected to the 3D printer and can move relative to the printing platform on the 3D printer to control the dual nozzles to perform printing operations at specific positions on the printing platform. The tool head 102 can heat the consumables provided by the feeding device or the external material rack and then transport them to the nozzle, and output the consumables to the printing platform 103 through the nozzle, and the tool head 102 controls the nozzle to print the corresponding object or pattern on the printing platform 103. Optionally, the consumables provided by the feeding device may include consumables of multiple colors and multiple materials. Among them, the profilometer 104 is equipped with a laser and a camera, the laser can emit a stable line laser, and the camera can be used to collect images inside the 3D printer.
[0033] When using a 3D printer, the user can download or set the shape, size, color, and other parameters of the print on the operating device or slicing software. After the parameters are received by the controller 101, the controller 101 will control the tool head 102 of the 3D printer to move to the corresponding position of the 3D printer 100, so that the print required by the user is printed on the printing platform 103 through the dual nozzles in the shape, size, and color set by the user. The print can be a complete model, or multiple print lines or multiple print points, which are not limited here. Optionally, the printing platform 103 can also be lifted in the direction of the tool head, or move in a predefined xy plane to facilitate the printing operation. At present, the 3D printer 100 is mainly used in parts manufacturing, toy printing, industrial design, and other fields. Among them, the dual-nozzle 3D printer 100 is a 3D printer 100 provided with two nozzles, and the dual nozzles can better print multi-color parts, or print parts with support materials. When using the dual nozzles for printing operations, the two nozzles must be strictly aligned, otherwise the printed model will have large defects.
[0034] It should be noted that the embodiment of the present application is only described by taking a 3D printer with a dual nozzle as an example. Those skilled in the art can also apply the present method to a 3D printer with multiple nozzles, wherein the method for determining the offset of multiple nozzles is similar to the method of the embodiment of the present application and will not be repeated here.
[0035] When the tool head 102 moves on the frame of the 3D printer and drives the dual nozzles to move, there may be a certain offset between the movement of the two nozzles, that is, it is difficult for the first nozzle 105 and the second nozzle to be completely aligned, resulting in a certain deviation between the printed print and the parameters set by the user. Therefore, before using the dual nozzles to print a print, the offset between the dual nozzles needs to be measured and calibrated.
[0036] In the existing offset measurement method, two parallel line segments are usually printed by a dual nozzle, wherein the two parallel line segments are printed by two nozzles respectively. Then, the image corresponding to the parallel line segments is captured by a camera, and the camera sends the captured image to the controller 101. The controller 101 can obtain the offset of the two parallel line segments in the direction perpendicular to the line segments by analyzing the coordinates of the points on the image corresponding to the two parallel line segments. However, for some material lines with high reflectivity requirements, such as transparent, translucent, black material lines, etc., directly capturing the line segment image through the camera cannot capture a clear image, resulting in a low accuracy of the offset determined based on the image.
[0037] To this end, in the embodiment of the present application, the controller 101 controls the dual nozzles to print two line segments on the printing platform 103 to obtain a first line segment and a second line segment; wherein the first line segment and the second line segment are parallel in a first direction, and the first direction is any direction on the printing platform 103;
[0038] The controller 101 controls the profilometer 104 to illuminate the first line segment and the second line segment, and collects images of the illuminated line segments to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image;
[0039] The controller 101 obtains the offset of the dual nozzles in a second direction based on the first image and the second image, where the second direction is perpendicular to the first direction.
[0040] It should be noted that the light source provided on the profilometer 104 can illuminate parallel line segments, causing the parallel lines to reflect light, so that the image of the parallel line segments illuminated by the light source can be collected by the camera on the profilometer. Optionally, the light source can be natural light, a light emitting diode (LED), a line laser, and the like. The light source provided by the profilometer 104 in the present application is a line laser. The line laser has a high light intensity. By irradiating the line laser on the surface of the material, relevant information of the material can be directly obtained, and background interference can be effectively removed. For this reason, in an embodiment of the present application, a line laser is emitted to the printed parallel line segments by the laser of the profilometer 104. After the line laser emitted by the laser is reflected by the parallel line segments, the image of the parallel line segments is collected by the camera, so that the camera can collect a clear image.
[0041] It can be seen that the controller of the 3D printer can control the dual nozzles to print two parallel line segments on the printing platform based on preset parameters, and then control the profilometer to illuminate the two printed parallel line segments, and collect clear parallel line segment images after illumination through the camera. By analyzing the parallel line segment images, the offset of the dual nozzles in the direction perpendicular to the parallel line segments can be obtained. The light source provided by the profilometer can make the collected image clearer. For material lines with high requirements for reflective properties, the profilometer can also collect clear line segment images by illuminating the material lines and receiving the reflected light of the material lines, and then determine the accurate offset based on the image, thereby improving the measurement accuracy of the offset.
[0042] The following is a method for determining the offset of the dual nozzles in an embodiment of the present application. Figure 2 , Figure 2 A flow chart of a method for determining the offset of a dual nozzle provided in an embodiment of the present application is provided. The method is applied to a controller of a 3D printer. The dual nozzles are arranged on a tool head of the 3D printer. The 3D printer includes a printing platform and a profilometer. The tool head and the printing platform can move relative to each other. The method for determining the offset of the dual nozzle includes but is not limited to the following steps:
[0043] 201: Control the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment.
[0044] In some feasible implementations, the first line segment and the second line segment are parallel in a first direction, where the first direction is any direction on the printing platform. The dual nozzles correspond to the two line segments one-to-one, that is, the two line segments are printed by corresponding nozzles respectively.
[0045] The controller can control the tool head of the 3D printer to move along the printing path of the first line segment and the second line segment based on the preset parameters set by the user on the operating device or slicing software, where the preset parameters include the printing path of the first line segment and the second line segment, so that the dual nozzles extrude the consumables to the printing platform along the printing path of the first line segment and the second line segment, and control the flow rate of the dual nozzles to be stable during the discharge process, so as to print the first line segment and the second line segment with stable line width and parallel in the first direction on the printing platform.
[0046] In some feasible implementations, the dual nozzle may include a first nozzle and a second nozzle. Controlling the dual nozzle to print two line segments on a printing platform to obtain the first line segment and the second line segment may include:
[0047] Controlling the first nozzle to print the first bottom surface with the first color consumable on the printing platform, and controlling the second nozzle to print the second bottom surface with the second color consumable on the printing platform;
[0048] Controlling the first nozzle to print a first line segment on the second bottom surface with a first color consumable;
[0049] The second nozzle is controlled to print a second line segment on the first bottom surface with a second color consumable.
[0050] In the embodiment of the present application, the first color consumable and the second color consumable are different in color. Optionally, one of the first color consumable and the second color consumable may be a dark color consumable, and the other consumable may be a light color consumable. The controller may enhance the distinction between the first line segment and the second line segment by controlling the dual nozzles to print the bottom surface and the line segment with different color consumables, so that the subsequent camera can capture the first line segment and the second line segment clearly.
[0051] It should be noted that during 3D printing, the nozzle is unstable at the starting point of printing, and the machine flow is unstable, which will cause defects in the first layer printing. In addition, when printing line segments directly on the printing platform, the residual consumables on the printing platform will cause the line width of the printed line segments to be unstable. Therefore, in some feasible implementations, before printing the first line segment and the second line segment, the controller can control the dual nozzles to print two bottom surfaces, and print two line segments on the bottom surface, thereby solving the problems of defects in the first layer printing and unstable line width of the printed line segments.
[0052] Specifically, the controller first controls the relative movement between the tool head and the printing platform to move the tool head close to the printing platform, then controls the first nozzle to discharge materials normally, extrude the first color consumables to the printing platform, and controls the second nozzle to switch to a standby state, wherein when the nozzle is in the standby state, it will not output consumables and will not interfere with the normal operation of other nozzles, and at this time, the first nozzle is closer to the printing platform than the second nozzle. By controlling the tool head to move on the frame, the first bottom surface is printed on the printing platform. After the first bottom surface is printed, the first nozzle is controlled to switch to a standby state, and the second nozzle is controlled to discharge materials normally, extrude the second color consumables to the printing platform, and the second bottom surface is printed on the printing platform by controlling the tool head to move on the frame, and at this time, the second nozzle is closer to the printing platform than the first nozzle. Alternatively, the controller may control the tool head to switch between the first nozzle and the second nozzle to print the first bottom surface and the second bottom surface. For example, after the controller controls the tool head to use the first nozzle to print the first layer of the first bottom surface using the first color consumable, the tool head is controlled to use the second nozzle to print the first layer of the second bottom surface using the second color consumable, and then the tool head is controlled to use the second nozzle to print the second layer of the second bottom surface using the second color consumable, and so on to complete the printing of the first bottom surface and the second bottom surface. Alternatively, after the controller controls the tool head to use the first nozzle to print the first to nth layers of the first bottom surface using the first color consumable, where n is greater than 1, the tool head is controlled to use the second nozzle to print the first to nth layers of the second bottom surface using the second color consumable, and then the tool head is controlled to use the second nozzle to print the n+1 to 2nth layers of the first bottom surface using the first color consumable, and so on to complete the printing of the first bottom surface and the second bottom surface. There are many ways for the first nozzle and the second nozzle to print the bottom surface, and this application does not limit this.
[0053] Further, after the second bottom surface is printed, the controller controls the second nozzle to switch to a standby state, controls the first nozzle to discharge normally, extrude the first color consumable onto the printing platform, and then controls the tool head to move above the second bottom surface, and controls the tool head to move along the first direction, so that the first nozzle outputs the consumable along the first direction to the second bottom surface, and prints the first line segment on the second bottom surface. After the first line segment is printed, the first nozzle is controlled to switch to a standby state, controls the second nozzle to discharge normally, extrude the second color consumable onto the printing platform, and then controls the tool head to move above the first bottom surface, and controls the tool head to move along the first direction, so that the second nozzle outputs the consumable along the first direction to the first bottom surface, and prints the second line segment on the first bottom surface.
[0054] It can be seen that in the embodiment of the present application, the first nozzle is controlled to print the first bottom surface with the first color consumable, and the second nozzle is controlled to print the second bottom surface with the second color consumable. Then, the first nozzle is controlled to print the first line segment on the second bottom surface with the first color consumable, and the second nozzle is controlled to print the second line segment on the first bottom surface with the second color consumable. This can solve the problems of first-layer defects and unstable line width caused by printing the line segments directly on the printing platform, and improve printing accuracy. In addition, by distinguishing the color of the line segment from the color of the bottom surface, the subsequent captured line segment image can be more distinguishable from the background, so that a more accurate offset can be determined based on the image, thereby improving the accuracy of determining the offset.
[0055] Optionally, the third bottom surface can be printed with a third color consumable through any one of the two nozzles, and then the feeding device can be controlled to change the consumables, and the first line segment can be printed with the first color consumable through the first nozzle, and the second line segment can be printed with the second color consumable through the second nozzle. In this way, the first line segment, the second line segment and the bottom surface can be distinguished, and the clarity of the collected line segment image can be improved to determine a more accurate offset, thereby improving the accuracy of determining the offset.
[0056] In some feasible embodiments, the first line segment does not include the first starting point and / or the first end point, and the second line segment does not include the second starting point and / or the second end point. The first nozzle starts discharging material at the first starting point, and the first nozzle stops discharging material at the first end point. The second nozzle starts discharging material at the second starting point, and the second nozzle stops discharging material at the second end point. The first starting point, the first end point, the second starting point, and the second end point are all located outside the first bottom surface and the second bottom surface.
[0057] It should be noted that during the 3D printing process, the state of the nozzle at the starting point of printing is unstable, especially the output consumable flow is not stable. In some feasible implementations, the nozzle can be controlled to stay at the starting point, and the tool head can be controlled to move after the output flow is stable, so as to ensure that the flow inside the nozzle is sufficient and the output flow is stable, so as to prevent the printing of the line segment from being affected by the nozzle under-extrusion. Based on this, it is necessary to set the starting point of printing outside the bottom surface, and the printed line segment does not include the starting point, so as to ensure that the line width of the printed line segment is stable. In addition, after the printing is completed, since the nozzle stops discharging and gradually reduces the flow rate of the consumable output, the consumable flow rate output by the nozzle at the end point is not stable, which will cause the printed line segment at the end point to be unstable. Therefore, it is necessary to set the end point of printing outside the bottom surface, and the printed line segment does not include the end point.
[0058] Specifically, the controller first controls the tool head to move to the first starting point, and controls the first nozzle to continuously discharge material from the first starting point, and switches the second nozzle to a standby state. After the flow rate of the consumables output by the first nozzle is stable, the tool head is controlled to move so that the first nozzle prints the first line segment on the second bottom surface with the first color consumables. After the first line segment is printed, the tool head is continued to be controlled to move to the first end point, and the first nozzle is controlled to stop discharging material and switch to a standby state at the first end point. Then, the tool head is controlled to move to the second starting point, and the second nozzle is controlled to continuously discharge material from the second starting point. After the flow rate of the consumables output by the second nozzle is stable, the tool head is controlled to move so that the second nozzle prints the second line segment on the first bottom surface with the second color consumables. After the second line segment is printed, the tool head is continued to be controlled to move to the second end point, and the second nozzle is controlled to stop discharging material and switch to a standby state at the second end point.
[0059] It can be seen that by setting the starting point of the line segment printing outside the bottom surface, the consumables accumulated at the starting point can be prevented from affecting the printing of the line segment. By setting the end point of the line segment printing outside the bottom surface, the problem of unstable line width of the line segment printed at the end point can be solved. The printed line segment does not include the starting point and the end point, so that the line width of the printed line segment can be stabilized, thereby acquiring a clear line segment image, and then determining the accurate offset based on the image, thereby improving the measurement accuracy of the offset.
[0060] It should be noted that the embodiments of the present application are only described by taking the measurement of the offset by printing parallel line segments through dual nozzles as an example. Optionally, a complete object with parallel line segments can be printed by the dual nozzles of a 3D printer, and the parallel line segments are printed by two nozzles respectively. By analyzing the positions of the target points corresponding to the parallel lines in the object, the motion offset of the dual nozzles can be calculated. Optionally, a pattern with parallel line segments can be printed by the dual nozzles of a 3D printer, for example, printing a rectangle, or printing a parallelogram. By determining the positions of the target points corresponding to the parallel line segments in the pattern, the motion offset of the dual nozzles can be calculated.
[0061] For example, Figure 3 As shown, a parallelogram with a 45-degree angle can be printed on the printing platform. It should be noted that the embodiment of the present application only takes printing a parallelogram with a 45-degree angle as an example for illustration. Optionally, patterns of other shapes can also be printed, which is not limited here. Using a parallelogram with a 45-degree angle can simplify the calculation of the offset and improve the calculation efficiency of the offset. Among them, line segment AB and line segment BC are printed by one nozzle, and line segment DC and line segment AD are printed by another nozzle.
[0062] Optionally, the length of line segment AB and line segment DC can be set to 60 mm, and the length of line segment BC and line segment AD can be set to 84.84 mm, that is, the height of the parallelogram is also 60 mm. It should be noted that line segment AB and line segment DC, line segment BC and line segment AD can be line segments of any length, and it is only necessary to ensure that the lengths of line segment AB and line segment DC are equal, and the lengths of line segment BC and line segment AD are equal. The lengths of line segment AB and line segment DC, and line segment BC and line segment AD are not limited here.
[0063] By analyzing the printed line segments AB and DC, the offset of the dual nozzles in the direction perpendicular to the line segments AB and DC can be obtained. Optionally, when the line segments AB and DC are horizontal line segments, the offset of the dual nozzles in the vertical direction can be obtained by analyzing the line segments AB and DC. After calibrating the offset of the dual nozzles in the vertical direction, the line segments BC and AD are analyzed to obtain the offset of the dual nozzles in the horizontal direction. It should be noted that the line segments AB and DC can be along any direction of the printing platform. The embodiment of the present application is only described with the line segments AB and DC as horizontal line segments, and is not limited here.
[0064] 202: Control the profilometer to illuminate the first line segment and the second line segment, and collect images of the illuminated line segments to obtain a first image and a second image.
[0065] In some feasible implementations, the first line segment corresponds to the first image, and the second line segment corresponds to the second image. After the first line segment and the second line segment are printed, the controller can control the profilometer to emit a light source to illuminate the first line segment and the second line segment. Optionally, the light source can be a line laser emitted by a laser.
[0066] It can be understood that illuminating the first line segment and the second line segment by the profilometer means that the consumables of the first line segment and the second line segment reflect the light source to the profilometer through the light source of the profilometer, so that the profilometer can capture a clear line segment image. The light source can be a light source invisible to the human eye, wherein the light source provided by the profilometer can be a light source with strong penetration, such as a line laser.
[0067] In some feasible implementations, a camera and a laser may be provided on the profilometer; controlling the profilometer to illuminate the first line segment and the second line segment, and collecting images of the illuminated line segments to obtain the first image and the second image may include:
[0068] Controlling the line laser emitted by the laser to illuminate the first line segment, and collecting an image of the illuminated first line segment through a camera to obtain a first image;
[0069] The line laser emitted by the laser is controlled to illuminate the second line segment, and an image of the illuminated second line segment is collected by a camera to obtain a second image.
[0070] In an embodiment of the present application, two lasers can be provided on the profiler. The two lasers can better illuminate the material lines in the orthogonal directions by emitting linear lasers in orthogonal directions. One or more lasers can also be provided on the profiler. The present application does not limit the number of lasers on the profiler. The laser can emit linear lasers. The linear lasers have a high light intensity. By irradiating the linear lasers on the surface of the material, relevant information of the material can be directly obtained, and background interference can be effectively removed. It should be noted that the embodiment of the present application does not specifically limit the diameter of the linear laser emitted by the laser, and can be set according to actual needs so that the linear laser emitted by the laser can completely illuminate the first line segment and the second line segment.
[0071] Specifically, the controller first controls the laser of the profiler to continuously emit a line laser to the first line segment, and after receiving the stable reflected light of the first line segment, controls the camera of the profiler to collect the image of the first line segment to obtain the first image. Then, the laser of the profiler is controlled to continuously emit a line laser to the second line segment, and after receiving the stable reflected light of the second line segment, controls the camera of the profiler to collect the image of the second line segment to obtain the second image.
[0072] Therefore, after the first line segment and the second line segment are illuminated by the line laser emitted by the laser, the reflective properties of the first line segment and the second line segment can be enhanced, and then the images of the first line segment and the second line segment are captured by the camera. For some consumables with higher reflectivity requirements, clear first images and second images can also be captured, so that the accurate offset is determined based on the first image and the second image, thereby improving the measurement accuracy of the offset.
[0073] Optionally, the laser of the profilometer can be used to simultaneously emit a line laser to the first line segment and the second line segment to illuminate the first line segment and the second line segment, and then the camera can be used to capture the image of the first line segment to obtain the first image and the image of the second line segment to obtain the second image. In this way, the image acquisition operation can be simplified and the measurement efficiency of the offset can be improved. The camera can also capture the image of the first line segment and the second line segment at the same time, and the first line segment and the second line segment in the image are symmetrically distributed, and the controller can separate the first image and the second image from the image.
[0074] It should be noted that, since there may be a small installation angle between the camera and the laser of the profiler during the actual production process, the laser lines in the collected first and second images may not be in the horizontal or vertical direction of the image. In some feasible implementations, after determining the first and second images, it is necessary to adjust the angles of the corresponding laser lines in the first and second images, and adjust the corresponding laser lines to the horizontal or vertical direction to simplify the calculation of the offset and improve the calculation efficiency. The embodiment of the present application is only explained by adjusting the laser line to the horizontal direction. The method of adjusting the laser line to the vertical direction is similar to the embodiment of the present application and will not be repeated here.
[0075] Exemplarily, acquiring an image of the illuminated first line segment through a camera to obtain the first image may include:
[0076] Capturing an image of the illuminated first line segment through a camera to obtain a first initial image;
[0077] Get the installation angle of the camera and the laser;
[0078] Based on the installation angle, the first laser line is rotated in the first initial image to obtain a first image.
[0079] Specifically, after the laser illuminates the first line segment and receives the stable reflected light of the first line segment, the camera collects the image of the first line segment to obtain a first initial image. The first initial image includes the first laser line. Since there is a small installation angle between the camera and the laser, the first laser line is not completely horizontal in the first initial image. At this time, the first laser line needs to be rotated to a horizontal direction.
[0080] In some feasible implementations, the first initial image of the first line segment may be captured by a camera using an integral photography method, that is, the image of the first line segment is captured multiple times, and the multiple captured images are superimposed to obtain the first initial image.
[0081] Exemplarily, acquiring an image of the illuminated first line segment through a camera to obtain a first initial image may include:
[0082] The image of the illuminated first line segment is collected multiple times by a camera to obtain multiple first scatter plots;
[0083] A plurality of first scatter plots are superimposed to obtain a first initial image.
[0084] In the embodiment of the present application, after the laser illuminates the first line segment to stably reflect the light source, the controller controls the camera of the profilometer to continuously capture images of the first line segment to obtain a plurality of first scatter plots.
[0085] For example, Figure 4 As shown, when the laser does not emit a line laser to illuminate the first line segment, and the consumables of the first line segment are made of a material with poor reflective properties, the first initial image captured by the camera is shown in picture 401.
[0086] For example, when the consumable material of the first line segment printed on a textured polyetherimide (PEI) hot bed is polyethylene terephthalate-1,4-cyclohexanedimeth yleneterephthalate (PETG) with poor light transmittance, when the laser does not irradiate the first line segment, the image taken of PETG is shown in picture 401. At this time, due to the poor reflective properties of the material, the distribution of light spots in the collected first initial image is relatively scattered, and effective information cannot be obtained from the first initial image. It is understandable that the embodiment of the present application only uses the consumable material of the first line segment printed on the textured PEI hot bed as PETG with poor light transmittance as an example for explanation. Optionally, other hot beds and consumables can also be used to print the first line segment, which is not limited here.
[0087] When the laser emits a line laser to illuminate the first line segment, the image of a single shot of the first line segment printed by the consumables with poor reflective properties is shown in picture 402, that is, each first scatter plot is shown in picture 402. It can be seen that after the laser emits a line laser to illuminate the first line segment, the distribution of light spots in the collected line segment image is more concentrated than that in picture 401, and the light spots are distributed on both sides of a straight line, which is the first laser line, but the distribution of light spots at this time is still relatively scattered, and the positioning accuracy of the first laser line is low.
[0088] To this end, the controller controls the camera to continuously capture the image of the first line segment multiple times to obtain multiple first scatter plots as shown in picture 402. Then, the multiple first scatter plots are superimposed to obtain the first initial image as shown in picture 403. Figure 4 As shown, the light spots in picture 403 are distributed on a straight line, that is, on the first laser line. The controller can determine an accurate target point based on the first laser line, and then determine the offset based on the target point, thereby improving the measurement accuracy of the offset.
[0089] It should be noted that the method of taking multiple shots and superimposing them can improve the signal-to-noise ratio of the shot images, so that the method of the embodiment of the present application is compatible with a variety of hot beds, including a non-smooth textured PEI hot bed.
[0090] It can be seen that when the laser line illuminates the first line segment, multiple first scatter plots can be obtained by collecting the image of the first line segment multiple times, and then the multiple first scatter plots are superimposed to obtain a first initial image. The first initial image obtained by superimposing multiple first scatter plots has a high signal-to-noise ratio, and the laser line in the image is clearly visible. The offset can be accurately measured through the image, and it is compatible with a variety of hot beds. On the basis of improving the measurement accuracy of the offset, the compatibility of the offset measurement is improved.
[0091] Further, after acquiring the first initial image corresponding to the first line segment, the controller acquires the installation angle of the camera and the laser of the profilometer, wherein the installation angle of the camera and the laser causes a rotation angle between the first laser line in the first initial image and the horizontal direction.
[0092] Optionally, taking the case where the angle between the first laser line and the horizontal direction is within a preset range as an example, the coordinates of the intersection of the first laser line and the left boundary of the first initial image in the vertical direction and the coordinates of the intersection of the first laser line and the right boundary of the first initial image in the vertical direction can be obtained to determine the difference between the two vertical coordinates. Then, the ratio of the difference to the perimeter of the boundary of the first initial image is determined, and the product of the ratio and 360 degrees is used as the installation angle of the camera and the laser.
[0093] By obtaining the installation angle between the camera and the laser, the first laser line in the first initial image is reversely rotated to rotate the first laser line to the horizontal direction, and the first image can be obtained. Optionally, the angle between the first laser line and the horizontal direction can be directly measured and used as the installation angle between the camera and the laser.
[0094] It should be noted that the embodiment of the present application only takes the example of rotating the first laser line to the horizontal direction. Optionally, the first laser line can also be rotated to the vertical direction. The method of rotating the first laser line to the vertical direction is similar to the method in the embodiment of the present application and will not be repeated here.
[0095] It can be seen that in the embodiment of the present application, the first initial image can be obtained by collecting the image of the first line segment illuminated by the laser through the camera, and then, the installation angle of the camera and the laser is obtained. The first image can be obtained by rotating the first laser line in the first initial image to a horizontal or vertical direction. Therefore, by analyzing the coordinates of the corresponding points of the first laser line and the laser line in the second image, the coordinate offset of the two line segments in the second direction, that is, the motion offset of the double nozzle, can be determined, thereby improving the measurement accuracy of the offset.
[0096] Furthermore, the controller collects images of the illuminated second line segment multiple times through the camera to obtain multiple second scatter plots. The multiple second scatter plots are superimposed to obtain a second initial image. Based on the installation angle of the camera and the laser, the second laser line is rotated in the second initial image to obtain a second image. In this way, by superimposing multiple scatter plots, a clear, accurate and high signal-to-noise ratio first image and second image can be obtained, so that a more accurate offset can be determined based on the first image and the second image.
[0097] 203: Based on the first image and the second image, obtain the offset of the dual nozzles in the second direction.
[0098] In some feasible implementations, the second direction may be perpendicular to the first direction. The controller may determine the offset of the dual nozzles in the second direction based on the coordinate difference in the second direction between corresponding points of the first laser line in the first image and the second laser line in the second image.
[0099] Exemplarily, the first nozzle is controlled to print the first line segment at x=x0 in the predefined xy plane, and the second nozzle is controlled to print the second line segment at x=x0+60mm. When there is no offset in the movement between the two nozzles, the first image corresponding to the first line segment collected at x=x0 should be exactly the same as the second image corresponding to the second line segment collected at x=x0+60mm, that is, the position of the first line segment in the first image is the same as the position of the second line segment in the second image. If the position of the first line segment in the first image is different from the position of the second line segment in the second image, the difference in the y coordinates of the two line segments in the image is the offset of the dual nozzles in the y-axis direction.
[0100] In some feasible implementations, obtaining the offset of the dual nozzles in the second direction based on the first image and the second image may include:
[0101] Acquire coordinates of a first target point corresponding to the first laser line in the first image;
[0102] Acquire coordinates of a second target point corresponding to the second laser line in the second image;
[0103] Based on the first target point coordinates and the second target point coordinates, the offset of the double nozzles in the second direction is obtained.
[0104] In the embodiment of the present application, the relative position of the first target point and the first laser line is the same as the relative position of the second target point and the second laser line.
[0105] Specifically, the controller may determine the first target point on the first laser line and obtain the coordinates of the first target point, and then determine the second target point at the same relative position as the second laser line and obtain the coordinates of the second target point. It should be noted that since the relative position of the first target point to the first laser line is the same as the relative position of the second target point to the second laser line, and the first line segment is parallel to the second line segment in the first direction, the coordinates of the first target point and the second target point in the first direction are exactly the same. The difference between the coordinates of the first target point and the second target point in the second direction represents the offset of the double nozzle in the second direction.
[0106] The following description will be made by taking the acquisition of the coordinates of the first target point corresponding to the first laser line in the first image as an example.
[0107] In some feasible implementations, obtaining the coordinates of the first target point corresponding to the first laser line in the first image may include the following steps:
[0108] Obtaining brightness values of all pixels in the first image;
[0109] Obtain the pixel with the highest brightness value in each column of pixels in the first image to obtain a plurality of first pixels;
[0110] Based on the plurality of first pixel points, a first laser line and a first raised material line are obtained;
[0111] Get the first target point coordinates of the first raised material line.
[0112] The first raised material line is parallel to the first laser line. In a specific implementation, the controller can obtain the brightness values of all the pixels in the first image by scanning all the pixels in the first image. Then, the first image is divided into multiple columns of pixels according to the distribution of the pixels, and the pixel with the highest brightness value in each column of the pixels in the first image is obtained, so that multiple first pixels can be obtained, which are the scattered distribution of the first laser line and the first raised material line.
[0113] Then, based on the coordinates of the plurality of first pixel points, the first laser line and the first raised material line are fitted.
[0114] In some feasible implementations, obtaining the first laser line and the first raised material line based on the plurality of first pixel points may include the following steps:
[0115] Perform straight line fitting on the plurality of first pixel points to obtain a first laser line;
[0116] A plurality of second pixel points located above the first laser line among the plurality of first pixel points are linearly fitted to obtain a first raised material line.
[0117] In a specific implementation, the controller can obtain the first laser line by performing straight line fitting on the multiple first pixel points. Optionally, the coordinates of the multiple first pixel points can be recorded in an array, for example, in a centers array. Then, based on the coordinates of the multiple first pixel points in the array, a straight line fitting is performed by fitting software to obtain the first laser line.
[0118] It should be noted that the distance between most of the first pixel points and the first laser line in the embodiment of the present application is less than the first threshold, but there is a remaining portion of the first pixel points and the first laser line The distance is greater than the first threshold. Among them, the first pixel points whose distance from the first laser line is greater than the first threshold are the pixels distributed on the first raised material line.
[0119] To this end, when performing straight-line fitting on a plurality of first pixel points, only a plurality of first pixel points whose distance from the first laser line is less than a first threshold are used for straight-line fitting, thereby obtaining a first laser line. Then, a plurality of second pixel points located above the first laser line, i.e., first pixel points whose distance from the first laser line is greater than the first threshold, are subjected to straight-line fitting, thereby obtaining a first raised material line. The distance between each second pixel point and the first raised material line is less than the second threshold.
[0120] For example, Figure 5 As shown, a first laser line formed by fitting a plurality of first pixel points is shown as line 501 , and a first raised material line formed by fitting a plurality of second pixel points is shown as line 502 .
[0121] In some feasible implementations, the controller can separate the foreground image of the first image and the background image of the first image by separating the foreground and background of the first image. Optionally, the first image can be segmented into the foreground image of the first image and the background image of the first image by applying the Ostu threshold segmentation algorithm to the coordinates of the plurality of first pixel points in the centers array. The laser line in the background image of the first image corresponds to the imaging of the hot bed, i.e., the first laser line. The straight line in the foreground image of the first image is the first raised material line.
[0122] Among them, the relative position of the first raised material line and the first laser line is the same as the relative position of the second raised material line and the second laser line in the second image. The offset of the double nozzle in the second direction can be obtained by the coordinate difference of the corresponding points on the first raised material line and the second raised material line in the second direction.
[0123] It can be seen that in the embodiment of the present application, the first laser line can be obtained by performing straight line fitting on multiple first pixel points, and then the first raised material line can be obtained by performing straight line fitting on multiple second pixel points located above the first laser line among the multiple first pixel points. Thus, the offset of the double nozzle in the second direction can be obtained by the first target point coordinates of the first raised material line and the second target point coordinates of the second raised material line, thereby improving the measurement accuracy of the offset.
[0124] Further, the controller obtains the coordinates of the first target point of the first raised material line. Exemplarily, obtaining the coordinates of the first target point of the first raised material line may include the following steps:
[0125] Obtain the first endpoint coordinates and the second endpoint coordinates of the first protruding material line;
[0126] Based on the first endpoint coordinates and the second endpoint coordinates, obtain the center coordinates of the first protruding material line;
[0127] The center coordinates of the first protruding material line are used as the first target point coordinates.
[0128] In the embodiment of the present application, the coordinate difference between the center coordinates of the first raised material line and the center coordinates of the second raised material line in the second direction is used as the movement offset in the second direction during the dual nozzle printing process. It should be noted that the embodiment of the present application only uses the coordinate difference between the center coordinates of the first raised material line and the center coordinates of the second raised material line in the second direction as the offset in the second direction for description. Optionally, the coordinate difference between the coordinates of any point in the first raised material line and the coordinates of the point corresponding to the point in the second raised material line in the second direction can be used as the offset in the second direction, which is not limited here.
[0129] Specifically, by detecting the two boundaries of the first protruding material line, the first end point coordinates and the second end point coordinates of the first protruding material line are obtained. Figure 6 As shown, by detecting the two boundaries of the first protruding material line MN, the first endpoint coordinate (x1, y1) of the first endpoint M and the second endpoint coordinate (x2, y2) of the second endpoint N can be obtained.
[0130] Then, based on the first endpoint coordinates (x1, y1) and the second endpoint coordinates (x2, y2), the center coordinates of the first raised material line ((x2-x1) / 2, (y2-y1) / 2) can be obtained. The center coordinates of the first raised material line are used as the first target point coordinates, so as to obtain the offset of the double nozzle in the second direction based on the center coordinates of the first raised material line and the center coordinates of the second raised material line.
[0131] Therefore, in the embodiment of the present application, the first end point coordinates and the second end point coordinates of the first raised material line can be obtained by performing boundary detection on the first raised material line, thereby obtaining the center coordinates of the first raised material line based on the first end point coordinates and the second end point coordinates, and using the center coordinates of the first raised material line as the first target point coordinates, thereby determining the first target point coordinates in the first raised material line, and then obtaining the offset of the double nozzle in the second direction based on the first target point coordinates and the second target point coordinates, thereby improving the measurement accuracy of the offset.
[0132] It can be seen that in the embodiment of the present application, multiple first pixel points can be obtained by obtaining the brightness values of all pixel points in the first image and obtaining the pixel point with the highest brightness value in each column of pixels in the first image, thereby obtaining the first laser line and the first raised material line based on the multiple first pixel points, and obtaining the first target point coordinates of the first raised material line, and then obtaining the offset of the double nozzle in the second direction based on the first target point coordinates and the second target point coordinates, thereby improving the measurement accuracy of the offset.
[0133] Then, the controller scans the second image to obtain the brightness values of all pixels in the second image, divides the second image into multiple columns according to the distribution of pixels in the second image, and obtains the pixel with the highest brightness value in each column of pixels in the image to obtain multiple third pixels.
[0134] Next, a straight line fitting is performed on the plurality of third pixel points to obtain a second laser line. A straight line fitting is performed on a plurality of fourth pixel points located above the second laser line among the plurality of third pixel points to obtain a second raised material line. The method for obtaining the second laser line and the second raised material line based on the plurality of third pixel points is similar to the method for obtaining the first laser line and the first raised material line based on the plurality of first pixel points, and will not be repeated here.
[0135] Further, the boundary detection is performed on the second raised material line to obtain the third endpoint coordinates and the fourth endpoint coordinates of the second raised material line, and based on the third endpoint coordinates and the fourth endpoint coordinates, the center coordinates of the second raised material line are obtained, and the center coordinates of the second raised material line are used as the second target point coordinates of the second raised material line. The method of obtaining the center coordinates of the second raised material line based on the third endpoint coordinates and the fourth endpoint coordinates is similar to the method of obtaining the center coordinates of the first raised material line based on the first endpoint coordinates and the second endpoint coordinates, and will not be repeated here.
[0136] Thus, the coordinates of the first target point corresponding to the first laser line in the first image and the coordinates of the second target point corresponding to the second laser line in the second image, i.e., the center coordinates of the first raised material line and the center coordinates of the second raised material line, can be obtained. The offset of the double nozzle in the second direction can be determined by the center coordinates of the first raised material line and the center coordinates of the second raised material line.
[0137] In some feasible embodiments, when the first line segment and the second line segment are both horizontal line segments, and the center coordinates of the first protruding material line are (a, b), and the center coordinates of the second protruding material line are (c, d), the first direction at this time is the horizontal axis direction. The offset in the longitudinal direction can be determined based on the center coordinates of the first protruding material line and the center coordinates of the second protruding material line, that is, the longitudinal coordinate of the center coordinate of the second protruding material line is subtracted from the longitudinal coordinate of the center coordinate of the first protruding material line, and the offset in the longitudinal direction is (db).
[0138] It should be noted that the embodiment of the present application only uses the difference between the center coordinates of the first raised material line and the center coordinates of the second raised material line in the second direction to represent the offset in the second direction. Optionally, other corresponding relationships between the center coordinates of the first raised material line and the center coordinates of the second raised material line in the second direction can also be used to represent the offset in the second direction, which is not limited here.
[0139] It can be seen that in the embodiment of the present application, by acquiring the coordinates of the first target point corresponding to the first laser line in the first image and the coordinates of the second target point corresponding to the second laser line in the second image, when the relative position of the first target point and the first laser line and the relative position of the second target point and the second laser line are the same, the offset of the double nozzle in the second direction can be obtained based on the first target point coordinates and the second target point coordinates, thereby realizing the determination of the offset in the second direction based on the first laser line and the second laser line, thereby improving the measurement accuracy of the offset.
[0140] In some feasible implementations, the method may further include:
[0141] Controlling the dual nozzles to print the third line segment and the fourth line segment on the printing platform;
[0142] Controlling the line laser emitted by the laser to illuminate the first line segment, the second line segment, the third line segment and the fourth line segment;
[0143] The camera collects images of the illuminated first line segment, the second line segment, the third line segment, and the fourth line segment to obtain a third image;
[0144] Based on the third image, an offset amount of the dual nozzles in the first direction and an offset amount of the dual nozzles in the second direction are determined.
[0145] The third line segment and the fourth line segment are parallel in a third direction, and the third direction may be any direction on the printing platform except the first direction. The third image may include the first line segment, the second line segment, the third line segment and the fourth line segment.
[0146] Specifically, the controller first controls the first nozzle to print the third line segment on the printing platform, and controls the second nozzle to print the fourth line segment on the printing platform. The processing method of controlling the dual nozzles to print the third line segment and the fourth line segment on the printing platform is similar to the processing method of controlling the dual nozzles to print the first line segment and the second line segment on the printing platform in the embodiment of the present application, and will not be repeated here.
[0147] Then, the controller controls the laser of the profiler to emit a line laser to the first line segment, the second line segment, the third line segment and the fourth line segment to illuminate the first line segment, the second line segment, the third line segment and the fourth line segment. After the first line segment, the second line segment, the third line segment and the fourth line segment are illuminated by the line laser, the camera collects images of the illuminated first line segment, the second line segment, the third line segment and the fourth line segment to obtain a third image. Among them, the pattern composed of the first line segment and the third line segment and the pattern composed of the second line segment and the fourth line segment are symmetrically distributed in the third image.
[0148] Furthermore, the controller can separate the image corresponding to the first line segment, the image corresponding to the second line segment, the image corresponding to the third line segment, and the image corresponding to the fourth line segment in the third image based on the shooting angle of the camera. The separated images are similar to the first image or the second image in the above embodiment.
[0149] Finally, the offset of the double nozzle in the first direction and the second direction is determined according to the image corresponding to the first line segment after separation, the image corresponding to the second line segment, the image corresponding to the third line segment, and the image corresponding to the fourth line segment. Among them, the processing method for obtaining the offset of the double nozzle in the second direction based on the image corresponding to the first line segment after separation and the image corresponding to the second line segment is similar to the processing method for obtaining the offset of the double nozzle in the second direction based on the first image and the second image in this application, and will not be repeated here. After determining the offset in the second direction, the controller can adjust the image corresponding to the third line segment after separation and the image corresponding to the fourth line segment based on the offset in the second direction, so that the coordinates of the image corresponding to the third line segment after separation and the image corresponding to the fourth line segment are completely equal in the second direction, and obtain the adjusted image corresponding to the third line segment and the image corresponding to the fourth line segment. Then, based on the adjusted image corresponding to the third line segment and the image corresponding to the fourth line segment, determine the difference between the coordinates of the target point in the image corresponding to the third line segment and the coordinates of the corresponding point in the image corresponding to the fourth line segment in the first direction, and obtain the offset of the double nozzle in the first direction.
[0150] Therefore, the first line segment, the second line segment, the third line segment and the fourth line segment can be illuminated by a laser, and images corresponding to the four line segments can be collected. Based on the images corresponding to the four line segments, the offset of the double nozzle in the first direction and the offset in the second direction can be determined, without having to calculate the offset in the first direction after calculating the offset in the second direction, thereby improving the calculation efficiency of the offset.
[0151] Optionally, the angle between the third direction and the first direction may be 45 degrees. It is understandable that the third direction may be any direction that is not colinear with the first direction, and the angle between the third direction and the first direction is 45 degrees only for the convenience of calculating the offset and improving the calculation efficiency of the offset.
[0152] In some feasible implementations, the controller can calculate the calibration value of the dual nozzles in the first direction based on the offset in the first direction, and determine the calibration value in the second direction based on the offset in the second direction. Thus, the offset in the first direction is calibrated based on the calibration value in the first direction, and the offset in the second direction is calibrated based on the calibration value in the second direction. The embodiment of the present application does not limit the calibration method of the offset.
[0153] It should be noted that in the embodiment of the present application, the first line segment and the second line segment are illuminated by a laser, and the illuminated first line segment and the second line segment are captured by a camera to obtain the first image and the second image. This can improve the clarity of the first image and the second image, thereby improving the measurement accuracy of the calculated offset in the second direction. The dual nozzle is calibrated based on the offset, and the calibration accuracy can reach micron level. For example, the highest calibration accuracy can reach 1um.
[0154] It can be seen that in the embodiment of the present application, the controller of the 3D printer first controls the dual nozzles to print two parallel line segments in the first direction on the printing platform to obtain the first line segment and the second line segment. Then, the profilometer is controlled to illuminate the first line segment and the second line segment, and the image of the illuminated line segment is collected to obtain the first image corresponding to the first line segment and the second image corresponding to the second line segment. Finally, based on the first image and the second image, the offset of the dual nozzle in the second direction perpendicular to the first direction is obtained. Based on this, the first line segment and the second line segment are illuminated by the profilometer, and then the images of the first line segment and the second line segment are collected. For material lines with higher requirements for reflective properties, first images and second images with higher clarity can also be obtained, so that a more accurate offset can be calculated based on the first image and the second image, thereby improving the measurement accuracy of the offset.
[0155] Then, see Figure 7 , see Figure 7 , Figure 7The functional unit composition block diagram of a controller provided in an embodiment of the present application. The controller 700 is located in a 3D printer, and the 3D printer includes: a tool head, a printing platform and a profilometer, and a double nozzle is set on the tool head. The controller 700 may include the controller of any of the above embodiments. Figure 7 As shown, the controller 700 includes a control unit 701 and a processing unit 702 .
[0156] The control unit 701 is used to control the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment; wherein the first line segment and the second line segment are parallel in a first direction, and the first direction is any direction on the printing platform;
[0157] Controlling the profilometer to illuminate the first line segment and the second line segment, and collecting images of the illuminated line segments to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image;
[0158] The processing unit 702 is used to obtain the offset of the double nozzles in a second direction based on the first image and the second image, where the second direction is perpendicular to the first direction.
[0159] In some feasible implementations, the profilometer is provided with a camera and a laser. In terms of controlling the profilometer to illuminate the first line segment and the second line segment and to collect images of the illuminated line segments to obtain the first image and the second image, the control unit 701 is specifically configured to:
[0160] Controlling the line laser emitted by the laser to illuminate the first line segment, and collecting an image of the illuminated first line segment through a camera to obtain a first image;
[0161] The line laser emitted by the laser is controlled to illuminate the second line segment, and an image of the illuminated second line segment is collected by a camera to obtain a second image.
[0162] In some feasible implementations, the control unit 701 is further used to: control the dual nozzles to print a third line segment and a fourth line segment on the printing platform; wherein the third line segment and the fourth line segment are parallel in a third direction, and the third direction is any direction on the printing platform except the first direction;
[0163] Controlling the line laser emitted by the laser to illuminate the first line segment, the second line segment, the third line segment and the fourth line segment;
[0164] The camera collects images of the illuminated first line segment, the second line segment, the third line segment and the fourth line segment to obtain a third image; wherein the third image includes the first line segment, the second line segment, the third line segment and the fourth line segment;
[0165] The processing unit 702 is further configured to determine, based on the third image, an offset amount of the dual nozzles in the first direction and an offset amount of the dual nozzles in the second direction.
[0166] In some feasible implementations, the angle between the third direction and the first direction is 45 degrees.
[0167] In some feasible implementations, the dual nozzle includes a first nozzle and a second nozzle; in controlling the dual nozzle to print two line segments on the printing platform to obtain the first line segment and the second line segment, the control unit 701 is specifically used to:
[0168] Controlling the first nozzle to print the first bottom surface with the first color consumable on the printing platform, and controlling the second nozzle to print the second bottom surface with the second color consumable on the printing platform; wherein the first color consumable and the second color consumable have different colors;
[0169] Controlling the first nozzle to print a first line segment on the second bottom surface with a first color consumable;
[0170] The second nozzle is controlled to print a second line segment on the first bottom surface with a second color consumable.
[0171] In some feasible embodiments, the first line segment does not include the first starting point and / or the first end point, and the second line segment does not include the second starting point and / or the second end point; the first nozzle starts discharging material at the first starting point and stops discharging material at the first end point; the second nozzle starts discharging material at the second starting point and stops discharging material at the second end point; the first starting point, the first end point, the second starting point and the second end point are all located outside the first bottom surface and the second bottom surface.
[0172] In some feasible implementations, in terms of obtaining the offset of the dual nozzles in the second direction based on the first image and the second image, the processing unit 702 is specifically configured to:
[0173] Acquire coordinates of a first target point corresponding to the first laser line in the first image;
[0174] Acquire coordinates of a second target point corresponding to the second laser line in the second image, wherein a relative position of the first target point to the first laser line is the same as a relative position of the second target point to the second laser line;
[0175] Based on the first target point coordinates and the second target point coordinates, the offset of the double nozzles in the second direction is obtained.
[0176] In some feasible implementations, in acquiring the coordinates of the first target point corresponding to the first laser line in the first image, the processing unit 702 is specifically configured to:
[0177] Obtaining brightness values of all pixels in the first image;
[0178] Obtain the pixel with the highest brightness value in each column of pixels in the first image to obtain a plurality of first pixels;
[0179] Based on the plurality of first pixel points, a first laser line and a first raised material line are obtained, wherein the first raised material line is parallel to the first laser line;
[0180] Get the first target point coordinates of the first raised material line.
[0181] In some feasible implementations, in terms of obtaining the coordinates of the first target point of the first raised material line, the processing unit 702 is specifically configured to:
[0182] Obtain the first endpoint coordinates and the second endpoint coordinates of the first protruding material line;
[0183] Based on the first endpoint coordinates and the second endpoint coordinates, obtain the center coordinates of the first protruding material line;
[0184] The center coordinates of the first protruding material line are used as the first target point coordinates.
[0185] In some feasible implementations, in terms of obtaining the first laser line and the first raised material line based on the plurality of first pixel points, the processing unit 702 is specifically configured to:
[0186] Perform straight line fitting on the plurality of first pixel points to obtain a first laser line;
[0187] A plurality of second pixel points located above the first laser line among the plurality of first pixel points are linearly fitted to obtain a first raised material line.
[0188] In some feasible implementations, in acquiring the image of the illuminated first line segment through a camera to obtain the first image, the processing unit 702 is specifically configured to:
[0189] Capturing an image of the illuminated first line segment through a camera to obtain a first initial image;
[0190] Get the installation angle of the camera and the laser;
[0191] Based on the installation angle, the first laser line is rotated in the first initial image to obtain a first image.
[0192] In some feasible implementations, in acquiring the image of the illuminated first line segment through a camera to obtain the first initial image, the processing unit 702 is specifically configured to:
[0193] The image of the illuminated first line segment is collected multiple times by a camera to obtain multiple first scatter plots;
[0194] A plurality of first scatter plots are superimposed to obtain a first initial image.
[0195] See also Figure 8 , Figure 8 A schematic diagram of the functional composition of a 3D printer provided in an embodiment of the present application. Figure 8 As shown, the 3D printer 800 includes: a controller 801, a tool head 802, a printing platform 803 and a profilometer 804. The tool head 802 is provided with a double nozzle, and the tool head 802 and the printing platform 803 can move relative to each other. The controller 801 includes a transceiver 8011, a processor 8012 and a memory 8013. They are connected through a bus 8014. The memory 8013 is used to store computer programs and data, and can transmit the data stored in the memory 8013 to the processor 8012. The controller 801 may include the controller in any of the above embodiments and the controller 700.
[0196] The processor 8012 is used to read the computer program in the memory 8013 and perform the following operations:
[0197] Controlling the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment; wherein the first line segment and the second line segment are parallel in a first direction, and the first direction is any direction on the printing platform;
[0198] Controlling the profilometer to illuminate the first line segment and the second line segment, and collecting images of the illuminated line segments to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image;
[0199] Based on the first image and the second image, the offset of the double nozzles in a second direction is obtained, and the second direction is perpendicular to the first direction.
[0200] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the 3D printer includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0201] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement part or all of the steps of any one of the methods described in the above method embodiments.
[0202] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods recorded in the above method embodiments.
[0203] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0204] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0205] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0206] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0207] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0208] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0209] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0210] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for determining the offset of a dual nozzle, characterized in that: The method is applied to a controller of a 3D printer, wherein the dual nozzles are arranged on a tool head of the 3D printer, the 3D printer comprises a printing platform and a profilometer, and the tool head and the printing platform can move relative to each other; the method comprises: Controlling the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment; wherein the first line segment and the second line segment are parallel in a first direction, and the first direction is any direction on the printing platform; Controlling the profilometer to illuminate the first line segment and the second line segment, and collecting images of the illuminated line segments to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image; Based on the first image and the second image, the offset of the double nozzles in a second direction is obtained, and the second direction is perpendicular to the first direction.
2. The method according to claim 1, characterized in that The profilometer is provided with a camera and a laser; the profilometer is controlled to illuminate the first line segment and the second line segment, and collects images of the illuminated line segments to obtain the first image and the second image, including: Controlling the line laser emitted by the laser to illuminate the first line segment, and collecting an image of the illuminated first line segment through the camera to obtain the first image; The laser is controlled to emit a line laser to illuminate the second line segment, and the camera is used to capture an image of the illuminated second line segment to obtain the second image.
3. The method according to claim 2, characterized in that The method further comprises: Controlling the dual nozzles to print a third line segment and a fourth line segment on the printing platform; wherein the third line segment and the fourth line segment are parallel in a third direction, and the third direction is any direction on the printing platform except the first direction; Controlling the line laser emitted by the laser to illuminate the first line segment, the second line segment, the third line segment and the fourth line segment; The camera collects images of the illuminated first line segment, the second line segment, the third line segment and the fourth line segment to obtain a third image; wherein the third image includes the first line segment, the second line segment, the third line segment and the fourth line segment; Based on the third image, an offset amount of the dual nozzles in the first direction and an offset amount of the dual nozzles in the second direction are determined.
4. The method according to claim 3, characterized in that The angle between the third direction and the first direction is 45 degrees.
5. The method according to claim 1, characterized in that The double nozzle comprises a first nozzle and a second nozzle; The step of controlling the dual nozzles to print two line segments on the printing platform to obtain a first line segment and a second line segment includes: Controlling the first nozzle to print a first bottom surface on the printing platform with a first color consumable, and controlling the second nozzle to print a second bottom surface on the printing platform with a second color consumable; wherein the first color consumable and the second color consumable are of different colors; Controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable; The second nozzle is controlled to print the second line segment on the first bottom surface with the second color consumable.
6. The method according to claim 5, characterized in that The first line segment does not include the first starting point and / or the first end point, and the second line segment does not include the second starting point and / or the second end point; the first nozzle starts discharging material at the first starting point, and the first nozzle stops discharging material at the first end point; the second nozzle starts discharging material at the second starting point, and the second nozzle stops discharging material at the second end point; the first starting point, the first end point, the second starting point and the second end point are all located outside the first bottom surface and the second bottom surface.
7. The method according to any one of claims 2 to 6, characterized in that: The obtaining, based on the first image and the second image, an offset of the double nozzles in the second direction comprises: Acquire coordinates of a first target point corresponding to a first laser line in the first image; Acquire coordinates of a second target point corresponding to the second laser line in the second image, wherein a relative position between the first target point and the first laser line is the same as a relative position between the second target point and the second laser line; Based on the first target point coordinates and the second target point coordinates, an offset of the double nozzles in the second direction is obtained.
8. The method according to claim 7, characterized in that The acquiring the coordinates of the first target point corresponding to the first laser line in the first image includes: Obtaining brightness values of all pixels in the first image; Obtain the pixel with the highest brightness value in each column of pixels in the first image to obtain a plurality of first pixels; Based on the plurality of first pixel points, the first laser line and the first raised material line are obtained, wherein the first raised material line is parallel to the first laser line; Obtain the first target point coordinates of the first raised material line.
9. The method according to claim 8, characterized in that The obtaining of the first target point coordinates of the first raised material line includes: Obtain the first endpoint coordinates and the second endpoint coordinates of the first protruding material line; Based on the first endpoint coordinates and the second endpoint coordinates, obtaining the center coordinates of the first protruding material line; The center coordinates of the first protruding material line are used as the first target point coordinates.
10. The method according to claim 9, characterized in that The obtaining the first laser line and the first raised material line based on the plurality of first pixel points comprises: Performing straight line fitting on the plurality of first pixel points to obtain the first laser line; A plurality of second pixel points located above the first laser line among the plurality of first pixel points are linearly fitted to obtain the first raised material line.
11. The method according to claim 7, characterized in that The step of acquiring the image of the illuminated first line segment by the camera to obtain the first image includes: Capturing an image of the illuminated first line segment by the camera to obtain a first initial image; Obtaining the installation angle between the camera and the laser; Based on the installation angle, the first laser line is rotated in the first initial image to obtain the first image.
12. The method according to claim 11, characterized in that The step of collecting the image of the illuminated first line segment by the camera to obtain a first initial image includes: The camera collects images of the illuminated first line segment multiple times to obtain multiple first scatter plots; The multiple first scatter plots are superimposed to obtain the first initial image.
13. A 3D printer, characterized in that: The 3D printer comprises: a controller, a tool head, a printing platform and a profilometer, wherein a double nozzle is arranged on the tool head, and the tool head and the printing platform can move relative to each other; the controller comprises: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the controller executes the method as described in any one of claims 1 to 12.
Citation Information
Cited By
Printer control method and printer
US12515450B1