Inkjet printing method, inkjet printing apparatus, and printer
Patent Information
- Application Number
- CN202510329114.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]然而,这种通过光影和色差实现3D效果的打印方式,对于立体视觉效果的还原度较差,打印图像的立体视觉效果较差
[0039]上述喷墨打印方法、喷墨打印设备和打印机,首先获取待打印图像,以及待打印图像对应的目标掩模图像,然后生成待打印图像对应的灰度图,并将目标掩模图像和灰度图进行融合,即可得到打印主体图像,进而通过对打印主体图像进行灰度分片,可以生成切片图像,基于此,在打印过程中本申请先控制喷墨打印设备在介质上打印待打印图像对应的原始平面图像,然后根据切片图像,可以控制喷墨打印设备在原始平面图像上逐层打印出打印主体图像,基于此可以实现在原始平面图像上逐层堆叠出打印主体图像,且由于切片图像是与打印主体图像的灰度信息相匹配的,因此本申请实现了根据打印主体图像的灰度大小,在原始平面图像上逐层堆叠出打印主体图像,这样打印出的打印主体图像与原始平面图像存在高度差,且目标掩模图像本身的不同灰度大小区域将具备不同高度层次,从而最终得到的打印图像也将呈现出立体还原度较高的立体视觉效果,所以本申请可以提升打印图像的立体视觉效果。
Smart Images

Figure CN122808370A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of inkjet printing technology, and in particular to an inkjet printing method, inkjet printing equipment and printer. Background Technology
[0002] With the development of printing technology, original images can be printed into high-definition color images.
[0003] In traditional technology, the image is first 2D printed, and then the 3D effect is achieved through light and shadow and color difference.
[0004] However, this printing method, which achieves 3D effects through light and shadow and color difference, has poor reproduction of stereoscopic visual effects, resulting in poor stereoscopic visual effects in printed images. Summary of the Invention
[0005] Therefore, it is necessary to provide an inkjet printing method, inkjet printing equipment, and printer that can improve the stereoscopic visual effect of printed images, addressing the aforementioned technical problems.
[0006] In a first aspect, this application provides an inkjet printing method applied to an inkjet printing device, the method comprising:
[0007] Obtain the image to be printed, and the target mask image corresponding to the image to be printed;
[0008] Generate a grayscale image corresponding to the image to be printed, and fuse the target mask image and the grayscale image to obtain the main image to be printed;
[0009] By performing grayscale segmentation on the printed main image, slice images are generated;
[0010] The inkjet printing device is controlled to print the image to be printed on the medium to obtain the corresponding original planar image;
[0011] Based on the sliced image, the inkjet printing device is controlled to print the main body image layer by layer on the original planar image to obtain a stereoscopic image corresponding to the main body image.
[0012] In one embodiment, controlling the inkjet printing device to print the main image layer by layer on the original planar image based on the sliced image includes:
[0013] Based on the sliced image, the inkjet printing device is controlled to spray varnish onto the original planar image to print the main body image layer by layer.
[0014] In one embodiment, the original planar image is a color image, and the printed subject image printed on the original planar image is formed by stacking multiple layers of transparent material.
[0015] In one embodiment, fusing the target mask image and the grayscale image to obtain the printed subject image includes:
[0016] Based on the target mask image, the printing subject in the grayscale image is located to obtain the positioning information of the printing subject;
[0017] Based on the positioning information, the background area outside the main body of the printable image is removed from the grayscale image to obtain the main body image.
[0018] In one embodiment, obtaining the target mask image corresponding to the image to be printed includes:
[0019] By performing image segmentation on the image to be printed and removing the background from the image to be printed, an image of the main printing area is obtained;
[0020] The image of the main printing area is converted into an initial mask image, and the initial mask image is adjusted to a preset printing image size to obtain the target mask image corresponding to the image to be printed.
[0021] In one embodiment, converting the printed subject area image into an initial mask image includes:
[0022] The image of the printed main body area is sampled to obtain multiple sampled pixels;
[0023] The multiple sampled pixels are classified to obtain multiple classification labels, wherein the classification labels are used to indicate the probability that the sampled pixel is a dirty pixel;
[0024] Based on the multiple classification identifiers, the printed subject area image is converted into an initial mask image.
[0025] In one embodiment, converting the printed subject area image into an initial mask image based on the plurality of classification identifiers includes:
[0026] The pixel values of each pixel in the printed main area image are normalized to obtain the first normalized weight map.
[0027] Based on the multiple classification identifiers, the normalized weights of each pixel in the first normalized weight map are adjusted to obtain the second normalized weight map.
[0028] The second normalized weight map is binarized to obtain the initial mask image.
[0029] In one embodiment, generating sliced images by performing grayscale segmentation on the printed subject image includes:
[0030] Based on the grayscale value of each target pixel in the grayscale mask, each target pixel is divided into grayscale regions to obtain multiple grayscale regions.
[0031] For each of the grayscale regions, a corresponding printing height is matched to obtain the printing height information;
[0032] Based on the printed height information and each of the grayscale regions, a slice image is generated.
[0033] Secondly, this application also provides an inkjet printing device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0034] The process involves: acquiring an image to be printed and a target mask image corresponding to the image to be printed; generating a grayscale image corresponding to the image to be printed, and fusing the target mask image and the grayscale image to obtain a main image to be printed; generating sliced images by performing grayscale segmentation on the main image to be printed; controlling the inkjet printer to print the image to be printed on a medium to obtain a corresponding original planar image; and controlling the inkjet printer to print the main image layer by layer on the original planar image according to the sliced images to obtain a stereoscopic image corresponding to the main image to be printed.
[0035] Thirdly, this application also provides a printer, the printer comprising:
[0036] The printhead is used to perform the printing operation;
[0037] The processor is configured to acquire an image to be printed and a target mask image corresponding to the image to be printed; generate a grayscale image corresponding to the image to be printed, and fuse the target mask image and the grayscale image to obtain a main image to be printed; and generate a slice image by performing grayscale segmentation on the main image to be printed.
[0038] The controller is used to control the printhead to print the image to be printed on the medium to obtain the corresponding original planar image; according to the sliced image, the controller controls the printhead to print the main body image layer by layer on the original planar image to obtain the stereoscopic image corresponding to the main body image.
[0039] The aforementioned inkjet printing method, inkjet printing equipment, and printer first acquire the image to be printed and the target mask image corresponding to the image to be printed. Then, a grayscale image corresponding to the image to be printed is generated, and the target mask image and the grayscale image are fused to obtain the main image to be printed. Furthermore, by performing grayscale segmentation on the main image to be printed, sliced images can be generated. Based on this, during the printing process, this application first controls the inkjet printing equipment to print the original planar image corresponding to the image to be printed on the medium. Then, according to the sliced images, the inkjet printing equipment can be controlled to print the main image layer by layer on the original planar image. Based on this, it is possible to stack the main image layer by layer on the original planar image. Since the sliced images are matched with the grayscale information of the main image to be printed, this application realizes the stacking of the main image layer by layer on the original planar image according to the grayscale size of the main image to be printed. In this way, the printed main image and the original planar image have a height difference, and the different grayscale areas of the target mask image itself will have different height levels. As a result, the final printed image will also present a stereoscopic visual effect with high stereoscopic fidelity. Therefore, this application can improve the stereoscopic visual effect of the printed image. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating an inkjet printing method in one embodiment of this application;
[0042] Figure 2 This is a schematic diagram of the process for generating a sliced image in one embodiment of this application;
[0043] Figure 3 This is a schematic diagram illustrating the process of converting a printed main area image into an initial mask image in one embodiment of this application;
[0044] Figure 4 This is a structural block diagram of an inkjet printing apparatus in one embodiment of this application;
[0045] Figure 5 This is an internal structural diagram of an inkjet printing device in one embodiment of this application. Detailed Implementation
[0046] 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.
[0047] In one exemplary embodiment, such as Figure 1 As shown, an inkjet printing method is provided, which is applied to an inkjet printing device and includes the following steps 202 to 210. Wherein:
[0048] Step 202: Obtain the image to be printed and the target mask image corresponding to the image to be printed.
[0049] The image to be printed can be a color image, and the target mask image can be a mask image.
[0050] As an example, step 202 includes: acquiring an image to be printed; segmenting the image to be printed by performing image segmentation on the image to be printed, wherein the image to be printed can be a foreground area image of the image to be printed; performing binarization processing on the image to be printed to obtain a mask image, and adjusting the image size of the mask image to a preset printing image size to obtain a target mask image.
[0051] As an example, obtaining the target mask image corresponding to the image to be printed includes:
[0052] By performing image segmentation on the image to be printed and removing the background, the main body area image is obtained; the main body area image is converted into an initial mask image, and the initial mask image is adjusted to a preset print image size to obtain the target mask image corresponding to the image to be printed.
[0053] Specifically, the image to be printed is segmented to obtain a foreground region image and a background region image, and the foreground image is used as the main body region image for printing; the main body region image for printing is normalized to obtain a first normalized weight map, and the first normalized weight map is binarized to obtain an initial mask image; the initial mask image is interpolated to adjust it to a preset printing image size to obtain the target mask image corresponding to the image to be printed.
[0054] Step 204: Generate a grayscale image corresponding to the image to be printed, and fuse the target mask image and the grayscale image to obtain the main image to be printed.
[0055] The target mask image and the grayscale image can both be the preset print image size, meaning the image sizes are consistent.
[0056] As an example, step 204 includes: converting the image to be printed into a high-resolution image by performing super-resolution reconstruction; converting the high-resolution image to grayscale to obtain a grayscale image; and removing the background area in the grayscale image other than the main printing area based on the target mask image to obtain the main printing image.
[0057] The purpose of super-resolution reconstruction is to improve the resolution (printing details) of the image to be printed and to adjust the image size of the image to be printed to the preset printing image size, thereby obtaining a high-resolution image. Super-resolution reconstruction can be implemented based on interpolation and filtering, or based on deep learning methods such as convolutional neural networks. Interpolation methods can include nearest neighbor interpolation, bilinear interpolation, and bicubic interpolation.
[0058] In addition, in this embodiment, the high-resolution image can be further filtered to remove noise information. For example, an augmented-dimensional fast bilateral filter can be used for filtering.
[0059] It should be noted that in this embodiment, the image to be printed can also be directly converted to grayscale to obtain a grayscale image.
[0060] As an example, the target mask image and grayscale image are fused to obtain the printed subject image, including:
[0061] Based on the target mask image, locate the printing subject in the grayscale image to obtain the positioning information of the printing subject; based on the positioning information, remove the background area outside the printing subject in the grayscale image to obtain the printing subject image.
[0062] Specifically, the outline position of the printing subject in the target mask image is located to obtain the positioning position information of the printing subject. The target mask image and the grayscale image have the same size, so the positioning position of the printing subject in the target mask image and the grayscale image is consistent. Based on the positioning position information, the background area outside the printing subject in the grayscale image is removed. The grayscale image after removing the background area is used as the printing subject image.
[0063] Step 206: Generate sliced images by performing grayscale segmentation on the main printed image.
[0064] The sliced images are used to print the main body image layer by layer. For example, assuming the main body image is divided into a preset number of layers for printing, a number of sliced images corresponding to the preset number of layers can be generated. Specifically, it can be set to print one layer of material according to one sliced image. After printing multiple layers of material according to all the sliced images, the multiple layers of material will be stacked to form the main body image.
[0065] As an example, step 206 includes: dividing each pixel in the printed subject image into multiple grayscale regions based on the grayscale value of each pixel in the printed subject image, wherein each grayscale region includes multiple pixels; and generating multiple slice images based on the grayscale value range corresponding to the pixels in each grayscale region and the region location of each region.
[0066] Step 208: Control the inkjet printer to print the original planar image corresponding to the image to be printed on the medium;
[0067] Step 210: Based on the slice, control the inkjet printing device to print the target mask image on the original planar image to obtain the stereoscopic vision image corresponding to the image to be printed.
[0068] Among them, the image content in the original planar image is consistent with the image content in the image to be printed. The original planar image can be a color image, that is, the original color image; the medium can be the medium that carries the image to be printed; the stereoscopic image can be a stereoscopic poster or other stereoscopic color image.
[0069] As an example, steps 208 to 210 include: controlling the inkjet printing device to print the original planar image corresponding to the image to be printed on the medium; and, based on multiple slice images, controlling the inkjet printing device to spray a preset printing material layer by layer onto the original planar image to obtain a stereoscopic image corresponding to the image to be printed.
[0070] As an example, multiple layers of pre-designed printing material can be stacked on the original planar image to form the main printed image, and one slice of image can correspond to one layer of pre-designed printing material.
[0071] As an example, the original planar image printed can be a planar image, while the printed main image is formed by stacking multiple layers of preset printing material, thus the printed main image is a three-dimensional image.
[0072] As an example, the original flat image printed can be a flat color image, and the printed main image is formed by stacking multiple layers of preset printing materials. Therefore, the printed main image is a three-dimensional image and can also be in color.
[0073] As an example, the original flat image to be printed can be a flat color image. The printed main image is formed by stacking multiple layers of preset printing materials, so the printed main image is a three-dimensional image. The preset printing material can be a transparent material, so the printed main image will have a transparent effect.
[0074] As an example, the original planar image printed can be a planar grayscale image, and the printed main image is formed by stacking multiple layers of preset printing materials. Therefore, the printed main image is a three-dimensional image and can also be in color.
[0075] As an example, the original planar image to be printed can be a planar grayscale image. The printed main image is formed by stacking multiple layers of preset printing materials, so the printed main image is a three-dimensional image. Furthermore, the preset printing material can be a transparent material, so the printed main image will have a transparent effect.
[0076] As an example, the preset printing material can be varnish, so that the inkjet printer can be controlled to spray varnish layer by layer on the original planar image based on multiple slice images, so as to print the main image layer by layer.
[0077] As an example, one could set a slice image to correspond to a layer of varnish.
[0078] In this embodiment, the image to be printed and the target mask image corresponding to the image to be printed are first obtained. Then, a grayscale image corresponding to the image to be printed is generated, and the target mask image and the grayscale image are fused to obtain the main image to be printed. Then, by performing grayscale segmentation on the main image to be printed, slice images can be generated. Based on this, in the printing process, this embodiment first controls the inkjet printer to print the original planar image corresponding to the image to be printed on the medium. Then, according to the slice images, the inkjet printer can be controlled to print the main image layer by layer on the original planar image. Based on this, the main image to be printed can be stacked layer by layer on the original planar image. Since the slice images are matched with the grayscale information of the main image to be printed, this application realizes that the main image to be printed is stacked layer by layer on the original planar image according to the grayscale size of the main image to be printed. In this way, the printed main image to be printed has a height difference with the original planar image, and the different grayscale areas of the target mask image itself will have different height levels. Thus, the final printed image will also present a stereoscopic visual effect with high stereoscopic reproduction. Therefore, this embodiment can improve the stereoscopic visual effect of the printed image.
[0079] Reference Figure 2 In one embodiment, a sliced image is generated by performing grayscale segmentation on the printed subject image, including:
[0080] Step 302: Based on the grayscale values of each target pixel in the grayscale mask, perform grayscale partitioning on each target pixel to obtain multiple grayscale regions.
[0081] Since the background has been removed from the printed main image, the grayscale value of the background area in the grayscale mask is 0.
[0082] As an example, step 302 includes: dividing each target pixel into multiple grayscale regions according to the grayscale value of each target pixel in the grayscale mask, wherein each grayscale region corresponds to a preset grayscale value range, and the grayscale value of each pixel in the grayscale region is within the corresponding preset grayscale value range. For example, target pixels with grayscale values between 0 and 5 can be divided into one grayscale region, and target pixels with grayscale values between 5 and 10 can be divided into another grayscale region, etc.
[0083] Step 304: Match the corresponding printing height for each grayscale region to obtain the printing height information.
[0084] As an example, step 304 includes: matching the corresponding printing height for each grayscale region based on the preset grayscale value range of each pixel in each grayscale region, thereby obtaining printing height information.
[0085] The larger the median value of the preset grayscale value range of the grayscale region, the higher the corresponding printing height of the grayscale region; the smaller the median value of the preset grayscale value range of the grayscale region, the lower the corresponding printing height of the grayscale region.
[0086] Step 306: Generate a slice image based on the printing height information and each grayscale region.
[0087] The number of slice images can be multiple. The slice images are used to print the main image layer by layer. Each slice image can be set to control the inkjet printer to print a layer of preset printing material. The multiple preset printing materials printed layer by layer are stacked to form the main image.
[0088] As an example, step 306 includes: for the i-th layer of preset printing material to be printed, determining the target printing height of the i-th layer of preset printing material based on the printing thickness of the preset printing material; for any grayscale region, if the printing height of the grayscale region is greater than or equal to the target printing height, it indicates that the printing range of the i-th layer of preset printing material covers the grayscale region; if the printing height of the grayscale region is less than the target printing height, it indicates that the printing range of the i-th layer of preset printing material does not cover the grayscale region; merging all the grayscale regions covered by the printing range of the i-th layer of preset printing material to be printed to obtain a slice image, where i is an integer greater than or equal to 1. Thus, the slice image can indicate the printing range of the i-th layer of preset printing material.
[0089] In this embodiment, by partitioning the grayscale mask image into grayscale regions, the grayscale mask image can be divided into multiple grayscale regions. Then, based on the grayscale value range corresponding to the multiple grayscale regions, a corresponding printing height can be matched for each grayscale region, thereby generating printing height information. Using the printing height information and each grayscale region, a slice image can be generated. In this way, the slice image can reflect the multi-layer printing height of each grayscale region. Therefore, printing the main image layer by layer using the slice image helps to improve the stereoscopic visual effect.
[0090] It should be noted that for each grayscale region, the higher the printing height of the grayscale region, the more layers of preset printing material are stacked on that grayscale region. For example, assuming that the printing height of grayscale region A is 10 and the printing height of grayscale region B is 4, and the thickness of each layer of preset printing material is 2, then 5 layers of preset printing material will be sprayed layer by layer on grayscale region A in a stacked manner, and 2 layers of preset printing material will be sprayed layer by layer on grayscale region B in a stacked manner. However, in order to improve printing efficiency, the first and second layers of preset printing material can cover grayscale regions A and B, while the third to fifth layers of preset printing material can cover grayscale region A, thus completing the process of printing the above-mentioned main image. In this embodiment, the multi-layer preset printing material stacked and sprayed in this way will have different thicknesses in different grayscale regions, resulting in a thickness difference in the multi-layer preset printing material in different grayscale regions, thereby producing a better stereoscopic visual effect.
[0091] Reference Figure 3 In one embodiment, converting the printed subject area image into an initial mask image includes:
[0092] Step 402: Sample the image of the main printing area to obtain multiple sampled pixels.
[0093] As an example, step 402 includes: uniformly sampling the printed subject area image to obtain multiple sampled pixels, wherein each sampled pixel corresponds to the image area where one or more pixels in the printed subject area image are located.
[0094] Step 404: Classify the multiple sampled pixels to obtain multiple classification labels, whereby the classification labels are used to indicate the probability that a sampled pixel is a dirty pixel.
[0095] In this embodiment, the purpose of classification is to distinguish whether the sampled pixel is a pixel corresponding to dirt on the object to be printed or a dirt pixel on the substrate; the classification identifier can be a classification probability value, which is used to indicate the probability that the sampled pixel is a dirt pixel in the image of the main printing area.
[0096] Step 406: Based on multiple classification identifiers, convert the printed main area image into an initial mask image.
[0097] As an example, step 406 includes: for each classification identifier, if the classification identifier represents a dirty pixel, then the image region corresponding to the sampled pixel in the printed main body region image is removed, and finally the dirty-removed printed main body region image is obtained; the dirty-removed printed main body region image is binarized to obtain an initial mask image.
[0098] As an example, the printed subject area image is converted into an initial mask image based on multiple classification identifiers, including:
[0099] The pixel values of each pixel in the main area image of the printing are normalized to obtain the first normalized weight map; the normalized weights of each pixel in the first normalized weight map are adjusted according to multiple classification labels to obtain the second normalized weight map; the second normalized weight map is binarized to obtain the initial mask image.
[0100] The classification identifier is used to indicate the adjustment of the first normalized weight of the corresponding pixel in the first normalized weight map. For example, the classification identifier can be the classification probability. If the classification probability is greater than a preset probability threshold, the first normalized weight of the corresponding pixel in the first normalized weight map of the sampled pixel will be increased, and if the classification probability is not greater than the preset probability threshold, the first normalized weight of the corresponding pixel in the first normalized weight map of the sampled pixel will be decreased.
[0101] Specifically, the pixel values of each pixel in the main printing area image are normalized to a preset value range to obtain a first normalized weight map, which can be from 0 to 1. For the normalized weight of each pixel in the first normalized weight map, the normalized weight is adjusted according to the classification probability value of the sampled pixel corresponding to that pixel. After adjusting the normalized weight of all pixels in the first normalized weight map, a second normalized weight map is obtained. The normalized weight of each pixel in the second normalized weight map is binarized to obtain an initial mask image.
[0102] In this embodiment, during the process of generating the initial mask image corresponding to the main printing area image, the classification probability value of each pixel in the main printing area image as a dirty pixel is combined to adjust the normalization weight of each pixel in the first normalized weight map corresponding to the main printing area image, thereby obtaining the second normalized weight map. The initial mask image is then generated based on the second normalized weight map, which can reduce the influence of dirt on the generation of the initial mask image and improve the accuracy of the initial mask image.
[0103] 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.
[0104] Based on the same inventive concept, this application also provides an inkjet printing apparatus for implementing the inkjet printing 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 inkjet printing apparatus embodiments provided below can be found in the limitations of the inkjet printing method described above, and will not be repeated here.
[0105] In one exemplary embodiment, such as Figure 4 As shown, an inkjet printing apparatus is provided, applied to an inkjet printing device, including: an acquisition module 502, a first image generation module 504, a second image generation module 506, a first print control module 508, and a second print control module 510, wherein:
[0106] The acquisition module 502 is used to acquire the image to be printed and the target mask image corresponding to the image to be printed;
[0107] The first image generation module 504 is used to generate a grayscale image corresponding to the image to be printed, and to fuse the target mask image and the grayscale image to obtain the main image to be printed;
[0108] The second image generation module 506 is used to generate printing height information by performing grayscale segmentation on the printing subject image, wherein the printing height information represents the printing height corresponding to different grayscale regions in the printing subject image;
[0109] The first printing control module 508 is used to control the inkjet printing device to print the image to be printed on the medium to obtain the corresponding original planar image.
[0110] The second printing control module 510 is used to control the inkjet printing device to print the main body image layer by layer on the original planar image according to the sliced image, so as to obtain a stereoscopic image corresponding to the main body image.
[0111] In one embodiment, the second printing control module is further configured to:
[0112] Based on the sliced image, the inkjet printing device is controlled to spray varnish onto the original planar image to print the main body image layer by layer.
[0113] In one embodiment, the original planar image is a color image, and the printed subject image printed on the original planar image is formed by stacking multiple layers of transparent material.
[0114] In one embodiment, the first image generation module is further configured to:
[0115] Based on the target mask image, the printing subject in the grayscale image is located to obtain the positioning information of the printing subject; based on the positioning information, the background area outside the printing subject in the grayscale image is removed to obtain the printing subject image.
[0116] In one embodiment, the acquisition module is further configured to:
[0117] By performing image segmentation on the image to be printed and removing the background, a printing main area image is obtained; the printing main area image is converted into an initial mask image, and the initial mask image is adjusted to a preset printing image size to obtain the target mask image corresponding to the image to be printed.
[0118] In one embodiment, the acquisition module is further configured to:
[0119] The printed subject area image is sampled to obtain multiple sampled pixels; the multiple sampled pixels are classified to obtain multiple classification labels, wherein the classification labels are used to indicate the probability that the sampled pixel is a dirty pixel; based on the multiple classification labels, the printed subject area image is converted into an initial mask image.
[0120] In one embodiment, the acquisition module is further configured to:
[0121] The pixel values of each pixel in the printed main area image are normalized to obtain a first normalized weight map; the normalized weights of each pixel in the first normalized weight map are adjusted according to the multiple classification labels to obtain a second normalized weight map; the second normalized weight map is binarized to obtain an initial mask image.
[0122] In one embodiment, the second image generation module is further configured to:
[0123] Based on the grayscale value of each target pixel in the grayscale mask image, each target pixel is divided into grayscale regions to obtain multiple grayscale regions; a corresponding printing height is matched for each grayscale region to obtain printing height information; and a slice image is generated based on the printing height information and each grayscale region.
[0124] Each module in the aforementioned inkjet printing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the inkjet printing device in hardware form or independent of it, or stored in the memory of the inkjet printing device in software form, so that the processor can call and execute the corresponding operations of each module.
[0125] In one exemplary embodiment, an inkjet printing device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The inkjet printing device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the inkjet printing device provides computing and control capabilities. The memory of the inkjet printing device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the inkjet printing device is used for exchanging information between the processor and external devices. The communication interface of the inkjet printing device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an inkjet printing method. Those skilled in the art will understand that... Figure 5 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 inkjet printing device to which the present application is applied. A specific inkjet printing device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0126] In one exemplary embodiment, an inkjet printing apparatus is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0127] The process involves: acquiring an image to be printed and a target mask image corresponding to the image to be printed; generating a grayscale image corresponding to the image to be printed, and fusing the target mask image and the grayscale image to obtain a main image to be printed; generating sliced images by performing grayscale segmentation on the main image to be printed; controlling the inkjet printer to print the image to be printed on a medium to obtain a corresponding original planar image; and controlling the inkjet printer to print the main image layer by layer on the original planar image according to the sliced images to obtain a stereoscopic image corresponding to the main image to be printed.
[0128] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0129] Based on the sliced image, the inkjet printing device is controlled to spray varnish onto the original planar image to print the main body image layer by layer.
[0130] In one embodiment, the original planar image is a color image, and the printed subject image printed on the original planar image is formed by stacking multiple layers of transparent material.
[0131] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0132] Based on the target mask image, the printing subject in the grayscale image is located to obtain the positioning information of the printing subject; based on the positioning information, the background area outside the printing subject in the grayscale image is removed to obtain the printing subject image.
[0133] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0134] By performing image segmentation on the image to be printed and removing the background, a printing main area image is obtained; the printing main area image is converted into an initial mask image, and the initial mask image is adjusted to a preset printing image size to obtain the target mask image corresponding to the image to be printed.
[0135] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0136] The printed subject area image is sampled to obtain multiple sampled pixels; the multiple sampled pixels are classified to obtain multiple classification labels, wherein the classification labels are used to indicate the probability that the sampled pixel is a dirty pixel; based on the multiple classification labels, the printed subject area image is converted into an initial mask image.
[0137] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0138] The pixel values of each pixel in the printed main area image are normalized to obtain a first normalized weight map; the normalized weights of each pixel in the first normalized weight map are adjusted according to the multiple classification labels to obtain a second normalized weight map; the second normalized weight map is binarized to obtain an initial mask image.
[0139] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0140] Based on the grayscale value of each target pixel in the grayscale mask image, each target pixel is divided into grayscale regions to obtain multiple grayscale regions; a corresponding printing height is matched for each grayscale region to obtain printing height information; and a slice image is generated based on the printing height information and each grayscale region.
[0141] In one embodiment, a printer is provided, the printer comprising:
[0142] The printhead is used to perform the printing operation;
[0143] The processor is configured to acquire an image to be printed and a target mask image corresponding to the image to be printed; generate a grayscale image corresponding to the image to be printed, and fuse the target mask image and the grayscale image to obtain a main image to be printed; and generate a slice image by performing grayscale segmentation on the main image to be printed.
[0144] The controller is used to control the printhead to print the image to be printed on the medium to obtain the corresponding original planar image; according to the sliced image, the controller controls the printhead to print the main body image layer by layer on the original planar image to obtain the stereoscopic image corresponding to the main body image.
[0145] The specific implementation details of the printing process using the printer described above can be found in the embodiments described in the above method examples, and will not be repeated here.
[0146] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0147] 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.
[0148] 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 memory 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, artificial intelligence (AI) processors, etc., and are not limited to these.
[0149] 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 application.
[0150] 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. An inkjet printing method, characterized in that, Applied to inkjet printing equipment, the method includes: Obtain the image to be printed, and the target mask image corresponding to the image to be printed; Generate a grayscale image corresponding to the image to be printed, and fuse the target mask image and the grayscale image to obtain the main image to be printed; By performing grayscale segmentation on the printed main image, slice images are generated; The inkjet printing device is controlled to print the image to be printed on the medium to obtain the corresponding original planar image; Based on the sliced image, the inkjet printing device is controlled to print the main body image layer by layer on the original planar image to obtain a stereoscopic image corresponding to the main body image.
2. The method according to claim 1, characterized in that, The step of controlling the inkjet printing device to print the main body image layer by layer on the original planar image based on the sliced image includes: Based on the sliced image, the inkjet printing device is controlled to spray varnish onto the original planar image to print the main body image layer by layer.
3. The method according to claim 1, characterized in that, The original planar image is a color image, and the printed main image printed on the original planar image is formed by stacking multiple layers of transparent material.
4. The method according to claim 1, characterized in that, The step of fusing the target mask image and the grayscale image to obtain the printed subject image includes: Based on the target mask image, the printing subject in the grayscale image is located to obtain the positioning information of the printing subject; Based on the positioning information, the background area outside the main body of the printable image is removed from the grayscale image to obtain the main body image.
5. The method according to claim 1, characterized in that, Obtain the target mask image corresponding to the image to be printed, including: By performing image segmentation on the image to be printed and removing the background from the image to be printed, an image of the main printing area is obtained; The image of the main printing area is converted into an initial mask image, and the initial mask image is adjusted to a preset printing image size to obtain the target mask image corresponding to the image to be printed.
6. The method according to claim 5, characterized in that, The step of converting the printed main area image into an initial mask image includes: The image of the printed main body area is sampled to obtain multiple sampled pixels; The multiple sampled pixels are classified to obtain multiple classification labels, wherein the classification labels are used to indicate the probability that the sampled pixel is a dirty pixel; Based on the multiple classification identifiers, the printed subject area image is converted into an initial mask image.
7. The method according to claim 6, characterized in that, The step of converting the printed subject area image into an initial mask image based on the multiple classification identifiers includes: The pixel values of each pixel in the printed main area image are normalized to obtain the first normalized weight map. Based on the multiple classification identifiers, the normalized weights of each pixel in the first normalized weight map are adjusted to obtain the second normalized weight map. The second normalized weight map is binarized to obtain the initial mask image.
8. The method according to claim 1, characterized in that, The step of generating sliced images by performing grayscale segmentation on the printed main image includes: Based on the grayscale value of each target pixel in the grayscale mask, each target pixel is divided into grayscale regions to obtain multiple grayscale regions. For each of the grayscale regions, a corresponding printing height is matched to obtain the printing height information; Based on the printed height information and each of the grayscale regions, a slice image is generated.
9. An inkjet printing apparatus, 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 8.
10. A printer, characterized in that, The printer includes: The printhead is used to perform the printing operation; The processor is configured to acquire an image to be printed and a target mask image corresponding to the image to be printed; generate a grayscale image corresponding to the image to be printed, and fuse the target mask image and the grayscale image to obtain a main image to be printed; and generate a slice image by performing grayscale segmentation on the main image to be printed. The controller is used to control the printhead to print the image to be printed on the medium to obtain the corresponding original planar image; according to the sliced image, the controller controls the printhead to print the main body image layer by layer on the original planar image to obtain the stereoscopic image corresponding to the main body image.