Nozzle xy automatic calibration method, system and device of 3D printing equipment

By using a backward vision system and a pixel coordinate-mechanical coordinate transformation model for automatic nozzle calibration in a multi-nozzle 3D printing device, the problems of print quality and accuracy caused by nozzle position offset are solved, and efficient, automatic nozzle calibration and accurate printing are achieved.

CN122379025APending Publication Date: 2026-07-14ATOMIC RESHAPING TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ATOMIC RESHAPING TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-04-16
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In multi-nozzle 3D printing equipment, installation errors, assembly errors, and positional deviations during disassembly and assembly cause the actual printing position of the nozzle on the XY plane to deviate from the theoretical position, affecting printing quality and accuracy.

Method used

By controlling the relative motion between the nozzle to be calibrated and the upward-looking vision system, the system images the nozzle in the central region of the visual optical axis, identifies the actual pixel coordinates of the nozzle's center, and uses a pre-calibrated pixel coordinate-mechanical coordinate transformation model to calculate and feed back the offset to the equipment motion control system for closed-loop correction, thus achieving automatic nozzle calibration.

Benefits of technology

It improves nozzle calibration accuracy and print quality, avoids identification errors caused by calibration material contamination, ambient light fluctuations, or material color differences, simplifies equipment structure and reduces maintenance costs, and achieves fully automatic and rapid nozzle calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122379025A_ABST
    Figure CN122379025A_ABST
Patent Text Reader

Abstract

The nozzle XY automatic calibration method, system and device of the 3D printing equipment provided by the embodiment of the application, in the case of triggering the calibration of the to-be-calibrated nozzle, first controls the relative movement between the to-be-calibrated nozzle and the upward-looking vision system according to the theoretical mechanical coordinates, so that the to-be-calibrated nozzle is constrained in the vision optical axis center area for imaging, which effectively eliminates the XY plane coordinate conversion error introduced in the image perspective projection due to the height difference of different nozzles Z axes, and ensures the consistency of the imaging reference. Subsequently, the pixel coordinates of the nozzle center recognized in the image are accurately converted into the actual mechanical coordinates in the device motion control coordinate system through the pixel coordinates-mechanical coordinates conversion model calibrated in advance and with high precision. The offset of the actual mechanical coordinates and the theoretical mechanical coordinates in the XY direction is calculated, and the deviation value is fed back to the device motion control system for real-time compensation of the motion parameters, thereby forming a simple and efficient closed-loop calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D printing, and in particular to a method, system and device for automatic nozzle XY calibration of a 3D printing device. Background Technology

[0002] In multi-nozzle 3D printing equipment, installation errors, assembly errors, and positional deviations during nozzle disassembly and replacement can easily cause offsets between the actual and theoretical printing positions of each nozzle in the XY plane. If these offsets are not effectively calibrated, they can lead to misalignment between printed layers, structural position shifts, and a decrease in overall printing accuracy, thus affecting print quality. Summary of the Invention

[0003] This application provides a method, system, and device for automatic nozzle XY calibration of 3D printing equipment, in order to improve nozzle calibration accuracy and printing quality.

[0004] In a first aspect, embodiments of this application provide an automatic XY nozzle calibration method for a 3D printing device, the method comprising the following steps:

[0005] When calibration of the nozzle to be calibrated is triggered, the nozzle to be calibrated is controlled to generate relative motion with the upward-looking vision system according to theoretical mechanical coordinates, so that the nozzle to be calibrated is positioned in the central region of the visual optical axis of the upward-looking vision system for imaging; from the image in which the nozzle to be calibrated is positioned in the central region of the visual optical axis, the actual pixel coordinates of the center of the nozzle to be calibrated are identified; wherein, constraining the nozzle to be calibrated to be imaged in the central region of the visual optical axis is used to suppress coordinate transformation errors introduced in the perspective projection of the image due to the Z-axis height difference of the nozzle;

[0006] Based on the coordinate transformation model from the image coordinate system of the vision system to the motion control coordinate system of the equipment, the actual pixel coordinates of the center of the nozzle to be calibrated are converted into actual mechanical coordinates; the XY offset between the actual mechanical coordinates and the theoretical mechanical coordinates of the nozzle to be calibrated is calculated, and the offset is fed back to the equipment motion control system for closed-loop correction to calibrate the nozzle to be calibrated.

[0007] In the above technical solution, when the calibration of the nozzle to be calibrated is triggered, the relative movement between the nozzle and the upward-looking vision system is first controlled according to the theoretical mechanical coordinates. This ensures that the nozzle is constrained to image in the central region of the visual optical axis. This step effectively eliminates the XY plane coordinate transformation error introduced into the image perspective projection due to the difference in nozzle Z-axis height, ensuring the consistency of the imaging reference. Subsequently, through a pre-calibrated, high-precision pixel coordinate-mechanical coordinate transformation model, the pixel coordinates of the nozzle center identified in the image are accurately converted into the actual mechanical coordinates under the equipment motion control coordinate system. The offset between the actual mechanical coordinates and the theoretical mechanical coordinates in the XY direction is calculated, and this deviation value is fed back to the equipment motion control system for real-time compensation of motion parameters, thus forming a simple and efficient closed-loop calibration. Based on this, the reliance on external calibration tools or printed test patterns is eliminated, fundamentally avoiding recognition errors caused by calibration material contamination, ambient light fluctuations, or differences in printing material color. Furthermore, the calibration is completed using the equipment's built-in upward-looking vision system, simplifying the overall equipment structure and reducing the complexity and cost of long-term maintenance. In addition, the entire calibration process can be executed automatically by the system without manual intervention, enabling rapid automatic calibration of the nozzle in the XY direction, thus improving efficiency and accuracy.

[0008] In some embodiments, the coordinate transformation model is pre-built through the following calibration steps:

[0009] The reference nozzle of the printing device is controlled to generate relative motion with the upward vision system, so that the reference nozzle images at multiple different mechanical coordinate points along a preset discrete path within the field of view of the upward vision system, and the pixel coordinates of the center of the reference nozzle are extracted from the image corresponding to each mechanical coordinate point.

[0010] By utilizing the geometric position constraints between multiple sets of mechanical coordinates and pixel coordinates, and identifying and eliminating outliers in pixel coordinates, a coordinate transformation model is constructed from the visual image coordinate system to the equipment motion control coordinate system.

[0011] In the above technical solution, by controlling the relative motion between the reference nozzle and the upward-looking vision system, the reference nozzle moves and images along a preset discrete path within the field of view of the upward-looking vision system. This ensures that the calibration points are uniformly and systematically distributed within the camera's field of view, avoiding excessive concentration of data points at the center of the field of view. This ensures that the final fitted coordinate transformation model has consistent high accuracy throughout the entire effective field of view. Furthermore, this sampling method can fully capture the nonlinear errors caused by lens distortion and perspective projection at the edges of the field of view, providing sufficient information for the model to accurately describe the complex geometric mapping relationship from the image coordinate system to the mechanical coordinate system. By utilizing the geometric position constraints that multiple sets of mechanical coordinates and pixel coordinates must satisfy to identify and eliminate outliers, it is possible to effectively identify erroneous pixel coordinates caused by nozzle surface contamination, instantaneous reflections, image noise, or feature extraction fluctuations. This prevents these abnormal data from contaminating the model fitting process, ensuring the accuracy and stability of the coordinate transformation relationship. Through the deep fusion of discrete paths and geometric constraints, the accuracy of the coordinate transformation model is improved.

[0012] In some embodiments, the plurality of different mechanical coordinate points are distributed in a nine-square grid within the field of view of the upward-looking visual system;

[0013] The nine-square grid distribution refers to the fact that each mechanical coordinate point is located at one of the nine characteristic positions of a rectangle, including the four vertices of the rectangle, the midpoints of the four sides, and the center point of the rectangle.

[0014] In the above technical solution, the nine-grid layout exhibits excellent spatial coverage characteristics on a two-dimensional plane. The four vertices and the midpoints of the four sides effectively cover the edges and boundary regions of the field of view, which are typically areas with significant optical distortion (such as pincushion or barrel distortion). The center point represents the core area with the best optical quality and least distortion in the field of view. This distribution ensures that the sampling points simultaneously capture the differences in imaging characteristics between the center and the edges of the field of view. While maintaining calibration accuracy, it greatly improves data acquisition efficiency and shortens calibration time. Furthermore, the symmetrical and regular distribution helps balance the data weights of each region during the fitting process, avoiding poor model fitting in local areas due to uneven distribution of sampling points.

[0015] In some embodiments, the calibration step further includes:

[0016] After extracting the pixel coordinates corresponding to each mechanical coordinate point, morphological detection is performed on the image of the reference nozzle;

[0017] If the morphological detection determines that the reference nozzle is dirty, the calibration process is interrupted, and the reference nozzle is controlled to generate relative movement with the wiping area to perform a wiping operation. After wiping is completed, the imaging and extraction steps for that point are re-executed.

[0018] The above technical solution can eliminate measurement errors caused by poor nozzle condition at the source, ensuring the purity of the calibration dataset and thus improving the accuracy of the final coordinate transformation model. At the same time, this mechanism reduces calibration failures or accuracy degradation caused by nozzle contamination, lowers reliance on operator experience, and improves the long-term stability of the equipment.

[0019] In some embodiments, morphological detection includes at least one of the following: roundness, symmetry, and heterochromatic connected regions.

[0020] In the above technical solutions, roundness and symmetry analysis directly measures the geometric integrity of the nozzle tip. By setting a geometric threshold, it can sensitively capture contour distortion. Dissimilar color connectivity detection targets the differences in optical properties between contaminants and the nozzle body material, identifying dirt adhering to the surface but not significantly altering the contour. This detection method effectively complements geometric feature detection. Roundness and symmetry analysis are primarily used to capture dirt affecting the contour shape, while dissimilar color connectivity detection excels at identifying dirt adhering to the surface but not significantly altering the contour. Combining these three methods constructs a multi-dimensional, complementary dirt detection system, significantly improving detection coverage and reliability.

[0021] In some embodiments, identifying and removing outlier pixel coordinates includes:

[0022] A hand-eye calibration algorithm is used to perform global fitting on multiple sets of paired data, and the transformation matrix is ​​calculated.

[0023] The geometric position constraints are used to perform reprojection error checks on each pair of data, identify and remove outlier pixel coordinates whose reprojection errors exceed a preset threshold, and then perform global fitting again to update the transformation matrix.

[0024] In the above technical solution, firstly, a hand-eye calibration algorithm is used to process the collected multiple sets of machine coordinates. Pixel coordinate pairings are globally fitted to calculate the initial transformation matrix from the image coordinate system to the machine coordinate system. Subsequently, reprojection error is checked for each pair of data based on geometric position constraints. Through an iterative optimization framework of global fitting, outlier removal, and refitting, the advantages of classic hand-eye calibration algorithms in global optimal fitting are retained, while the posterior geometric constraint check effectively overcomes their sensitivity to outliers. The final transformation matrix is ​​entirely based on reliable data points, thus exhibiting higher accuracy and stronger robustness to various interferences that may occur during the acquisition process.

[0025] In some embodiments, controlling the nozzle to be calibrated to move relative to the upward-looking vision system, so that the nozzle to be calibrated is positioned in the central region of the visual optical axis of the upward-looking vision system for imaging, includes:

[0026] Control the relative displacement between the nozzle to be calibrated and the upward vision system in the Z-axis direction, so that the tip of the nozzle to be calibrated is at the same calibration focal plane height as when the coordinate transformation model was constructed;

[0027] The nozzle to be calibrated is controlled to move along the X and Y axes so that its theoretical center point is aligned with the center of the visual optical axis of the upward vision system.

[0028] In the above technical solution, by controlling the relative Z-axis displacement between the nozzle and the vision system, height deviations caused by nozzle wear, specification differences, or installation errors can be compensated, ensuring that the nozzle tip is always on the calibrated focal plane during imaging. Combined with XY-axis alignment optimization, this not only significantly improves the accuracy and reliability of single calibration but also guarantees high repeatability of calibration results, laying a solid foundation for achieving a fast, fully automated calibration process.

[0029] In some embodiments, identifying the actual pixel coordinates of the center of the nozzle to be calibrated from an image located in the central region of the visual optical axis includes:

[0030] Edge detection is performed on the image of the nozzle to be calibrated located in the central region of the visual optical axis to obtain the outline of the nozzle to be calibrated;

[0031] The contour is fitted with a circle to calculate the actual pixel coordinates of the center of the nozzle to be calibrated.

[0032] In the above technical solution, the edge detection algorithm identifies and marks pixels whose gray-level gradients exceed a preset threshold, and then connects them to form a contour line representing the outer boundary of the nozzle to be calibrated. After obtaining the contour line, the system performs a circle fitting operation on the discrete pixel set constituting the contour. The final output of the fitting calculation is the center coordinate of the circle, which is the actual pixel coordinate of the center of the nozzle to be calibrated. By statistically optimizing a large number of contour pixels, the circle fitting algorithm can overcome the discretization limitation of physical pixels in image sensors and calculate the sub-pixel level coordinates of the center of the circle, thereby achieving precise positioning beyond the resolution of physical pixels.

[0033] In some embodiments, feeding back the offset to the device motion control system for closed-loop correction includes:

[0034] The XY direction offset is used as a motion compensation value to update the coordinate reference of the nozzle to be calibrated in the motion control system of the device.

[0035] In the above technical solution, closed-loop correction is achieved by updating the underlying coordinate reference. Once the coordinate reference is updated, all native motion commands issued by upper-layer application software based on the theoretical model will be automatically and transparently superimposed with this compensation value before being executed by the motion controller. This avoids the tedious work of modifying a large amount of application-layer code and greatly simplifies system integration and maintenance.

[0036] In some embodiments, the timing for triggering the calibration of the nozzle to be calibrated includes at least one of the following:

[0037] Before the nozzle to be calibrated performs the printing task;

[0038] After completing the nozzle switching operation.

[0039] In the above technical solution, by triggering calibration before the nozzle to be calibrated performs a printing task, it is ensured that each job starts from a precise reference position. This effectively eliminates nozzle position deviations that may be caused by temperature drift, mechanical stress relaxation, or minor collisions during standby, movement, or environmental disturbances, thus providing a reliable initial accuracy guarantee for high-quality print output. By triggering calibration immediately after completing the nozzle switching operation, it is possible to compensate in real time for the mechanical repeatability error of the switching mechanism itself, as well as individual assembly differences and wear conditions of the nozzles. This enables plug-and-play and high-precision rapid switching of multi-nozzle systems, ensuring continuous accuracy of print jobs after switching.

[0040] In some embodiments, the theoretical mechanical coordinates are the coordinates of the visual optical axis center of the upward vision system in the device motion control coordinate system, serving as a unified calibration reference position for all nozzles to be calibrated.

[0041] In the above technical solution, by directly setting the calibration benchmark at a highly stable optical center, all nozzle measurements are compared with the same precisely calibrated physical space point. This method effectively avoids benchmark transfer errors introduced by the positioning error of the mechanical platform itself or multi-coordinate system transformation, thereby obtaining more reliable deviation measurement results and significantly improving the consistency and accuracy of calibration.

[0042] Secondly, this application provides an automatic XY calibration system for a multi-nozzle 3D printing device, comprising:

[0043] The vision acquisition unit includes a backward vision system positioned below the nozzle to be calibrated in the printing unit with the lens facing upward, for acquiring nozzle images;

[0044] A motion control unit is used to drive the printing unit to generate relative motion with the upward-looking vision system;

[0045] The processing unit is configured to perform the following operations: in response to a calibration trigger command, control the nozzle to be calibrated and the upward vision system to move to a target relative position according to theoretical mechanical coordinates, so that the nozzle to be calibrated is located in the center region of the visual optical axis of the upward vision system and acquires an image; identify the actual pixel coordinates of the center of the nozzle to be calibrated; convert the actual pixel coordinates into actual mechanical coordinates using a pre-stored coordinate transformation model; calculate the offset between the actual mechanical coordinates and the theoretical mechanical coordinates and feed it back to the motion control unit for closed-loop correction.

[0046] In the above technical solution, the vision acquisition unit, motion control unit, and processing unit form a complete automated closed loop for measurement, calculation, and compensation. The entire process requires no manual intervention, significantly improving the efficiency, accuracy, and consistency of multi-printer calibration, making it particularly suitable for applications requiring frequent printhead changes or high-precision multi-material printing.

[0047] In some embodiments, the upward vision system is equipped with a zone-controllable ring light source, and the processing unit is configured to: control the ring light source to illuminate at least one sub-region of the ring light source in a preset sequence and acquire multiple frames of images, and suppress or eliminate specular interference on the nozzle surface through image fusion.

[0048] In the above technical solution, the upward-looking vision system is equipped with a zone-controllable ring light source to suppress or eliminate the interference of nozzle surface highlights on imaging. The processing unit illuminates different sub-regions of the ring light source in a preset sequence (including independent illumination of a single sub-region or combined illumination of multiple sub-regions), and simultaneously acquires an image frame each time it is illuminated; by fusing the acquired multiple frames of images, the highlight areas caused by specular reflection are suppressed or eliminated, thereby obtaining a nozzle image with a clear outline.

[0049] Thirdly, this application provides a 3D printing device, including: the system described in the second aspect;

[0050] A nozzle assembly, comprising a reference nozzle and at least one nozzle to be calibrated;

[0051] A wiping component is disposed on the relative movement path of the nozzle device and is used to perform a wiping action on nozzles that are determined to be dirty.

[0052] In the aforementioned technical solution, by integrating a wiping component into the device, adhering substances on the nozzle tip can be automatically removed based on image judgment results. This eliminates the interference of dirt on visual recognition from the physical source, significantly improving the purity of calibration data and the accuracy of the final model. Combined with the built-in vision system, it eliminates the reliance on external calibration tools or printed test patterns, fundamentally avoiding recognition errors caused by calibration material contamination, ambient light fluctuations, or differences in printing material color. Furthermore, relying on the device's built-in vision system for calibration simplifies the overall device structure and reduces the complexity and cost of long-term maintenance. In addition, the entire calibration process can be executed fully automatically by the system without manual intervention, enabling rapid automatic calibration of the nozzle in the XY directions, improving efficiency and accuracy.

[0053] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0054] In the above technical solution, since the computer executes the instructions and the processor can implement the method in the first aspect, the reliance on external calibration tools or printed test patterns can be eliminated when automatically calibrating the nozzle in the XY direction. This fundamentally avoids recognition errors caused by calibration material contamination, ambient light fluctuations, or differences in the color of the printed material. Furthermore, it relies on the device's built-in vision system to complete the calibration, simplifying the overall structure of the device and reducing the complexity and cost of long-term maintenance.

[0055] The nozzle XY automatic calibration method, system, and device for 3D printing equipment provided in this application, when the calibration of the nozzle to be calibrated is triggered, firstly controls the relative movement between the nozzle to be calibrated and the upward-looking vision system according to the theoretical mechanical coordinates, so that the nozzle to be calibrated is constrained to the center area of ​​the visual optical axis for imaging. This step effectively eliminates the XY plane coordinate transformation error introduced in the perspective projection of the image due to the difference in Z-axis height of different nozzles, ensuring the consistency of the imaging reference. Subsequently, through a pre-calibrated, high-precision pixel coordinate-mechanical coordinate transformation model, the pixel coordinates of the nozzle center identified in the image are accurately converted into the actual mechanical coordinates under the equipment motion control coordinate system. The offset between the actual mechanical coordinates and the theoretical mechanical coordinates in the XY direction is calculated, and this deviation value is fed back to the equipment motion control system for real-time compensation of motion parameters, thus forming a simple and efficient closed-loop calibration. Based on this, this solution eliminates the dependence on external calibration tools or printed test patterns, fundamentally avoiding recognition errors caused by calibration material contamination, ambient light fluctuations, or differences in the color of printing materials. Furthermore, it relies on a built-in upward-looking vision system for calibration, simplifying the overall structure of the equipment and reducing the complexity and cost of long-term maintenance. In addition, the entire calibration process can be executed fully automatically by the system without manual intervention, enabling rapid automatic calibration of the nozzle in the XY direction, thus improving efficiency and accuracy. Attached Figure Description

[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0057] Figure 1 A flowchart illustrating the automatic nozzle XY position calibration method for the 3D printing equipment provided in this application. Figure 1 ;

[0058] Figure 2 A flowchart illustrating the automatic nozzle XY position calibration method for the 3D printing equipment provided in this application. Figure 2 ;

[0059] Figure 3 This is a schematic diagram of the discrete path provided in this application;

[0060] Figure 4 Schematic diagram of the automatic nozzle XY position calibration system for the 3D printing equipment provided in this application Figure 1 ;

[0061] Figure 5 Schematic diagram of the automatic nozzle XY position calibration system for the 3D printing equipment provided in this application Figure 2 .

[0062] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0064] In multi-nozzle 3D printing equipment, positional deviations between different nozzles due to installation errors, assembly errors, and disassembly / replacement processes can easily cause the actual printing position of each nozzle on the XY plane to deviate from its theoretical position. If this offset is not effectively calibrated, it will lead to interlayer misalignment, structural positional deviations, and a decrease in overall printing accuracy, severely affecting print quality.

[0065] Currently, the following methods are commonly used to calibrate the nozzle position in the XY direction:

[0066] (1) Printed test pattern calibration method

[0067] This method controls the nozzle to print specific test patterns (such as crosshairs, circles, or grid patterns) and uses a vision system to detect the patterns. Based on the detection results, the nozzle XY offset is calculated to achieve position compensation. However, this method relies heavily on basic image processing algorithms such as edge detection. In practical applications, it is easily affected by factors such as changes in ambient lighting, image noise, and differences in the color of the printing material, leading to a decrease in detection accuracy and thus affecting the accuracy of the calibration results.

[0068] (2) Calibration method based on calibration plate or marker points

[0069] By setting fixed calibration plates or markers inside the printing platform or equipment, and using cameras or sensors to identify these markers, a mapping relationship between the printhead coordinate system and the equipment coordinate system is established, thereby achieving printhead position calibration. However, this method requires the addition of dedicated calibration structures or markers, which not only increases the complexity of the equipment structure but may also occupy effective printing space; at the same time, once the calibration marks are contaminated, worn, or obstructed, the calibration accuracy will decrease significantly.

[0070] The existing technology has the following main drawbacks:

[0071] 1. The calibration process is highly sensitive to environmental conditions (such as light and material color) and has poor stability.

[0072] 2. Some calibration methods rely on additional calibration structures or markers, increasing equipment complexity and maintenance costs;

[0073] 3. When multiple nozzles are frequently disassembled or replaced, it is difficult to achieve fast and high-precision automatic calibration.

[0074] Therefore, how to provide a calibration method that can improve the XY calibration accuracy of the nozzle, reduce environmental impact, and enhance calibration stability has become a technical problem that urgently needs to be solved in this field.

[0075] To address this, this application proposes an automatic calibration method for the XY position of a nozzle in a 3D printing device. First, the relative motion between the nozzle to be calibrated and the upward-looking vision system is controlled according to theoretical mechanical coordinates, so that the nozzle to be calibrated is constrained to image in the central region of the visual optical axis. This step effectively eliminates the XY plane coordinate transformation error introduced in the perspective projection of the image due to the difference in Z-axis height of different nozzles, ensuring the consistency of the imaging reference.

[0076] Subsequently, using a pre-calibrated, high-precision pixel-to-machine coordinate transformation model, the pixel coordinates of the nozzle center identified in the image are accurately converted into actual machine coordinates in the equipment motion control coordinate system. The offset between these actual machine coordinates and the theoretical machine coordinates in the XY direction is calculated, and this deviation is fed back to the equipment motion control system for real-time compensation of motion parameters, thus forming a simple and efficient closed-loop calibration.

[0077] Based on this, this solution eliminates the reliance on external calibration tools or printed test patterns, fundamentally avoiding identification errors caused by calibration material contamination, ambient light fluctuations, or differences in printing material color. Furthermore, it relies on the device's built-in upward-looking vision system for calibration, simplifying the overall device structure and reducing the complexity and cost of long-term maintenance. In addition, the entire calibration process can be executed fully automatically by the system without manual intervention, enabling rapid automatic calibration of the nozzle in the XY directions, improving efficiency and accuracy.

[0078] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0079] To facilitate understanding of the solution in this application, some of the terms used in this application will be explained first:

[0080] Printing plane: refers to the plane in a 3D printing device where the printing platform is located, which is used to support the printed part.

[0081] Z-direction / Z-axis: refers to the direction perpendicular to the printing plane.

[0082] XY plane: refers to the plane parallel to the printing plane.

[0083] X-direction / X-axis and Y-direction / Y-axis: These refer to two mutually perpendicular orthogonal directions in the XY plane. The X-axis is usually parallel to the longer side of the equipment, and the Y-axis is parallel to the shorter side.

[0084] Upward-looking vision system: refers to a machine vision imaging device (such as an industrial camera and lens) that is fixedly installed below the printing platform or equipment base with the lens facing upward (i.e., towards the nozzle). As the core sensor of this solution, the upward-looking vision system is used to acquire images of the nozzle tip moving into its field of view from below, providing a data source for subsequent image processing and coordinate data.

[0085] The visual optical axis center refers to the intersection of the optical axis of the lens in a vision system viewed from below and the image plane of the camera's image sensor. This point corresponds to a fixed pixel position on the image (such as the image center) and is the theoretical point where the optical system experiences minimal distortion and the image is clearest. It should be noted that this center can be defined using the principal point of the image determined by a calibration algorithm.

[0086] The central region of the visual optical axis refers to the imaging area defined within a finite number of pixels adjacent to the center of the visual optical axis. Confining the nozzle to this region for imaging allows for full utilization of the optical system's optimal performance and ensures stable imaging geometry.

[0087] Coordinate transformation model: This refers to a precise mathematical mapping relationship established during the initial calibration phase of the system. This model describes the spatial correspondence between the visual system's image coordinate system (in pixels) and the device's motion control coordinate system (in physical lengths such as millimeters), typically represented by a transformation matrix (such as an affine transformation or perspective transformation matrix). This model is fundamental to converting visual measurement results into physical world coordinates.

[0088] Calibration focal plane height: refers to a fixed Z-axis coordinate value at which the reference nozzle tip is located when establishing the coordinate transformation model. In this application, "Z-axis height difference" refers to the deviation of the actual Z-axis position of the nozzle tip to be calibrated relative to this calibration focal plane height. All subsequent calibration measurements, by moving the nozzle tip to this height plane, can ensure the accuracy of the coordinate transformation relationship and eliminate perspective projection errors caused by Z-axis height differences between different nozzles in the XY plane coordinate calculation.

[0089] Theoretical center point: refers to the ideal spatial location of the geometric center of the circular cross section (i.e., nozzle tip) at the end of the nozzle to be calibrated, calculated based on the internal kinematic model of the equipment motion control system and the nozzle design parameters, in the equipment motion control coordinate system.

[0090] Theoretical mechanical coordinates: These refer to the target position control command values ​​generated by the equipment's motion control system to drive the movement of the nozzle to be calibrated. As the initial motion reference for the automatic calibration process, the control system first controls the movement of the nozzle to be calibrated based on these coordinates so that the upward-looking vision system can capture the initial image of the nozzle.

[0091] Actual pixel coordinates: refer to the two-dimensional position coordinates of the nozzle center on the image plane of the image sensor, which are accurately identified from the image acquired by the upward-looking vision system through image processing algorithms.

[0092] Actual mechanical coordinates: refers to the real physical spatial position of the center of the nozzle to be calibrated, obtained by transforming the actual pixel coordinates through a coordinate transformation model, and represented in the motion control coordinate system of the equipment.

[0093] XY offset: refers to the difference between the actual and theoretical mechanical coordinates in the X and Y axes. In the CoreXY architecture, this offset is automatically corrected by the control system through coordinated pulse compensation of motors A and B.

[0094] Closed-loop correction: This refers to using the calculated offset as a feedback signal and inputting it to the equipment's motion control system. The system automatically and continuously compensates for this deviation in all subsequent motion commands by updating internal parameters (such as coordinate system offset and kinematic compensation values), thus forming a measurement, calculation, and compensation feedback control loop to complete the calibration.

[0095] Figure 1 Flowchart of the automatic nozzle XY calibration method for the 3D printing equipment provided in this application Figure 1 ,like Figure 1 As shown, the method includes:

[0096] S101. When the calibration of the nozzle to be calibrated is triggered, the relative motion between the nozzle to be calibrated and the upward vision system is controlled according to the theoretical mechanical coordinates so that the nozzle to be calibrated is located in the central region of the visual optical axis of the upward vision system for imaging; the actual pixel coordinates of the center of the nozzle to be calibrated are identified from the image in the central region of the visual optical axis; wherein, constraining the nozzle to be calibrated to the central region of the visual optical axis for imaging is used to suppress the coordinate transformation error introduced in the perspective projection of the image due to the Z-axis height difference of the nozzle.

[0097] In 3D printing equipment with multiple nozzles, the actual physical position of each nozzle, especially the actual physical position of the nozzle tip in the Z-axis direction, is often uncertain. This Z-axis height difference has a wide range of causes: due to different specifications, machining tolerances, assembly errors, wear and tear, etc., it often differs from the theoretical design value. Because the vision system arranged from below follows the principle of perspective projection imaging, when the actual height of the nozzles is different, even if their tips are controlled to the same mechanical coordinate, their pixel coordinates on the image sensor will be significantly offset due to the height difference. This offset will be introduced as a systematic error in the subsequent conversion from pixel coordinates to mechanical coordinates, leading to the distortion of calibration results. Specifically, the obtained data is mixed with interference introduced by the height difference, and cannot accurately reflect the true positional deviation of the nozzle in the printing plane (XY plane), which seriously restricts the improvement of the overall printing accuracy of multi-nozzle equipment.

[0098] In this embodiment, the nozzle to be calibrated is controlled to generate relative motion with the upward-looking vision system based on theoretical mechanical coordinates. This allows the tip of the nozzle to enter the imaging field of view of the upward-looking vision system, confining its tip within the central region of the optical axis during imaging. This region corresponds to the portion in perspective projection where the projection ray is approximately perpendicular to the image plane. Its geometric characteristics are such that minute positional changes of the object along the optical axis (Z direction) have a negligible effect on the lateral (X / Y direction) displacement of its projection point on the image plane. Therefore, confining the imaging to this region is equivalent to establishing a highly insensitive imaging condition for all nozzles. Regardless of the actual installation height, wear level, or specifications of each nozzle, as long as its tip is guided to the central region of the visual optical axis for imaging, the positional difference of the tip image point in the captured image can be approximated as originating only from its actual positional deviation in the XY plane, while the perspective projection error caused by the Z-direction height difference is effectively masked.

[0099] Based on the above principles, the image data obtained by this method reflects the deviation in the XY plane relatively cleanly, laying a reliable foundation for subsequent high-precision compensation. Furthermore, this method fundamentally eliminates the systematic perspective error introduced by height differences, ensuring that nozzles at different heights can obtain consistent and accurate planar position calibration results, thereby guaranteeing the overall printing positioning accuracy and consistency of the equipment.

[0100] In some embodiments, the nozzle to be calibrated is controlled to produce a relative displacement with the upward vision system in the Z-axis direction, so that the tip of the nozzle to be calibrated is at the same calibration focal plane height as when the coordinate transformation model is constructed; the nozzle to be calibrated is controlled to move along the X-axis and Y-axis so that its theoretical center point is aligned with the visual optical axis center of the upward vision system.

[0101] In this embodiment, the relative distance between the nozzle to be calibrated and the upward vision system is first adjusted. The relative displacement can be achieved in ways including, but not limited to: 1) driving the nozzle to be calibrated to move along the Z-axis (e.g., the printing unit has a Z-axis compensation mechanism); 2) driving the component with the upward vision system to move along the Z-axis (e.g., in the CoreXY architecture, driving the printing platform with the upward vision system to move up and down along the Z-axis). Positioning the nozzle tip at the calibration focal plane height is a prerequisite for ensuring measurement validity. By compensating for Z-axis deviations introduced by differences in the nozzle's physical length, installation tolerances, or wear, the nozzle tip is physically returned to the exact same Z-height (i.e., calibration focal plane height) as during model calibration. This fundamentally replicates the perspective projection geometry during calibration, isolates the interference of Z-axis deviations on XY coordinate recognition, and ensures the accuracy of subsequent coordinate transformations.

[0102] Subsequently, the nozzle to be calibrated is moved along the X and Y axes so that the projection of its theoretical center point in the image aligns with the center of the optical axis of the upward-looking vision system. This step, after compensating for the Z-height deviation, actively optimizes the imaging position to the central region of the optical axis. On the one hand, it fully utilizes the characteristic that the imaging quality is best in the central field of view of the optical system, improving the accuracy of image feature extraction; on the other hand, imaging near the center of the optical axis makes the perspective projection effect most stable, which can further suppress any small residual height error from interfering with coordinate transformation, providing a high-quality, low-noise visual signal for subsequent processing.

[0103] This technical strategy, by combining a unified Z-axis reference with optimized XY imaging positions, not only significantly improves the accuracy and reliability of single calibrations but also ensures high repeatability of calibration results, laying a solid foundation for achieving a fast and fully automated calibration process.

[0104] It is understandable that the above control process can be manifested as step-by-step motion or as a single compound motion. Regardless of the motion method used, the goal is to ensure that when the nozzle to be calibrated moves to the target imaging position, its tip height is at the height of the calibrated focal plane, and its projection in the XY plane falls into the central region of the visual optical axis, thereby actively creating a highly insensitive imaging environment during the image acquisition stage.

[0105] In some embodiments, the theoretical mechanical coordinates, as the coordinates corresponding to the center of the visual optical axis of the upward-looking vision system in the device motion control coordinate system, serve as a unified calibration reference position for the nozzle to be calibrated.

[0106] In a looking-up vision system, the center of the optical axis is a fixed and well-defined optical reference point, which typically corresponds to the image center (or a precisely calibrated center position) in the vision system's image coordinate system. By performing high-precision system hand-eye calibration beforehand, the coordinates (at least the X and Y axis coordinates) of this optical axis center point in the device's motion control coordinate system can be accurately obtained. These coordinates are defined as the theoretical mechanical coordinates.

[0107] Therefore, when calibrating multiple nozzles, it is not necessary to set different target coordinates for each nozzle based on its theoretical design position. Instead, all nozzles are uniformly instructed to move to the same theoretical mechanical coordinate for imaging and measurement. When the equipment's motion control system drives a nozzle to be calibrated to move to this unified coordinate, ideally, the theoretical center point of the nozzle should be exactly located on the optical axis centerline of the vision system.

[0108] This embodiment sets the calibration benchmark directly at a highly stable optical center, ensuring that all nozzle measurements are compared to the same precisely calibrated physical space point. This method effectively avoids benchmark transfer errors introduced by the mechanical platform's own positioning errors or multi-coordinate system transformations, thereby obtaining more reliable deviation measurement results and significantly improving calibration consistency and accuracy.

[0109] It is understood that using theoretical mechanical coordinates as a unified calibration benchmark is only one exemplary implementation. In other possible implementations, the calibration benchmark position may also be defined using other forms of coordinates or reference points, depending on the system design, accuracy requirements, or application scenario, such as based on fixed physical markers on the mechanical platform, or reference positions determined by multi-sensor fusion, etc.

[0110] In some embodiments, the timing for triggering calibration of the nozzle to be calibrated includes at least one of the following: before the nozzle to be calibrated performs a printing task; or after the nozzle switching operation is completed.

[0111] By triggering calibration before the nozzle to be calibrated performs a printing task, it ensures that each job starts from a precise reference position, effectively eliminating nozzle position deviations that may occur during standby, movement, or environmental disturbances due to temperature drift, mechanical stress relaxation, or minor impacts. By triggering calibration immediately after completing the nozzle switching operation, it can compensate in real time for the mechanical repeatability errors of the switching mechanism (such as the slide, turret, etc.), as well as individual nozzle assembly differences and wear conditions. This enables plug-and-play and high-precision rapid switching of multi-nozzle systems, ensuring continuous accuracy of printing jobs after switching.

[0112] It is understood that the above triggering timings are merely examples. In actual systems, the timing of triggering the calibration process can be preset, event-driven, or condition-triggered. The core principle is that the system can automatically or semi-automatically initiate the calibration procedure when critical states affecting printing accuracy change, ensuring that the nozzles are always in a controlled, high-precision operating state. For example, triggering timings can also include: periodic triggering based on cumulative running time, triggering based on significant changes in ambient temperature, triggering based on equipment vibration or collision event detection, triggering based on online print quality monitoring feedback, or triggering in response to user manual commands and remote control commands, etc.

[0113] In this embodiment of the application, after controlling the nozzle to be calibrated and the upward vision system to reach the target relative position and perform imaging, the actual pixel coordinates of the center of the nozzle to be calibrated are identified from the image of the nozzle to be calibrated being located in the central region of the visual optical axis.

[0114] It should be noted that the actual pixel coordinates refer to the two-dimensional position coordinates of the circular cross section at the end of the nozzle (i.e., the center of the nozzle) on the image plane of the image sensor, which are accurately identified and calculated by the image processing algorithm from the image acquired by the upward-looking vision system, where the nozzle to be calibrated is located in the central region of the visual optical axis.

[0115] In this embodiment, the upward-looking vision system acquires an image of the nozzle located in the central region of the optical axis. Based on the image acquired by the upward-looking vision system when the nozzle to be calibrated is in the central region of the optical axis, the actual pixel coordinates of the nozzle's center are identified. It should be noted that, ideally, when the nozzle and the upward-looking vision system are in a preset theoretical target relative position, its center should appear in the image at a expected theoretical pixel coordinate position (e.g., the exact center of the image). However, due to the aforementioned mechanical errors, the actual physical position of the nozzle shifts, causing its actual imaging position in the image to deviate from the theoretical position. This point, identified by the algorithm and reflecting the nozzle's true imaging position, is the actual pixel coordinate.

[0116] For example, using an image processing algorithm, the actual pixel coordinates of the center of the nozzle to be calibrated are identified from an image in which the nozzle is located in the center region of the visual optical axis.

[0117] In some embodiments, edge detection is performed on an image of the nozzle to be calibrated located in the central region of the visual optical axis to obtain the outline of the nozzle to be calibrated; the outline is then fitted with a circle to calculate the actual pixel coordinates of the center of the nozzle to be calibrated.

[0118] Image processing algorithms (such as the Canny operator and the Sobel operator) are used to analyze the grayscale gradient changes of each pixel in the image. Due to the significant grayscale difference between the nozzle tip (usually made of metal) and the background, the grayscale values ​​of pixels at its edges change drastically. Edge detection algorithms identify and mark these pixels whose grayscale gradients exceed a preset threshold, and then connect them to form a contour line representing the outer boundary of the nozzle to be calibrated.

[0119] After obtaining the contour line, the system performs a circle fitting operation on the discrete pixel set that constitutes the contour. The final output of the fitting calculation, the coordinates of the circle center, is the actual pixel coordinate of the center of the nozzle to be calibrated. By statistically optimizing a large number of contour pixels, the circle fitting algorithm can overcome the discretization limitations of physical pixels in image sensors, calculate the sub-pixel coordinates of the circle center, and achieve precise positioning.

[0120] For example, a circle fitting algorithm based on the least squares principle can be used. The goal of this algorithm is to find an optimal ideal circle model parameter (center coordinates and radius) that minimizes the sum of the squared geometric distances from the circle to all pixels on the contour.

[0121] It is understandable that, in addition to the aforementioned example of identifying the actual pixel coordinates of the center of the nozzle to be calibrated by combining edge detection with circle fitting, a feature point detection algorithm can also be used to detect multiple key feature points on the circular edge of the nozzle. Then, the optimal center and radius can be estimated from these feature points using a random sampling consensus algorithm or a direct least squares method.

[0122] S102. Based on the coordinate transformation model from the image coordinate system of the vision system to the motion control coordinate system of the equipment, the actual pixel coordinates of the center of the nozzle to be calibrated are converted into actual mechanical coordinates; the XY offset between the actual mechanical coordinates and the theoretical mechanical coordinates of the nozzle to be calibrated is calculated, and the offset is fed back to the equipment motion control system for closed-loop correction to calibrate the nozzle to be calibrated.

[0123] In this embodiment, the actual pixel coordinates output by the vision system exist only at the image information level and cannot be directly recognized and used by the device motion control system. Through a pre-calibrated coordinate transformation model, these coordinates can be converted into actual mechanical coordinates that the device motion control system can recognize and that have clear physical meaning.

[0124] Subsequently, by calculating the difference between the actual and theoretical mechanical coordinates, the equipment motion control system can accurately quantify the overall positional error of the nozzle in the XY plane. This error may originate from various factors such as machining and assembly tolerances, nozzle installation deviations, and mechanical wear or thermal deformation caused by long-term operation. Calculating the offset is the quantification of this error.

[0125] After the calculated offset is fed back to the equipment's motion control system, the system stores it as a compensation parameter specific to that nozzle. Since the offset reflects the nozzle's inherent positional deviation, this compensation operation ensures that the nozzle's actual tip ultimately reaches the intended position precisely. The essence of calibration is not physically adjusting the nozzle itself, but rather eliminating its inherent positional deviation through intelligent compensation by the motion control software, achieving alignment between the theoretical and actual positions.

[0126] This method constructs a complete closed-loop system encompassing perception, decision-making, and execution. The equipment can autonomously identify errors, calculate compensation amounts, and execute corrections, effectively addressing accuracy drift caused by temperature rise, vibration, or wear, and significantly improving the accuracy retention and reliability of the equipment during long-term operation.

[0127] In some embodiments, the offset in the XY direction is used as a motion compensation value to update the coordinate reference of the nozzle to be calibrated in the device motion control system.

[0128] In a motion control system, a coordinate reference is a positional reference origin or zero offset parameter defined for a specific motion axis or actuator. For multi-nozzle systems, each nozzle can be associated with an independent coordinate reference. Update operations are typically achieved by setting the user coordinate system offset or modifying kinematic compensation parameters, writing the XY direction offsets to the corresponding parameter storage area of ​​the device's motion control system.

[0129] This embodiment achieves closed-loop correction by updating the underlying coordinate reference. Once the coordinate reference is updated, all native motion commands issued by upper-layer application software (such as printing control and path planning software) based on the theoretical model will be automatically and transparently superimposed with this compensation value before being executed by the motion controller. This avoids the tedious work of modifying a large amount of application-layer code and greatly simplifies system integration and maintenance.

[0130] It is understood that updating the coordinate reference is only one exemplary implementation. Closed-loop correction can also be implemented in other ways, such as setting a global offset register for a specific nozzle (or motion axis) within the motion controller. When the controller executes any motion command from the upper layer, it automatically reads the offset from this register and adds it to the current command, thereby achieving an equivalent compensation effect.

[0131] For example, when a calibration command is triggered, the system controls the nozzle to be calibrated to move relative to the upward-looking vision system, bringing the nozzle to the center of the upward-looking vision system's field of view. Then, imaging and calculation are performed, and the system returns to continue printing after completion. This interruption, movement, calibration, and resumption mode is key to achieving in-situ, real-time measurement of the nozzle in the working state, ensuring that the calibration results accurately reflect the actual deviation during printing.

[0132] The above technical solution employs a two-stage calibration strategy combining coarse positioning and precise measurement to calibrate the nozzle to be calibrated. Specifically:

[0133] First, a rough positioning is performed: based on the theoretical mechanical coordinates of the nozzle, the system controls the relative displacement between the nozzle to be calibrated and the upward-looking vision system, so that the nozzle to be calibrated enters the field of view of the upward-looking vision system. At this time, although the nozzle to be calibrated has entered the acquisition area of ​​the upward-looking vision system, due to mechanical installation and assembly errors, its imaging position may deviate from the image center (i.e., the visual optical axis center of the upward-looking vision system).

[0134] Subsequently, precise measurement is performed: the system identifies the current position of the nozzle to be calibrated in the image through image processing, and controls the nozzle to generate further relative displacement with the upward-looking vision system, so that the nozzle image is precisely moved to the center region of the image (i.e., the center of the visual optical axis). This step ensures that the nozzle is aligned with the center of the optical axis of the upward-looking vision system, thereby allowing measurement under a unified, high-precision visual reference. Based on this, the system determines the mechanical position of the equipment motion control system when the nozzle image is precisely aligned with the center as the actual mechanical coordinates, and calculates the deviation between the actual mechanical coordinates and the theoretical mechanical coordinates in the XY plane based on a pre-established high-precision coordinate transformation model, finally generating compensation parameters for motion control, completing the calibration.

[0135] This method uses the optical axis center of the upward-looking vision system as a constant measurement benchmark, avoiding errors introduced by traditional methods due to calibration contamination, uneven lighting, or material color differences. Simultaneously, the two-stage calibration strategy balances calibration speed and final accuracy, making it particularly suitable for scenarios with frequent multi-nozzle changes. It enables fast, stable, and high-precision automatic calibration, effectively improving the overall printing accuracy and reliability of multi-nozzle 3D printing equipment.

[0136] For example, the coarse positioning step also includes a fault-tolerant mechanism: if the nozzle fails to appear in the vision system's field of view after the initial movement due to excessive installation deviation, the system will automatically initiate a rapid search process. This process controls the orderly relative movement and real-time image detection between the nozzle and the upward-looking vision system within a preset extended area until the nozzle features are successfully identified in the image, thereby redirecting it to the effective measurement position and ensuring the robustness and continuity of the calibration process.

[0137] Figure 2 Flowchart of the automatic nozzle XY calibration method for the 3D printing equipment provided in this application Figure 2 ,like Figure 2 As shown, in Figure 1 Based on this, the automatic nozzle XY calibration method for 3D printing equipment provided in this application embodiment further includes:

[0138] S201. Control the reference nozzle of the printing equipment to generate relative motion with the upward vision system, so that the reference nozzle can image at multiple different mechanical coordinate points along a preset discrete path within the field of view of the upward vision system, and extract the pixel coordinates of the center of the reference nozzle in the image corresponding to each mechanical coordinate point.

[0139] In this embodiment, a reference nozzle is selected, whose mechanical and geometric characteristics (such as tip roundness and dimensional consistency) are known and good, and serves as a reference for the calibration process. The movement of this reference nozzle is assumed to be precise and controllable, and its imaging features are stable and repeatable.

[0140] The reference nozzle is controlled to generate relative motion with the upward-looking vision system, so that the reference nozzle moves along a preset discrete path within the field of view of the upward-looking vision system. The discrete path refers to a series of coordinate points pre-planned in the motion control coordinate system. These points are evenly distributed within the mechanical motion range corresponding to the field of view of the vision system to fully cover all possible positions of the nozzle during subsequent actual calibration.

[0141] At each preset mechanical coordinate point along the discrete path, the control system pauses the relative motion between the reference nozzle and the upward-looking vision system, which then acquires a clear image of the reference nozzle. Image processing algorithms (such as edge detection, ellipse fitting, or template matching) are used to precisely extract the position of the reference nozzle's center in the image coordinate system (in pixels) from each image.

[0142] This yields a paired dataset. Taking the i-th coordinate point as an example, it includes mechanical coordinates (Xi, Yi, Zi) and pixel coordinates (ui, vi). The Zi coordinate corresponds to the relative position of the nozzle tip and the upward-looking vision system at a preset calibrated focal plane height. The fundamental purpose of this step is to provide a data source for subsequently establishing a precise mathematical mapping relationship between the motion control coordinate system and the image coordinate system.

[0143] For example, the number of mechanical coordinate points can range from a few to dozens or even hundreds. The more points there are and the wider their distribution, the more accurate the final mapping model will be, and the better it can fit the optical distortion of the vision system (such as lens distortion) and the nonlinear error of the mechanical system.

[0144] In some embodiments, multiple different mechanical coordinate points are distributed in a 3x3 grid within the field of view of the upward-looking vision system. The 3x3 grid distribution means that each mechanical coordinate point is located at one of nine characteristic positions within a rectangle, including the four vertices, the midpoints of the four sides, and the center point of the rectangle. Figure 3 As shown.

[0145] The nine-grid layout offers excellent spatial coverage on a two-dimensional plane. The four vertices and the midpoints of the four sides effectively cover the edges and boundary regions of the field of view, areas typically characterized by significant optical distortion (such as pincushion or barrel distortion). The center point represents the core region with the best optical quality and least distortion within the field of view. This distribution ensures that the sampling points simultaneously capture the differences in imaging characteristics between the center and edges of the field of view. While maintaining calibration accuracy, it significantly improves data acquisition efficiency and shortens calibration time. Furthermore, the symmetrical and regular distribution helps balance the data weights of different regions during the fitting process, preventing poor model fitting in local areas due to uneven sampling point distribution.

[0146] It is understood that the nine-grid distribution is merely an exemplary implementation. Depending on different accuracy requirements, system characteristics, or efficiency considerations, other coordinate point distributions can be used, such as: grid-like uniform distribution, concentric circular ring distribution, etc. Grid-like uniform distribution arranges more sampling points in a rectangular area corresponding to the field of view according to an equally spaced grid, providing denser and more uniform data. Concentric circular ring distribution arranges sampling points at equal intervals on multiple concentric circles of different radii, with the center of the field of view as the center. This distribution method is beneficial for separating and accurately calibrating the radial distortion of the lens.

[0147] In some embodiments, after extracting the pixel coordinates corresponding to each mechanical coordinate point, morphological detection is performed on the image of the reference nozzle; if the morphological detection determines that the reference nozzle is dirty, the calibration process is interrupted, and the reference nozzle is controlled to generate relative movement with the wiping area to perform the wiping operation. After wiping is completed, the imaging and extraction steps of that point are re-executed.

[0148] Morphological inspection aims to analyze the morphological features of the reference nozzle in the image (such as the integrity of the contour, the smoothness of the edges, the symmetry of the area, etc.) to determine whether there are adhering substances, residual materials, or other forms of dirt at its tip. If the morphological inspection results (e.g., abnormal protrusions in the contour, significant edge burrs, or the shape of the area deviating from the standard circle or ellipse) indicate that the reference nozzle is dirty, the system will automatically interrupt the current calibration process.

[0149] Subsequently, the control system drives the reference nozzle to move relative to the preset wiping area (for example, moving the reference nozzle to a cleaning station equipped with a wiping cloth, scraper, or cleaning solvent; furthermore, wiping may be heated), performing the wiping or cleaning operation. After cleaning is completed and the nozzle shape is confirmed to have returned to an acceptable state, the system controls the reference nozzle and the upward vision system to re-align with the target relative position corresponding to the mechanical coordinate point, and performs the imaging and pixel coordinate extraction steps again to ensure the accuracy and reliability of the acquired data.

[0150] In this embodiment, measurement errors caused by poor nozzle condition can be eliminated at the source, ensuring the purity of the calibration dataset and thus improving the accuracy of the final coordinate transformation model. Simultaneously, this mechanism reduces calibration failures or accuracy degradation due to nozzle contamination, lowers reliance on operator experience, and enhances the long-term stability of the equipment.

[0151] In one possible implementation, morphological detection includes at least one of the following: roundness, symmetry, and heterochromatic connected regions.

[0152] Roundness analysis calculates the roundness index of the nozzle tip profile. This can be done by calculating the roundness of the profile area and perimeter, or by analyzing the ratio of its major and minor axes through ellipse fitting. A clean nozzle tip should appear as a near-perfect circle when viewed from above. If the calculated roundness value is lower than a preset roundness threshold, it indicates that the profile has depressions, protrusions, or irregular deformations, suggesting the possible presence of deposits or physical damage.

[0153] Symmetry analysis is used to assess the degree of symmetry of a profile relative to its geometric center or principal axis, for example, by calculating the mirror symmetry of the profile about the center of its smallest circumcircle or the center of its fitted ellipse. A clean nozzle profile should have high rotational or axial symmetry. If the symmetry measurement does not reach a preset symmetry threshold, it indicates a unilateral anomaly in the profile, possibly caused by residue adhering to one side.

[0154] Dissimilar color connected region detection refers to detecting, within or at the edge of a segmented nozzle area, the presence of connected pixel regions that differ significantly from the nozzle body in color or grayscale value. For example, residual cured material or other contaminants may exhibit different optical properties. Detecting such dissimilar color connected regions (e.g., the area of ​​the dissimilar region exceeds a preset pixel threshold) directly indicates the presence of dirt.

[0155] When the above analysis reveals that the roundness or symmetry of the profile does not reach the preset threshold, the system determines that the reference nozzle is dirty.

[0156] It's important to note that roundness and symmetry analysis directly measures the geometric integrity of the nozzle tip. Dirt (such as filaments, drips, or clumps) typically disrupts the originally smooth, regular circular contour, causing it to become irregular or asymmetrical. By setting a geometric threshold, such morphological anomalies can be sensitively detected. Dissimilar color connectivity detection targets the differences in optical properties between contaminants and the nozzle body material. Even if contaminants do not significantly alter the contour shape, differences in color, brightness, or texture will create regions in the image that are connected to the main nozzle area but have significantly different grayscale / color statistical characteristics. This detection method effectively complements geometric feature detection. Roundness and symmetry analysis primarily captures dirt that affects the contour shape, while dissimilar color connectivity detection excels at identifying dirt adhering to the surface but not significantly altering the contour. Combining these three methods constructs a multi-dimensional, complementary dirt detection system, significantly improving detection coverage and reliability while reducing missed detections.

[0157] S202. By utilizing the geometric position constraints between multiple sets of mechanical coordinates and pixel coordinates, after identifying and eliminating outlier pixel coordinate values, a coordinate transformation model from the visual image coordinate system to the equipment motion control coordinate system is constructed.

[0158] It should be noted that the upward-looking vision system is positioned below the printing platform or equipment base and is used to optically image the nozzle tip located within the focal plane directly above it. As a complete optical measurement unit, the performance of this system is determined by both internal parameters (such as focal length, principal point, and distortion coefficient) and external parameters (position and orientation relative to the equipment's world coordinate system).

[0159] The visual image coordinate system is a pixel coordinate system defined on the two-dimensional digital images acquired by the system. This coordinate system is a direct output of the optical projection model, mapping three-dimensional spatial points to two-dimensional image points (with the loss of depth information), thus forming a digital benchmark for the system to observe and measure the physical world.

[0160] The equipment motion control coordinate system (also known as the machine coordinate system or world coordinate system) is a three-dimensional right-handed Cartesian coordinate system fixed to the mechanical body of the equipment. Its origin and axes are established based on the physical reference of the equipment (such as the machine tool zero point), and the coordinate unit can be millimeters. This coordinate system is the absolute spatial reference system of the motion control system, and the target position of all printing units is specified using theoretical mechanical coordinates defined in this coordinate system. The motion control system drives each axis to make the actual physical position of the printing unit (nozzle tip) approach this commanded coordinate system. Therefore, the equipment motion control coordinate system constitutes a unified position map and command reference for controlling any spatial movement of the printing unit.

[0161] In this embodiment of the application, the geometric position constraint between multiple sets of mechanical coordinates and pixel coordinates refers to the projection geometric relationship that should be satisfied between multiple mechanical coordinate points that have a certain geometric relationship in physical space and their corresponding pixel coordinate points in the image, in order to detect and exclude abnormal pixel coordinate data that do not conform to the relationship.

[0162] For example, given a mechanical coordinate system with nine points arranged in a 3x3 grid, when these points are projected onto an image coordinate system, their pixel coordinates should generally maintain the corresponding geometric relationships. Anomalies can be identified through one or more of the following methods: 1) Local straight-line fitting test: Fit three points in each row and column. If the residual of a point is significantly greater than that of other points in the same group, it is considered an anomaly; 2) Relative position topology check: Check the sequential relationship of points. For example, the u value should increase from left to right, and the v value should increase from top to bottom. If a point violates the above rules, it is judged as an anomaly; 3) Distance ratio consistency analysis: If the pixel distance between a point and its adjacent points deviates abruptly from the continuous change pattern, the point may be an anomaly; 4) Symmetry deviation assessment: Check whether the pixel coordinate difference of symmetrical point pairs (such as the upper left and lower right) conforms to the global symmetrical distribution pattern.

[0163] When identifying and removing outliers, geometric position constraints are implemented by calculating the deviation between the ratio of Euclidean distance between adjacent sampling points in the image coordinate system and the ratio of physical distance in the machine coordinate system. Specifically, the system first performs preliminary fitting based on the collected raw data. When the reprojection error of a sampling point deviates from three times the standard deviation of the global fitting residual (3-sigma principle), it is identified as an outlier and removed. After removing outliers, the remaining reliable data points are used to construct the final coordinate transformation model, thereby ensuring that the established mapping relationship has higher accuracy and robustness.

[0164] In some embodiments, a hand-eye calibration algorithm is used to perform global fitting on multiple sets of paired data to calculate the transformation matrix; geometric position constraints are used to perform reprojection error verification on each set of paired data, identify and remove outlier pixel coordinates with reprojection errors exceeding a preset threshold, and then global fitting is performed again to update the transformation matrix.

[0165] First, a hand-eye calibration algorithm (e.g., based on a two-dimensional affine transformation or perspective transformation model) is used to globally fit multiple sets of machine coordinate-pixel coordinate paired data to calculate the initial transformation matrix from the image coordinate system to the machine coordinate system. This step minimizes the overall projection error of all data points through optimization methods such as the least squares method.

[0166] Subsequently, a reprojection error check is performed on each pair of data based on geometric position constraints. Specifically, the mechanical coordinates are back-projected onto the image coordinate system using an initial transformation matrix to obtain the corresponding theoretical pixel coordinates; the Euclidean distance between these theoretical pixel coordinates and the actually extracted pixel coordinates is calculated, i.e., the reprojection error. The system presets an error threshold, identifies and removes pairing data whose reprojection error exceeds this threshold. Such data is considered to be outlier pixel coordinate values ​​caused by factors such as nozzle surface contamination, reflective interference, or instantaneous motion jitter.

[0167] It should be noted that the geometric constraint mechanism here is not an inherent part of the standard hand-eye calibration algorithm, but rather a detection method specifically designed for outliers that may appear in nozzle visual calibration scenarios. This mechanism uses spatial relationships such as relative distance and collinearity that should be satisfied between sampling points as the criteria for discrimination, thereby achieving accurate identification and filtering of abnormal data.

[0168] After removing outliers, the system re-fits the global data using the remaining reliable data and updates the transformation matrix. This process can be executed iteratively until the reprojection error of all data meets the preset requirements, thereby obtaining a stable and high-precision coordinate transformation model.

[0169] By employing an iterative optimization framework of global fitting, outlier removal, and refitting, this method retains the advantages of classic hand-eye calibration algorithms in global optimal fitting while effectively overcoming their sensitivity to outliers through posterior geometric constraint verification. The final transformation matrix is ​​entirely based on fitting reliable data points, thus exhibiting higher accuracy and stronger robustness to various disturbances that may occur during the acquisition process.

[0170] It should be noted that combining hand-eye calibration with discrete sampling offers the advantage of achieving a balance between calibration accuracy, efficiency, and robustness through a systematic and structured data acquisition and processing workflow. Discrete sampling covers the entire working area with a limited but representative number of spatial points, providing a sufficient and balanced data foundation for hand-eye calibration. Hand-eye calibration, in turn, integrates these discrete points into continuous and accurate coordinate transformation relationships through mathematical models. This combination avoids the time cost of dense sampling across the entire field of view and overcomes the limitation of single-point or small-point calibration in characterizing system nonlinear errors, thus forming an efficient and reliable calibration paradigm.

[0171] In one specific implementation, a combination of nine-grid discrete sampling and hand-eye calibration can be used, with the specific steps as follows:

[0172] The reference nozzle of the printing equipment moves to multiple preset mechanical coordinate points in a nine-grid distribution pattern within the field of view of the upward-looking vision system and images them respectively. The pixel coordinates of the center of the reference nozzle are extracted from the image corresponding to each coordinate point, thus obtaining a series of mechanical coordinate-pixel coordinate pairing data. Subsequently, a hand-eye calibration algorithm (such as one based on affine transformation or homography matrix model) is used to globally fit all the pairing data to calculate the initial transformation matrix from the image coordinate system to the mechanical coordinate system. Further, based on geometric position constraints, a reprojection error check is performed on each set of data: the mechanical coordinates are back-projected to the image coordinate system using the initial transformation matrix to obtain the theoretical pixel coordinates, and the Euclidean distance between them and the actual extracted pixel coordinates is calculated as the reprojection error. Abnormal data points with reprojection errors exceeding a preset threshold are identified and removed. After removing the outliers, the remaining valid data is used to re-fit the global data and update the transformation matrix, thereby obtaining a high-precision and high-reliability coordinate transformation model.

[0173] Applying the classic mathematical model of hand-eye calibration to the field of 3D printing nozzle calibration, and combining it with a nine-grid discrete sampling strategy, represents an innovative application for the specific scenario of 3D printing nozzle calibration. Furthermore, introducing geometric constraints based on spatial relationships for outlier identification and removal significantly improves the anti-interference capability of the calibration process and the accuracy of the final model by actively detecting and eliminating outliers caused by nozzle contamination, reflections, or image misidentification.

[0174] For example, suppose the system collects 10 sets of machine coordinate-pixel coordinate paired data. First, the system performs a global fitting on these 10 sets of data using a hand-eye calibration algorithm to obtain an initial coordinate transformation matrix. Then, the reprojection error of each data point is calculated based on this matrix. If the analysis reveals that the reprojection error of two data points is significantly higher than the others (e.g., the error exceeds 3 pixels), the system determines these two points as outliers and removes them from the dataset. Subsequently, the system re-performs hand-eye calibration using the remaining 8 reliable data points and performs a global fitting to obtain an updated coordinate transformation matrix. Upon verification, the reprojection error of all data points is now below a preset threshold, indicating that the coordinate transformation model has reached a stable and reliable state, and the model establishment is complete.

[0175] For example, a hand-eye calibration algorithm is used to globally fit multiple sets of paired data to calculate the transformation matrix. The input to this step is the multiple sets of paired data collected earlier. Each set of data includes mechanical coordinates in a known device motion control coordinate system, and pixel coordinates in a visual image coordinate system extracted from the corresponding image through image processing.

[0176] In this embodiment, the hand-eye calibration algorithm specifically refers to a mathematical model algorithm used to solve for the coordinate transformation relationship in two-dimensional or three-dimensional space, preferably including an affine transformation model or a homography matrix model. The affine transformation matrix (usually represented as a 2×3 matrix or a 3×3 matrix in homogeneous coordinates) can describe the translation, rotation, scaling, and tangency relationships between two two-dimensional coordinate systems, and its parameters directly correspond to factors such as installation offset, angular deviation, and pixel physical size differences in the physical world. The homography matrix (3×3 matrix), based on the affine transformation, can further describe perspective transformation, and is suitable for installation situations where the camera optical axis is not completely perpendicular to the motion plane, thus having wider applicability.

[0177] When using hand-eye calibration algorithms for global fitting, the process doesn't rely solely on individual data points. Instead, it treats all collected valid paired data as a single dataset for processing. Least squares or other optimization algorithms are used to find an optimal transformation matrix (i.e., coordinate transformation model) that minimizes the overall error in describing the mapping from all mechanical coordinates to the corresponding pixel coordinates. Mathematically, this process aims to solve for a set of matrix parameters that minimizes the sum of squared errors between the predicted pixel coordinates (obtained through matrix calculations) and the actual measured pixel coordinates for all data points. The fitting calculation ultimately outputs a definitive transformation matrix that fully encompasses the geometric transformation parameters, such as translation, rotation, and scaling, involved in the transformation from the device motion control coordinate system to the visual image coordinate system.

[0178] It should be noted that when the reference nozzle moves along a preset discrete path, the multiple mechanical coordinate points it reaches are all located on the same target plane (i.e., the same preset Z-axis height). This target plane is mechanically defined as the virtual plane swept by the nozzle tip in space when the print head moves within the XY plane. The optical axis of the vision system (looking up at the camera) is perpendicular to this plane or at a fixed angle, thus structurally ensuring that the relative height between the nozzle and the camera remains constant during all calibration imaging. This is the physical basis for subsequent precise analysis using geometric constraints and for constructing an effective two-dimensional coordinate transformation model.

[0179] In the above technical solution, the reference nozzle is controlled to move and image along a preset discrete path within the field of view of the upward-looking vision system. This ensures that the calibration points are uniformly and systematically distributed within the camera's field of view, avoiding excessive concentration of data points at the center of the field of view. This ensures that the final fitted coordinate transformation model has consistent high accuracy throughout the entire effective field of view. Furthermore, this sampling method can fully capture the nonlinear errors caused by lens distortion and perspective projection at the edges of the field of view, providing the model with sufficient information to accurately describe the complex geometric mapping relationship from the image coordinate system to the machine coordinate system.

[0180] By utilizing the geometric positional constraints (such as collinearity, symmetry, and spacing ratio) that should be satisfied between multiple sets of mechanical coordinates and pixel coordinates, outliers can be identified and eliminated. This can effectively identify erroneous pixel coordinates caused by nozzle surface contamination, instantaneous reflection, image noise, or fluctuations in feature extraction, preventing these abnormal data from polluting the model fitting process and ensuring the accuracy and stability of coordinate transformation relationships.

[0181] The two features are not simply superimposed, but rather form a mutually reinforcing synergistic closed loop: the pre-defined discrete paths have strict, known geometric relationships in the mechanical coordinate system, providing a precise spatial reference for subsequent geometric constraint checks. While the systematically collected data is comprehensive, it may still contain flaws caused by occasional interference. The geometric constraint mechanism acts as the final quality filter, performing consistency checks on each data point to ensure that every data point used for final modeling conforms to the projection laws of physical space. Through the deep integration of systematic data collection (discrete paths) and intelligent quality control (geometric constraints), the accuracy of the coordinate transformation model is improved.

[0182] Figure 4 and Figure 5 This is a schematic diagram of the automatic XY calibration system for the multi-nozzle 3D printing equipment provided in this application. Figure 4 and Figure 5 As shown, the nozzle XY automatic calibration system 40 of the multi-nozzle 3D printing equipment provided in this embodiment includes:

[0183] The vision acquisition unit 41 includes a backward vision system 2 positioned below the printing unit (which includes a nozzle to be calibrated) with its lens facing upward, for acquiring nozzle images;

[0184] Motion control unit 42 is used to drive the printing unit to generate relative motion with the upward vision system;

[0185] Processing unit 43 is configured to perform the following operations:

[0186] In response to the calibration trigger command, the nozzle to be calibrated and the upward vision system are moved to the target relative position according to the theoretical mechanical coordinates, so that the nozzle to be calibrated is in the center area of ​​the visual optical axis of the upward vision system and the image is acquired; the actual pixel coordinates of the center of the nozzle to be calibrated are identified; the actual pixel coordinates are converted into actual mechanical coordinates using a pre-stored coordinate transformation model; the offset between the actual mechanical coordinates and the theoretical mechanical coordinates is calculated and fed back to the motion control unit for closed-loop correction.

[0187] It should be noted that the visual acquisition unit 41 is responsible for acquiring a high-resolution digital image of the nozzle tip located directly above it and within the target plane when the calibration command is triggered, providing the raw data source for subsequent visual measurements.

[0188] For example, the vision acquisition unit 41 includes a bottom-view vision system 2, which may specifically consist of an industrial camera (such as a CMOS or CCD sensor camera) mounted on the equipment base, or mounted on the edge, below, or side of the printing platform at a height lower than the nozzle movement plane, along with its matching telecentric or fixed-focus lens, light source, etc. The light source is used to ensure a clear nozzle tip outline and high contrast, and the lens is used to obtain a stable, low-distortion image at a fixed working distance.

[0189] The motion control unit 42 is responsible for precisely controlling the three-dimensional relative movement between the printing unit (including the nozzle) and the upward vision system. Since the nozzle is fixedly mounted on the printing unit, spatial alignment between the nozzle to be calibrated and the upward vision system can be achieved by driving the printing unit to move. Its core tasks include: during the calibration process, the motion control unit is responsible for driving the printing unit and the upward vision system to generate relative displacement in three dimensions to compensate for initial position deviations caused by nozzle wear, installation errors, or specification differences, ensuring that the nozzle tip can be accurately located at the center of the visual optical axis and the calibration focal plane of the upward vision system. For example, in a CoreXY architecture device, this is typically manifested as: the motion control unit drives the printing unit to move in the XY plane and simultaneously drives the components mounting the upward vision system (such as the printing platform or lifting bracket) to move in the Z-axis direction, thereby completing the relative positioning and ensuring that the nozzle tip can be accurately located at the center of the visual optical axis and the calibration focal plane of the upward vision system.

[0190] The processing unit 43, as the control core of the system, is responsible for the logical scheduling, core calculations, and decisions of the entire calibration process. It can respond to various calibration trigger commands (such as after head replacement, periodic maintenance, and before printing begins).

[0191] The processing unit 43 can be implemented using an embedded microprocessor (such as ARM, DSP, or FPGA), an industrial control computer, or a server. It integrates:

[0192] Image processing module: used to run edge detection algorithms (such as the Canny operator) and circle fitting algorithms to extract the nozzle center coordinates from the raw pixel data transmitted by the vision acquisition unit 41;

[0193] Coordinate transformation matrix operation unit: used to store pre-stored coordinate transformation models (i.e. transformation matrices) and perform matrix multiplication operations to convert pixel coordinates (u, v) into mechanical coordinates (X, Y) in the device motion control coordinate system in real time;

[0194] Communication interface controller: Connected to motion control unit 42 via a bus (such as CAN bus, Ethernet or PCIe), used to issue position correction commands and read current encoder feedback.

[0195] Specifically, its workflow includes: based on preset theoretical mechanical coordinates, instructing the motion control unit 42 to bring the nozzle to be calibrated and the upward-looking vision system to the target relative position, and triggering the vision acquisition unit 41 to image; running real-time image processing algorithms (such as edge detection and Hough circle transform) to accurately identify and extract the actual pixel coordinates of the center of the nozzle to be calibrated from the original image; calling a pre-stored, high-precision coordinate transformation model to convert the extracted actual pixel coordinates into actual mechanical coordinates in the device motion coordinate system. Subsequently, the difference between the actual mechanical coordinates and the theoretical mechanical coordinates is calculated to obtain the precise offset of the nozzle in the X and Y directions. The processing unit 43 uses this offset as the compensation parameter for the nozzle and updates it to the motion control unit 42 in real time. Thereafter, when planning any motion trajectory of the nozzle, the motion control unit 42 will automatically call this parameter for reverse compensation, thereby correcting its physical installation error at the system level. The offset compensation parameter can be stored in the non-volatile memory (such as EEPROM, Flash, or disk file) of the motion control unit or processing unit to ensure that the calibration data is not lost after the device restarts.

[0196] The three units described above form a complete automated closed loop for measurement, calculation, and compensation. The entire process requires no manual intervention, significantly improving the efficiency, accuracy, and consistency of multi-head equipment calibration, making it particularly suitable for applications requiring frequent printhead changes or high-precision multi-material printing.

[0197] In some embodiments, such as Figure 5 As shown, the upward vision system 2 is equipped with a zone-controllable ring light source 3. The processing unit 43 is configured to: control the ring light source 3 to illuminate at least one sub-region of the ring light source in a preset sequence and acquire multiple frames of images, and suppress or eliminate the specular interference on the nozzle surface through image fusion.

[0198] In this embodiment, the upward-looking vision system 2 is equipped with a zone-controllable ring light source 3 to suppress or eliminate the interference of nozzle surface highlights on imaging. The processing unit is configured to: illuminate different sub-regions of the ring light source 3 in a preset sequence (including independent illumination of a single sub-region or combined illumination of multiple sub-regions), and simultaneously acquire one frame of image each time it is illuminated; by fusing the acquired multiple frames of images, the highlight areas caused by specular reflection are suppressed or eliminated, thereby obtaining a nozzle image with a clear outline.

[0199] When using an upward-looking vision system to image metal or nozzles with highly reflective surfaces, the smooth, curved surface is prone to strong specular reflection, forming locally overexposed highlights in the image. This interferes with the extraction of the nozzle's true edge, thus affecting the accuracy of the center positioning and the calibration results.

[0200] To overcome the aforementioned problems, the ring light source 3 is divided into multiple independently controllable illumination sub-regions (or illumination zones), with the number of sub-regions being 4, 6, 8, or more. The processing unit controls each sub-region to be illuminated according to a set sequence. Each time the illumination state is switched (this state can be a single sub-region being lit, or multiple adjacent or opposite sub-regions being lit together), a frame of nozzle image is acquired, thus obtaining a set of multiple frames of images with different illumination angles and different highlight positions. The system can automatically adjust the current (brightness) of the ring light source 3 according to the nozzle material (through reflectivity feedback) or according to the reflective characteristics of the nozzle surface to obtain the optimal initial image contrast.

[0201] It should be noted that the ring light source 3 is not limited to a perfect circular shape, but also includes a polygonal ring structure composed of multiple LED beads, or a ring-like lighting device composed of multiple independent light-emitting units.

[0202] For example, image fusion can be achieved using one or a combination of the following methods:

[0203] Pixel optimization method: For each pixel position in the output image, select the pixel value with the most suitable brightness from multiple frames of images to avoid selecting overexposed or underexposed pixels;

[0204] Edge synthesis method: edge detection is performed on each frame of the image, and then the edges are merged to generate a composite image with continuous and complete edges.

[0205] The above method can effectively suppress or eliminate specular interference in the final image, ensuring that the nozzle outline remains clear and continuous at different angles. This provides a high-quality input image for the subsequent center extraction algorithm, significantly improving the reliability, accuracy, and environmental adaptability of the calibration system.

[0206] This application also provides a 3D printing device, such as... Figure 5 As shown, this includes the nozzle XY automatic calibration system for the multi-nozzle 3D printing equipment mentioned above;

[0207] Nozzle device 1 includes a reference nozzle and at least one nozzle to be calibrated;

[0208] The wiping assembly is positioned on the relative movement path of the nozzle assembly and is used to perform a wiping operation on nozzles that are determined to be dirty.

[0209] It should be noted that the wiping component is positioned within the effective space reachable by the motion control unit and the nozzle device 1. The wiping operation is not mandatory for every calibration; instead, it is triggered by the processing unit based on intelligent judgment, forming a sub-closed loop of perception, decision-making, and execution. When analyzing the nozzle image acquired by the vision acquisition unit, the processing unit not only extracts the coordinates but also runs an image quality analysis algorithm in parallel. This algorithm automatically determines whether there is significant dirt affecting the measurement at the nozzle tip based on features such as image contrast, contour sharpness, and the presence of abnormal adhesions. Once dirt is determined, the processing unit instructs the motion control unit to control the relative movement between the nozzle device and the wiping component. This relative movement includes driving the nozzle device 1 off its current path and moving it to the position of the wiping component, so that the nozzle to be cleaned contacts the wiping component with a preset force, angle, and path to complete physical cleaning. It can be understood that the wiping component can be positioned on the direct path of the nozzle from the printing area to the calibration area, or it can be independently positioned at specific cleaning coordinates outside the printing area. After cleaning, the system can control the nozzle and the upward-looking vision system to reach the target relative position again for imaging to verify the cleaning effect. If the problem persists, a second cleaning or alarm may be triggered. If the nozzle is still deemed dirty after multiple wipes, the system may record the nozzle as "faulty" and skip the printing task for that nozzle.

[0210] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0211] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0212] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0213] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0214] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0215] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0216] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0217] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0218] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0219] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for automatic nozzle XY calibration of a 3D printing device, characterized in that, The method includes the following steps: When calibration of the nozzle to be calibrated is triggered, the nozzle to be calibrated is controlled to generate relative motion with the upward-looking vision system according to theoretical mechanical coordinates, so that the nozzle to be calibrated is positioned in the central region of the visual optical axis of the upward-looking vision system for imaging; from the image in which the nozzle to be calibrated is positioned in the central region of the visual optical axis, the actual pixel coordinates of the center of the nozzle to be calibrated are identified; wherein, constraining the nozzle to be calibrated to be imaged in the central region of the visual optical axis is used to suppress coordinate transformation errors introduced in the perspective projection of the image due to the Z-axis height difference of the nozzle; Based on the coordinate transformation model from the image coordinate system of the vision system to the motion control coordinate system of the equipment, the actual pixel coordinates of the center of the nozzle to be calibrated are converted into actual mechanical coordinates; the XY offset between the actual mechanical coordinates and the theoretical mechanical coordinates of the nozzle to be calibrated is calculated, and the offset is fed back to the equipment motion control system for closed-loop correction to calibrate the nozzle to be calibrated.

2. The method according to claim 1, characterized in that, The coordinate transformation model is pre-built through the following calibration steps: The reference nozzle of the printing device is controlled to generate relative motion with the upward vision system, so that the reference nozzle images at multiple different mechanical coordinate points along a preset discrete path within the field of view of the upward vision system, and the pixel coordinates of the center of the reference nozzle are extracted from the image corresponding to each mechanical coordinate point. By utilizing the geometric position constraints between multiple sets of mechanical coordinates and pixel coordinates, and identifying and eliminating outliers in pixel coordinates, a coordinate transformation model is constructed from the visual image coordinate system to the equipment motion control coordinate system.

3. The method according to claim 2, characterized in that, The multiple different mechanical coordinate points are distributed in a nine-square grid within the field of view of the upward-looking visual system. The nine-square grid distribution refers to the fact that each mechanical coordinate point is located at one of the nine characteristic positions of a rectangle, including the four vertices of the rectangle, the midpoints of the four sides, and the center point of the rectangle.

4. The method according to claim 2 or 3, characterized in that, The calibration steps also include: After extracting the pixel coordinates corresponding to each mechanical coordinate point, morphological detection is performed on the image of the reference nozzle; If the morphological detection determines that the reference nozzle is dirty, the calibration process is interrupted, and the reference nozzle is controlled to generate relative movement with the wiping area to perform a wiping operation. After wiping is completed, the imaging and extraction steps for that point are re-executed.

5. The method according to claim 4, characterized in that, Morphological testing includes at least one of the following: roundness, symmetry, and heterochromatic connected regions.

6. The method according to claim 2, characterized in that, The process of identifying and removing outlier pixel coordinates includes: A hand-eye calibration algorithm is used to perform global fitting on multiple sets of paired data, and the transformation matrix is ​​calculated. The geometric position constraints are used to perform reprojection error checks on each pair of data, identify and remove outlier pixel coordinates whose reprojection errors exceed a preset threshold, and then perform global fitting again to update the transformation matrix.

7. The method according to claim 1, characterized in that, The step of controlling the nozzle to be calibrated to generate relative motion with the upward-looking vision system, so that the nozzle to be calibrated is positioned in the central region of the visual optical axis of the upward-looking vision system for imaging, includes: Control the relative displacement between the nozzle to be calibrated and the upward vision system in the Z-axis direction, so that the tip of the nozzle to be calibrated is at the same calibration focal plane height as when the coordinate transformation model was constructed; The nozzle to be calibrated is controlled to move along the X and Y axes so that its theoretical center point is aligned with the center of the visual optical axis of the upward vision system.

8. The method according to claim 1, characterized in that, The step of identifying the actual pixel coordinates of the center of the nozzle to be calibrated from the image in the central region of the visual optical axis includes: Edge detection is performed on the image of the nozzle to be calibrated located in the central region of the visual optical axis to obtain the outline of the nozzle to be calibrated; The contour is fitted with a circle to calculate the actual pixel coordinates of the center of the nozzle to be calibrated.

9. The method according to claim 1, characterized in that, The step of feeding back the offset to the equipment motion control system for closed-loop correction includes: The XY direction offset is used as a motion compensation value to update the coordinate reference of the nozzle to be calibrated in the motion control system of the device.

10. The method according to claim 1, characterized in that, The timing for triggering the calibration of the nozzle to be calibrated includes at least one of the following: Before the nozzle to be calibrated performs the printing task; After completing the nozzle switching operation.

11. The method according to claim 1, characterized in that, The theoretical mechanical coordinates are the coordinates of the visual optical axis center of the upward vision system in the equipment motion control coordinate system, serving as a unified calibration reference position for all nozzles to be calibrated.

12. An automatic XY calibration system for a multi-nozzle 3D printing device, characterized in that, include: The vision acquisition unit includes a backward vision system positioned below the nozzle to be calibrated in the printing unit with the lens facing upward, for acquiring nozzle images; A motion control unit is used to drive the printing unit to generate relative motion with the upward-looking vision system; The processing unit is configured to perform the following operations: In response to a calibration trigger command, the nozzle to be calibrated and the upward vision system are moved to a target relative position according to theoretical mechanical coordinates, so that the nozzle to be calibrated is located in the center region of the visual optical axis of the upward vision system and an image is acquired. Identify the actual pixel coordinates of the center of the nozzle to be calibrated; The actual pixel coordinates are converted into actual machine coordinates using a pre-stored coordinate transformation model; The offset between the actual mechanical coordinates and the theoretical mechanical coordinates is calculated and fed back to the motion control unit for closed-loop correction.

13. The system according to claim 12, characterized in that, The upward-looking vision system is equipped with a zone-controllable ring light source. The processing unit is configured to: control the ring light source to illuminate at least one sub-region of the ring light source in a preset sequence and acquire multiple frames of images, and suppress or eliminate the specular interference on the nozzle surface through image fusion.

14. A 3D printing device, characterized in that, include: The system as described in claim 12 or 13; A nozzle assembly, comprising a reference nozzle and at least one nozzle to be calibrated; A wiping component is disposed on the relative movement path of the nozzle device and is used to perform a wiping action on nozzles that are determined to be dirty.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.