Image processing device, image processing method and program
Patent Information
- Application Number
- JP2023003732
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2026-01-21
AI Technical Summary
Existing methods for converting full-color images to monochrome result in reduced color discrimination due to uneven gray value allocation, leading to a significant change in the impression of the original image.
An image processing device that includes a conversion unit to transform multidimensional color components into gray values, with a correction mechanism that adjusts gray value differences based on the number of colors in the image, ensuring that differences are maintained or adjusted to improve discriminability without altering the original impression.
The method produces a grayscale image with enhanced color discrimination while preserving the original impression of the full-color image.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image processing technique for printing a full-color document in monochrome. [Background technology]
[0002] In a typical office, documents such as presentation materials created using a document creation application are usually created in full color. However, even if a document image is created in full color, there are many cases where it is printed in monochrome (black only). When printing a full-color document image (hereinafter referred to as a "color image") in monochrome, a grayscale conversion process is required to convert the color values of the color image to monochrome. For example, when a color image having color values in the RGB color space is printed in monochrome, a weighting operation using the NTSC weighted average method is performed on the RGB values to convert them to gray values representing brightness. In this case, if colors with completely different RGB values in the color image become the same or similar gray values after conversion, the color discrimination of the color image will decrease in the grayscale image. This problem of decreased color discrimination can also occur in other grayscale conversion methods such as sRGB and RGB uniform. In this regard, Patent Document 1 discloses a technology that uses a conversion table in which the gray values after conversion are separated from each other when the number of colors used in the color image is equal to or less than a certain number. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2017-38242 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the technology of the above-mentioned Patent Document 1, conversion is performed so that the difference between adjacent gray values in a grayscale image is constant regardless of the original RGB values. Here, for example, assume that the original color image is composed of only a plurality of light chromatic colors or a plurality of dark chromatic colors. In this case, gray values are assigned so that they are evenly spaced at intervals that are a division of "0 (black)" to "255 (white)" according to the number of colors. However, this can cause a case where a dark gray value is assigned to an originally light color due to its relationship with other colors, or vice versa, a case where a light gray value is assigned to an originally dark color due to its relationship with other colors. For this reason, although the discrimination ability of the converted grayscale image is improved, the impression may be significantly different from the original color image. [Means for solving the problem]
[0005] The image processing device according to the present disclosure is an image processing device for printing a color image in monochrome, and includes a conversion means for converting multi-dimensional color component values that specify the colors contained in the color image into gray values, and a correction means for correcting the gray values obtained by the conversion means, wherein when the color image includes a plurality of colors, the correction means calculates a gray value difference representing the difference between two adjacent gray values for a plurality of gray values that correspond to the plurality of colors and are arranged in order of magnitude, and when the calculated gray value difference is smaller than a threshold value, changes the corresponding gray value so that the gray value difference becomes the same value as the threshold value, and when the calculated gray value difference is larger than the threshold value, changes the corresponding gray value so that the gray value difference becomes smaller according to its magnitude. Effect of the Invention
[0006] According to the present disclosure, it is possible to obtain a grayscale image with improved distinctiveness without significantly changing the impression from the original color image. [Brief description of the drawings]
[0007] [Figure 1]FIG. 2 is a block diagram showing an example of a hardware configuration of a printing system. [Diagram 2] FIG. 2 is a block diagram showing an example of a software configuration related to the printing function of the host PC and the MFP. [Diagram 3] 13A and 13B are diagrams showing an example of a UI screen of a printer driver. [Figure 4] FIG. 4A is a diagram showing an example of a group of drawing commands, FIG. 4B is a diagram showing an example of a raster image, and FIGS. 4C and 4D are diagrams showing examples of grayscale images. [Diagram 5] 11 is a flowchart showing the flow of a grayscale conversion process. [Figure 6] 4A to 4D are diagrams showing examples of color value lists. [Figure 7] 11 is a flowchart showing details of a distinctiveness improvement process. [Figure 8] 11 is a graph illustrating the difference between the conventional method and the present method. [Figure 9] (a) to (d) are plots of gray values on number lines. [Figure 10] 13A and 13B are diagrams showing an example of an LUT. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] Hereinafter, the embodiments of the present invention will be described with reference to the drawings. Note that the following embodiments do not limit the invention according to the claims, and all of the combinations of features described in the embodiments are not necessarily essential to the solution of the invention.
[0009] [Embodiment 1] <Printing system configuration> 1 is a block diagram showing an example of a hardware configuration of a printing system according to the present embodiment. The printing system includes an MFP 100 as an image forming apparatus and a host PC 120 as an information processing apparatus, and the MFP 100 and the host PC 120 are connected via a network 130 such as a LAN.
[0010] <MFP hardware configuration> The MFP 100 includes a CPU 101, a ROM 102, a RAM 103, a mass storage device 104, a UI unit 105, an image processing unit 106, an engine interface (I / F) 107, a network I / F 108, and a scanner I / F 109. These units are connected to each other via a system bus 110. The MFP 100 also includes a printer engine 111 and a scanner unit 112. The printer engine 111 and the scanner unit 112 are connected to the system bus 110 via the engine I / F 107 and the scanner I / F 109, respectively. The image processing unit 106 may be configured as an image processing device (image processing controller) independent of the MFP 100.
[0011] The CPU 101 controls the overall operation of the MFP 100. The CPU 101 executes various processes described below by reading out a program stored in the ROM 102 into the RAM 103 and executing it. The ROM 102 is a read-only memory, and stores a system startup program or a program for controlling the printer engine, character data, character code information, and the like. The RAM 103 is a volatile random access memory, and is used as a work area for the CPU 101 and a temporary storage area for various data. For example, the RAM 103 is used as a storage area for storing font data additionally registered by downloading, or image files received from an external device, and the like. The mass storage device 104 is, for example, an HDD or SSD, and various data is spooled and used to store programs, various tables, information files, image data, and the like, and as a work area.
[0012] The UI (user interface) unit 105 is composed of, for example, a liquid crystal display (LCD) equipped with a touch panel function, and displays a screen for notifying the user of the setting state of the MFP 100, the status of processing in progress, error states, etc. The UI unit 105 also accepts various user instructions, such as input of various setting values of the MFP 100 and selection of various buttons, via a predetermined user interface screen (GUI). The UI unit 105 may also be equipped with a separate input device such as a hard key.
[0013] The image processing unit 106 analyzes drawing data written in PDL (hereinafter referred to as "PDL data") input from the host PC 120 via the network 130, and generates print image data that can be processed by the print engine 111. Note that PDL is an abbreviation for Page Description Language. The image processing unit 106 also performs predetermined image processing when transmitting image data stored by the BOX function to an external device. Details of the image processing unit 106 will be described later.
[0014] The engine I / F 107 is an interface for controlling the printer engine 111 in response to an instruction from the CPU 101 when printing is performed. An engine control command and the like are transmitted and received between the CPU 101 and the printer engine 111 via the engine I / F 107. The network I / F 108 is an interface for connecting the MFP 100 to a network 130. The network 108 may be, for example, a LAN or a telephone line network (PSTN). The printer engine 111 forms a multi-color image on a recording medium such as paper using color materials (here, toner) of multiple colors (here, four colors of CMYK) based on the print image data provided from the image processing unit 106. The scanner I / F 109 functions as an interface for controlling the scanner unit 112 in response to an instruction from the CPU 101 when the scanner unit 112 reads an original. A scanner unit control command and the like are transmitted and received between the CPU 101 and the scanner unit 112 via the scanner I / F 109. Under the control of the CPU 101 , the scanner unit 112 optically reads an original, generates image data (scanned image data), and transmits the image data to the RAM 103 or the mass storage device 104 via the scanner I / F 109 .
[0015] <Host PC hardware configuration> The host PC 120 includes a CPU 121, a ROM 122, a RAM 123, a mass storage device 124, a UI unit 125, and a network I / F 126. These units are connected to each other via a system bus 127. The CPU 121 is a processor that controls the operation of the entire host PC 120, and executes various processes by reading out a control program and an application program stored in the ROM 122. The RAM 123 is used as a temporary storage area such as a main memory and a work area of the CPU 121. The mass storage device 124 is, for example, an HDD or SSD, and stores various programs such as a printer driver, as well as image data. The UI (user interface) unit 125 is, for example, an LCD monitor, a keyboard, and the like, and is used to display various GUIs and accept user instructions. The network I / F 126 is an interface that connects the host PC 120 to the network 130. The host PC 120 transmits PDL data generated using an installed printer driver to the MFP 100 via the network I / F 126, and causes the MFP 100 to execute a print process. It also receives image data transmitted from the MFP 100 via the network I / F 126 and performs editing, display, and the like.
[0016] <Printing system functional configuration> 2 is a block diagram showing an example of a software configuration related to the printing function of the host PC 120 and the MFP 100. An overview of the printing system according to this embodiment will be described with reference to FIG.
[0017] The host PC 120 has an application 201 and a printer driver 202. The user creates document data such as presentation materials using the application 201 installed on the host PC 120. Then, using the printer driver 202, print instruction data (generally called a "print job") for the document data is generated. In a print job, the content to be printed according to object attributes such as text, graphics, and images is defined in page units by a page description language (PDL). The generated print job is sent to the MFP 100. These series of processes are realized by the CPU 121 expanding the program stored in the ROM 122 of the host PC 120 into the RAM 123 and executing it.
[0018] The MFP 100 has a command processing unit 210 and a print image processing unit 220 corresponding to the aforementioned image processing unit 106. The print job received from the host PC 120 is analyzed by the command processing unit 210, and raster-formatted image data is generated. Then, in the print image processing unit 220, predetermined image processing is performed on the raster image to generate print image data. The generated print image data is sent to the printer engine 111 for printing output. These series of processes are realized by the CPU 101 expanding the program stored in the ROM 102 of the MFP 100 into the RAM 103 and executing it.
[0019] <Details of the Functional Configuration of the MFP> The print job received from the host PC 120 is input to the command processing unit 210. The command processing unit 210 is composed of a PDL type discrimination unit 211, a command analysis unit 212, and a RIP unit 213.
[0020] ≪Command Processing Unit≫ The PDL type determination unit 211 determines the type of PDL used in a print job. Examples of PDL types include PostScript (PS) and Printer Command Language (PCL). The command analysis unit 212 extracts commands corresponding to the PDL type identified by the PDL type determination unit 211 from the print job and analyzes the content to be printed. First, the commands are classified into control commands and drawing commands.
[0021] The control command is a command that specifies printing conditions, etc. For example, the control command includes information such as paper size, imposition, and color mode specified by the user via a UI screen 300 of the printer driver 202 as shown in FIG. 3(a). In the case of the UI screen 300, the user selects a desired color mode from three types, namely, "black and white," "color," and "automatic (color / black and white)." Then, when "black and white," for example, is selected from a pull-down menu 301 for the color mode, the user continues by selecting whether or not to perform distinctiveness improvement processing. Specifically, in the UI screen 310 after the screen transition, one of three types, namely, "no," "density adjustment," and "border emphasis," is selected from a pull-down menu 311 for color data processing in black and white. Here, when "no" is selected, a print job is generated in which the color of each object in the page is specified by a one-dimensional gray value (RGB equivalent). On the other hand, when "density adjustment" or "border emphasis" is selected from the pull-down menu 311, a print job is generated in which the color of each object is specified by a three-dimensional RGB value, as in the case when "color" is selected as the color mode. That is, in this embodiment, when "density adjustment" or "border emphasis" is specified during monochrome printing, a print job similar to that during color printing is generated, and grayscale conversion is performed by the image forming apparatus 101. Note that the color of each object in a print job during color printing and monochrome printing involving distinctiveness improvement processing only needs to be specified by multi-dimensional color component values corresponding to a predetermined color space, and is not limited to RGB values.
[0022] The drawing commands include a color mode setting command for setting the color mode of the job, and a color setting command for setting the color. In addition, there are a graphic drawing command for drawing a graphic object, a character drawing command for drawing a character object, a size setting command for setting the character size of a character object, and a font setting command for setting the font of a character object. In addition, there are commands for setting coordinates and line thickness, and commands for drawing images. FIG. 4(a) is a diagram showing an example of a group of drawing commands corresponding to an image of one page (page image). Note that this is based on the premise that each pixel is a full-color page image with an 8-bit RGB value. The third command in the group of drawing commands shown in FIG. 4(a), “Set Color(255,100,100)”, indicates that the RGB values are set to vermilion with R=255, G=100, and B=100. The fourth command, “Draw Retangle(coordinates (X1,Y1), coordinates (X2,Y2), fill)”, specifies that a rectangular object specified by the upper left coordinates (X1,Y1) and lower right coordinates (X2,Y2) should be drawn. The fifth command, “Set Text Size(Z)”, specifies the font size, and the sixth command, “Set Color(200,96,255)”, specifies the font color to purple with R=200, G=96, B=255. The seventh command, “Draw Text(coordinates (X3,Y3), “A”)”, specifies that the capital letter “A” should be drawn at the coordinates (X3,Y3).
[0023] The RIP unit 213 performs drawing processing based on the analysis result of the command analysis unit 212, and generates a raster image in which each pixel has an RGB value in the case of color printing, and generates a raster image in which each pixel has a gray value in the case of monochrome printing. FIG. 4(b) shows a raster image for one page generated in accordance with the drawing command group in FIG. 4(a) described above. In the raster image in FIG. 4(b), a rectangle 401 indicated by a diagonal line slanting downward to the right is a vermilion rectangular graphics object drawn by the third and fourth commands in the drawing command group in FIG. 4(a). Moreover, a capital alphabet "A" 402 formed inside the rectangle 401 is a purple text object drawn by the fifth to seventh commands in the drawing command group in FIG. 4(a). Although the corresponding command is not shown in FIG. 4(a), a rectangle 403 indicated by a diagonal line slanting downward to the left in the raster image of FIG. 4(b) is a rectangular graphics object drawn in gray with (R,G,B)=(144,144,144). A capital alphabet "B" 404 formed inside the rectangle 403 is a text object drawn in yellow-green with (R,G,B)=(112,173,71). Furthermore, although the corresponding command is not shown in FIG. 4(a), a rectangle 405 indicated by a grid in the raster image of FIG. 4(b) is a rectangular graphics object drawn in light blue with (R,G,B)=(91,155,213). A capital alphabet "C" 406 formed inside the rectangle 405 is a text object drawn in orange with (R,G,B)=(220,120,40). The background 400 is drawn in white with (R,G,B)=(255,255,255), and the ruled lines 407 are drawn in black with (R,G,B)=(0,0,0). When generating a raster image, the RIP unit 213 also generates attribute information that indicates the attributes of objects included in the raster image on a pixel-by-pixel basis. The generated raster image and attribute information are sent to the print image processing unit 220.
[0024] <Print image processing section> The print image processing unit 220 is made up of a color conversion processing unit 221, a filter processing unit 222, a gamma processing unit 223, and a dither processing unit 224. Each unit in the print image processing unit 220 will be described below.
[0025] The color conversion processing unit 221 performs color conversion processing on the raster image generated by the RIP unit 213 , and converts the color value of each pixel into a CMYK value corresponding to the color material used in the printer engine 111 .
[0026] The filter processing unit 222 performs filter processing such as sharpness processing on the raster image in which each pixel has a CMYK value, which has been color converted by the color conversion processing unit 221. Note that a raster image generated by the RIP unit 213 may be subjected to filter processing and then color conversion processing to obtain a raster image in which each pixel has a CMYK value.
[0027] The gamma processing unit 223 performs gamma correction on the filtered raster image to achieve smooth gradation characteristics according to the color reproduction characteristics of the printer engine 111. This gamma correction typically uses a one-dimensional LUT (lookup table).
[0028] The dithering processor 224 performs dithering on the gamma-corrected raster image to generate a halftone image in which each pixel is expressed in halftone. The generated halftone image data is sent to the printer engine 111 as print image data.
[0029] <Grayscale conversion process details> Next, the grayscale conversion process for converting a color image to monochrome in the command analysis unit 212 will be described. In this embodiment, grayscale conversion process is realized that improves the distinctiveness of the converted gray values while not impairing the impression of the original color image. Figure 5 is a flowchart showing the general flow of the grayscale conversion process according to this embodiment. In the following description, the symbol "S" means a step.
[0030] In S501, a color value list for the page to be printed is created based on the drawing command included in the input print job. Specifically, the color values (RGB values) specified in the color setting command are extracted, and the extracted color values are associated with each object and added to the list.
[0031] In S502, a primary conversion process is performed to convert the RGB values of each record in the color value list created in S501 into gray values. This primary conversion process uses, for example, the NTSC weighted average method. Specifically, conversion is performed using a weighting calculation using the following formula (1). Gray=0.299R+0.587G+0.114B...Formula (1) In the above formula (1), R represents Red, G represents Green, and B represents Blue, and the gray value obtained by the weighted calculation is stored in a color value list. Note that the method used for the primary conversion process may be another method such as sRGB or RGB uniformity shown in the following formula (2) or formula (3). sRGB:Gray=0.21R+0.72G+0.07B...Formula (2) RGB uniform: Gray = (R + G + B) / 3 Equation (3)
[0032] In S503, the records included in the color value list are sorted based on the gray value. In this embodiment, the gray values of each object are sorted in ascending order from the top to the bottom. FIG. 6(a) shows an example of a color value list generated based on the drawing commands of FIG. 4(a) obtained by the above processes, where "255" represents white and "0" represents black. In the color value list of FIG. 6(a), the IDs "0" to "7" for identifying each color correspond to the background 400, the three rectangles 401, 403, and 405, the three alphabetical characters 402, 404, and 406, and the ruled line 407 in the raster image of FIG. 4(b). The generated color value list is stored in the RAM 107. Note that the sorting process at this timing is not essential, and may be performed in the distinctiveness improvement process described later, specifically, before the start of S703 in the flowchart of FIG. 7.
[0033] In S504, a secondary conversion process (distinctness improvement process) is executed to improve the distinctiveness of colors in the grayscale image by modifying each gray value included in the color value list obtained by the processes of S501 to S503 as necessary. Here, the distinctiveness improvement process according to this embodiment will be described in detail with reference to the flowchart of FIG.
[0034] <Discrimination improvement processing> In the distinctiveness improvement process, the difference between adjacent gray values in the gray value list is corrected to improve distinctiveness. In detail, a distinguishable gray value difference (threshold) is defined in advance, and a gray value difference smaller than the threshold is corrected to be increased to the threshold, and a gray value difference larger than the threshold is corrected to be decreased according to its magnitude. FIG. 7 is a flowchart showing the details of the distinctiveness improvement process according to this embodiment. The following description will be given with reference to the flowchart in FIG. 7, taking as an example a case where the process is applied to the color value list shown in FIG. 6(a) described above. In the following description, the symbol "S" means a step.
[0035] In S701, the ID of the color value list to be processed is referenced to determine whether the number of colors in the color value list is greater than the expected number of colors. Here, the number of colors in the color value list is synonymous with the number of colors contained in the image to be printed. The expected number of colors means the number of colors that can be discriminated when a gray value difference (=threshold) required to discriminate each gray value after grayscale conversion is set, and is expressed by the following formula (4). Expected number of colors = (number of representable tones / threshold) + 1 Equation (4) For example, if the number of expressible gradations is 256 and the threshold value is 16, the number of expected colors will be 17 according to the above formula (4). This means that when the number of colors in the color value list is in the range of 3 to 17 colors, including white (R=255, G=255, B=255) and black (R=0, G=0, B=0), the portion where the gray value difference is less than the threshold value can be increased up to the threshold value of "16". If the result of the determination is that the number of colors in the color value list is more than the expected number of colors, the process proceeds to S702, and if it is less than the expected number of colors, the process proceeds to S703.
[0036] In S702, the threshold is changed. The changed threshold is calculated by the following formula (5). Changed threshold value = 256 / (number of colors in the color value list - 1) Equation (5) The reason for changing the threshold value by the above formula (5) is as follows. For example, when each pixel has an 8-bit gray value, it is assumed that the difference of "16" out of 256 gradations from "0 to 255" is discriminable, although this depends on the performance of the printer engine 111 of the MFP 100. In this case, if the threshold value is set to "16" and the difference between adjacent gray values in the color value list is smaller than the threshold value, the difference is expanded to the threshold value to improve discriminability. However, if the number of colors in the color value list is more than 17 colors, the interval between colors becomes more than 16. As a result, if the gray value difference smaller than the threshold value is expanded to the threshold value while keeping the threshold value set to "16", it will not fit within the range of 256 gradations, which is the number of gradations that the printer engine 111 can express. Therefore, if the number of colors in the color value list is more than the expected number of colors, the threshold value is changed to a smaller value according to the number of colors in the color value list, so that the difference fits within the range of 256 gradations. For example, if the number of colors in the color value list is 33, there are 32 intervals in the 256 gradations, so 256 / 32=8 is set as the changed threshold value. In this case, although the originally planned distinctiveness cannot be achieved, it is possible to improve distinctiveness compared to conventional grayscale conversion processing.
[0037] In S703, the difference between a gray value of interest and the next gray value (adjacent gray value) among the sorted gray values stored in the color value list is calculated. In this case, the gray values may be determined as the gray values of interest in the color value list in order starting from the top of the color value list. For example, in the color value list of FIG. 6(a), the difference between the gray value "255" of the top record ID=0 and the gray value "146" of the next record ID=1 is 255-146=109. Also, in the color value list of FIG. 6(a), the difference between the gray value "146" of the second record ID=1 and the gray value "145" of the next record ID=2 is 146-145=1. The gray value difference calculated in this way is stored in the RAM 103 in association with the two adjacent gray values (i.e., the gray value of interest and its adjacent gray value) that are the subject of the calculation.
[0038] In S704, the difference between the gray value difference calculated in S703 and a preset threshold value is calculated. For example, if the preset threshold value is "16", then when the gray value difference is "109", the difference from the threshold value is 109-16=+93, and when the gray value difference is "1", the difference from the threshold value is 1-16=-15. The "difference between the gray value difference and the threshold value" thus obtained is stored in the RAM 103 in association with the gray value difference that was the subject of the calculation.
[0039] In S705, it is determined whether there are any unprocessed gray values in the color value list. If the gray value differences and the differences between the gray values and the threshold values have all been calculated for all gray values in the color value list, the process proceeds to S706. On the other hand, if there are any gray values remaining in the color value list that have not yet been processed as a target gray value, the process returns to S703, where the next target gray value is determined and the process continues. Note that for the bottommost value in the color value list (the smallest gray value, "0" in the example of FIG. 6(a)), the gray value difference and the difference between the gray value and the threshold value have been calculated in the previous process, so there is no need to process it as a target gray value.
[0040] In S706, it is determined whether or not there is any gray value difference calculated from the color value list that needs to be corrected. Specifically, if there is at least one gray value difference smaller than the threshold (i.e., if there is at least one gray value difference whose value calculated in S704 is a negative value), it is determined that there is a gray value difference that needs to be corrected. If the result of the determination is that there is no gray value difference that needs to be corrected, the distinctiveness improvement process is terminated. On the other hand, if there is at least one gray value difference that needs to be corrected, the process proceeds to S707.
[0041] In S707, when each gray value difference smaller than the threshold is corrected to be expanded to the threshold, the total value (total change amount) of the expanded amount by the correction is calculated. In this embodiment, the total of the negative values among the values calculated in S704 is calculated. In the example of FIG. 6(a) described above, the gray value difference is less than the threshold for each combination of IDs "1 and 2", "2 and 3", "3 and 4", "4 and 5", and "5 and 6", and the gray value difference is "1" for each of them. And when each of these gray value differences = 1 is expanded to the threshold = 16, the total change amount is the absolute value of (1-16) x 5 = -75, so it is "75".
[0042] In S708, in order to absorb the total change amount calculated in S707 within the number of gradations that the printer engine 111 can express (256 gradations in this embodiment), the change amount of the total change amount is distributed to each gray value difference that is greater than the threshold. Then, in S711 described later, the gray value corresponding to the target gray value difference is changed based on the change amount distributed in this step. Taking the case of FIG. 6(a) described above as an example, the total change amount required to change all gray value differences smaller than the threshold to the same value as the threshold is "75". In this case, in order to absorb "75" within 256 gradations, the total change amount is reduced by "75" at all locations of gray value differences greater than the threshold. Now, in the color value list of FIG. 6(a), the combination of IDs "0 and 1" (255-146=109) and the combination of IDs "6 and 7" (141-0=141) have gray value differences greater than the threshold. Here, for example, for the combination of IDs "6 and 7", the gray value difference "141" can be maintained, while the total change amount "75" can be subtracted from only the gray value difference "109" for the combination of IDs "0 and 1" to change it to 109-75=34. However, for example, the conversion by the above formula (1) is said to have the advantage of being able to convert to gray close to the brightness component of the color, and if only a specific gray value difference is significantly changed, this advantage may be greatly lost. Therefore, all gray value differences that exceed the threshold are targeted, and the amount of change that each of them will be responsible for out of the total change amount is determined and distributed according to their size. Specifically, first, the threshold amount (here, "16") is subtracted from the target gray value difference so that the gray value difference after the change is guaranteed to be greater than the threshold. The result is as follows. Gray value difference between IDs “0 and 1” = 109-16 = 93 Gray value difference between IDs “6 and 7” = 141-16 = 125 Next, the total change amount "75" is weighted and distributed to each value obtained by subtracting the threshold value according to its magnitude. The result is as follows: ·Change in gray value difference between IDs “0 and 1” = 75 × (93 / (93 + 125)) ≒ 32 · Change in gray value difference between IDs “6 and 7” = 75 × (128 / (93 + 125)) ≒ 43 In this way, the total change amount due to the expansion of the gray value difference calculated in S707 is distributed by weighting to the gray value differences that are not expanded because they are larger than the threshold (non-expanded gray value differences). Note that, although there are two gray value differences larger than the threshold in the specific example used in this embodiment, the calculation can be performed in the same manner when there are three or more gray value differences.
[0043] In S709, it is determined whether or not a gray value difference of interest among the gray value differences calculated in S703 is smaller than a threshold value. If the gray value difference of interest is smaller than the threshold value, the process proceeds to S710, and if not, the process proceeds to S711.
[0044] In S710, the corresponding gray values are changed so that the gray value differences of interest that are smaller than the threshold value become equal to the threshold value. In S711, the corresponding gray values are changed based on the amount of change allocated to the gray value differences of interest that exceed the threshold value. In this flowchart, for gray value differences that are equal to the threshold value, the amount of change to be allocated from the total amount of change is not allocated, so this step is skipped.
[0045] In S712, it is determined whether or not the change of the gray values for all the gray value differences calculated in S703 has been completed. If the change of the gray values has been completed for all the calculated gray value differences, the process ends. On the other hand, if there are any unprocessed gray value differences remaining, the process returns to S709, and the process continues for the next gray value difference of interest. In the example of FIG. 6(a) described above, the processes from S709 onwards proceed as follows.
[0046] In the first routine, the gray value difference between ID=0 and ID=1, 109, is compared with the threshold value as the gray value difference of interest, and the process proceeds to S711 (No in S709). Now, the gray value difference of interest, 109, is allocated with a change amount of "32", and the corrected gray value difference is "77". To achieve this, the gray values of ID=0 and ID=1 are changed, but the gray value of ID=0 is "255", which is the upper limit, and cannot be changed to absorb the total change amount within the 256 gradations. Therefore, to achieve the corrected gray value difference of 77, the change amount of 32 is added to the gray value of ID=1, "146", to change it to "178".
[0047] In the next routine, the gray value difference between ID=1 and ID=2 (=1) is compared with the threshold value as the gray value difference of interest, and the process proceeds to S710 (Yes in S709).Then, the gray value of ID=2 is changed to "162", which is the value obtained by subtracting "16" from the gray value "178" of ID=1 after the above change, so that the gray value difference becomes the same as the threshold value.
[0048] In the next routine, the gray value difference between ID=2 and ID=3 (=1) is compared with the threshold value as the gray value difference of interest, and the process proceeds to S710 (Yes in S709).Then, the gray value of ID=3 is changed to "146", which is the value obtained by subtracting "16" from the gray value "162" of ID=2 after the above change, so that the gray value difference becomes the same as the threshold value.
[0049] In the next routine, the gray value difference between ID=3 and ID=4 (=1) is compared with the threshold value of 16 as the gray value difference of interest, and the process proceeds to S710 (Yes in S709).Then, the gray value of ID=4 is changed to "130", which is the value obtained by subtracting "16" from the gray value "146" of ID=3 after the above change, so that the gray value difference becomes the same as the threshold value.
[0050] In the next routine, the gray value difference between ID=4 and ID=5, which is 1, is compared with the threshold value as the gray value difference of interest, and the process proceeds to S710 (Yes in S709).Then, the gray value of ID=5 is changed to "114", which is the value obtained by subtracting "16" from the gray value "130" of ID=4 after the above change, so that the gray value difference becomes the same as the threshold value of 16.
[0051] In the next routine, the gray value difference between ID=5 and ID=6 (=1) is compared with the threshold value as the gray value difference of interest, and the process proceeds to S710 (Yes in S709).Then, the gray value of ID=6 is changed to "98", which is the value obtained by subtracting "16" from the gray value "114" of ID=5 after the above change, so that the gray value difference becomes the same as the threshold value.
[0052] In the final routine, the gray value difference between ID=6 and ID=7, 141, is compared with the threshold value as the gray value difference of interest, and the process proceeds to S710 (Yes in S709). Now, the amount of change=43 is allocated to the gray value difference of interest=141, resulting in a corrected gray value difference=98. To achieve this, the remaining gray value of ID=7 is changed, but the gray value of ID=7 is "0", which is the lower limit of the 256 gradations that can be expressed. At this point, the gray value of ID=6 has also been changed to "98", and the corrected gray value difference=98 has been achieved. Therefore, the process ends without any further changes to the gray values.
[0053] The above is the content of the distinctiveness improvement process according to this embodiment. As a result of the above-mentioned process, the color value list shown in FIG. 6(b) is obtained from the color value list shown in FIG. 6(a). It can be seen that the distinctiveness is improved because the gray value difference is expanded to the threshold value that ensures distinctiveness in the gray value group included in the color value list where the gray value difference is small. FIG. 8 is a graph showing the difference between the conventional method and this method, with the minimum gray value difference on the vertical axis and the number of colors on the horizontal axis. It can be seen that the gray value difference required for distinction is guaranteed in this method as long as the number of colors is within the expected number of colors. And, in the places where the gray value difference exceeds the threshold value in FIG. 6(a), the gray value difference is reduced according to the original gray value difference as shown in FIG. 6(b). That is, when comparing the ratio before and after the process between the gray value difference between ID=1 and ID=2 and the gray value difference between ID=6 and ID=7, the ratio before the process is 109 / 141 ≒ 0.77, and after the process is 77 / 98 ≒ 0.78. In other words, the ratio of gray value differences does not change significantly before and after the discrimination enhancement process, which means that the impression given by the original color image is not significantly changed.
[0054] The color value list thus obtained is stored in the RAM 103. The RIP unit 213 then reads out the color value list from the RAM 103 and converts the RGB values of each pixel into gray values while referring to the color value list, thereby generating a raster image.
[0055] In the above description, the distinctiveness improvement process is performed in the grayscale conversion when the MFP 100 interprets the PDL and generates a raster image, but the present invention is not limited to this. For example, a similar distinctiveness improvement process may be performed in the printer driver 202 of the MFP 100 to generate a print job including a PDL for a grayscale image with improved distinctiveness, and the print job may be input to the MFP 100.
[0056] <Effects of processing to improve discrimination> The effect of the distinctiveness improvement process according to this embodiment will be described again. The RGB values of the objects 400 to 407 included in the color image shown in FIG. 4(b) are first converted into the gray values shown in the color value list in FIG. 6(a) by the above-mentioned formula (1). FIG. 9(a) shows the gray values of these eight objects 400 to 407 plotted on a number line, and it can be seen that the six gray values of the rectangular objects 401 to 403 and the alphabetic object 404 to 406 are densely packed together. FIG. 4(c) shows a grayscale image based on the gray values before the distinctiveness improvement process, and the objects 411 to 416 corresponding to the six objects 401 to 406 are in a state where they cannot be distinguished from each other. FIG. 4(d) shows a grayscale image based on the gray values after the distinctiveness improvement process, and FIG. 9(b) shows the gray values plotted on a number line. In FIG. 9(b), the grey values are spaced apart, whereas in FIG. 4(d), the objects 421-426 corresponding to the six objects 401-406 are distinguishable from one another.
[0057] <Modification> In the method of the above embodiment, the gray value difference larger than the threshold is reduced, and the gray value difference smaller than the threshold is increased, thereby improving the discrimination. In the case of this method, for example, a gray value difference slightly larger than the threshold is reduced and approaches the threshold, while a gray value difference that was significantly smaller than the threshold is increased to the threshold, so that both gray value differences after processing become almost the same. In this case, the impression of the original color image and the converted grayscale image may be significantly different. In order to avoid this, when distributing the total change amount in S708, the gray value difference that is larger than the threshold and close to the threshold may be excluded from the distribution target.
[0058] Here, as a specific example of this modified example, the case of excluding the gray value difference closest to the threshold value among the gray value differences larger than the threshold value will be described using the color value list shown in FIG. 6(c). In the color value list in FIG. 6(c), the gray values in the records of ID=0 to ID=7 are 255, 220, 219, 218, 217, 216, 215, and 0. FIG. 9(c) shows these gray values plotted on a number line. If the threshold value is 16, the combination of ID=0 and ID=1 and the combination of ID=6 and ID=7 will have gray value differences larger than the threshold value, and the respective gray value differences are 255-220=35 and 215-0=215. In this state, if a part of the total change amount is distributed to the gray value difference "35" by the method of the above embodiment, the corrected gray value difference will approach "16". Therefore, the gray value difference "35" is excluded from the distribution target. That is, the total change amount is distributed only to the gray value difference "215". Now, when the gray value difference=1, which is smaller than the threshold, is expanded to the threshold value=16, the total change amount is the absolute value "75" of (1-16)×5=-75, so it is 215-75=140. This total change amount "75" is distributed only to the gray value difference "215". As a result, as shown in FIG. 6(d), a color value list is obtained in which the gray values in each record of ID=0 to 7 are changed to 255, 220, 204, 188, 172, 156, and 140. FIG. 9(d) shows these gray values plotted on a number line. As is clear from FIG. 6(d) and FIG. 9(d), the gray value difference of the combination of ID=0 and ID=1 is maintained without change, so it can be distinguished from each gray value difference expanded to the threshold, and the impression of the original color image can be maintained.
[0059] In this modified example, only the smallest gray value difference among those having gray value differences greater than the threshold value is excluded, but the present invention is not limited to this, and multiple gray value differences including the smallest gray value difference may be excluded. Gray value differences in specific regions such as highlight regions and dark regions in the target image may also be excluded. Two gray value differences closest to both ends of the number of representable gradations ("0" and "255" in the case of 256 gradations) may also be excluded.
[0060] As described above, according to this embodiment, a discriminable gray value difference (threshold) is defined in advance. Then, for a plurality of gray values obtained by a general gray scale conversion, the difference between adjacent gray values is expanded to the threshold value in areas where the difference is smaller than the threshold value, and the difference is reduced according to the magnitude in areas where the difference is larger than the threshold value. This prevents the gray value difference from becoming extremely small, making it possible to obtain a gray scale image with improved discriminability without significantly changing the impression from the original color image.
[0061] [Embodiment 2] Depending on the printing characteristics of the image forming device and the type of printing paper used, there are cases where gradation is not easily manifested in dark areas and highlight areas in the target image, making it more difficult to ensure distinctiveness. Therefore, in a specific area (hereinafter referred to as a "specific density area") in an image where distinctiveness is empirically difficult to ensure, a process of expanding to a threshold value in distinctiveness improvement processing is easily applied, as a second embodiment. Note that a description of the contents common to the first embodiment will be omitted, and the following description will focus on the differences from the first embodiment.
[0062] <Discrimination improvement processing> In the distinctiveness improvement process according to the present embodiment, before the gray value difference calculation process (S703), a conversion process is performed on each gray value stored in the color value list so that the gray value difference is reduced in a specific density region. For this conversion, for example, an LUT (hereinafter referred to as a "reduced LUT") having a conversion characteristic such that the gray value difference is reduced in a specific density region is used. Then, the gray value difference calculation process (S703) is performed based on the converted gray value obtained by the conversion process using the reduced LUT. FIG. 10(a) is an example of a reduced LUT with the output gray value on the vertical axis and the input gray value on the horizontal axis, and its characteristics form an S-shape as shown by the solid line 1001. By the conversion using the reduced LUT having the characteristics shown in FIG. 10(a), the difference between the gray value of a pixel belonging to a dark region and the gray value of a pixel belonging to a highlight region becomes smaller than when the LUT conversion process is not performed. As a result, it becomes easier to determine that the gray value difference needs to be expanded, and if the gray value difference is actually smaller than the threshold value (No in S709), a process of expanding the gray value difference to the threshold value (S710) is applied. Even if the gray value difference becomes equal to or greater than the threshold value, the gray value difference becomes smaller than before the above-mentioned LUT conversion process is performed, so that the amount of correction required when weighting and distributing the total change amount (S708) can be reduced. In other words, it is possible to prevent the gray value difference in a specific density region with poor discrimination from becoming extremely small.
[0063] Then, a conversion process is performed on each gray value after the gray value difference correction process (S710 and S711) so that the gray value difference is expanded in a specific density region. For this conversion, an LUT (hereinafter referred to as "expanded LUT") having conversion characteristics so that the gray value difference is expanded in a specific density region is used. FIG. 10(b) shows an example of an expanded LUT with the output gray value on the vertical axis and the input gray value on the horizontal axis, and its characteristics form an S-shape as shown by the solid line 1002. In other words, the expanded LUT is an LUT with characteristics opposite to those of the reduced LUT. In this way, after the process of expanding the gray value difference smaller than the threshold value to the threshold value, a conversion is performed using an expanded LUT with characteristics opposite to those of the previously applied reduced LUT, so that the gray value difference can be further expanded in a specific density region.
[0064] The above is the content of the distinctiveness improvement process according to this embodiment. According to this embodiment, distinctiveness can be improved even in dark areas and highlight areas where distinctiveness is difficult to ensure due to the printing characteristics of the printer and the paper type.
[0065] In this embodiment, the LUT used has an S-shaped characteristic, but is not limited to this. For example, if only the highlighted region has poor gradation, the previous LUT conversion may apply a reduced LUT with an upwardly convex characteristic to correspond to the highlighted region, and the subsequent LUT conversion may apply an enlarged LUT with the opposite characteristic.
[0066] <Modification> In this embodiment, the LUT is used for converting the gray values of the specific density region, but the present invention is not limited to this. For example, calculation processing using a function instead of the LUT may be used. Also, a larger threshold value may be applied only to a specific gradation range such as a dark region (for example, 0 to 50) or a highlight region (200 to 255) among the gradations of the gray values that can be expressed (0 (black) to 255 (white) in the case of 256 gradations). This makes the gray value difference in the dark region and the highlight region larger. In this way, the same effect can be obtained by setting different threshold values for a specific gradation range among the gradations of the gray values that can be expressed.
[0067] (Other embodiments) The present disclosure can also be realized by a process in which a program for implementing one or more functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that implements one or more functions.
[0068] The present disclosure also includes the following configurations and methods.
[0069] (Configuration 1) 1. An image processing apparatus for printing a color image in monochrome, comprising: a conversion means for converting multi-dimensional color component values that specify colors contained in the color image into gray values; a modification means for modifying the grey values obtained by the conversion means; Equipped with When the color image includes a plurality of colors, the correction means calculating a gray value difference representing a difference between two adjacent gray values for a plurality of said gray values arranged in order of magnitude corresponding to said plurality of colors; when the calculated gray value difference is smaller than a threshold value, changing the corresponding gray value so that the calculated gray value difference becomes equal to the threshold value; when the calculated grey value difference is greater than the threshold value, changing the corresponding grey value so that the grey value difference becomes smaller according to its magnitude; 13. An image processing device comprising:
[0070] (Configuration 2) 2. The image processing device according to configuration 1, wherein the threshold value is set based on an expected number of colors in the color image.
[0071] (Configuration 3) 3. The image processing device according to claim 2, wherein, when the number of colors in the color image is greater than the expected number of colors, the threshold value is changed to a value smaller than a value set based on the expected number of colors.
[0072] (Configuration 4) 4. The image processing device according to configuration 2 or 3, wherein the assumed number of colors is calculated by the following formula: Expected number of colors = (number of expressible tones / threshold) + 1
[0073] (Configuration 5) 4. The image processing device according to configuration 3, wherein the threshold value is changed using the following formula: Changed threshold value = number of expressible gradations / (number of colors in the color image - 1)
[0074] (Configuration 6) The correction means is a total change in the gray value difference smaller than the threshold value when the corresponding gray value is changed so that the gray value difference is equal to the threshold value is distributed to the gray value differences larger than the threshold value in proportion to their magnitudes; changing the corresponding grey values such that grey value differences greater than said threshold are reduced by the respective apportioned change amounts; 6. The image processing device according to any one of configurations 1 to 5.
[0075] (Configuration 7) 7. The image processing device according to configuration 6, wherein the modifying means excludes specific gray value differences among gray value differences larger than the threshold value from the distribution.
[0076] (Configuration 8) 8. The image processing device according to claim 7, wherein the specific gray value difference is the smallest gray value difference among the gray value differences greater than the threshold value.
[0077] (Configuration 9) 9. The image processing device according to configuration 8, wherein the specific gray value difference is a plurality of gray value differences including the minimum gray value difference.
[0078] (Configuration 10) 7. The image processing device according to configuration 6, wherein the specific gray value difference is a gray value difference of a specific region in the color image.
[0079] (Configuration 11) 11. The image processing device according to configuration 10, wherein the specific region is a highlight region or a dark region.
[0080] (Configuration 12) The correction means is performing a process for reducing a gray value difference for the gray values in a specific density region in the color image among the gray values obtained by the conversion means, and then performing the correction; performing a process of increasing a gray value difference on the gray values after the correction of the specific density region; 2. The image processing device according to claim 1,
[0081] (Configuration 13) the modifying means performs the reduction process and the enlargement process by using a lookup table; the lookup table used in the reduction process and the lookup table used in the enlargement process have mutually inverse characteristics; 13. The image processing device according to claim 12,
[0082] (Configuration 14) 2. The image processing device according to configuration 1, wherein the correction means applies a threshold value larger than the threshold value only to a specific range of gradations of representable gray values.
[0083] (Configuration 15) 15. The image processing device according to any one of configurations 1 to 14, wherein the conversion means performs the conversion by any one of a method of NTSC weighted average, sRGB, and RGB uniformity.
[0084] (Method 1) 1. An image processing method for printing a color image in monochrome, comprising: a conversion step of converting multi-dimensional color component values that identify colors contained in the color image into gray values; a modifying step for modifying the grey values obtained in the converting step; Including, In the modifying step, when the color image includes a plurality of colors, calculating a gray value difference representing a difference between two adjacent gray values for a plurality of said gray values arranged in order of magnitude corresponding to said plurality of colors; when the calculated gray value difference is smaller than a threshold value, changing the corresponding gray value so that the calculated gray value difference becomes equal to the threshold value; when the calculated grey value difference is greater than the threshold value, changing the corresponding grey value so that the grey value difference becomes smaller according to its magnitude; 13. An image processing method comprising:
[0085] (Configuration 16) A program for causing a computer to function as the image processing device according to any one of configurations 1 to 15.
Claims
1. 1. An image processing device for printing a color image in monochrome, comprising: a conversion means for converting multi-dimensional color component values that identify colors contained in the color image into gray values; correction means for correcting the grey values obtained by the conversion means; Equipped with When the color image includes a plurality of colors, the correction means calculating a gray value difference representing a difference between two adjacent gray values for a plurality of the gray values corresponding to the plurality of colors and arranged in order of magnitude; If the calculated gray value difference is smaller than a threshold value, the corresponding gray value is changed so that the gray value difference becomes equal to the threshold value; When the calculated gray value difference is greater than the threshold value, the corresponding gray value is changed so that the gray value difference becomes smaller in accordance with the magnitude of the gray value difference; When the gray value difference is smaller than the threshold value, the corresponding gray value is changed to the same value as the threshold value. distributing the total amount of change for grey value differences less than said threshold to grey value differences greater than said threshold in proportion to their magnitude; changing the corresponding gray values such that the gray value differences greater than the threshold are reduced by the respective distributed change amounts; 1. An image processing device comprising:
2. The image processing device according to claim 1 , wherein the threshold value is set based on the number of colors expected in the color image.
3. 3. The image processing device according to claim 2, wherein, when the number of colors in the color image is greater than the expected number of colors, the threshold value is changed to a value smaller than a value set based on the expected number of colors.
4. 4. The image processing device according to claim 2, wherein the number of assumed colors is calculated by the formula: number of assumed colors=(number of representable gradations / threshold value)+1.
5. 4. The image processing apparatus according to claim 3, wherein the threshold value is changed using the formula: changed threshold value=number of representable gradations / (number of colors in the color image-1).
6. 2. The image processing apparatus according to claim 1, wherein said correction means excludes specific gray value differences from among the gray value differences greater than said threshold value from the distribution.
7. 7. The image processing apparatus according to claim 6, wherein the specific gray value difference is the smallest gray value difference among the gray value differences that are greater than the threshold value.
8. 8. The image processing apparatus according to claim 7, wherein the specific gray value difference is a plurality of gray value differences including the smallest gray value difference.
9. 2. The image processing apparatus according to claim 1, wherein the specific gray value difference is a gray value difference in a specific region in the color image.
10. The image processing device according to claim 9 , wherein the specific region is a highlight region or a dark region.
11. The correction means is the correction is performed after performing a process of reducing a gray value difference for the gray values in a specific density region in the color image among the gray values obtained by the conversion means; performing a process of increasing a gray value difference on the gray values after the correction of the specific density region; 2. The image processing device according to claim 1, wherein:
12. the correction means performs the reduction process and the enlargement process using a lookup table; the lookup table used in the reduction process and the lookup table used in the enlargement process have mutually inverse characteristics; 12. The image processing device according to claim 11.
13. 2. The image processing apparatus according to claim 1, wherein said correction means applies a threshold value greater than said threshold value only to a specific range of gradations among the number of gradations of gray values that can be represented.
14. 2. The image processing apparatus according to claim 1, wherein said conversion means performs said conversion using one of NTSC weighted average, sRGB, and RGB uniformity methods.
15. 1. An image processing method for printing a color image in monochrome, comprising: a conversion step of converting multi-dimensional color component values that identify colors contained in the color image into gray values; a modifying step for modifying the grey values obtained in the converting step; Including, In the correction step, when the color image includes a plurality of colors, calculating a gray value difference representing a difference between two adjacent gray values for a plurality of the gray values corresponding to the plurality of colors and arranged in order of magnitude; If the calculated gray value difference is smaller than a threshold value, the corresponding gray value is changed so that the gray value difference becomes equal to the threshold value; When the calculated gray value difference is greater than the threshold value, the corresponding gray value is changed so that the gray value difference becomes smaller in accordance with the magnitude of the gray value difference; In the modifying step, when a gray value difference smaller than the threshold value is changed to the same value as the threshold value, distributing the total amount of change for grey value differences less than said threshold to grey value differences greater than said threshold in proportion to their magnitude; changing the corresponding gray values such that the gray value differences greater than the threshold are reduced by the respective distributed change amounts; An image processing method comprising:
16. A program for causing a computer to execute the image processing method according to claim 15.