Halftone representation taking into account characteristics of image and printer

Abstract: A method of achieving halftone representation of image data by using a printer (20) for printing the image data includes the steps of providing a plurality of tone curves (33, 34, 35) which takes into consideration characteristics of the printer (20), and selecting a tone curve from the plurality of tone curves (33, 34, 35). The method further includes a step of printing the image data by using the selected tone curve.

Description: The present invention generally relates to methods of printing images by using printing devices, and particularly relates to a method of representing halftones of images by forming dots through area-based tone representation. Printing devices which form letters and images by printing dots represent halftones by adjusting a ratio of a dot-occupied area to a unit area. For example, a square area of 8 x 8 dots or 16 x 16 dots is treated as one unit, and halftones are represented by adjusting the number of dots printed within this area. When deciding whether to print a dot at a given dot position within this area, a level of the input image data is compared with a threshold value allocated to the given dot. When a binary-value printer is employed, for example, use of an 8-by-8 matrix can represent 64 halftones, and use of a 16-by-16 matrix can represent 256 halftones. In general, area-based halftone representation uses an M-by-N-dot matrix to represent M x N x (k-1) + 1 halftones, wherein k is the number of levels which one dot can represent. In halftone representation, a decision has to be made with respect to each level of image data as to how many dots are formed in which position of a matrix. A dither matrix is a typical example of a matrix which is used for making such a decision. By defining a dither matrix, a tone curve is created to define a relationship between levels of the input image data and print densities. In general, it is preferable to set characteristics of a tone curve such that the tone curve can properly represent input images in accordance with characteristics of the input image. For example, a histogram of levels may be obtained with regard to image data, and a tone curve may be defined so as to have a greater dynamic range of halftone representation in levels in which a greater number of pixels are in existence. Such a tone curve can enhance printing characteristics. This technique is disclosed in Japanese Patent Laid-open Applications No.1-237142 and No.63-181568. The technique of the above-cited references, however, has a problem in that the tone curve defined based on the input image data does not reflect characteristics of printing devices. Printers generally form dots which have a diameter larger than a dot pitch, and a conventional setting is that the dot diameter is 1.4 times larger than the dot pitch. The use of this dot diameter ensures that adjacent dots are properly connected when a diagonal line is formed with a one-dot line width. If the dot diameter is equal to the dot pitch, a diagonal line appears as a dotted line, and small white gaps are created when all areas are supposed to be printed in black. In order to avoid these, the dot diameter is set so as to be slightly larger than 1.4 times the dot pitch. Use of a dot diameter larger than the dot pitch creates a problem in halftone representation when printing devices are used. When a 2-by-2 matrix is used for halftone representation, for example, three halftones can be represented between 0 % and 100 % of the tone, i.e., halftones of 25 %, 50 %, and 75 % are represented. In order to represent the halftone of 25 %, for example, one of the four dots is printed. If the dot diameter is 1.4 times as large as the dot pitch, however, forming one dot in an attempt to achieve an area ratio of a dotted area to the total matrix area being 0.25 will result in an area ratio of 0.385. By the same token, an intended area ratio of 50 % will result in an area ratio of 0.77, and an intended area ratio of 75 % will end up bringing about an area ratio of 1.02. Accordingly, a tone curve needs to be defined by taking into consideration a dot diameter of a printing device when halftone representation is employed. Further, the number of dots printed in halftone representation should be decided based on actually printed lightness. Lightness, which is a measure derived from sensitivity characteristics of human vision, is supposed to be 100 when a surface is a perfectly diffuse reflector, and is zero when there is no reflection. Ideally, white on a printed surface corresponds to lightness of 100, and black on the printed surface is equal to lightness of zero. In actual printing devices, however, white with no printed dot corresponds to lightness of a paper surface, and approximately correspond to lightness of 90. Further, black created by forming all the dots corresponds to lightness of the black ink, and is approximately equal to lightness of 20. There is therefore a need to represent halftone images by using a tone curve which takes into account a dot diameter of a printing device that employs area-based halftone representation based on formation of dots. European Patent Application No. 0687102 discloses a method of generating a halftone image in which a plurality of tone curves are provided, each tone curve corresponding to a respective dot type. However, the tone curves do not take into account overlapping of printed dots. European Patent Application No. 0629079 discloses a method of generating a halftone image from a grey scale image using a dither matrix. The dither matrix comprises a plurality of patterns. The patterns in the dither matrix may be determined based on the tone reflectance of the patterns. It is a general object of the present invention to provide a method and apparatus for obtaining a plurality of tone curves which take into account the overlapping of printed dots. According to the first aspect of the present invention there is provided a method of obtaining a plurality of tone curves for use by a printer in halftone representation of image data, characterised by, for each tone curve: assigning dots to a unit area of the halftone representation in accordance with a dither matrix; dividing the unit area into micro blocks smaller in size than the dots; counting the number of micro blocks covered by the dots, taking into account overlap of the dots, thereby to determine a relationship between numbers of dots and the area occupied by the dots within the unit area; and forming the tone curve taking into account the relationship between numbers of dots and the area occupied by the dots within the unit area. In this method, the number of printed dots for representing a desired image level is determined based on an actual area ratio, thereby taking into account overlapping of dots caused by a dot diameter which is larger than a dot pitch. This achieves a high quality of printed images. The same improved results are obtained by an equivalent device. The method described above may further include a step of defining the plurality of tone curves such that white is equal to lightness of paper used for printing, and black is equal to lightness of black printed by the printer. In this method, the plurality of tone curves are defined based on lightness of actual print, rather than based on ideal conditions assuming a lightness of 100 for white and a lightness of 0 for black. This achieves a high quality of printed images. The same improved results are obtained by an equivalent device. Other objects and further features of the present invention will be apparent from the following detailed description when read in conjunction with the accompanying drawings, in which: Fig.1 is a block diagram of an embodiment of a printing device according to the present invention; Fig.2 is a block diagram showing control functions which are used when printing image data by using the personal computer and the printer of Fig.1; Fig.3 is an illustrative drawing for explaining an area ratio; Fig.4 is an illustrative drawing showing a dither matrix which defines an order of a dot arrangement; Fig.5 is a chart showing an example of a tone curve; Fig.6 is a chart showing a plurality of tone curves used in the embodiment of the present invention; Fig.7 is a table showing an example of criteria used for selecting a tone curve; and Fig.8 is a flowchart of a process of selecting a tone curve in which selection criteria of Fig.7 are used. In the following, an embodiment of the present invention will be described with reference to the accompanying drawings. Fig.1 is a block diagram of an embodiment of a printing device according to the present invention. The embodiment of Fig.1 takes an example of a printer connected to a personal computer. However, the present invention is not limited to this configuration, and is applicable to any printing devices which employ area-based halftone representation based on formation of dots. The printing device of Fig.1 includes a personal computer 10 and a printer 20 connected to the personal computer 10. The personal computer 10 includes a CPU 11, a RAM 12, a ROM 13, interfaces 14 and 15, and a secondary memory 16. The personal computer 10 is connected to a display device 21, an input device 22, and an external memory device 23 via the interface 14. The display device 21 displays various sorts of data when the personal computer 10 is operated, and includes a CRT display or the like. The input device 22 receives input data for operating the personal computer 10, and includes a keyboard and a mouse or the like. The external memory device 23 reads data from a memory medium 24 to feed the data to the personal computer 10, and writes data from the personal computer 10 in the memory medium 24. The printer 20 is connected to the interface 15. The printer 20 receives image data from the personal computer 10, and forms dots to represent the image data in halftone through area-based halftone representation. The printer 20 is controlled by a printer driver which is built in the personal computer 10. In the personal computer 10, software programs such as the printer driver and application programs are executed by the CPU 11. The CPU 11 executes the printer driver to control the printer 20 via the interface 15, and further controls the display device 21, the input device 22, and the external memory device 23 by using other control programs. The memory medium 24 provides software programs such as the printer driver and application programs, and includes a floppy disk, CD-ROM, or the like. The software programs are stored in the secondary memory 16 from the memory medium 24 via the external memory device 23. Programs stored in the secondary memory 16 are loaded into a memory space of the RAM 12, and are executed by the CPU 11. The ROM 13 stores basic programs or the like for controlling the personal computer 10. In the embodiment of the present invention, the printer driver for controlling the printer 20 includes data of a plurality of tone curves which take into account characteristics of the printer 20. When image data is printed, the CPU 11 selects an appropriate tone curve from the plurality of tone curves based on the characteristics of the image data. The printer driver controls the printer 20 to print the image data by using the selected tone curve. Fig.2 is a block diagram showing control functions which are used when printing the image data by using the personal computer 10 and the printer 20. A printer driver 30 of Fig.2 includes a tone-curve selecting unit 31, an input/output converting unit 32, and a plurality of tone curves 33 through 35. Although three tone curves are provided in this example, any number of tone curves may be provided in the present invention. The tone-curve selecting unit 31 selects one tone curve from the tone curves 33 through 35 based on the image data stored in an input-image-data memory 40, for example, which corresponds to the RAM 12 of Fig.1. By using the selected tone curve, the input/output converting unit 32 converts the image data from the input-image-data memory 40. The input/output converting unit 32 supplies the converted image data to an image memory 41 of the printer 20. The printer 20 prints the converted image data stored in the image memory 41. The tone curves 33 through 35 are generated by taking into account printing characteristics of the printer 20. In detail, they are generated by factoring in a ratio of a dot diameter to a dot pitch of the printer 20, actually printed lightness, etc. In this manner, the present invention prepares the plurality of tone curves taking into consideration the printing characteristics of the printer, and selects one of the tone curves based on the characteristics of the image data to be printed. This achieves optimum halftone representation which takes into account the printing characteristics of the printer as well as the characteristics of the image data, thereby providing high quality of printing. In what follows, a method of creating a plurality of tone curves which take into account the characteristics of the printer 20 will be described. Printing of monochrome image data is taken as an example for the sake of simplicity of explanation, and each pixel of the image data is assumed to have one of the 256 different levels ranging from 0 to 255. A relationship between an area ratio and the number of printed dots needs to be obtained in order to decide how many dots should be formed to achieve a given area ratio. As previously described, the ratio of the dot diameter to the dot pitch is not one, and, also, printed dots overlap with each other. Because of this, the relationship between the area ratio and the number of printed dots cannot be obtained as a simple formulae. In consideration of this, a computer simulation was conducted to represent 64 different tones by using an 8-by-8 matrix, and areas covered by printed dots within a matrix were counted. In order to count the areas, one dot interval is divided into micro blocks arranged in a 80-by-80 matrix. That is, the 8-by-8 matrix is divided into 8 x 8 x 80 x 80 of micro blocks. When the dot diameter is equal to the dot pitch, for example, creation of one dot will result in a circle having a diameter of 80 micro blocks. By counting the number of micro blocks covered by the printed dots, the printed area is measured. A given micro block may be printed more than once because of overlapping of the dots. Even in such a case, however, the area ratio can be measured without overcounting the overlapping dots. That is, the number of micro blocks covered by the printed dots are counted based on whether or not given blocks are covered, irrespective of how many times the given blocks are covered by the printed dots. In this simulation, 64 different tones were represented, and the number of micro blocks covered by the printed dots was counted with respect to each tone. The area ratio was obtained with respect to each tone as (the number of covered micro blocks / the number of total micro blocks within the matrix). Fig.3 is an illustrative drawing for explaining the area ratio. Fig.3 shows a case in which one dot pitch in a 4-by-4 matrix is comprised of 5-by-5 micro blocks. In Fig.3, two dots are formed. In this example, each of the dots has a circular shape having a diameter of 7 (= 1.4 x 5) micro blocks. In Fig.3, the number of micro blocks covered by the two dots are 66, and, thus, the area ratio is obtained as 0.165 (= 66 /(20 x 20)). In this simulation, a concentrated dither matrix of a 106-line-45° type was used for defining an order in which dots were printed. Fig.4 is an illustrative drawing showing this dither matrix which defines the order of the dot arrangement. As a tone changes from a whiter side to a blacker side by one tone, a new dot is created in an order shown in Fig.4. Since the order of the dot arrangement affects the overlapping of the dots, an order in which dots are printed should be decided beforehand as described above. The computer simulation was conducted with respect to different parameter values by using (dot diameter / dot pitch) as a parameter. This parameter was set to range between 1 and 2. That is, considered cases included a case in which the dot diameter was equal to the dot pitch at one extreme and a case in which the dot diameter was twice as large as the dot pitch at the other extreme, and included several intervening cases. Results of the simulation were plotted as a relation between the area ratio and the number of dots, and a second-order regression curve was fitted to obtain the following approximations. Dot Diameter Approximation 2.0 a=-1.7947x10 -4 X 2 +2.6290x10 -2 X+5.4931x10 -2 (1) 1.8 a=-1.4188x10 -4 X 2 +2.4274x10 -2 X+3.5532x10 -2 (2) 1.7 a=-1.2262x10 -4 X 2 +2.3195x10 -2 X+2.7355x10 -2 (3) 1.6 a=-1.0256x10 -4 X 2 +2.2038x10 -2 X+2.0069x10 -2 (4) 1.4 a=-5.9065x10 -5 X 2 +1.9389x10 -2 X+9.0917x10 -3 (5) 1.2 a=-1.9519x10 -5 X 2 +1.6069x10 -2 X+3.0519x10 -3 (6) 1.0 a=-3.4833x10 -8 X 2 +1.2247x10 -2 X+6.8384x10 -6 (7) In these approximations, X indicates the number of the dots (from 1 to 64), and a indicates the area ratio. For example, the area ratio when the number of the dots is 10 is obtained by substituting 10 into X in the above approximations. When the dot diameter of the printer 20 is 1.4 dot pitches, for example, the approximation for the dot diameter of 1.4 is used. In the manner as described above, the relationship between the area ratio and the number of printed dots is obtained. In what follows, a relationship between the area ratio and lightness L* will be obtained. This relationship can be derived from the Yule-Nielsen formulae. The Yule-Nielsen formulae is represented as: ODs = -n Log {1 - a (1 - 10 -(ODs/n) )} where, L = 116(Y/Y0) 1/3 - 16 ODs = - Log(Y/Y0) wherein L is lightness, a is the area ratio, n is a Yule-Nielsen coefficient, and ODs is a maximum density. Y is a measured Y value, and Y0 is a base value of the Y value. From the equation (8), (9), and (10), (L+16)/116 3/n = 1 - a ( 1- 10 -(ODs/n) ) is obtained. Solving this equation with respect to the area ratio a, a = {1 - (L+16)/116 3/n }/(1 - 10 -(ODs/n) ) is obtained. In the embodiment, the Yule-Nielsen coefficient is set to 2.7, and the maximum density ODs is 1.4. The equation (12) gives a relation between the area ratio a and the lightness L, and becomes zero when the lightness L is 100. As previously noted, however, a white sheet of paper used in printing has a lightness of approximately 90, which is smaller than the ideal lightness of 100. In consideration of this, 116 in the equation (12) is replaced by (LW + 16) in order to have a zero area ratio at the lightness of white paper LW. This achieves a condition in which the number of printed dots is zero when the lightness of white paper LW is required. After this replacement, a relation between the area ratio a and the lightness L is obtained as: a={1 - (L+16)/(LW+16) 3/n }/(1 - 10 -(ODs/n) ) When the lightness of white paper LW is 90, (LW + 16) equals to 106. According to the equation (13), therefore, the area ratio a is zero, i.e., the number of formed dots is zero, when the lightness L of 90 is required. It is assumed that the area ratio a is 1.0 with respect to the darkest black regardless of an actual lightness L of the printed black. This is because it is necessary to prevent white dots from appearing due to the absence of black dots when the printed area is supposed to be completely black. In this manner, a relation between the area ratio and the lightness is established such that the area ratio becomes zero when the lightness of the white paper is required, and the area ratio becomes 1.0 when the maximum density is required. The relation between the area ratio and the number of printed dots as well as the relation between the area ratio and the lightness are used for obtaining a relation between the number of printed dots and the lightness. This gives an answer to how may dots need to be created when a given lightness is required. A relation between a desired lightness and an image-data level is provided as a tone curve which defines a lightness that should be allocated to a given level of image data. In order to realize level-to-lightness conversion characteristics specified by the tone curve, an appropriate number of dots should be printed in view of a given level of image data so as to achieve a desired lightness. Since the relation between the lightness and the number of printed dots is already known as described above, an appropriate dither matrix can be created to print an appropriate number of dots with respect to a given level of image data. Namely, this dither matrix achieves the level-to-lightness conversion characteristics of the tone curve. Fig.5 is a chart showing an example of a tone curve. A dither matrix matching the tone curve of Fig.5 is created as follows. First, the image levels ranging from 0 to 255 are converted into 64 image levels between 0 and 63, and, then, a lightness is obtained with respect to each image level by using the tone curve. Next, an area ratio which is needed to achieve the obtained lightness is derived by using the equation (13). Finally, the number of printed dots which attains the obtained area ratio is obtained by using one of the equations (1) through (7). In this manner, it is decided as to how may dots need to be formed with respect to each level of the 64 image levels. That is, an 8-by-8 dither matrix corresponding to the tone curve of Fig.5 is obtained. A 16-by-16 dither matrix may be created by dividing each interval between the threshold values of the 8-by-8 matrix into four equal intervals. It is apparent, however, that equations corresponding to the equations (1) through (7) can be prepared with regard to a 16-by-16 matrix. In this manner, a 16-by-16 dither matrix can be directly obtained without deriving an 8-by-8 dither matrix as an intermediary. As described above, a dither matrix which matches a desired tone curve is obtained by taking into consideration a ratio between the dot diameter and the dot pitch in a printer as well as an actual printed density of the printer. Fig.6 is a chart showing a plurality of tone curves used in the embodiment of the present invention. As shown in an example of Fig.6, four tone curves are provided for four different images, which include a general image, a dark image, an intermediate image, and a bright image. In order to decide which tone curve is to be used, a check is made whether a given pixel of image data belongs to a dark-level region, an intermediate-level region, or a bright-level region, which divide the levels between 0 and 255 into three regions. The decision is made based on a balance between the numbers of pixels in the three regions. The dark-level region, the intermediate-level region, and the bright-level region range from 0 to 85, from 86 to 170, and from 171 to 255, for example. Fig.7 is a table showing an example of criteria used for selecting a tone curve. All pixels of an image are checked as to what levels they are. If pixels in the bright-level region account for 60 % of the total and those in the dark-level region account for 3 %, for example, a tone curve for a bright image is selected. When the distribution of pixel levels does not match any one of conditions shown in Fig.7, a tone curve for a general image is selected. Fig.8 is a flowchart of a process of selecting a tone curve in which the selection criteria shown in Fig.7 are used. At a step S1, a level of a pixel stored in a bitmap memory is checked, and a count of this level is incremented by 1. At a step S2, a check is made whether the writing of image data into the bitmap memory is finished. If it is, the procedure goes to a step S4. Otherwise, the procedure goes to a step S3. At a step S3, a next pixel is stored in the bitmap memory. The procedure goes back to the step S1. At a step S4, a sum of counts is obtained with respect to levels between 0 and 85. This sum is denoted as "dark". That is, the number of pixels which belong to the dark-level region is obtained as "dark". At a step S5, a sum of counts is obtained with respect to levels between 86 and 170. This sum is denoted as "mid". That is, the number of pixels which belong to the intermediate-level region is obtained as "mid". At a step S6, a sum of counts is obtained with respect to levels between 171 and 245. This sum is denoted as "bright". That is, the number of pixels which belong to the bright-level region is obtained as "bright". At a step S7, the sum of "dark", "mid", and "bright" is calculated to obtain the total number of pixels, which is denoted as "all". At a step S8, a check is made whether the number of pixels in the dark-level region exceeds 50 % of the total (dark/all ≥ 0.5) and the number of pixels in the bright-level region falls short of 5 % of the total (bright/all < 0.05). If the answer is affirmative, the procedure goes to a step S9. Otherwise, the procedure goes to a step S10. At a step S9, a tone curve for a dark image is selected from the plurality of tone curves. At a step S10, a check is made whether the number of pixels in the bright-level region exceeds 50 % of the total (bright/all ≥ 0.5) and the number of pixels in the dark-level region falls short of 5 % of the total (dark/all < 0.05). If the answer is affirmative, the procedure goes to a step S11. Otherwise, the procedure goes to a step S12. At a step S11, a tone curve for a bright image is selected from the plurality of tone curves. At a step S12, a check is made whether the number of pixels in the intermediate-level region exceeds 90 % of the total (mid/all ≥ 0.9). If it does, the procedure goes to a step S13. Otherwise, the procedure goes to a step S14. At the step S13, a tone curve for an intermediate image is selected from the plurality of tone curves. At a step S14, a tone curve for a general image is selected from the plurality of tone curves. This ends the procedure. As described in the above, the present invention provides a plurality of tone curves which are tailored for different images of different characteristics, and creates dither matrixes for these tone curves by taking into account a ratio between the dot diameter and the dot pitch of the printer as well as actual printed densities of the printer. At the time of printing, image characteristics are checked to select an appropriate tone curve from the plurality of tone curves, and image data is printed by using the selected tone curve. This makes it possible to achieve optimum halftone representation which takes into account the image characteristics of the image data and the printing characteristics of the printer, thereby producing a high-quality print.

Claims: A method of obtaining a plurality of tone curves (33, 34, 35) for use by a printer in halftone representation of image data, characterised by , for each tone curve: assigning dots to a unit area of the halftone representation in accordance with a dither matrix; dividing the unit area into micro blocks smaller in size than the dots; counting the number of micro blocks covered by the dots, taking into account overlap of the dots, thereby to determine a relationship between numbers of dots and the area occupied by the dots within the unit area; and forming the tone curve taking into account the relationship between numbers of dots and the area occupied by the dots within the unit area. A method according to claim 1 wherein the step of forming the tone curve comprises taking into account printed lightness achievable by the printer. A method according to claim 2 wherein the step of forming the tone curve comprises defining the tone curve such that white is equal to lightness of paper used for printing, and black is equal to lightness of black printed by the printer. A method according to any of the preceding claims, being a method of achieving halftone representation of image data by using a printer (20) for printing the image data, the method further comprising the steps of: selecting a tone curve from the plurality of tone curves; and printing the image data by using the selected tone curve. A method according to claim 4 wherein the step of selecting a tone curve comprises selecting the tone curve from the plurality of tone curves based on characteristics of the image data. A method according to claim 5 wherein the step of selecting a tone curve comprises the steps of: obtaining a density histogram of the image data; and selecting the tone curve from the plurality of tone curves based on a percentage of pixels in the image data which fall within a predetermined range of densities in the density histogram. A computer readable storage medium comprising processor implementable instructions and adapted for causing a computer to carry out each of the steps of the method of any of claims 1 to 6. A computer program which, when executed on a computer, causes it to carry out each of the steps of the method of any of claims 1 to 6. Apparatus for obtaining a plurality of tone curves (33, 34, 35) for use by a printer in halftone representation of image data, characterised by : means for assigning dots to a unit area of the halftone representation in accordance with a dither matrix; means for dividing the unit area into micro blocks smaller in size than the dots; means for counting the number of micro blocks covered by the dots, taking into account overlap of the dots, thereby to determine a relationship between numbers of dots and the area occupied by the dots within the unit area; and means for forming the tone curves taking into account the relationship between numbers of dots and the area occupied by the dots within the unit area. Apparatus according to claim 9 wherein the means for forming the tone curves is arranged to take into account printed lightness achievable by the printer. Apparatus according to claim 10 wherein the means for forming the tone curves is arranged to define the plurality of tone curves such that white is equal to lightness of paper used for printing, and black is equal to lightness of black printed by the printer. Apparatus according to any of claims 9 to 11, being an apparatus for printing image data by using halftone representation, the apparatus further comprising: storage means (12) for storing the plurality of tone curves (33, 34, 35); selection means (31) for selecting a tone curve from the plurality of tone curves (33, 34, 35); and control means (11) for printing the image data by using the selected tone curve. Apparatus according to claim 12 wherein the selection means comprises means for selecting the tone curve from the plurality of tone curves (33, 34, 35) based on characteristics of the image data. Apparatus according to claim 13 wherein the selection means comprises: means for obtaining a density histogram of the image data; and means for selecting the tone curve from the plurality of tone curves based on a percentage of pixels in the image data which fall within a predetermined range of densities in the density histogram.

Inventors: AINAI SHIGERU, HORIE HIROMITSU, KAMATA TAKAO, OSHIO HIROSHI, SATO KAZUHIKO, AINAI, SHIGERU, HORIE, HIROMITSU, KAMATA, TAKAO, OSHIO, HIROSHI, SATO, KAZUHIKO
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1997
Main classification: H04N1
IPC codes: H04N1, B41J2, G06T5