Nozzle assembly calibration method, electronic device, and computer storage medium

By acquiring and processing images of the printing platform and calculating nozzle correction parameters to correct the nozzle assembly, the printing quality problem caused by nozzle position deviation was solved, and the printing accuracy of the 3D printing equipment was improved.

WO2026066322A1PCT designated stage Publication Date: 2026-04-02HUIZHOU CREALITY 3D TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In 3D printing equipment, the nozzle assembly may shift due to prolonged use and the adhesive properties of the printing material, resulting in substandard print quality.

Method used

By acquiring images of the printing platform, a Cartesian coordinate system is established. The initial grayscale image is processed to make the line segments parallel to the coordinate axes. Pixel feature curves and line segment lengths are obtained, printhead correction parameters are calculated, and the printhead assembly is corrected.

Benefits of technology

It improves the printing quality of 3D printing equipment, ensures that the nozzle assembly does not shift during subsequent printing, and improves printing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025103248_02042026_PF_FP_ABST
    Figure CN2025103248_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a nozzle assembly calibration method, an electronic device, and a computer storage medium. The nozzle assembly calibration method is applied to a 3D printing device. The nozzle assembly calibration method comprises: controlling a capturing assembly to capture a build platform on which a calibration object is printed, so as to obtain an initial grayscale image; establishing a two-dimensional Cartesian coordinate system on the basis of the initial grayscale image; performing image processing on the initial grayscale image to obtain a target grayscale image, wherein first line segments in the target grayscale image are parallel to any coordinate axis of the two-dimensional Cartesian coordinate system; acquiring a pixel feature curve matching the target grayscale image, a first length of the first line segments, and a second length of second line segments; calculating a nozzle calibration parameter on the basis of the pixel feature curve, the first length, and the second length; and calibrating the nozzle assembly by using the nozzle calibration parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Nozzle assembly correction method, electronic device and computer storage medium

[0001] Cross-reference to Related Applications

[0002] This application claims priority to the Chinese patent application No. 202411388858.X entitled "Nozzle assembly correction method, electronic device and computer storage medium" and filed with the China Patent Office on September 30, 2024, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application relates to the technical field of 3D printing equipment, in particular to a nozzle assembly correction method, an electronic device and a computer storage medium. BACKGROUND

[0004] 3D printing is also known as stereoscopic printing or three-dimensional printing. 3D printing is usually implemented using a 3D printing device, which is a rapid prototyping process device. It is usually applied in the fields of industrial design, module manufacturing and medicine. The 3D printing device is mainly based on a to-be-printed model, and runs a bondable material to print a three-dimensional entity through layer-by-layer printing.

[0005] The position deviation of the nozzle caused by the long-term use of the nozzle assembly and the adhesion property of the printing material itself requires that the nozzle assembly be corrected before 3D printing to avoid the problem of unqualified printing quality caused by the uncorrected nozzle assembly. SUMMARY

[0006] The present application provides a nozzle assembly correction method, an electronic device and a computer storage medium to solve the problem of unqualified printing quality caused by the uncorrected nozzle assembly.

[0007] The first aspect of the present application provides a nozzle assembly correction method, applied to a 3D printing device, the 3D printing device comprising a collection assembly, a nozzle assembly and a printing platform, the nozzle assembly being used to print a correction object on the printing platform, and the collection assembly being used to collect an image of the printing platform, the nozzle assembly correction method comprising: controlling the collection assembly to collect the printing platform on which the correction object is printed, to obtain an initial gray-scale image, wherein the correction object comprises a plurality of first line segments parallel to each other and a plurality of second line segments parallel to each other, the first line segments are not parallel to the second line segments, the interval between two adjacent first line segments in the plurality of first line segments is related to a first interval coefficient, and the interval between two adjacent second line segments in the plurality of second line segments is related to a second interval coefficient; establishing a planar rectangular coordinate system based on the initial gray-scale image; performing image processing on the initial gray-scale image to obtain a target gray-scale image, wherein the first line segments or the second line segments in the target gray-scale image are parallel to any coordinate axis of the planar rectangular coordinate system; obtaining a pixel feature curve matched with the target gray-scale image, wherein the pixel feature curve represents the distribution of each pixel value in the target gray-scale image; obtaining a first length of the first line segments and a second length of the second line segments; calculating nozzle correction parameters based on the pixel feature curve, the first length, the second length, the first interval coefficient and the second interval coefficient; and correcting the nozzle assembly using the nozzle correction parameters.

[0008] Compared with the related art, the embodiments of the present application have at least the following advantages:

[0009] The initial gray-scale image can accurately represent the actual distribution of the correction object. That is, the initial gray-scale image is processed so that the first line segments or the second line segments of the correction object in the initial gray-scale image are parallel to any coordinate axis, to avoid the problem that the subsequently calculated nozzle correction parameters are not accurate due to the first line segments or the second line segments not being parallel to the coordinate axis. Then, the pixel feature curve of the target gray-scale image and the lengths of the line segments are obtained. Finally, the pixel feature curve and the lengths of the line segments are calculated to obtain the nozzle correction parameters. Thus, the nozzle corrected based on the nozzle correction parameters can improve the printing quality of the 3D printing device in subsequent 3D printing.

[0010] In some possible implementation manners, the calculating the printhead correction parameter based on the pixel feature curve, the first length, the second length, the first interval coefficient and the second interval coefficient comprises: calculating a plurality of peak coordinates of the pixel feature curve; obtaining an actual length of a single pixel point in the correction object in the target gray-scale image on an X-axis of the plane rectangular coordinate system and an actual width of the single pixel point on a Y-axis of the plane rectangular coordinate system based on the plurality of peak coordinates, the first length, the second length, the first interval coefficient and the second interval coefficient; and obtaining the printhead correction parameter based on the plurality of peak coordinates, the actual length and the actual width.

[0011] In some possible implementation manners, the obtaining the printhead correction parameter based on the plurality of peak coordinates, the actual length and the actual width comprises: obtaining a first motion gap value of the printhead assembly on the X-axis based on the actual length and the plurality of peak coordinates; obtaining a second motion gap value of the printhead assembly on the Y-axis based on the actual width and the plurality of peak coordinates; and obtaining the printhead correction parameter through the first motion gap value and the second motion gap value.

[0012] In some possible implementation manners, the obtaining the target gray-scale image by performing image processing on the initial gray-scale image comprises: obtaining a target rotation angle, the target rotation angle representing an angle at which the first line segment or the second line segment is parallel to the coordinate axis after the initial gray-scale image is rotated; rotating the initial gray-scale image based on the target rotation angle; obtaining target cropping data; and extracting an image in a region of interest in the initial gray-scale image after rotation based on the target cropping data to obtain the target gray-scale image.

[0013] In some possible implementation manners, the target cropping data is obtained by: obtaining a horizontal field of view angle, a vertical field of view angle and a theoretical shooting distance of the acquisition assembly; obtaining a theoretical acquisition width and a theoretical acquisition length based on the horizontal field of view angle, the vertical field of view angle and the theoretical shooting distance; and obtaining the target cropping data based on the first length, the second length, the theoretical acquisition width and the theoretical acquisition length.

[0014] In some possible implementation manners, the target rotation angle is obtained by: cropping the initial gray image using the target cropping data; detecting the cropped initial gray image by using an edge detection technology to obtain an edge gray image; obtaining a first inclination angle between a plurality of the first line segments in the edge gray image and an X axis of the planar rectangular coordinate system; obtaining a second inclination angle between a plurality of the second line segments in the edge gray image and a Y axis of the planar rectangular coordinate system; and obtaining the target rotation angle based on the plurality of the first inclination angles and the plurality of the second inclination angles.

[0015] In some possible implementation manners, after the initial gray image is cropped using the target cropping data, the method further includes: obtaining an initial gray histogram of the cropped initial gray image; determining a pixel threshold of the initial gray histogram, the pixel threshold being an index value of a pixel extreme value in the initial gray histogram; and detecting the cropped initial gray image by using the edge detection technology to obtain the edge gray image, including: detecting the cropped initial gray image by using the edge detection technology based on the pixel threshold to obtain the edge gray image.

[0016] In some possible implementation manners, before the initial gray image of the printing platform on which the correction object is printed is obtained by controlling the acquisition component to acquire the printing platform on which the correction object is printed, the method further includes: controlling the acquisition component to acquire a blank image of the printing platform on which the correction object is not printed; and obtaining the initial gray image of the printing platform on which the correction object is printed by controlling the acquisition component to acquire the initial image of the printing platform on which the correction object is printed, including: calculating a pixel difference between the blank image and the initial image to obtain a difference image based on the pixel difference; and converting the difference image into the initial gray image.

[0017] The second aspect of the present application discloses an electronic device, which includes a memory and a processor in communication connection with the memory, and the processor is configured to execute the nozzle assembly correction method.

[0018] The third aspect of the present application discloses a computer storage medium storing computer instructions, which, when executed on the electronic device, causes the electronic device to execute the nozzle assembly correction method.

[0019] It can be understood that the electronic device of the second aspect and the computer storage medium of the third aspect provided above both correspond to the method of the first aspect, and thus the beneficial effects achieved by the electronic device of the second aspect and the computer storage medium of the third aspect can refer to the beneficial effects of the corresponding method provided above, which will not be described herein again. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope, and other related drawings can be obtained by those skilled in the art without creative labor.

[0021] FIG. 1 is a flowchart of a jet assembly correction method according to one or more embodiments of the present application.

[0022] FIG. 2 is a schematic diagram of an initial gray image in a planar rectangular coordinate system according to one or more embodiments of the present application.

[0023] FIG. 3 is a schematic diagram of a target gray image in a planar rectangular coordinate system according to one or more embodiments of the present application.

[0024] FIG. 4 is a schematic diagram of a pixel feature curve according to one or more embodiments of the present application.

[0025] FIG. 5 is a sub-flowchart of the jet assembly correction method in FIG. 1.

[0026] FIG. 6 is a flowchart of a target clipping data calculation method according to one or more embodiments of the present application.

[0027] FIG. 7 is a schematic diagram of clipping an image using target clipping data according to one or more embodiments of the present application.

[0028] FIG. 8 is a schematic diagram of calculating a first line segment inclination angle and a second line segment inclination angle according to one or more embodiments of the present application.

[0029] FIG. 9 is a flowchart of a target rotation angle calculation method according to one or more embodiments of the present application.

[0030] FIG. 10 is a functional module schematic diagram of a jet assembly correction module according to one or more embodiments of the present application.

[0031] FIG. 11 is a hardware structure schematic diagram of an electronic device according to one or more embodiments of the present application. DETAILED DESCRIPTION

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope, and other related drawings can be obtained by those skilled in the art without creative labor.

[0033] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. The described embodiments are merely a part of the total embodiments of the present application.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the present application.

[0035] It is further noted that the terms "comprise", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0036] In the present application, "at least one" means one or more, and "multiple" means two or more than two. The "and / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural.

[0037] In the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "for example" is intended to present concepts in a concrete manner.

[0038] 3D printing equipment is a kind of rapid prototyping technology, also known as additive manufacturing, 3D printer, and stereoscopic printer. 3D printing equipment is a technology that uses digital model files as the basis, and uses powder-like metal or plastic and other materials that can be bonded, to construct objects through layer-by-layer printing.

[0039] During printing, the 3D printing equipment continuously extrudes printing material from the nozzle assembly to dissolve it into lines. Then, the nozzle assembly is controlled to continuously change position to lay the printing material on the printing platform or the previous layer of printed objects, and the continuously side-by-side laid printing material is stacked layer by layer to form the final printed object.

[0040] The 3D printing device comprises a nozzle assembly, a collection assembly and a printing platform. The collection assembly is connected to the nozzle assembly, and the nozzle assembly is used to print a three-dimensional entity on the printing platform based on a to-be-printed model. The collection assembly is used to collect an image of the printing platform. In this embodiment, the collection assembly can be a camera, a video camera or the like, and the type of the collection assembly is not limited in the present application.

[0041] Please refer to FIG. 1, which is a flowchart of a nozzle assembly correction method provided by one or more embodiments of the present application, and the nozzle assembly correction method is applied to a 3D printing device.

[0042] The nozzle assembly correction method comprises the following steps:

[0043] Step 101: control the collection assembly to collect the printing platform on which a correction object is printed, to obtain an initial gray-scale image, wherein the correction object comprises a plurality of first line segments parallel to each other and a plurality of second line segments parallel to each other, the first line segments are not parallel to the second line segments, the interval between two adjacent first line segments in the plurality of first line segments is related to a first interval coefficient, and the interval between two adjacent second line segments in the plurality of second line segments is related to a second interval coefficient.

[0044] In some embodiments, the number of first line segments needs to be at least 3, and the number of second line segments also needs to be at least 3. The interval value between two adjacent first line segments in the plurality of first line segments can be obtained, which is denoted as a first interval value. Since the number of first line segments is at least 3, the number of first interval values is at least 2. The average of the plurality of first interval values can be taken as the first interval coefficient, or the variance of the plurality of first interval values can be taken as the first interval coefficient. The determination method of the first interval coefficient is not limited in the present application. Meanwhile, the specific value of the plurality of first interval values can be set according to actual needs. Similarly, the determination method of the second interval coefficient is the same as that of the first interval coefficient, and will not be described herein.

[0045] It should be noted that the first interval coefficient and the second interval coefficient can be equal or not equal. According to actual correction needs, the specific values of the first interval coefficient and the second interval coefficient can be set.

[0046] In this embodiment, as shown in FIG. 2, the number of first line segments and the number of second line segments are both 3. The plurality of first line segments are parallel to each other and arranged at equal intervals, the plurality of second line segments are parallel to each other and arranged at equal intervals, and each first line segment is perpendicular to each second line segment. The length of the first line segment is set as d1, and the length of the second line segment is set as d2. The first interval value is The first interval coefficient is equal to the first interval value. The second interval value is The second interval coefficient is equal to the second interval value. Wherein, h represents a preset equidistant coefficient, and h can be set as 6 or 7. The specific value of the preset equidistant coefficient is related to the image size reserved when the initial gray image is subsequently cropped, and the preset equidistant coefficient can be set according to actual cropping requirements. In other embodiments, the plurality of first line segments can also not intersect with the second line segment. Alternatively, the first line segment and the second line segment can be arranged at an acute angle or an obtuse angle. The number of first line segments and the number of second line segments can be the same or different.

[0047] In the embodiment, the plurality of first line segments are arranged to be parallel and equidistant to each other, the plurality of second line segments are arranged to be parallel and equidistant to each other, and the first line segments are perpendicular to the second line segments, so that the subsequent calculation steps can be reduced to improve the calculation efficiency.

[0048] Step 102: establishing a plane rectangular coordinate system based on the initial gray image.

[0049] In the embodiment, the lower left corner of the image acquired by the acquisition assembly is taken as the coordinate origin, and the two vertical sides of the image are taken as the X-axis and the Y-axis to establish a plane rectangular coordinate system. In other embodiments, the lower right corner of the image acquired by the acquisition assembly can be taken as the coordinate origin, and the two vertical sides of the image are taken as the X-axis and the Y-axis to establish a plane rectangular coordinate system. Alternatively, any point in the image acquired by the acquisition assembly can be taken as the coordinate origin, and the directions extending from the point along the two vertical sides of the image are taken as the X-axis and the Y-axis to establish a plane rectangular coordinate system. The application does not limit the establishment method of the plane rectangular coordinate system.

[0050] In some embodiments, in order to acquire the initial gray image, the acquisition assembly needs to be controlled to acquire the printing platform without printing the correction object to obtain a blank image of the printing platform. The acquisition assembly is controlled to acquire the printing platform with printing the correction object to obtain an initial image of the printing platform. The pixel difference between the blank image and the initial image is calculated, and a difference image is obtained based on the pixel difference. The difference image is converted into the initial gray image.

[0051] Wherein, the absdiff function is used to calculate the pixel difference between the blank image and the initial image. The absdiff function is a function in OpenCV, which is mainly used to calculate the pixel difference between two images. The absdiff function takes two images as input parameters and returns a new function, in which the value of each pixel is the absolute value of the difference between the pixels of the two input images. The difference image contains a closed figure. Although the absdiff function is used to calculate the pixel difference between the two images in the embodiment, the application does not limit that the absdiff function must be used to calculate the pixel difference between the two images. In other embodiments, other functions or other algorithms can also be used to calculate the pixel difference between the two images.

[0052] In the embodiment, the difference image can be converted into the initial gray image using the maximum value method. The maximum value method is prior art, and will not be described herein. Alternatively, the difference image can be processed using the average value method or the weighted average method to obtain the initial gray image. The maximum value method is to directly take the value of the component with the maximum value in the three primary colors for gray processing. The average value method is to directly take the average value of the values in the three primary colors for gray processing. The weighted average method is to take the weighted average of the three primary colors with different weights according to importance and other indicators to obtain a weighted average value, and the weighted average value is used for gray processing. The present application does not limit this.

[0053] Step 103: performing image processing on the initial gray image to obtain a target gray image, wherein the first line segment or the second line segment in the target gray image is parallel to any coordinate axis of the planar rectangular coordinate system.

[0054] In the embodiment, for illustration, the first line segment is parallel to the X-axis of the planar rectangular coordinate system. In other embodiments, the second line segment can be parallel to the X-axis of the planar rectangular coordinate system.

[0055] In the embodiment, please refer to FIG. 2 again. It can be seen that the first line segment in the initial gray image collected by the collection assembly is not parallel to the X-axis. In order to prove that the printhead assembly does not need to be corrected or the correction is successful, the first line segment in the correction object printed by the printhead assembly is parallel to the X-axis in the subsequent printing process. First, the target rotation angle is obtained. The target rotation angle represents the angle at which the first line segment is parallel to the X-axis after the initial gray image is rotated. That is, the angle between the first line segment and the square of the X-axis is the target rotation angle. The specific calculation method of the target rotation angle will be described in detail below. Herein, no further description is given. In other embodiments, the initial gray image can also be rotated so that the second line segment is parallel to the Y-axis of the planar rectangular coordinate system. Then, the initial gray image is rotated based on the target rotation angle. Next, the target clipping data is obtained. Finally, the image in the region of interest in the rotated initial gray image is extracted based on the target clipping data to obtain the target gray image. The representation of the target gray image in the planar rectangular coordinate system is shown in FIG. 3.

[0056] In some embodiments, since there are many interference regions in the initial gray image, the rotated initial gray image needs to be clipped using the target clipping data to extract the region of interest and remove the interference region. That is, the region of interest is the region where the correction object is located in the target gray image. The rotated initial gray image is clipped using the target clipping data. The specific calculation method of the target clipping data will also be described in detail below. Herein, no further description is given.

[0057] In this embodiment, the initial grayscale image is first rotated using the target rotation angle, and then the rotated initial grayscale image is cropped using the target cropping data. This solves the problem of incomplete correction objects within the image when the initial grayscale image is cropped first and then rotated. This ensures the accuracy of the nozzle correction parameters for subsequent calculations of the acquisition components.

[0058] Step 104: Obtain the pixel feature curve that matches the target grayscale image, where the pixel feature curve represents the distribution of each pixel value in the target grayscale image.

[0059] In this embodiment, in order to obtain the pixel feature curve that matches the target grayscale image, the target grayscale image needs to be binarized first to obtain an initial black and white image that matches the target grayscale image.

[0060] The initial black-and-white image is obtained as follows: First, a first histogram matching the target grayscale image is acquired. Next, the first histogram is cropped to reduce image interference. Then, normalization and smoothing techniques are used to process the cropped first histogram to determine the index value of the pixel extrema in the processed first histogram. In this embodiment, the pixel extrema is the minimum pixel value. In other embodiments, depending on processing requirements, the pixel extrema can be set to the maximum pixel value. Finally, this index value is used as an initial grayscale threshold to convert the target grayscale image into an initial black-and-white image.

[0061] The step of cropping the first histogram includes: extracting the first pixel value from the first histogram, where the first pixel value is the pixel value that appears most frequently in the first histogram; and cropping the first histogram to the right from the first pixel value. The step of converting the target grayscale image to an initial black and white image using an initial grayscale threshold includes: setting pixels in the initial grayscale image with pixel values ​​greater than the initial grayscale threshold to 255, and setting the remaining pixels to 0.

[0062] Normalization is a data processing method that limits processed data to a fixed range. Smoothing enhances low frequencies incrementally while filtering out high frequencies, essentially acting as a background filter to eliminate random noise in an image. It can be used to remove noise, improve image quality, and reduce interference. In this embodiment, the erode function is used to eliminate smaller noise points in the binarized image. The dilate function is used to merge disconnected white regions into connected regions in the binarized image. The filter2D function is used to smooth the image. In other embodiments, if other algorithms, functions, or methods exist to eliminate smaller noise points in a binarized image or merge disconnected white regions into connected regions, the corresponding algorithms, functions, or schemes can also be used; this application is not limited in this regard.

[0063] Furthermore, as shown in Figure 4, the pixel feature curves for matching the initial black and white image are presented. The initial black and white image includes multiple first pixel groups arranged along the X-axis and multiple second pixel groups arranged along the Y-axis.

[0064] The pixel feature curve is obtained as follows:

[0065] In the initial black and white image, the sum of the first pixel values ​​of each first pixel group and the sum of the second pixel values ​​of each second pixel group are obtained. One sum of first pixel values ​​corresponds to one first pixel group, and one sum of second pixel values ​​corresponds to one second pixel group.

[0066] In this embodiment, for the values ​​of each pixel in the initial black and white image, the sum of the pixel values ​​is calculated in both the X-axis and Y-axis directions. The sum obtained by calculating the values ​​of each pixel in the first pixel group in the X-axis direction is denoted as SUM. X1 The sum of the pixel values ​​in the second first pixel group is denoted as SUM. X2 ...; The cumulative sum SUM obtained by calculating the values ​​of each pixel in the first and second pixel groups along the Y-axis direction is denoted as SUM. Y1 The sum of the pixel values ​​in the second pixel group is denoted as SUM. Y2 ...for SUM respectively X1 SUM X2 and SUM Y1 SUM Y2 ...perform normalization, and then perform normalization on the SUM. X1 SUM X2 and SUM Y1 SUM Y2 ...Perform one-dimensional Gaussian low-pass filtering on the data. Finally, perform SUM filtering on the filtered data. X1 SUM X2 and SUM Y1 SUM Y2 ...After normalization, multiple sums of the first pixel values ​​are obtained (denoted as SUM). X And the sum of multiple sets of second pixel values ​​(denoted as SUM) Y Gaussian low-pass filtering is a linear smoothing filter suitable for eliminating Gaussian noise and widely used in image processing for noise reduction. It effectively suppresses noise and smooths images.

[0067] Then, symmetrical calculations are performed on the sum of multiple sets of first pixel values ​​and the sum of multiple sets of second pixel values ​​to obtain the pixel feature curve.

[0068] In the present embodiment, all values in SUM X and SUM Y are accumulated respectively, and then the accumulated sum is divided by the array length to obtain the first average (denoted as Avg X ) and the second average (denoted as Avg Y ) of SUM X and SUM Y . Please continue to combine FIG. 4, there are two pixel characteristic curves, one pixel characteristic curve represents the distribution of the pixel values along the X axis in the initial gray image (matching SUM X , denoted as SUM X pixel characteristic curve); the other pixel characteristic curve represents the distribution of the pixel values along the Y axis in the initial gray image (matching SUM Y , denoted as SUM Y pixel characteristic curve).

[0069] Step 105: Obtain a first length of the first line segment and a second length of the second line segment.

[0070] Step 106: Calculate the nozzle correction parameter based on the pixel characteristic curve, the first length, the second length, a first interval coefficient and a second interval coefficient.

[0071] As shown in FIG. 5, it is a flow chart of the calculation method of the nozzle correction parameter, and the steps are as follows according to the figure:

[0072] Step 1061: Calculate a plurality of peak coordinates of the pixel characteristic curve.

[0073] Specifically, a plurality of first X coordinate values equal to Avg X are determined from the SUM X pixel characteristic curve. Similarly, a plurality of first Y coordinate values equal to Avg Y are determined from the SUM Y pixel characteristic curve. In the present embodiment, the number of the first X coordinate values is six, denoted as X1, X2, X3, X4, X5, X6 respectively. The number of the first Y coordinate values is six, denoted as Y1, Y2, Y3, Y4, Y5, Y6 respectively.

[0074] It should be noted that the number of peaks in the SUM X pixel characteristic curve is the same as the number of the first line segment. Similarly, the number of peaks in the SUM Y pixel characteristic curve is the same as the number of the second line segment.

[0075] Further, the abscissa of the plurality of peaks in the SUM X pixel characteristic curve is respectively: X top1 =(X2-X1) / 2, Xtop2 = (X4-X3) / 2, X top3 = (X6-X5) / 2. The horizontal coordinates of the multiple peaks in the pixel characteristic curve are respectively: Y = (Y2-Y1) / 2, Y to = (Y4-Y3) / 2, Y top = (Y6-Y5) / 2. Therefore, the multiple peak coordinates include the horizontal coordinates of the multiple peaks in the pixel characteristic curve and the horizontal coordinates of the multiple peaks in the SUM top3 = (Y2-Y1) / 2, Y X = (Y4-Y3) / 2, Y Y = (Y6-Y5) / 2. Therefore, the multiple peak coordinates include the horizontal coordinates of the multiple peaks in the pixel characteristic curve and the horizontal coordinates of the multiple peaks in the SUM

[0076] Step 1062: Based on the multiple peak coordinates, the first length, the second length and the preset interval coefficient, the actual length of a single pixel point in the correction object on the X axis and the actual width on the Y axis are obtained.

[0077] In this embodiment, the preset interval coefficient is h, the first length is d1, and the second length is d2. Let the actual length of a single pixel point in the correction object on the X axis be K1, then Let the actual length of a single pixel point in the correction object on the Y axis be K2, then

[0078] Step 1063: Based on the actual length and the multiple peak coordinates, a first movement gap value of the nozzle assembly on the X axis is obtained.

[0079] In this embodiment, let the first movement gap value of the nozzle assembly on the X axis be G X , then G X = ((X top -X top2 )-(X top2 -X top ))*K1.

[0080] Step 1064: Based on the actual width and the multiple peak coordinates, a second movement gap value of the nozzle assembly on the Y axis is obtained.

[0081] In this embodiment, let the first movement gap value of the nozzle assembly on the Y axis be G Y , then G Y = ((Y top -Y top1 )-(Y top3 -Y top2 ))*K2.

[0082] Step 1065: The first movement gap value and the second movement gap value are taken as the nozzle correction parameters.

[0083] It is mainly explained that the number of the first line segments and the number of the second line segments are both set to be greater than or equal to 3, so that there are at least two first interval values between the plurality of first line segments and at least two second interval values between the plurality of second line segments. In this way, the nozzle correction parameter can be obtained based on the first interval value and the second interval value and other parameters.

[0084] Step 107: correcting the nozzle assembly using the nozzle correction parameter.

[0085] In the embodiment, it is assumed that the acceleration of the uncorrected nozzle assembly is a0, the acceleration of the nozzle assembly during correction is a f , and the velocity is v f . The correction time is t1+t2, where t1 represents the time for the 3D printing device to control the acceleration of the nozzle assembly, and t2 represents the time for the 3D printing device to control the deceleration of the nozzle assembly.

[0086] Further, in order to correct the nozzle assembly, the 3D printing device needs to control the nozzle assembly to move a distance of the first motion gap value in the X direction and a distance of the second motion gap value in the Y axis. First, before correcting the nozzle assembly, according to the acceleration a0 of the uncorrected nozzle assembly and the correction time (t1+t2), the displacement of the nozzle assembly within the correction time is:

[0087] Then, during correction, according to the acceleration and velocity of the nozzle assembly during correction, the displacement of the nozzle assembly within the correction time is:

[0088] In order to accurately correct the position of the nozzle assembly, in the X axis direction, s f +G X =s0. In the Y axis direction, s f +G Y =s0.

[0089] Specifically, the velocity of the nozzle assembly during correction can be further adjusted to make s f +G X =s0 and s f +G Y =s0. Alternatively, the acceleration of the nozzle assembly during correction can be adjusted to make s f +G X =s0 and s f +G Y =s0. In this way, the purpose of accurately correcting the position of the nozzle assembly in the X axis direction and the Y axis direction can be achieved.

[0090] Compared with the related art, the embodiments of the present application have at least the following advantages:

[0091] The initial gray image is processed to remove irrelevant areas, and the region of interest in the rotated initial gray image is extracted to directly analyze and process the image in the region of interest, thereby improving the processing efficiency of the entire process. Then, the cropped initial gray image is converted into an initial black and white image, and the distribution of the correction object in the image can be accurately obtained by analyzing the distribution of the pixel values in the initial black and white image. The pixel feature curve is obtained by calculating the distribution of each pixel value in the initial black and white image in the X-axis direction and the Y-axis direction. Then, based on the multiple peak value coordinates of the pixel feature curve, the length of the first line segment, the length of the second line segment, the first interval coefficient and the second interval coefficient, the accurate nozzle correction parameter is calculated. In this way, the nozzle assembly can be prevented from deviating in the subsequent printing process, and the quality of 3D printing is improved.

[0092] Please refer to FIG. 6, which is a flowchart of a target clipping data calculation method provided by an embodiment of the present application. The steps are as follows:

[0093] Step 201: Obtain the horizontal field of view angle, the vertical field of view angle and the theoretical shooting distance of the acquisition assembly.

[0094] In this embodiment, the theoretical shooting distance refers to the distance between the acquisition assembly and the printing platform.

[0095] Step 202: Calculate the horizontal field of view angle, the vertical field of view angle and the theoretical shooting distance to obtain the theoretical acquisition width and the theoretical acquisition length.

[0096] In some embodiments, the theoretical acquisition width represents the width of the acquisition region collected by the acquisition assembly on the printing platform, and the theoretical acquisition length represents the length of the acquisition region collected by the acquisition assembly on the printing platform.

[0097] In this embodiment, the horizontal field of view angle is denoted as θ ho , the vertical field of view angle is denoted as θ ver , and the theoretical shooting distance is denoted as D cam . Then, the theoretical acquisition length is denoted as , and the theoretical acquisition width is denoted as

[0098] Step 203: Calculate the first length, the second length, the theoretical acquisition width and the theoretical acquisition length to obtain the target clipping data.

[0099] In this embodiment, as shown in FIG. 7, the target clipping data includes a clipping starting point coordinate, a clipping length and a clipping width. The pixel length and the pixel width of the initial gray image are obtained. The pixel length is denoted as P x , and the pixel width is denoted as P y . The clipping starting point coordinate is denoted as (X0, Y0), and the clipping length is denoted as d XLet the cutting width be d Y . A preset cutting coefficient is obtained, and the preset cutting coefficient is denoted as f. Then d X = P x *d1*f / W cam , d Y = P y *d2*f / L cam , X0 = (P x -d X ) / 2, and Y0 = (P y -d Y ) / 2. In an embodiment, f can be In other embodiments, f can be set as or

[0100] Compared with the related art, the embodiments of the present application have at least the following advantages:

[0101] Since the types of the acquisition components and the acquisition ranges are different, the theoretical acquisition length and the theoretical acquisition width of the printing platform acquired by the acquisition components are calculated based on the horizontal field of view angle, the vertical field of view angle and the theoretical shooting distance of the acquisition components, so that the accurate target cutting data is obtained. The image after cutting based on the target cutting data can eliminate the interference region, so that the image in the region of interest containing the correction object is extracted.

[0102] Please refer to FIG. 9, which is a flowchart of a target rotation angle calculation method provided by an embodiment of the present application.

[0103] The specific process of the embodiment is shown in FIG. 9, which includes the following steps:

[0104] Step 301: cutting the initial grayscale image using the target cutting data.

[0105] As described in the above embodiment, please refer to FIG. 7 and FIG. 8, the target cutting data is the cutting origin (X0, Y0), the cutting length is d X , and the cutting width is d Y . The initial grayscale image is cut using the target cutting data to obtain the cut initial grayscale image. In this embodiment, the cut initial grayscale image is denoted as the initial cutting image. It can be understood that, compared with the initial cutting grayscale image, the initial cutting image does not contain the interference region. For example, the image contains more blank regions.

[0106] Step 302: obtaining the initial grayscale histogram of the cut initial grayscale image.

[0107] Step 303: determining the pixel threshold of the initial grayscale histogram, which is the index value of the pixel extreme value in the initial grayscale histogram.

[0108] Step 304: Based on the pixel threshold, the initial cropped gray image is detected by using an edge detection technique to obtain an edge gray image.

[0109] In some embodiments, first, the histogram corresponding to the initial cropped image is obtained. Denoted as the initial gray histogram. In order to obtain an accurate pixel threshold, the initial gray histogram can be cropped first. The pixel value with the highest occurrence frequency is determined from the initial gray histogram, and the initial gray histogram is truncated to the right from the pixel value to avoid the influence of interference factors located to the left of the pixel value. And the truncated initial gray histogram is normalized and smoothed to obtain an intermediate gray histogram. The image after normalization and smoothing has removed the influence of interfering pixels. Then, the index value of the pixel extreme value in the intermediate gray histogram is determined, and in this embodiment, the pixel extreme value is the minimum pixel value. The index value of the minimum pixel value is taken as the minimum threshold C min .

[0110] Further, a first threshold (denoted as C max1 ) and a second threshold (C ma ) are set. The first threshold is the sum of the minimum threshold and a first preset value, and the second threshold is a second preset value. In this embodiment, the first preset value can be 50, and the second preset value can be 255. In other embodiments, the specific values of the first preset value and the second preset value can be adjusted according to actual processing requirements, which are not limited.

[0111] The minimum value of the first threshold and the second threshold is denoted as the target threshold. Then, the initial cropped image is edge detected by using the target threshold and the Canny edge detection operator to obtain the edge gray image of the correction object.

[0112] The Canny edge detection operator is a technique for extracting useful structural information from different visual objects and greatly reducing the amount of data to be processed. It mainly includes using a Gaussian filter to smooth the image and eliminate noise; calculating the gradient strength and direction of each pixel point in the image; applying non-maximum suppression to eliminate the spurious response caused by edge detection; applying a double threshold detection to determine the true and potential edges, and completing the edge detection by suppressing isolated weak edges in five steps.

[0113] Step 305: Obtain the first inclination angle between the plurality of first line segments in the edge gray image and the X-axis.

[0114] Step 306: Obtain the second inclination angle between the plurality of second line segments in the edge gray image and the Y-axis.

[0115] Step 307: obtaining the target rotation angle based on the plurality of first inclination angles and the plurality of second inclination angles.

[0116] In the embodiment, the HoughLines algorithm is used to calculate the first inclination angles between the plurality of first line segments and the X axis and the second inclination angles between the plurality of second line segments and the Y axis in the edge gray image.

[0117] The HoughLines algorithm is a function for implementing the standard Hough transform. The Hough transform is a technique for feature extraction, mainly used for detecting geometric shapes in images, most commonly line segments, circles, etc. The basic idea of the Hough transform is to use the conversion between the image space and the parameter space to identify specific shapes.

[0118] In the embodiment, as shown in FIG. 8, the median of the plurality of first inclination angles is calculated as the first line segment inclination angle (denoted as θ X ), and the difference between the median of the plurality of second inclination angles and the preset inclination threshold is calculated as the second line segment inclination angle (denoted as θ Y ). The value of the preset inclination threshold is 90°.

[0119] It should be noted that, in order to calculate the target rotation angle based on the first line segment inclination angle and the second line segment inclination angle, the acquisition reference of the first line segment inclination angle (the first line segment inclination angle is obtained based on the angle between the first line segment and the X axis) and the acquisition reference of the second line segment inclination angle (the second line segment inclination angle is obtained based on the angle between the second line segment and the Y axis) need to be kept the same. The angle between the X axis and the Y axis is 90°. Therefore, the median of the plurality of second inclination angles is subtracted by 90° to obtain the second line segment inclination angle.

[0120] Meanwhile, in the embodiment, the angle between the first line segment and the X axis is an acute angle, in order to make the first line segment parallel to the X axis in the image rotated based on the target rotation angle, at this time, in step 305 and step 306, the first inclination angle between the plurality of first line segments and the X axis in the edge gray image and the second inclination angle between the plurality of second line segments and the Y axis in the edge gray image are obtained respectively. In other embodiments, if the angle between the first line segment and the Y axis is an acute angle, in order to make the first line segment parallel to the Y axis in the image rotated based on the target rotation angle, at this time, in step 305 and step 306, the first inclination angle between the plurality of first line segments and the Y axis in the edge gray image and the second inclination angle between the plurality of second line segments and the X axis in the edge gray image should be adjusted synchronously.

[0121] Further, the average of the first line segment inclination angle and the second line segment inclination angle is taken as the target rotation angle.

[0122] Compared with the related art, embodiments of the present application have at least the following advantages:

[0123] The initial gray image is cropped using the target cropping data to obtain an initial cropped image. On the one hand, the resolution of the image is avoided to be too large, so that more interference areas in the initial gray image affect the accuracy of edge detection. On the other hand, the initial cropped image after cropping can more accurately reflect the characteristics of the correction object in the image, thereby facilitating the improvement of the efficiency of subsequent edge detection of the correction object in the image. Then, the edge gray image of the correction object in the initial cropped image is detected by using an edge detection technology. The first inclination angle between the plurality of first line segments and the X axis and the second inclination angle between the plurality of second line segments and the Y axis are calculated based on the edge gray image. Finally, the average value of the first line segment inclination angle and the second line segment inclination angle is taken as the target rotation angle. In this way, an accurate target rotation angle can be obtained.

[0124] Please refer to FIG. 10, which is a functional module schematic diagram of the nozzle assembly correction device 200 provided by the embodiments of the present application. The nozzle assembly correction device 200 comprises a collection module 210, an establishment module 220, a processing module 230, a first acquisition module 240, a second acquisition module 250, a calculation module 260, and a correction module 270.

[0125] The collection module 210 is configured to control a collection assembly to collect a printing platform printed with a correction object to obtain an initial gray image, wherein the correction object comprises a plurality of first line segments and a plurality of second line segments, the first line segments and the second line segments are equally spaced and parallel, and the straight line on which the first line segments are located is perpendicular to the straight line on which the second line segments are located. The establishment module 220 is configured to establish a planar rectangular coordinate system based on the initial gray image. The processing module 230 is configured to process the initial gray image to make the first line segments parallel to any coordinate axis of the planar rectangular coordinate system. The first acquisition module 240 is configured to acquire a pixel feature curve matched with the processed initial gray image, wherein the pixel feature curve represents the distribution of each pixel value in the processed initial gray image. The second acquisition module 250 is configured to acquire a first length of the first line segments and a second length of the second line segments. The calculation module 260 is configured to calculate a nozzle correction parameter based on the pixel feature curve, the first length, and the second length. The correction module 270 is configured to correct a nozzle assembly using the nozzle correction parameter.

[0126] Please refer to FIG. 11, which is a hardware structure schematic diagram of the electronic device 1000 provided by the embodiments of the present application. As shown in FIG. 11, the electronic device 1000 can comprise a processor 1001 and a memory 1002. The memory 1002 is configured to store one or more computer programs 1003. The one or more computer programs 1003 are configured to be executed by the processor 1001. The one or more computer programs 1003 comprise instructions which can be used to implement the method described above in the electronic device 1000.

[0127] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 1000. In other embodiments, the electronic device 1000 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components.

[0128] The processor 1001 can include one or more processing units, for example: the processor 1001 can include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.

[0129] The processor 1001 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 1001 is a cache memory. The memory can hold instructions or data that the processor 1001 has just used or recycled. If the processor 1001 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 1001, thus improving the efficiency of the system.

[0130] In some embodiments, the processor 1001 can include one or more interfaces. The interface can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.

[0131] In some embodiments, the memory 1002 can include high-speed random access memory and can also include nonvolatile memory, such as a hard disk, a memory card, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash storage device, or other nonvolatile solid-state storage device.

[0132] The embodiments further provide a computer readable storage medium, having stored computer instructions, when the instructions are executed on an electronic device, cause the electronic device to perform the above-mentioned related method steps to implement the method in the above-mentioned embodiments.

[0133] Wherein, the electronic device and the computer storage medium provided by the embodiments are used to execute the corresponding methods provided above, thus, the beneficial effects that can be achieved are referable to the beneficial effects of the corresponding methods provided above, which will not be repeated here.

[0134] In practical applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0135] In the several embodiments provided by the present application, the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0136] The units described as separate components can or can not be physically separate, and the components displayed as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0137] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware, or in the form of software functional unit.

[0138] If the integrated unit is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium, includes several instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0139] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application.

Claims

1. A nozzle assembly correction method applied to a 3D printing device, the 3D printing device comprising a collection assembly, a nozzle assembly and a printing platform, the nozzle assembly being configured to print a correction object on the printing platform, the collection assembly being configured to collect an image of the printing platform, the nozzle assembly correction method comprising: controlling the collection assembly to collect the printing platform on which the correction object is printed to obtain an initial gray image, wherein the correction object comprises a plurality of first line segments parallel to each other and a plurality of second line segments parallel to each other, the first line segments are not parallel to the second line segments, a spacing between two adjacent first line segments of the plurality of first line segments is related to a first interval coefficient, and a spacing between two adjacent second line segments of the plurality of second line segments is related to a second interval coefficient; establishing a planar rectangular coordinate system based on the initial gray image; performing image processing on the initial gray image to obtain a target gray image, wherein the first line segments or the second line segments in the target gray image are parallel to any coordinate axis of the planar rectangular coordinate system; obtaining a pixel feature curve matched with the target gray image, wherein the pixel feature curve represents a distribution of each pixel value in the target gray image; obtaining a first length of the first line segments and a second length of the second line segments; calculating a nozzle correction parameter based on the pixel feature curve, the first length, the second length, the first interval coefficient and the second interval coefficient; and correcting the nozzle assembly using the nozzle correction parameter. The calculating of the nozzle correction parameter based on the pixel feature curve, the first length, the second length, the first interval coefficient and the second interval coefficient comprises: calculating a plurality of peak coordinates of the pixel feature curve; obtaining an actual length of a single pixel point in the correction object in the target gray image on an X-axis of the planar rectangular coordinate system and an actual width of the single pixel point on a Y-axis of the planar rectangular coordinate system based on the plurality of peak coordinates, the first length, the second length, the first interval coefficient and the second interval coefficient; and obtaining the nozzle correction parameter based on the plurality of peak coordinates, the actual length and the actual width. The obtaining of the nozzle correction parameter based on the plurality of peak coordinates, the actual length and the actual width comprises: obtaining a first movement gap value of the nozzle assembly on the X-axis based on the actual length and the plurality of peak coordinates; obtaining a second movement gap value of the nozzle assembly on the Y-axis based on the actual width and the plurality of peak coordinates; and taking the first movement gap value and the second movement gap value as the nozzle correction parameter. The image processing of the initial gray image to obtain the target gray image comprises: obtaining a target rotation angle, the target rotation angle representing an angle at which the first line segments or the second line segments are parallel to the coordinate axes after the initial gray image is rotated; rotating the initial gray image based on the target rotation angle; and obtaining target clipping data. The obtaining of the target gray image based on the target clipping data comprises: obtaining a target gray image based on the target clipping data. ​ ​ ​ 2. The showerhead assembly correction method of claim 1, wherein ​ ​ ​ ​ 3. The showerhead assembly correction method of claim 2, wherein, ​ ​ ​ ​ 4. The method of claim 1, wherein, ​ ​ ​ ​ Based on the target clipping data, an image in a region of interest in the initial gray image after rotation is extracted to obtain the target gray image.

5. The method of claim 4, wherein, The target clipping data is obtained by the following method: An angle of horizontal field of view, an angle of vertical field of view and a theoretical shooting distance of the acquisition component are obtained; Based on the angle of horizontal field of view, the angle of vertical field of view and the theoretical shooting distance, a theoretical acquisition width and a theoretical acquisition length are obtained; Based on the first length, the second length, the theoretical acquisition width and the theoretical acquisition length, the target clipping data is obtained.

6. The showerhead assembly correction method of claim 4, wherein, The target rotation angle is obtained by the following method: The initial gray image is clipped using the target clipping data; An edge gray image is obtained by detecting the clipped initial gray image using an edge detection technology; A first inclination angle between a plurality of the first line segments in the edge gray image and an X-axis of the plane rectangular coordinate system is obtained; A second inclination angle between a plurality of the second line segments in the edge gray image and a Y-axis of the plane rectangular coordinate system is obtained; Based on a plurality of the first inclination angles and a plurality of the second inclination angles, the target rotation angle is obtained.

7. The showerhead assembly correction method of claim 6, wherein, After the initial gray image is clipped using the target clipping data, the following steps are included: An initial gray histogram of the clipped initial gray image is obtained; A pixel threshold value of the initial gray histogram is determined, the pixel threshold value being an index value of a pixel extreme value in the initial gray histogram; The edge gray image is obtained by detecting the clipped initial gray image using the edge detection technology based on the pixel threshold value. Before the initial gray image is obtained by controlling the acquisition component to acquire the printing platform on which the correction object is printed, the following step is further included:

8. The showerhead assembly correction method of claim 1, wherein, The blank image of the printing platform is obtained by controlling the acquisition component to acquire the printing platform on which the correction object is not printed; The initial gray image is obtained by controlling the acquisition component to acquire the printing platform on which the correction object is printed, including: The initial image of the printing platform is obtained by controlling the acquisition component to acquire the printing platform on which the correction object is printed; A pixel difference between the blank image and the initial image is calculated, and a difference image is obtained based on the pixel difference; The difference image is converted into the initial gray image. The electronic device includes a memory and a processor, the processor being in communication connection with the memory, and the processor being configured to perform the following steps:

9. An electronic device, comprising: The initial gray image is obtained by controlling an acquisition component of a 3D printing device to acquire a printing platform on which a correction object is printed, wherein the correction object includes a plurality of first line segments parallel to each other and a plurality of second line segments parallel to each other, the first line segments are not parallel to the second line segments, a spacing between two adjacent first line segments in the plurality of first line segments is related to a first spacing coefficient, a spacing between two adjacent second line segments in the plurality of second line segments is related to a second spacing coefficient, and the acquisition component is configured to acquire an image of the printing platform; A plane rectangular coordinate system is established based on the initial gray image; ​ performing image processing on the initial gray image to obtain a target gray image, wherein the first line segment or the second line segment in the target gray image is parallel to any coordinate axis of the planar rectangular coordinate system; obtaining a pixel feature curve matched with the target gray image, wherein the pixel feature curve represents a distribution of pixel values in the target gray image; obtaining a first length of the first line segment and a second length of the second line segment; calculating a nozzle correction parameter based on the pixel feature curve, the first length, the second length, the first interval coefficient and the second interval coefficient; correcting a nozzle assembly of the 3D printing device using the nozzle correction parameter, wherein the nozzle assembly is used to print a correction object on the printing platform.

10. The electronic device of claim 9, wherein, The processor performs the step of calculating a nozzle correction parameter based on the pixel feature curve, the first length, the second length, the first interval coefficient and the second interval coefficient, which includes: calculating a plurality of peak value coordinates of the pixel feature curve; obtaining an actual length of a single pixel point in the correction object in the target gray image on the X-axis of the planar rectangular coordinate system and an actual width on the Y-axis of the planar rectangular coordinate system based on a plurality of the peak value coordinates, the first length, the second length, the first interval coefficient and the second interval coefficient; obtaining the nozzle correction parameter based on a plurality of the peak value coordinates, the actual length and the actual width.

11. The electronic device of claim 10, wherein, The processor performs the step of obtaining the nozzle correction parameter based on a plurality of the peak value coordinates, the actual length and the actual width, which includes: obtaining a first motion gap value of the nozzle assembly on the X-axis based on the actual length and a plurality of the peak value coordinates; obtaining a second motion gap value of the nozzle assembly on the Y-axis based on the actual width and a plurality of the peak value coordinates; taking the first motion gap value and the second motion gap value as the nozzle correction parameter.

12. The electronic device of claim 9, wherein, The processor performs the step of performing image processing on the initial gray image to obtain a target gray image, which includes: obtaining a target rotation angle representing an angle at which the first line segment or the second line segment is parallel to the coordinate axis after the initial gray image is rotated; rotating the initial gray image based on the target rotation angle; obtaining target cropping data; extracting an image in a region of interest in the rotated initial gray image based on the target cropping data to obtain the target gray image.

13. The electronic device of claim 12, wherein, The target cropping data is obtained by: obtaining a horizontal field of view angle, a vertical field of view angle and a theoretical shooting distance of the acquisition assembly; obtaining a theoretical acquisition width and a theoretical acquisition length based on the horizontal field of view angle, the vertical field of view angle and the theoretical shooting distance; obtaining the target cropping data based on the first length, the second length, the theoretical acquisition width and the theoretical acquisition length.

14. The electronic device of claim 12, wherein, The target rotation angle is obtained by: cropping the initial gray image using the target cropping data; obtaining an edge gray image by using an edge detection technology to detect the cropped initial gray image; obtaining a first inclination angle between each of the first line segments and the X-axis of the plane rectangular coordinate system in the edge gray image; obtaining a second inclination angle between each of the second line segments and the Y-axis of the plane rectangular coordinate system in the edge gray image; obtaining the target rotation angle based on the first inclination angles and the second inclination angles.

15. The electronic device of claim 14, wherein, After the processor performs the step of cropping the initial gray image using the target cropping data, the processor further performs: obtaining an initial gray histogram of the cropped initial gray image; determining a pixel threshold value of the initial gray histogram, the pixel threshold value being an index value of a pixel extreme value in the initial gray histogram; the step of obtaining an edge gray image by using an edge detection technology to detect the cropped initial gray image includes: obtaining an edge gray image by using an edge detection technology to detect the cropped initial gray image based on the pixel threshold value.

16. The electronic device of claim 9, wherein, Before the processor performs the step of controlling the acquisition component to acquire the printing platform printed with the correction object to obtain an initial gray image, the processor further performs: controlling the acquisition component to acquire the printing platform without printing the correction object to obtain a blank image of the printing platform; the step of controlling the acquisition component to acquire the printing platform printed with the correction object to obtain an initial gray image includes: controlling the acquisition component to acquire the printing platform printed with the correction object to obtain an initial image of the printing platform; calculating a pixel difference between the blank image and the initial image, and obtaining a difference image based on the pixel difference; converting the difference image into the initial gray image.

17. A computer storage medium, comprising, The computer storage medium stores computer instructions, when the computer instructions run on an electronic device, make the electronic device perform: controlling an acquisition component of a 3D printing device to acquire a printing platform printed with a correction object to obtain an initial gray image, wherein the correction object includes a plurality of first line segments parallel to each other and a plurality of second line segments parallel to each other, the first line segments are not parallel to the second line segments, the interval size between two adjacent first line segments in the plurality of first line segments is related to a first interval coefficient, the interval size between two adjacent second line segments in the plurality of second line segments is related to a second interval coefficient, and the acquisition component is used to acquire an image of the printing platform; establishing a plane rectangular coordinate system based on the initial gray image; performing image processing on the initial gray image to obtain a target gray image, wherein the first line segments or the second line segments in the target gray image are parallel to any coordinate axis of the plane rectangular coordinate system; obtaining a pixel feature curve matched with the target gray image, wherein the pixel feature curve represents the distribution of each pixel value in the target gray image; obtaining a first length of the first line segments and a second length of the second line segments; calculating a nozzle correction parameter based on the pixel characteristic curve, the first length, the second length, the first interval coefficient, and the second interval coefficient; correcting a nozzle assembly of the 3D printing device using the nozzle correction parameter, wherein the nozzle assembly is used to print a correction object on the printing platform.

18. The computer storage medium of claim 17, wherein, The electronic device performs the step of calculating a nozzle correction parameter based on the pixel characteristic curve, the first length, the second length, the first interval coefficient, and the second interval coefficient, including: calculating a plurality of peak coordinates of the pixel characteristic curve; based on a plurality of the peak coordinates, the first length, the second length, the first interval coefficient, and the second interval coefficient, obtaining an actual length of a single pixel point in the correction object in the target gray-scale image on the X-axis of the plane rectangular coordinate system and an actual width on the Y-axis of the plane rectangular coordinate system; based on a plurality of the peak coordinates, the actual length, and the actual width, obtaining the nozzle correction parameter.

19. The computer storage medium of claim 18, wherein, The electronic device performs the step of obtaining the nozzle correction parameter based on a plurality of the peak coordinates, the actual length, and the actual width, including: based on the actual length and a plurality of the peak coordinates, obtaining a first motion gap value of the nozzle assembly on the X-axis; based on the actual width and a plurality of the peak coordinates, obtaining a second motion gap value of the nozzle assembly on the Y-axis; taking the first motion gap value and the second motion gap value as the nozzle correction parameter.

20. The computer storage medium of claim 17, wherein, The electronic device performs the step of obtaining a target gray-scale image by image processing the initial gray-scale image, including: obtaining a target rotation angle, the target rotation angle representing an angle at which the first line segment or the second line segment is parallel to the coordinate axis after the initial gray-scale image is rotated; rotating the initial gray-scale image based on the target rotation angle; obtaining target cropping data; based on the target cropping data, extracting an image in a region of interest in the rotated initial gray-scale image to obtain the target gray-scale image.

Citation Information

Patent Citations

  • 3D printing method and device

    CN113674299A

  • Leveling method, computer program and readable storage medium

    CN115320096A

  • Automatic calibration method of 3D printing equipment, electronic equipment and storage medium

    CN116901432A

  • Printing device, printing system and printing method

    JP2016179660A