3D printing image process method, processing method, device, apparatus and storage medium
By performing anti-aliasing, grayscale degradation, and blurring on 3D printed images, the problems of pixel steps and microscopic horizontal lines at image edges in traditional 3D printing technology are solved, improving the printing quality of irregular curved surfaces and fine structures.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI UNION TECH
- Filing Date
- 2022-10-24
- Publication Date
- 2026-05-29
AI Technical Summary
When traditional 3D printing technology processes irregular curved surfaces or intricate structures, the grayscale values of pixels at the image edges remain unchanged, resulting in obvious pixel steps and microscopic horizontal lines on the surface of the printed sample. This makes it difficult to meet the high requirements for smoothness and sharpness in fields such as dolls and footwear.
By employing anti-aliasing, grayscale degradation, and blurring techniques, the smoothness and detail of image edges are improved by adjusting the grayscale values and exposure energy of pixels at the image edges.
Without increasing power or exposure time, the step pattern and wood grain were reduced, improving the surface smoothness and microstructure clarity of the printed sample, and avoiding the problem of unclear structures with small holes or gaps.
Smart Images

Figure CN115601265B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D printing technology, and in particular to a 3D printing image processing method, method, apparatus, equipment and storage medium. Background Technology
[0002] Photopolymer 3D printing equipment is widely used in fields such as dental and prototyping due to its high forming precision. Among them, bottom projection 3D printing equipment is favored by many manufacturers of customized products because it uses projection exposure to cure the photopolymer material across the entire cross-section of the object within the same exposure time, thus effectively improving printing efficiency.
[0003] When printing objects using bottom projection 3D printing equipment, printing speed and accuracy can be adjusted by regulating the Z-axis motor's auxiliary motion time and image correction. However, for applications in fields such as dolls and footwear, the surfaces often have many irregular curved surfaces or fine structures, making post-processing manual sanding impossible. Furthermore, subsequent coloring or molding will amplify the microscopic horizontal lines on the surface. Therefore, dolls and footwear require particularly high smoothness and sharpness on the surface of the printed samples.
[0004] In traditional techniques, when processing exposed projection images, the grayscale values of pixels at the image edges remain unchanged, all appearing as pure white pixels, and only conventional pixel anti-aliasing is applied to the image edges. However, since traditional techniques do not process image edge pixels, all edge pixels remain pure white, resulting in noticeable pixel steps on the surface of the printed sample. Summary of the Invention
[0005] Therefore, it is necessary to provide a 3D printing image processing method, apparatus, and processing device to address the aforementioned technical problems.
[0006] In a first aspect, this application provides a 3D printing image processing method. The method includes:
[0007] Acquire images of the 3D printed component model to be processed;
[0008] Anti-aliasing is applied to the image to be processed to obtain the first intermediate image;
[0009] The first intermediate image is degraded to grayscale to obtain the second intermediate image;
[0010] The second intermediate image is blurred to obtain the final image.
[0011] In one embodiment, anti-aliasing is performed on the image to be processed to obtain a first intermediate image, including:
[0012] Obtain the first predetermined pixel and the first predetermined value;
[0013] Determine the first threshold based on the first predetermined pixel;
[0014] The first predetermined pixel is determined as a candidate pixel by a first predetermined value;
[0015] Candidate pixels are identified as dominant edge pixels by using a first threshold.
[0016] In one embodiment, determining the first threshold based on the first predetermined pixel includes:
[0017] Obtain the grayscale values of the adjacent pixels of the first predetermined pixel, the grayscale values of the edges of the multiple first predetermined pixels, the grayscale values of the multiple adjacent pixels, and the grayscale values of the edges of the adjacent pixels;
[0018] Multiple preliminary grayscale change values are determined by the grayscale of the edges of the multiple first predetermined pixels and the grayscale of the multiple adjacent pixels;
[0019] Acquire edge grayscale change values along a first direction; the first direction is the direction in which the edge of the first predetermined pixel needs to be determined.
[0020] By comparing these multiple initial grayscale change values with the edge grayscale change values, the maximum grayscale change value is obtained;
[0021] The first threshold is generated by the maximum grayscale change value.
[0022] In one embodiment, determining a first predetermined pixel as a candidate pixel based on a first predetermined value includes:
[0023] Obtain the gray level of the first predetermined pixel, and determine the absolute value of the difference between the gray level of the adjacent pixel in the first direction and the gray level of the first predetermined pixel;
[0024] By comparing the absolute value with the first predetermined value, the relationship between the absolute value and the first predetermined value can be obtained.
[0025] Candidate pixels for the dominant edge pixel are determined by the relationship between the absolute value and the first predetermined value.
[0026] In one embodiment, determining the candidate pixel as the dominant edge pixel by using a first threshold includes:
[0027] Select the minimum grayscale change value among the candidate pixels of the dominant edge pixels and the edge to be judged and its adjacent pixels in the same direction;
[0028] The minimum value is compared with a first threshold; if it is greater than the first threshold, the candidate pixel is determined to be a dominant edge pixel.
[0029] Secondly, this application also provides a 3D printing process method, which includes:
[0030] Acquire images of the 3D printed component model to be processed;
[0031] Anti-aliasing is applied to the image to be processed to obtain the first intermediate image;
[0032] The first intermediate image is degraded to grayscale to obtain the second intermediate image;
[0033] The second intermediate image is blurred to obtain the final image;
[0034] The final image is then exposed to print, resulting in a 3D printed component.
[0035] Thirdly, this application also provides a photopolymerization 3D printing image processing apparatus. The apparatus includes:
[0036] The image acquisition module is used to acquire images of the 3D printed component model to be processed.
[0037] The anti-aliasing processing module is used to perform anti-aliasing processing on the image to be processed to obtain a first intermediate image;
[0038] The image grayscale degradation module is used to perform grayscale degradation on the first intermediate image to obtain the second intermediate image;
[0039] The image blurring module is used to blur the second intermediate image to obtain the final image.
[0040] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0041] Acquire images of the 3D printed component model to be processed;
[0042] Anti-aliasing is applied to the image to be processed to obtain the first intermediate image;
[0043] The first intermediate image is degraded to grayscale to obtain the second intermediate image;
[0044] The second intermediate image is blurred to obtain the final image.
[0045] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0046] Acquire images of the 3D printed component model to be processed;
[0047] Anti-aliasing is applied to the image to be processed to obtain the first intermediate image;
[0048] The first intermediate image is degraded to grayscale to obtain the second intermediate image;
[0049] The second intermediate image is blurred to obtain the final image.
[0050] Sixthly, this application also provides a computer program product. This includes a computer program that, when executed by a processor, performs the following steps:
[0051] Acquire images of the 3D printed component model to be processed;
[0052] Anti-aliasing is applied to the image to be processed to obtain the first intermediate image;
[0053] The first intermediate image is degraded to grayscale to obtain the second intermediate image;
[0054] The second intermediate image is blurred to obtain the final image.
[0055] The aforementioned 3D printing image processing methods, apparatus, equipment, storage media, and computer program products, after undergoing anti-aliasing treatment followed by grayscale degradation, can reduce step patterns and improve wood grain to a certain extent. The anti-aliasing treatment and subsequent grayscale degradation method proposed in this application can solve the problem of local structural defects caused by excessively low grayscale values of edge pixels without increasing power or exposure time, and avoids the problem of unclear or completely blocked small holes or gaps on the sample due to excessive energy. Attached Figure Description
[0056] Figure 1 This is an application environment diagram of a 3D printing image processing method in one embodiment;
[0057] Figure 2 This is a flowchart illustrating a 3D printing image processing method in one embodiment;
[0058] Figure 3 This is a flowchart illustrating a 3D printing image processing method in one embodiment;
[0059] Figure 4 This is a flowchart illustrating a 3D printing image processing method in one embodiment;
[0060] Figure 5 This is a flowchart illustrating a 3D printing image processing method in one embodiment;
[0061] Figure 6 This is a schematic diagram of a 3D printing image processing device in one embodiment;
[0062] Figure 7 This is a schematic diagram of a 3D printing image processing device in one embodiment;
[0063] Figure 8 This is an internal structural diagram of the processing device in one embodiment. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0065] 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 pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0066] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0067] This application provides a 3D printing image processing method that can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located on a cloud or other network server. System data processing can be performed on server 104, or it can be performed via a cloud server; in some cases, if terminal 102 includes a central processing unit (CPU), the CPU connected to terminal 102 can calculate the data to be used later, and then upload it to server 104 for storage via the network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and IoT devices; IoT devices can include devices such as 3D printers. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0068] In one embodiment, such as Figure 2 As shown, a 3D printing image processing method is provided, which can be applied to... Figure 1 Taking server 104 or central processing unit as an example, the following steps are included:
[0069] S202, Acquire the image to be processed of the model of the 3D printed component.
[0070] The method of image acquisition is determined by terminal 102: for example, if it is a personal computer, laptop, smartphone, or tablet, it can be captured by the camera of these terminals or downloaded via a connected internet. In one embodiment, the image to be calculated or processed is the image required when projected by the bottom projection surface exposure device in the 3D printer. This image is typically a layered image of the model of the 3D printed component. Specifically, the exposure device in the 3D printer faces the resin tank and obtains a layered image of the model of the 3D component by irradiating the transparent bottom of the resin tank.
[0071] S204, perform anti-aliasing processing on the image to be processed to obtain the first intermediate image.
[0072] Anti-aliasing methods can be selected according to the actual situation. Conventional anti-aliasing methods include Super Sample Anti-aliasing (SSAA), Multi-sample Anti-aliasing (MSAA), Fast Approximate Anti-aliasing (FXAA), Morphological Anti-aliasing (MLAA), and Temporal Anti-Aliasing (TAA). The method proposed in this application is only a preferred embodiment and should not be regarded as a necessary limitation on the scope of protection of this application.
[0073] Using anti-aliasing methods can identify edge pixels that cause unevenness in the image from the pixels to be detected. In other words, it can identify straight and diagonal line segments with jagged edges from the edge lines, thus preparing for subsequent grayscale degradation and blurring processing, resulting in smooth edges of printed 3D components.
[0074] S206, perform grayscale degradation on the first intermediate image to obtain the second intermediate image.
[0075] Anti-aliasing treatment can reduce step patterns and improve wood grain to some extent. Furthermore, the grayscale degradation after anti-aliasing treatment can resolve the problem of localized structural distortion. Localized structural distortion refers to the issue where, after anti-aliasing treatment, the edges of some curved surfaces exhibit pixel grayscale values that are too low to cure the resin, resulting in inconsistencies between the printed sample surface and the original model.
[0076] While increasing power and exposure time can address the issue of missing local structures caused by low grayscale values in edge pixels, excessive energy can also lead to unclear or blocked small holes or gaps in the sample. By adjusting the grayscale values of non-edge pixels with a value of 255, the grayscale value of these pixels is reduced to a suitable level. This method lowers the ratio of non-edge pixel grayscale values to edge grayscale values, i.e., the contrast between middle and edge pixels, thereby controlling the exposure energy of each region in the entire single layer. This ensures surface quality and the preservation of small gaps such as slits in the microstructure.
[0077] This invention reduces the pixel value of non-edge pixels to multiple values for comparison, including 100, 150 and 200. By modifying this value, the printing effect is compared. If the grayscale value is too small or too large, the surface wood grain or step pattern will become heavier. Finally, 150 was determined to be the preferred value of this invention.
[0078] S208, blur the second intermediate image to obtain the final image.
[0079] In one embodiment, a filtering blurring algorithm is used to blur the image edges, causing the pixel grayscale values to decrease until the area surrounding a specified pixel is entirely black, thereby further reducing the step texture and improving the wood grain.
[0080] In one embodiment, the filtering fuzzy algorithm used is a linear filtering algorithm, including mean filtering, median filtering, and Gaussian filtering.
[0081] In one embodiment, the filtering fuzzy algorithm used is a nonlinear filtering algorithm, including the Kalman filter algorithm and the particle filter algorithm.
[0082] In a 3D printing image processing method, without increasing the power value and exposure time, anti-aliasing, grayscale degradation and image blurring are used to solve the problem of local structural loss caused by low grayscale values of edge pixels. This avoids the problem of unclear or directly blocked small holes or gaps on the sample due to excessive energy.
[0083] Specifically, optimized edge detection is used in the anti-aliasing algorithm of this invention.
[0084] Conventional edge detection only considers local contrast values, typically determining edges in an image by calculating the grayscale values of the four adjacent pixels surrounding each pixel. This conventional approach can cause ghosting of original edges, introducing edges that weren't originally present during edge detection. Such a calculation method severely impacts the classification and recognition of images by anti-aliasing algorithms.
[0085] In one embodiment, an adaptive threshold edge detection calculation method is adopted. For example... Figure 3 As shown, the first intermediate image obtained by performing anti-aliasing processing on the image to be processed includes:
[0086] S302, Obtain the first predetermined pixel and the first predetermined value.
[0087] Wherein, the first predetermined pixel is any pixel in the image to be processed; the first predetermined value is used to determine whether the first predetermined pixel is a candidate pixel of the dominant edge pixel. Optionally, the first predetermined value is a natural constant; the first threshold is used to determine whether the candidate pixel is a dominant edge pixel.
[0088] S304, determine the first threshold based on the first predetermined pixel and the first predetermined value.
[0089] S306, determine the first predetermined pixel as a candidate pixel by using the first predetermined value.
[0090] In one embodiment, determining a first predetermined pixel as a candidate pixel based on a first predetermined value includes:
[0091] S3062, obtain the gray level of the first predetermined pixel, and determine the absolute value of the difference between the gray levels of adjacent pixels in the first direction and the first predetermined pixel.
[0092] S3064, compare the absolute value with the first predetermined value to obtain the relationship between the absolute value and the first predetermined value.
[0093] S3066, determine the candidate pixel of the first predetermined pixel as the dominant edge pixel by the relationship between the absolute value and the first predetermined value.
[0094] The absolute value is compared with a first predetermined value. If the absolute value is greater than the first predetermined value, the first predetermined pixel is determined as a candidate pixel for the dominant edge pixel. Specifically,
[0095] e intended =|LL intended |>T
[0096] Where L represents the grayscale value of the first predetermined pixel; L intended This represents the grayscale value of adjacent unit pixels in the edge direction that the first predetermined pixel needs to be judged; T represents the first predetermined value for edge judgment; e intended It is a Boolean value that indicates the state of the first predetermined pixel being set as a candidate pixel.
[0097] S308, candidate pixels are determined as dominant edge pixels by using a first threshold.
[0098] In one embodiment, determining a candidate pixel as a dominant edge pixel by using a first threshold includes:
[0099] S3082, select the minimum grayscale change value among the candidate pixels of the dominant edge pixels and the edge to be judged and its adjacent pixels in the same direction.
[0100] S3084, compare the minimum value with the first threshold; if it is greater than the first threshold, then determine that the candidate pixel is a dominant edge pixel.
[0101] e′ intended =min(e intended δ intended )>τ
[0102] Where τ is the first threshold for edge detection; e′ intended It is a Boolean value representing the state where the first predetermined pixel is the dominant pixel edge; e intended It is a Boolean value representing the state of the first predetermined pixel as a candidate pixel; δ intended This represents the change in edge grayscale value of adjacent unit pixels in the edge direction where the first predetermined pixel needs to be judged.
[0103] In this embodiment, an adaptive threshold is set for the candidate edges of the first predetermined pixel and calculations are performed to determine whether the pixel is an edge pixel. This ensures that during linear search, the search algorithm can detect blurry or easily obscured intersecting edges, thus avoiding omissions; and when multiple edges of the first predetermined pixel need to be determined, the truly dominant pixel edge can be selected.
[0104] In one embodiment, the present invention also discloses an embodiment for obtaining a first threshold. The specific details are as follows:
[0105] S402, after obtaining the first predetermined pixel, obtain the adjacent pixels of the first predetermined pixel, the grayscale of the edges of multiple first predetermined pixels, the grayscale of multiple adjacent pixels, and the grayscale of the edges of adjacent pixels.
[0106] In one embodiment, the first predetermined pixel is a square, so the obtained edge of the first predetermined pixel includes the top edge, bottom edge, left edge and right edge of the first predetermined pixel; the multiple adjacent pixels specifically refer to the pixels directly adjacent to the top edge, the pixels directly adjacent to the bottom edge, the pixels directly adjacent to the left edge and the pixels directly adjacent to the right edge of the first predetermined pixel.
[0107] S404, determine a plurality of preliminary grayscale change values by the grayscale of the edges of the plurality of first predetermined pixels and the grayscale of the plurality of adjacent pixels.
[0108] S406, Obtain edge grayscale change value along the first direction; the first direction is the direction in which the edge of the first predetermined pixel needs to be determined.
[0109] S408. Compare the multiple initial grayscale change values with the edge grayscale change values to obtain the maximum grayscale change value.
[0110] In one embodiment, the maximum grayscale change value satisfies the following relationship:
[0111] δ max =max(δ t δ r δ b δ l δ intended )
[0112] Where, δ t Indicates the initial grayscale change value above the first predetermined pixel; δ r Indicates the initial grayscale change value to the right of the first predetermined pixel; δ b Indicates the initial grayscale change value below the first predetermined pixel; δ l Indicates the initial grayscale change value to the left of the first predetermined pixel; δ intended Indicates the grayscale change value of the selected edge of the first predetermined pixel; δ max This represents the maximum grayscale change value.
[0113] The calculation of the initial grayscale change value satisfies the following relationship:
[0114]
[0115] Where, δ i This represents the initial grayscale change value on the side of the first predetermined pixel i. In this embodiment, i can be t, r, b, or l, representing the upper side, lower side, left side, and right side, respectively; L i c represents the grayscale of the pixels adjacent to the first predetermined pixel i; i This represents the grayscale value of the first predetermined pixel i-side edge;
[0116] The calculation of edge grayscale change values satisfies the following relationship:
[0117]
[0118] Where c represents the gray level of the first predetermined pixel at the first edge in the first direction; c1 represents the gray level of the edge of an adjacent unit pixel in the first direction of the first predetermined pixel; δ intended This represents the grayscale change value of the selected edge of the first predetermined pixel.
[0119] S410 generates a first threshold based on the maximum grayscale change value.
[0120] Specifically, the first threshold is obtained by multiplying the maximum grayscale change value by a first threshold coefficient. Optionally, the first threshold coefficient is 0.5.
[0121] The method for generating the first threshold is as follows:
[0122] τ=m×δ max
[0123] Where τ represents the first threshold; m represents the first threshold coefficient; δ max This represents the maximum grayscale change value.
[0124] In another embodiment, such as Figure 5 As shown, a 3D printing image processing method is provided, which includes the following steps:
[0125] S502, acquires the image to be processed of the model of the 3D printed component.
[0126] S504, obtain the first predetermined pixel and the first predetermined value.
[0127] S506, acquire the grayscale values of the adjacent pixels of the first predetermined pixel, the grayscale values of the edges of the multiple first predetermined pixels, the grayscale values of the multiple adjacent pixels, and the grayscale values of the edges of the adjacent pixels.
[0128] S508, a plurality of preliminary grayscale change values are determined by the grayscale of the edges of the plurality of first predetermined pixels and the grayscale of the plurality of adjacent pixels.
[0129] S510, acquire edge grayscale change value along the first direction; the first direction is the direction in which the edge of the first predetermined pixel needs to be determined.
[0130] S512, compare the multiple initial grayscale change values with the edge grayscale change values to obtain the maximum grayscale change value.
[0131] S514 generates the first threshold based on the maximum grayscale change value.
[0132] S516, obtain the gray level of the first predetermined pixel, and determine the absolute value of the difference between the gray level of the adjacent pixel in the first direction and the gray level of the first predetermined pixel.
[0133] S518, compare the absolute value with the first predetermined value to obtain the relationship between the absolute value and the first predetermined value.
[0134] S520, the candidate pixel for the dominant edge pixel is determined by the relationship between the absolute value and the first predetermined value.
[0135] S522, select the minimum grayscale change value of the candidate pixel of the dominant edge pixel and the edge to be judged and the adjacent pixel in the same direction.
[0136] S524, compare the minimum value with the first threshold; if it is greater than the first threshold, determine that the candidate pixel is the dominant edge pixel.
[0137] S526, perform grayscale degradation on the first intermediate image to obtain the second intermediate image.
[0138] S528, blur the second intermediate image to obtain the final image.
[0139] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0140] Based on the same inventive concept, embodiments of this application also provide a 3D printing process method for employing the 3D printing image processing method described above, comprising:
[0141] The process involves acquiring a model image of the 3D printed component; performing anti-aliasing processing on the image to obtain a first intermediate image; degrading the first intermediate image to obtain a second intermediate image; blurring the second intermediate image to obtain a final image; and then performing exposure printing on the final image to obtain the 3D printed component.
[0142] Specifically, the process involves acquiring a model image of a 3D printed component and irradiating it with the material to be cured to obtain a layered image of the 3D component model; performing anti-aliasing processing on the image to be processed to obtain a first intermediate image; performing grayscale degradation on the first intermediate image to obtain a second intermediate image; performing blurring processing on the second intermediate image to obtain a final image; and then performing exposure printing on the final image to obtain a 3D component.
[0143] Based on the same inventive concept, this application also provides a 3D printing image processing apparatus for implementing the 3D printing image processing method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the photopolymer 3D printing image processing apparatus provided below can be found in the limitations of the photopolymer 3D printing image processing method described above, and will not be repeated here.
[0144] In one embodiment, such as Figure 6As shown, a 3D printing image processing device is provided, including: an image acquisition module 602, an anti-aliasing processing module 604, an image grayscale degradation module 606, and an image blurring processing module 608, wherein:
[0145] Image acquisition module 602 is used to acquire images of the 3D printed component model to be processed.
[0146] The anti-aliasing processing module 604 is used to perform anti-aliasing processing on the image to be processed to obtain a first intermediate image.
[0147] The image grayscale degradation module 606 is used to perform grayscale degradation on the first intermediate image to obtain the second intermediate image.
[0148] The image blurring module 608 blurs the second intermediate image to obtain the final image.
[0149] Specifically, the anti-aliasing processing module 604 also includes, for example, Figure 7 The parameter acquisition module 702, the first threshold acquisition module 704, the candidate pixel acquisition module 706, and the dominant edge pixel acquisition module 708 are shown.
[0150] The parameter acquisition module 702 is used to acquire the first predetermined pixel and the first predetermined value.
[0151] The first threshold acquisition module 704 is used to determine the first threshold based on the first predetermined pixel.
[0152] The candidate pixel acquisition module 706 is used to determine a first predetermined pixel as a candidate pixel by using a first predetermined value.
[0153] The dominant edge pixel acquisition module 708 is used to determine candidate pixels as dominant edge pixels by using a first threshold.
[0154] In one embodiment, the first threshold acquisition module 704 is further configured to acquire the grayscale values of the adjacent pixels of the first predetermined pixel, the grayscale values of the edges of the multiple first predetermined pixels, the grayscale values of the multiple adjacent pixels, and the grayscale values of the edges of the adjacent pixels; determine multiple preliminary grayscale change values using the grayscale values of the edges of the multiple first predetermined pixels and the grayscale values of the multiple adjacent pixels; acquire edge grayscale change values along a first direction; the first direction is the direction in which the edges of the first predetermined pixel need to be determined; compare the multiple preliminary grayscale change values with the edge grayscale change values to obtain the maximum grayscale change value; and generate a first threshold using the maximum grayscale change value.
[0155] In one embodiment, the candidate pixel acquisition module 706 is further configured to acquire the grayscale of the first predetermined pixel, determine the absolute value of the difference between the grayscale of the upper adjacent pixel in the first direction and the grayscale of the first predetermined pixel; compare the absolute value with the first predetermined value to obtain the relationship between the absolute value and the first predetermined value; and determine the candidate pixel of the first predetermined pixel as the dominant edge pixel through the relationship between the absolute value and the first predetermined value.
[0156] In one embodiment, the dominant edge pixel acquisition module 708 is further configured to select the minimum value of the grayscale change value of the candidate pixel of the dominant edge pixel and the edge to be judged and its adjacent pixel in the same direction; compare the minimum value with a first threshold; if it is greater than the first threshold, then determine that the candidate pixel is the dominant edge pixel.
[0157] This invention uses a filtering algorithm to blur the image edges, causing the pixel grayscale values to decrease until the area surrounding a predetermined pixel is entirely black, thereby reducing step patterns and improving wood grain texture.
[0158] The filtering algorithms used include linear filtering algorithms and nonlinear filtering processing. Linear filtering algorithms include mean filtering, median filtering, and Gaussian filtering, etc.; nonlinear filtering algorithms include Kalman filtering algorithm and particle filtering algorithm.
[0159] Each module in the aforementioned photopolymerization 3D printing image processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the processing device in hardware form or independent of it, or stored in the memory of the processing device in software form, so that the processor can call and execute the operations corresponding to each module.
[0160] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a photopolymerization 3D printing image processing method. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the device's casing, or an external keyboard, touchpad, or mouse.
[0161] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the processing device to which the present application is applied. The specific processing device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0162] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0163] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0164] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0165] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0166] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0167] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A 3D printing image processing method, characterized in that, The method includes: Acquire images of the 3D printed component model to be processed; The image to be processed is subjected to anti-aliasing to obtain a first intermediate image; The first intermediate image is degraded to grayscale to obtain the second intermediate image; The second intermediate image is blurred to obtain the final image; The step of performing anti-aliasing processing on the image to be processed to obtain the first intermediate image includes: Obtain a first predetermined pixel and a first predetermined value, and obtain the grayscale values of the adjacent pixels of the first predetermined pixel, the grayscale values of the edges of the multiple first predetermined pixels, the grayscale values of the multiple adjacent pixels, and the grayscale values of the edges of the adjacent pixels; Multiple preliminary grayscale change values are determined by the grayscale of the edges of the multiple first predetermined pixels and the grayscale of the multiple adjacent pixels, and edge grayscale change values are obtained along a first direction; the first direction is the direction in which the edges of the first predetermined pixels need to be determined. By comparing the multiple initial grayscale change values with the edge grayscale change values, the maximum grayscale change value is obtained; A first threshold is generated based on the maximum grayscale change value; The first predetermined pixel is determined as a candidate pixel by the first predetermined value, and the candidate pixel is determined as a dominant edge pixel by the first threshold.
2. The method according to claim 1, characterized in that, The step of determining the first predetermined pixel as a candidate pixel based on the first predetermined value includes: Obtain the gray level of the first predetermined pixel, and determine the absolute value of the difference between the gray level of the adjacent pixel in the first direction and the gray level of the first predetermined pixel; By comparing the absolute value with the first predetermined value, the relationship between the absolute value and the first predetermined value is obtained; The candidate pixel for the first predetermined pixel as the dominant edge pixel is determined by the relationship between the absolute value and the first predetermined value.
3. The method according to claim 1 or 2, characterized in that, The step of determining the candidate pixel as the dominant edge pixel by using a first threshold includes: Select the minimum grayscale change value among the candidate pixels of the dominant edge pixels and the edge and adjacent pixels in the same direction of the edge that needs to be judged; Compare the minimum value with a first threshold; if it is greater than the first threshold, determine that the candidate pixel is a dominant edge pixel.
4. A 3D printing process method, characterized in that, The process includes: Obtain the final image; the final image is obtained by the method according to any one of claims 1 to 3; The final image is then subjected to exposure printing to produce a 3D printed component.
5. A 3D printing image processing device, characterized in that, The device includes: The image acquisition module is used to acquire images of the 3D printed component model to be processed. An anti-aliasing processing module is used to perform anti-aliasing processing on the image to be processed to obtain a first intermediate image; An image grayscale degradation module is used to perform grayscale degradation on the first intermediate image to obtain a second intermediate image; An image blurring module is used to blur the second intermediate image to obtain the final image; The anti-aliasing processing module includes: The parameter acquisition module is used to acquire the first predetermined pixel and the first predetermined value; The first threshold acquisition module is used to acquire the grayscale values of the adjacent pixels of the first predetermined pixel, the grayscale values of the edges of the first predetermined pixel, the grayscale values of the adjacent pixels, and the grayscale values of the edges of the adjacent pixels; determine multiple preliminary grayscale change values using the grayscale values of the edges of the first predetermined pixel and the grayscale values of the adjacent pixels; and acquire edge grayscale change values along a first direction; the first direction is the direction in which the edge of the first predetermined pixel needs to be determined; and compare the multiple preliminary grayscale change values with the edge grayscale change values to obtain the maximum grayscale change value, and generate a first threshold value using the maximum grayscale change value. A candidate pixel acquisition module is used to determine the first predetermined pixel as a candidate pixel based on the first predetermined value; A dominant edge pixel acquisition module is used to determine the candidate pixel as a dominant edge pixel by using the first threshold.
6. The apparatus according to claim 5, characterized in that, The candidate pixel acquisition module is also used for: Obtain the gray level of the first predetermined pixel, and determine the absolute value of the difference between the gray level of the adjacent pixel in the first direction and the gray level of the first predetermined pixel; By comparing the absolute value with the first predetermined value, the relationship between the absolute value and the first predetermined value is obtained; The candidate pixel for the first predetermined pixel as the dominant edge pixel is determined by the relationship between the absolute value and the first predetermined value.
7. The apparatus according to claim 5 or 6, characterized in that, The dominant edge pixel acquisition module is also used for: Select the minimum grayscale change value among the candidate pixels of the dominant edge pixels and the edge and adjacent pixels in the same direction of the edge that needs to be judged; Compare the minimum value with a first threshold; if it is greater than the first threshold, determine that the candidate pixel is a dominant edge pixel.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.