CN116954529A - Print color definition optimization method, device, storage medium and computer equipment - Google Patents

Print color definition optimization method, device, storage medium and computer equipment Download PDF

Info

Publication number
CN116954529A
CN116954529A CN202311168113.8A CN202311168113A CN116954529A CN 116954529 A CN116954529 A CN 116954529A CN 202311168113 A CN202311168113 A CN 202311168113A CN 116954529 A CN116954529 A CN 116954529A
Authority
CN
China
Prior art keywords
value
color
printing
contrast
target printer
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
CN202311168113.8A
Other languages
Chinese (zh)
Other versions
CN116954529B (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.)
Zwcad Software Co ltd
Original Assignee
Zwcad Software 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 Zwcad Software Co ltd filed Critical Zwcad Software Co ltd
Priority to CN202311168113.8A priority Critical patent/CN116954529B/en
Publication of CN116954529A publication Critical patent/CN116954529A/en
Application granted granted Critical
Publication of CN116954529B publication Critical patent/CN116954529B/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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The application provides a printing color definition optimization method, a printing color definition optimization device, a storage medium and computer equipment. The method comprises the following steps: determining a target printer in response to the print instruction; obtaining a contrast threshold value and a K value adjustment quantity matched with a target printer; calculating the contrast between the background color in the printing area and the color of the printing object; the printing object is a text or a graphic primitive; if the contrast is not greater than the contrast threshold, judging whether the K value of the background color is smaller than a preset threshold; if the K value of the background color is smaller than the preset threshold value, increasing the K value of the printing object according to the K value adjustment quantity; if the K value of the background color is not smaller than the preset threshold value, reducing the K value of the printing object according to the K value adjustment quantity; and printing the printing area based on the adjusted color parameters. According to the application, under the scene with low requirement on color precision, the optimization of color definition can be automatically carried out aiming at the selected printer, and the printing effect is ensured.

Description

Print color definition optimization method, device, storage medium and computer equipment
Technical Field
The present application relates to the field of printing technologies, and in particular, to a method and apparatus for optimizing print color definition, a storage medium, and a computer device.
Background
With the development of technology, printer technology is also continuously upgraded, and the development of the technology from the early stage of realizing black-and-white printing to the current color printing technology is only realized.
When printing, the color displayed in the software is affected by the performance of the printer, the printed effect may not clearly display the printing object, for example, the printing object with a light color in the printing area with a dark background can be clearly displayed on the display interface, and after printing on the printing paper, the printing object may not be clearly seen. For this case, color adjustment of the print area needs to be performed manually, but the adjustment of color is not easy for most users to operate.
Disclosure of Invention
The embodiment of the application provides a printing color definition optimization method, a printing color definition optimization device, a storage medium and computer equipment, which can automatically optimize color definition aiming at a selected printer in a scene with low color precision requirements, and ensure a printing effect.
In a first aspect, the present application provides a method of print color definition optimization, the method comprising:
determining a target printer in response to the print instruction;
obtaining a contrast threshold and a K value adjustment quantity matched with the target printer;
Calculating the contrast between the background color in the printing area and the color of the printing object; the printing object is a text or a graphic primitive;
if the contrast is not greater than the contrast threshold, judging whether the K value of the background color is smaller than a preset threshold;
if the K value of the background color is smaller than a preset threshold value, increasing the K value of the printing object according to the K value adjustment quantity;
if the K value of the background color is not smaller than a preset threshold value, reducing the K value of the printing object according to the K value adjustment quantity;
and printing the printing area based on the adjusted color parameters.
In one embodiment, before performing the step of determining whether the K value of the background color is less than a preset threshold, the method further includes:
if the color mode adopted by the background color and the printing object in the printing area is a non-CMYK color mode, the primary color mode of the background color and the printing object is converted into a CMYK color mode.
In one embodiment, the contrast threshold is in positive correlation with the DPI value and the color number of the printer;
the K value adjustment quantity is in negative correlation with DPI value and color digit of the printer.
In one embodiment, the obtaining the contrast threshold and the K-value adjustment amount that match the target printer includes:
Obtaining the brand and model of the target printer;
and inquiring contrast threshold values and K value adjustment amounts corresponding to the brands and the models of the target printers based on a preset configuration table.
In one embodiment, the obtaining the contrast threshold and the K-value adjustment amount that match the target printer further includes:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, requesting a server to acquire a shared configuration table;
and inquiring contrast threshold and K value adjustment quantity corresponding to the brand and model of the target printer based on the sharing configuration table.
In one embodiment, the obtaining the contrast threshold and the K-value adjustment amount that match the target printer further includes:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, acquiring the DPI value and the color digit of the target printer;
and performing interpolation calculation based on the DPI value and the color digit of the target printer, and the contrast threshold value and the K value adjustment quantity of each group in the configuration table and the DPI value and the color digit of the printer corresponding to the DPI value and the K value adjustment quantity of each group in the configuration table to obtain the contrast threshold value and the K value adjustment quantity corresponding to the target printer.
In one embodiment, after the printing of the printing area based on the adjusted color parameters is performed, the method further includes:
generating a feedback acquisition request;
responding to a feedback result input by a user based on the feedback acquisition request, and analyzing the feedback result;
and if the printing effect meets the requirement according to the feedback result, and the contrast threshold value and the K value adjustment quantity of the target printer are not stored in the configuration table, storing the contrast threshold value and the K value adjustment quantity of the target printer in the configuration table.
In one embodiment, after the printing of the printing area based on the adjusted color parameters is performed, the method further includes:
if the printing effect is judged to be not met according to the feedback result, displaying a manual parameter adjustment interface;
responding to a parameter adjustment instruction input by a user through the manual parameter adjustment interface, and adjusting the K value of the printing object;
printing the printing area based on the color parameters after the K value is adjusted;
and updating the K value adjustment quantity corresponding to the target printer according to the adjusted K value.
In one embodiment, the method further comprises:
If the configuration table is updated, uploading the updated configuration table to a server; and the server is used for updating the shared configuration table stored in the server according to the updated configuration table.
In one embodiment, the obtaining the contrast threshold and the K-value adjustment amount that match the target printer includes:
determining a printing color mode according to the printing instruction; the printing color mode comprises a black-and-white mode and a color mode;
acquiring a contrast threshold and a K value adjustment amount matched with the printer parameters in the printing color mode;
wherein, the contrast threshold corresponding to the black-and-white mode is smaller than the contrast threshold corresponding to the color mode; the K value adjustment amount corresponding to the black-and-white mode is larger than the K value adjustment amount corresponding to the color mode.
In a second aspect, the present application also provides a print color definition optimizing apparatus, including:
the first response module is used for responding to the printing instruction and determining a target printer;
the parameter acquisition module is used for acquiring a contrast threshold value and a K value adjustment quantity matched with the target printer;
a contrast calculating module for calculating a contrast between a background color in the printing area and a color of the printing object; the printing object is a text or a graphic primitive;
The judging module is used for judging whether the K value of the background color is smaller than a preset threshold value or not when the contrast is not larger than the contrast threshold value;
the first adjusting module is used for increasing the K value of the printing object according to the K value adjusting quantity when the K value of the background color is smaller than a preset threshold value;
the second adjusting module is used for reducing the K value of the printing object according to the K value adjusting quantity when the K value of the background color is not smaller than a preset threshold value;
and the first printing module is used for printing the printing area based on the adjusted color parameters.
In a third aspect, the present application provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of a print color sharpness optimization method according to any of the embodiments described above.
In a fourth aspect, the present application provides a computer device comprising: one or more processors, and memory;
the memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the print color sharpness optimization method according to any of the embodiments described above.
From the above technical solutions, the embodiment of the present application has the following advantages:
according to the printing color definition optimization method, device, storage medium and computer equipment, when a printing instruction is received, a target printer selected by the printing is determined, the contrast threshold and the K value adjustment quantity matched with the target printer are obtained, whether a printing object in a printing area needs to be color-adjusted or not is judged based on the contrast threshold, if the contrast between the background color and the color of the printing object is not larger than the contrast threshold, the K value of the printing object is adjusted according to the K value of the background color and the size relation of the preset threshold, printing is performed based on the adjusted color parameters, automatic optimization of color definition can be performed for different printers, the printed printing object can be clearly identified, the limitation of color adjustment is carried out through the K value adjustment quantity, manual adjustment of a user is not needed, and the situation of excessive color difference after adjustment can be avoided.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of a print color definition optimization method according to one embodiment;
FIG. 2 is a flowchart illustrating steps for obtaining a contrast threshold and a K value adjustment amount that match a target printer according to one embodiment;
FIG. 3 is a flow chart of a print color definition optimization method according to another embodiment;
FIG. 4 is a flowchart illustrating a step of obtaining a contrast threshold and a K value adjustment amount matching a target printer according to another embodiment;
FIG. 5 is a block diagram showing a configuration of a print color definition optimizing apparatus in one embodiment;
FIG. 6 is an internal block diagram of a computer device, in one embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The printing color definition optimization method is applied to an application scene with lower requirements on color precision, wherein the application scene is printed by computer equipment through a printer, and after triggering printing, color automatic adjustment is performed on a printing object with lower printing definition possibly occurring in a printing area according to a contrast threshold value and a K value adjustment quantity matched with a selected target printer so as to optimize definition after printing content. The low print definition in the embodiment of the present application refers to a situation in which the print object cannot be clearly seen due to a low contrast between the print object and the print paper. The scene with lower color precision requirement refers to a scene which can accept relatively larger color difference for the printed color and does not require high-precision restoration of the true color of a printed area, for example, in a drawing scene, characters with different colors are used for distinguishing different labeling contents, and the scene with lower color precision is exemplified by that the size labeling adopts one color and the numbering adopts another color, and the color difference is only used for distinguishing the type difference of the labeling contents and does not require true restoration color.
As shown in fig. 1, an embodiment of the present application provides a print color definition optimization method, which includes steps S101 to S107, wherein:
step S101, in response to the print instruction, the target printer is determined.
The print instructions are instructions initiated by the user in the computer device for instructing the computer device to print the selected print area through the target printer.
Step S102, a contrast threshold and a K-value adjustment amount matching the target printer are acquired.
The contrast threshold and the K value adjustment amount are determined according to the performance parameters of the target printer, the contrast threshold is used as a judging threshold for evaluating whether the printing object needs to be subjected to color adjustment, and the K value adjustment amount is used as the adjustment amount of the printing object when the printing object needs to be subjected to color adjustment. The K value in the application is the K value of the printing object and the background color corresponding to the CMYK color mode, and the K value is a parameter for representing black.
In one embodiment, if the color mode adopted by the background color and the print object in the print area is a non-CMYK color mode, the primary color mode of the background color and the print object is converted into a CMYK color mode.
In the present application, if the judgment and adjustment of the K value are involved, and the background color or primary color in the printing area is not the CMYK color mode, for example, the color mode such as RGB, HSB, HSL, the primary color mode is correspondingly converted into the CMYK color mode before the judgment or adjustment is performed.
In one embodiment, the contrast threshold and the K-value adjustment amount may be preset for different printers, or may be calculated according to the performance parameters of the target printer.
Step S103, a contrast between the background color and the color of the print object in the print area is calculated.
Wherein the printing object is a text or a graphic primitive. The print area may include one or more print objects, and in the embodiment of the present application, a single print object is described as an example, and if there are a plurality of print objects, print color definition optimization is performed for each print object.
Where contrast= (l1+0.05)/(l2+0.05), L1 is the relative luminance of the background color, and L2 is the relative luminance of the printing object color.
Relative brightness l=0.2126×r+0.7152g+0.0722b
R, G, B are as follows:
if XSRGB is less than or equal to 0.03928
X=xsrgb/12.92:
otherwise x= ((xsrgb+0.055)/1.055)/(2.4)
XSRGB refers herein to RSRGB, GSRGB or BSRGB, and the values are calculated as follows:
xsrgb=x 8bit/255, where X8bit refers to the value of R, G, B lanes each at 8 bits/lane [0-255 ].
Step S104, if the contrast is not greater than the contrast threshold, judging whether the K value of the background color is smaller than the preset threshold.
If the contrast between the background color and the color of the printing object is larger than the contrast threshold value, the definition of the printing effect on the printing paper meets the requirement, and color adjustment is not needed; if the color of the print target is smaller than the contrast threshold, the print effect on the print paper is not clear, and the color of the print target needs to be adjusted. The preset threshold is a judgment standard for judging whether the background color is a dark background or a light background, and if the K value of the background color is smaller than the preset threshold, the background color is indicated to be the dark background; and otherwise, the background is light.
Step S105, if the K value of the background color is smaller than the preset threshold, increasing the K value of the printing object according to the K value adjustment amount.
Step S106, if the K value of the background color is not less than the preset threshold value, the K value of the printing object is reduced according to the K value adjustment amount.
When the adjustment is determined to be needed, the K value adjustment mode of the printing object needs to be judged by combining the displayed background color. If the background color is a dark background and the contrast is not greater than the contrast threshold, the color contrast between the background color and the printing paper is greater, and the K value of the printing object needs to be reduced; on the contrary, if the background color is a light background and the contrast is not greater than the contrast threshold, the color contrast between the background color and the printing paper is small, and the K value of the printing object needs to be increased in order to improve the definition on the printing paper.
Step S107, printing is performed on the printing area based on the adjusted color parameters.
The color parameter is CMYK value, and when there are a plurality of print objects, the print is executed after the optimization adjustment of each print object in the print area is completed.
In this embodiment, when a computer device receives a print instruction, it determines a target printer selected by the present print, obtains a contrast threshold and a K value adjustment amount matched with the target printer, determines whether a print object in a print area needs to adjust colors based on the contrast threshold, if the contrast between the background color and the colors of the print object is not greater than the contrast threshold, adjusts the K value of the print object according to the K value adjustment amount and the magnitude relation between the K value of the background color and a preset threshold, performs printing based on the adjusted color parameters, performs automatic optimization of color definition for different printers, ensures that the print object can be clearly identified, and does not need to be manually adjusted by a user due to limitation of the K value adjustment amount, and can avoid the situation of excessive color difference after adjustment.
In one embodiment, the contrast threshold is in positive correlation with the DPI value and the color number of the printer; the K value adjustment quantity is in negative correlation with DPI value and color digit of the printer.
DPI is a measure of the resolution of a printer and is one of the main parameters that measure the accuracy of the printer, and in general, the higher the value of DPI, the higher the accuracy of the printer. The number of color bits is a major parameter affecting the accuracy of color printing, and the higher the number of color bits, the more colors are available, and the more colors are printed to restore the colors for display in the computer device.
Therefore, the higher the DPI value and the color number of the printer, the higher the acceptable contrast between the background color and the printing object is on the premise of ensuring the printing definition, correspondingly, the contrast threshold can be correspondingly improved, and when the color adjustment is required, the K value adjustment amount required to be adjusted can be correspondingly reduced, so that the color difference between the optimally adjusted color and the original color is not excessively large as far as possible. The lower the DPI value and the color number of the printer, the lower the acceptable contrast between the background color and the printing object is on the premise of ensuring the printing definition, the contrast threshold value is also required to be reduced, and when the color adjustment is performed, if the K value adjustment amount is too small, the adjustment effect may be poor, so the K value adjustment amount should be correspondingly increased to ensure the printing definition.
As shown in fig. 2, in one embodiment, the obtaining the contrast threshold and the K-value adjustment amount that match the target printer includes:
Step S201, obtaining the brand and model of a target printer;
step S202, inquiring contrast threshold and K value adjustment corresponding to the brand and model of the target printer based on a preset configuration table.
The DPI value and the color number corresponding to different types of printers under the same brand may also be different, so that the corresponding relation between the printer and the contrast threshold and the K value adjustment amount can be constructed according to the brand and the model.
In this embodiment, a corresponding relationship between the brand and model of the printer and the contrast threshold and the K value adjustment amount is established through a preset configuration table, and when the printing is triggered, the contrast threshold and the K value adjustment amount matched with the target printer are obtained by inquiring in the configuration table according to the brand and model of the target printer, so that the color definition optimization processing adapted to the target printer is realized.
In one embodiment, the obtaining the contrast threshold and the K-value adjustment amount matched to the target printer further includes:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, requesting to acquire a shared configuration table from a server; and inquiring the contrast threshold value and the K value adjustment quantity corresponding to the brand and model of the target printer based on the sharing configuration table.
The shared configuration table is a configuration table stored in the server, and data can be summarized and generated according to the configuration table uploaded or updated by each computer device associated with the server. When the configuration table is queried, it may happen that the currently used target printer does not preset the contrast threshold and the K value adjustment amount in the configuration table, and if the computer device is in a networking state, the server may be requested to acquire the shared configuration table, and the contrast threshold and the K value adjustment amount matched with the target printer are queried in the shared configuration table.
In this embodiment, the preset data can be continuously updated and the data can be shared by storing the shared configuration table in the server, the more complete configuration table is built by commonly maintaining the updated data through multiple nodes, and when the available contrast threshold and K value adjustment amount are not queried locally by any computer device, the parameters in the shared configuration table can be updated locally by querying the shared configuration table, so that data maintenance is not required to be performed for each computer device.
In one embodiment, the method further comprises:
if the configuration table is updated, uploading the updated configuration table to a server; and the server is used for updating the shared configuration table stored in the server according to the updated configuration table.
The configuration table update comprises the new printer and the corresponding contrast threshold value and K value adjustment quantity, and also comprises the modification of the contrast threshold value and/or K value adjustment quantity in the original configuration table. In this embodiment, in order to ensure that the parameters in the shared configuration table are updated, the parameters in the shared configuration table may be continuously optimized, so as to optimize the printing effect, when the local configuration table of any computer device is updated, the updated configuration table is uploaded to the server in the networking state, for the parameters corresponding to the same printer, the server determines whether the data update is required according to the update time of the data in the uploaded configuration table and the update time of the corresponding printer data in the shared configuration table, and if the update time of the data in the shared configuration table is earlier than the update time of the data in the uploaded configuration table, the shared configuration table is updated. For the newly added printer and its corresponding parameters, the server will add directly to the shared configuration table.
In one embodiment, the obtaining the contrast threshold and the K-value adjustment amount matched to the target printer further includes:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, acquiring the DPI value and the color digit of the target printer;
And carrying out interpolation calculation based on the DPI value and the color digit of the target printer, and the contrast threshold value and the K value adjustment quantity of each group in the configuration table and the DPI value and the color digit of the printer corresponding to the DPI value and the K value adjustment quantity of each group in the configuration table to obtain the contrast threshold value and the K value adjustment quantity corresponding to the target printer.
For the target printer which is not pre-configured with the adaptive contrast threshold value and the K value adjustment quantity in the configuration table, interpolation method calculation can be performed based on parameters in the existing configuration table, and because the contrast threshold value, the DPI value and the color digit of the printer are in positive correlation, and the K value adjustment quantity, the DPI value and the color digit of the printer are in negative correlation, calculation is performed based on the interpolation method and the parameters in the configuration table, and therefore a group of contrast threshold value and K value adjustment quantity which can be used for printing at this time can be obtained.
As shown in fig. 3, in one embodiment, the print color definition optimization method includes:
step S301 of determining a target printer in response to a print instruction;
step S302, a contrast threshold value and a K value adjustment quantity matched with a target printer are obtained;
step S303, calculating the contrast between the background color in the printing area and the color of the printing object; the printing object is a text or a graphic primitive;
Step S304, if the contrast is not greater than the contrast threshold, judging whether the K value of the background color is smaller than a preset threshold;
step S305, if the K value of the background color is smaller than the preset threshold value, increasing the K value of the printing object according to the K value adjustment amount;
step S306, if the K value of the background color is not less than the preset threshold value, reducing the K value of the printing object according to the K value adjustment quantity;
step S307, printing the printing area based on the adjusted color parameters;
step S308, generating a feedback acquisition request;
step S309, responding to the feedback result input by the user based on the feedback acquisition request, and analyzing the feedback result;
step S310, judging whether the printing effect meets the requirement according to the feedback result;
step S311, if it is determined that the printing effect meets the requirement, storing the contrast threshold value and the K value adjustment amount of the target printer in the configuration table when the contrast threshold value and the K value adjustment amount of the target printer are not stored in the configuration table;
step S312, if the printing effect is judged to not meet the requirement, a manual parameter adjustment interface is displayed;
step S313, responding to a parameter adjustment instruction input by a user through a manual parameter adjustment interface, and adjusting the K value of the printing object;
Step S314, printing the printing area based on the color parameters after the K value is adjusted;
step S315, the K value adjustment amount corresponding to the target printer is updated according to the adjusted K value.
In this embodiment, after executing step S307, a feedback acquisition request is generated to request the user to evaluate the color optimization of the current print, parameters in the configuration table may be optimized according to the feedback result input by the user, if the analysis feedback result determines that the print effect meets the requirement, that is, the user is satisfied with the effect obtained by the corresponding selected parameter, and no adjustment is needed, but the parameters may be obtained by calculation or by requesting the server, or parameters used after manual adjustment may have been used, so that it is needed to determine whether the contrast threshold and the K value adjustment amount used at this time are already stored in the configuration table, and if not, the contrast threshold and the K value adjustment amount used at this time and the corresponding printer model and brand update are stored in the configuration table.
If the analysis feedback result judges that the printing effect does not meet the requirement, namely that the user considers that the color definition of printing does not meet the requirement, namely that the printing object cannot be clearly identified, at the moment, a manual parameter adjustment function is started, a manual parameter adjustment interface is displayed on a display interface of the computer equipment, the user can manually adjust the K value of the printing object through the interface, a parameter adjustment instruction is generated according to the finally confirmed K value of the user, the K value of the printing object is adjusted according to the parameter adjustment instruction, and printing is performed on the printing area again after the adjustment is completed. In addition, since the K value is manually adjusted, the K value adjustment amount originally configured is not good in effect of optimizing the color printing definition, and the K value adjustment amount is recalculated according to the adjusted K value and updated to the configuration table.
In one embodiment, if it is determined that the print effect meets the requirement, the print job is ended when the contrast threshold and the K-value adjustment amount of the target printer are already stored in the configuration table.
In one embodiment, after step S315 is performed, the process returns to step S308, and the user is again requested to feedback the printing effect, and the corresponding operation is performed according to the feedback result.
As shown in fig. 4, in one embodiment, the obtaining the contrast threshold and the K-value adjustment amount that match the target printer includes:
step S401, determining a printing color mode according to a printing instruction;
step S402, a contrast threshold and a K-value adjustment amount matching the printer parameter in the print color mode are acquired.
The printing color mode comprises a black-and-white mode and a color mode, wherein the contrast threshold value corresponding to the black-and-white mode is smaller than the contrast threshold value corresponding to the color mode; the K value adjustment amount corresponding to the black-and-white mode is larger than the K value adjustment amount corresponding to the color mode.
If a black-and-white mode is used for printing, the color of the printing object is mapped to a gray scale mode and then is printed because the color cannot be expressed by the black-and-white mode, but in the mapping process, the gray scale value after partial color conversion is closer to the gray scale value of white, so that the printing object cannot be clearly expressed after printing, and therefore, the contrast threshold value used for the black-and-white mode is lower than that for the color mode, and the K value adjustment amount is higher than that for the color mode. That is, in this embodiment, for one printer, the contrast threshold and the K-value adjustment amount corresponding to the color mode are different from the contrast threshold and the K-value adjustment amount corresponding to the black-and-white mode, so as to ensure the print color definition optimization effect in different print color modes, when the print is triggered, the contrast threshold and the K-value adjustment amount matching the target printer in the corresponding print color mode are acquired.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
The print color definition optimizing apparatus provided by the embodiment of the present application is described below, and the print color definition optimizing apparatus described below and the print color definition optimizing method described above may be referred to correspondingly.
As shown in fig. 5, an embodiment of the present application further provides a print color definition optimizing apparatus 500, including:
A first response module 501 for determining a target printer in response to a print instruction;
a parameter obtaining module 502, configured to obtain a contrast threshold value and a K-value adjustment amount that are matched with a target printer;
a contrast calculating module 503 for calculating a contrast between a background color in the print area and a color of the print object; the printing object is a text or a graphic primitive;
a judging module 504, configured to judge whether the K value of the background color is smaller than a preset threshold value when the contrast is not greater than the contrast threshold value;
a first adjustment module 505, configured to increase the K value of the printing object according to the K value adjustment amount when the K value of the background color is less than a preset threshold;
a second adjustment module 506, configured to reduce the K value of the printing object according to the K value adjustment amount when the K value of the background color is not less than the preset threshold;
the first printing module 507 is configured to print the print area based on the adjusted color parameter.
In one embodiment, the parameter acquisition module is configured to perform the steps of:
obtaining the brand and model of a target printer;
and inquiring the contrast threshold value and the K value adjustment quantity corresponding to the brand and model of the target printer based on a preset configuration table.
In one embodiment, the parameter acquisition module is further configured to perform the steps of:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, requesting to acquire a shared configuration table from a server;
and inquiring the contrast threshold value and the K value adjustment quantity corresponding to the brand and model of the target printer based on the sharing configuration table.
In one embodiment, the parameter acquisition module is further configured to perform the steps of:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, acquiring the DPI value and the color digit of the target printer;
and carrying out interpolation calculation based on the DPI value and the color digit of the target printer, and the contrast threshold value and the K value adjustment quantity of each group in the configuration table and the DPI value and the color digit of the printer corresponding to the DPI value and the K value adjustment quantity of each group in the configuration table to obtain the contrast threshold value and the K value adjustment quantity corresponding to the target printer.
In one embodiment, the print color definition optimizing apparatus further includes:
the feedback request generation module is used for generating a feedback acquisition request;
the second response module is used for responding to a feedback result input by a user based on feedback acquisition request and analyzing the feedback result;
And the configuration table updating module is used for storing the contrast threshold value and the K value adjustment amount of the target printer in the configuration table when the printing effect meets the requirement according to the feedback result and the contrast threshold value and the K value adjustment amount of the target printer are not stored in the configuration table.
In one embodiment, the print color definition optimizing apparatus further includes:
the manual adjustment triggering module is used for displaying a manual parameter adjustment interface when the printing effect is judged to not meet the requirement according to the feedback result;
the third response module is used for responding to a parameter adjustment instruction input by a user through a manual parameter adjustment interface and adjusting the K value of the printing object;
the second printing module is used for printing the printing area based on the color parameters after the K value is adjusted;
and the parameter updating module is used for updating the K value adjustment quantity corresponding to the target printer according to the adjusted K value.
In one embodiment, the print color definition optimizing apparatus further includes:
the data uploading module is used for uploading the updated configuration table to the server when the configuration table is updated; and the server is used for updating the shared configuration table according to the updated configuration table.
In one embodiment, the parameter acquisition module is further configured to perform the steps of:
determining a printing color mode according to the printing instruction; the printing color modes include a black-and-white mode and a color mode;
acquiring a contrast threshold and a K value adjustment quantity matched with printer parameters in a printing color mode;
wherein, the contrast threshold corresponding to the black-and-white mode is smaller than the contrast threshold corresponding to the color mode; the K value adjustment amount corresponding to the black-and-white mode is larger than the K value adjustment amount corresponding to the color mode.
The above-mentioned division of each module in the print color definition optimizing apparatus is merely for illustration, and in other embodiments, the print color definition optimizing apparatus may be divided into different modules as needed to complete all or part of the functions of the print color definition optimizing apparatus. The respective modules in the above-described print color definition optimizing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, the present application also provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the print color sharpness optimization method according to any of the embodiments described above.
In one embodiment, the present application also provides a computer device having computer readable instructions stored therein, which when executed by the one or more processors, perform the steps of the print color definition optimization method according to any of the embodiments above.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a print color definition optimization method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise. Also, the term "and/or" as used in this specification includes any and all combinations of the associated listed items.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method of print color definition optimization, the method comprising:
determining a target printer in response to the print instruction;
obtaining a contrast threshold and a K value adjustment quantity matched with the target printer;
calculating the contrast between the background color in the printing area and the color of the printing object; the printing object is a text or a graphic primitive;
If the contrast is not greater than the contrast threshold, judging whether the K value of the background color is smaller than a preset threshold;
if the K value of the background color is smaller than a preset threshold value, increasing the K value of the printing object according to the K value adjustment quantity;
if the K value of the background color is not smaller than a preset threshold value, reducing the K value of the printing object according to the K value adjustment quantity;
and printing the printing area based on the adjusted color parameters.
2. The method of optimizing print color definition according to claim 1, wherein before performing the step of determining whether the K value of the background color is less than a preset threshold value, the method further comprises:
if the color mode adopted by the background color and the printing object in the printing area is a non-CMYK color mode, the primary color mode of the background color and the printing object is converted into a CMYK color mode.
3. The method of claim 1, wherein the contrast threshold is in positive correlation with both the DPI value and the color number of the printer;
the K value adjustment quantity is in negative correlation with DPI value and color digit of the printer.
4. The print color definition optimization method according to claim 3, wherein the acquiring the contrast threshold and the K-value adjustment amount that match the target printer includes:
Obtaining the brand and model of the target printer;
and inquiring contrast threshold values and K value adjustment amounts corresponding to the brands and the models of the target printers based on a preset configuration table.
5. The print color definition optimization method according to claim 4, wherein the acquiring the contrast threshold and the K-value adjustment amount matched to the target printer further comprises:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, requesting a server to acquire a shared configuration table;
and inquiring contrast threshold and K value adjustment quantity corresponding to the brand and model of the target printer based on the sharing configuration table.
6. The print color definition optimization method according to claim 4, wherein the acquiring the contrast threshold and the K-value adjustment amount matched to the target printer further comprises:
if the contrast threshold and the K value adjustment quantity matched with the brand and the model of the target printer are not queried in the configuration table, acquiring the DPI value and the color digit of the target printer;
and performing interpolation calculation based on the DPI value and the color digit of the target printer, and the contrast threshold value and the K value adjustment quantity of each group in the configuration table and the DPI value and the color digit of the printer corresponding to the DPI value and the K value adjustment quantity of each group in the configuration table to obtain the contrast threshold value and the K value adjustment quantity corresponding to the target printer.
7. The print color definition optimization method according to any one of claims 4 to 6, characterized by further comprising, after performing the printing of the print area based on the adjusted color parameters:
generating a feedback acquisition request;
responding to a feedback result input by a user based on the feedback acquisition request, and analyzing the feedback result;
and if the printing effect meets the requirement according to the feedback result, and the contrast threshold value and the K value adjustment quantity of the target printer are not stored in the configuration table, storing the contrast threshold value and the K value adjustment quantity of the target printer in the configuration table.
8. The method of claim 7, further comprising, after performing the printing of the print area based on the adjusted color parameters:
if the printing effect is judged to be not met according to the feedback result, displaying a manual parameter adjustment interface;
responding to a parameter adjustment instruction input by a user through the manual parameter adjustment interface, and adjusting the K value of the printing object;
printing the printing area based on the color parameters after the K value is adjusted;
And updating the K value adjustment quantity corresponding to the target printer according to the adjusted K value.
9. The method of optimizing print color definition according to claim 8, further comprising:
if the configuration table is updated, uploading the updated configuration table to a server; and the server is used for updating the shared configuration table stored in the server according to the updated configuration table.
10. The print color definition optimization method according to claim 4, wherein the acquiring the contrast threshold and the K-value adjustment amount matched to the target printer includes:
determining a printing color mode according to the printing instruction; the printing color mode comprises a black-and-white mode and a color mode;
acquiring a contrast threshold and a K value adjustment amount matched with the printer parameters in the printing color mode;
wherein, the contrast threshold corresponding to the black-and-white mode is smaller than the contrast threshold corresponding to the color mode; the K value adjustment amount corresponding to the black-and-white mode is larger than the K value adjustment amount corresponding to the color mode.
11. A print color definition optimizing apparatus, comprising:
The first response module is used for responding to the printing instruction and determining a target printer;
the parameter acquisition module is used for acquiring a contrast threshold value and a K value adjustment quantity matched with the target printer;
a contrast calculating module for calculating a contrast between a background color in the printing area and a color of the printing object; the printing object is a text or a graphic primitive;
the judging module is used for judging whether the K value of the background color is smaller than a preset threshold value or not when the contrast is not larger than the contrast threshold value;
the first adjusting module is used for increasing the K value of the printing object according to the K value adjusting quantity when the K value of the background color is smaller than a preset threshold value;
the second adjusting module is used for reducing the K value of the printing object according to the K value adjusting quantity when the K value of the background color is not smaller than a preset threshold value;
and the first printing module is used for printing the printing area based on the adjusted color parameters.
12. A storage medium, characterized by: stored in the storage medium are computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the print color sharpness optimization method according to any of claims 1 to 10.
13. A computer device, comprising: one or more processors, and memory;
stored in the memory are computer readable instructions which, when executed by the one or more processors, perform the steps of the print color sharpness optimization method of any of claims 1 to 10.
CN202311168113.8A 2023-09-11 2023-09-11 Print color definition optimization method, device, storage medium and computer equipment Active CN116954529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311168113.8A CN116954529B (en) 2023-09-11 2023-09-11 Print color definition optimization method, device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311168113.8A CN116954529B (en) 2023-09-11 2023-09-11 Print color definition optimization method, device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN116954529A true CN116954529A (en) 2023-10-27
CN116954529B CN116954529B (en) 2024-04-12

Family

ID=88453226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311168113.8A Active CN116954529B (en) 2023-09-11 2023-09-11 Print color definition optimization method, device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN116954529B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010288250A (en) * 2009-05-12 2010-12-24 Ricoh Co Ltd Image processing apparatus and method, program, and recording medium
US20170280022A1 (en) * 2016-03-23 2017-09-28 Konica Minolta, Inc. Non-transitory computer-readable storage medium storing control program for color calibration and control device
US20190146735A1 (en) * 2017-11-15 2019-05-16 Konica Minolta, Inc. Control apparatus and computer-readable recording medium
CN111845084A (en) * 2019-04-26 2020-10-30 森大(深圳)技术有限公司 Printer ink amount adjusting method, device, equipment and medium based on image processing
CN115412641A (en) * 2021-05-26 2022-11-29 深圳市汉森软件有限公司 Color printing method and device based on color matching and color printing equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010288250A (en) * 2009-05-12 2010-12-24 Ricoh Co Ltd Image processing apparatus and method, program, and recording medium
US20170280022A1 (en) * 2016-03-23 2017-09-28 Konica Minolta, Inc. Non-transitory computer-readable storage medium storing control program for color calibration and control device
US20190146735A1 (en) * 2017-11-15 2019-05-16 Konica Minolta, Inc. Control apparatus and computer-readable recording medium
CN111845084A (en) * 2019-04-26 2020-10-30 森大(深圳)技术有限公司 Printer ink amount adjusting method, device, equipment and medium based on image processing
CN115412641A (en) * 2021-05-26 2022-11-29 深圳市汉森软件有限公司 Color printing method and device based on color matching and color printing equipment

Also Published As

Publication number Publication date
CN116954529B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN109741279A (en) Image saturation method of adjustment, device, storage medium and terminal
CN102651136A (en) Color mapping method and device of image
JP2004112269A (en) Method and apparatus for processing color, storage medium, color processing program, and image forming apparatus
JP2015100020A (en) Display device, and computer program
JP2000188697A (en) Image processing method, its device and its process step
CN116954529B (en) Print color definition optimization method, device, storage medium and computer equipment
CN114218421A (en) Resource recall method and device and network side equipment
US8508798B2 (en) Recording medium, color conversion table creating apparatus and color conversion table creating method
US10313561B2 (en) Image processing apparatus that executes color conversion on object data in target file
CN117112090A (en) Business page theme generation method, device, computer equipment, medium and product
US20230120180A1 (en) Image processing apparatus, information processing system, image processing method, and non-transitory computer-executable medium
JP2002199236A (en) Image processor and image processing method
JP2009253956A (en) Image processing apparatus
JP6761454B2 (en) Color correction / correction method and color correction / correction device using this
JP2000004369A (en) Method and processor for image processing, and recording medium thereof
JP5617724B2 (en) Control device
JP2004096751A (en) Color space conversion
JP4983955B2 (en) Image processing apparatus and image processing program
JP4775328B2 (en) Image processing apparatus and program
JP3910323B2 (en) Profile creation method and profile creation apparatus
JP2001008043A (en) Signal processor and signal processing method
CN116932118B (en) Color adjustment method and device for graphic primitive, computer equipment and storage medium
US20080144114A1 (en) Method and system for dynamic printer profiling
JP2012109897A (en) Driver program and printer
WO2021197213A1 (en) Color modulation method and apparatus for display, electronic device, and storage 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