CN117369744A - Method, apparatus and storage medium for generating data of different density ink amounts - Google Patents

Method, apparatus and storage medium for generating data of different density ink amounts Download PDF

Info

Publication number
CN117369744A
CN117369744A CN202311444509.0A CN202311444509A CN117369744A CN 117369744 A CN117369744 A CN 117369744A CN 202311444509 A CN202311444509 A CN 202311444509A CN 117369744 A CN117369744 A CN 117369744A
Authority
CN
China
Prior art keywords
ink
template
matrix
generating
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311444509.0A
Other languages
Chinese (zh)
Other versions
CN117369744B (en
Inventor
邝志聪
黄信荣
冼泽波
陈周桐
冯正达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Senyang Electronic Technology Co ltd
Original Assignee
Guangzhou Senyang Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Senyang Electronic Technology Co ltd filed Critical Guangzhou Senyang Electronic Technology Co ltd
Priority to CN202311444509.0A priority Critical patent/CN117369744B/en
Publication of CN117369744A publication Critical patent/CN117369744A/en
Application granted granted Critical
Publication of CN117369744B publication Critical patent/CN117369744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1218Reducing or saving of used resources, e.g. avoiding waste of consumables or improving usage of hardware resources
    • G06F3/1219Reducing or saving of used resources, e.g. avoiding waste of consumables or improving usage of hardware resources with regard to consumables, e.g. ink, toner, paper
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1257Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses a method, equipment and a storage medium for generating data of different concentration ink quantities, and relates to the technical field of printing; the method comprises the following steps of S1: creating a threshold template: generating a threshold matrix according to a blank/aggregation method; s2: ink quantity template generation: importing the threshold matrix generated in the step S1, and then according to the different ink quantity concentration values input by a user and the size of the ink quantity generating template, comparing the threshold matrix with the input concentration value to generate the ink quantity template with the corresponding size; s3: ink dot size mixing and generating: in the step S2, mixing ink points with different sizes according to the concentration; in the concentration variation range of 0-100%, the method can reduce random noise and worm effect of images through a threshold matrix generated by a blank/aggregation algorithm, and achieve the effect of uniform random distribution of mixed ink points; the threshold matrix is generated and stored in advance, and the matrix can be directly called to work during actual production without the need of performing matrix generation operation again.

Description

Method, apparatus and storage medium for generating data of different density ink amounts
Technical Field
The invention relates to the technical field of printing, in particular to a method, equipment and a storage medium for generating data of different concentration ink quantities.
Background
The basic principle of inkjet printers is to generate ink droplets of a certain size and to eject the ink droplets onto a given location on the surface of a substrate using an inkjet head. The smaller the ink drop, the clearer the printed picture, however, the ink jet printer has a problem in that it takes a certain time for the liquid ink to dry. If the amount of ink droplets ejected onto the paper is too large, the paper cannot quickly fix and absorb the ink droplets, which may cause the ink droplets to flow, spread or penetrate on the paper, resulting in an ink piling phenomenon. This can obscure the printed image, degrade contrast, and even distort the paper.
The existing digital ink quantity template generation method comprises the following steps: random dithering, error diffusion and iteration methods, wherein random dithering and error diffusion can generate random noise, cracking and worm effects with different degrees under the condition of different ink concentrations, and have larger influence on printing effects, especially on the generation of templates with uniform colors applied to the whole graph, wherein the effect graphs generated by the random dithering and error diffusion at different concentrations of 0-100% are shown in fig. 4 and 5; the ink quantity template generated by the iterative method has better effect than the former two algorithms, but has large calculated quantity and high complexity, and cannot be used for real-time requirements in actual production.
Disclosure of Invention
The invention aims to provide a method, equipment and a storage medium for generating data of different concentration ink quantities, which can realize accurate ink point control, meet specific printing requirements and improve printing effect and optimization of ink quantity by generating ink quantity templates with different concentration ink quantities for controlling distribution of ink points in printing output.
The aim of the invention can be achieved by the following technical scheme:
embodiments of the present application provide a method for generating data for different concentration ink amounts, comprising the steps of:
s1: creating a threshold template: generating a threshold matrix according to a blank/aggregation method, and storing the threshold matrix in a local place;
s2: ink quantity template generation: the threshold matrix generated in the step S1 is needed to be imported, and then the ink quantity template with corresponding size is generated by comparing the threshold matrix with the input concentration value according to the different ink quantity concentration values input by a user and the size of the ink quantity template;
s3: ink dot size mixing and generating: according to the requirement, in the step S2, ink points with different sizes are mixed according to the concentration, so that the effect of generating the ink quantity template is better.
Preferably, the method for generating the threshold matrix according to step S1 includes the following steps:
s11: randomly generating an initial binary image: generating a null matrix with a specific size, setting 1 at any position of the null matrix by using a random seed, stopping generating after the number of the generated 1 is more than 10% of the size of the null matrix, and generating an initial binary image;
s12: the maximum connected region centroid exchange iteration is carried out, the maximum connected regions of 0 and 1 of the initialized binary image are found, the centroid of the maximum connected region (namely the centroid of the ink dot group) is calculated, the position exchange is carried out after the centroid positions of the two maximum connected regions are found, the iteration is carried out until the maximum region quality is not generated any more, and a prototype binary image is generated;
s13: sequentially assigning values and exchanging centroid positions, finding out the centroid of the maximum/minimum connected region by using the binary layout of the prototype binary image, sequentially assigning values to the region corresponding to the threshold matrix, and simultaneously carrying out region centroid position exchanging operation on the prototype binary image until half pixels of the binary image are 1, and entering the next step;
s14: the region mark exchange and the continuous position exchange are carried out, the position exchange is carried out on the mass center of the maximum/minimum connected region by exchanging 0\1 region marks of the prototype binary image until the value of the sequential assignment is as large as the size of the threshold matrix, and the iteration is stopped;
s15: and generating and storing a threshold matrix, and finally generating a threshold template after processing, wherein the threshold template is used for the subsequent ink quantity template generation process and is stored locally.
Preferably, a null matrix with a specific number of rows and columns is created according to the generation of a null matrix with a specific size in step S11, and all elements are initialized to 0; determining a starting point of random number generation by selecting a random seed, traversing each position of the empty matrix, comparing the generated random number with a preset threshold value, and setting the element value of the corresponding position to be 1 if the random number is smaller than the threshold value; counting the number of 1 s generated, and stopping generation when the number exceeds 10% of the size of the empty matrix.
Preferably, the centroid of the maximum communication area according to step S12 is calculated as follows:
setting a two-dimensional region containing N pixel points (xi, yi), i=1, 2, & gt, N;
calculating the center of gravity position of the region, i.e., center of mass (xc, yc):
xc=(Σ(xi))/N;
yc=(Σ(yi))/N;
wherein, sigma represents summation operation, and the formulas respectively represent the x coordinate and the y coordinate of the center of gravity by dividing the accumulated x coordinate and y coordinate of all the pixel points by the number of the pixel points; the centroid position (xc, yc) of the region is obtained, which represents the centroid position of the entire region.
Preferably, the method for generating the ink quantity template according to the step S2 includes the steps of:
s21: importing a threshold matrix produced in the previous step;
s22: generating a blank matrix with a corresponding size according to the size of the ink quantity template input by a user, comparing the input color concentration with the corresponding position of the threshold matrix, and assigning a value to the position of the corresponding ink quantity template by the compared value;
s23: according to the mode of selecting the mixed ink dot size by a user, the ink dot types under different ink amount concentrations are different;
s24: comparing the threshold values, and if the size of the ink quantity template set by the user is larger than that of the threshold value matrix, performing sliding window assignment by using the threshold value matrix;
s25: and generating an ink quantity template, generating an ink quantity template matrix after the steps, and outputting the ink quantity template matrix to the PRN file for subsequent printing.
Preferably, the color density input in step S22 is compared with the corresponding position of the threshold matrix, the element in each threshold matrix and the corresponding position in the ink quantity template are corresponding according to the color density value required by the user, the color density input by the user is compared with the element in the corresponding position in the threshold matrix, the corresponding value is given to the corresponding position in the ink quantity template, the assignment method is linear interpolation, the element in the threshold matrix is set to be T, and the color density input by the user is set to be C; linear interpolation calculations are performed between 0 and 1: comparing the magnitude relation of C and T to obtain a scale factor P; the value range of P is [0,1], which indicates the existence degree of ink points; and using P as a weight, and giving the value of the corresponding position in the ink quantity template according to the value of the corresponding position in the threshold matrix.
Preferably, according to the difference of the ink dot types under the different ink quantity concentrations in the step S23, the ink dot type of the empty small dots of the template is contained under the concentration of 0% -30%; the ink dot type of the hollow, small and middle point of the template under the concentration of 30% -60%; the ink dot types of empty, small, medium and large dots are contained in the template under the concentration of 60% -100%.
Preferably, the ink dot type is characterized in that different values are given to corresponding positions in the generated ink quantity template to indicate the existence of ink dots, and for the blank ink dot type, the value of the corresponding position is set to 0 to indicate that no ink dot exists;
for ink dot types of different sizes, such as small dots, medium dots, large dots, etc., the value of the corresponding position is set to a specific numerical value, which indicates that ink dots of corresponding sizes exist.
Preferably, the sliding window size is determined according to the sliding window assignment in step S24, and the size is smaller than or equal to the size of the threshold matrix and is matched with the size of the ink quantity template; setting the initial position of the sliding window on a certain position in the ink quantity template, and selecting the positions such as the upper left corner, the center and the like as initial positions; copying the value of the threshold matrix to the corresponding ink quantity template position in the sliding window range, and copying the value of the threshold matrix to the ink quantity template position by position in a sliding window mode; when the sliding window exceeds the boundary of the ink quantity template, only copying the value inside the sliding window into the ink quantity template, or filling the exceeding part of the sliding window; and after the sliding window is traversed, finishing the sliding window assignment process.
An apparatus for generating data for different concentration ink amounts, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method described above.
A storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method described above.
The beneficial effects of the invention are as follows:
(1) In the concentration variation range of 0-100%, the method can reduce random noise and worm effect of images through a threshold matrix generated by a blank/aggregation algorithm, and achieve the effect of uniform random distribution of mixed ink points;
(2) The generated ink quantity template can be used for controlling ink points in the printing output process, and the injection or the throwing of the ink points is controlled on the printing equipment according to the numerical value of the ink quantity template so as to realize the expected printing effect;
(3) The threshold matrix is generated and stored in advance, and can be directly called to work in actual production without performing matrix generation operation again, so that the working efficiency is several times faster than that of an iteration method, and the real-time working requirement can be met.
Drawings
For a better understanding and implementation, the technical solutions of the present application are described in detail below with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method, apparatus and storage medium for generating data for different concentration ink amounts provided in embodiment 1 of the present application;
FIG. 2 is a flowchart of a method, apparatus and storage medium threshold matrix generation method for generating data of different ink density amounts according to embodiment 1 of the present application;
FIG. 3 is a flow chart of a method, apparatus and method for generating ink quantity templates for storage media for generating data of different concentration ink quantities according to embodiment 1 of the present application;
FIG. 4 is a graph of the effects of using random jitter to generate data at different concentrations of 0-100% for different concentrations of ink for a method, apparatus and storage medium for generating data for different concentrations of ink as provided herein;
FIG. 5 is a graph of the effect of the error diffusion method at different concentrations of 0-100% on a method, apparatus and storage medium for generating data for different concentrations of ink;
fig. 6 is an effect diagram of a method, apparatus and storage medium for generating data of different density ink amounts provided in embodiment 1 of the present application.
Detailed Description
For further explanation of the technical means and effects adopted by the present invention for achieving the intended purpose, exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of methods and systems that are consistent with aspects of the present application, as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
The following detailed description of specific embodiments, features and effects according to the present invention is provided with reference to the accompanying drawings and preferred embodiments.
Example 1
Referring to fig. 1-3, the present embodiment is used to control the distribution and density of ink dots in a printout by generating ink quantity templates having different ink concentration quantities. Therefore, accurate ink point control can be realized, specific printing requirements are met, and printing effect and ink quantity optimization are improved.
The embodiment of the invention provides a method for generating data of different concentration ink amounts, which comprises the following steps:
s1: creating a threshold template: generating a threshold matrix according to a blank/aggregation method, and storing the threshold matrix in a local place;
s2: ink quantity template generation: and (3) leading in the threshold matrix generated in the step (S1), and then according to the different ink quantity concentration values input by a user and the size of the ink quantity generating template, comparing the threshold matrix with the input concentration value to generate the ink quantity template with the corresponding size.
S3: ink dot size mixing and generating: according to the requirement, in the step S2, ink points with different sizes are mixed according to the concentration, so that the effect of generating the ink quantity template is better.
In this embodiment, the method for generating the threshold matrix according to step S1 includes the following steps:
s11: randomly generating an initial binary image: generating a null matrix with a specific size, setting 1 at any position of the null matrix by using a random seed, stopping generating after the number of the generated 1 is more than 10% of the size of the null matrix, and generating an initial binary image;
s12: the maximum connected region centroid exchange iteration is carried out, the maximum connected regions of 0 and 1 of the initialized binary image are found, the centroid of the maximum connected region (namely the centroid of the ink dot group) is calculated, the position exchange is carried out after the centroid positions of the two maximum connected regions are found, the iteration is carried out until the maximum region quality is not generated any more, and a prototype binary image is generated;
the purpose is to gradually adjust the position of the ink dot group by continuously exchanging the position of the center.
S13: sequentially assigning values and exchanging centroid positions, finding out the centroid of the maximum/minimum connected region by using the binary layout of the prototype binary image, sequentially assigning values to the region corresponding to the threshold matrix, and simultaneously carrying out region centroid position exchanging operation on the prototype binary image until half pixels of the binary image are 1, and entering the next step;
the purpose of this step is to make the distribution of the ink dots in the threshold template more uniform by constantly adjusting the positions of the ink dot groups.
S14: the region mark exchange and the continuous position exchange are carried out, the position exchange is carried out on the mass center of the maximum/minimum connected region by exchanging 0\1 region marks of the prototype binary image until the value of the sequential assignment is as large as the size of the threshold matrix, and the iteration is stopped;
this process will further improve the uniformity of the ink dots in the threshold template.
S15: and generating and storing a threshold matrix, and finally generating a threshold template after processing, wherein the threshold template is used for a subsequent ink quantity template generation process and is stored locally for a subsequent production flow to be used for a subsequent use.
The blank/aggregation method adjusts the positions of the ink dot groups through iterative processing of the initial binary image, so that the ink dots in the threshold template can be distributed more uniformly. This helps to achieve accurate control and optimization of ink quantity at the time of printout
In this embodiment, according to the generation of the null matrix with a specific size in step S11, a null matrix with a specific number of rows and columns is created, and all elements are initialized to 0; determining a starting point of random number generation by selecting a random seed, traversing each position of the empty matrix, comparing the generated random number with a preset threshold value, and setting the element value of the corresponding position to be 1 if the random number is smaller than the threshold value; counting the number of 1 s generated, and stopping generation when the number exceeds 10% of the size of the empty matrix.
Setting that we are to generate a 5x5 empty matrix and an initial binary pattern:
generating a null matrix:
the empty matrix = [ [0, 0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]]
random seed setting 1 was used: setting random seeds as (2, 3), and selecting random positions (2, 3) in the empty matrix to be set as 1.
Initial binary pattern = [ [0, 0],
[0,0,0,0,0],
[0,0,0,1,0],
[0,0,0,0,0],
[0,0,0,0,0]]
the number of 1 s in the initial binary image generated is not necessarily exactly equal to 10% of the size of the empty matrix, but the generation is stopped after exceeding the ratio. Therefore, a certain number of randomly distributed 1 can be generated in the initial binary image so as to meet the requirements of subsequent processing and application, and the random noise and worm effect of the image can be reduced through a threshold matrix generated by a blank/aggregation algorithm, so that the effect of uniform random distribution of mixed ink points is achieved.
In this embodiment, the centroid of the maximum communication area according to step S12 is calculated as follows:
setting a two-dimensional region containing N pixel points (xi, yi), i=1, 2, & gt, N;
calculating the center of gravity position of the region, i.e., center of mass (xc, yc):
xc=(Σ(xi))/N;
yc=(Σ(yi))/N;
the sum is represented by Σ, and the formula respectively represents that the x-coordinate and the y-coordinate of all the pixel points are accumulated and divided by the number of the pixel points to obtain the x-coordinate and the y-coordinate of the center of gravity.
The centroid position (xc, yc) of the region is obtained, which represents the centroid position of the entire region.
In this embodiment, the method for generating an ink quantity template according to step S2 includes the steps of:
s21: importing a threshold matrix produced in the previous step;
s22: generating a blank matrix with a corresponding size according to the size of the ink quantity template input by a user, comparing the input color concentration with the corresponding position of the threshold matrix, and assigning a value to the position of the corresponding ink quantity template by the compared value;
in the generated ink amount template, different values are assigned to the respective positions according to the comparison result of the density input by the user and the threshold matrix to indicate the presence or absence of ink dots.
S23: according to the mode of selecting the mixed ink dot size by a user, the ink dot types under different ink amount concentrations are different;
different types and sizes of ink dots are specified in the ink quantity template according to the ink dot size pattern and different density ranges selected by the user.
S24: comparing the threshold values, and if the size of the ink quantity template set by the user is larger than that of the threshold value matrix, performing sliding window assignment by using the threshold value matrix;
in the generated ink quantity template, if the user-set size is larger than the threshold matrix, a sliding window assignment is performed using the threshold matrix to fill in the additional locations.
S25: and generating an ink quantity template, generating an ink quantity template matrix after the steps, and outputting the ink quantity template matrix to the PRN file for subsequent printing.
The steps work together to generate a final ink quantity template matrix to achieve the desired print effect and ink quantity control, wherein a resulting effect graph of varying concentrations of 0-100% using the present dispensing implementation is shown in fig. 6.
In this embodiment, the color density input in step S22 is compared with the corresponding positions of the threshold matrices, the elements in each threshold matrix and the positions in the corresponding ink quantity templates are corresponding to the color density value required by the user, the color density input by the user is compared with the elements in the corresponding positions in the threshold matrix, the corresponding values are given to the corresponding positions in the ink quantity templates, the assignment method includes threshold comparison and linear interpolation,
in the embodiment, linear interpolation is used, an element in a threshold matrix is set to be T, and the color concentration input by a user is set to be C; linear interpolation calculations are performed between 0 and 1: comparing the magnitude relation of C and T to obtain a scale factor P; the value range of P is [0,1], which indicates the existence degree of ink points; and using P as a weight, and giving the value of the corresponding position in the ink quantity template according to the value of the corresponding position in the threshold matrix. For example, if P is 0.5, the value of the corresponding position in the ink quantity template is assigned to 0.5, indicating that half of the ink dots are present.
In this embodiment, according to the difference of the ink dot types under the different ink amount concentrations in step S23, the ink dot types of the small dots with the empty template under the concentration of 0% -30%; the ink dot type of the hollow, small and middle point of the template under the concentration of 30% -60%; the ink dot types of empty, small, medium and large dots are contained in the template under the concentration of 60% -100%.
In this embodiment, the ink dot type, where different values are given to corresponding positions in the generated ink amount template to indicate the existence of ink dots, and for a blank ink dot type, the value of the corresponding position is set to 0 to indicate that no ink dot exists;
for ink dot types of different sizes, such as small dots, medium dots, large dots, etc., the value of the corresponding position is set to a specific numerical value, which indicates that ink dots of corresponding sizes exist.
And mixing ink points with different sizes in the generated ink quantity template, and assigning different values to corresponding positions according to the comparison result of the concentration value input by a user and the threshold value matrix to represent the existence of the ink points. Therefore, the actual printing requirements can be better reflected, and the effect of generating the ink quantity template is improved.
In this embodiment, the sliding window size is determined according to the sliding window assignment described in step S24, for example, a sliding window size of 4x4 may be selected, which indicates that the width and the height of the sliding window are both 4 pixels. The size is smaller than or equal to the size of the threshold matrix and is matched with the size of the ink quantity template; setting the initial position of the sliding window at a certain position in the ink quantity template, and selecting the positions such as the upper left corner, the center and the like as the initial position; copying the values of the threshold matrix to corresponding ink level template positions within the sliding window, so that the values of the threshold matrix can be copied to the ink level template position by sliding the sliding window, wherein the values can be binary (0 or 1) or continuous gray values; when the sliding window exceeds the boundary of the ink quantity template, boundary conditions need to be processed according to a specific strategy, and a common strategy is to cut out the exceeding part of the sliding window and copy the value inside the sliding window into the ink quantity template; another strategy is to fill out the excess portion of the sliding window, optionally with a specific fill value (e.g. 0) or values from the threshold matrix for the corresponding position. To adapt it to the size of the ink metering die plate; and after the sliding window is traversed, finishing the sliding window assignment process. At this point, the ink level template has been populated with values of the threshold matrix and retains the overall structure and characteristics.
An apparatus for generating data for different concentration ink amounts, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method described above.
A storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method described above.
Example 2
Unlike step S3 of embodiment 1, this embodiment generates data of different ink amounts according to the density values, in which the dot density is used to control the distribution density of the dots, and the randomness can be such that the generated dots have a certain randomness and diversity.
In this embodiment, a random decision is made on whether or not ink dots are present at each pixel position based on the density of ink dots. Specifically, by generating a random number between 0 and 1, if the random number is smaller than the dot density, the dot is set to exist at the corresponding position; otherwise, no ink point is set;
and adjusting the distribution rule of the ink points according to actual requirements. For example, if a more uniform distribution of ink dots across the image is desired, a higher ink dot density threshold may be used so that ink dots are generated at more pixel locations; conversely, if it is desired that the ink dots exhibit a more sparse distribution, a lower ink dot density threshold may be used; the method comprises the following specific steps:
the dot density is defined, first, the dot densities at different densities are defined. The dot density represents the number of dots per unit area, and the formula is expressed as dot density=dot number/area;
ink dots are generated based on the density, and mapped to corresponding ink dot density values according to the density values input by the user. This may be achieved by a function or a mapping table. For example, the concentration value may be converted to a dot density value using a linear relationship, an exponential function, or a custom mapping rule. The specific conversion method can be adjusted according to actual requirements and experience;
and randomly distributing ink points according to the ink point density, and randomly deciding whether the ink points exist or not at each pixel position according to the ink point density in the generated ink quantity template. For example, a random number between 0 and 1 may be generated using a random number generator, and if the random number is less than the dot density, the dot is set to exist at the corresponding position, otherwise, the dot is not set. This allows a random distribution of ink dots on the image.
The present invention is not limited to the above embodiments, but is capable of modification and variation in detail, and other modifications and variations can be made by those skilled in the art without departing from the scope of the present invention.

Claims (10)

1. A method for generating data for different concentration ink amounts, characterized by: the method comprises the following steps:
s1: creating a threshold template: generating a threshold matrix according to a blank/aggregation method, and storing the threshold matrix in a local place;
s2: ink quantity template generation: the threshold matrix generated in the step S1 is needed to be imported, and then the ink quantity template with corresponding size is generated by comparing the threshold matrix with the input concentration value according to the different ink quantity concentration values input by a user and the size of the ink quantity template;
s3: ink dot size mixing and generating: according to the requirement, in the step S2, ink points with different sizes are mixed according to the concentration, so that the effect of generating the ink quantity template is better.
2. A method, apparatus and storage medium for generating data for different concentration ink amounts according to claim 1, characterized in that: the method for generating the threshold matrix according to the step S1 comprises the following steps:
s11: randomly generating an initial binary image: generating a null matrix with a specific size, setting 1 at any position of the null matrix by using a random seed, stopping generating after the number of the generated 1 is more than 10% of the size of the null matrix, and generating an initial binary image;
s12: the maximum connected region centroid exchange iteration is carried out, the maximum connected regions of 0 and 1 of the initialized binary image are found, the centroid of the maximum connected region (namely the centroid of the ink dot group) is calculated, the position exchange is carried out after the centroid positions of the two maximum connected regions are found, the iteration is carried out until the maximum region quality is not generated any more, and a prototype binary image is generated;
s13: sequentially assigning values and exchanging centroid positions, finding out the centroid of the maximum/minimum connected region by using the binary layout of the prototype binary image, sequentially assigning values to the region corresponding to the threshold matrix, and simultaneously carrying out region centroid position exchanging operation on the prototype binary image until half pixels of the binary image are 1, and entering the next step;
s14: the region mark exchange and the continuous position exchange are carried out, the position exchange is carried out on the mass center of the maximum/minimum connected region by exchanging 0\1 region marks of the prototype binary image until the value of the sequential assignment is as large as the size of the threshold matrix, and the iteration is stopped;
s15: and generating and storing a threshold matrix, and finally generating a threshold template after processing, wherein the threshold template is used for the subsequent ink quantity template generation process and is stored locally.
3. A method for generating data for different concentration ink amounts according to claim 2, characterized in that: creating a null matrix with specific row number and column number according to the generated null matrix with specific size in the step S11, and initializing all elements to 0; determining a starting point of random number generation by selecting a random seed, traversing each position of the empty matrix, comparing the generated random number with a preset threshold value, and setting the element value of the corresponding position to be 1 if the random number is smaller than the threshold value; counting the number of 1 s generated, and stopping generation when the number exceeds 10% of the size of the empty matrix.
4. A method for generating data for different concentration ink amounts according to claim 2, characterized in that: the centroid of the maximum communication area according to step S12 is calculated as follows:
setting a two-dimensional region containing N pixel points (xi, yi), i=1, 2, & gt, N;
calculating the center of gravity position of the region, i.e., center of mass (xc, yc):
xc=(Σ(xi))/N;
yc=(Σ(yi))/N;
wherein, sigma represents summation operation, and the formulas respectively represent the x coordinate and the y coordinate of the center of gravity by dividing the accumulated x coordinate and y coordinate of all the pixel points by the number of the pixel points; the centroid position (xc, yc) of the region is obtained, which represents the centroid position of the entire region.
5. A method for generating data for different concentration ink amounts according to claim 1, characterized in that: the method of ink quantity template generation according to step S2, comprising the steps of:
s21: importing a threshold matrix produced in the previous step;
s22: generating a blank matrix with a corresponding size according to the size of the ink quantity template input by a user, comparing the input color concentration with the corresponding position of the threshold matrix, and assigning a value to the position of the corresponding ink quantity template by the compared value;
s23: according to the mode of selecting the mixed ink dot size by a user, the ink dot types under different ink amount concentrations are different;
s24: comparing the threshold values, and if the size of the ink quantity template set by the user is larger than that of the threshold value matrix, performing sliding window assignment by using the threshold value matrix;
s25: and generating an ink quantity template, generating an ink quantity template matrix after the steps, and outputting the ink quantity template matrix to the PRN file for subsequent printing.
6. A method for generating data for different concentration ink amounts according to claim 5, characterized in that: comparing the input color concentration with the corresponding positions of the threshold matrixes according to the color concentration value required by the user, corresponding to the element in each threshold matrix and the corresponding position in the ink quantity template, comparing the color concentration input by the user with the element in the corresponding position in the threshold matrix, endowing the corresponding value to the corresponding position in the ink quantity template, setting the element in the threshold matrix as T and the color concentration input by the user as C by using a linear interpolation method; linear interpolation calculations are performed between 0 and 1: comparing the magnitude relation of C and T to obtain a scale factor P; the value range of P is [0,1], which indicates the existence degree of ink points; and using P as a weight, and giving the value of the corresponding position in the ink quantity template according to the value of the corresponding position in the threshold matrix.
7. A method for generating data for different concentration ink amounts according to claim 5, characterized in that: according to different ink dot types under different ink quantity concentrations in the step S23, the ink dot types of small dots with empty templates under the concentration of 0% -30%; the ink dot type of the hollow, small and middle point of the template under the concentration of 30% -60%; the ink dot types of empty, small, medium and large dots are contained in the template under the concentration of 60% -100%; the ink dot type is characterized in that different values are given to corresponding positions in the generated ink quantity template to represent the existence of ink dots, and for the blank ink dot type, the value of the corresponding position is set to 0 to represent the absence of ink dots; for ink dot types of different sizes, such as small dots, medium dots, large dots, etc., the value of the corresponding position is set to a specific numerical value, which indicates that ink dots of corresponding sizes exist.
8. A method for generating data for different concentration ink amounts according to claim 5, characterized in that: determining a sliding window size according to the sliding window assignment of step S24, the size being smaller than or equal to the size of the threshold matrix and matching the size of the ink metering template; setting the initial position of the sliding window on a certain position in the ink quantity template, and selecting the positions such as the upper left corner, the center and the like as initial positions; copying the value of the threshold matrix to the corresponding ink quantity template position in the sliding window range, and copying the value of the threshold matrix to the ink quantity template position by position in a sliding window mode; when the sliding window exceeds the boundary of the ink quantity template, only copying the value inside the sliding window into the ink quantity template, or filling the exceeding part of the sliding window; and after the sliding window is traversed, finishing the sliding window assignment process.
9. An apparatus for generating data for different concentration ink amounts, characterized by: comprising the following steps: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of any one of claims 1-8.
10. A storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1-8.
CN202311444509.0A 2023-11-01 2023-11-01 Method, apparatus and storage medium for generating data of different density ink amounts Active CN117369744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311444509.0A CN117369744B (en) 2023-11-01 2023-11-01 Method, apparatus and storage medium for generating data of different density ink amounts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311444509.0A CN117369744B (en) 2023-11-01 2023-11-01 Method, apparatus and storage medium for generating data of different density ink amounts

Publications (2)

Publication Number Publication Date
CN117369744A true CN117369744A (en) 2024-01-09
CN117369744B CN117369744B (en) 2024-08-06

Family

ID=89398210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311444509.0A Active CN117369744B (en) 2023-11-01 2023-11-01 Method, apparatus and storage medium for generating data of different density ink amounts

Country Status (1)

Country Link
CN (1) CN117369744B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934780A (en) * 2017-03-15 2017-07-07 中山大学 A kind of automatic watermark minimizing technology based on image repair
US20220035577A1 (en) * 2020-07-29 2022-02-03 Canon Kabushiki Kaisha Threshold matrix generating method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934780A (en) * 2017-03-15 2017-07-07 中山大学 A kind of automatic watermark minimizing technology based on image repair
US20220035577A1 (en) * 2020-07-29 2022-02-03 Canon Kabushiki Kaisha Threshold matrix generating method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘艳鹤;苏海;: "随机中心聚集半色调算法", 包装工程, vol. 38, no. 21, 10 November 2017 (2017-11-10), pages 199 - 203 *

Also Published As

Publication number Publication date
CN117369744B (en) 2024-08-06

Similar Documents

Publication Publication Date Title
JP6927344B2 (en) Ink deposition uniformity compensation mechanism
JP6218440B2 (en) Data processing apparatus and recording data generation method
US11637946B2 (en) Iterative uniformity compensation mechanism
CN101432141B (en) Image data generation device, image recording device, and image data generation method
EP1157840A2 (en) Defective nozzle compensation
US11778123B2 (en) Artifact compensation mechanism
JP2012232551A (en) Recording device and method
US7821672B2 (en) Image recording method and image recording apparatus
US11783150B2 (en) Artifact compensation mechanism
JP2003039713A (en) Method for correcting input digital image
US9955041B2 (en) System and method for tone reproduction curve color resolution enhancement in a three-dimensional object printer
AU2002227320B2 (en) Mask generator and image mask patterns
CN117369744B (en) Method, apparatus and storage medium for generating data of different density ink amounts
US6441922B1 (en) Reduction of banding in incremental printing, through selection among colorimetric equivalents
AU2002227320A1 (en) Mask generator and image mask patterns
US9327535B2 (en) Print masks for multiple pass print modes
CN102205706A (en) Image processor, image processing method and image printing method
US20240007578A1 (en) Greyscale images
US20060103689A1 (en) Method for splitting a print image data plane for printing with multiple printheads
US11956402B2 (en) Halftone screens
US8649060B2 (en) Method of halftoning for asymmetric print resolutions and a printer
JP2008290324A (en) Threshold value matrix formation method, image data formation method, image data formation apparatus, printer and threshold value matrix
US6995863B1 (en) Discretionary dotting for artifact control in incremental printing
EP1122943A9 (en) Continuous tone reproduction using improved ink jet droplet dispersion techniques
US9007651B2 (en) Threshold matrix generation method, image data generation method, image data generation apparatus, image recording apparatus, and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant