Image data superposition processing method and device in jet printing field and storage medium
Through FPGA dual-channel synchronous reading and dynamic interval parameter N control, combined with adaptive layout algorithm and DMA channel update, the label overlay processing of the printing system is optimized, which solves the problems of uneven label overlay and insufficient real-timeness in the prior art, and improves the stability and efficiency of the printing effect.
Patent Information
- Application Number
- CN202510461960.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-25
AI Technical Summary
The existing printing system has shortcomings in label overlay frequency, position optimization, transparent channel processing and real-time update, resulting in unstable printing effect and inefficient efficiency. Especially in dynamic printing environments, the label display interval is uneven, affecting the visual effect and information readability.
The FPGA dual-channel synchronous reading of job images and tag data is used to control the overlay rhythm through dynamic interval parameters N, and the optimal overlay area is calculated in combination with the adaptive layout algorithm to perform spatial domain image fusion, and real-time update of tag content is realized through the DMA channel. Transparent channel processing is optimized using weighting operations to ensure uniform overlay and real-time response of tags and job images.
The uniformity of label display intervals and the smooth transition of transparent channels are achieved, the stability and efficiency of printing effects are improved, the readability and aesthetics of information are ensured, and the response speed and printing efficiency of the system are improved.
Smart Images

Figure CN120371240A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital inkjet printing, and more specifically, to an image data overlay processing method, device, and storage medium in the inkjet printing field. Background Art
[0002] In the inkjet printing field, with the continuous growth of industrial automation and personalized needs, the complexity and real-time requirements of image data processing are increasing day by day. Traditional inkjet printing systems usually process job image data through a single channel and cannot process identification label image data simultaneously, resulting in the need to perform label overlay operations in subsequent stages, increasing the system latency and complexity. In addition, the existing technologies have significant deficiencies in optimizing label overlay frequency and position. Especially in a dynamic inkjet printing environment, changes in printing speed can lead to uneven intervals between label displays, affecting visual effects and information readability.
[0003] When processing identification labels, existing inkjet printing systems usually adopt fixed overlay frequencies and positions and cannot be adjusted according to dynamic conditions such as printing speed and job image characteristics. This fixed mode not only causes the label to overlap with the key area of the job image, obscuring important information, but may also affect the overlay effect due to improper processing of the transparency channel. In addition, the update of label content usually depends on instructions from the host system, lacking real-time performance and flexibility. Especially in scenarios that require rapid response to external inputs, this lag will significantly reduce the system efficiency.
[0004] Therefore, the existing technologies have deficiencies in label overlay frequency, position optimization, transparency channel processing, and real-time update, resulting in unstable inkjet printing effects and low efficiency. Summary of the Invention
[0005] In order to overcome the deficiencies in label overlay frequency, position optimization, transparency channel processing, and real-time update in the existing technologies, the present invention discloses an image data overlay processing method, device, and storage medium in the inkjet printing field, which can effectively solve the above technical problems.
[0006] To solve the above technical problems, the technical solution of the present invention is as follows:
[0007] An image data overlay processing method in the inkjet printing field includes the following steps:
[0008] Read the job image data stream through the job image channel of the FPGA, and at the same time read the pre-stored identification label image data through the identification label channel;
[0009] Set the dynamic interval parameter N and initialize the printing counter;
[0010] When detecting the inkjet printing start signal, perform the following loop processing:
[0011] Analyze the frame structure features of the job image data stream in real time to generate image positioning reference coordinates;
[0012] Calculate the overlay area parameters of the identification label based on the image positioning reference coordinates;
[0013] Perform a logical determination according to the dynamic interval parameter N and the current value of the print counter:
[0014] When the print counter has not reached N, directly output the job image data of the current frame;
[0015] When the print counter reaches N, perform a spatial domain overlay operation on the current frame job image data and the identification label image data to generate and output composite image data;
[0016] Reset the print counter and update the logical condition of the dynamic interval parameter N.
[0017] Preferably, the spatial domain overlay operation includes:
[0018] Perform a binary OR operation on the job image data matrix and the identification label image data matrix, specifically satisfying:
[0019] Composite pixel value = job pixel value OR label pixel value;
[0020] Where when the identification label image data contains an alpha channel, the weighted overlay formula is used:
[0021] Composite pixel value = α × label pixel value + (1 - α) × job pixel value, α ∈ [0, 1].
[0022] Preferably, the update logical condition of the dynamic interval parameter N includes:
[0023] Dynamically adjust according to the relationship between the printing speed parameter V obtained in real time and the preset speed threshold Vt:
[0024] When V ≥ Vt, N = floor(Vt × T / L);
[0025] When V < Vt, N = ceil(Vt × T / L);
[0026] Where, T is the display duration of the label content, L is the standard printing length of a single job image, floor represents the floor function, and ceil represents the ceiling function.
[0027] Preferably, the calculation of the overlay area parameters of the identification label includes:
[0028] Generate label position constraint conditions according to the boundary coordinates of the effective printing area of the job image;
[0029] An adaptive layout algorithm is adopted to determine the superimposed position of the identification label under the constraint conditions, so that the label image and the key feature area of the job image maintain the minimum overlap rate.
[0030] Preferably, it further includes:
[0031] Establish a dynamic update mechanism for label content, and receive the updated label data input from the outside in real time through the DMA channel;
[0032] Perform format verification on the received updated label data, including resolution matching verification and color gamut compatibility detection;
[0033] After the verification passes, write the updated label data into the specified storage area of the dual-port RAM.
[0034] Preferably, the format verification specifically includes:
[0035] Calculate the resolution difference Δd between the updated label data and the current job image data:
[0036] If Δd ≤ the preset tolerance threshold, perform interpolation scaling processing;
[0037] If Δd > the preset tolerance threshold, generate a format error interrupt signal and maintain the original label data.
[0038] Preferably, an electronic device includes:
[0039] A dual-channel reading module that respectively obtains job image data and label image data through the independent DMA channels of the FPGA;
[0040] A dynamic interval control module, which includes a programmable counter array and a conditional judgment unit, and is used to implement the control of the dynamic interval parameter N;
[0041] A spatial superposition operation module, which is configured with a parallel processing unit to implement spatial domain superposition operation;
[0042] A coordinate generation module, which includes a feature extraction sub-module and a layout optimization sub-module, and is used to calculate the superposition area parameters of the identification label;
[0043] An exception handling module, which is used to monitor data overflow and trigger a hardware reset signal;
[0044] A nozzle driving interface module, which is used to convert the processed composite image data into an inkjet control waveform.
[0045] Preferably, the spatial superposition operation module includes:
[0046] A reconfigurable logic unit array that supports dynamic switching of multiple superposition modes;
[0047] A data buffer, adopting a ping-pong buffer structure, includes a first buffer for storing original job data and a second buffer for storing data to be superimposed.
[0048] An operation acceleration unit integrates a dedicated multiply-accumulator and a bit operation logic unit.
[0049] An inkjet printing control device includes: at least one processor; a memory storing executable instructions; wherein when the processor executes the instructions, the steps of the above-mentioned processing method are implemented.
[0050] A computer-readable storage medium stores a computer program, and when the program is executed by a processor, the steps of the above-mentioned processing method are implemented.
[0051] Compared with the prior art, the beneficial effects of the present invention are as follows: Through the real-time adjustment of the dynamic interval parameter N, the optimization of the superimposition position by the adaptive layout algorithm, the weighted superimposition operation of the transparent channel, and the real-time update mechanism of the label content, the present technical solution effectively solves the deficiencies of the prior art in terms of label superimposition frequency, position optimization, transparent channel processing, and real-time update. The dynamic interval parameter N is adjusted in real time according to the printing speed to ensure uniform label display intervals, thereby improving the stability of the printing effect and the readability of information. The adaptive layout algorithm dynamically calculates the label superimposition position under the constraint of the boundary coordinates of the effective printing area of the job image to ensure that the label has the smallest overlap rate with the key feature area of the job image, avoiding label occlusion of important information and improving the clarity and aesthetics of the printing effect. The weighted superimposition operation of the transparent channel dynamically adjusts the pixel values according to the transparency parameter α to ensure a smooth transition between the label and the job image, enhancing the naturalness and aesthetics of the superimposition effect. The label content is updated in real time through the DMA channel, improving the response speed and efficiency of the system and meeting the dynamic printing requirements. Therefore, the present technical solution significantly improves the stability and efficiency of the printing effect and solves the problems of unstable and inefficient printing effects caused by the prior art. Description of the Drawings
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only exemplary, and those of ordinary skill in the art can also obtain other implementation drawings according to the provided drawings without creative efforts.
[0053] Figure 1 It is a flowchart of the present invention;
[0054] Figure 2 It is a method step diagram of the present invention. Detailed Embodiments
[0055] The accompanying drawings are only for illustrative purposes and should not be construed as limiting the patent;
[0056] To better illustrate this embodiment, some components in the accompanying drawings are omitted, enlarged or reduced, and do not represent the dimensions of the actual product;
[0057] For those skilled in the art, it is understandable that some well-known structures and their descriptions in the accompanying drawings may be omitted.
[0058] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0059] Embodiment
[0060] An image data superposition processing method in the field of inkjet printing includes the following steps:
[0061] Read the job image data stream through the job image channel of the FPGA, and at the same time read the pre-stored identification label image data through the identification label channel;
[0062] Set the dynamic interval parameter N and initialize the print counter;
[0063] When the inkjet printing start signal is detected, perform the following loop processing:
[0064] Parse the frame structure features of the job image data stream in real time to generate image positioning reference coordinates;
[0065] Calculate the superposition area parameters of the identification label based on the image positioning reference coordinates;
[0066] Perform a logical determination according to the dynamic interval parameter N and the current value of the print counter:
[0067] When the print counter has not reached N, directly output the job image data of the current frame;
[0068] When the print counter reaches N, perform a spatial domain superposition operation on the job image data of the current frame and the identification label image data to generate and output composite image data;
[0069] Reset the print counter and update the logical condition of the dynamic interval parameter N.
[0070] The spatial domain superposition operation includes:
[0071] Perform a binary OR operation on the job image data matrix and the identification label image data matrix, specifically satisfying:
[0072] Composite pixel value = Job pixel value OR Label pixel value;
[0073] Where when the identification label image data contains an alpha channel, the weighted superposition formula is used:
[0074] Composite pixel value = α × Label pixel value + (1 - α) × Job pixel value, where α ∈ [0, 1].
[0075] The update logic condition of the dynamic interval parameter N includes:
[0076] Dynamically adjust according to the relationship between the printing speed parameter V obtained in real time and the preset speed threshold Vt:
[0077] When V ≥ Vt, N = floor(Vt × T / L);
[0078] When V < Vt, N = ceil(Vt × T / L);
[0079] Where, T is the display duration of the label content, L is the standard printing length of a single job image, floor represents the floor function, and ceil represents the ceiling function.
[0080] The calculation of the superimposed area parameter of the identification label includes:
[0081] Generate label position constraint conditions according to the boundary coordinates of the effective printing area of the job image;
[0082] Adopt an adaptive layout algorithm to determine the superimposed position of the identification label under the constraint conditions, so that the label image and the key feature area of the job image maintain the minimum overlap rate.
[0083] It also includes:
[0084] Establish a dynamic update mechanism for label content, and receive updated label data input externally in real time through the DMA channel;
[0085] Verify the format of the received updated label data, including resolution matching verification and color gamut compatibility detection;
[0086] After the verification passes, write the updated label data into the specified storage area of the dual-port RAM.
[0087] The specific format verification includes:
[0088] Calculate the resolution difference Δd between the updated label data and the current job image data:
[0089] If Δd ≤ the preset tolerance threshold, perform interpolation scaling processing;
[0090] If Δd > the preset tolerance threshold, generate a format error interrupt signal and keep the original label data.
[0091] An electronic device, including:
[0092] Dual-channel reading module, which respectively obtains job image data and label image data through the independent DMA channels of the FPGA;
[0093] Dynamic interval control module, which includes a programmable counter array and a conditional judgment unit, and is used to implement the control of the dynamic interval parameter N;
[0094] Spatial superposition operation module, which is configured with a parallel processing unit to implement spatial domain superposition operation;
[0095] Coordinate generation module, which includes a feature extraction sub-module and a layout optimization sub-module, and is used to calculate the superposition area parameters of the identification label;
[0096] Exception handling module, which is used to monitor data overflow and trigger a hardware reset signal;
[0097] Nozzle driver interface module, which is used to convert the processed composite image data into an inkjet control waveform.
[0098] The spatial superposition operation module includes:
[0099] Reconfigurable logic unit array, which supports dynamic switching of multiple superposition modes;
[0100] Data buffer, which adopts a ping-pong buffer structure and includes a first buffer for storing original job data and a second buffer for storing data to be superimposed;
[0101] Operation acceleration unit, which integrates a dedicated multiplier-accumulator and a bit operation logic unit.
[0102] An inkjet printing control device includes: at least one processor; a memory storing executable instructions; wherein when the processor executes the instructions, the steps of the above-mentioned processing method are implemented.
[0103] A computer-readable storage medium stores a computer program, and when the program is executed by a processor, the steps of the above-mentioned processing method are implemented.
[0104] Hardware architecture: The dual-channel reading module respectively obtains job image data and label image data through the independent DMA channels of the FPGA. The job image channel is responsible for reading the job image data stream stored in an external storage device, and the data format is a common image format such as BMP, JPEG, etc. The identification label channel is responsible for reading the pre-stored identification label image data, and the label image can be text or graphic information including customer information, order number, etc.
[0105] The dynamic interval control module includes a programmable counter array and a conditional judgment unit, which are used to implement the control of the dynamic interval parameter N. The programmable counter array is used to record the number of printed job images, with an initial value of 0. For each printed job image, the counter is incremented by 1. The conditional judgment unit makes a logical determination based on the dynamic interval parameter N and the current value of the print counter to decide whether to perform an image overlay operation.
[0106] The spatial overlay operation module is configured with a parallel processing unit to implement spatial domain overlay operations. The reconfigurable logic unit array supports dynamic switching of multiple overlay modes, such as binary OR operation, weighted overlay, etc. The data buffer adopts a ping-pong buffer structure, including a first buffer for storing the original job data and a second buffer for storing the data to be overlaid. The operation acceleration unit integrates a dedicated multiply-accumulate unit and a bit operation logic unit to improve the operation efficiency.
[0107] The coordinate generation module includes a feature extraction sub-module and a layout optimization sub-module, which are used to calculate the overlay area parameters of the identification label. The feature extraction sub-module analyzes the frame structure features of the job image data stream in real time to generate the image positioning reference coordinates. The layout optimization sub-module generates the label position constraint conditions based on the effective print area boundary coordinates of the job image, and uses an adaptive layout algorithm to determine the overlay position of the identification label under the constraint conditions.
[0108] The exception handling module monitors data overflow and triggers a hardware reset signal to ensure the stable operation of the system.
[0109] The nozzle driver interface module converts the processed composite image data into an inkjet control waveform to drive the nozzle to complete the printing operation.
[0110] Software process: Read the job image data stream and the pre-stored identification label image data through the job image channel and the identification label channel of the FPGA respectively.
[0111] Set the initial value of the dynamic interval parameter N. For example, N = 10, that is, for every 10 printed job images, one identification label image is output.
[0112] Initialize the print counter, and its initial value is 0.
[0113] Establish a dynamic update mechanism for label content. Receive the updated label data input from the outside in real time through the DMA channel, and perform format verification on the received updated label data, including resolution matching verification and color gamut compatibility detection. If the verification passes, write the updated label data to the specified storage area of the dual-port RAM.
[0114] When the printing start signal is detected, enter the loop processing stage.
[0115] Analyze the frame structure features of the job image data stream in real time to generate image positioning reference coordinates. For example, by detecting the edge features and color information of the image, determine the starting position of the image and the position coordinates of the key feature area.
[0116] The superimposed area parameters of the identification label are calculated based on the image positioning reference coordinates, and the label position constraints are generated according to the boundary coordinates of the effective printing area of the job image. For example, the label cannot exceed the effective printing area of the job image, and try to avoid overlapping with the key feature area of the job image. Then, an adaptive layout algorithm is used to determine the superimposed position of the identification label under the constraints, so that the label image and the key feature area of the job image maintain a minimum overlap rate.
[0117] Make logical decisions based on the dynamic interval parameter N and the current value of the print counter:
[0118] When the print counter does not reach N, the job image data of the current frame is directly output without performing the image overlay operation.
[0119] When the print counter reaches N, the current frame job image data and the identification label image data are subjected to spatial domain superposition operation to generate composite image data output. The spatial domain superposition operation includes:
[0120] If the identification label image data does not contain a transparent channel, a binary OR operation is performed on the operation image data matrix and the identification label image data matrix, and the composite pixel value = the operation pixel value OR the label pixel value.
[0121] If the identification label image data contains a transparent channel, the weighted superposition formula is used: composite pixel value = α × label pixel value + (1-α) × operation pixel value, where α∈[0, 1], and the value of α can be adjusted according to actual needs to control the transparency of the label image.
[0122] The logical condition for resetting the print counter and updating the dynamic interval parameter N is to dynamically adjust the value of N according to the relationship between the real-time obtained printing speed parameter V and the preset speed threshold Vt:
[0123] When V ≥ Vt, N = floor (Vt × T / L);
[0124] When V <Vt时,N=ceil(Vt×T / L);
[0125] Wherein, T is the display time of the label content, L is the standard printing length of a single job image, floor represents the rounding down function, and ceil represents the rounding up function.
[0126] When all job images are printed, the cycle processing phase ends and the printing task is completed.
[0127] In a specific implementation, please refer to Figure 1-2 , assume that a digital inkjet printing factory needs to print a batch of promotional posters containing customer information. The number of posters is 1000. To facilitate the distinction of orders from different customers, an identification label containing customer information needs to be printed on every 10 posters.
[0128] Use the FPGA chip as the core processing unit, and configure a dual-channel reading module, a dynamic interval control module, a spatial superposition operation module, a coordinate generation module, an exception handling module, and a nozzle driver interface module.
[0129] The job image is stored in an external storage device, and the identification label image is pre-stored in the internal storage area of the FPGA.
[0130] Set the initial value of the dynamic interval parameter N to 10.
[0131] Initialize the print counter to 0.
[0132] A dynamic update mechanism for label content has been established, and it can receive updated label data input from the outside at any time.
[0133] Start the inkjet printing device. The job image channel of the FPGA starts to read the job image data stream, and the identification label channel reads the pre-stored identification label image data.
[0134] Real-time analyze the frame structure characteristics of the job image data stream, generate image positioning reference coordinates, and calculate the superposition area parameters of the identification label.
[0135] When the value of the print counter has not reached 10, directly output the job image data of the current frame without performing image superposition operations.
[0136] When the value of the print counter reaches 10, perform a spatial domain superposition operation on the job image data of the current frame and the identification label image data to generate composite image data for output. At this time, the identification label image is superimposed on the specified position of the job image and maintains the minimum overlap rate with the key feature area of the job image.
[0137] Reset the print counter and update the logical condition of the dynamic interval parameter N. Assume that the inkjet printing speed parameter V is greater than the preset speed threshold Vt, and calculate the value of the new dynamic interval parameter N according to the formula N = floor(Vt × T / L).
[0138] Repeat the above steps until all 1000 posters are printed. During this period, if it is necessary to update the identification label content, the updated label data input from the outside can be received in real time through the DMA channel and format verification is performed. If the verification passes, the updated label data is written to the specified storage area of the dual-port RAM, and the subsequent printed posters will use the new identification label content.
[0139] Through the above embodiments, the image data overlay processing method and device in the printing field of the present invention can achieve efficient and flexible image data overlay, meet the requirement of flexibly adding label images during single-pass continuous printing, improve the efficiency and accuracy of printing operations, and at the same time can dynamically adjust label content and overlay parameters according to actual needs, having broad application prospects.
[0140] The same or similar reference numerals correspond to the same or similar components;
[0141] The terms describing the positional relationship in the drawings are only for illustrative purposes and should not be construed as a limitation of this patent;
[0142] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. An image data overlay processing method in the field of inkjet printing, characterized in that, It includes the following steps: Read the job image data stream through the job image channel of the FPGA, and at the same time read the pre-stored identification label image data through the identification label channel; Set the dynamic interval parameter N and initialize the print counter; When the printing start signal is detected, perform the following loop processing: Parse the frame structure features of the job image data stream in real time to generate image positioning reference coordinates; Calculate the overlay area parameters of the identification label based on the image positioning reference coordinates; Perform a logical determination according to the dynamic interval parameter N and the current value of the print counter: When the print counter has not reached N, directly output the job image data of the current frame; When the print counter reaches N, perform a spatial domain overlay operation on the job image data of the current frame and the identification label image data to generate composite image data for output; Reset the print counter and update the logical condition of the dynamic interval parameter N.
2. The processing method according to claim 1, characterized in that The spatial domain overlay operation includes: Perform a binary OR operation on the job image data matrix and the identification label image data matrix, specifically satisfying: Composite pixel value = job pixel value OR label pixel value; Where when the identification label image data contains a transparency channel, a weighted overlay formula is used: Composite pixel value = α × label pixel value + (1 - α) × job pixel value, α ∈ [0, 1].
3. The processing method according to claim 1, wherein The update logical condition of the dynamic interval parameter N includes: Dynamically adjust according to the relationship between the printing speed parameter V obtained in real time and the preset speed threshold Vt: When V ≥ Vt, N = floor(Vt × T / L); When V < Vt, N = ceil(Vt × T / L); Where, T is the display duration of the label content, L is the standard printing length of a single job image, floor represents the floor function, and ceil represents the ceiling function.
4. The processing method according to claim 1, wherein The calculation of the overlay area parameters of the identification label includes: Generate label position constraint conditions according to the boundary coordinates of the effective printing area of the job image; Adopt an adaptive layout algorithm to determine the overlay position of the identification label under the constraint conditions, so that the label image and the key feature area of the job image maintain the minimum overlap rate.
5. The processing method according to claim 1, characterized in that, It also includes: Establish a dynamic update mechanism for label content, and receive the updated label data input externally in real time through the DMA channel; Perform format verification on the received updated label data, including resolution matching verification and color gamut compatibility detection; After the verification passes, write the updated label data to the specified storage area of the dual-port RAM.
6. The processing method according to claim 5, characterized in that The format verification specifically includes: Calculate the resolution difference Δd between the updated label data and the current job image data: If Δd ≤ the preset tolerance threshold, perform interpolation scaling processing; If Δd > the preset tolerance threshold, generate a format error interrupt signal and keep the original label data.
7. An electronic device, characterized in that, It includes: A dual-channel reading module that obtains job image data and label image data respectively through the independent DMA channels of the FPGA; A dynamic interval control module that includes a programmable counter array and a condition judgment unit for implementing the control of the dynamic interval parameter N; A spatial overlay operation module configured with a parallel processing unit for implementing the spatial domain overlay operation; A coordinate generation module, including a feature extraction sub-module and a layout optimization sub-module, is used to calculate the superposition area parameters of identification labels; An exception handling module is used to monitor data overflow and trigger a hardware reset signal; A nozzle driver interface module is used to convert the processed composite image data into an inkjet control waveform.
8. The electronic device according to claim 7, wherein The spatial superposition operation module includes: A reconfigurable logic unit array that supports dynamic switching of multiple superposition modes; A data buffer, adopting a ping-pong buffer structure, includes a first buffer for storing original job data and a second buffer for storing data to be superposed; An operation acceleration unit integrating a dedicated multiply-accumulate unit and a bit operation logic unit.
9. An inkjet printing control device, characterized in that, It includes: At least one processor; A memory storing executable instructions; Wherein when the processor executes the instructions, the steps of the processing method described in any one of claims 1-6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, the steps of the processing method described in any one of claims 1-6 are implemented.