AI-based image generation uv printing method, system, device and storage medium
Patent Information
- Application Number
- CN202611217659.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本申请的主要目的在于提供一种基于AI生图的UV打印方法、系统、设备及存储介质,旨在解决AI生成图像到UV打印数据的转换问题、UV打印参数嵌入AI生图提示词,以及移动端的H5交互前端到UV打印终端的轻量级控制问题
[0010]本申请的实施例的有益效果为:通过移动端的H5交互界面采集图像获取方式、物料类型以及白墨底层、浮雕、光油和色彩风格等全套UV打印效果参数,依托轻量化网页交互免去APP安装,降低操作门槛;同时基于采集的参数信息自动生成携带 UV工艺约束信息的AI 生图提示词,使 AI 生成图像适配 UV 立体打印工艺需求,避免通用 AI 绘图结果无法直接用于浮雕、局部光油、白墨打底工艺的问题。以标准化 RGB 图像作为统一数据源,在云端并行运算自动生成白墨层灰度数据、浮雕高度映射数据、光油层掩膜数据,同时结合物料类型匹配对应的 ICC 色彩管理文件完成色彩空间转换;无需人工借助图像处理软件逐通道制作工艺图层,摆脱对专业 RIP 操作人员依赖,实现多层工艺数据全自动生成,显著缩短打印前制版周期。根据基材匹配独立 ICC 配置文件实现色彩转换,针对不同打印物料进行色彩校准,缩小移动端预览画面与实物成品的色彩差异,提升UV打印成品色彩还原精度。将CMYK 图像数据、白墨数据、浮雕映射数据、光油掩膜数据及分层打印时序指令封装为统一 UV 打印控制数据包,经由API接口下发至UV打印终端,终端自动解析生成分层打印指令序列,打通移动端交互、云端AI生成、工艺数据转换、终端分层打印的全自动化闭环,减少人工文件中转操作,降低人为失误概率,实现兼具彩色图案、白墨底层、立体浮雕、局部/全域光油效果的一体化UV打印。
Smart Images

Figure CN123011161A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of UV printer technology, and in particular to a UV printing method, system, device and storage medium based on AI-generated images. Background Technology
[0002] UV (Ultraviolet) flatbed printers can achieve multi-channel inkjet printing of white ink, embossing, and varnish, and are compatible with customization of multiple materials. However, the traditional process requires manual creation of white ink / varnish channels and adjustment of color parameters using PS and RIP software on a personal computer. This process is difficult, computer-dependent, and cannot be quickly customized on-site.
[0003] Existing AIGC (Artificial Intelligence Generated Content) printing technologies are mostly adapted to ordinary photo inkjet devices, only performing image fusion and general color adjustment, without dedicated UV processing capabilities; some UV remote control systems only realize cluster task scheduling and do not have AI-generated images; a few AIGC printing solutions use an APP front-end, without the lightweight interaction of an H5 (HTML5, fifth-generation hypertext markup language) front-end, and cannot automatically generate white ink, embossing, and varnish data.
[0004] The current technology has three major shortcomings: First, it lacks a dedicated conversion engine for converting AI images to UV multi-channel data, and RGB images need to be manually layered; second, it lacks a dedicated prompting system for embedding UV process parameters, and AI-generated images do not include printing control information; third, it lacks a lightweight end-to-end solution that allows direct access from a mobile H5 interactive front-end to the UV printer, and still relies on PCs and professional software, making it difficult to adapt to real-time customization scenarios such as exhibitions and stores. Summary of the Invention
[0005] The main purpose of this application is to provide a UV printing method, system, device and storage medium based on AI-generated images, aiming to solve the problems of converting AI-generated images into UV printing data, embedding AI-generated image prompts into UV printing parameters, and lightweight control from the mobile H5 interactive front end to the UV printing terminal.
[0006] To achieve the above objectives, in a first aspect, this application provides a UV printing method based on AI-generated images, comprising: The H5 interactive interface on the mobile terminal receives parameter information input by the user. The parameter information includes image acquisition method, material type and UV printing effect parameters. The UV printing effect parameters include white ink bottom layer mode, embossing effect mode, varnish effect mode and color style mode. Based on the collected parameter information, an AI-generated image prompt text carrying multi-dimensional UV process control information is automatically generated by splicing together the prompt text template system for UV printing. The AI-generated image prompts are input into the cloud-based AI-generated image engine, which then generates and standardizes the image, outputting a standardized RGB image adapted to UV printing scenarios. The standardized RGB image is processed in parallel by the UV printing data conversion engine in the cloud, automatically generating grayscale data of white ink layer, relief height mapping data and varnish layer mask data that match the parameter information. At the same time, the corresponding ICC color management configuration file is matched according to the material type selected by the user, and color space conversion is performed to obtain CMYK image data. The grayscale data of the white ink layer, the relief height mapping data, the varnish layer mask data, the CMYK image data, and the preset layer printing sequence instructions are used to generate a UV printing control data package; The UV printing control data packet is sent to the UV printing terminal through the local API interface. The UV printing terminal verifies and parses the data to obtain a structured layered printing instruction sequence, and drives the UV printing terminal to execute the layered printing job.
[0007] Secondly, this application provides a UV printing system based on AI-generated images for converting UV printing data, used to execute the AI-generated image-based UV printing method described in the foregoing embodiments. The UV printing system includes: The H5 interactive front-end module is deployed on a mobile browser and includes an image input unit, a material selection unit, a print effect configuration unit, a simulation preview unit, and a print distribution unit, which are used to complete user parameter input and effect preview interaction. The AI image generation engine module is deployed on a cloud server and includes a text-to-image generation unit, an image optimization unit, an image quality detection unit, and an image standardization unit. It is used to call third-party AI image interfaces and generate standardized RGB images based on AI image generation prompts. The UV printing data conversion engine module, deployed on a cloud server, includes a white ink generation unit, an embossing mapping unit, a varnish area recognition unit, a color management configuration matching unit, and a UV printing control data synthesis unit, which are used to complete the automatic conversion of multi-channel process data and data packet encapsulation. The API printing control module is deployed in the UV printing terminal or a local server that communicates with the UV printing terminal. It includes an API interface unit, an API verification, parsing and execution unit, and a status feedback unit; each module communicates and transmits data in sequence.
[0008] Thirdly, this application provides an electronic device for UV printing based on AI-generated images. The electronic device includes a UV flatbed printing device body, a local storage unit, and a controller. The controller carries and runs a computer program, which, when executed, implements the printing method for UV data conversion based on AI-generated images as described in the foregoing embodiments. The local storage unit is used to cache UV printing control data packages, material-corresponding ICC color profiles, and a UV printing-specific prompt word template library.
[0009] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the AI-based UV printing method described in the foregoing embodiments.
[0010] The beneficial effects of the embodiments of this application are as follows: Image acquisition methods, material types, and a complete set of UV printing effect parameters, including white ink underlayer, embossing, varnish, and color style, are collected through a mobile H5 interactive interface. Lightweight web-based interaction eliminates the need for app installation, lowering the operational threshold. Simultaneously, AI-generated image prompts carrying UV process constraint information are automatically generated based on the collected parameter information, ensuring that the AI-generated image adapts to the requirements of UV stereoscopic printing processes and avoiding the problem that general AI drawing results cannot be directly used for embossing, partial varnish, and white ink underlayer processes. Using standardized RGB images as a unified data source, parallel computation in the cloud automatically generates grayscale data for the white ink layer, embossing height mapping data, and varnish layer mask data. Simultaneously, color space conversion is completed by matching the corresponding ICC color management file with the material type. There is no need for manual image processing software to create process layers channel by channel, eliminating reliance on professional RIP operators and achieving fully automated generation of multi-layer process data, significantly shortening the pre-printing plate-making cycle. Color conversion is achieved by matching independent ICC profiles to the substrate, and color calibration is performed for different printing materials to reduce the color difference between the mobile preview and the actual finished product, thereby improving the color reproduction accuracy of the UV printed product. CMYK image data, white ink data, embossing mapping data, varnish mask data, and layer printing timing instructions are encapsulated into a unified UV printing control data package, which is sent to the UV printing terminal via API interface. The terminal automatically parses and generates a layer printing instruction sequence, creating a fully automated closed loop that integrates mobile interaction, cloud AI generation, process data conversion, and terminal layer printing. This reduces manual file transfer operations, lowers the probability of human error, and enables integrated UV printing that combines color patterns, white ink underlayers, 3D embossing, and partial / full-area varnish effects. Attached Figure Description
[0011] Figure 1 A flowchart illustrating an AI-generated image-based UV printing method provided in this application embodiment; Figure 2A flowchart illustrating the execution steps of data processing in a UV printing data conversion engine, as provided in this application embodiment; Figure 3 A structural block diagram of an AI-generated image-based UV printing system provided in this application embodiment; Figure 4 This is a structural block diagram of an electronic device based on AI-generated images and UV printing, provided as an embodiment of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0013] In related technologies, AI-generated image generation, or generative artificial intelligence image generation technology, uses a diffusion model as its mainstream underlying architecture. It relies on the CLIP cross-modal model to bridge the semantic gap between text and images, receiving text prompts and reference image inputs. It iteratively denoises random noise to generate a new, standardized RGB digital image, divided into two main modes: text-generated image and image-generated image. The mainstream model provides image generation capabilities through a standardized AIGC API interface, enabling style transfer, high-definition restoration, and rapid generation of creative patterns.
[0014] UV flatbed printing is a digital inkjet technology that uses ultraviolet light to cure ink. The printhead sprays UV-specific ink, which is instantly cured into a solid ink film by a 395~405nm ultraviolet LED lamp. The ink does not need to penetrate or dry, and can be directly printed on hard materials such as acrylic, wood, metal, PVC, glass, and mobile phone cases.
[0015] This invention's integrated solution builds a complete link encompassing an H5 front-end, a cloud-based AI image generation engine, a UV data conversion engine, and API printing control. A dedicated four-segment prompt template inputs material, white ink, embossing, and varnish parameters into the AIGC interface, and the AI-generated image simultaneously carries printing process information. A built-in UV-specific conversion algorithm automatically generates white ink layers, embossing height mapping, and varnish masks, automatically matching the material's ICC color file. It parses the embossing mapping data to generate pixel-level embossing multi-pass overlay printing instructions, driving the UV printer to print in layers.
[0016] Figure 1This application provides an embodiment of a UV printing method based on AI-generated images. The method is applied to a UV printing system based on AI-generated images. The "system" is not a single native software, but a modular, interconnected system comprising a cloud server, mobile terminal, and printing terminal. All image processing, process calculations, and data encapsulation logic are executed by the core cloud-based UV printing data conversion engine module, achieving fully automated UV printing data generation and output. (Refer to...) Figure 1 The method includes the following steps: S100. Receive parameter information input by the user through the H5 interactive interface of the mobile terminal. The parameter information includes image acquisition method, material type and UV printing effect parameters. The UV printing effect parameters include white ink bottom layer mode, embossing effect mode, varnish effect mode and color style mode.
[0017] It should be noted that the H5 interactive interface is a mobile webpage developed based on HTML5, CSS, and JS, and can be opened directly through a mobile browser (such as a smartphone). The White Ink Underlayer Mode controls the process parameters of the UV white ink underlayer spraying range and coverage, used for masking the base color on transparent / dark substrates. The Embossing Effect Mode controls the number of overlay layers to control the height of the three-dimensional raised image. It achieves pixel-level ink stacking through multi-pass embossing instructions, with each layer cured instantly by UV lamps to create a tactile textured surface, driven by embossing height mapping data. The Glossy Coating Effect Mode controls the process of spraying transparent UV varnish, which also provides high gloss enhancement, wear resistance, and waterproof protection. The Color Style Mode controls the parameters of the image's visual style during the AI image generation stage, writing style descriptions into the prompt words, and simultaneously adjusting the embossing height and color saturation adaptively.
[0018] In this embodiment, users can scan the QR code of the UV printing terminal using a smart terminal to open a mobile H5 interactive interface through a browser. Through this H5 interface, users can select image acquisition method as text prompt generation and input the original text; alternatively, they can choose to upload the original image from the smart terminal's album or camera. Next, they can select the material type as transparent acrylic sheet; then select UV printing effect parameters: white ink base mode as full-base white ink; embossing effect mode as high-relief; varnish effect mode as full-coverage varnish; and color style mode as oil finish style. The H5 interactive interface receives all input parameters, completes local verification, and then uploads them to the cloud service. The material types include, but are not limited to: PVC name badges, refrigerator magnets, phone cases (PC material), phone cases (TPU material), transparent acrylic sheets, wooden signs, metal nameplates, or glass coasters. Each material type is associated with preset size parameters, material parameters, and color management configuration file identifiers.
[0019] S200. Based on the collected parameter information, an AI-generated image prompt text carrying multi-dimensional UV process control information is automatically generated by splicing together the UV printing dedicated prompt text template system.
[0020] It should be noted that the UV printing-specific prompt word template system includes: a prompt word template library, a material-prompt word mapping table, and a prompt word generation engine.
[0021] In this embodiment, the system reads the parameter information sent from the H5 interactive interface. This parameter information includes material type, white ink base mode, embossing effect mode, varnish effect mode, and color style mode parameters. By matching a preset prompt word template library, the system converts each process parameter into standardized process labels and embeds them into image description text, combining them to form a complete AI-generated image prompt word, which is then sent to the AIGC engine. The AI-generated image engine outputs a standardized RGB image adapted for UV layer printing based on the prompt words carrying process constraints. The cloud calls a preset UV printing-specific prompt word template system, concatenating the material type and UV printing effect parameters into the prompt words to obtain the complete AI-generated image prompt word.
[0022] Specifically, the prompt word template library stores multiple sets of UV printing-specific prompt word templates. Each prompt word template includes a visual description segment, a UV printing control segment, a style description segment, and a quality description segment. The material-prompt word mapping table establishes a mapping relationship between material types and prompt word templates, with different material types corresponding to different UV printing control segment parameters. The prompt word generation engine combines user input or image parsing results, material type, printing effect parameters, and the material-prompt word mapping table to generate complete AI-generated image prompt words. It also adaptively adjusts the call weight of each template based on user regeneration commands and like feedback results.
[0023] S300: Input the AI image generation prompts into the cloud-based AI image generation engine, and complete image generation and standardization processing based on the AI image generation engine to output a standardized RGB image adapted to the UV printing scenario.
[0024] In this embodiment, the completed prompt text is sent to the cloud AI image engine through the AIGC interface. The AI image engine calculates and outputs the original RGB image. The system performs image quality inspection: checking the image clarity and removing abnormal noise. The system performs size normalization processing according to the printing size of the acrylic sheet and outputs a standardized RGB image.
[0025] S400 uses a cloud-based UV printing data conversion engine to process the standardized RGB image in parallel, automatically generating grayscale data for the white ink layer, relief height mapping data, and varnish layer mask data. It also matches the corresponding ICC color management profile according to the material type selected by the user and performs color space conversion to obtain CMYK image data.
[0026] It's important to note that the AI image engine outputs images in sRGB (standard Red Green Blue) format by default. sRGB is a standardized red, green, and blue color space that relies on screen illumination to display a rich color gamut with a wide range. However, sRGB relies on light reflection to display color, while UV printer inks rely on pigment reflection. Therefore, sRGB data cannot be directly used for printing; it needs to be converted to CMYK. The UV printhead controls the ink ejection volume of each color according to CMYK values. Because the CMYK color gamut is smaller than sRGB, some vibrant colors on the screen cannot be replicated, requiring ICC color gamut compression mapping.
[0027] In this embodiment, the UV printing data conversion engine can perform multi-threaded parallel processing on standardized RGB images: generating grayscale data of a full-coverage white ink layer based on the full-base white ink mode; generating embossing height mapping data based on the high-relief mode, corresponding to a maximum of 16 layers of overlapping printing instructions; generating mask data of a full-coverage varnish layer based on the full-coverage varnish mode; and automatically retrieving the acrylic-specific ICC color profile based on the material type "transparent acrylic sheet" to complete the sRGB to CMYK color space conversion and output CMYK image data.
[0028] S500: Generate a UV printing control data package from the grayscale data of the white ink layer, the relief height mapping data, the varnish layer mask data, the CMYK image data, and the preset layer printing sequence instructions.
[0029] In the embodiments of this application, the system retrieves the generated CMYK image data, white ink layer grayscale data, embossing height mapping data, and varnish layer mask data. Simultaneously, it reads the system's preset layer printing sequence instruction and encapsulates the white ink layer grayscale data, embossing height mapping data, varnish layer mask data, CMYK image data, and the preset layer printing sequence instruction into a complete UV printing control data package that can be recognized by the UV printing terminal equipment. The preset layer printing sequence can be, in sequence, white ink layer, CMYK color layer, embossing overlay layer, and varnish layer. The UV printing control data package includes header parameter data, channel image data, and printing control data. The header parameter data includes material type, printing area size, printing accuracy, number of printing passes, white film mode, embossing mode, and varnish mode. The channel image data includes C channel data, M channel data, Y channel data, K channel data, W channel data, and V channel data, forming a six-channel parallel data structure. Among them, the W channel data is white ink layer data, used to control the amount and coverage area of white ink base spraying on the substrate; the V channel data is varnish layer mask data, used to accurately define the full-area or local varnish spraying range; the C, M, Y, and K channel data are standard color image data calibrated by the material-specific ICC color profile to ensure color reproduction consistency under different substrates.
[0030] The printing control data includes: embossing height mapping data, ICC profile identifier, and preset layer printing order instructions. The ICC profile identifier is used by the terminal to match the corresponding color calibration parameters to ensure accurate color space conversion results. The embossing height mapping data is used to control the number of UV ink overlays at each pixel position to achieve a three-dimensional embossed height difference effect.
[0031] The system automatically determines the optimal layer printing sequence based on the current material type and printing effect parameters. In this embodiment, the preset standard printing sequence is as follows: white ink layer base printing, CMYK color pattern printing, embossed multi-layer overlay printing, and surface varnish spraying. Through this layering sequence, the white ink layer can effectively improve the substrate's base color coverage and color saturation, the color layer ensures the reproduction of pattern details, the embossed overlay layer achieves a three-dimensional texture, and the surface varnish layer completes high-gloss protection and texture optimization. Each process layer does not interfere with each other and is cured and formed layer by layer.
[0032] Finally, the system integrates and encapsulates all header parameter data, six-channel image data, print control data, and layering timing instructions, and outputs a structured and standardized UV print control data package for subsequent local API print control module parsing and calling to drive the UV print terminal to complete automatic layer printing jobs.
[0033] S600: The UV printing control data packet is sent to the UV printing terminal through the local API interface. The UV printing terminal verifies and parses the packet to obtain a structured layered printing instruction sequence and drives the UV printing terminal to execute the layered printing job.
[0034] In the embodiments of this application, upon receiving a user confirmation instruction, the UV printing control data packet, along with the printing device identifier, can be submitted to the cloud server via the HTTPS protocol. The cloud server then forwards the data packet to the UV printing terminal, and the API printing control module of the UV printing terminal parses the data packet to extract a sequence of printing instructions consisting of white ink printing instructions, embossed multi-pass overlay printing instructions, CMYK inkjet printing instructions, and varnish printing instructions. The UV printing terminal is then driven to execute the following steps in the printing order: printing a full-width white ink base layer for curing, printing a CMYK color image, performing multi-pass overlay printing to achieve high-relief stacking and curing of the pattern, and spraying a full-coverage varnish and UV curing, thus completing the layered printing operation.
[0035] In another embodiment, the method further includes: loading data of each layer through the H5 on the mobile terminal to simulate the white ink cover, embossed three-dimensional and glossy preview effects, and transmitting the printing progress status back in real time.
[0036] The H5 on the mobile device can load data for each channel of the white ink layer, embossing height, and varnish layer, and simulate the preview effect on the page. The AI-generated image is overlaid with the material's background color to simulate the covering effect of the white ink layer. A grayscale embossed image is generated based on the embossing height mapping data and overlaid to simulate a three-dimensional effect. A highlight effect is overlaid on the varnish-covered area to simulate the gloss of the varnish.
[0037] In this embodiment, the transparent acrylic sheet has a complete white ink background on the back; the plum blossom pattern has a distinct embossed texture; the overall surface is glossy and wear-resistant; the oil painting style color reproduction is accurate and the colors are saturated, completing the entire automated processing from AI raw image to UV embossed finished product, without the need for manual layering and color adjustment using PC-based RIP software.
[0038] Figure 2 This is a flowchart illustrating the parallel processing of standardized RGB graphics by a UV printing data conversion engine provided in an embodiment of this application. Figure 2 As shown, the standardized RGB image is processed in parallel by a UV printing data conversion engine to automatically generate grayscale data for the white ink layer, relief height mapping data, and varnish layer mask data, including the following steps: Step S201: Automatically generate grayscale data of the white ink layer that matches the parameter information, including: Sub-step S2011: Convert the standardized RGB image into a single-channel grayscale image, and call the corresponding white ink generation algorithm according to the currently selected white ink underlying mode; Sub-step S2012: When the white ink underlying mode is a local white ink mode, perform threshold binarization processing on the grayscale image, identify the dark area of the image as the white ink coverage area, perform morphological operations on the white ink coverage area to optimize the contour, and perform feathering transition processing on the edge of the area.
[0039] In this embodiment, for steps S2011 to S2013, the system acquires an RGB image after color normalization, calls the grayscale conversion submodule to convert the three-channel normalized RGB image Irgb(x,y) into a single-channel grayscale image Gray(x,y). The value range of each pixel in the image is 0 to 255, with lower values representing darker colors. The system reads the white ink underlying mode identifier configured by the user in the H5 interactive interface and calls the white ink generation algorithm that matches the mode. When the white ink underlying mode is detected to be a local white ink mode, the grayscale image is subjected to threshold binarization processing by the binarization submodule. A grayscale threshold T is set, and pixels with grayscale values lower than the grayscale threshold are determined to be dark areas and marked as white ink coverage candidate regions B(x,y). The morphological operation submodule sequentially performs morphological erosion under the structuring element, dilation operation to optimize the region contour, remove isolated noise points and smooth the region boundary to optimize the region contour, eliminate scattered small noise points in the image and fill small gaps inside the region. Finally... The distance transformation submodule calculates the shortest distance DT(x,y) from each pixel within each white ink coverage area to the area boundary, providing a geometric metric for calculating the gradient white ink coverage. The coverage calculation submodule maps pixels to white ink coverage Cov(x,y)∈[0,100%] based on the shortest distance. Then, edge feathering is performed on the boundary of the white ink coverage area to obtain a gradient white ink effect that smoothly decreases from the center to the edge, resulting in white ink layer grayscale data that matches the parameter information, thus avoiding harsh boundary breaks in the white ink boundary after UV printing. If the image contains an Alpha channel, the Alpha fusion submodule reads the image transparency channel α(x,y), scales the coverage of the semi-transparent area by α, and finally outputs white ink layer grayscale data W(x,y)∈[0,255] with a feathered transition effect, which is used to generate embossed multi-pass printing instructions.
[0040] For example, the machine mathematical expression of the algorithm flow for automatically generating the white ink layer is as follows: First, a grayscale weighted conversion operation is performed. The standardized RGB image is converted into a single-channel grayscale image using the ITU-R BT.601 luminance weighting formula, corresponding to formula (1): (1) In the formula, R(x,y), G(x,y) and B(x,y) represent the pixel values of the red, green and blue channels at the image coordinates (x,y) respectively, and the output Gray(x,y) is the brightness gray value corresponding to the pixel, with a value range of [0,255].
[0041] Binarization thresholding is performed based on the grayscale image, corresponding to formula (2), with a preset grayscale threshold T=128, to distinguish between areas that need to be covered with white ink and light-colored areas that do not need white ink: (2) In this case, binary mask B(x,y)=1 represents the current pixel being determined to be a dark area and is included in the white ink pre-coverage area; B(x,y)=0 represents a light area and no white ink is generated.
[0042] To eliminate noise and smooth contours in the local white ink mode, an opening operation is constructed by combining the morphological erosion operator and the dilation operator. The morphological erosion operator is shown in formula (3): (3) In the formula, A is the input binary mask, and S is the preset morphological structuring element; the erosion operation takes the minimum pixel value in the neighborhood of the structuring element, shrinks the white ink area, and filters out isolated small noise points in the image.
[0043] The morphological dilation operator corresponds to formula (4): (4) In the formula, A is the input binary mask, and S is the preset morphological structuring element; the dilation operation takes the maximum pixel value in the neighborhood of the structuring element to restore the small holes inside the main area and the filled area after erosion and shrinkage.
[0044] The morphological opening operation is formed by combining the erosion and dilation operations, and is used to uniformly denoise and smooth the boundary contours of the white ink binary mask, as shown in formula (5): (5) For the gradient white ink mode, perform Euclidean distance transformation on the white ink region after the opening operation, as shown in formula (6): (6) In the formula, ∂Ω white The set of pixels representing the boundary of the white ink region. DT (x,y) represents the shortest Euclidean distance from pixel (x,y) to the nearest white ink region boundary.
[0045] Based on the distance transformation result, the pixel white ink coverage is calculated through convolution operation to generate a gradient effect that decreases from the center of the region to the edge, as shown in formula (7): (7) The default boundary gradient distance is D=20px.
[0046] Finally, the image alpha transparency channel is fused to correct the grayscale output value of the white ink layer. Formula (8) is used to scale the white ink coverage of the semi-transparent area, with a preset transparency threshold α. lo =0.05, α hi =0.95: (8) In the formula, α(x,y) represents the image transparency channel value at coordinates (x,y); W mode (x, y) represents the base white ink layer data calculated individually based on the user-selected white ink, full-base white ink, partial white ink, and gradient white ink modes. When the pixel transparency is below the lower threshold, the white ink is directly cleared to zero. The white ink coverage in the semi-transparent area is scaled according to the transparency ratio. The base white ink data of the corresponding white ink mode is directly used in the highly opaque area. The final output is the final white ink layer grayscale image W with a value of [0, 255]. final (x,y).
[0047] Step S202: Automatically generate relief height mapping data that matches the parameter information, including: Sub-step S2021: Determine the maximum number of overlapping layers based on the embossing effect mode selected by the user; Sub-step S2022: Convert the standardized RGB image into a grayscale image, perform Gaussian blur noise reduction and grayscale normalization processing, calculate the number of stacking times at each pixel position according to the normalized grayscale value and the maximum number of stacking layers, and generate an initial relief height mapping map. Sub-step S2023: Apply bilateral filtering to the relief height mapping map to perform edge-preserving smoothing processing; Sub-step S2024: Adjust the style adaptation coefficient of the smoothed relief height mapping map according to the color style mode selected by the user, and output relief height mapping data that matches the parameter information.
[0048] In this embodiment, acrylic decorative panels are selected as the material. The user selects the high-relief effect mode and watercolor style color style on the mobile H5 interactive interface. Based on the standardized RGB image, the relief height mapping data is automatically generated, and sub-steps S2021 to S2024 are executed completely. Sub-step S2021: The system reads the embossing effect mode sent by H5, identifies the current mode as high emboss, and matches the preset embossing level rules to match the corresponding maximum number of overlapping layers. N max=16, serving as the upper limit for calculating the number of pixel emboss layers. Among them, the maximum number of stacked layers is 1 for no emboss mode, 3 for low emboss mode, 8 for medium emboss mode, and 16 for high emboss mode, thus determining the maximum 3D stacking height benchmark for this embossing process.
[0049] Sub-step S2022: grayscale conversion, Gaussian blur, normalization, and calculation of pixel overlay layers.
[0050] First, the standardized RGB image is converted into a single-channel grayscale image Gray(x,y) using the ITU-R BT.601 luminance weighting formula; then, a 5×5 two-dimensional Gaussian convolution kernel with a default standard deviation σ=1.0 is used to perform convolution Gaussian blurring on the grayscale image to eliminate fine noise and texture artifacts, and to avoid the distortion of relief height caused by minute pixel disturbances; as shown in formula (9): (9) By performing pixel-by-pixel convolution operations with the kernel function and the grayscale image, high-frequency fine noise points in the image are filtered out, eliminating the interference of noise on the calculation of relief height.
[0051] After noise reduction, the Gaussian blurred grayscale image is subjected to min-max grayscale normalization processing, which linearly maps the global grayscale pixel values to the standard interval [0,1] to obtain the normalized grayscale value N(x,y), thus eliminating the influence of different original image brightness differences on the calculation of the number of overlay layers. As shown in the corresponding formula (10); (10) In the formula, G min G is the minimum grayscale value of the entire grayscale image. max This is the maximum grayscale value of the entire grayscale image. Normalization eliminates the layer calculation deviation caused by differences in brightness between different images.
[0052] The system combines the normalized grayscale value with the maximum number of overlay layers matched by the embossing mode, rounds each pixel to calculate the basic overlay count for each pixel, and generates an initial embossing height mapping map; the value range is 1 to 16, as shown in formula (11): (11) in, N max The system presets the maximum number of stacking layers to match the current emboss effect mode, with the emboss level rule set to: No Emboss Mode. N max =1, Low Emboss Mode N max =3, Medium Relief Mode N max =8, High Relief Mode Nmax =16; round is a rounding operation to obtain the initial number of embossed overlay layers for each pixel. The normalized value of the bright main area of the image is higher, corresponding to a larger number of overlay layers, while the number of layers for the dark background is lower, naturally forming a height difference in the image. This allows the image's brightness and darkness information to accurately correspond to the multi-pass overlay height of UV printing, resulting in a higher number of bright layers and more obvious convexity, and a lower number of dark layers and deeper depressions, forming a basic three-dimensional difference.
[0053] Sub-step S2023: Apply a bilateral filter operator to the initial relief height map to perform edge-preserving smoothing processing, as shown in formula (12): (12) The formula for calculating the normalized weighting coefficient (13) is as follows: (13) The formula for calculating the Gaussian weighting function of spatial distance (14) is as follows: (14) The formula for calculating the Gaussian weighting function of pixel value difference (15) is as follows: (15) In the formula, Ω represents a 5×5 pixel neighborhood centered on the current pixel p; the spatial Gaussian standard deviation σ s =5, Range, Gaussian standard deviation σ c A bilateral filtering operator with a value of 30 performs a smoothing operation on the base layer mapping map. The filtering process only smooths the noise inside the texture, preserves the abrupt changes in layer number at the edge of the pattern outline, avoids blurring and distortion of the relief contour, and obtains an intermediate relief layer map with clear edges and soft internal transitions.
[0054] Sub-step S2024: Adjust the style adaptation coefficient of the smoothed relief height mapping map according to the color style mode selected by the user, and output the relief height mapping data that matches the parameter information. A segmented style adaptation function is adopted, as shown in formula (16): (16) In the formula, clip is an interval cutoff function that constrains the result to [1, ..., ... N max [Legitimate layer range; the overall height of the smoothed relief height map is scaled and quantized by calling the corresponding style adaptation coefficient; among them, the oil painting style uses a magnification coefficient of 1.2 to enhance the contrast of the relief, the watercolor style uses a reduction coefficient of 0.8 to weaken the relief difference, and the cartoon style is based on the layer quantization coefficient.] K levelDiscrete-level quantization is performed on the number of overlay layers, and the final output is standardized emboss height mapping data that perfectly matches the user's selected emboss mode and color style. L' (x,y), the value of each pixel directly corresponds to the number of UV printing embossing multi-pass overlays, which is used for subsequent UV multi-layer overlay embossing forming control.
[0055] For example, the system reads the watercolor style selected by the user, calls the corresponding style adaptation coefficient γwater=0.8, and performs a scaling operation on the number of layers after bilateral filtering. L' (x,y)=clip(L(x,y) ×γwater,1,Nmax), moderately reduces the overall number of emboss overlay layers and weakens the contrast between the raised and recessed areas; the cropping limits the output layer range to 1-16, and finally outputs a pixel-level emboss height map. L' (x, y). Each pixel value in this mapping represents the number of times the relief multi-pass is overlaid at that coordinate, and is subsequently sent to the API printing control module to generate relief multi-pass overlay instructions.
[0056] Step S203: Automatically generate varnish layer mask data that matches the parameter information, including: Based on the gloss varnish effect mode selected by the user, pixel-level highlight region detection is performed on the standardized RGB image and highlight candidate regions are extracted. Morphological closing operation, connected component area filtering and edge feathering are performed on the highlight candidate regions in sequence, and a global or local highlight varnish mask matching the parameter information is output.
[0057] In this embodiment, the user selects a localized high-gloss varnish mode through a mobile H5 interactive interface. The system automatically generates varnish layer mask data from the standardized RGB image output by AI. First, brightness feature analysis is performed on the standardized RGB image, and highlight regions are detected by using a fixed brightness threshold to extract candidate highlight regions. Next, morphological closing operations are performed on the candidate highlight regions to fill small holes and connect broken textures, ensuring the integrity of the highlight region outline. Subsequently, connected component area filtering is performed to filter out fragmented and isolated noise regions, retaining effective connected highlight regions. Finally, feathering gradient processing is applied to the edges of the varnish mask to weaken hard boundaries and achieve a smooth transition between the varnish and matte regions.
[0058] If the user selects the full-coverage varnish mode, a full-coverage binary varnish mask is directly generated; if the user selects the no-varnish mode, empty varnish layer mask data is output. This step ultimately outputs standardized varnish mask data adapted to the current varnish effect mode, which can be matched and fused with CMYK color data, white ink layer data, and embossing height mapping data to drive the UV printer to achieve layered spraying effects with localized high brightness or full-area gloss.
[0059] Figure 3This is a structural block diagram of a UV printing system based on AI-generated images, provided as an embodiment of this application.
[0060] like Figure 3 As shown, this embodiment discloses a modular, layered printing system 300. The system includes an H5 interactive front-end module 301, a cloud AI image generation engine module 302, a cloud UV printing data conversion engine module 303, and a local API printing control module 304, which are sequentially and communicatively connected. Each module is deployed independently in a layered manner. The H5 interactive front-end module 301 is deployed on a mobile browser, the cloud AI image generation engine module 302 and the cloud UV printing data conversion engine module 303 are deployed on a cloud server, and the local API printing control module 304 is deployed on a UV printing terminal or a local server that is communicatively connected to it, forming a fully automatic closed-loop operation link of human-computer interaction, intelligent image generation, process conversion, and terminal printing.
[0061] In this embodiment, the user accesses the deployed H5 interactive front-end module 301 through a mobile browser. The H5 interactive front-end module 301 integrates an image input unit 3011, a material selection unit 3012, a print effect configuration unit 3013, a simulation preview unit 3014, and a print distribution unit 3015. It eliminates the need to download and install an application, enabling lightweight completion of the entire process of parameter input and interactive operation. The user selects the image acquisition method through the image input unit 3011, selects the printing substrate type through the material selection unit 3012, and configures all UV process parameters, including white ink underlay mode, embossing effect mode, varnish effect mode, and color style mode, through the print effect configuration unit 3013. After parameter input, the simulation preview unit 3014 simulates and displays the finished product effects of white ink coverage, embossing, and high gloss varnish in real time. Once confirmed, the print distribution unit 3015 encrypts and uploads all user parameters to the cloud server.
[0062] A cloud-based AI image generation engine module 302 is deployed on a cloud server. This module includes a text-to-image generation unit 3021, an image optimization unit 3022, an image quality detection unit 3023, and an image standardization unit 3024. It can call upon third-party AI image generation engines to complete intelligent image creation. After receiving user parameters uploaded by the H5 interactive front-end module 301, the cloud-based AI image generation engine module 302 combines material parameters and UV process parameters to generate dedicated AI image generation prompts adapted to the printing scenario. The text-to-image generation unit 3021 completes the initial image generation; the image optimization unit 3022 then repairs image detail defects; the image quality detection unit 3023 verifies clarity, noise, and image quality compliance; and finally, the image standardization unit 3024 outputs a standardized RGB image with uniform size and color gamut, providing a standard image source for backend process data conversion.
[0063] The cloud server synchronously deploys a cloud UV printing data conversion engine module 303, which includes a white ink generation unit 3031, an embossing mapping unit 3032, a varnish area recognition unit 3033, a color management configuration matching unit 3034, and a UV printing control data synthesis unit 3035, and performs multi-channel process data parallel analysis and processing on the standardized RGB image output by AI. The white ink generation unit 3031 performs grayscale conversion, binarization determination, morphological denoising, and edge feathering to automatically generate grayscale data of the white ink layer that matches the user's selected mode. The embossing mapping unit 3032 generates pixel-level embossing height mapping data through Gaussian blurring, grayscale normalization, pixel overlay layer calculation, bilateral filtering edge-preserving smoothing, and style adaptation adjustment. The varnish area recognition unit 3033 completes image highlight area detection, morphological closing operation, connected component filtering, and edge feathering to output global or local highlight varnish mask data. The color management configuration matching unit 3034 automatically matches the corresponding ICC color profile according to the selected material to complete the accurate color conversion from sRGB to CMYK. Finally, the UV printing control data synthesis unit 3035 integrates and encapsulates the white ink data, embossing height mapping data, varnish mask data, CMYK color data, and layered printing timing instructions to generate a complete standardized UV printing control data package.
[0064] The system is configured with a local API printing control module 304, which is deployed on a local server connected to the UV printing terminal. This module includes an API interface unit 3041, an API verification, parsing, and execution unit 3042, and a status feedback unit 3043. The local API printing control module 304 receives UV printing control data packets from the cloud via the API interface unit 3041. The API verification, parsing, and execution unit 3042 performs data verification and instruction parsing, converting the data into CMYK inkjet instructions, white ink printing instructions, embossed multi-pass overlay instructions, and varnish spraying instructions, respectively. These instructions drive the UV printing terminal to complete the layer-by-layer curing printing operation according to a preset layer-by-layer printing sequence. Simultaneously, the status feedback unit 3043 collects real-time equipment operating status, printing progress, and equipment alarm information and transmits this data back to the cloud, synchronously updating the H5 interactive front-end module 301 to visualize the printing status.
[0065] This embodiment achieves hierarchical data transmission and collaborative computation through the H5 interactive front-end module 301, the cloud AI image generation engine module 302, the cloud UV printing data conversion engine module 303, and the local API printing control module 304. The entire process requires no manual Photoshop retouching or professional RIP software debugging, realizing fully automated operation from one-click customization on mobile devices, AI intelligent image generation, automatic conversion of multi-process data to precise embossed UV printing on the terminal. This effectively reduces the customization threshold and improves the color accuracy and three-dimensional process consistency of the printed product.
[0066] Figure 4 This is a structural block diagram of an electronic device based on AI-generated images and UV printing, provided as an embodiment of this application.
[0067] Reference Figure 4 The AI-based UV printing electronic device 400 includes a processor 401, a memory 402, and a computer program 4021 stored in the memory and executable on the processor. When executed, the processor implements the AI-based UV printing method of the aforementioned embodiments.
[0068] This application also provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the AI-based image-based UV printing method of the foregoing embodiments.
[0069] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0070] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0071] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0072] These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing terminal device to operate in a predictive manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0074] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0075] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0076] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A UV printing method based on AI-generated images, characterized in that, include: The H5 interactive interface on the mobile terminal receives parameter information input by the user. The parameter information includes image acquisition method, material type and UV printing effect parameters. The UV printing effect parameters include white ink bottom layer mode, embossing effect mode, varnish effect mode and color style mode. Based on the collected parameter information, an AI-generated image prompt text carrying multi-dimensional UV process control information is automatically generated by splicing together the prompt text template system for UV printing. The AI-generated image prompts are input into the cloud-based AI-generated image engine, which then generates and standardizes the image, outputting a standardized RGB image adapted to UV printing scenarios. The standardized RGB image is processed in parallel by the UV printing data conversion engine in the cloud, automatically generating grayscale data of white ink layer, relief height mapping data and varnish layer mask data that match the parameter information. At the same time, the corresponding ICC color management configuration file is matched according to the material type selected by the user, and color space conversion is performed to obtain CMYK image data. The grayscale data of the white ink layer, the relief height mapping data, the varnish layer mask data, the CMYK image data, and the preset layer printing sequence instructions are used to generate a UV printing control data package; The UV printing control data packet is sent to the UV printing terminal through the local API interface. The UV printing terminal verifies and parses the data to obtain a structured layered printing instruction sequence, and drives the UV printing terminal to execute the layered printing job.
2. The method according to claim 1, characterized in that, The UV printing-specific prompt word template system includes: a prompt word template library, a material-prompt word mapping table, and a prompt word generation engine; The prompt word template library stores multiple sets of UV printing-specific prompt word templates. Each prompt word template includes a visual description section, a UV printing control section, a style description section, and a quality description section. The material-prompt mapping table establishes a mapping relationship between material types and prompt templates, with different material types corresponding to different UV printing control segment parameters; The prompt word generation engine generates complete AI-generated image prompt words by combining user input or image parsing results, material type, printing effect parameters, and the material-prompt word mapping table; and adaptively adjusts the call weight of each template according to user regeneration instructions and like feedback results.
3. The method according to claim 1, characterized in that, The automatic generation of white ink layer grayscale data matching the parameter information includes: The standardized RGB image is converted into a single-channel grayscale image, and the corresponding white ink generation algorithm is called according to the currently selected white ink underlying mode. When the white ink underlying mode is a local white ink mode, threshold binarization processing is performed on the grayscale image, dark areas of the image are identified as white ink coverage areas, morphological operations are performed on the white ink coverage areas to optimize the contours, and feathering transition processing is performed on the edges of the areas. When the underlying white ink mode is a gradient white ink mode, pixel-level distance transformation is performed on the white ink coverage area, the minimum distance value from each pixel to the boundary of the area is calculated, and the white ink coverage rate is calculated pixel by pixel based on the minimum distance value to generate a gradient white ink effect that smoothly decreases from the center of the area to the edge, thereby obtaining the grayscale data of the white ink layer that matches the parameter information.
4. The method according to claim 1, characterized in that, The automatically generated relief height mapping data that matches the parameter information includes: The maximum number of stacking layers is determined based on the embossing effect mode selected by the user. The standardized RGB image is converted into a grayscale image, and Gaussian blur noise reduction and grayscale normalization are performed. The number of times each pixel is stacked is calculated pixel by pixel based on the normalized grayscale value and the maximum number of stacking layers to generate an initial relief height mapping map. The initial relief height map is subjected to edge-preserving smoothing processing using bilateral filtering; The style adaptation coefficient of the smoothed relief height mapping map is adjusted according to the color style mode selected by the user, and the relief height mapping data matching the parameter information is output.
5. The method according to claim 1, characterized in that, The automatic generation of varnish layer mask data matching parameter information includes: Based on the gloss effect mode selected by the user, pixel-level highlight region detection and highlight candidate region extraction are performed on the standardized RGB image; The candidate regions for highlights are sequentially subjected to morphological closing operations, connected region area filtering, and edge feathering to output varnish layer mask data that matches the parameter information.
6. The method according to claim 1, characterized in that, The UV printing control data package includes header parameter data, channel image data, and printing control data; The header parameter data includes material type, printing area size, printing accuracy, number of printing passes, white film mode, embossing mode, and varnish mode; The channel image data includes C channel data, M channel data, Y channel data, K channel data, W channel data and V channel data, wherein the W channel data is white ink layer data and the V channel data is varnish layer mask data; The control data includes: relief height mapping data, ICC configuration file identifier, and preset layer printing order instructions. The printing order is automatically determined based on the material type and printing effect, specifying the printing order of white ink, color ink, and varnish.
7. A UV printing system based on AI-generated images, characterized in that, For performing the UV printing method based on AI-generated images as described in any one of claims 1 to 6, the UV printing system comprises: The H5 interactive front-end module is deployed on a mobile browser and includes an image input unit, a material selection unit, a print effect configuration unit, a simulation preview unit, and a print distribution unit, which are used to complete user parameter input and effect preview interaction. The AI image generation engine module is deployed on a cloud server and includes a text-to-image generation unit, an image optimization unit, an image quality detection unit, and an image standardization unit. It is used to call third-party AI image interfaces and generate standardized RGB images based on AI image generation prompts. The UV printing data conversion engine module, deployed on a cloud server, includes a white ink generation unit, an embossing mapping unit, a varnish area recognition unit, a color management configuration matching unit, and a UV printing control data synthesis unit, which are used to complete the automatic conversion of multi-channel process data and data packet encapsulation. The API printing control module is deployed in the UV printing terminal or a local server that communicates with the UV printing terminal. It includes an API interface unit, an API verification, parsing and execution unit, and a status feedback unit; each module communicates and transmits data in sequence.
8. The system according to claim 7, characterized in that, The color management configuration matching unit is used to query the preset material-ICC configuration mapping table according to the current material type to obtain the corresponding ICC color configuration file, convert the AI-generated image from RGB color space to CMYK color image of the target material, and adaptively adjust the CMYK channel color saturation in combination with the white ink layer coverage area.
9. An electronic device based on AI-generated images and UV printing, characterized in that, The device includes a UV flatbed printer body, a local storage unit, and a controller; the controller carries and runs a computer program, which, when executed, implements the printing method based on AI-generated image UV data conversion as described in any one of claims 1 to 6. The local storage unit is used to cache UV printing control data packages, material-corresponding ICC color profiles, and UV printing-specific prompt word template libraries.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the UV printing method based on AI-generated images as described in any one of claims 1 to 6.
