Digital three-dimensional printing graphics processing method and system
Through the digital three-dimensional printing graphic processing method, the problems of high cost and low processing efficiency of three-dimensional packaging molds and materials are solved, and efficient and unified three-dimensional surface printing effect is achieved. It is suitable for a variety of paper materials, including recycled environmentally friendly paper.
Patent Information
- Application Number
- CN202411050313.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-01
AI Technical Summary
The existing three-dimensional three-dimensional packaging has high cost, low processing efficiency, and poor batch consistency, especially the strict requirements on the thickness and toughness of the paper, resulting in complex processing and inappropriate use of recycled environmentally friendly paper.
Using the digital three-dimensional printing graphics processing method, by constructing a three-dimensional reference model, segmenting it into multiple cross-sectional figures, recording the three-dimensional coordinates of edge pixel points, combining the color data of the flat printing graphics, generating temporary printing graphics, and filling them, finally Print in sequence first to achieve a three-dimensional surface effect.
It reduces mold and material costs, improves processing efficiency, ensures consistency in large-scale printing, and is suitable for a variety of paper materials, including recycled environmentally friendly paper, avoiding secondary molding processing.
Smart Images

Figure CN118570433B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graphics processing technology, in particular to a digital three-dimensional printing graphics processing method and system. Background Art
[0002] With the development of product packaging, some high-end product packaging is no longer limited to flat patterns or texts, but usually needs to show some three-dimensional effects on the packaging. Take the packaging box as an example, for example, the three-dimensional design of the pattern, or the design of the highlights and dark parts of the pattern can be used to simulate the three-dimensional pattern or text.
[0003] In addition to the three-dimensional design of graphics, some packaging boxes use flat surfaces for ordinary main body colors, textures, etc., and use concave or convex forms to show the three-dimensional sense of text or part of the pattern, so as to enhance the design sense and refinement of the packaging box. The existing concave or convex surface shape is generally embossed locally after the flat printing is completed, and a special mold is required. When there are both concave and convex shapes, the front and back of the paper need to be embossed separately, which not only increases the mold cost, but also makes the process more complicated. In addition, there are certain requirements for the thickness and toughness of the paper. It is required that the paper be easy to process and shape, and avoid damage or poor shape retention during the lamination process. For example, recycled environmentally friendly paper is not suitable for this type of processing method and is prone to damage.
[0004] Based on the above reasons, the existing three-dimensional packaging has the problems of high mold and material costs in the processing stage, low processing efficiency, poor batch consistency, etc. Summary of the invention
[0005] In a first aspect, the embodiments of the present application provide a digital three-dimensional printed graphics processing method that solves the problems related to existing three-dimensional packaging molds and materials, such as high cost, low processing efficiency, and batch consistency.
[0006] The method comprises the steps of:
[0007] Includes steps:
[0008] Constructing a three-dimensional reference model corresponding to the printed layer;
[0009] Segmenting the three-dimensional reference model to obtain a plurality of cross-sectional graphics;
[0010] Traversing edge pixel points of the cross-sectional graph and recording the three-dimensional coordinates of the edge pixel points;
[0011] Reading a plane printed graphic, and obtaining color data and plane coordinates of each printed pixel in the plane printed graphic;
[0012] Generating a plurality of temporary printing graphics with color data of printing pixel points based on the cross-sectional graphics according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printing pixel points;
[0013] Filling the temporary printed pattern with colors to generate a pattern to be printed that has the same size as the plane printed pattern;
[0014] The graphics to be printed are printed in sequence from bottom to top in a vertical direction according to the order of the three-dimensional coordinates.
[0015] Due to the adoption of the above technical scheme, the multi-layer printed graphics are decomposed into multi-layer printed graphics after digital modeling, and the pixels on the plane printed graphics are reconstructed on the multi-layer printed graphics based on the multi-layer printed graphics. A three-dimensional printing effect with a three-dimensional surface and the plane printed graphics combined with the three-dimensional surface is produced through multi-layer printing. There is no need for secondary modeling processing, the tolerance to materials is good, and the three-dimensional modeling is based on digital modeling, which ensures the consistency of large-scale printing processing.
[0016] In a possible implementation, the step of constructing a three-dimensional reference model corresponding to the printed layer further includes:
[0017] Establishing a reference plane with the printing surface;
[0018] When there is a concave feature, a main solid feature is established downward based on the reference plane and at the height of the concave feature, and the concave feature is constructed on the solid feature; and / or
[0019] When there is a convex feature, create the convex solid feature upward based on the reference plane.
[0020] In a possible implementation, the step of segmenting the three-dimensional reference model to obtain a plurality of cross-sectional graphics further includes:
[0021] Constructing the segmentation surface of the three-dimensional reference model;
[0022] Splitting the three-dimensional reference model at equal distances through the splitting planes;
[0023] The intersection surface between each of the split surfaces and the three-dimensional reference model is taken as a cross-sectional figure.
[0024] In a possible implementation, the step of traversing edge pixel points of the cross-sectional figure and recording the three-dimensional coordinates of the edge pixel points further includes:
[0025] Traverse all the pixel points of the cross-section graph to generate the cross-section pixel point set:
[0026] Querying surrounding pixels of each pixel in the cross-section pixel set, and when the surrounding pixels include pixels outside the cross-section pixel set, marking the pixel as an edge pixel;
[0027] Obtaining the plane coordinates of the edge pixel points;
[0028] Based on the height of the cross-sectional figure where the edge pixel point is located relative to the reference plane of the three-dimensional reference module, the vertical coordinate of the edge pixel point is obtained.
[0029] Optionally, the querying of surrounding pixels of each pixel in the cross-section pixel set, when the surrounding pixels include pixels outside the cross-section pixel set, the step of marking the pixel as an edge pixel specifically includes:
[0030] Solve the 4-neighborhood and / or d-neighborhood of each pixel point in the pixel point set, and query whether the 4-neighborhood and / or d-neighborhood of each pixel point are in the cross-sectional pixel point set. If the 4-neighborhood and / or d-neighborhood of a pixel point is not in the cross-sectional pixel point set, it is judged to be the plane coordinate of the edge pixel point.
[0031] In a possible implementation, the step of reading the plane printed graphics and obtaining the color data and plane coordinates of each printed pixel further includes:
[0032] Read graphics files containing flat printed graphics;
[0033] Read the size of the graphic file;
[0034] Traverse each pixel on the graphic file and obtain the RGB color value of each pixel;
[0035] The RGB color value of each pixel is converted into the corresponding CMYK color value.
[0036] Optionally, the step of generating a plurality of temporary printing graphics with color data of printing pixel points based on the cross-sectional graphics according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printing pixel points further comprises:
[0037] Comparing the three-dimensional coordinates of the edge pixel points with the plane coordinates of the printed pixel points;
[0038] Obtain edge pixel points and printed pixel points corresponding to plane coordinates;
[0039] Replace the edge pixels on the cross-sectional graph by printing the CMYK color values of the pixels;
[0040] The replaced cross-sectional graphic serves as a temporary printed graphic.
[0041] In a possible implementation, the step of filling the temporary printed graphic with colors is to fill the pixels on the temporary printed graphic except the printed pixels with designated CMYK color values.
[0042] In a possible implementation, when the three-dimensional reference model is segmented into multiple layers, the layer height is an integer multiple of the thickness of a single printing layer.
[0043] A second aspect of the present application provides a digital three-dimensional printing graphics processing system, the system comprising:
[0044] A modeling module is used to construct a three-dimensional reference model corresponding to the printed layer; perform multi-layer segmentation on the three-dimensional reference model, and obtain and store multiple cross-sectional graphics;
[0045] A printing graphics processing module is used to obtain and store the size of the printing graphics, as well as the color data and plane coordinates of each printing pixel;
[0046] A pixel mapping module traverses edge pixel points of the cross-sectional graph and records the three-dimensional coordinates of the edge pixel points; generates a plurality of temporary printed graphs with printed pixel points according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printed pixel points;
[0047] A color filling module, performing color filling based on the temporary printing pattern to generate a pattern to be printed with the same size as the plane printing pattern;
[0048] The printing execution module prints the graphics to be printed in order from bottom to top according to the vertical order of the three-dimensional coordinates. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flow chart of the overall method of the first embodiment;
[0050] Figure 2 is a specific method flow chart of step S1 of the second embodiment;
[0051] Figure 3 is a specific method flow chart of step S2 of the third embodiment;
[0052] Figure 4 is a specific method flow chart of step S4 of the fourth embodiment;
[0053] Figure 5 It is a schematic diagram of the module structure of the fifth embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described in detail through implementation methods with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0055] The first embodiment of the present application provides a digital three-dimensional printing graphics processing method, which generally performs digital modeling on the printing layer, and obtains the pixel correspondence between the three-dimensional shape on the model and the plane image to be printed by digitally computing the digitally modeled model as an object, thereby realizing three-dimensional printing through a plane printer. Based on the above overall technical ideas, Figure 1 As shown, the digital three-dimensional printing graphics processing method of this embodiment specifically includes the following steps:
[0056] S1. Constructing a three-dimensional reference model corresponding to the printed layer;
[0057] S2. segmenting the three-dimensional reference model to obtain a plurality of cross-sectional graphics;
[0058] S3. Traversing the edge pixels of the cross-sectional graph and recording the three-dimensional coordinates of the edge pixels;
[0059] S4. Read the plane printed graphics, and obtain the color data and plane coordinates of each printed pixel in the plane printed graphics;
[0060] S5. generating a plurality of temporary printed graphics having color data of printed pixels based on the cross-sectional graphics according to the three-dimensional coordinates of the edge pixels and the plane coordinates of the printed pixels;
[0061] S6. Fill the temporary printed pattern with color to generate a to-be-printed pattern of the same size as the plane printed pattern;
[0062] S7. Print the graphics to be printed in sequence from bottom to top according to the vertical order of the three-dimensional coordinates.
[0063] Among them, the printing layer described in step S1 is a three-dimensional model. Since printing first needs to cover the surface of the paper material to cover the original color of the paper material, such as covering the original straw yellow color of corrugated paper and kraft paper so as not to affect the performance of the surface printed pattern, the printed pattern layer itself needs a certain thickness. Therefore, a three-dimensional model with the printing surface as the bottom and the printing thickness as the height is structurally constructed, and then three-dimensional modeling is performed based on the covering layer.
[0064] It should be noted that the technical solution of this embodiment is suitable for replacing the original concave and convex modeling achieved by stamping, reducing the processing steps and lowering the material requirements for paper materials. Therefore, the degree of concavity or convexity achieved is limited. It can be suitable for three-dimensional models such as commonly seen crescents, stars, water drops, snowflakes, characters, carvings, etc., which are attached to the printing surface and are slightly concave or convex. It is not suitable for large-scale three-dimensional modeling on packaging, such as pavilions perpendicular to the printing plane, or product printing with three-dimensional structures in a suspended form that are separated from the paper surface.
[0065] When actually designing packaging, the three-dimensional effect of the printed surface may include one of an inner concave feature and an outer convex solid feature, or may include both inner concave features and outer convex solid features.
[0066] In step S2, the three-dimensional reference model is segmented in multiple layers to obtain multiple cross-sectional graphics. The three-dimensional reference model is segmented by multiple equally spaced horizontal planes, or multiple segments are segmented by one horizontal plane. The segmentation can obtain multiple cross-sectional graphics of the three-dimensional reference model. When performing this step, two main parameters need to be set, the thickness of the horizontal plane itself and the segmentation spacing. In various three-dimensional modeling environments, when it is only used to segment solid modeling, the thickness of the horizontal plane can be regarded as 0. However, in an actual printing production environment, each printed layer has a specific height. According to the accuracy of the printing equipment, the height of the horizontal plane is set by the height of the printed layer, so that the result of digital processing based on the three-dimensional reference model can be reproduced more accurately during printing. At the same time, for the segmentation spacing, in order to collect the data of the top and bottom of the three-dimensional reference model, the thickness of the printed layer can be used as the base number, and the integer multiple of the thickness of the printed layer can be used as the segmentation spacing.
[0067] When setting the spacing, it is necessary to consider the factors of precision and economy. The smaller the spacing, the higher the final printing precision and the smoother the color transition on the three-dimensional surface. However, the more layers are printed, the larger the data processing volume is, and the amount of consumables used is relatively large. The larger the spacing, the fewer layers are printed, the faster the printing speed is, and the amount of consumables used is relatively small, but the color transition on the three-dimensional surface is prone to faults. In actual implementation, comprehensive testing can be combined with precision and economy to take into account the requirements of both aspects.
[0068] The above-mentioned step of segmenting the three-dimensional reference model is similar to the slicing process in existing 3D printing, but the slicing in 3D printing is to obtain the printing layer, and the 3D model is formed by printing the printing layer layer by layer through the 3D printer. In the technical solution of this application, the edge of each cross-sectional figure is processed, and the data is mapped with the corresponding color on the plane printing figure, and the plane printing figure is accurately printed on the three-dimensional model, which needs to be realized by the following steps S3:
[0069] In step S3, the edge pixel points of the cross-sectional figure are traversed and searched, and the three-dimensional coordinates of the edge pixel points are recorded. The edge pixel points of the cross-sectional figure are traversed first by traversing each pixel point on the cross-sectional figure and the adjacent pixel points of each pixel point. In Python, the Pillow library and the opencv library can be used to store the traversed pixel point data in a list (array). When a pixel point lacks adjacent pixel points, the pixel point is marked as an edge pixel point.
[0070] It should be noted that when processing pictures, existing library functions often process pictures based on rectangular images. For example, a circular cross section. In fact, when a computer processes a picture, it processes a rectangular image with an area larger than the circular cross section. However, the pixels of the part of the rectangular image other than the circular cross section have no color. This part is usually represented by a grid composed of gray and white on the computer, and the pixels on the circular cross section can be colored with any color, or the part of the rectangular image other than the circular cross section can be clearly distinguished by color to distinguish it from the color on the circular cross section. This makes it easier for the computer to find the pixel points on the cross-sectional figure. Based on this principle, the figure obtained in step 2 is also a rectangular figure, and the cross-sectional figure area on the rectangular figure is distinguished from other areas by color and colorless, or by two obviously different colors.
[0071] When performing edge pixel search, the first step is to find the pixel points of the cross-sectional graphic area on the rectangular graphic. Taking the Pillow library as an example, the Pillow library uses the Cartesian pixel coordinate system to obtain the coordinates of the pixel points. In the Cartesian pixel coordinate system, the coordinate (0, 0) is located in the upper left corner of the image, the x coordinate increases from left to right, and the y coordinate increases from top to bottom.
[0072] In the Pillow library, use the getpixel() method or similar methods to obtain pixel coordinates. You need to provide the pixel coordinates as parameters. For example, (x, y) in getpixel((x, y)) is the coordinates and color of the pixel to be obtained. By giving different x and y values, you can get the pixel and color of the corresponding position in the image.
[0073] When traversing the pixels of an image, nested loops are usually used to traverse the x and y coordinates. The outer loop controls the change of the x coordinate from 0 to the width of the image; the inner loop controls the change of the y coordinate from 0 to the height of the image. In this way, each pixel in the image can be accessed sequentially and its coordinates can be obtained.
[0074] By retaining the coordinates of the pixels with the color or the specified color in the traversal execution result, the pixel point set of the cross-section graphic area can be obtained.
[0075] Then, the 4-neighborhood and / or d-neighborhood of each pixel in the pixel set is solved. The 4-neighborhood of pixel P (x, y) is (x+1, y), (x-1, y), (x, y+1) and (x, y-1); the d-neighborhood of pixel P (x, y) is (x+1, y+1), (x+1, y-1), (x-1, y+1) and (x-1, y-1). Find out whether the 4-neighborhood and / or d-neighborhood of each pixel are in the pixel set. If the 4-neighborhood and / or d-neighborhood of a pixel is not in the pixel set, it is determined to be the plane coordinate of the edge pixel. Combining the plane coordinates of the edge pixel and the layer height where it is located, the three-dimensional coordinates of the edge pixel can be obtained.
[0076] The three-dimensional coordinates of the edge pixel point are the three-dimensional coordinates of the edge pixel point in the coordinate system of the three-dimensional reference model. The three-dimensional reference model has a reference coordinate system when modeling, and each point on the three-dimensional reference model has a certain three-dimensional coordinate based on the reference coordinate system. Since the edge pixel point is obtained based on the three-dimensional reference model, each edge pixel point also has a certain three-dimensional coordinate, and the three-dimensional coordinate of each pixel point is represented by (X, Y, Z).
[0077] After step S3, the three-dimensional coordinates of the edge pixels of each cross-sectional figure are obtained, and then the colors need to be matched.
[0078] The process of matching colors is generally divided into obtaining colors and matching corresponding pixels for the obtained colors. Therefore, in step S4, the plane printed graphics are read to obtain the printing size, as well as the color data and plane coordinates of each printed pixel. The first step requires reading the plane printed graphics. The plane printed graphics are the printed patterns that need to be finally displayed on the packaging. In the design stage, a picture is made, namely the plane printed graphics represented here. By reading and analyzing the plane printed graphics, the color data and plane coordinates of each printed pixel can be obtained. The plane coordinates of the printed pixel are represented by (x, y).
[0079] Since the three-dimensional reference model and the plane printed graphic are obtained in the above steps, in fact, the plane printed graphic can be regarded as a projection of the printing surface of the three-dimensional reference model, and each pixel point on the printing surface of the three-dimensional reference model has a one-to-one correspondence with each printed pixel point on the plane printed graphic.
[0080] Therefore, when performing step S5. and generating multiple temporary printed graphics with printing pixels based on the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printing pixel points, the edge pixel points on each cross-sectional graphic also have a one-to-one correspondence with each printing pixel point on the plane printed graphic. Based on this one-to-one correspondence, the color corresponding to the edge pixel point on each cross-sectional graphic can be obtained.
[0081] A cross-sectional graphic with edge pixel points having colors can be generated based on the corresponding colors. The cross-sectional graphic with edge pixel points having colors is the temporary printed graphic.
[0082] Still taking Python as an example, import the turtle library and call the fill_color function, which receives the image path, output path, fill color, and grayscale threshold as parameters;
[0083] Open the picture you want to process;
[0084] Convert the image to grayscale to get the grayscale value of each pixel;
[0085] Get the pixel data of the grayscale image:
[0086] Create a new image to fill with color:
[0087] Traverse each pixel of the grayscale image, and determine whether it is the area where the edge pixel is located according to the grayscale value (the judgment condition can be set according to specific needs, such as the grayscale value is lower than a certain threshold). If so, fill the corresponding position of the new image with the color corresponding to the edge pixel;
[0088] The temporary printed graphic can be obtained by saving the filled image.
[0089] After the execution of the above step S5, the edge part of the temporary printed graphic is color mapped, but the pixels in the plane inside the edge line of the temporary printed graphic have no color definition. Inkjet printing is not performed during actual printing, which will cause each layer of the temporary printed graphic to actually print the edge contour line. The three-dimensional printed layer cumulatively printed by multiple layers of temporary printed graphics is an empty shell, or the color printing of the upper layer has no basis for connection and falls onto the lower layer or the bottom plane, resulting in modeling failure. Therefore, further data processing is required.
[0090] S6. Filling the temporary printed pattern with colors to generate a pattern to be printed that is the same size as the plane printed pattern;
[0091] When this step is executed, the color filling process in step S5 can be executed again, and the judgment condition of whether the area is where the edge pixel point is located based on the grayscale value is changed to judging whether it is a blank area based on the grayscale value. The remaining steps and principles are the same and will not be repeated here.
[0092] Step S6 defines the colors of the pixels in the plane inside the edge line of the temporary printing pattern, that is, fills the pixels with colors, so that the printing device can perform printing from the edge contour line to the internal plane.
[0093] S7. Print the graphics to be printed in sequence from bottom to top according to the vertical order of the three-dimensional coordinates.
[0094] After the graphics to be printed are printed sequentially from bottom to top, the printing having the same printing layer as the three-dimensional reference model and the same pattern as the plane printed graphics on the surface is completed.
[0095] In order to realize the superposition of printing of each split layer completed in the above steps, the printing method of this embodiment is preferably UV inkjet printing. The UV inkjet printer is equipped with a high-precision inkjet head, which can eject UV ink in the form of tiny droplets; the UV ink used is liquid under normal conditions, but has special chemical properties. When the ink droplets are ejected from the inkjet head to the surface of the printing medium (such as paper, plastic, metal, etc.), the ultraviolet (UV) lamp inside the printer immediately irradiates the ink just ejected. The UV ink quickly undergoes photopolymerization under the irradiation of the ultraviolet lamp, and instantly solidifies from liquid to solid. By controlling the movement of the inkjet head and the ejection of the ink, complex patterns, images and texts can be stacked layer by layer on the printing medium. Due to the high-precision control and fast curing characteristics of the inkjet head, UV inkjet printing can achieve very high printing accuracy and resolution, and can print patterns with three-dimensional and concave-convex effects, and can be printed on various types of materials. In combination with the overall process in this embodiment, UV inkjet printing is performed by UV irradiation after each layer of inkjet is completed to make it solidify instantly, so as to effectively establish a thickness foundation and achieve good superimposed inkjet printing.
[0096] The above-mentioned first embodiment generates a printing target from the overall data processing of the three-dimensional reference model and the printed graphics. After executing the printing target, a three-dimensional printing effect with a three-dimensional surface and a flat printed graphic combined with the three-dimensional surface can be achieved. There is no need for secondary modeling processing, and the tolerance to materials is good. In addition, the three-dimensional modeling is based on digital modeling, which ensures the consistency of large-scale printing processing.
[0097] Based on the above first embodiment, a second embodiment is further proposed. The second embodiment provides a specific example of S1 in the above first embodiment. Specifically, Figure 2 As shown, in the second embodiment, the step S1. constructing a three-dimensional reference model corresponding to the printed layer further includes:
[0098] S11. Establishing a reference plane with a printed surface;
[0099] S12. Establish the main solid feature based on the reference plane and downward at the height of the concave feature.
[0100] S13. When there is a concave feature, construct the concave feature on the main entity feature; and / or
[0101] S14. When there is a convex feature, establish the convex solid feature upward based on the reference plane.
[0102] In various three-dimensional modeling environments, it is first necessary to establish a reference plane. Generally, when the bottom surface is a plane, the three-dimensional modeling uses the bottom surface as the reference plane, that is, the printed surface is the reference plane. In this case, all features on the three-dimensional reference model can be regarded as convex solid features. Since the subsequent three-dimensional reference and multi-layer segmentation must also be performed with reference to the reference plane during three-dimensional modeling, if the thickness of the printing surface is not set accurately, then when the bottom surface is used as the reference plane and multi-layer segmentation is performed, it is easy to misalign the printing surface. The printing surface needs to be used to carry the printed pattern. If the position of the printing surface is inaccurate, it is easy to cause inaccurate color mapping on other three-dimensional shapes. Therefore, in this embodiment, the reference plane established by the printing surface is the upper surface after printing is completed as the reference plane. The height and size of the concave features and the convex solid features can be adjusted based on the reference plane. First, it is ensured that the printing surface can be used as an accurate printing color receiving plane. Since the remaining surfaces are not the main coloring surfaces, slight deviations do not affect the overall printing effect.
[0103] like Figure 3 As shown, the third embodiment of the present application further performs multi-layer segmentation on the three-dimensional reference model to obtain multiple cross-sectional graphics in step S2; the step of performing layered processing on the three-dimensional reference model to obtain multiple cross-sectional graphics features further includes:
[0104] S21. Constructing a segmentation surface of a three-dimensional reference model;
[0105] S22. Segmenting the three-dimensional reference model by equidistantly segmenting the segmentation surface;
[0106] S23. Obtain an intersection surface between the segmentation surface and the three-dimensional reference model as a cross-sectional figure.
[0107] Combined with the design idea of multi-layer segmentation in the second embodiment, specifically when setting the segmentation surface, the plane where the printing surface is located is first used as the segmentation surface L0, and the segmentation surfaces that segment the convex solid features from L0 upwards are marked as L1, L2, L3..., and the main solid features with concave features that segment from L0 downwards are marked as L-1, L-2, L-3..., respectively. The segmentation surfaces are parallel and equidistant, and the thickness of each layer is marked. The thickness represents the number of times the inkjet printer needs to repeat printing to complete the segmentation surface.
[0108] The fourth embodiment of the present application provides a color data processing method suitable for color processing of most inkjet printing devices based on the above embodiments, mainly for the step of reading the plane printed graphics in step S4, obtaining the printing size, and the color data and plane coordinates of each printed pixel point are further developed, such as Figure 4 Specifically shown include:
[0109] S41 reads the graphic file containing the flat printed graphics;
[0110] S42. Read the size of the graphic file;
[0111] S43. Traverse each pixel on the graphic file and obtain the RGB color value of each pixel;
[0112] S44. Convert the RGB color value of each pixel into a corresponding CMYK color value.
[0113] Among them, reading the graphic file and the graphic file size in steps S41 and S42 can be realized by calling standard library functions, and traversing the pixels in step S43 to obtain the RGB color value of each pixel can be performed by referring to the description of the getpixel() method in the Guangyu Pillow library in the above embodiment, which will not be repeated here. This embodiment mainly describes the color value conversion calculation in the above processing process. The specific RGB color value can be converted to CMYK color value by calculation using the following formula:
[0114] Divide the RGB values by 255, changing the range from 0-255 to 0-1:
[0115] r' = r / 255
[0116] g' = g / 255
[0117] b' = b / 255
[0118] Calculate the black key (K) color:
[0119] k = 1 - max(r', g', b')
[0120] Calculate cyan (C):
[0121] c = (1 - r' - k) / (1 - k)
[0122] Calculate Magenta (M):
[0123] m = (1 - g' - k) / (1 - k)
[0124] Calculate yellow (Y):
[0125] y = (1 - b' - k) / (1 - k)
[0126] Among them, r, g, and b represent the original RGB color values respectively.
[0127] For example, for the RGB color (200, 150, 100), the conversion process is as follows:
[0128] r' = 200 / 255 ≈ 0.784
[0129] g' = 150 / 255 ≈ 0.592
[0130] b' = 100 / 255 ≈ 0.392
[0131] but:
[0132] k = 1 - max(0.784, 0.592, 0.392) = 1 - 0.784 = 0.216
[0133] c = (1 - 0.784 - 0.216) / (1 - 0.216) ≈ 0
[0134] m = (1 - 0.592 - 0.216) / (1 - 0.216) ≈ 0.314
[0135] y = (1 - 0.392 - 0.216) / (1 - 0.216) ≈ 0.581
[0136] Therefore, the converted CMYK color values are approximately (0, 31.4%, 58.1%, 21.6%).
[0137] It should be noted that RGB and CMYK are two different color models, and there may be a certain degree of color deviation and distortion during the conversion process. In practical applications, adjust the parameters and strategies according to specific needs and target output devices to obtain better conversion results. In addition, different software or tools may use slightly different conversion algorithms or consider other factors, so in important color-related work, it is best to refer to the documentation and recommendations of the specific software or device used.
[0138] like Figure 5 As shown, the fifth embodiment discloses a digital three-dimensional printing system, which includes:
[0139] Modeling module 1 is used to construct a three-dimensional reference model corresponding to the printed layer; perform multi-layer segmentation on the three-dimensional reference model to obtain and store multiple cross-sectional graphics;
[0140] Printing graphics processing module 2, used to obtain and store printing size, color data and plane coordinates of each printing pixel;
[0141] The pixel mapping module 3 traverses the edge pixel points of the cross-sectional figure and records the three-dimensional coordinates of the edge pixel points; generates a plurality of temporary printed figures with printed pixel points according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printed pixel points;
[0142] A color filling module 4 performs color filling based on the temporary printing pattern to generate a pattern to be printed with the same size as the plane printing pattern;
[0143] The printing execution module 5 prints the graphics to be printed in order from bottom to top according to the vertical order of the three-dimensional coordinates.
[0144] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A digital three-dimensional printing graphics processing method, characterized in that: Includes steps: Constructing a three-dimensional reference model corresponding to the printed layer; Segmenting the three-dimensional reference model to obtain a plurality of cross-sectional graphics; Traverse the edge pixel points of the cross-sectional figure and record the three-dimensional coordinates of the edge pixel points; specifically, traverse all the pixel points of the cross-sectional figure to generate a cross-sectional pixel point set; query the surrounding pixel points of each pixel point in the cross-sectional pixel point set, and when the surrounding pixel points have pixel points outside the cross-sectional pixel point set, mark the pixel point as an edge pixel point; obtain the plane coordinates of the edge pixel point; based on the height of the cross-sectional figure where the edge pixel point is located relative to the reference plane of the three-dimensional reference module, obtain the vertical coordinate of the edge pixel point; Reading a plane printed graphic, and obtaining color data and plane coordinates of each printed pixel in the plane printed graphic; Generating a plurality of temporary printing graphics with color data of printing pixel points based on the cross-sectional graphics according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printing pixel points; Filling the temporary printed pattern with colors to generate a pattern to be printed that has the same size as the plane printed pattern; The graphics to be printed are printed in sequence from bottom to top in a vertical direction according to the order of the three-dimensional coordinates.
2. The method for processing digital three-dimensional printed graphics according to claim 1, characterized in that: The step of constructing a three-dimensional reference model corresponding to the printed layer further comprises: Establishing a reference plane with the printing surface; When there is a concave feature, a main solid feature is established downward based on the reference plane and at the height of the concave feature, and the concave feature is constructed on the solid feature; and / or When there is a convex feature, create the convex solid feature upward based on the reference plane.
3. The digital three-dimensional printing graphics processing method according to claim 1, characterized in that: The step of segmenting the three-dimensional reference model to obtain a plurality of cross-sectional graphics further comprises: Constructing the segmentation surface of the three-dimensional reference model; Splitting the three-dimensional reference model at equal distances through the splitting planes; The intersection surface between each of the split surfaces and the three-dimensional reference model is taken as a cross-sectional figure.
4. The method for processing digital three-dimensional printed graphics according to claim 1, characterized in that: The step of querying surrounding pixels of each pixel in the cross-section pixel set, and when there is a pixel outside the cross-section pixel set among the surrounding pixels, marking the pixel as an edge pixel specifically comprises: Solve the 4-neighborhood and / or d-neighborhood of each pixel point in the pixel point set, and query whether the 4-neighborhood and / or d-neighborhood of each pixel point are in the cross-sectional pixel point set. If the 4-neighborhood and / or d-neighborhood of a pixel point is not in the cross-sectional pixel point set, it is judged to be the plane coordinate of the edge pixel point.
5. The digital three-dimensional printing graphics processing method according to claim 1, characterized in that: The step of reading the plane printed graphics and obtaining the color data and plane coordinates of each printed pixel further includes: Read graphics files containing flat printed graphics; Read the size of the graphic file; Traverse each pixel on the graphic file and obtain the RGB color value of each pixel; The RGB color value of each pixel is converted into the corresponding CMYK color value.
6. The method for processing digital three-dimensional printed graphics according to claim 5, characterized in that: The step of generating a plurality of temporary printing graphics with color data of printing pixel points based on the cross-sectional graphics according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printing pixel points further comprises: Comparing the three-dimensional coordinates of the edge pixel points with the plane coordinates of the printed pixel points; Obtain edge pixel points and printed pixel points corresponding to plane coordinates; Replace the edge pixels on the cross-sectional graph by printing the CMYK color values of the pixels; The replaced cross-sectional graphic serves as a temporary printed graphic.
7. The method for processing digital three-dimensional printed graphics according to claim 1, characterized in that: The step of filling the temporary printed graphic with colors is to fill the pixels on the temporary printed graphic except the printed pixels with designated CMYK color values.
8. The method for processing digital three-dimensional printed graphics according to claim 1, characterized in that: When the three-dimensional reference model is segmented, the layer height is an integer multiple of the thickness of a single layer of printing.
9. A digital three-dimensional printing graphics processing system, characterized in that: The system includes: A modeling module is used to construct a three-dimensional reference model corresponding to the printed layer; perform multi-layer segmentation on the three-dimensional reference model, and obtain and store multiple cross-sectional graphics; A printing graphics processing module is used to obtain and store the size of the plane printing graphics, as well as the color data and plane coordinates of each printing pixel; A pixel mapping module, traversing edge pixel points of the cross-sectional figure, recording the three-dimensional coordinates of the edge pixel points; generating a plurality of temporary printed figures with printed pixel points according to the three-dimensional coordinates of the edge pixel points and the plane coordinates of the printed pixel points; specifically, traversing all pixel points of the cross-sectional figure, generating a cross-sectional pixel point set; querying the surrounding pixel points of each pixel point in the cross-sectional pixel point set, and when the surrounding pixel points have pixel points outside the cross-sectional pixel point set, marking the pixel point as an edge pixel point; obtaining the plane coordinates of the edge pixel point; and obtaining the vertical coordinates of the edge pixel point based on the height of the cross-sectional figure where the edge pixel point is located relative to the reference plane of the three-dimensional reference module; A color filling module, performing color filling based on the temporary printing pattern to generate a pattern to be printed with the same size as the plane printing pattern; The printing execution module prints the graphics to be printed in order from bottom to top according to the vertical order of the three-dimensional coordinates.
