An image processing method and system for 3D printing
By moving and fusing images along a specific direction in DLP 3D printing and gradually superimposing grayscale values, the problem of uneven model surface is solved, achieving higher printing accuracy and smoother results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAOXING FAST REAL ELECTRONICS TECH CO LTD
- Filing Date
- 2020-12-02
- Publication Date
- 2026-06-05
AI Technical Summary
Existing DLP 3D printing technology, without changing the resolution of the original image, results in inconsistent surface connections and an uneven, wavy appearance, mainly due to excessive variations in the grayscale values of adjacent pixels.
By moving and merging the image along a specific direction without changing the original image resolution, and gradually superimposing the grayscale values of adjacent pixels, finer grayscale control can be achieved.
It improves the smoothness of the 3D printed model surface, reduces the grayscale difference between adjacent pixels, enhances printing accuracy, and eliminates the water ripple effect.
Smart Images

Figure CN114581312B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more particularly to an image processing method and system for 3D printing. Background Technology
[0002] The basic principle of DLP (Digital Light Processing) 3D printing technology is that a digital light source projects onto the surface of liquid photosensitive resin layer by layer in the form of surface light, and then solidifies and forms the 3D print layer by layer. During DLP 3D printing, the printable area is divided into individual "voxels," which are the units that make up the 3D printed part. The printer determines whether to print by recognizing the grayscale of the pixels corresponding to these voxels. If a pixel is marked "white," the projector will solidify the resin at that pixel location, thus completing the printing; conversely, if a pixel is marked "black," the projector will not solidify the resin at that pixel location. When the grayscale of a pixel reaches a certain level, it will not be printed at all; if the grayscale reaches a certain value, hemispherical blocks will appear on the previous printed layers. The brighter the pixel, the higher these blocks are, and the "voxel" will become wider and slightly taller. This means that the size of the voxel can be controlled by changing the grayscale of a single pixel, and the size of the voxel can, to some extent, be equivalent to the precision of the printed part.
[0003] Current printing methods project an image onto each layer of the model to be printed, and then solidify it. For example, when a DLP device uses a 1K95 optical engine (1920×1080 resolution), the pixels are too large, especially the grayscale values of adjacent pixels in the projected image are too obvious, resulting in discontinuous connections on the printed model surface and an uneven surface after printing. Therefore, a drawback of existing DLP 3D methods is that the outlines will appear discontinuous due to the jagged edges of the image itself, with obvious distinctions between adjacent pixels, ultimately resulting in concentric rings of water ripples on the model's outline surface.
[0004] Therefore, those skilled in the art are dedicated to developing an image processing method for 3D printing that can improve the grayscale detail of pixels without changing the original image resolution, make the transition between grayscale values of adjacent pixels better, reduce the variation, and make the surface of the printed model smoother. Summary of the Invention
[0005] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is how to improve the problem of excessive gray level difference between adjacent pixels of an image without changing the original image resolution.
[0006] To achieve the above objectives, the present invention provides an image processing method for 3D printing, comprising the following steps:
[0007] Project the layer to be printed to generate an initial image;
[0008] The initial image is moved along a first direction such that the initial image moves a first distance from an initial position to a first defined position to obtain a first image, wherein the first distance is not greater than the length of a pixel in the initial image along the first direction;
[0009] The initial image and the first image are fused to obtain a fused image; and
[0010] Print the fused image.
[0011] Furthermore, the fusion step includes superimposing the pixel grayscale values at corresponding positions in the initial image and the first image.
[0012] Further, the initial image is moved one or more times along the first direction to obtain one or more of the first images; and
[0013] One or more of the first images are fused with the initial image to obtain the fused image.
[0014] Furthermore, when the number of movements along the first direction is greater than once, the movement distance is the same each time.
[0015] Furthermore, the first distance is half the length of a pixel in the initial image along the first direction.
[0016] Furthermore, it also includes: moving the first image along a second direction, such that the first image moves a second distance from the first defined position to a second defined position, to obtain a second image, wherein the second direction is perpendicular to the first direction; and
[0017] The initial image, the first image, and the second image are merged to obtain the merged image.
[0018] Furthermore, the second distance is no greater than the length of a pixel in the initial image along the second direction.
[0019] Further, the first image is moved one or more times along the second direction to obtain one or more second images; and
[0020] One or more of the second images are fused with the initial image and the first image to obtain the fused image.
[0021] Furthermore, when the number of movements along the second direction is greater than once, the distance moved each time is the same.
[0022] Furthermore, the second distance is half the length of a pixel in the initial image along the second direction.
[0023] Furthermore, it also includes: moving the second image along a third direction, such that the second image moves a third distance from the second defined position to a third defined position, to obtain a third image, wherein the third direction is opposite to the first direction; and
[0024] The initial image, the first image, the second image, and the third image are merged to obtain the merged image.
[0025] Furthermore, the third distance is no greater than the length of a pixel in the initial image along the first direction.
[0026] Further, the second image is moved one or more times along the third direction to obtain one or more of the third images; and;
[0027] One or more of the third images are fused with the initial image, the first image, and the second image to obtain the fused image.
[0028] Furthermore, when the number of movements along the third direction is greater than once, the movement distance is the same each time.
[0029] Furthermore, the number of movements along the third direction is the same as the number of movements along the first direction.
[0030] Furthermore, the first distance is equal to half the length of a pixel in the initial image along the first direction; the number of movements along the first direction is one.
[0031] Furthermore, the second distance is equal to half the length of a pixel in the initial image along the second direction; the number of movements along the second direction is one.
[0032] Furthermore, it also includes: the difference between the distances along the first direction between the third defined position and the first defined position is zero.
[0033] The present invention also provides an image processing system for 3D printing, comprising:
[0034] The projection module is configured to project the layer to be printed to generate an initial image;
[0035] A moving module is configured to move the initial image along a first direction, such that the initial image moves a first distance from an initial position to a first defined position to obtain a first image, wherein the first distance is not greater than the length of a pixel in the initial image along the first direction;
[0036] A fusion module is configured to fuse the initial image and the first image to obtain a fused image; and
[0037] The printing module is configured to print the fused image.
[0038] Furthermore, the moving module is configured to also be able to move the first image along a second direction, such that the first image moves a second distance from the first defined position to a second defined position to obtain a second image, wherein the second direction is perpendicular to the first direction; and the second distance is not greater than the length of a pixel in the initial image along the second direction.
[0039] Furthermore, the moving module is configured to move the second image along a third direction, such that the second image moves a third distance from the second defined position to a third defined position to obtain a third image, wherein the third direction is opposite to the first direction; the third distance is not greater than the length of a pixel in the initial image along the first direction; and the difference between the distances along the first direction between the third defined position and the first defined position is zero.
[0040] The present invention also provides an image processing apparatus for 3D printing, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, the processor being configured to implement the steps of the image processing method when executing the computer program.
[0041] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the steps of the image processing method.
[0042] Compared with existing technical solutions, the technical effect of the present invention is that it reduces the original excessive grayscale difference between adjacent pixels in the image, so that the pixels on the image are displayed in a smoother grayscale transition mode. This makes the intensity of light edge distribution more uniform when DLP 3D printing photocurable materials, improves 3D printing accuracy, and makes the surface of the printed model smoother.
[0043] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0044] Figure 1 This is a grayscale diagram of an image before it moves once in one direction, according to a preferred embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of image grayscale overlay after a preferred embodiment of the present invention has been moved once in one direction;
[0046] Figure 3 This is a grayscale diagram of an image before it is moved twice in one direction, according to a preferred embodiment of the present invention.
[0047] Figure 4 This is a schematic diagram of image grayscale overlay after moving twice in one direction according to a preferred embodiment of the present invention;
[0048] Figure 5 This is a schematic diagram of the grayscale within the image before moving half a pixel, according to a preferred embodiment of the present invention.
[0049] Figure 6 This is a schematic diagram of grayscale superposition in an image after shifting by half a pixel in both the width and height directions, according to a preferred embodiment of the present invention.
[0050] Figure 7 This is a schematic diagram of grayscale overlay in a preferred embodiment of the present invention;
[0051] Figure 8 This is a schematic diagram of an image movement process according to a preferred embodiment of the present invention;
[0052] Figure 9 This is a flowchart illustrating how the image processing method proposed in this invention can improve the accuracy of DLP 3D printing. Detailed Implementation
[0053] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0054] In one embodiment of the present invention, such as Figure 1 As shown, the image moves once along its width from its initial position A to a first defined position B. The distance between points A and B is no greater than the width of one pixel in the image. In the diagram, a and b represent regions in the image before the movement, and b and c represent the corresponding regions in the image after the movement. Figure 1As shown, before the movement, the grayscale values are a:G1, b:G1, and c:G2. After superimposing the grayscale values of the images before and after the movement, region b is the grayscale fusion region. The grayscale value of this region is obtained by superimposing the grayscale values of the two images at corresponding positions before and after the movement, which is equal to G1 + G2. Figure 2 As shown, after the shift, the grayscale values are a:G1, b:G1+G2, and c:G2. It can be seen that after one shift, the grayscale values of the initial image region change from the entire G1 to a portion of G1 and a portion of G1+G2, achieving the effect of grayscale interpolation. This makes grayscale control more precise, effectively increasing the image resolution and reproducing a higher-resolution image from the original image.
[0055] In another embodiment of the invention, the image moves twice from its initial position A along its width, from A to C and then to B. The total movement distance between A and B does not exceed the width of one pixel. Figure 3 As shown in the figure, regions a, b, and d represent areas in the image before the movement; b, d, and e represent the corresponding image areas after the first movement; and d, e, and f represent the corresponding image areas after the second movement. Before the movement, the image grayscale values are: a:G1, b:G1, d:G1, e:G2, f:G3. After two movements, the image grayscale values become: a:G1, b:G1+G2, d:G1+G2+G3, e:G2+G3, f:G3. This embodiment not only achieves the effect of grayscale interpolation but also achieves better results than moving from A to B only once, improving the fineness of grayscale control. Based on a similar principle, the more times the image is moved from A to B, the better the effect, and the higher the resolution of the final fused image.
[0056] In another embodiment of the invention, such as Figure 5 , Figure 6 As shown, during the first movement, the image moves once from its initial position A along its width to the first defined position B, with a movement distance equal to half a pixel's width. During the second movement, it moves once from the first defined position B along its height to the second defined position C, with a movement distance equal to half a pixel's height. During the third movement, it moves from the second defined position C along its width in the opposite direction to the first movement to the third defined position D.
[0057] From a macroscopic perspective, in the image, a, b, d, and e represent regions in the image before the shift, with a grayscale value of G1. b, c, e, and f represent the corresponding image regions after the first shift, with a grayscale value of G2; e, f, h, and i represent the corresponding image regions after the second shift, with a grayscale value of G3; and d, e, g, and h represent the corresponding image regions after the third shift, with a grayscale value of G4. After these three half-pixel shifts, the four images are fused, that is, the grayscale values at corresponding positions are superimposed to obtain the final fused image, as shown below. Figure 6 As shown. The grayscale values before the image shift are a:G1, b:G1, c:G2, d:G1, e:G1, f:G2, g:G4, h:G4, i:G3. The grayscale values after the shift and fusion become: a:G1, b:G1+G2, c:G2, d:G1+G4, e:G1+G2+G3+G4, f:G2+G3, g:G4, h:G4+G3, i:G3.
[0058] From a micro perspective, it can also be understood as Figure 5 In this diagram, a, b, d, and e represent a pixel in the image before the shift, with a grayscale value of G1. b, c, e, and f represent the corresponding region after the pixel is shifted by half a pixel for the first time, with a grayscale value of G2. e, f, h, and i represent the corresponding region after the pixel is shifted by half a pixel for the second time, with a grayscale value of G3. d, e, g, and h represent the corresponding region after the pixel is shifted by the third time, with a grayscale value of G4. After these three half-pixel shifts, the grayscale values of the four regions are merged, that is, the grayscale values at corresponding positions are superimposed to obtain the final merged result, as shown below. Figure 6 As shown. Before the offset, the grayscale values were a:G1, b:G1, c:G2, d:G1, e:G1, f:G2, g:G4, h:G4, i:G3. After the offset and fusion, the grayscale values became: a:G1, b:G1+G2, c:G2, d:G1+G4, e:G1+G2+G3+G4, f:G2+G3, g:G4, h:G4+G3, i:G3. It can be seen that the grayscale value of the pixel corresponding to a, b, d, and e changed from the original single value G1 to a:G1, b:G1+G2, d:G1+G4, e:G1+G2+G3+G4. This is equivalent to dividing the original single pixel (abde) into four new pixels (a, b, d, e), each with four different grayscale values, thereby improving the image resolution.
[0059] from Figure 5 and Figure 6As can be seen, whether performing macroscopic analysis from the perspective of the image itself or microscopic analysis from the perspective of individual pixels, the effect is the same: without changing the original image resolution, the offset effectively inserts more grayscale values, resulting in finer grayscale control than without the offset. By offsetting the image by half a pixel in both the width and height directions, the image resolution is improved, which is beneficial for obtaining 3D printed models with smoother contour surfaces.
[0060] In this application, the fusion of multiple images, or the superposition of the pixel grayscale values of multiple images, can be performed as follows:
[0061] Based on the target optical engine resolution of 1920*1080, each pixel size of 100um, anti-aliasing level 2, and pixel offset mode of 2*2, that is... Figure 5 , 6 The example shown illustrates the offset. The original image is transformed into four images after the shift. Anti-aliasing is applied, and the corresponding area is calculated, giving each image its own grayscale value. A grid map with a resolution of 1920*1080 is then generated, with 1920*2*2 grid cells in the width direction and 1080*2*2 in the height direction. For each line segment, when it intersects the grid map, the pixels of that grid are illuminated. This results in a contour map with a width of 7680 and a height of 4320. Rays are then emitted from each row of this contour map, and the contour is filled using the incoming and outgoing information. This achieves the fusion of multiple images, or the superposition of pixel grayscale values from multiple images, resulting in a higher resolution image.
[0062] In different embodiments, images can be adjusted or processed according to different situations, and superimposed or blended in a specific way to obtain a blended image with a smoother transition.
[0063] Figure 7 This illustrates the grayscale situation corresponding to another embodiment of the present invention. Analogous to the above process, for a single projected image of the layer to be printed, b represents the superposition of grayscale values from Tx0y0 to Txny0, d represents the superposition of grayscale values from Tx0y0 to Tx0yn, e represents the superposition of grayscale values from Tx0y0 to Txnyn, f represents the superposition of grayscale values from Txny0 to Txnyn, and h represents the superposition of grayscale values from Tx0yn to Txnyn. Compared to the case without offset, a half-pixel offset allows for finer overall grayscale control of the projected image, especially reducing the difference between adjacent grayscale values at the edges. This significantly reduces jagged edges around the image, resulting in a smoother surface contour of the printed model.
[0064] In another embodiment of the invention, the image is moved twice in both the width and height directions. Figure 8 The specific process of image movement is illustrated. Assume that the width and length of one pixel in the image are both 3mm. Each offset along the X-axis (image width) is 1 / 3 pixel (1mm). Each offset along the Y-axis (image height) is also 1 / 3 pixel (1mm). The coordinate changes of the reference point (0,0) in the image during the offset process are as follows: from (0,0) to (1,0), to (2,0), to (2,1), to (1,1), to (0,1), to (0,2), to (1,2), to (2,2).
[0065] Similarly, if we increase the number of times the image moves in the width and height directions, and control the total movement distance in one direction to not exceed one pixel, then the more times the image moves, the smaller the single offset is divided, and the effect is to make the grayscale control more precise.
[0066] like Figure 9 The diagram shows a flowchart illustrating how the image processing method proposed in this invention improves the accuracy of DLP 3D printing. The printing process includes the following steps:
[0067] The 3D model to be printed is divided into layers to obtain multiple layers to be printed.
[0068] Turn on the optical engine; project the layer to be printed as an original image, and use a certain pushing method to make the original image move slightly in the width and height directions respectively, and project an image after each movement. Superimpose and merge the gray values of all projected images, and solidify the merged image for a certain period of time. The specific methods and processes of moving and merging the images are the same as the working principle of the aforementioned embodiments.
[0069] Starting with the first layer to be printed, perform the above operations on each layer in sequence until the 3D printing of all the layers to be printed is completed.
[0070] During DLP 3D printing, for each layer to be printed, a similar image movement and grayscale fusion operation as described in the previous embodiment is performed. The movement can be achieved by moving the optical engine, the optical engine lens, or the printing platform; essentially, these movements shift the projected image relative to its previous position. After each movement, an image is projected, and their grayscale values are superimposed, fused, and then allowed to solidify for a certain period to obtain a single layer model. The optical engine, optical engine lens, or printing platform is then returned to its original position, and the above operation is repeated for the next layer to be printed. This process ultimately yields a model with a smooth surface.
[0071] The typical DLP 3D printing process is as follows: turn on the optical engine, project an image, allow it to cure for a certain time, turn off the optical engine, and one layer is printed. Then project the next image and repeat the process. This method results in overly pronounced changes in the grayscale values of adjacent pixels along the object's outline in the projected image, leading to inconsistent surface connections and an uneven surface after printing.
[0072] The technical solution proposed in this invention can improve the 3D printing effect of existing low-resolution optical engines through software means without replacing the high-resolution optical engine. By reducing the grayscale difference between adjacent pixels in the image, the accuracy of DLP 3D printing is improved. Moreover, as the number of movements increases, that is, as the distance of each micro-displacement decreases, the grayscale control becomes more refined, and the grayscale changes between adjacent pixels at the model outline become smaller and smoother. This results in a smoother surface of the printed model, until no "water ripple" phenomenon is visible to the naked eye. This is equivalent to improving printing accuracy from a software perspective without changing the optical engine resolution. This method has low hardware costs, good printing results, and high application value.
[0073] Furthermore, the method proposed in this invention can also be applied to color images. First, any color is composed of the three primary colors: red, green, and blue. If the original color of a point is RGB (R, G, B), then we can convert the RGB color to grayscale using certain methods. The grayscale of a color image is essentially the pixel value after being converted to a black and white image. Then, the method proposed in this invention is applied to reduce the grayscale difference between adjacent pixels in the image, increasing the image's grayscale levels. The more grayscale levels, the clearer and more realistic the image's layers. Therefore, the method proposed in this invention can also be used to improve the resolution of color images, achieving a clearer and more realistic image effect.
[0074] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. An image processing method for 3D printing, characterized in that, Includes the following steps: Project the layer to be printed to generate an initial image; The initial image is moved once along a first direction, such that the initial image moves a first distance from its initial position to a first defined position to obtain a first image, wherein the first distance is not greater than the length of a pixel in the initial image along the first direction; The first image is moved once along the second direction, such that the first image moves a second distance from the first defined position to the second defined position to obtain the second image, wherein the second direction is perpendicular to the first direction, and the second distance is not greater than the length of a pixel in the initial image along the second direction; The second image is moved once along a third direction, such that the second image moves a third distance from the second defined position to the third defined position to obtain a third image, wherein the third direction is opposite to the first direction, and the third distance is not greater than the length of a pixel in the initial image along the first direction; The initial image, the first image, the second image, and the third image are fused to obtain a fused image, wherein fusion refers to the superposition of the gray values of corresponding pixels in each image; Print the fused image.
2. The image processing method for 3D printing as described in claim 1, characterized in that, The initial image is moved multiple times along the first direction, such that the initial image moves from the initial position by the first distance to the first defined position, to obtain the first image; the moving distance is the same each time and the total moving distance is equal to the first distance; The initial image, the image after each movement of the initial image, the second image, and the third image are merged to obtain the merged image.
3. The image processing method for 3D printing as described in claim 1, characterized in that, The first image is moved multiple times along the second direction, such that the first image moves from the first defined position by the second distance to the second defined position, to obtain the second image; the moving distance is the same each time and the total moving distance is equal to the second distance; the initial image, the first image, the image after each movement of the first image, and the third image are merged to obtain the merged image.
4. The image processing method for 3D printing as described in claim 1, characterized in that, The second image is moved multiple times along the third direction, such that the second image moves from the second defined position by the third distance to the third defined position to obtain the third image; the moving distance is the same each time and the total moving distance is equal to the third distance; the initial image, the first image, the second image, and the image after each movement of the second image are merged to obtain the merged image.
5. The image processing method for 3D printing as described in claim 1, characterized in that, The first distance is equal to half the length of a pixel in the initial image along the first direction.
6. The image processing method for 3D printing as described in claim 5, characterized in that, The second distance is equal to half the length of a pixel in the initial image along the second direction.
7. The image processing method for 3D printing as described in claim 6, characterized in that, Also includes: The difference in distance along the first direction between the third defined position and the initial position is zero.
8. An image processing system for 3D printing, characterized in that, The system is used to implement the method according to any one of claims 1-7, comprising: The projection module is configured to project the layer to be printed to generate an initial image; A moving module is configured to move the initial image once along a first direction, such that the initial image moves a first distance from an initial position to a first defined position to obtain a first image, wherein the first distance is not greater than the length of a pixel in the initial image along the first direction; A fusion module is configured to fuse the initial image and the first image to obtain a fused image; and A printing module is configured to print the fused image.
9. An image processing apparatus for 3D printing, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, The processor is configured to implement the steps of the image processing method according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it can implement the steps of the image processing method according to any one of claims 1-7.