Image processing device, image processing method, and program
The image processing device enhances color conversion by detecting contiguous color regions and applying tailored conversion tables, addressing color degeneration and maintaining color distinguishability in printed images.
Patent Information
- Application Number
- JP2024085653
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-12-09
AI Technical Summary
Existing color conversion methods in image processing result in color degeneration when colors outside the printer's reproduction gamut are mapped, leading to reduced saturation and difficulty in maintaining appropriate color distances, especially when multiple colors cause degeneration.
An image processing device that detects regions of contiguous same colors and applies different color conversion tables based on the number of colors present, using a first table for single-color regions and a second table for multiple-color regions to enhance color differences and prevent degeneration.
The method ensures appropriate color conversion by maintaining color distances, preventing color degeneration and ensuring distinguishable colors in the output, even when colors are outside the printer's gamut.
Smart Images

Figure 2025178825000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an image processing device, an image processing method, and a program capable of performing color mapping. [Background technology]
[0002] 2. Description of the Related Art There is known a printer that receives a digital document described in a predetermined color space, maps each color in the color space to a color gamut that can be reproduced by the printer, and outputs the result.
[0003] For example, a method is known in which objects within a document are identified and "colorimetric" mapping is performed on graphic areas and "perceptual" mapping is performed on photographic areas (see Patent Document 1). However, when "perceptual" mapping is performed, the saturation of colors that can be reproduced by a printer in the color space of the digital document may be reduced. Furthermore, when "colorimetric" mapping is performed, if there are colors among the multiple colors contained in the digital document that are outside the printer's reproduction color gamut, the mapping will result in color degeneration.
[0004] As a countermeasure against the above, Patent Document 1 describes a method for appropriately mapping colors to the print color gamut so as to reduce the degree of color degeneration by increasing the distance between colors that cause color degeneration. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 2024-008263 Summary of the Invention [Problem to be solved by the invention]
[0006] However, when the color conversion method is set using the pixel values of the entire partial document described in Patent Document 1, if there are many colors that cause color degeneration, it becomes difficult to increase the color distance for all pixel values, and appropriate color conversion results may not be obtained.
[0007] The present invention has been made in consideration of the above-mentioned conventional examples, and aims to obtain appropriate color conversion results by setting an appropriate color conversion method based on the color information required to set the color conversion method for an image area. [Means for solving the problem]
[0008] In order to solve the above problem, according to one aspect of the present invention, there is provided a method for detecting an area having a predetermined extent and made up of pixels of the same color from image data; a storage means for storing color information of the colors included in the detected region; a generating means for generating output image data by color-converting the image data using a first color conversion table when the stored color information is one color, and for generating output image data by color-converting the image data using a second color conversion table when the stored color information is two or more colors; Equipped with For at least two colors of the color information, color conversion using the second color conversion table produces a larger color difference than color conversion using the first color conversion table. An image processing device is provided. [Effects of the Invention]
[0009] According to the present invention, an appropriate color conversion method is set based on color information required for setting the color conversion method for an image region, thereby obtaining an appropriate color conversion result. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a block diagram showing a configuration of an image processing device. [Figure 2] FIG. 1 is a diagram schematically illustrating a configuration of a recording apparatus. [Figure 3] 10 is a flowchart showing a recording process in the recording device. [Figure 4] FIG. 10 is a diagram illustrating partial image data. [Figure 5] 10 is a flowchart illustrating a color conversion process according to the first embodiment. [Figure 6] FIG. 2 is a diagram illustrating image data according to the first embodiment. [Figure 7] FIG. 1 is a diagram showing a schematic diagram of color degeneration correction; [Figure 8] FIG. 4 is a diagram for explaining setting of an area in the first embodiment. [Figure 9] FIG. 2 is a diagram for explaining a first region and a second region in the first embodiment. [Figure 10] 10 is a flowchart for explaining the creation of a color conversion table that does not cause color degeneration in the first embodiment. [Figure 11] 10 is a flowchart for creating a color information list for a first region in the first embodiment. [Figure 12] FIG. 4 is a diagram showing an example of a color information list of a first region in the first embodiment. [Figure 13] FIG. 10 is a diagram illustrating image data according to a second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the invention claimed. Although multiple features are described in the embodiments, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same reference numerals are used to designate the same or similar components, and redundant explanations will be omitted.
[0012] (First embodiment) The terms used in this embodiment are defined as follows.
[0013] (color gamut) A color gamut refers to the range of colors that can be reproduced in an arbitrary color space. It is also referred to as a color reproduction range, color gamut, or gamut. The color gamut volume is an index that represents the size of the color gamut. Color gamut volume is a three-dimensional volume in an arbitrary color space. The chromaticity points that make up the color gamut may be discrete. For example, a specific color gamut may be represented by 729 points on the CIE-L*a*b* system, and the points between them may be calculated using known interpolation methods such as tetrahedral interpolation or cubic interpolation. In such cases, the corresponding color gamut volume can be calculated by accumulating the volumes of the tetrahedrons or cubes that make up the color gamut in the CIE-L*a*b* system, depending on the interpolation method used. While the color gamut and color gamut in this embodiment are not limited to a specific color space, this embodiment uses the color gamut in the CIE-L*a*b* space as an example. Similarly, the numerical values of the color reproduction gamut in this embodiment indicate volumes obtained by cumulative calculation in the CIE-L*a*b* space, assuming tetrahedral interpolation.
[0014] Here, the color reproduction range may be determined according to the color reproduction method or the medium on which the color is reproduced, or may be a predetermined range (for example, a standard color reproduction range).
[0015] (gamut mapping) Gamut mapping is the process of converting one color gamut to another. For example, it is mapping an input color gamut to a different output color gamut. Conversion within the same color gamut is not called gamut mapping. Common examples include ICC profiles such as Perceptual, Saturation, and Colorimetric. Mapping can be achieved using a single three-dimensional (3D) lookup table (LUT). Alternatively, the gamut of the input color space can be converted to a standard color space, and then the gamut can be mapped in the standard color space. For example, if the input color space is sRGB, the gamut of the input color space is converted to the CIE-L*a*b* color space. In the CIE-L*a*b* color space, the gamut of the input color space converted to the CIE-L*a*b* color space is mapped to the output color gamut. Mapping can be achieved using, for example, a 3D LUT or a conversion formula. Conversion between the input and output color spaces can also be performed simultaneously. For example, if the input is in the sRGB color space and the output is in the RGB color space or CMYK color space specific to the recording device, the input color space may be converted to the output color space in conjunction with gamut mapping.
[0016] (Color degeneration) In this embodiment, color degeneration is defined as the phenomenon in which, when gamut mapping is performed on any two colors, the distance between the colors after mapping in a specified color space becomes smaller than the distance between the colors before mapping. Specifically, assume that a digital document contains colors A and B, and mapping to the printer's color gamut converts color A to color C and color B to color D. In this case, color degeneration is defined as the distance between colors C and D becoming smaller than the distance between colors A and B. The distance between colors may be the Euclidean distance between two points in a color space, as described below. When color degeneration occurs, colors that are perceived as different in the digital document may be perceived as the same color in the reproduced image after recording or other means. For example, in a graph, different items are represented by different colors to indicate that they are different items. When color degeneration occurs, different colors may be perceived as the same color, which may lead to the misidentification of different items in the graph as the same item. The specified color space used to calculate the color distance here may be any color space. For example, these include the sRGB color space, Adobe RGB color space, CIE-L*a*b* color space, CIE-LUV color space, XYZ color space, xyY color space, HSV color space, and HLS color space.
[0017] <Overall image processing device> FIG. 1 is a block diagram showing the configuration of an image processing device according to this embodiment. The image processing device 101 may be a personal computer (PC), tablet, server, or recording device. A processor (CPU) 102 executes various image processing operations by loading at least one program stored in a storage medium (memory) 104, such as a hard disk drive (HDD) or ROM, into a RAM 103 serving as a work area and executing the program. For example, the CPU 102 receives commands from a user via a human interface device (HID) I / F (not shown). The CPU 102 then executes various image processing operations in accordance with the received commands and the programs stored in the storage medium 104. The CPU 102 also performs predetermined processing on manuscript data received via a data transfer interface (I / F) 106 in accordance with the programs stored in the storage medium 104. The CPU 102 then displays the results and various information on a display (not shown) and transmits them via the data transfer I / F 106. The image processing accelerator 105 is hardware capable of executing image processing operations faster than the CPU 102. The image processing accelerator 105 is activated when the CPU 102 writes parameters and data required for image processing to a predetermined address in the RAM 103. After reading the parameters and data, the image processing accelerator 105 executes image processing on the data. However, the image processing accelerator 105 is not an essential element, and equivalent processing may be executed by the CPU 102. Specifically, the image processing accelerator is a GPU or a specially designed electrical circuit. The parameters may be stored in the storage medium 104 or may be obtained from an external device via the data transfer I / F 106.
[0018] In the recording device 108, the CPU 111 loads a program stored in the storage device 113 into the RAM 112, which serves as a work area, and executes the program, thereby providing overall control over the recording device 108. The image processing accelerator 109 is hardware that can execute image processing faster than the CPU 111. The image processing accelerator 109 is activated when the CPU 111 writes parameters and data required for image processing to a predetermined address in the RAM 112. After reading the parameters and data, the image processing accelerator 109 executes image processing on the data. However, the image processing accelerator 109 is not an essential element, and equivalent processing may be executed by the CPU 111. The parameters may be stored in the storage device 113, or may be stored in a storage (not shown), such as a flash memory or a HDD.
[0019] Here, we will explain the image processing performed by the CPU 111 or the image processing accelerator 109. Image processing is, for example, processing that generates data indicating the ink dot formation positions during each scan by the print head 115 based on the acquired print data. In addition, the CPU 111 or the image processing accelerator 109 performs color conversion processing and quantization processing on the acquired print data.
[0020] The color conversion process is a process of separating colors into ink densities handled by the printing device 108. For example, the acquired printing data includes image data representing an image. The image data is image data that represents colors in color space coordinates such as sRGB, which are the representation colors of a monitor. In this case, the image data that represents colors in the sRGB color coordinates (R, G, B) is converted into image data (ink data) that represents colors using the ink colors (CMYK) handled by the printing device 108 as element colors (component colors). The color conversion method is realized by matrix calculation processing, processing using a three-dimensional lookup table (LUT), four-dimensional LUT, or the like.
[0021] The printing device 108 of this embodiment uses, as an example, black (K), cyan (C), magenta (M), and yellow (Y) inks. Therefore, image data of RGB signals is converted into image data consisting of 8-bit color signals for each of K, C, M, and Y. The color signal value of each color corresponds to the amount of ink applied for that color. Furthermore, although four ink colors (K, C, M, and Y) have been used as an example, other ink colors, such as light-density light cyan (Lc), light magenta (Lm), or gray (Gy) ink, may be used to improve image quality. In such cases, ink signals corresponding to those colors are generated.
[0022] After the color conversion process, the ink data is subjected to a quantization process. The quantization process reduces the number of gradation levels in the ink data. In this embodiment, quantization is performed using a dither matrix that arranges threshold values for comparison with the ink data value for each pixel. After the quantization process, binary data is ultimately generated that indicates whether or not a dot will be formed at each dot formation position.
[0023] After image processing, the printhead controller 114 transfers the generated binary data to the printhead 115. At the same time, the CPU 111 performs printing control via the printhead controller 114 to operate a carriage motor that drives the printhead 115 and also to operate a transport motor that transports the print medium. The printhead 115 scans over the print medium, and at the same time, ink droplets are ejected onto the print medium by the printhead 115 in accordance with the binary data, thereby printing an image.
[0024] The image processing device 101 and the recording device 108 are connected via a communication line 107. In this embodiment, a local area network is described as an example of the communication line 107, but it may also be a USB hub, a wireless communication network using a wireless access point, a connection using a Wi-Fi Direct communication function, or the like.
[0025] In the following description, the recording head 115 is assumed to have recording nozzle rows for four color inks: cyan (C), magenta (M), yellow (Y), and black (K). However, this is not limited to this, and this embodiment can also be applied to cases where an image is formed using the three colors CMY, or where an image is formed using more colors in addition to YMCK.
[0026] FIG. 2 is a diagram illustrating a print head 115 according to this embodiment. In this embodiment, an image is printed on a unit area corresponding to one nozzle array through multiple scans N times. The print head 115 includes a carriage 116, nozzle arrays 117, 118, 119, and 120, and an optical sensor 122. The carriage 116, which carries the five nozzle arrays 117, 118, 119, and 120 and the optical sensor 122, can move back and forth along the main scanning direction (the X direction in the figure) by the driving force of a carriage motor transmitted via a belt 121. As the carriage 116 moves in the X direction relative to the print medium, ink droplets are ejected from each nozzle of the nozzle array in the direction of gravity (the -z direction in the figure) based on print data. In this embodiment, the ejection elements that eject ink droplets from each nozzle are thermal-type elements that eject liquid by generating bubbles using electrothermal conversion elements. The head structure is not limited to this, and may be a type that ejects liquid using a piezoelectric element (piezo), or an ejection element using another ejection method.
[0027] As a result, an image is recorded on the recording medium placed on the platen 123 in 1 / N (N: natural number) main scans. When one main scan is completed, the recording medium is transported in a transport direction (-Y direction in the figure) that intersects with the main scanning direction by a distance corresponding to the width of 1 / N main scans. Through these operations, an image is recorded in an area with a width equivalent to one nozzle row in N scans. By alternately repeating such main scans and transport operations, an image is gradually recorded on the recording medium. In this way, it is possible to control so that image recording on a specified area is completed.
[0028] <Recording Processing> Fig. 3 is a flowchart showing the recording process in the image processing device 101. The process in Fig. 3 is realized, for example, by the CPU 102 executing a program loaded into the RAM 103. In this embodiment, an example is shown in which the recording process is performed by the image processing device 101, but it may also be performed by the recording device 108, or a configuration in which the image processing device 101 and the recording device 108 share the processing load may also be used.
[0029] In step S101, the CPU 102 acquires manuscript data to be recorded. Specifically, the CPU 102 acquires the manuscript data from the data transfer interface of the host PC via the data transfer interface of the image processing device 101. Here, the manuscript data is assumed to be document data consisting of multiple pages.
[0030] Next, in step S102, CPU 102 divides the manuscript data into multiple partial manuscript data. In this embodiment, the manuscript data to be recorded is document data consisting of multiple pages. The partial manuscript data may be in any form as long as it is a processing unit into which the manuscript data is divided. FIG. 4 is a diagram for explaining partial image data. For example, partial manuscript data may be in page units, such as image data 200 shown in FIG. 4(a). FIG. 4(b) shows a recording area recorded by scanning of print head 115. Printing of area 204 is completed in two scans of print head 115 (the scanning direction is indicated by an arrow). Data in units recorded by the print head, such as area 204, may also be used as partial manuscript data. Furthermore, if the image data in FIG. 4(a) is described in a page description language (PDL), area 201 or area 202, which is an area unit determined by a drawing command, may also be used as partial manuscript data. In addition, for example, in the case of page units, multiple area units determined by page band drawing commands may be combined into one partial manuscript data, such as combining the first and second pages to form partial manuscript data. In this embodiment, an example of dividing into partial manuscript data in page units is shown.
[0031] Next, in step S103, the CPU 102 performs a loop process for each partial document data. In step S103, the CPU 102 performs a color conversion process for the partial document data. Details of the color conversion process will be described later with reference to FIG. 5. In S103, the CPU 102 may further render the color-converted partial document data to generate image data (also referred to as pixel data) composed of pixels. If the partial document data is divided into units of drawing commands, for example, once color conversion is completed for drawing commands that draw objects belonging to a predetermined area such as a page or band, rendering may be performed for that area. Note that a band is, for example, a rectangular area obtained by dividing a page parallel to the scanning direction of the print head 115 of an inkjet printing method.
[0032] Next, in step S104, CPU 102 determines whether color conversion has been completed for all partial document data divided from the document data. If color conversion has been completed, the process proceeds to step S105. If color conversion has not been completed, the color conversion process of step S103 is performed on the next partial document data.
[0033] Next, in step S105, CPU 102 causes recording device 108 to record the manuscript data. Specifically, CPU 102 performs three processes, namely, ink color separation, output characteristic conversion, and quantization, on each pixel of the image data converted in step S103, and transmits the processed data (recording data) to recording device 108 to cause it to record.
[0034] (Ink color separation processing) Ink color separation is a process that converts the output values of the color conversion process in S103, such as color values represented by Rout, Gout, and Bout, into output values for each ink color to be printed using an inkjet printing method. In this embodiment, printing is assumed to use four ink colors: cyan, magenta, yellow, and black (C, M, Y, K). There are various methods for achieving this conversion. For example, similar to the color conversion process, a three-dimensional LUT is used for each color to calculate an optimal combination of ink color pixel values (C, M, Y, K) for a combination of print data pixel values (Rout, Gout, Bout). For example, a four-dimensional LUT2
[0256]
[0256]
[0256] [4] is used, which adds components representing C, M, Y, and K to the input color components (Rout, Gout, Bout).
[0035] C=LUT2[Rout][Gout][Bout][0]...(Formula 1) M=LUT2[Rout][Gout][Bout][1]...(Formula 2) Y=LUT2[Rout][Gout][Bout][2]...(Formula 3) K=LUT2[Rout][Gout][Bout][3]...(Equation 4).
[0036] The table size may also be reduced by reducing the number of grids in the LUT from 256 values for each input color component to, for example, 16 values for each color. In this case, the output values for grids not included in the reduced grid may be determined by interpolating table values.
[0037] (output characteristic conversion processing) Next, output characteristic conversion is a process of converting the density of each ink color into a printing dot count rate. Specifically, for example, the density of each color with 256 gradations is converted into the dot count rates Cout, Mout, Yout, and Kout with 1024 gradations for each color. For this purpose, for example, a 2D LUT3[4]
[0256] is used, which sets the printing dot count rate appropriate for each ink color's density, as shown below.
[0038] Cout=LUT3[0][C]...(Formula 5) Mout=LUT3[1][M]...(Formula 6) Yout = LUT3[2][Y] (Equation 7) Kout=LUT3[3][K]...(Equation 8).
[0039] The table size may also be reduced by reducing the number of grids in the LUT from 256 different values for each input color component to, for example, 16 different values. In this case, the output value for grid values not included in the reduced grid may be determined by interpolating table values.
[0040] (quantization processing) Next, quantization is the process of converting the print dot count rates Cout, Mout, Yout, and Kout of each ink color into the actual On / Off state of print dots for each pixel. Various quantization methods can be used, such as error diffusion and dithering. For example, dithering can be used to achieve this using the following formula:
[0041] Cdot=Halftone[Cout][x][y] (Formula 9) Mdot=Halftone[Mout][x][y] (Equation 10) Ydot=Halftone[Yout][x][y] (Equation 11) Kdot=Halftone[Kout][x][y] (Equation 12).
[0042] The above equation means that for each color, the print dot count rate at pixel position (x, y) is compared with the threshold value for pixel position (x, y), and the value of pixel position (x, y) is binarized, for example, to 0 or 1, depending on the comparison result. By comparing with the threshold value for each pixel position (x, y), the print dots of each ink color are turned on or off. Here, Cout, Mout, Yout, and Kout are each expressed in 10 bits and have a value range of 0 to 1023. Therefore, the occurrence probability of each print dot is Cout / 1023, Mout / 1023, Yout / 1023, and Kout / 1023. The image data generated by equations 9 to 12 becomes the print data sent to the printing device 108.
[0043] Finally, the print data is sent from the image processing device 101 to the printing device 108, where the generated image is printed. Through this printing operation, an image corresponding to the color-converted original data is formed on a medium.
[0044] In FIG. 3, image processing is performed on the entire document data before printing, but printing may be performed by executing the processing in S105 on a page or band basis after the processing in S103.
[0045] <Color conversion processing> Fig. 5 is a flowchart illustrating the color conversion processing of step S103 in Fig. 3 in the first embodiment. The processing in Fig. 5 is realized, for example, by the CPU 102 executing a program loaded into the RAM 103. In this embodiment, an example is shown in which the color conversion processing is performed by the image processing device 101, but it may also be performed by the recording device 108, or the processing may be shared between the image processing device 101 and the recording device 108. Note that if the color conversion processing of S103 is performed by the recording device 108, the subsequent steps S104 to S105 may also be performed by the recording device 108.
[0046] In this embodiment, an example is shown in which a color conversion table is created that reduces color degeneration that occurs during color conversion processing and enables the colors of the original data to be distinguished even when output from a recording device.
[0047] In step S201, the CPU 102 acquires partial manuscript data to be subjected to color conversion processing. The partial manuscript data acquired in this embodiment is the partial manuscript data output in step S102 described above, e.g., manuscript data in units of pages. Here, the partial manuscript data is described as image data composed of pixels. The image data includes color information representing colors defined in a predetermined color space. In this embodiment, the color information is sRGB data. The color information is not limited to sRGB data; any format of data that can define colors may be used, such as Adobe RGB data, CIE-L*a*b* data, CIE-LUV data, XYZ color system data, xyY color system data, HSV data, and HLS data. Note that the color information of the manuscript data to be subjected to color conversion processing is also referred to as input color information. If the image data is to be subjected to color conversion, the color information of each pixel is also referred to as an input pixel value. Because the color information contains multiple color components, they are referred to as input color components. Similarly, the color information after color conversion is referred to as output color information or output pixel value. Because the color information contains multiple color components, they are referred to as output color components. In addition, although the partial document data is assumed to be image data in this explanation, this is not necessarily the case. For example, color conversion processing may be performed on the colors of the partial document data described in PDL, and then rendering may be performed to generate image data.
[0048] Next, in step S202, the CPU 102 performs color conversion on the image data using a color conversion table stored in advance in a storage medium. That is, color conversion is applied to the image data using a predetermined color conversion method. In this embodiment, color conversion involves performing gamut mapping on the image data, mapping the color gamut of the sRGB data to the color gamut of the recording device through color conversion. The recording device 108 has a different color gamut depending on the recording method, recording speed, etc. determined for each output mode. Therefore, the image processing device requires gamut mapping compatible with multiple output modes. The image data after gamut mapping is stored in RAM or a storage medium. Specifically, the color conversion table is a 3D LUT for each output color component. Using the 3D LUT for each output color component, a combination of output pixel values (Rout, Gout, Bout) can be determined for a combination of input pixel values (Rin, Gin, Bin). If the input values Rin, Gin, and Bin each have 256 gradations, it is preferable to use LUT1
[0256]
[0256]
[0256] [3], which is a table that converts Rout, Gout, and Bout to 256 gradations. This LUT1 has a total of 16,777,216 sets of output values (256 x 256 x 256). The [3] at the end is an index that takes the value 0, 1, or 2, representing the output color component. Color conversion is performed using the gamut mapping table described above. Specifically, this can be achieved by performing the following process on each pixel of the image composed of RGB pixel values of the image data input in step S101.
[0049] Rout = LUT1[Rin][Gin][Bin][0]...(Equation 13) Gout = LUT1[Rin][Gin][Bin][1]...(Equation 14) Bout = LUT1[Rin][Gin][Bin][2] (Equation 15).
[0050] Furthermore, the number of indexes indicating the values of each input color component of the LUT may be reduced from 256 to, for example, 16. In this case, the reduced grid values may be determined by interpolating table values, or other known techniques for reducing the table size may be used.
[0051] Next, in step S203, the CPU 102, based on the image data acquired in step S201, sets a first region on the image corresponding to the image data to be used for setting the color conversion method for the image data and a second region not used for setting the color conversion method. In this embodiment, the first region refers to a region in which the same color is contiguous, spanning two or more pixels vertically and two or more pixels horizontally. Here, the same color does not necessarily have to be strictly the same; it may be a range of a certain color difference. For example, in the L*a*b* color system, it may be a color within a predetermined hue angle range based on a certain color. The first region is not limited to a single connected region, but may include multiple regions of different colors or the same color. Setting the first region may involve storing the position of the first region detected from the image data. Therefore, setting the first region is also referred to as detecting the first region or setting the first region. Note that if the image data is defined as a second region other than the first region, setting the first region automatically also sets the second region, so the setting target may be limited to the first region. The information indicating the first region is also called region information.
[0052] In this embodiment, setting the color conversion method means creating a color conversion table for gamut mapping. Alternatively, it may include selecting a color conversion table. Setting the color conversion method may involve creating a conversion formula, or creating a color conversion table as in this embodiment, or any method that can set a method for performing color conversion.
[0053] FIG. 6 shows an example of image data acquired in step S201 in the first embodiment. FIG. 6(a) shows an image of the original data created by the user for input to the image processing device 101. FIG. 6(b) shows an image obtained by converting the image data of FIG. 6(a) to a lower resolution using simple thinning and then converting it back to the original resolution using bilinear conversion. Due to the capacity limitations of the storage medium 104 of the image processing device 101, the input original data may be subjected to resolution conversion or compression before being stored in the storage medium 104, and then expanded (by inverse resolution conversion or decompression) before use. In FIG. 6(a), only two colors, 601 and 602, are present in the graph. However, in FIG. 6(b), in addition to colors 601 and 602, colors 603 and 604 are also generated by resolution conversion.
[0054] FIG. 7 is a diagram for explaining color degeneration and its improvement. FIG. 7(a) shows the case where the image data before color conversion is that of FIG. 6(a), and FIGS. 7(b) and (c) show the case where the image data before color conversion is that of FIG. 6(b). In FIG. 7, color gamut 701 is the color gamut of the image data that is the target of color conversion processing, and in this embodiment, shows the sRGB color gamut. Color gamut 702 is the color gamut after the color conversion processing of step S204, which will be described later, and corresponds to the color gamut in a predetermined output mode of the recording device.
[0055] In FIG. 7A, color 703 is the color obtained after color 601 has been converted by a color conversion process (gamut mapping). Color 704 is the color obtained after color 602 has been converted by gamut mapping. A color is determined to be degenerate when the color difference ΔE 705 between color 703 and color 704 is smaller than the color difference ΔE 706 between color 601 and color 602. The Euclidean distance in a color space is used to calculate the color difference ΔE. In this embodiment, the Euclidean distance in the CIE-L*a*b* color space (hereinafter referred to as color difference ΔE) is used as a suitable example. Because the CIE-L*a*b* color space is a visually uniform color space, the Euclidean distance can be approximated as the amount of color change (color difference). Therefore, humans perceive colors as closer together when the Euclidean distance in the CIE-L*a*b* color space is smaller, and as the Euclidean distance is larger, they perceive colors as farther apart. Color information in the CIE-L*a*b* color space is expressed in the color space on three axes: L*, a*, and b*. The formula for calculating the color difference ΔE between colors (L1, a1, b1) and (L2, a2, b2) is as follows:
[0056]
number
[0057] Therefore, in this embodiment, a color conversion table is created that corrects color degeneration by increasing the color distance between colors 703 and 704 in a predetermined color space. Specifically, a correction process is performed to increase the color distance between colors 703 and 704 to a distance at which they can be distinguished as different based on human visual characteristics. The color distance at which colors can be distinguished as different based on visual characteristics is a color difference ΔE of 2.0 or more. It is more preferable that the color difference between colors 703 and 704 is approximately the same as color difference ΔE706. Therefore, a color conversion table is created in which color 601 is gamut mapped to color 707 and color 602 is gamut mapped to color 708. As a result, a color difference ΔE709, which is equal to color difference ΔE706, can be reproduced in the device color gamut.
[0058] On the other hand, in Figure 7(b) [i2][o3], color 710 is the color obtained after color 603 has been converted using gamut mapping. Color 711 is the color obtained after color 604 has been converted using gamut mapping. If the color distance is increased to correct color degeneration as described above, a color conversion table is created in which color 601 is gamut mapped to color 712, color 602 to color 713, color 603 to color 714, and color 604 to color 713, as shown in Figure 7(c). As a result, although the color distance after color conversion is wider than in Figure 7(b), it may not be possible to increase the color difference ΔE716 between color 712 and color 713 to E2.0 or to the same level as the color difference ΔE706 in the device gamut. As a result, colors that are distinguishable in the original data displayed on the monitor may be indistinguishable or difficult to distinguish in the output from the recording device.
[0059] In this embodiment, color information of image data that is identifiable by humans and discriminable in the output of a recording device is considered to be color information of an area having a predetermined or greater planar area, and that area is set as a first area. Therefore, an area in the image data where pixels having the same color information are arranged in two or more consecutive pixels vertically and two or more consecutive pixels horizontally is set as a first area. Setting the first area means, for example, storing the position of the identified first area. Furthermore, color information may also be stored in association with the position.
[0060] ●Setting the first area FIG. 8 is a diagram illustrating the setting of the first region in this embodiment. As indicated by the arrow in FIG. 8(a), in this embodiment, line processing is performed on image data composed of pixels arranged in a grid pattern, with processing being performed pixel by pixel starting from the first pixel of each line. Note that one arrangement of pixels in image data composed of pixels arranged in a grid pattern is referred to as a line or row, and an arrangement of pixels perpendicular to the line is referred to as a column. For example, a line may be an arrangement of pixels corresponding to the scanning direction of the print head 115 during image formation.
[0061] In pixel-by-pixel processing, it is determined whether the color information of each of the three pixels (pixel 801, pixel 802, pixel 803) surrounding the pixel to be processed (pixel of interest) 800 shown in Figure 8(b) is the same as the color information of the pixel of interest. If it is determined that they have the same color information, the four pixels including the pixel of interest are set as the first region. Pixels that have already been set as the first region may be reset as the first region in pixel-by-pixel processing.
[0062] The process of setting (or identifying) this first region is performed along a line, i.e., by focusing on pixels in raster scan order. Therefore, once a 2×2 pixel region is identified as the first region, the next pixel of interest is a pixel included in the identified first region. In FIG. 8B, pixel 801 is included in the first region identified with pixel 800 as the pixel of interest. Therefore, once a first region with pixel 801 as the pixel of interest is identified, these two identified first regions have the same color and can be connected to form a single first region. This is similarly performed in scanning one line to identify the first region, allowing the first region to be expanded along the line. Color information of the identified first region may be stored in RAM 103, for example, in association with position information of the first region. In this embodiment, the first region is identified line by line. Therefore, in this embodiment, the first region that can be identified by manipulating one line includes one or more rectangular regions with a height (Y direction) of 2 pixels and a length (in the raster scan direction, or X direction) of N pixels (2≦N≦ the number of pixels in the X direction of the image data). Therefore, the position information of the first region may be expressed by the position of the top left pixel (LeftTop(x1,y1)) and the position of the bottom right pixel (RightBottom(x2,y2)) of the rectangle. By identifying the first region in this manner, the first region included in a single piece of image data may be divided into multiple rectangular regions, and rectangular regions identified as first regions may overlap. The individual rectangular regions that make up this first region are referred to as subregions of the first region. Overlapping subregions have the same color information. Separated subregions may have the same color information or different color information. That is, the first region identified from the image data in this way may include multiple rectangular sub-regions having a predetermined size (e.g., 2x2 or more), and the multiple rectangular sub-regions may have different colors. Furthermore, position information may be stored for each sub-region, and color information may also be stored for each sub-region.
[0063] In this embodiment, the first region is defined using the above-described method. However, this method is not limited to this, as long as it is possible to extract a region with the same color information that has a predetermined area or more in a planar view. Furthermore, in this embodiment, a region with the same color information is extracted. However, while the original image data contains the same color information, the color information may vary within a predetermined range in lossy compressed image data, such as JPEG. Therefore, a range of variation may be set for colors to be determined to have the same color information, such as a color difference of ΔE1.0 or a difference in RGB values within a predetermined value. When similar colors are considered to be the same color, it is particularly desirable that their hues are similar. For example, it is desirable that the color difference between two colors is within a predetermined tolerance range, and in the L*a*b* color system, it is within a predetermined hue angle range. In the RGB color system, it is desirable that the two colors are on or close to a line passing through the origin. Therefore, in addition to simply having a certain range of color difference, a certain range of hue difference may also be set as a condition for colors to be the same.
[0064] As a result of setting the first regions, in this embodiment, for both the image data of FIGS. 6(a) and 6(b), the regions filled in black in FIG. 9 are set as first regions, and the regions filled in white are set as second regions. In FIG. 9(a), the regions corresponding to both regions 601 and 602 in FIG. 6(a) are first regions. In FIG. 9(b), the regions corresponding to both regions 601 and 602 in FIG. 6(b) are also first regions. However, neither of the regions corresponding to regions 603 and 604 are first regions.
[0065] Next, in step S204, the CPU 102 creates a color conversion table from the following information: That is, in step S204, the color conversion method is set. Image data acquired in step S201 The color conversion table stored in advance in the storage medium used in step S202 Image data that has been color-converted using a color conversion table stored in advance in a storage medium in step S202 Area information set in step S203 The color conversion table created in step S204 has the same format as the color conversion table stored in advance in the storage medium used in S202.
[0066] Next, in step S205, CPU 102 applies color conversion to the image data acquired in step S201 using the color conversion table created in step S204, thereby generating color-converted image data (also referred to as output image data). The generated image data is stored in RAM or a storage medium.
[0067] <Color conversion method settings> A method for creating a color conversion table that reduces color degeneration in step S204 will now be described in detail using the flowchart in Fig. 10. The processing in Fig. 10 is implemented, for example, by the CPU 102 executing a program loaded into the RAM 103. In this embodiment, an example is shown in which the color conversion table creation processing is performed by the image processing device 101, but it may also be performed by the recording device 108, or the processing may be shared between the image processing device 101 and the recording device 108.
[0068] In step S301, the CPU 102 detects color information for the first region in FIG. 8 set in step S203. The detection target is the image data acquired in S201. From the detected color information, a color information list listing the colors included in the first region is created. The detection process is repeated for each pixel in the image data of the first region, and is performed for all pixels included in the image data of the first region. In this embodiment, colors 601 and 602 in FIG. 6(a) or 6(b) are detected as the color information for the first region. Note that colors 603 and 604 are not part of the first region, and are excluded from the color information list to prevent unnecessary color degeneration correction. The color information list is initialized at the start of step S301. Note that if color information for the first region identified from the image data was saved in step S203 of FIG. 5, that color information may be listed to create the color information list. Also, step S203 in FIG. 5 may be omitted, and the color information list may be created in step S301, including the identification of the first region performed in step S203.
[0069] FIG. 11 is a flowchart showing the details of step S301 and a method for creating a color information list when new color information is detected as color information for the first region. Since FIG. 11 is a part of FIG. 10, it is realized by executing a program loaded into RAM 103 by CPU 102, as in FIG. 10. FIG. 12 shows an example of a created color information list, which is composed of RGB values and evaluation values, and is sorted in descending order of evaluation value. Furthermore, the position of at least one sub-region having corresponding color information may be stored in association with the color information. This position information can be obtained from the color information and position information of the sub-regions that make up the first region identified in step S203.
[0070] In this embodiment, the evaluation value is the number of pixels having color information for each color information included in the first region. In step S203 of FIG. 5, the first region is identified and the position information for each sub-region included in the first region is saved, so the number of pixels for each sub-region can be easily identified. In particular, in this embodiment, the height of the sub-region is 2, so the number of pixels can be calculated as length (y2 - y1 + 1) x 2. By accumulating this number of pixels for each color information, the number of pixels for each color information can be calculated.
[0071] As mentioned above, sub-regions included in the first region may overlap. The overlapping pixels may be identified from the position and color information of the sub-regions and their number may be subtracted, or the number of pixels may be calculated including the overlapping pixels. If overlapping pixels are included, a weight is assigned to each continuous region of a single color according to its extent. Regarding the evaluation value, weighting may be performed as described below, rather than simply using the number of pixels. In this embodiment, the maximum number of colors in the color information list is 16, as will be explained below.
[0072] In step S401 of FIG. 11, CPU 102 acquires newly detected color information that differs from the color information already registered in the color information list. To do this, CPU 102 focuses on a sub-region of the first region identified from the image data to be subjected to color conversion processing that has not yet been subjected to step S401, references the color information of that sub-region, and compares it with the color information registered in the created color information list. If the comparison results in different color information, CPU 102 acquires the color information referenced in the sub-region of interest. If the color information is identical, CPU 102 references the color information of the next unprocessed sub-region and repeats the same process. Note that if color information for each sub-region was saved in step S203 of FIG. 5, CPU 102 can simply reference the saved color information and perform the same process as described above.
[0073] In step S402, the CPU 102 adds the color information newly acquired in step S401 to the color information list.
[0074] In step S403, CPU 102 determines whether processing has been completed for the color information of all first regions identified from the image data to be subjected to color conversion processing. In other words, it determines whether acquisition of color information from sub-regions included in the first region and addition of the information to the color information list have been completed. If there are any unprocessed colors, the process is repeated from S401 for those colors. In other words, if there are any unprocessed sub-regions, the process is repeated from S401 for those sub-regions.
[0075] In step S404, CPU 102 calculates an evaluation value for each piece of color information registered in the color information list and sorts the color information list in descending order of evaluation value, that is, sorts the color information in descending order using the evaluation value as a key.
[0076] In step S405, it is determined whether the number of records, i.e., the number of colors, included in the color information list is equal to or less than a predetermined threshold, i.e., whether it is equal to or less than the maximum number of colors (for example, 16 colors or less). If it is equal to or less than the threshold, for example, 16 colors or less, the process ends. On the other hand, if it is greater than the threshold, for example, if it exceeds 16 colors, in step S406, color information after the threshold, for example, color information from 17th onwards, is deleted from the list. This allows the number of colors remaining in the color information list to be limited, taking into account processing time and storage capacity [y4][o5], so that colors that are human-distinguishable and have a larger number of discriminable pixels in the output of the recording device remain, and thus limits the targets for which color degeneration correction is applied.
[0077] In step S302, the CPU 102 detects the number of degenerate color combinations among the combinations in the color information list based on the color information list created in step S301. For example, as described in step S203, the combination of color 601 and color 602 is detected as degenerate.
[0078] For this purpose, for example, the color information in the color information list is sequentially focused on, the position information associated with the focused color information is referenced, and the color information of the pixel corresponding to that position is obtained from the image data after color conversion processing that was color converted and saved in S202. Here, the color and information registered in the color information list and the color information after color conversion processing obtained from the position based on the position information of that color information are called corresponding colors or corresponding color information. The obtained color information can be stored by linking it to the corresponding color information included in the color information list. Then, pairs are created for all color information registered in the color information list, and the color difference is calculated. In the above example, a maximum of 16 color information can be registered, so the combinations are 16There are C2 = 120 combinations. The color difference ΔE is calculated for each pair of color information (for example, color difference 705 between color 703 and color 704 in Figure 7). Similarly, pairs are created for color information associated with each color information after color conversion processing, and the color difference ΔE' between them is calculated (for example, color difference 706 between color 601 and color 602 in Figure 7). This results in the color difference ΔE between the color information registered in the color information list and the color difference ΔE' between the color information after color conversion of that color information, and these are matched. The matched color differences ΔE and ΔE' are compared. If the color difference ΔE' between the color information before color conversion processing registered in the color information list is smaller than the color difference ΔE between the corresponding color information after color conversion (ΔE > ΔE'), it can be determined that color degeneration has occurred in the pair of color information that formed the basis of that color difference.
[0079] Here, the above-described determination of color degeneration may be performed only when the color difference before the color conversion process can be recognized by the naked eye, that is, when the color difference ΔE before the color conversion process exceeds a predetermined value.
[0080] Alternatively, without strictly comparing the magnitudes, it may be determined that color degeneration has occurred to a degree that requires correction, for example, if the rate of change in color difference caused by color conversion is smaller than a predetermined value. That is, assume that the color difference between a certain color pair after correction processing is ΔE', and the color difference between the corresponding color pair before correction processing is ΔE. In that case, if ΔE' / ΔE≦Th (for example, Th=0.9), it may be determined that color degeneration has occurred to a degree that requires correction. In this case, color degeneration to a degree that requires correction will simply be referred to as color degeneration.
[0081] In step S303, CPU 102 determines whether the number of color combinations (the above-described color information pairs) determined to be color degenerate in step S302 is zero. If the number of color combinations that are color degenerate is zero, the process proceeds to step S304, where it is determined that the image data to be processed is image data that does not require color degeneration correction. Note that if the number of colors registered in the color information list is one or less, it is not possible to create color pairs, so the number of color combinations that are color degenerate is zero, and it may be determined that color degeneration correction is not required.
[0082] If it is determined that color degeneration correction is unnecessary, the color conversion table used for color conversion in step S202 and stored in advance in a storage medium is set as the color conversion table for the image data to be processed. That is, the color conversion method is set to use the color conversion table stored in advance in a storage medium. In this case, the image data obtained by the color conversion process will be the same as the image data generated in step S202. Therefore, the color conversion process may not be performed in the subsequent step S205, and the image data generated in step S202 may be used as the image data after the color conversion process.
[0083] If the number of color combinations that are color degenerated is not zero, the process proceeds to step S305, where color degeneration correction is performed. In color degeneration correction, the color conversion table that was used for color conversion in step S202 and that was previously stored in a storage medium is corrected to create a new color conversion table.
[0084] On the other hand, color degeneration correction changes colors. Therefore, even color combinations that are not color degenerated will be affected by color changes, resulting in unnecessary color changes. Therefore, the need for color degeneration correction may be determined based on the total number of combinations in the color information list and the number of color combinations that are color degenerated among them. Specifically, it may be determined that color degeneration correction is necessary when the number of color combinations that are color degenerated is more than half of the total number of combinations in the color information list. This makes it possible to suppress the adverse effects of color changes caused by color degeneration correction. For example, if the color information list contains 16 colors, there are a total of 120 color combinations. Therefore, if more than 60 color combinations are determined to be color degenerated, color degeneration correction is determined to be necessary.
[0085] In step S305, the CPU 102 performs color degeneration correction on the color combinations that are subject to color degeneration, based on the image data acquired in step S201, the image data after color conversion in step S202, and the color conversion table used in step S202. As described above in step S203, the color conversion table is corrected to perform color degeneration correction so that the color difference ΔE705 between colors 703 and 704 after color correction becomes the color difference ΔE709 between colors 707 and 708 that is approximately the same as the corresponding color difference ΔE706 before color correction. The color degeneration correction process is repeated the number of times corresponding to the number of color combinations that are subject to color degeneration. The color information before and after correction for the number of color combinations is stored in a table. In FIG. 7, the color information is color information in the CIE-L*a*b* color space. Therefore, the image data at the time of input and the color space of the image data at the time of output may be converted. In this case, the color information before correction in the color space of the image data at the time of input and the color information after correction in the color space of the image data at the time of output are stored in a table. In FIG. 7, the corrected colors 707 and 708 are separated in the lightness direction on an extension line from color 703 to color 704, but this is not limited to this embodiment. As long as the color difference ΔE709 between colors 707 and 708 is separated by a color difference ΔE706, the color difference may be in any direction, including the lightness direction, saturation direction, or hue angle direction, in the CIE-L*a*b* color space. Furthermore, the color difference may be in one direction or a combination of the lightness direction, saturation direction, and hue angle direction. Furthermore, while FIG. 7 shows an example in which both colors 703 and 704 are corrected, the color difference ΔE706 may be removed by correcting one of the colors.
[0086] In step S306, CPU 102 changes the color conversion table using the result of the degeneration correction in step S305. The color conversion table before the change is a table that converts color 601 in FIG. 6 to color 703 and color 602 to color 704. Based on the result of step S305, the table is changed to one that converts color 601 in FIG. 6 to color 707 and color 602 to color 708. In this way, a table after color degeneration correction can be created. The change of the color conversion table is repeated the number of times equal to the number of color combinations that will be degenerated. The color conversion table created here is set as the color conversion table to be used in the color conversion process of the image data to be processed.
[0087] Specifically, it is assumed that colors 601 and 602 expressed in L*a*b* are (L1, a1, b1) and (L2, a2, b2), respectively. Furthermore, it is assumed that colors 703 and 704 are (L1', a1', b1') and (L2', a2', b2'), respectively, and colors 707 and 708 are (L1", a1", b1"), respectively. In the color conversion table TBL before color degeneration correction, TBL(L1, a1, b1) = (L1', a1', b1'), TBL(L2, a2, b2) = (L2', a2', b2'). In the color conversion table TBL' after color degeneration correction, it is assumed that TBL'(L1, a1, b1) = (L1", a1", b1"), TBL'(L2, a2, b2) = (L2", a2", b2" is created. Note that although a color conversion table is prepared for each component after conversion, here all elements are listed together for brevity. This type of correction can be performed for all color information that is the target of color degeneration correction. Colors that are not the target of color degeneration correction can be left as they are. Alternatively, even if a color is not the target of color degeneration correction, colors within a predetermined range (color difference) from the color that is the target of color degeneration correction can be corrected by moving them in parallel with the color that is the target of color degeneration correction.
[0088] As described above, in this embodiment, when performing color conversion processing on image data, a first region is first identified from the original image data to be processed. Here, the first region includes at least one subregion, each of which is composed of a single color and has an area equal to or larger than a predetermined size. That is, the first region includes one or more colors. A predetermined number of colors are then identified from the colors included in the first region according to a priority based on the evaluation value. For each identified color, color degeneration correction is performed to reduce color degeneration for color combinations that experience color degeneration based on changes in color difference due to color conversion processing using a predetermined (given) color conversion table, and a corrected color conversion table is created. Here, the given color conversion table is also referred to as the first color conversion table, and the color conversion table after color degeneration correction is also referred to as the second color conversion table. The first color conversion table is a color conversion table prepared in advance to convert color information in an input color space to color information in an output color space, and may be referred to as a standard or default color conversion table. If the first region contains only one color, color degeneration correction is not necessary. If color degeneration occurs, the second color conversion table is used, otherwise the first color conversion table is used to perform color conversion processing on the original image data.Further necessary processing is performed, and the processed image data is printed.
[0089] As a result, color conversion using the second color conversion table produces a larger color difference between at least two of the color information registered in the color information list than color conversion using the first color conversion table, making it possible to achieve color degeneration correction. Furthermore, the number of colors to be subjected to color degeneration correction can be limited to a certain number, reducing the processing load and speeding up the color conversion process. Furthermore, by limiting the number of colors using the number of pixels of each color as an evaluation value, color degeneration correction can be performed more effectively on single-color areas that occupy a larger area.
[0090] <Modification of this embodiment> In the above embodiment, in step S303 of FIG. 3, it is determined whether color degeneration occurs between combinations of color information registered in the color information list. If there is a combination that causes color degeneration, color degeneration correction is performed for that color information. This determination may be made based on the number of colors registered in the color information list. If the number of registered colors is one (or one or less), it is determined that color degeneration correction is not performed, and if the number of registered colors is two or more, it is determined that color degeneration correction is performed. In this case, the determination of color degeneration in step S302 may be omitted, and the determination of whether to perform color degeneration correction may be made based only on the number of colors. Also, in this case, color degeneration correction may be performed in step S305 to increase the color difference between the colors registered in the color information list. At this time, color information that does not cause color degeneration does not need to be subject to correction. This is the same as in the first embodiment. That is, among the combinations of color information registered in the color information list, combinations of color information in which color degeneration occurs, that is, the color difference after color conversion is smaller than the color difference before color conversion processing, are subject to color degeneration correction. Conversely, color information combinations that do not cause color degeneration do not need to be subjected to color degeneration correction. As a result, in this modified example, the same color degeneration correction as in the first embodiment can be performed and the same results can be obtained.
[0091] Furthermore, as shown in Fig. 9, in this embodiment, color information of image data that is distinguishable by humans and that is discriminable in the output of a recording device is considered to be a region having a predetermined or greater area in a plane, and this region is set as color 601 and color 602. Therefore, for example, the horizontal line at the bottom of the bar graph in Fig. 6(a) or 6(b) is not detected, but since it is not a target for setting color degeneration correction, there is no need to apply the created color conversion table. Furthermore, when the image data in step S201 is that of Fig. 6(b), as shown in Fig. 9(b), color 603 and color 604 are not the first region for generating a correction color conversion table, so unnecessary color degeneration correction can be prevented and an optimal output image can be obtained.
[0092] According to this embodiment, a first region used to set the color conversion method for image data and a second region not used to set the color conversion method are set (or identified). By setting the regions, unnecessary color degeneration correction can be prevented, and an appropriate color conversion method can be set based only on the information for the region necessary for color degeneration correction. As a result, a color conversion result suitable for the recording device can be obtained for the entire image. Note that, although the first region was identified in the above embodiment, since regions in the image data that are not the first region correspond to the second region, it can be said that the second region is also identified by identifying the first region.
[0093] In this embodiment, the color information of the image data that is human-distinguishable and discriminable in the output of the recording device is defined as a first region having a predetermined planar area, where pixels having the same color information are arranged in a vertical or horizontal sequence of two or more consecutive pixels. However, the number of consecutive pixels in both the vertical and horizontal directions may be set depending on the output resolution of the recording device and the visual characteristics of the person viewing the output of the recording device. As a result, a more suitable first region can be set. Furthermore, the user of the recording device may specify the setting conditions for the first region through the UI of the recording device or the attached information of the manuscript data. As a result, the setting conditions for the first region can reflect the user's intentions. The setting conditions may be, for example, width, and may be specified by the number of pixels in both the vertical and horizontal directions.
[0094] In this embodiment, a color conversion table stored in advance in a storage medium is used to set the color conversion table, and the color conversion table is created in the same format. In contrast, for example, the color conversion in step S202 may be performed using a predetermined rule to convert colors relative to the color gamut of the acquired image data to the color gamut of the recording device, without using the color conversion table stored in the storage medium. As a result, there is no need to store a color conversion table in advance in the storage medium, thereby reducing storage capacity. In this case, a table may be created in which colors converted according to the rule are associated with colors to be corrected by the color reduction correction. To apply color conversion, after color conversion of the image data according to the rule, color correction processing is performed according to the created table. Furthermore, when setting the color conversion method in step S204, color information before and after color conversion may be set in dictionary format without setting a color conversion table, or, if it can be approximated by a formula, it may be set by a formula. As a result, the storage capacity required to store the color conversion method can be reduced compared to using a color conversion table.
[0095] Alternatively, in step S201, the acquired original data may be resolution-converted or compressed and stored in a storage medium. In this case, the image processing device 101 may include a resolution conversion unit for converting the resolution. Then, in step S301, the first region may be identified using the stored image data with a reduced number of pixels after resolution conversion. By doing so, for example, by targeting image data with resolution conversion to 1 / 4 or 1 / 8, the number of colors [y6][o7] can be reduced, thereby narrowing the number of colors to be subjected to color degeneration correction. Furthermore, detecting the first region using image data with reduced resolution can quickly extract a wider range of colors. For example, detecting the region of two consecutive vertical pixels and two consecutive horizontal pixels shown in FIG. 8 using image data with a resolution of 1 / 4 is equivalent to detecting the region of five to eight consecutive vertical pixels and five to eight consecutive horizontal pixels in image data that has not been resolution-converted. Similarly, when targeting image data with 1 / 8 resolution, it is equivalent to extracting an area of 9 to 16 consecutive pixels vertically and 9 to 16 consecutive pixels horizontally from image data that has not been resolution converted.
[0096] In this embodiment, the number of pixels is used as the evaluation value, but when the evaluation value is Score and the number of pixels is Count, the evaluation value for each color in the color information list can be calculated using the following formula: In this case, it is not necessary to weight all of the colors; only some of them can be weighted.
[0097]
number
[0098] Here, W positionis a weighting by position. For example, in the case of an evaluation value for color information C, the coordinate information of the top left and bottom right of the sub-area having the detected color information C is stored, and weighting is performed so that the closer it is to the header and footer positions on the original data, the higher the evaluation value. The header is located on the top edge of the image, and the footer is located on the bottom edge of the image. From this, for example, the distance between the coordinate position of the top left of the sub-area having color information C and the top edge, and the distance between the coordinate position of the bottom right of that sub-area and the bottom edge are evaluated respectively. Then, W is calculated so that the smaller the distance, the greater the weighting. position Here, if the top and bottom sides are assumed to extend in the X direction, the above distance can be found in the direction perpendicular to the top and bottom sides. That is, for the Y component of the coordinate position, the difference between the Y component of the top side position (for example, 0) and the Y component of the bottom side position can be found and used as the above distance. As an example, the smaller value of the distance between the bottom side and the coordinate position of the bottom right of the first area is divided by half the value of the vertical length of the page to be processed, and the result is subtracted from 1 to find W. position Also, W position If multiple weights are obtained, the maximum value may be used.
[0099] W shape is a weighting of the aspect ratio and shape of the subregion having color information C. In this embodiment, the closer the subregion is to a square or a circle, the higher the weighting is so that its evaluation value becomes. Here, if (W>H), then W shape =H / W, otherwise W shape =W / H. This allows weighting from 0 to 1. In the embodiment, the connection of pixels of a single color in the column direction of the image data was not taken into consideration, but if there are sub-regions of the same color in the column direction, they may also be connected to form a single sub-region. In this case, the connected sub-regions may also be connected to form a rectangle. For this reason, if one of the connected sub-regions has an unconnected portion, that portion may be redefined as an independent sub-region.
[0100] W neighboris a weighting factor based on whether there are adjacent areas of the same color. In this embodiment, the more a sub-area of color information C overlaps or is adjacent to other sub-areas of color information C, the higher the evaluation value of color information C, and the lower the evaluation value for isolated colors. Adjacency and overlap of sub-areas can be determined based on the position information (top left and bottom right) of the area. For example, such weighting is performed by calculating the total number of sub-areas of each color for all colors registered in the color information list. Then, using this total as the denominator, the ratio (adjacency ratio) is calculated using the number of sub-areas of each color that have adjacent or overlapping sub-areas as the numerator. This is called W neighbor However, since this value is 0 for colors that do not have adjacent or overlapping areas, the weight for such colors can be calculated by setting the number of adjacent or overlapping areas to 1.
[0101] W native is a weighting of the ratio or density of the number of pixels of the same color, and in this embodiment, the weighting is performed so that the higher the purity of an area that is made up of only the same color, the higher the evaluation value, and the lower the evaluation value of an area that includes similar colors. This is a weighting when colors with a color difference within a predetermined value are considered to be the same color when specifying the first area, and when specifying an area of strictly the same color as the first area, this weighting W native For example, the total number of pixels in the area (sub-area) associated with each color information included in the color information list is calculated, and then the number of pixels for each color is calculated, and the maximum value among them is determined. The value obtained by dividing the maximum value by the total number of pixels is the W value for that color. native This can be considered.
[0102] By using at least one of the above weightings, it is possible to narrow down the target for setting color degeneration correction to color information that occupies a more influential area. Furthermore, as the weighting, the position of the area having the color that is the target of color degeneration correction, its shape, whether there is an adjacent area, whether the color that is the target of degeneration correction is a monochromatic color, etc. When some of the weights in Equation 2 are used, the remaining unused weights are set to 1.
[0103] Furthermore, in step S301, not only colors that are close to color 601 and color 602, but also colors that are close in distance in the image data, can be registered in the color information list as a single piece of color information that integrates their areas. Similar colors may be colors whose color differences with each of colors 601 and 602 are within a predetermined value. When registering similar colors as a single piece of color information in the list in step S301, not only Count but also x1, y1, x2, y2, which indicate the position of the first area, are set to the position of the first area that contains similar colors. For this purpose, the areas of the reference color and its similar colors are integrated (merged). The equation for merging similar colors a and b is as follows:
[0104] Count=Count_a+Count_b X1=min(x1a,x1b) Y1=min(y1a,y1b) X2=max(x2a,x2b) Y3 = max(y2a, y2b).
[0105] Here, Count_a and Count_b are the pixel counts of the subregions of color a and color b, respectively. min(a, b) is a function that takes the minimum value of both parameters, and max(c, d) is a function that takes the maximum value of both parameters. This makes it possible to limit the targets for which color degeneration correction is set. Furthermore, when setting the color conversion method from step S302 onwards, minute color information less than a predetermined number of pixels can be deleted from the color information list because it is human-distinguishable and has little impact on the discriminability of the output from the recording device. This makes it possible to suppress the adverse effects of color changes caused by color degeneration correction.
[0106] Furthermore, color information for two or more colors registered in the color information list may be combined to determine whether color degeneration correction is necessary and to perform color degeneration correction. In this case, if there are any colors between two or more colors registered in the color information list whose color difference is less than a predetermined value, those colors are integrated by regarding those colors as one of the colors, and color degeneration is determined based on the change in color difference due to color conversion between the integrated color and the other colors. In this way, color degeneration correction can be performed using a number of colors further reduced from the number of colors registered in the color information.
[0107] (Second embodiment) In the first embodiment, an example was shown in which a color conversion method was set based on information about the first region required for color conversion in order to perform appropriate color conversion on image data. However, when the set color conversion method is applied to image data, there may be regions in which the image quality is degraded.
[0108] [i8][o9] in Figure 13 are examples of image data acquired in step S201 in the second embodiment. In addition to the image data in Figure 6(a), regions 1101 and 1102, which are horizontal bar graphs, are drawn at the bottom of the image data in Figure 13. A horizontal gradation is drawn within both bar graph regions 1101 and 1102. For ease of explanation, it is assumed that the left end of the region is color 601 in Figure 6, the right end is color 602, and the pixels between them are configured with a gradation of brightness that changes continuously to connect color 601 and color 602.
[0109] When the color conversion table stored in advance in a storage medium in step S202 of the first embodiment is applied to region 1101 in FIG. 13 , a smooth gradation connecting color 703 to color 704 in FIG. 7A is output from the recording device. On the other hand, when the color conversion table for reducing color degeneration created in step S306 of the first embodiment is applied to region 1101 in FIG. 13 , a gradation connecting color 707 to color 708 in FIG. 7A is output from the recording device. In this case, if the colors included in the gradation region are not subject to color degeneration correction, the color difference between colors 707 and 708 at the ends of the gradation and the colors connected to them will be large. Furthermore, if the colors that make up the gradation are subject to color degeneration correction, the number of colors included in the first region will be large, and it may be impossible to include all of the colors that make up the gradation in the color information list. In this case, color degeneration correction will not be applied to all of the colors that make up the gradation, or color degeneration correction will be applied to only some of the colors, resulting in a degradation of image quality in the gradation portion. In this way, for example, when a color conversion table that emphasizes color discrimination is set, image quality may deteriorate in areas where color continuity (gradation) is emphasized.
[0110] Therefore, in this embodiment, in order to reduce degradation in image quality, the color 601 and color 602, which are color information in an area that emphasizes gradation and forms gradation, are deleted from the color information list when setting the color conversion method from step S302 onwards. By doing so, it is possible to reduce the adverse effects of color changes due to color degeneration correction.
[0111] Color information in a region where gradation is important and which forms a gradation can be detected or identified, for example, by the following method. For example, the colors included in the color information list created in the manner described in the first embodiment are considered in order of evaluation value, i.e., in order of priority. The color difference between that color and the color of the pixel (adjacent pixel) adjacent to the subregion of that color in a predetermined direction is calculated from the image data color-converted in S202. If the color difference is within a predetermined value, a region in which pixels of the same color as the adjacent pixel are connected is identified. If the length of that region in the predetermined direction described above is within a reference value, the color of the adjacent pixel is stored, and the color difference between that region and its adjacent pixel is calculated. This process is repeated until the calculated color difference exceeds a predetermined value or the length of the same color as the adjacent pixel in the predetermined direction exceeds the reference value. The stored color is then considered to be a color that constitutes a gradation and can be deleted from the color information list. However, the color of the adjacent pixel at the end of this process can be determined not to be a color that constitutes a gradation, so it need not be deleted.
[0112] As described above, according to this embodiment, the gradation area is detected and the color information that constitutes the gradation area is excluded from the target of color degeneration correction, so that deterioration in the image quality of the gradation area, particularly deterioration in the continuity of color changes, can be suppressed.
[0113] Although the present invention has been described above using embodiments, the technical scope of the present invention is not limited to the scope described in the above embodiments. It will be apparent to those skilled in the art that various modifications and improvements can be made to the above embodiments. It is clear from the claims that such modifications and improvements can also be included within the technical scope of the present invention.
[0114] [Other Examples] The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0115] Summary of embodiments The above embodiments can be summarized as follows: (Item 1) a detection means for detecting an area having a predetermined extent and made up of pixels of the same color from the image data; a storage means for storing color information of the colors included in the detected region; a generating means for generating output image data by color-converting the image data using a first color conversion table when the stored color information is one color, and for generating output image data by color-converting the image data using a second color conversion table when the stored color information is two or more colors; Equipped with For at least two colors of the color information, color conversion using the second color conversion table produces a larger color difference than color conversion using the first color conversion table. 1. An image processing device comprising: (Item 2) Item 1, the image processing device according to item 1, The number of colors in the color information stored by the storage means is equal to or less than a predetermined maximum number of colors. 1. An image processing device comprising: (Item 3) Item 2. The image processing device according to item 2, The storage means stores the color information of the predetermined maximum number of colors from the color information detected by the detection means in descending order of the evaluation value based on the evaluation value of each of the color information. 1. An image processing device comprising: (Item 4) Item 3. The image processing device according to item 3, The storage means stores color information of the predetermined maximum number of colors, using the number of pixels for each color included in the area as the evaluation value. 1. An image processing device comprising: (Item 5) Item 3. The image processing device according to item 3, The storage means stores color information of the predetermined maximum number of colors, using a value obtained by assigning a predetermined weight to the number of pixels for each color included in the region as the evaluation value. 1. An image processing device comprising: (Item 6) Item 5. The image processing device according to item 5, The predetermined weight includes at least one of the following: the proximity of the area for each color included in the area to the upper side or the lower side of the image data; the proximity of the shape of the area for each color to a square; the proximity of the areas for each color to each other; and the maximum value of the ratio of the number of pixels of the same color included in the area for each color. 1. An image processing device comprising: (Item 7) Item 1 to 6, an image processing device according to any one of items 1 to 6, Color information for which the color difference is greater in color conversion using the second color conversion table than in color conversion using the first color conversion table is color information for which color degeneration occurs due to color conversion using the first color conversion table. 1. An image processing device comprising: (Item 8) 8. The image processing device according to any one of items 1 to 7, further comprising a resolution conversion means for reducing the number of pixels by performing resolution conversion on the input image data; The image data is image data in which the number of pixels is reduced by the resolution conversion means from the input image data. 1. An image processing device comprising: (Item 9) Item 10. The image processing device according to any one of items 1 to 8, The pixels of the same color include pixels with color differences within a predetermined tolerance range. Among the color information, color information whose color difference is equal to or less than a predetermined value is regarded as integrated color information. 1. An image processing device comprising: (Item 10) Item 10. The image processing device according to any one of items 1 to 8, further comprising means for detecting a gradation region; Color information included in the gradation area is not included in color information in which the color difference is greater when the color conversion using the second color conversion table is used than when the color conversion using the first color conversion table is used. 1. An image processing device comprising: (Item 11) A program for causing a computer to function as the image processing device according to any one of items 11 to 10. (Item 12) An image processing method using an image processing device having a detection means, a storage means, and a generation means, a detection step in which the detection means detects an area having a predetermined extent and composed of pixels of the same color from the image data; a storing step in which the storing means stores color information of the color included in the detected region; a generating step in which, when the stored color information is one color, the generating means performs color conversion on the image data using a first color conversion table to generate output image data, and when the stored color information is two or more colors, the generating means performs color conversion on the image data using a second color conversion table to generate output image data; Including, For at least two colors of the color information, color conversion using the second color conversion table produces a larger color difference than color conversion using the first color conversion table. An image processing method comprising:
[0116] The present invention is not limited to the above-described embodiments, and various changes and modifications can be made without departing from the spirit and scope of the invention. Therefore, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0117] 101 Image processing device, 108 Recording device
Claims
1. a detection means for detecting an area having a predetermined extent and made up of pixels of the same color from the image data; a storage means for storing color information of the colors included in the detected region; a generating means for generating output image data by color-converting the image data using a first color conversion table when the stored color information is one color, and for generating output image data by color-converting the image data using a second color conversion table when the stored color information is two or more colors; Equipped with For at least two colors of the color information, color conversion using the second color conversion table produces a larger color difference than color conversion using the first color conversion table.
1. An image processing device comprising:
2. 2. The image processing device according to claim 1, The number of colors in the color information stored by the storage means is equal to or less than a predetermined maximum number of colors.
1. An image processing device comprising:
3. 3. The image processing device according to claim 2, The storage means stores the color information of the predetermined maximum number of colors from the color information detected by the detection means in descending order of the evaluation value based on the evaluation value of each of the color information.
1. An image processing device comprising:
4. 4. The image processing device according to claim 3, The storage means stores color information of the predetermined maximum number of colors, using the number of pixels for each color included in the area as the evaluation value.
1. An image processing device comprising:
5. 4. The image processing device according to claim 3, The storage means stores color information of the predetermined maximum number of colors, using a value obtained by assigning a predetermined weight to the number of pixels for each color included in the region as the evaluation value.
1. An image processing device comprising:
6. 6. The image processing device according to claim 5, The predetermined weight includes at least one of the following: the proximity of the area for each color included in the area to the upper side or the lower side of the image data; the proximity of the shape of the area for each color to a square; the proximity of the areas for each color to each other; and the maximum value of the ratio of the number of pixels of the same color included in the area for each color.
1. An image processing device comprising:
7. 2. The image processing device according to claim 1, Color information for which the color difference is greater in color conversion using the second color conversion table than in color conversion using the first color conversion table is color information for which color degeneration occurs due to color conversion using the first color conversion table.
1. An image processing device comprising:
8. 2. The image processing device according to claim 1, further comprising a resolution conversion means for reducing the number of pixels by performing resolution conversion on the input image data; The image data is image data in which the number of pixels is reduced by the resolution conversion means from the input image data.
1. An image processing device comprising:
9. 2. The image processing device according to claim 1, The pixels of the same color include pixels with color differences within a predetermined tolerance range. Among the color information, color information whose color difference is equal to or less than a predetermined value is regarded as integrated color information.
1. An image processing device comprising:
10. 2. The image processing device according to claim 1, further comprising means for detecting a gradation region; Color information included in a gradation area is not included in color information in which the color difference is greater in color conversion using the second color conversion table than in color conversion using the first color conversion table.
1. An image processing device comprising:
11. A program for causing a computer to function as the image processing device according to any one of claims 1 to 10.
12. An image processing method using an image processing device having a detection means, a storage means, and a generation means, a detection step in which the detection means detects an area having a predetermined extent and composed of pixels of the same color from the image data; a storing step in which the storing means stores color information of the color included in the detected region; a generating step in which, when the stored color information is one color, the generating means performs color conversion on the image data using a first color conversion table to generate output image data, and when the stored color information is two or more colors, the generating means performs color conversion on the image data using a second color conversion table to generate output image data; Including, The color difference between at least two of the color information is greater in the color conversion using the second color conversion table than in the color conversion using the first color conversion table. An image processing method comprising:
Citation Information
Patent Citations
Image processing apparatus, image processing method, and program
JP2024008263A