CN110134344B - Preprocessing method and device for content to be printed - Google Patents

Preprocessing method and device for content to be printed Download PDF

Info

Publication number
CN110134344B
CN110134344B CN201810133233.7A CN201810133233A CN110134344B CN 110134344 B CN110134344 B CN 110134344B CN 201810133233 A CN201810133233 A CN 201810133233A CN 110134344 B CN110134344 B CN 110134344B
Authority
CN
China
Prior art keywords
area
target processing
target
ink
region
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.)
Active
Application number
CN201810133233.7A
Other languages
Chinese (zh)
Other versions
CN110134344A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810133233.7A priority Critical patent/CN110134344B/en
Publication of CN110134344A publication Critical patent/CN110134344A/en
Application granted granted Critical
Publication of CN110134344B publication Critical patent/CN110134344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Abstract

One or more embodiments of the present specification provide a method and an apparatus for preprocessing content to be printed, where the method may include: determining a target processing area in the content to be printed, wherein the estimated consumption of the target processing area on the printing material reaches a preset threshold value; and performing ink saving processing on the target processing area to reduce the estimated consumption of the printing materials by the target processing area.

Description

Preprocessing method and device for content to be printed
Technical Field
One or more embodiments of the present disclosure relate to the field of printing technologies, and in particular, to a method and an apparatus for preprocessing content to be printed.
Background
The printer may print the content to be printed on paper (or related media) for viewing, circulation, annotation, etc. by the user. There are various types of printers in the related art, such as an inkjet printer, a laser printer, and the like, which form corresponding contents to be printed on paper by consuming corresponding printing materials such as ink, toner, and the like. Wherein, the printing material belongs to the consumptive material, and when the printing material on the printer exhausts, need in time change in order to satisfy follow-up demand.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method and an apparatus for preprocessing content to be printed.
To achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided a method of preprocessing content to be printed, including:
determining a target processing area in the content to be printed, wherein the estimated consumption of the target processing area on the printing material reaches a preset threshold value;
and performing ink saving processing on the target processing area to reduce the estimated consumption of the printing materials by the target processing area.
According to a second aspect of one or more embodiments of the present specification, there is provided a preprocessing apparatus for content to be printed, including:
the determining unit is used for determining a target processing area in the content to be printed, and the estimated consumption of the target processing area on the printing materials reaches a preset threshold value;
and the processing unit is used for performing ink saving processing on the target processing area so as to reduce the estimated consumption of the target processing area to the printing materials.
Drawings
Fig. 1 is a schematic architecture diagram of a system for preprocessing content to be printed according to an exemplary embodiment.
Fig. 2 is a flowchart of a method for preprocessing content to be printed according to an exemplary embodiment.
Fig. 3 is a schematic diagram of content to be printed according to an exemplary embodiment.
Fig. 4 is a schematic diagram of selecting an effective information area according to an exemplary embodiment.
FIG. 5 is a schematic diagram of an exemplary embodiment of an ink saving process performed on a target processing region.
FIG. 6 is a schematic diagram of another implementation of an ink saving process on a target processing area in accordance with an exemplary embodiment.
FIG. 7 is a diagram illustrating tagging of primitive conditions of a target processing region according to an exemplary embodiment.
Fig. 8 is a schematic diagram of selecting valid information according to an exemplary embodiment.
FIG. 9 is a schematic diagram of yet another implementation of an ink saving process on a target processing region according to an exemplary embodiment.
Fig. 10 is a schematic diagram of adjusting valid information according to an exemplary embodiment.
Fig. 11 is a schematic diagram of controlling a target gray-scale value of a target processing region according to an exemplary embodiment.
Fig. 12 is a schematic diagram of an apparatus according to an exemplary embodiment.
Fig. 13 is a block diagram of a preprocessing apparatus for content to be printed according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Fig. 1 is a schematic architecture diagram of a system for preprocessing content to be printed according to an exemplary embodiment. As shown in fig. 1, the system may include a server 11, a network 12, several electronic devices such as a cell phone 13, a PC14, etc., and a printer 15.
The server 11 may be a physical server comprising a separate host, or the server 11 may be a virtual server carried by a cluster of hosts. The mobile phone 13 and the PC14 are only some types of electronic devices that can be used by the user; in fact, it is obvious that the user can also use electronic devices of the type such as: tablet devices, notebook computers, personal Digital Assistants (PDAs), wearable devices (e.g., smart glasses, smart watches, etc.), etc., which are not limited by one or more embodiments of the present disclosure.
In an embodiment, an application may be run on an electronic device such as a mobile phone 13 or a PC14 to implement a preprocessing scheme of a content to be printed based on the present specification; the electronic device may then send the processed content to be printed to the printer 15 for printing. The electronic device such as the mobile phone 13 or the PC14 may send the processed content to be printed to the printer 15 through the Network 12, for example, the Network 12 may include a local area Network, a Public Switched Telephone Network (PSTN), the internet, and the like.
In another embodiment, the server 11 may run a server-side program of an application, and the electronic device such as the mobile phone 13 or the PC14 may run a client-side program of the application. The electronic device such as the mobile phone 13 or the PC14 may send the content to be printed to the server 11 through the running program on the client side, and the server 11 implements the preprocessing scheme based on the content to be printed in the present specification on the content to be printed through the running program on the server side. Then, the processed content to be printed may be sent by the server 11 to the printer 15; alternatively, the server 11 may transmit the processed content to be printed to an electronic device such as the mobile phone 13 or the PC14, and the electronic device may transmit the processed content to be printed to the printer 15 for printing. Among them, data interaction can be realized between the electronic devices such as the server 11, the mobile phone 13 or the PC14, and the printer 15 based on the network 12.
In another embodiment, an electronic device such as the mobile phone 13 or the PC14 may send the content to be printed to the printer 15, or the server 11 (the server 11 may obtain the content to be printed from the electronic device, the cloud disk space, or other approaches) sends the content to be printed to the printer 15, and the printer 15 implements a preprocessing scheme based on the content to be printed in this specification by running a certain application, so that the printer 15 may process the content to be printed and then print out the processed content to be printed.
Fig. 2 is a flowchart of a method for preprocessing content to be printed according to an exemplary embodiment. As shown in fig. 2, the method may be applied to an electronic device on a client side (such as a mobile phone 13, a PC14, etc. shown in fig. 1), a device on a server side (such as a server 11 shown in fig. 1) or a printing device (such as a printer 15 shown in fig. 1), and may include the following steps:
step 202, determining a target processing area in the content to be printed, wherein the estimated consumption of the printing material in the target processing area reaches a preset threshold value.
In an embodiment, the content to be printed may include one or more target processing areas, which is not limited in this specification.
In an embodiment, the target processing region may be a regular shape such as a rectangle, a circle, or the like, or the target processing region may be an irregular shape, which is not limited in this specification. Of course, the user may set the target processing region according to actual conditions, for example, when the target processing region is set to be rectangular, the target processing region with other shapes may be avoided.
In an embodiment, when any one of the regions meets a preset condition, it may be determined that the estimated consumption of the printing material by the any one of the regions reaches a preset threshold, so that the any one of the regions is used as the target processing region; in other words, whether the estimated consumption of the printing material by any one of the regions reaches the preset threshold may be indirectly determined through the preset condition, and it is not necessarily required to directly detect the estimated consumption of the printing material by any one of the regions. For example, the preset condition may include: the gray values of all pixel points in any region are smaller than a first preset gray value; for another example, the preset condition may include: the average gray value of all pixel points in any region is smaller than a second preset gray value; of course, other forms of preset conditions may also be used to determine whether the estimated consumption of the printing material by any one of the areas reaches the preset threshold, and this specification does not limit this.
In an embodiment, the first predetermined gray-level value and the second predetermined gray-level value are only used for distinguishing "predetermined gray-level values" under different conditions, and do not mean that there is a difference in value; in fact, the first preset gray-level value and the second preset gray-level value are independent of each other, and may be equal or unequal, and this specification does not limit this.
In an embodiment, the area of the target processing region is larger than a preset area, so that an excessively small region can be avoided being determined as the target processing region by pre-configuring a value of the preset area. For example, the bullets of \9632;, "\9679;," tangle-solidup ", etc. often used in documents may satisfy the preset condition for determining the target processing region, so that by limiting the area of the target processing region, the bullets or other similar contents can be prevented from being erroneously determined as the target processing region, thereby preventing the influence on the normal printing of the effective information in the contents to be printed.
In one embodiment, the target processing area does not contain valid information in the content to be printed; in other words, when the target processing area is determined, the effective information in the content to be printed can be avoided, thereby avoiding or reducing the influence on the effective information. The valid information may include any visualized content such as characters, graphics, and patterns, which is not limited in this specification.
In one embodiment, a user-specified valid information area may be determined such that outside the valid information area, the target processing area is determined. The valid information area refers to an area where valid information is located, and by specifying the valid information area by a user, even the type or content of the valid information does not need to be known, and only the target processing area needs to be ensured to avoid the valid information area. For example, the user may circle the boundary of the effective information area or a vertex on the boundary on the content to be printed to designate the corresponding effective information area by controlling a virtual cursor or based on a touch operation, or may also designate the effective information area by other means, which is not limited by the present specification.
In an embodiment, an effective information area where effective information is located may be determined according to the effective information included in the content to be printed; then, the target processing area is determined outside the effective information area so that the target processing area avoids the effective information area. In other words, by setting in advance or specifying by the user the type of information or the content of information as valid information, valid information contained in the content to be printed can be automatically identified, thereby determining the corresponding valid information area; for example, the effective information located at the upper left corner and the lower right corner may be determined, so as to form a rectangular effective information area, although other forms may also be used, and this specification does not limit this. The information types may include characters, figures, patterns, and the like, which are not limited in this specification; the information content may include any content preset or designated by a user, and the content may be a certain character, a certain figure, a certain pattern, and the like, which is not limited in this specification.
And 204, performing ink saving processing on the target processing area to reduce the estimated consumption of the target processing area to the printing materials.
In one embodiment, the ink saving process may reduce the estimated consumption of the printing material by the target processing area, but based on the type difference of the printer, the printing material used is not necessarily "ink", and the term "ink saving" is used herein for convenience of expression only, and the present specification does not limit this.
In one embodiment, all processing methods that can reduce the estimated consumption of the printing material by the target processing area can be used as the above-mentioned ink saving processing. For example, the gray value of at least a part of the pixels in the target processing region can be increased, so that the printing material consumed by the part of the pixels in the printing process is reduced; for another example, at least a part of the pixel points in the target processing region can be deleted, so that the printing material is not consumed in the printing process of the part of the pixel points; alternatively, other forms of ink saving processing may be employed, and this description is not intended to limit this. In some scenarios, the various means of ink-saving processing described above may be combined to collectively implement ink-saving processing for the target processing region.
In an embodiment, a reserved sub-region may be set in the target processing region, and the reserved sub-region is prevented from being subjected to the ink saving processing, so that the state of the target processing region before the ink saving processing is represented by the reserved sub-region, thereby enabling a user to perform the ink saving processing on the decorrelated region without printing failure, and facilitating the user to know the original condition of the correlative region, such as a gray value before the ink saving processing.
In an embodiment, indication information for the target processing region may be added to characterize a state of the target processing region before the ink-saving process. For example, the indication information may include an occupied area, a color, a gray value, and the like of the target processing area before the ink saving processing, so that on one hand, the user can be enabled to release the relevant area to perform the ink saving processing without printing failure, and on the other hand, the user can know the original condition of the relevant area, such as the gray value and the like before the ink saving processing
In one embodiment, when the target processing area contains valid information in the content to be printed, the valid information may be retained and a portion other than the valid information may be subjected to an ink saving process. For example, the valid information may be a character, and the target processing area is a background pattern area below the character, and the background pattern may be subjected to an ink saving process such as increasing or deleting a gray value, and the character serving as the valid information is retained, so that the purpose of saving ink can be achieved, and adverse effects on the valid information can be avoided.
In an embodiment, when the target processing region includes valid information in the content to be printed, if the ink saving processing is adopted to increase the gray level of at least a part of the pixels in the target processing region, the target gray level of the pixels around the valid information in the target processing region may be configured, so that the difference between the gray level of the valid information and the target gray level is not less than a preset value. For example, when the background pattern of the target processing area is black and the effective information is white text, if the gray value of the background pattern is excessively increased, the effective information may not be displayed clearly on the white paper, so that the gray value of the pixel points around the effective information can be appropriately increased to enhance the contrast with the effective information and avoid the unclear display of the effective information. Of course, besides the pixels around the effective information, the target gray values of other pixels in the target processing region may also be configured at the same time, which is not limited in this specification.
In an embodiment, when the target processing area includes valid information in the content to be printed, the gray scale value of the valid information may be adjusted, so that the difference between the adjusted gray scale value and the gray scale value of the pixel point located around the valid information after the ink saving processing is completed is not less than the preset value. For example, when the background pattern of the target processing area is black and the effective information is white characters, the gray value of the background pattern can be increased as much as possible, and the gray value of the effective information can be increased appropriately, so that contrast enhancement can be realized and the problem that the effective information is not displayed clearly can be avoided.
For convenience of understanding, the following description will be made on the technical solutions of one or more embodiments of the present specification, taking a printer having an ink saving mode as an example. Assuming that the printer 15 shown in fig. 1 has an ink saving mode, the technical solution of the present specification can be implemented through the ink saving mode, so as to preprocess the content to be printed, so as to reduce the consumption of printing materials such as ink or toner required by the content to be printed.
Fig. 3 is a schematic diagram of content to be printed according to an exemplary embodiment. Assuming that the printer 15 obtains the content 300 to be printed as shown in fig. 3, the content 300 to be printed can be obtained by the printer 15 from an electronic device such as the mobile phone 13 or the PC14, the printer 15 from the server 11, the printer 15 from a mobile storage device such as an accessed usb disk, or from other ways, which does not affect the preprocessing process of the content 300 to be printed.
In an embodiment, the content to be printed 300 may include a top area 31, a middle area 32, and a bottom area 33. The top area 31 may include a black background pattern. The bottom area 33 may include a subregion 331 in which the yellow background pattern is located, a subregion 332 in which the red background pattern is located, and a subregion 333 in which the blue background pattern is located. The middle area 32 may include text 321, text 322, text 323, text 324, bullets 325 corresponding to the text 321, bullets 326 corresponding to the text 323, icons 327, and the like.
Fig. 4 is a schematic diagram of selecting an effective information area according to an exemplary embodiment. As shown in fig. 4, assuming that the printer 15 is equipped with a touch screen 400 thereon, the printer 15 can show the above-described content to be printed 300 on the touch screen 400 to be viewed and selected by the user as an effective information area. For example, if the user can form the sliding track 40 on the touch screen 400 by using a finger, the printer 15 may determine a start point 401 and an end point 402 of the sliding track 40, and form a rectangular area based on the start point 401 and the end point 402 as the effective information area, where the start point 401 and the end point 402 are a set of diagonal vertices of the rectangular area; for example, in the embodiment shown in fig. 4, the starting point 401 is located at the upper left of the end point 402, so that the starting point 401 is the upper left corner of the rectangular region, and the end point 402 is the lower right corner of the rectangular region.
For convenience of understanding, assuming that the starting point 401 is located at the upper left corner of the middle area 32 and the ending point 402 is located at the lower right corner of the middle area 32, the corresponding rectangular area may be the middle area 32, i.e. the middle area 32 is the effective information area selected by the user. Of course, the valid information area selected by the user may not contain any valid information, but the printer 15 defaults to the fact that the valid information area contains valid information based on the selection operation by the user. Therefore, the printer 15 needs to determine a target processing area, which needs to perform the ink saving processing, in a portion other than the intermediate area 32 while avoiding valid information that may be contained in the intermediate area 32; in other words, the printer 15 needs to determine the target processing area in the top area 31 and the bottom area 33.
FIG. 5 is a schematic diagram of an exemplary embodiment of an ink saving process performed on a target processing area. As shown in fig. 5, the left side is the content to be printed 300 before the ink-saving processing, and the right side is the content to be printed 300 after the ink-saving processing; similarly, fig. 6 to 7, 9 to 11, and the like, hereinafter also take such a layout form to facilitate a comparative review of the content to be printed 300 before and after the ink-saving process.
In one embodiment, the printer 15 may look for one or more regions in the top region 31 and the bottom region 33, such that the regions may satisfy the following condition: the gray values of all the pixel points in the area are smaller than a first preset gray value R1. Assuming that the grayscale value of the top region 31 is H1, the grayscale value of the sub-region 331 in the bottom region 33 is H2, the grayscale value of the sub-region 332 is H3, and the grayscale value of the sub-region 333 is H4, if H2 > H3 > R1 > H4 > H1, the top region 31 and the sub-region 333 may be determined to be target processing regions, and the ink saving processing may be performed on the top region 31 and the sub-region 333. For example, the gradation value of the target processing area may be increased, or the target processing area may be directly deleted; for example, in the embodiment shown in fig. 5, it can be understood that the gray-scale values of the top region 31 and the sub-region 333 are increased to the maximum value 255, or it can be understood that the top region 31 and the sub-region 333 are deleted.
The printer 15 may also determine the target processing area in the printer content 300 by other conditions, which the present specification does not limit. For example, the conditions may further include: the average gray value of all the pixel points in the region is smaller than a second preset gray value R2. Accordingly, FIG. 6 is a schematic illustration of another implementation of an ink saving process on a target processing region provided by an exemplary embodiment; as shown in fig. 6, it is assumed that H2 > H3 > R2 > H4 > H1, but for the bottom area 33 composed of the sub-area 331, the sub-area 332, and the sub-area 333, if the average gradation value H-1 < R2 of all the pixel points in the bottom area 33, the bottom area 33 can be set as the target processing area, and thus the printer 15 can perform the ink saving processing on the bottom area 33 and the top area 31 which are the target processing areas. Similarly, if the average gradation value H-1 of all the pixels in the bottom region 33 is > R2, but the average gradation value H-2 of all the pixels in the combined region of the sub-region 333 and the sub-region 332 is < R2, then the ink saving process can be performed with the combined region of the sub-region 333 and the sub-region 332 as the target process region.
In one embodiment, each target processing region should be a contiguous region. For example, it is assumed that the average gray scale value H-1 of all the pixels in the bottom region 33 is greater than R2, the average gray scale value H-3 of all the pixels in the combined region formed by the sub-region 331 and the sub-region 332 is greater than R2, and the average gray scale value H-4 of all the pixels in the combined region formed by the sub-region 331 and the sub-region 333 is less than R2, but the combined region formed by the sub-region 331 and the sub-region 333 cannot be regarded as the target processing region because the sub-region 331 and the sub-region 333 are not continuous regions.
FIG. 7 is a diagram illustrating tagging of primitive conditions of a target processing region according to an exemplary embodiment. As shown in fig. 7, assuming that the printer 15 recognizes the top area 31, the sub-area 331, the sub-area 332, and the sub-area 333 as target processing areas, frames may be generated for the target processing areas, such as the frame 311 of the top area 31, the frame 331a of the sub-area 331, the frame 332a of the sub-area 332, the frame 333a of the sub-area 333, and so on, so that the user can clearly view the corresponding target processing areas.
In one embodiment, the printer 15 may set reserved sub-areas within each target processing area and avoid performing an ink saving process on these reserved sub-areas. For example, as shown in fig. 7, a reserved sub-region 312 may be formed in the top region 31, a reserved sub-region 331b may be formed in the sub-region 331, a reserved sub-region 332b may be formed in the sub-region 332, a reserved sub-region 333b may be formed in the sub-region 333, and the like, so that after the ink-saving process, a user may know the state of each target process region before the ink-saving process by determining that black is originally filled in the top region 31 from the reserved sub-region 312, that yellow is originally filled in the sub-region 331 from the reserved sub-region 331b, and the like. In addition to setting the reserved sub-area, the state of the target processing area before the ink saving process may be indicated to the user by other means, which is not limited by the present specification. For example, the printer 15 may add corresponding indication information to each target processing region, for example, the indication information may be a gray scale value of each target processing region before the ink saving processing, a gray scale value after the ink saving processing, and the like.
In addition to the effective information area defined by the user, the printer 15 may automatically determine an area corresponding to the effective information as the effective information area according to the effective information contained in the content 300 to be printed. For example, fig. 8 is a schematic diagram of selecting valid information according to an exemplary embodiment; as shown in fig. 8, the user can click and select valid information on the touch screen 400, for example, when the click position formed by the user is a text 322, the printer 15 can determine that the "text" type information in the content to be printed 300 is valid information, so as to automatically recognize that the text 321, the text 322, the text 323, the text 324, and the like belong to valid information, and use the area where the valid information is located as a valid information area. Further, in addition to the effective information being manually specified by the user, the type of the effective information may be preset within the printer 15, so that the printer 15 can automatically recognize the effective information contained in the content to be printed 300 based on the type.
FIG. 9 is a schematic diagram of yet another implementation of an ink saving process on a target processing region in accordance with an exemplary embodiment. When the printer 15 recognizes that the letters 321, 322, 323, 324, etc. belong to valid information, the corresponding valid information area may be an area 321a, an area 322a, an area 323a, an area 324a, etc. shown in fig. 9, so that the printer 15 needs to search for a target processing area in a portion of the content to be printed 300 other than the areas 321a to 324 a. When searching for the target processing region, the conditions adopted in the above embodiments may be based on, for example, "the gray values of all the pixel points in the region are all smaller than the first preset gray value R1," and the average gray value of all the pixel points in the region is smaller than the second preset gray value R2, "and so on, which are not described herein again.
It should be noted that the target treatment area should be larger than a preset area. For example, the preset area may be a determined value (e.g., defined by the number of pixels included, etc.), and for example, the preset area may be an area ratio on the content 300 to be printed (e.g., greater than 5% of the total area, etc.), which is not limited in this specification. By limiting the area of the target processing region, the probability of erroneous determination can be reduced to some extent. For example, although the bullets 325-326 do not pertain to the "text" type of information described above, they can be used to hierarchically divide the texts 321-324, so that the user can read the relevant text content; however, the bullets 325-326 often adopt icons such as black squares shown in fig. 9, and if the printer 15 determines the located area of the bullets 325-326 as the target processing area based on the gray value or the average gray value of the pixel points, the ink-saving processing is performed on the bullets 325-326, so that the readability of the characters 321-324 is reduced. Therefore, by limiting the area of the target processing region, the printer 15 can avoid determining a region having a smaller area, such as the bullets 325 to 326, as the target processing region.
In one embodiment, the valid information may include other types, such as non-text type characters, figures, patterns, etc., besides the above-mentioned "text" type valid information, which is not limited in this specification. For example, the icon 327 described above may be used as a type of "pattern" of valid information.
In one embodiment, the target processing region need not be completely isolated from the valid information. For example, as shown in fig. 9, if the printer 15 automatically recognizes that the icon 327 includes a target processing region 327a and a pattern 327b as valid information, where the pattern 327b is located in the target processing region 327a, the printer 15 can perform the ink saving process on the target processing region 327a as long as the target processing region 327a and the pattern 327b can be clearly divided.
In one embodiment, the gray-level value of the target processing region 327a can be changed by performing the ink-saving process on the target processing region 327a, and if the changed gray-level value is similar to or the same as the gray-level value of the pattern 327b, the pattern 327b cannot be effectively recognized. For example, assuming that the gray-level value of the pattern 327b is 255 and the ink-saving processing scheme for the target processing area 327a is deletion, the pattern 327b cannot be displayed when the content 300 to be printed is printed on a white paper. Therefore, if the ink-saving processing scheme is deletion, the gray value of the effective information can be properly adjusted so that the effective information can be effectively displayed and can be accurately identified easily. For example, fig. 10 is a diagram illustrating an exemplary embodiment for adjusting valid information; as shown in fig. 10, when icon 327 has the problem shown in fig. 9, by appropriately reducing the gradation value of pattern 327b, even if target processing area 327a is deleted by the ink saving processing, pattern 327b can be ensured to be effectively visualized on the sheet.
In view of the above problem in fig. 9, if the ink-saving processing scheme is to increase the gray-level value, the target gray-level value of the target processing area may be controlled such that there is a certain difference between the target gray-level value and the gray-level value of the valid information, so that the valid information can be effectively displayed and easily and accurately identified. For example, fig. 11 is a schematic diagram illustrating a control of a target gray-level value of a target processing region according to an exemplary embodiment; as shown in fig. 11, when the icon 327 has the problem shown in fig. 9, if the gray value U1 of the pattern 327b is 255, the target gray value U2 for implementing the ink saving process for the target processing region 327a should be avoided as 255, for example, the difference between the target gray value U2 and the gray value U1 should be greater than a preset value (for example, the preset value should not be less than the minimum differentiation value of the human eye to the gray value) to ensure that a clear visual contrast is formed between the two values, so as to ensure that the pattern 327b is effectively displayed on the paper.
Of course, in addition to the valid information of the pattern type, for the case that the target processing area contains other types of valid information such as text and the like, for example, text paragraphs and the like with dark backgrounds, corresponding ink saving processing may be performed on the target processing area based on the technical solutions in the embodiments of fig. 9 to 11, and the valid information may be ensured to be effectively displayed on the paper by adjusting the target processing area or the gray value of the valid information during the processing, which is not described herein again.
FIG. 12 is a schematic block diagram of an apparatus provided in an exemplary embodiment. Referring to fig. 12, at the hardware level, the apparatus includes a processor 1202, an internal bus 1204, a network interface 1206, a memory 1208, and a non-volatile memory 1210, although other hardware required for services may be included. The processor 1202 reads a corresponding computer program from the non-volatile memory 1210 into the memory 1208 and runs the computer program, so as to form a preprocessing device of the content to be printed on a logic level. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Referring to fig. 13, in a software implementation, the apparatus for preprocessing the content to be printed may include:
the determining unit 1301 determines a target processing area in the content to be printed, wherein the estimated consumption of the target processing area on the printing material reaches a preset threshold;
the processing unit 1302 performs an ink saving process on the target processing area to reduce an estimated consumption of the printing material by the target processing area.
Optionally, the target processing area is determined that the estimated consumption of the printing material reaches a preset threshold when at least one of the following conditions is satisfied:
the gray values of all pixel points in the target processing area are smaller than a first preset gray value;
and the average gray value of all pixel points in the target processing region is smaller than a second preset gray value.
Optionally, the area of the target processing region is larger than a preset area.
Optionally, the target processing area does not include valid information in the content to be printed.
Optionally, the determining unit 1301 is specifically configured to:
determining an effective information area designated by a user;
and determining the target processing area outside the effective information area.
Optionally, the determining unit 1301 is specifically configured to:
determining an effective information area where the effective information is located according to the effective information contained in the content to be printed;
and determining the target processing area outside the effective information area.
Optionally, the processing unit 1302 performs the ink saving processing on the target processing area by at least one of the following manners:
increasing the gray value of at least one part of pixel points in the target processing region;
and deleting at least one part of pixel points in the target processing region.
Optionally, the apparatus further includes a setting unit 1303 or an adding unit 1304:
the setting unit 1303 is configured to set a reserve sub-region in the target processing region, and avoid performing the ink-saving processing on the reserve sub-region, so as to characterize a state of the target processing region before the ink-saving processing by the reserve sub-region;
the adding unit 1304 is configured to add indication information for the target processing area to characterize a state of the target processing area before the ink-saving processing.
Optionally, the processing unit 1302 is specifically configured to:
when the target processing area contains valid information in the content to be printed, reserving the valid information and performing ink-saving processing on a part except the valid information.
Optionally, the method further includes: a configuration unit 1305 or an adjustment unit 1306;
the configuration unit 1305 is configured to configure, when the ink-saving processing is to increase the gray level of at least a part of the pixels in the target processing region, a target gray level of pixels located around the valid information in the target processing region, so that a difference between the gray level of the valid information and the target gray level is not less than a preset value;
the adjusting unit 1306 is configured to adjust the gray scale value of the effective information, so that a difference between the adjusted gray scale value and the gray scale value of the pixel point located around the effective information after the ink saving processing is completed is not smaller than the preset value.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium, that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in this specification 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 and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.

Claims (18)

1. A method for preprocessing content to be printed is characterized by comprising the following steps:
determining a target processing area in the content to be printed, wherein the estimated consumption of the target processing area on the printing material reaches a preset threshold value; the determining a target processing area in the content to be printed includes: determining an effective information area where the effective information is located according to the effective information contained in the content to be printed; determining the target processing area outside the effective information area;
performing ink saving processing on the target processing area to reduce the estimated consumption of the target processing area on the printing materials;
and setting a reserve sub-area in the target processing area, and avoiding the ink-saving processing to be carried out on the reserve sub-area so as to represent the state of the target processing area before the ink-saving processing by the reserve sub-area.
2. The method according to claim 1, wherein the target processing area is determined that the estimated consumption of the printing material reaches a preset threshold when at least one of the following conditions is satisfied:
the gray values of all pixel points in the target processing area are smaller than a first preset gray value;
and the average gray value of all pixel points in the target processing region is smaller than a second preset gray value.
3. The method of claim 1, wherein the target treatment area has an area greater than a predetermined area.
4. The method of claim 1, wherein the target processing region does not contain valid information in the content to be printed.
5. The method of claim 1, wherein determining the target processing region in the content to be printed comprises:
determining an effective information area designated by a user;
and determining the target processing area outside the effective information area.
6. The method of claim 1, wherein said saving ink to said target processing area comprises at least one of:
increasing the gray value of at least one part of pixel points in the target processing region;
and deleting at least one part of pixel points in the target processing region.
7. The method of claim 1, further comprising:
adding indication information for the target processing area to characterize a state of the target processing area before the ink-saving processing.
8. The method of claim 1, wherein said saving ink to said target processing area comprises:
when the target processing area contains effective information in the content to be printed, reserving the effective information and performing ink saving processing on the part except the effective information.
9. The method of claim 8, further comprising:
when the ink-saving processing is to increase the gray value of at least one part of pixels in the target processing area, configuring the target gray value of the pixels around the effective information in the target processing area, so that the difference between the gray value of the effective information and the target gray value is not less than a preset value;
or adjusting the gray value of the effective information to ensure that the difference between the adjusted gray value and the gray value of the pixel points positioned at the periphery of the effective information after the ink-saving processing is finished is not less than the preset value.
10. An apparatus for preprocessing content to be printed, comprising:
the determining unit is used for determining a target processing area in the content to be printed, and the estimated consumption of the target processing area on the printing material reaches a preset threshold value; the determining unit is specifically configured to: determining an effective information area where the effective information is located according to the effective information contained in the content to be printed; determining the target processing area outside the effective information area;
the processing unit is used for carrying out ink saving processing on the target processing area so as to reduce the estimated consumption of the target processing area to the printing materials;
a setting unit configured to set a reserve sub-region in the target processing region and avoid performing the ink-saving processing on the reserve sub-region to characterize a state of the target processing region before the ink-saving processing by the reserve sub-region.
11. The apparatus according to claim 10, wherein the target processing area is determined to reach a preset threshold for the estimated consumption of printing material when at least one of the following conditions is satisfied:
the gray values of all pixel points in the target processing area are smaller than a first preset gray value;
and the average gray value of all pixel points in the target processing area is smaller than a second preset gray value.
12. The apparatus of claim 10, wherein the target treatment area has an area greater than a predetermined area.
13. The apparatus of claim 10, wherein the target processing region does not contain valid information in the content to be printed.
14. The apparatus according to claim 10, wherein the determining unit is specifically configured to:
determining an effective information area designated by a user;
and determining the target processing area outside the effective information area.
15. The apparatus according to claim 10, wherein the processing unit performs an ink saving process on the target processing area by at least one of:
increasing the gray value of at least one part of pixel points in the target processing region;
and deleting at least one part of pixel points in the target processing region.
16. The apparatus according to claim 10, further comprising an adding unit:
the adding unit is used for adding indication information aiming at the target processing area so as to represent the state of the target processing area before the ink saving processing.
17. The apparatus according to claim 10, wherein the processing unit is specifically configured to:
when the target processing area contains valid information in the content to be printed, reserving the valid information and performing ink-saving processing on a part except the valid information.
18. The apparatus of claim 17, further comprising: a configuration unit or an adjustment unit;
the configuration unit is used for configuring target gray values of pixels around the effective information in the target processing area when the ink-saving processing is to increase the gray values of at least a part of pixels in the target processing area, so that the difference between the gray values of the effective information and the target gray values is not less than a preset value;
the adjusting unit is used for adjusting the gray value of the effective information, so that the difference between the adjusted gray value and the gray value of the pixel points located at the periphery of the effective information after the ink-saving processing is finished is not smaller than the preset value.
CN201810133233.7A 2018-02-09 2018-02-09 Preprocessing method and device for content to be printed Active CN110134344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810133233.7A CN110134344B (en) 2018-02-09 2018-02-09 Preprocessing method and device for content to be printed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810133233.7A CN110134344B (en) 2018-02-09 2018-02-09 Preprocessing method and device for content to be printed

Publications (2)

Publication Number Publication Date
CN110134344A CN110134344A (en) 2019-08-16
CN110134344B true CN110134344B (en) 2023-04-11

Family

ID=67567740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810133233.7A Active CN110134344B (en) 2018-02-09 2018-02-09 Preprocessing method and device for content to be printed

Country Status (1)

Country Link
CN (1) CN110134344B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246328A (en) * 2007-02-15 2008-08-20 三星电子株式会社 Image forming apparatus to save toner and method to control the same
JP2008238543A (en) * 2007-03-27 2008-10-09 Ryobi Ltd Color matching method and color matching device of printing machine
CN101528467A (en) * 2006-10-17 2009-09-09 萨尔技术有限公司 Method of preventing the formation of inkjet printing artefacts
CN102211475A (en) * 2010-03-19 2011-10-12 精工爱普生株式会社 Image processing method, image processing apparatus, and image processing program
CN102694957A (en) * 2011-03-24 2012-09-26 精工爱普生株式会社 Image processing apparatus, printing apparatus, image processing method, and image processing program
CN104070773A (en) * 2013-03-25 2014-10-01 北大方正集团有限公司 Printing system and printing method for determining ink saving amount
CN107554101A (en) * 2016-06-30 2018-01-09 兄弟工业株式会社 Image processing apparatus and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2382905B (en) * 2001-12-04 2005-08-31 Software 2000 Ltd Printer ink reduction
JP6524659B2 (en) * 2014-12-17 2019-06-05 セイコーエプソン株式会社 Print data generation device and printing device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101528467A (en) * 2006-10-17 2009-09-09 萨尔技术有限公司 Method of preventing the formation of inkjet printing artefacts
CN101246328A (en) * 2007-02-15 2008-08-20 三星电子株式会社 Image forming apparatus to save toner and method to control the same
JP2008238543A (en) * 2007-03-27 2008-10-09 Ryobi Ltd Color matching method and color matching device of printing machine
CN102211475A (en) * 2010-03-19 2011-10-12 精工爱普生株式会社 Image processing method, image processing apparatus, and image processing program
CN102694957A (en) * 2011-03-24 2012-09-26 精工爱普生株式会社 Image processing apparatus, printing apparatus, image processing method, and image processing program
CN104070773A (en) * 2013-03-25 2014-10-01 北大方正集团有限公司 Printing system and printing method for determining ink saving amount
CN107554101A (en) * 2016-06-30 2018-01-09 兄弟工业株式会社 Image processing apparatus and method

Also Published As

Publication number Publication date
CN110134344A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
US10984295B2 (en) Font recognition using text localization
US10699166B2 (en) Font attributes for font recognition and similarity
US9824304B2 (en) Determination of font similarity
US8515176B1 (en) Identification of text-block frames
US11430241B2 (en) Entry field extraction device and computer readable medium
US9529432B2 (en) Progressive page transition feature for rendering e-books on computing devices
US10395131B2 (en) Apparatus, method and non-transitory storage medium for changing position coordinates of a character area stored in association with a character recognition result
US20130215045A1 (en) Stroke display method of handwriting input and electronic device
US9734132B1 (en) Alignment and reflow of displayed character images
CN111695518B (en) Method and device for labeling structured document information and electronic equipment
CA3184467A1 (en) Text recognition for a neural network
CN110134344B (en) Preprocessing method and device for content to be printed
CN115019324A (en) Interactive method and device for text scanning, computer equipment and storage medium
US9934610B2 (en) Techniques for rendering and caching graphics assets
US20140320527A1 (en) Hardware glyph cache
CN114494052A (en) Book counting method and device, computer equipment and storage medium
CN113223117A (en) Image processing method and related device
TWI633498B (en) Image processing device, image processing method, and program product
US11727700B2 (en) Line removal from an image
US20230385980A1 (en) Generating content adaptive watermarks for digital images
JP7370733B2 (en) Information processing device, control method, and program
CN116884019A (en) Signature recognition method, signature recognition device, computer equipment and storage medium
CN114881182A (en) Electronic bill processing method and device, computer equipment and storage medium
CN115880167A (en) Redrawing method of plane object in video, electronic device and medium
JP2023051732A (en) Method, computer-readable program, and system

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40012225

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant