Apparatus and control method for enhancement based on achromatic signal value replacing pixel color information

An apparatus configured to generate image data represented in achromatic color from input image data and output the generated image data to a printer includes a controller. The controller is configured to replace color information of an object included in the input image data with an achromatic signal value, determine, based on an achromatic signal value corresponding to color information of a pixel of interest in the input image data, whether the pixel of interest satisfies a predetermined condition, and perform enhancement processing on the color information of the pixel of interest in a case where the pixel of interest is determined not to satisfy the predetermined condition.

BACKGROUND OF THE DISCLOSURE

Field of the Disclosure

The aspect of the embodiments relates to an apparatus and a method for controlling the apparatus.

Description of the Related Art

In recent years, documents and presentation documents have been prepared in color in general offices. However, there is a case where a document prepared in color is printed in monochrome (black monochrome). In a case where a color document is printed in monochrome, an image processing apparatus performs processing for converting color data into grayscale data.

In a case where the color data of the document is represented in red (R), green (G), and blue (B), it is common that the image processing apparatus performs the conversion processing by using a method called National Television System Committee (NTSC) conversion. In the NTSC conversion, a weighted average of RGB values is calculated to obtain a gray value corresponding to the RGB values by using the following formula: 0.299*R+0.587*G+0.114*B. However, this method has an issue that a plurality of completely different colors in the color document becomes the same gray value or similar gray values after subjected to the NTSC conversion, and discriminability of the plurality of different colors deteriorates.

While examples of the method for converting color data to gray data include, besides the NTSC conversion method, a method of applying equal weights to the RGB values to obtain an gray value, and a method of applying varied weights to the RGB values to obtain a gray value, these methods also have the issue that the discriminability of different colors deteriorates similarly to the NTSC conversion.

Japanese Patent Application Laid-Open No. 2017-38242 discusses a technique in which, in a case where the number of colors used in color data is equal to or smaller than a predetermined number, a table for converting the color data to gray data is created so that gray values after the conversion are away from each other. For example, supposing that the color data is 8-bit image data, a table is created so that gray values are equally separated in the possible range from 0 to 255. In the technique discussed in Japanese Patent Application Laid-Open No. 2017-38242, color data is converted to gray data using this table to improve the discriminability of colors.

SUMMARY OF THE DISCLOSURE

According to an aspect of the embodiments, an apparatus configured to generate image data represented in achromatic color from input image data and output the generated image data to a printer includes a controller having one or more processors which execute instructions stored in one or more memories, the controller being configured to replace color information of an object included in the input image data with an achromatic signal value, determine, based on an achromatic signal value corresponding to color information of a pixel of interest in the input image data, whether the pixel of interest satisfies a predetermined condition, and perform enhancement processing on the color information of the pixel of interest in a case where the pixel of interest is determined not to satisfy the predetermined condition.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the disclosure will be described in detail below with reference to the accompanying drawings. The following exemplary embodiments do not limit the disclosure according to the claims, and all combinations of features described in the exemplary embodiments are not necessarily essential to a means of solving issues of the disclosure. In the exemplary embodiments, a description will be given using an image processing apparatus as an example of an information processing apparatus.

FIG. 1illustrates an example of an image processing system117according to a first exemplary embodiment of the disclosure. The image processing system117includes an image forming apparatus101and a host personal computer (PC)119.

The image forming apparatus101is an example of an image processing apparatus according to the present exemplary embodiment and is, for example, a multi-function peripheral (MFP) that integrates a plurality of functions such as a scan function and a printer function. A control unit110controls the entire image forming apparatus101, and includes a central processing unit (CPU)105, a read-only memory (ROM)106, a random-access memory (RAM)107, a hard disk drive (HDD)111, an operation unit interface (I/F)112, a printer I/F113, a scanner I/F114, a network I/F115.

The CPU105controls the operation of the image forming apparatus101by loading a program stored in the ROM106into the RAM107and executing the program. The RAM107is a temporary storage memory and is capable of temporarily storing image data, a program, and the like. The ROM106stores therein parameters for controlling the image forming apparatus101, and an application, a program, and an operating system (OS) for implementing control according to an exemplary embodiment of the disclosure. The HDD111stores therein scanned image data and the like.

In addition, the CPU105controls an operation unit118via the operation unit I/F112. Similarly, the CPU105controls an image output unit109via the printer I/F113, and controls an image reading unit108via the scanner I/F114. Furthermore, the CPU105controls reception of an image from the host PC119and transmission of an image to the host PC119via the network I/F115and a local area network (LAN)116. The image reading unit108is, for example, a scanner. The image output unit109is, for example, a printer.

The CPU105loads a program stored in the ROM106into the RAM107and executes the program. This implements the scan function to acquire image data of a document read by the image reading unit108, and an output function to output an image to a recording medium such as paper or a monitor via the image output unit109.

FIG. 2is a block diagram illustrating an example of a software configuration of the image forming apparatus101, which enables the print function to be operated from the host PC119. The image forming apparatus101includes a command processing unit103and an image processing unit104. Each of the function units is implemented by the CPU105of the image forming apparatus101executing a control program.

The command processing unit103determines, analyzes, and processes image data transmitted from a printer driver202(described below) of the host PC119, so that a raster image and attribute information are generated and stored in the RAM107. Each processing unit of the command processing unit103will be described below. The image processing unit104reads out the raster image and the attribute information stored in the RAM107, and performs image processing for optimizing the raster image based on a parameter.

Each processing unit of the image processing unit104will be described below. The image processing unit104also performs image processing based on setting information provided from the operation unit118. The image processing unit104further performs processing for converting a raster image represented in color to a raster image represented in gray (achromatic color). The operation unit118includes a touch panel and hardware keys, receives an instruction or a setting operation from a user, and also displays apparatus information regarding the image forming apparatus101, job progress information, and various kinds of user interface screens. Setting information received by the operation unit118is stored in the RAM107via the control unit110.

A processing configuration of the image processing system117illustrated inFIG. 2will be described along a print processing procedure.

The host PC119illustrated inFIG. 2generates electronic data such as a document and a presentation document using an application201. The printer driver202outputs print data (color image data) to the image forming apparatus101and causes the image forming apparatus101to print the print data. The print data generated by the printer driver202is transmitted to the image forming apparatus101.

Subsequently, the flow of the print data in the image forming apparatus101will be described with reference to a flowchart illustrated inFIG. 3. In addition, each processing performed by the CPU105loading a program stored in the ROM106into the RAM107and executing the program using the command processing unit103and the image processing unit104illustrated inFIG. 2will be described.

First, in step S2501, the CPU105receives print data. At this time, the CPU105receives the print data via the network I/F115illustrated inFIG. 1.

Next, in step S2502, the CPU105analyzes the print data. At this time, the CPU105causes a command determination unit203in the command processing unit103illustrated inFIG. 2to determine the type of page description language (PDL). The PDL type is, for example, PostScript (PS) or Printer Command Language (PCL). The CPU105then notifies a command analysis unit204of a result of the determination made by the command determination unit203. The command analysis unit204is present for each PDL type, and extracts and analyzes a command of the PDL type determined by the command determination unit203. The command analysis unit204performs red (R), green (G), and blue (B) data acquisition processing in steps S301and discriminability determination processing in S302ofFIG. 7(described below).

Subsequently, in step S2503, the command processing unit103performs raster image processor (RIP) processing.

In this processing, the CPU105causes a command execution unit205to perform drawing based on the result of the analysis performed by the command analysis unit204and to perform the RIP processing. This generates, for example, a raster image407and attribute information415illustrated inFIGS. 4B and 4C, respectively. The attribute information415indicates information regarding attributes.

In step S2504, the CPU105performs image processing. In step S2504, using the raster image and the attribute information generated by the command execution unit205, the CPU105causes a color conversion processing unit206in the image processing unit104to perform color conversion processing from an RGB color space to a cyan (C), magenta (M), yellow (Y), and black (K) color space.

At this time, color conversion from the RGB color space to a different RGB color space may be performed. Thereafter, a filter processing unit207performs edge enhancement or other processing on the CMYK image or the RGB image. Edge enhancement processing will be described below. Image processing in each of steps S304to S306ofFIG. 7(described below) is also performed in step S2504.

Finally, in step S2505, the CPU105determines whether all pages of the received print data have been processed. If all the pages have not been processed (NO in step S2505), the processing returns to step S2502and the CPU105repeats the processing in the step S2502and the subsequent steps for the next page. If all the pages have been completed (YES in step S2505), the processing ends.

In the present exemplary embodiment, the command determination unit203, the command analysis unit204, and the command execution unit205that are included in the command processing unit103, and the image processing unit104, which are illustrated inFIG. 2, are implemented by the CPU105executing the above-described program. The above is the description of the command processing unit103and the image processing unit104.

FIGS. 4A to 4Care diagrams illustrating an example in which the command analysis unit204analyzes a command and then the command execution unit205performs drawing and the RIP processing to generate a raster image and attribute information, which have been described with reference toFIG. 2. With reference toFIGS. 4A to 4C, the processing from when the command analysis unit204analyzes the command to when the command execution unit205performs drawing based on the result of the analysis by the command analysis unit204and generates the raster image and the attribute information via the RIP will be described.

The command includes a drawing command and a control command. Here, a drawing command400will be described as an example.

The drawing command400includes a color mode setting command401for setting the color mode of a job, and a color setting command402for setting a color. Furthermore, the drawing command400includes an object drawing command403for drawing an object, a text size setting command404for setting a text size, a font setting command405for setting a text font, and a text drawing command406for drawing text.

The configuration of these series of commands also applies to any other object or text string. Besides these commands, the drawing command400includes a command for setting coordinates, a command for setting a line thickness, and a command for drawing an image, but a description thereof will be omitted.

The content of the drawing command400will be briefly described. The following description about the drawing command400and color value data is based on the premise of an 8-bit image.

The color mode setting command401“Set Page Color (CL)” indicates that a color image is to be generated. The color setting command402“Set Color (95, 155, 213)” indicates that the RGB values are 95, 155, 213, respectively and represent blue.

The text size setting command404“Set Text Size (16)” indicates that the text size is 16 point. The font setting command405“Set Font (Arial)” indicates that the text font is Arial.

The object drawing command403“Draw Polygon” indicates that a graphic object is drawn based on a coordinate value (not illustrated). The text drawing command406“Draw Text (“x”)” indicates that the text “x” is drawn. Thus, the third and fourth commands illustrated inFIG. 4Aindicate that a rectangle is drawn in blue.

Similarly, the fifth to tenth commands indicate that the text string “ABC” is drawn in Arial, 16-point size, and orange. Furthermore, the eleventh to twentieth commands indicate that five objects are drawn in different colors.

Next, a raster image407(illustrated inFIG. 4B) and attribute information415(illustrated inFIG. 4C), which are generated by the command execution unit205performing drawing and the RIP processing based on the analysis of the drawing command400performed by the command analysis unit204will be described.

The blue rectangle image drawn by the third and fourth commands, which have been mentioned above in the description of the drawing command400, corresponds to a color graphic object408. The text string “ABC” drawn by the fifth to tenth commands corresponds to a text portion409.

In addition, the eleventh to twentieth commands causes a circle graph including graphic objects410to414to be drawn and the RIP processing to be performed. As a result, the raster image407, which is an 8-bit RGB three-channel image, is generated.

Color values of each object in the raster image407illustrated inFIG. 4Bare as follows. The graphic object408has color values of (95, 155, 213) and the text portion409has color values of (237, 125, 49). The graphic objects410and411in the circle graph have color values of (237, 125, 49) and color values of (145, 145, 145), respectively. In addition, the graphic object412has color values of (255, 192, 0), the graphic object413has color values of (112, 173, 71), and the graphic object414has color values of (95, 155, 213).

Furthermore, the text portion409is generated from a text attribute417, and the graphic object408is generated from a graphic attribute416. The graphic objects410to414in the circle graph are also generated from the graphic attribute416. The text attribute417and the graphic attribute416are included in the 8-bit single channel attribute information415indicating information regarding attributes.

In the attribute information415illustrated inFIG. 4C, the attribute information of the graphic portion is represented as (00100011), and the attribute information of the text portion is represented as (00100111), for example. The above is the description of the command analysis unit204and the command execution unit205.

The description of the command analysis unit204and the command execution unit205generally applies to a case where the user selects color for the color mode setting. However, in discriminability improvement processing according to the present exemplary embodiment, processing similar to processing performed when color is selected is also performed when, as illustrated inFIG. 5showing a part of the UI of the printer driver202, “Monochrome (Discriminability Improvement)”1402is selected for a color mode setting1401. Then, in the present exemplary embodiment, as illustrated inFIG. 6showing a part of the UI of the printer driver202, a discriminability improvement method can be selected by setting edge enhancement and grayscale conversion for the raster image407.

Discriminability improvement processing300according to the present exemplary embodiment will be described next.

In the discriminability improvement processing300, before the RIP processing, the drawing command400is analyzed first to acquire RGB values used in the document. Then, a determination is made of whether there are color objects that cannot be discriminated when the RGB values are weighted and converted to gray.

If colors difficult to discriminate are present, the attribute information of objects using the colors is corrected, rendering is performed on color data, and a color raster image and attribute information are output. Then, based on the color raster image and the attribute information, pixels to be subjected to edge enhancement or trapping processing are determined, and the edge enhancement or the trapping processing is performed on the color raster image. Finally, the color raster image is converted to a gray raster image. The edge enhancement processing and the trapping processing will be described below.

Details of the above-mentioned discriminability improvement processing300will be described with reference toFIG. 7.

The processing in this flowchart is implemented by the CPU105loading a program stored in the ROM106into the RAM107and executing the program using the command processing unit103and the image processing unit104.

In the RGB data acquisition processing in step S301, the command processing unit103acquires RGB color values used in the document. In this processing, the command processing unit103causes the command analysis unit204to check the color setting command402and extract the color values designated in the color setting command402.

Next, the command processing unit103adds the extracted RGB color values to a color value list501illustrated inFIG. 8A. The color value list501holds the extracted color values on a color-by-color basis (RGB, and gray). The command processing unit103calculates a weighted average of the RGB values to obtain a gray value and adds the gray value to the color value list501. After completion of the color value list501for the raster image407, the command processing unit103stores the color value list501in the RAM107.

Next, in the discriminability determination processing in step S302, the command processing unit103determines the colors that are difficult to discriminate when converted to gray. In this processing, the command processing unit103determines the colors difficult to discriminate, based on the gray values in the color value list501stored in the RAM107by the command analysis unit204. If the command processing unit103determines the colors difficult to discriminate, the command processing unit103corrects the attribute information of the objects having the colors. The details will be described below. A state where colors are difficult to discriminate is a state where the user can hardly discriminate colors when viewing the colors. The state where colors are difficult to discriminate is determined using a threshold.

Details of the discriminability determination processing in step S302will be described with reference to a flowchart illustrated inFIG. 9. In step S901, the CPU105first reads, from the RAM107, the color value list501illustrated inFIG. 8A, sorts the gray values in ascending order to create a color value list502(seeFIG. 8B), and calculates differences between the gray values.

In the color value list502illustrated inFIG. 8B, the number of colors in the document is seven, but the graphic objects408and414have the same color, and the text portion409and the graphic object410have the same color. This means that the graphic objects413,408,411, and412and the text portion409have different colors and thus there are four gray value differences.

Next, in step S902, the command processing unit103determines whether each of the gray value differences satisfies a predetermined condition. More specifically, the command processing unit103reads out a predetermined threshold from the RAM107, and determines whether the gray value difference is smaller than the threshold. If the gray value difference is equal to or larger than the threshold (NO in step S902), the image processing unit104determines that the colors can be discriminated, and the processing ends. In contrast, if the gray value difference is smaller than the threshold (YES in step S902), the command processing unit103determines that the colors are difficult to discriminate, and the processing proceeds to step S903.

For example, in the color value list502ofFIG. 8B, the difference between the gray value of the graphic object413and the gray value of the graphic object408is 1. In a case where the threshold is 16, the difference between the gray values is smaller than the threshold. Thus, the command processing unit103determines that the colors of the graphic objects413and408are difficult to discriminate.

Similarly, the command processing unit103performs this processing the number of times corresponding to the number of gray value differences. For example, in the example of the color value list502ofFIG. 8B, the command processing unit103determines whether each of the gray value difference between the graphic objects413and408, the gray value difference between the graphic objects414and411, the gray value difference between the graphic object411and the text portion409, the gray value difference between the graphic objects410and412is smaller than the threshold.

Finally, in step S903, the command processing unit103corrects the attribute information of the color objects to attribute information (including an enhancement attribute) indicating that discrimination processing is necessary. For example, as described above, the attribute information415ofFIG. 4Cindicates the graphic portion as (00100011). Bits are 0 to 7, and the bit 0 indicates 1, the bit 1 indicates 1, the bit 5 indicates 1, and the other bits indicate 0. In addition, the attribute information415indicates the text portion as (00100111).

Assuming that the bit 3 is used to determine whether the discrimination processing is necessary, the attribute information of the graphic portion requiring the discrimination processing is corrected to (00101011), and the attribute information of the text portion requiring the discrimination processing is corrected to (00101111).

Accordingly, as illustrated inFIG. 10, attribute information of a graphic portion1601requiring the discrimination processing is represented as (00101011), and attribute information of a text portion1603requiring the discrimination processing is represented as (00101111). Attribute information of a graphic portion1602not requiring the discrimination processing is represented as (00100011).

In the example of the color value list502ofFIG. 8B, if the threshold is 16, the colors of the graphic objects413and408, the colors of the graphic objects408and411, and the colors of the graphic object411and the text portion409each have a gray value difference smaller than 16. These colors are determined to be difficult to discriminate, and thus the attribute information of the objects are to be corrected.

The description returns toFIG. 3. In the RIP processing in step S2503, the command processing unit103causes the command execution unit205to generate a color raster image and attribute information from the PDL data.

In the color conversion processing in step S304, the image processing unit104performs the color conversion processing. In this processing, the image processing unit104converts RGB to RGB, but may convert RGB to CMYK.

In the edge enhancement processing in step S305, the image processing unit104performs the edge enhancement processing on the boundary between the objects that are difficult to discriminate. The edge enhancement processing is performed on each pixel using the color raster image and the attribute information.

Details of the edge enhancement processing in step S305will be described with reference to a flowchart illustrated inFIG. 11.

The edge enhancement processing in step S305is performed on each pixel in the raster image. The CPU105performs the processing ofFIG. 11on each pixel of interest in the raster image by referring to the attribute information at the position corresponding to the position of the pixel of interest.

First, in step S1001, the CPU105first determines whether the attribute information of the pixel of interest indicates that the discrimination processing is necessary. If the bit 3 of the attribute information at the position corresponding to the position of the pixel of interest indicates 1, the CPU105can determine that the discrimination processing is necessary. If the attribute information of the pixel of interest does not indicate that the discrimination processing is necessary (NO in step S1001), the processing ends. In contrast, if the attribute information of the pixel of interest indicates that the discrimination processing is necessary (YES in step S1001), the processing proceeds to step S1002.

Next, in step S1002, the CPU105determines whether the attribute information of a peripheral pixel around the pixel of interest is corrected in step S903ofFIG. 9and indicates that the discrimination processing is necessary. Similarly to step S1001, if the bit 3 of the attribute information at the position corresponding to the position of the peripheral pixel indicates 1, the CPU105can determine that the discrimination processing is necessary. The peripheral pixel is, for example, a pixel adjacent to the pixel of interest (an adjacent pixel).

If the attribute information of the peripheral pixel does not indicate that the discrimination processing is necessary (NO in step S1002), the processing ends. In contrast, if the attribute information of the peripheral pixel indicates that the discrimination processing is necessary (YES in step S1002), the processing proceeds to step S1003.

In step S1003, the CPU105determines whether the pixel of interest and the peripheral pixel have different colors. At this time, the CPU105can determine whether the pixel of interest and the peripheral pixel have the same color by comparing the color information of the pixel of interest and the color information of the peripheral pixel. If the pixel of interest and the peripheral pixel have the same color (NO in step S1003), the processing ends. In contrast, if the pixel of interest and the peripheral pixel have different colors (YES in step S1003), the processing proceeds to step S1004.

Finally, in step S1004, the CPU105performs processing for enhancing the pixel value of the pixel of interest. For example, in a case where input image data is RGB data, the CPU105applies, to the pixel value, a one-dimensional look-up table (LUT) having a downward convex curve as illustrated inFIG. 12so that an output value represents a darker color than the input value. Here, an input signal indicates one of RGB planes and the same LUT is applied to each of the input signals. In a case where the input image data to be subjected to the edge enhancement processing in step S305is CMYK data, the CPU105uses a one-dimensional LUT having an upward convex curve as illustrated inFIG. 13so that the output value represents a darker color than the input value. The above is the description of the edge enhancement processing in step S305.

The description returns toFIG. 7. In the color conversion processing in step S306, the CPU105causes the image processing unit104to perform color-to-gray conversion on a pixel-by-pixel basis. In this processing, in a case where the input image to be subjected to the color conversion processing in step S306is an RGB image, the CPU105calculates a weighted average of the RGB values as a gray value, inverts the gray value to obtain a density signal, and transmits the density signal to the image output unit109. In a case where the input image to be subjected to the color conversion processing in step S306is a CMYK image, the CPU105converts CMYK to K and transmits the K image to the image output unit109.

The above is the description of the procedure of the discriminability improvement processing300according to the present exemplary embodiment.

Effects of the discriminability improvement processing300will be described with reference toFIGS. 4A to 4CandFIGS. 14 to 17.

First, a conventional configuration will be described. In a case where the edge enhancement processing in step S305is not performed, the conversion of the color raster image407ofFIG. 4Bto a gray raster image changes the color raster image407to an image like an image607illustrated inFIG. 14. In the image607, a title bar608and a text string609have approximately same gray values and are difficult to discriminate. In addition, objects610,611,613, and614in a circle graph have approximately same gray values and are difficult to discriminate due to the disappearance of boundaries between the objects.

On the other hand, in the present exemplary embodiment, the discriminability improvement processing300is performed on the color raster image407, so that the boundaries between the objects are enhanced and the color raster image407is changed to an image like an image707illustrated inFIG. 15. Accordingly, the discriminability of colors is improved.

Performing the discriminability improvement processing300can prevent deterioration of the discriminability when converting a color image to a gray image. In the present exemplary embodiment, in the edge enhancement processing in step S305, a one-dimensional LUT is applied to a pixel value of an edge portion to be enhanced so that the output value represents a darker color, but the processing is not limited thereto. For example, a one-dimensional LUT may be applied to the pixel value so that the output value represents a lighter color as illustrated inFIG. 16to improve the discrimination between the objects. The discrimination may be improved by not only using the one-dimensional LUT, but also performing sharpness processing using the filter processing unit207of the image processing unit104or performing trapping processing using a trapping processing unit208of the image processing unit104.

In the case of using the sharpness processing, the enhancement processing is performed so that the outer edge of the object to be discriminated is bordered as illustrated inFIG. 17. In the case of not performing attribute determination processing on a reference pixel in step S1002, edge enhancement is to be performed on a border between the object to be discriminated and any object having a different color from that of the object.

An example of the sharpness processing performed by the filter processing unit207will be described with reference toFIGS. 18A to 18E. Among RGB data, R color plane data will be described as an example.

In an image2101illustrated inFIG. 18A, a hatched portion indicates that an R signal value is 200, and a white portion indicates that an R signal value is 255. An edge portion2102including 3×3 pixels in the image2101is illustrated in an enlarged manner inFIG. 18B.FIG. 18Bindicates that a center pixel in the edge portion2102is to be subjected to the image processing in the present exemplary embodiment.FIG. 18Cillustrates weights to be applied to the respective 3×3 pixels in the edge portion2102.

Calculation in the sharpness processing will be described next. In the sharpness processing, the signal value of the center pixel is calculated by multiplying the signal values of the 3×3 pixels in the edge portion2102ofFIG. 18Bby the respective weights indicated inFIG. 18Cand then adding the values. The calculation is thus performed using the following Formula (1).
(the signal value of the center pixel)=200×0+200×(−1)+255×0+200×(−1)+200×5+255×(−1)+200×0+200×(−1)+255×0=145  (1)
When the signal value of the center pixel is 145, as indicated by an image2103illustrated inFIG. 18D, the center pixel is darker than the center pixel before the sharpness processing illustrated in the edge portion2102ofFIG. 18A. Performing this processing on the entire image changes the image2101ofFIG. 18Ato an image having a darker edge portion as indicated by an image2104illustrated inFIG. 18E.

While the description has been given of the R color plane, similar processing can be performed on G and B color planes and also on another color space such as CMYK data.

The above is the description of the sharpness processing.

Next, an example of the trapping processing performed by the trapping processing unit208will be described similarly with reference toFIGS. 19A to 19E. Here, the trapping processing is performed after RGB data is converted to CMYK data because it is common that trapping processing is performed after conversion of data to CMYK data. A case where C and M color planes are adjacent to each other among CMYK planes will be described.

In an image2201illustrated inFIG. 19A, a hatched portion indicates that a C pixel value is 128, and a dotted portion indicates that an M pixel value is 128. An edge portion2202including 3×3 pixels in the image2201is illustrated in an enlarged manner inFIG. 19B. In this example, a center pixel in the edge portion2202is to be subjected to the image processing. In addition to the enlarged edge portion2202,FIG. 19Billustrates an enlarged edge portion2202_1indicating the C plane, and an enlarged edge portion22022indicating the M plane. An edge portion2203illustrated inFIG. 19Cindicates weights to be applied in the trapping processing.

In the trapping processing, a color plane that is not present in the pixel of interest is acquired from the periphery of the pixel of interest. Thus, in a case where the C plane is present in the pixel of interest like this example, a pixel of the C plane is not acquired from the periphery of the pixel of interest in the trapping processing.

Since the M plane is not present in the pixel of interest, a pixel of the M plane is acquired from the periphery of the pixel of interest in the trapping processing. A calculation method for acquiring the pixel of the M plane from the periphery in the trapping processing is as follows. The M pixel value of the center pixel is calculated by multiplying the pixel values of the M plane illustrated in the edge portion2202_2by the respective weights illustrated in the edge portion2203. The M pixel value of the center pixel is thus calculated by the following Formula (2).
(theMpixel value of the center pixel)=128×100%=128  (2)
When the C plane in the edge portion2202_1is combined, the pixel value of the center pixel is CMYK (128, 128, 0, 0) and the resultant image is like an image2204illustrated inFIG. 19D.

Performing this processing on the entire image changes the image2201to an image like an image2205in which the C and M planes overlap each other in the boundary portion between the C and M planes. Then, to perform color conversion of CMYK data to K data, the relation of C+M+Y+K=K′ is to be satisfied. Pixel values of the C plane portion other than the boundary portion between the C and M planes are converted from CMYK (128, 0, 0, 0) to K′ (128). Pixel values of the boundary portion between the C and M planes are converted from CMYK (128, 128, 0, 0) to K′ (256).

In other words, the boundary portion between the C and M planes has a darker color. The above is the description of the trapping processing.

With the configuration according to the present exemplary embodiment, when color reduction processing is performed to convert a color image to a gray image, the attribute information of colors that are originally different but become similar and difficult to discriminate after gray conversion is corrected and the corrected attribute information is referred, so that edge enhancement can be performed on the boundary portion between the colors. Therefore, the discriminability of the colors in the boundary portion can be improved.

In the first exemplary embodiment, the discriminability of colors is improved by correcting the attribute information of the colors determined to be difficult to discriminate and by performing the edge enhancement on the portion corresponding to the corrected information. In a second exemplary embodiment, a method in which the edge enhancement processing is performed on a boundary portion between adjacent colors that are difficult to discriminate by changing color conversion processing and edge enhancement processing instead of correcting the attribute information will be described with reference toFIG. 20. Processing similar to that in the first exemplary embodiment will be simply described.

Discriminability improvement processing1800will be described with reference toFIG. 20.

In step S1801, the color values used in the document are acquired similarly to step S301ofFIG. 7described above.

In step S1802, the discriminability determination processing is performed. InFIG. 9according to the first exemplary embodiment, the attribute information is corrected in step S903based on the determination made in step S902of whether the colors can be discriminated. In the present exemplary embodiment, color conversion processing is changed based on the determination of whether the colors can be discriminated.

The details will be described with reference toFIG. 21.

First, in step S1901, the CPU105performs processing similar to the processing in step S901ofFIG. 9described in the first exemplary embodiment. Next, in step S1902, the CPU105reads out a predetermined threshold from the RAM107and determines whether the gray value difference is equal to or larger than the threshold. If the gray value difference is equal to or larger than the threshold (NO in step S1902), the CPU105determines that the colors can be discriminated, and the processing proceeds to step S1903to perform color conversion processing 1-1. If the gray value difference is smaller than the threshold (YES in step S1902), the CPU105determines that the colors are difficult to discriminate, and the processing proceeds to step S1904to perform color conversion processing 1-2.

In the color conversion processing 1-1, processing for converting RGB to R′G′B′ is performed. The conversion is performed so that all the RGB signal values become the same signal value. For example, the CPU105assigns, to the RGB signal values, the gray value obtained by the method of calculating a weighted average of the RGB values as a gray value, i.e., RGB is converted to R′G′B′ (Gray, Gray, Gray).

On the other hand, in the color conversion processing 1-2, processing for converting RGB to R″G″B″ is performed so that all the RGB signal values do not become the same signal value.

The description returns toFIG. 20. In step S1803, the RIP processing in step S303ofFIG. 7described in the first exemplary embodiment is performed. In step S1804, color conversion processing 2 is performed. In the color conversion processing 2, color conversion from the RGB color space to the CMYK space is performed. In this processing, the R′G′B′ values obtained when determining that the colors can be discriminated are converted to color values representing the K plane such as CMYK (0, 0, 0, K), while the R″G″B″ values obtained when determining that the colors are difficult to discriminate are converted to color values representing the color planes other than the K plane such as CMYK (C, M, Y, 0).

In this example, R′G′B′ is (Gray, Gray, Gray), and the conversion from R′G′B′ (Gray, Gray, Gray) to CMYK (0, 0, 0, K) is performed by inverting the gray value to obtain a value of K, i.e., K=255−Gray.

On the other hand, the conversion of R″G″B″ to CMYK (C, M, Y, 0) is performed by inverting the gray value to obtain a value of C+M+Y, i.e., C+M+Y=255−Gray.

In step S1805, the edge enhancement is performed. At this time, the edge enhancement is performed on each of the CMY color planes. The image processing unit104performs the edge enhancement on the CMY planes and not on the K plane.

With the processing described above, the colors determined to have a gray value difference equal to or larger than the predetermined threshold in step S1902are converted to the K plane by the color conversion processing 1-1 and the color conversion processing2, and is not to be subjected to the edge enhancement. On the other hand, the colors determined to have a gray value difference smaller than the predetermined threshold in step S1902are converted to the CMY color planes by the color conversion processing 1-2 and the color conversion processing 2, and is to be subjected to the edge enhancement.

In step S1806, color conversion from CMYK to K is performed. At this time, for example, CMYK is converted to K (C+M+Y+K). This increases the value of the portion subjected to the edge enhancement in step S1805, and results in the portion being output in darker gray.

The colors determined to be discriminable and included in the portion not subjected to the edge enhancement are converted to CMYK (0, 0, 0, K) in the color conversion processing 2 in step S1804. Here, the value of K is an inverted value of Gray, which is the same as the inverted value of the gray value obtained by calculating a weighted average of the RGB values. In the processing in step S1806, CMYK (0, 0, 0, K) is converted to K (C+M+Y+K), i.e., K (255−Gray), which is the same as the inverted value of the gray value obtained by calculating a weighted average of the RGB values.

On the other hand, the colors determined not to be discriminable are converted to CMYK (C, M, Y, 0) so that C+M+Y=255−Gray in the color conversion processing 2 in step S1804. Thus, in the processing in step S1806, CMYK (C, M, Y, 0) is converted to K (C+M+Y+K), i.e., K (255−Gray), which is the same as the inverted value of the gray value obtained by calculating a weighted average of the RGB values.

The discriminability improvement processing can be performed also with the configuration according to the present exemplary embodiment, by changing the color conversion processing and the edge enhancement processing without using the attribute information.

Instead of performing the color conversion processing 1-1 in step S1903and the color conversion processing 1-2 in step S1904, similar processing may be performed in the color conversion processing 2 in step S1804.

In this case, in the color conversion processing 2 in step S1804, if the gray value difference is equal to or larger than the predetermined threshold based on the result of the determination made in step S1902, the CPU105performs color conversion from RGB to K. If the gray value difference is smaller than the predetermined threshold, the CPU105performs color conversion from RGB to CMY.

Alternatively, in the color conversion processing 2 in step S1804, if the gray value difference is equal to or larger than the predetermined threshold based on the result of the determination made in step S1902, the CPU105may perform color conversion from RGB to C. If the gray value difference is smaller than the predetermined threshold, the CPU105may perform color conversion from RGB to MYK. In this case, in the edge enhancement processing in step S1805, the edge enhancement is performed on the MYK planes, not on the C plane, so that the same result can be obtained.

While there are several types of edge enhancement methods as described above, a case where the trapping processing is used as the edge enhancement method will be described in a third exemplary embodiment.

As described in the first exemplary embodiment, the trapping processing provides the effects of edge enhancement by overlapping adjacent different color planes. However, there is a case where the trapping processing is not to be performed depending on adjacent colors.

For example, in a case where a color of CMYK (100, 50, 0, 0) and a color of CMYK (50, 100, 0, 0) are adjacent to each other, both the adjacent colors are composed of the C and M planes, which does not cause a white void. In such a case, the trapping processing is not to be performed and thus the discriminability improvement processing is not to be performed.

To solve the issue, CMYK (100, 50, 0, 0) is converted to CMYK (100, 0, 0, 0) and CMYK (50, 100, 0, 0) is converted to CMYK (0, 100, 0, 0) in advance. Performing color conversion in this way allows one of the adjacent colors to have the C place and the other to have the M plane, which causes a white void. Accordingly, the trapping processing is to be performed and the discriminability improvement processing is to be performed.

As described above, in the present exemplary embodiment, an example of solving the issue by intentionally changing the color plane configuration to perform color conversion so that the trapping processing is performed will be described with reference toFIG. 22. A description of processing similar to that in the second exemplary embodiment will be omitted.

In step S2001, the color values used in the document are acquired, similarly to step S1801ofFIG. 20described in the second exemplary embodiment.

In step S2002, the discriminability improvement processing is performed. The processing will be described with reference toFIG. 23.

First, in step S2301, the CPU105performs processing similar to the processing in step S1901ofFIG. 21described in the second exemplary embodiment. Next, in step S2302, the CPU105performs processing similar to the processing in step S1902ofFIG. 21described in the second exemplary embodiment. In this case, if the gray value difference is equal to or larger than the predetermined threshold (NO in step S2302), the CPU105determines that the colors can be discriminated, and the processing proceeds to step S2303to perform the color conversion processing 1-1, which is the same as the processing in step S1903. If the gray value difference is smaller than the predetermined threshold (YES in step S2302), the CPU105determines that the colors are difficult to discriminate, and the processing proceeds to step S2304to perform color conversion processing 1-3.

In the color conversion processing 1-1 according to the third exemplary embodiment, RGB is converted to R′G′B′ so that all the RGB signal values become the same signal value, similarly to the processing in step S1903ofFIG. 21.

On the other hand, in the color conversion processing 1-3, RGB is converted to R″G″B″ so that two of the RGB channels have a signal value of 255.

For example, RGB is converted to R″G″B″ (R,255,255).

In step S2003, the CPU105performs the RIP processing in step S303ofFIG. 7described in the first exemplary embodiment. In step S2004, the CPU105performs color conversion processing 2′. When performing the color conversion processing from the RGB space to the CMYK space, the CPU105converts the R′G′B′ values to a color value of the K plane such as CMYK (0, 0, 0, K), similarly to the second exemplary embodiment. On the other hand, the CPU105converts the R″G″B″ values so that at least one of the CMY planes has a color value of 0. For example, the CPU105converts the current configuration to a configuration having the C plane such as CMYK (C, 0, 0, 0), in which the color values of the color planes other than the C plane are 0.

In order for the trapping processing to be performed, the CPU105performs the conversion so that the colors difficult to discriminate have different configurations from each other, such as a configuration having the C plane, a configuration having the M plane, a configuration having the Y plane, and a configuration having the C and M planes. A method for performing color conversion to two color planes is as follows. For example, when the current configuration is converted to the configuration having the C and M planes, RGB is converted to R″G″B″ (R, G, 255) in the color conversion processing 1-3 in step S2304. Then, the color conversion processing 2′ in step S2004is implemented by converting (R, G, 255) to (C, M, 0, 0).

In step S2005, the edge enhancement is performed. Similarly to the second exemplary embodiment, the colors that can be discriminated are converted to a monochrome color of the black plane and the trapping processing is not to be performed on the K plane. On the other hand, because the colors difficult to discriminate are converted to have different plane configurations, the trapping processing is to be performed on the colors.

In step S2006, the CPU105performs color conversion from CMYK to K. In this processing, the conversion is performed, for example, from CMYK to (C+M+Y+K). This makes the color monochrome, and also increases the value of the color if subjected to the edge enhancement in step S2005, thereby producing an output having darker gray.

In this manner, the discriminability improvement processing can be performed by changing the color conversion processing and the edge enhancement processing without using the attribute information when performing the trapping processing.

In the color conversion processing 1-3 in step S2304ofFIG. 23according to the present exemplary embodiment, RGB is converted to R″G″B″ so that two of the RGB channels have a signal value of 255. At this time, because the RGB values are changed from the original values, the gray value may be changed from the value before the discrimination processing.

To solve this, when converting RGB to R″G″B″ in the color conversion processing 1-3, the CPU105calculates the gray value in advance, and sets RGB to (Gray, 255, 255). Then, in the color conversion processing 2′, the CPU105performs color conversion from R′G′B′ to CMYK so that CMYK is (Gray, 0, 0, 0). Accordingly, in the color conversion processing 3, (Gray, 0, 0, 0) is converted to (C+M+Y+K)=(Gray) and the gray value can be stored.

In the first to third exemplary embodiments, the CPU105performs the RIP processing on the color data in step S303, performs the edge enhancement processing on the color raster image in step S305, and then performs the color conversion processing on the color raster image in step S306, so that the color raster image is converted to the gray raster image. This method, however, requires handling of color data and thus increases the size of the memory and hardware configuration, which causes a cost increase. Thus, in a fourth exemplary embodiment, the attribute correction processing (processing in step S903) performed in the discrimination determination processing in step S302is modified to reduce the size of the memory and hardware configuration.

A description of a configuration similar to that according to the first exemplary embodiment will be omitted. The configuration according to the present exemplary embodiment is also implemented by the CPU105loading a program stored in the ROM106into the RAM107and executing the program using the command processing unit103and the image processing unit104.

Discriminability improvement processing1100according to the fourth exemplary embodiment will be described with reference toFIG. 24.

First, in the RGB data acquisition processing in step S1101, the color values used in the document are acquired. This processing is similar to that performed in step S301ofFIG. 7.

Next, in step S1102, the discrimination determination processing is performed. This processing is similar to that performed in step S302ofFIG. 7, but is different in the attribute correction processing in step S903, and thus the attribute correction processing will be described. In step S1102, the CPU105causes the command analysis unit204to give, in the attribute correction processing, numbers to the colors included in the color value list502ofFIG. 8Band having a gray value difference smaller than the predetermined threshold.

Taking the color value list502ofFIG. 8Bas an example, the colors of the graphics413,408, . . . , and410cause a gray value difference smaller than the predetermined threshold and are difficult to discriminate. Thus, the command analysis unit204gives “0” to the graphic object413, “1” to the graphic object408, . . . , and “5” to the graphic object410. The command analysis unit204adds these numbers to the bits 4, 6, and 7 of the attribute information. Accordingly, the attribute information of the graphic object413is represented as (00101011)=(43), the attribute information of the graphic object408is represented as (00111011)=(59), and the attribute information of the graphic object414, which has the same color as that of the graphic object408, is represented as (00111011)=(59). In addition, the attribute information of the graphic object411is represented as (10111011)=(187).

Next, in the color conversion processing in step S1103, the CPU105causes the command execution unit205to convert color data to gray data.

Then, in the RIP processing in step S1104, the CPU105causes the command execution unit205to convert the gray data to a gray raster image and attribute information.

Finally, in the edge enhancement processing in step S1105, the processing is performed on the gray raster image on a pixel-by-pixel basis. More specifically, the CPU105executes the processing in the flowchart ofFIG. 25on each pixel of interest.

The edge enhancement processing in step S1105ofFIG. 24will be further described with reference to the flowchart ofFIG. 25.

First, in step S1701, processing is performed similarly to step S1001ofFIG. 11according to the first exemplary embodiment, and thus a description thereof will be omitted. The processing in step S1702is also similar to the processing in step S1002ofFIG. 11according to the first exemplary embodiment, and thus a description thereof will be omitted. In step S1703, the CPU105determines whether the color information of the pixel of interest is different from the color information of the peripheral pixel (whether the color objects are different from each other). In other words, the CPU105determines whether the attribute information corrected in the discriminability determination processing in step S1102is different between the pixel of interest and the peripheral pixel.

The CPU105makes the determination by referring to a combination of the bits 4, 6, and 7 of the attribute information corrected in the above-described attribute correction processing. If the combination of the bits 4, 6, and 7 is different between the pixel of interest and the peripheral pixel (YES in step S1703), the processing proceeds to step S1704. If the combination of the bits 4, 6, and 7 is the same between the pixel of interest and the peripheral pixel (NO in step S1703), the processing ends.

Finally, in step S1704, the CPU105performs the edge enhancement processing on the gray raster image. In this processing, the one-dimensional LUT or the sharpness processing described in the first exemplary embodiment may be used as the edge enhancement method. The above is the description of the flowchart ofFIG. 25.

According to the present exemplary embodiment, the RIP processing in step S1104and the edge enhancement processing in step S1105are performed on gray data, thereby reducing the size of the memory and hardware configuration, regardless of whether the present exemplary embodiment is implemented by hardware or software.

While the disclosure has been described with reference to the various examples and exemplary embodiments, the gist and scope of the disclosure are not limited to specific descriptions in the present specification.

OTHER EMBODIMENTS

This application claims the benefit of Japanese Patent Application No. 2020-071151, filed Apr. 10, 2020, which is hereby incorporated by reference herein in its entirety.