1. Field of the Invention
The present invention relates to a color conversion apparatus and a color conversion method, and more particularly to a color conversion apparatus and a color conversion method for precisely correcting differences of reproduced colors caused by characteristic differences among different devices.
2. Description of the Related Art
In conventional color printers, color printing presses, or pre-processing apparatuses thereof (e.g., personal computers) which significantly exhibit nonlinear color reproduction characteristics with respect to color material characteristics or color mixture, it is difficult to perform sufficient correction by using a simple linear transformation method. Therefore, color correction is performed by, for example, conducting linearization for each channel and performing interpolation with use of a multidimensional lookup table (hereinafter referred to as “LUT”).
Typically, the input channels of the multidimensional LUT may be, for example, three channels comprising red (R), green (G), and blue (B), three channels comprising chromaticity coordinates of X, Y, and Z defined by CIE (Commission Internationale d'Eclairage), or three channels comprising lightness (L*), chromaticity (a*), and chromaticity (b*). Comparable output channels of the multidimensional LUT may be, for example, three channels of R, G, and B, four channels of cyan (C), magenta (M), yellow (Y), and black (K), or vector data where RGB or CMYK are combined.
For example, in a case where color correction is conducted by using a multidimensional LUT such as a three-dimensional LUT having output values corresponding to (D+1)3 lattice points wherein the range of input is equally divided into D parts in correspondence with each output channel, an output value is calculated by extracting a cubic lattice block (eight vertices) surrounding an input value(s) and performing interpolation on the values of the extracted eight vertices based on the relative coordinate values in the cubic lattice block (barycenter coordinate).
Although the simplest interpolation method is a method of performing eight point interpolation (trilinear interpolation) according to relative coordinate values in a cubic lattice block (for example, see Japanese Laid-Open Patent Application No. 7-099587, hereinafter referred to as “Patent Document 1”), this method has a problem of interpolation error causing ripples at gradations along the achromatic axis (grey axis), as taught in paragraph [0002] of Patent Document 1.
As taught in Patent Document 1, various methods of further dividing the cubic lattice block for preventing the problem of ripples are studied. According to the studies, it is known that the problem can be effectively prevented by providing a dividing boundary along a diagonal line of the cubic lattice block oriented in the grey axis direction.
For example, there is a method where a cubic lattice block is divided into three quadrangular pyramids around a single diagonal line of the cubic lattice block (for example, see Japanese Laid-Open Patent Application No. 58-016180, hereinafter referred to as “Patent Document 2”), a method where a cubic lattice block is divided into six triangular pyramids around a single diagonal line of the cubic lattice block by further dividing the three quadrangular pyramids of the aforementioned method (for example, see Japanese Laid-Open Patent Application Nos. 56-014237, 02-226867, and 03-229573, hereinafter referred to as “Patent Documents 3, 4, and 5”, respectively), and a method where a cubic lattice block is divided into six quadrangular pyramids by a line connecting the body center and each vertex of the cubic lattice block (for example, see Japanese Laid-Open Patent Application No. 09-261499, hereinafter referred to as “Patent Document 6”).
Although it is not specifically described in the above-described Patent Documents 1-6, in addition to ripples caused in the gradation of the grey axis direction, ripples caused in the gradation in the directions of primary color hues (C, M, Y, R, G, B) are also a problem.
Color printers used in the business field tend to have a mode for using C, M, Y as primary colors in order to provide the user with pure primary colors of C, M, Y for printing documents. However, the generation of ripples may result in color blending of color hues intended to be printed as primary colors. Therefore, in order to provide such a printing mode, it is desired to provide dividing lines oriented in the directions of frequently used primary color hues in order to prioritize linearity.
However, although dividing a cube along a single diagonal line of the cube or one of the squares of the cube may resolve ripples caused in the direction of the diagonal line (dividing line), there is a side-effect of causing anisotropy where ripples are generated in a direction perpendicularly intersecting the dividing line.
Thus, it is desired to provide a method that provides dividing lines along the directions of the grey axis and the axes of the primary color hues for prioritizing colors such as the primary color hues including frequently used C, M, Y or primary color components of monitors R, G, B, but at the same time, prevents the aforementioned problem of anisotropy.
Among the dividing methods disclosed in the Patent Documents 1-4 and 6, the only method which satisfies such a desire is the method described in Patent Document 3 where a cube is divided into 24 tetrahedrons (triangular pyramids) having the body-center of the cube as their center. However, with the method described in Patent Document 3 where the interpolation value corresponding to the body-center of the cube is the average value of its surrounding eight vertices, its interpolation characteristic becomes similar to that of the undesired trilinear interpolation. Therefore, this method is unable to sufficiently prevent ripples along a desired diagonal line.
Furthermore, since this method divides a cube into 24 blocks, in order to determine which input signal value belongs to which block, determination has to be conducted at least five times (five bits). From the aspect of hardware implementation, the increase in the number of times of determination results in enlargement of hardware logic circuits. From the aspect of software implementation, the increase in the number of times of determination results in increase of processing time. In addition, it is also necessary to used a shared process logic as much as possible in order to reduce cost.
Furthermore, color correction using a multidimensional LUT is conducted not only where there are three input channels (e.g., RGB) but also where there are four input channels (CMYK). Therefore, the method for preventing ripples is desired to be applied not only to three channels but expanded to four or more input channels.
The present invention may provide a color conversion apparatus and a color conversion method that substantially obviates one or more of the problems caused by the limitations and disadvantages of the related art.
Features and advantages of the present invention are set forth in the description which follows, and in part will become apparent from the description and the accompanying drawings, or may be learned by practice of the invention according to the teachings provided in the description. Objects as well as other features and advantages of the present invention will be realized and attained by a color conversion apparatus and a color conversion method particularly pointed out in the specification in such full, clear, concise, and exact terms as to enable a person having ordinary skill in the art to practice the invention.
To achieve these and other advantages and in accordance with the purpose of the invention, as embodied and broadly described herein, an embodiment of the present invention provides a color conversion apparatus for performing color conversion by using a lookup table indicative of LUT (Look-Up Table) values corresponding to lattice points of a three-dimensional input space including input color signals of three input channels and associating the lattice points to corrected output values by performing interpolation on the LUT values, the color conversion apparatus including: a body-center value generating part for generating output values corresponding to a body-center of each cubic lattice block included in the three-dimensional input space; and an interpolating part for interpolating between the output values generated by the body-center value generating part and the LUT values; wherein the cubic lattice block is divided into six quadrangular pyramids, wherein each of the quadrangular pyramids is divided into two tetrahedron blocks by a side parallel to a predetermined straight line and by a plane including a diagonal line of a bottom plane that intersects the side parallel to the predetermined axis; wherein the corrected output values are determined by performing linear interpolation on output values corresponding to body-center points of each of the tetrahedron blocks and using the LUT values corresponding to three lattice points of each of the tetrahedron blocks and three correction coefficients based on a positional relationship of the input color signals inside each of the tetrahedron blocks.
Furthermore, another embodiment of the present invention provides a color conversion apparatus for performing color conversion by using a lookup table indicative of LUT (Look-Up Table) values corresponding to lattice points of a three-dimensional input space including input color signals of three input channels and associating the lattice points to corrected output values by performing interpolation on the LUT values, the color conversion apparatus including: an interpolating part for dividing each cubic lattice block included in the three-dimensional input space into a plurality of tetrahedron blocks and associating output values to four output values interpolated with four interpolation output values P* corresponding to four vertices of one of the plural tetrahedron blocks containing a point P; an output replacing part for replacing the four interpolation output values P* corresponding to the four vertices of one of the plural tetrahedron blocks; and an interpolation coefficient replacing part for replacing interpolation coefficients used for interpolating the four output values.
Furthermore, another embodiment of the present invention provides a color conversion apparatus for performing color conversion by using a lookup table indicative of LUT (Look-Up Table) values corresponding to lattice points of a n-dimensional input space including input color signals of n (n≧3) input channels and associating the lattice points to corrected output values by performing interpolation on the LUT values, the color conversion apparatus including: a body-center value generating part for generating output values corresponding to a body-center of each n-dimensional cubic lattice block included in the n-dimensional input space; and an interpolating part for interpolating between the output values generated by the body-center value generating part and the LUT values; wherein when 2n vertices of the n-dimensional cubic lattice block have relative coordinates that are associated with binary numerals of n digits and expressed as [0 . . . 00], [0 . . . 01], [0 . . . 10], [0 . . . 11], . . . , [1 . . . 11], an n unit simplex having combinations of n+1 vertices forming a route from a starting point [0 . . . 00] to an ending point [1 . . . 11] without backtracking is divided into a first n unit simplex obtained by replacing the starting point with the body-center of a corresponding cubic lattice block and a second n unit simplex obtained by replacing the ending point with the body-center of another corresponding cubic lattice block, wherein the starting point is assumed as a vertex [0 . . . 00] in which all of its components are 0 and the ending point is assumed as a vertex [1 . . . 11] in which all of its components are 1, wherein the interpolating part performs linear interpolation on the output values corresponding to the body-centers of the obtained first and second simplexes.
Furthermore, another embodiment of the present invention provides a color conversion method for performing color conversion by using a lookup table indicative of LUT (Look-Up Table) values corresponding to lattice points of a three-dimensional input space including input color signals of three input channels and associating the lattice points to corrected output values by performing interpolation on the LUT values, the color conversion method including the steps of: a) generating output values corresponding to a body-center of each cubic lattice block included in the three-dimensional input space; and b) interpolating between the output values generated in step a) and the LUT values; wherein the cubic lattice block is divided into six quadrangular pyramids, wherein each of the quadrangular pyramids is divided into two tetrahedron blocks by a side parallel to a predetermined straight line and by a plane including a diagonal line of a bottom plane that intersects the side parallel to the predetermined axis; wherein the corrected output values are determined by performing linear interpolation on output values corresponding to body-center points of each of the tetrahedron blocks and using the LUT values corresponding to three lattice points of each of the tetrahedron blocks and three correction coefficients based on a positional relationship of the input color signals inside each of the tetrahedron blocks.
Furthermore, an embodiment of the present invention provides a color conversion method for performing color conversion by using a lookup table indicative of LUT (Look-Up Table) values corresponding to lattice points of a three-dimensional input space including input color signals of three input channels and associating the lattice points to corrected output values by performing interpolation on the LUT values, the color conversion method including the steps of: a) dividing each cubic lattice block included in the three-dimensional input space into a plurality of tetrahedron blocks; b) associating output values to four output values interpolated with four interpolation output values P* corresponding to four vertices of one of the plural tetrahedron blocks containing a point P; c) replacing the four interpolation output values P* corresponding to the four vertices of one of the plural tetrahedron blocks; and d) replacing interpolation coefficients used for interpolating the four output values.
Furthermore, another embodiment of the present invention provides a color conversion method for performing color conversion by using a lookup table indicative of LUT (Look-Up Table) values corresponding to lattice points of a n-dimensional input space including input color signals of n (n≧3) input channels and associating the lattice points to corrected output values by performing interpolation on the LUT values, the color conversion method including the steps of: a) generating output values corresponding to a body-center of each n-dimensional cubic lattice block included in the n-dimensional input space; and b) interpolating between the output values generated by the body-center value generating part and the LUT values; wherein when 2n vertices of the n-dimensional cubic lattice block have relative coordinates that are associated with binary numerals of n digits and expressed as [0 . . . 00], [0 . . . 01], [0 . . . 10], [0 . . . 11], . . . , [1 . . . 11], an n unit simplex having combinations of n+1 vertices forming a route from a starting point [0 . . . 00] to an ending point [1 . . . 11] without backtracking is divided into a first n unit simplex obtained by replacing the starting point with the body-center of a corresponding cubic lattice block and a second n unit simplex obtained by replacing the ending point with the body-center of another corresponding cubic lattice block, wherein the starting point is assumed as a vertex [0 . . . 00] in which all of its components are 0 and the ending point is assumed as a vertex [1 . . . 11] in which all of its components are 1, wherein the step b) includes performing linear interpolation on the output values corresponding to the body-centers of the obtained first and second simplexes.
Other objects, features and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings.
First, an overview of the present invention is described. According to an embodiment of the present invention, a cubic lattice block of a three dimensional LUT (Look Up Table) is divided into six quadrangular pyramids by four dividing lines that connect the body-center of the cubic lattice block and the eight vertices of the cubic lattice block. Furthermore, each of the quadrangular pyramids is divided into two tetrahedrons by a side parallel to the grey axis and by a plane including a diagonal line of a bottom plane that intersects the side parallel to the grey axis, so that the cubic lattice block is divided into 12 tetrahedron blocks (for example, see
In a case of implementing the present invention as a color conversion apparatus, the color conversion apparatus includes, for example, a body-center value generating part for obtaining the average of LUT values corresponding to the vertices of a cubic lattice block having an equivalence relationship which is the same as that of the body-centers of the tetrahedron blocks and assigning the obtained average as the output value of the body-centers of the tetrahedrons, an address generating part for generating addresses used for referring to the vertices and the body-centers of the tetrahedrons from the three-dimensional LUT, an output replacing part for replacing (rearranging) the values corresponding to the vertices of the tetrahedron blocks that are output from the three-dimensional LUT, and a correction coefficient replacing part which perform rearrangement and inversion on the lower (N-s) bit signals (rL, gL, bL) of each input signal.
Hence, since linear interpolation on the values of the LUT lattice points on the initial grey axis is achieved by using this dividing method and the piecewise linear interpolation using values assigned to the body-centers of the divided tetrahedron blocks, generation of ripples on the grey axis (R=G=B) can be sufficiently prevented.
On the cyan hue plane and the red hue plane (G=B plane), since the interpolation value is determined without being affected by the values of adjacent vertices in the green (G) direction and the blue (B) direction and the adjacent vertices in the magenta (M) direction and the yellow (Y) direction, color blending due to generation of ripples can be prevented. Thus, the brightness of primary colors can be maintained. In addition, the same effects can be attained on the magenta color hue plane (R=B plane) and the yellow color hue plane (R=G plane).
In providing dividing lines in the CMYRGB primary color hue directions and the grey axis direction, it is necessary to divide the cubic lattice block into at least six parts along the primary color hues of CMYRGB where the grey axis is the center. Furthermore, in order to make one of the vertices be a body-center, the above-described dividing method is the minimal division because it is necessary to further divide each of the divided parts into two parts along the grey axis.
Furthermore, in this case of implementing the present invention as a color conversion apparatus, since an appropriate address of the vertices of the tetrahedrons (including arrangement of the vertices of the tetrahedrons) is generated by the address generating part and the values corresponding to the vertices of the tetrahedrons are rearranged, a common (shared) interpolating part can be used even for tetrahedron blocks that are oriented differently. Therefore, the logic of the interpolating part can be simplified. Furthermore, the output replacing part, which appropriately rearranges data of the vertices, can be easily realized. Therefore, the address generating part can be simplified and the logic circuit size can be reduced.
Next, a color conversion apparatus, a color conversion method, and a color conversion program according to an embodiment of the present invention are described in further detail. For the sake of convenience (simplification), input signals of three channels are expressed as (r, g, b) in the following embodiment of the present invention. Furthermore, the output channel is a single output channel expressed as (P) in the following embodiment of the present invention.
It is to be noted that although the following embodiment of the present invention describes a case where the output channel is a single channel, this can be generally applied to multiple output channels by, for example, increasing the number of output channels or by changing the internal setting value and repetitively using the single output channel.
<Schematic Diagram of Input Space used for Color Conversion>
With the color conversion apparatus according to an embodiment of the present invention, an output value P* corresponding to each point (r, g, b) in the input space 1 (P* (r, g, b)) is obtained as a suitable output value by using a below-described three-dimensional LUT and performing interpolation according to a value obtained by using the three-dimensional LUT. In this example, the three-dimensional LUT includes output values of 17×17×17 lattice points where each input channel is divided into D (e.g., D=16) parts {(16i, 16j, 16k) ; i, j, k=0, 1, . . . , 16}.
In this example, the addresses of eight vertices of a cubic lattice block 2 including input RGB values 3 are generated by using the upper four bit values of (r, g, b) as a base address, and adding offset addresses of (0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), and (1, 1, 1) to the base address.
Furthermore, in the cubic lattice block 2 shown in
The cubic lattice block 2 shown in
Next, a relationship between the address of the point P and the vertices of the tetrahedron block to which point P belongs (tetrahedron block containing point P) is described with reference to
For example, in a case where rL>gL and rL>bL is true (1) and gL>bL is false (0), it is determined that point P is contained in the tetrahedron P0P111P101P100 (tetrahedron block 9b of
Regarding the vertices {Ps, Pm, PL} selected (designated) in correspondence with each relationship shown in
Accordingly, in order to expand the use of this dividing method to a case of n dimensions, the dividing method can be performed as follows. First, relative coordinates of 2n vertices of an n-dimensional cubic lattice block are associated with binary numerals of n digits, so that they are expressed as [0 . . . 00], [0 . . . 01], [0 . . . 10], [0 . . . 11], . . . , [1 . . . 11]. Then, an n unit simplex having combinations of n+1 vertices forming a route from the point [0 . . . 00] to the point [1 . . . 11] without backtracking (where the starting point is a vertex [0 . . . 00] in which all of its components are 0, and the ending point is another vertex [1 . . . 11] in which all of its components are 1) is divided into a first n unit simplex obtained by replacing the starting point with the body-center and a second n unit simplex obtained by replacing the ending point with the body-center.
In this example, “n unit simplex” refers to a triangle expanded into n dimensions, and more specifically a minimum convexity set including n+1 independent points. Thus, for example, two unit simplexes correspond to a flat (two-dimensional) triangle, and three unit simplexes correspond to a tetrahedron.
The number of divided parts of an n dimensional cubic lattice block divided by this method is two times the routes from the starting point to the ending point (n ! routes). Therefore, the number of divided parts increases as a factorial with respect to the dimension. For example, in a case of a three dimensional cubic lattice block, the block is divided into 12 parts (2×3 !). In a case of a four dimensional cubic lattice block, the block is divided into 48 parts (2×4 !). Thus, it may be unrealistic to consider input channels exceeding five dimensions.
Next, an interpolation method is described with reference to
In this case, the output value P is interpolated by using the following formula (1) using output values corresponding to the assumed vertices.
P=(SsP″[000]+SmP′[100]+SLP′[110])/(Ss+Sm+SL) [Formula 1]
It is to be noted that “Ss”, “Sm” and “SL” in Formula 1 each represents the area of the corresponding region shown in
Furthermore, corresponding values are assigned to P′[000], P′[100], and P′[110] by using the following linear interpolation formula (Formula 2)
P′[000]=(1−2bL/dg) P[000]+(2bL/dg)P0
P′[100]=(1−2bL/dg) P[100]+(2bL/dg)P0
P′[110]=(1−2bL/dg) P[110]+(2bL/dg)P0 [Formula 2]
By sorting these relationships, a corresponding value can be assigned to the output value P by using the following Formula 3.
P={2bLP0+(dg−rL−bL) P[000]+(rL−gL) P[100]+(gL3‘bL) P[110]}/dg [Formula 3]
These relationships can be more commonly expressed as a formula (Formula 4) corresponding to combinations of the vertices PS, Pm, PL of a selected (designated) tetrahedron block according to the table shown in
P={2nSP0+(dg−nL−nS) PS+(nL−nm) Pm+(nm−nS) PL}/dg [Formula 4]
It is, however, to be noted that, when nL+nS<dg is false, Formula 4 is applied by replacing nS, nm, and nL with the nS′=dg−nL, n′m=dg−nm, and nL with nL′=dg−nS, respectively.
Next, embodiments of a configuration of a color conversion apparatus for realizing the above-described interpolating relationship are described.
The address generating part 21 has an address table provided therein. The address generating part 21 is configured to generate addresses A0, AS, Am, AL used for selecting (designating) the above-described vertices P0, PS, Pm, PL of a tetrahedron block according to the table shown in
The body-center value generating part 22 is configured to generate vertex data P0, PS, Pm, PL by using a below-described color conversion table with the addresses A0, AS, Am, AL obtained from the address generating part 21. Furthermore, the interpolating part 23 is configured to calculate the output value P by using the above-described interpolation method based on the vertex data P0, PS, Pm, PL obtained from the body-center value generating part 22.
The interpolation coefficient replacing part 24 is configured to generate interpolation coefficients ns, nm, nL by rearranging, for example, the lower four bit signals (rL, gL, bL) of the input signals (r, g, b) based on a largest value selection signal SL and a smallest value selection signal Ss generated by the address generating part 21 and performing a complementary operation (according to necessity) on the rearranged signals.
Next, the address generating part 21 and the interpolation coefficient replacing part 24 are described in further detail.
In
In the address generating part 21, the selection signal generating part 31 generates selection signals to be used for color conversion (color conversion selection signals) according to the lower four bit signals (indicated as [3:0] in
In the example shown in
An output value rel′ of the interpolation coefficient replacing part 24 is a three bit signal combining the comparison results. The output of the comparator 61 (determination value of rL>gL) is the second bit ([2]) of the three bit signal. The output of the comparator 36 (determination value of rL>bL) is the first bit ([1]) of the three bit signal. The output of the comparator 37 (determination value of gL>bL) is the 0th bit ([0]) of the signal.
Furthermore, the output value SL is a three bit signal combining logical NOTs and logical ANDs output from the AND circuits 64 through 66 with respect to each output signal of the comparators 61 through 63. In a case where both ‘rL>gL and rL>bL’ are satisfied (i.e. when rL is largest), the determination value is the second bit ([2]) of the three bit signal. In a case where both ‘rL≦gL and gL>bL’ are satisfied (i.e. when gL is largest), the determination value is the first bit ([1]) of the three bit signal. In a case where both ‘rL≦gL and gL>bL’ are satisfied (i.e. when bL is largest), the determination value is the 0th bit ([0]) of the three bit signal.
Likewise, the output value SS is a three bit signal combining logical NOTs and logical ANDs output from the AND circuits 67 through 69 with respect to each output signal of the comparators 61 through 63. In a case where both ‘rL≦gL and rL≦bL’ are satisfied (i.e. when rL is smallest), the determination value is the second bit ([2]) of the three bit signal. In a case where both ‘rL>gL and gL≦bL’ are satisfied (i.e. when gL is smallest), the determination value is the first bit ([1]) of the three bit signal. In a case where both ‘rL>bL and gL>bL’ are satisfied (i.e. when bL is smallest), the determination value is the 0th bit ([0]) of the three bit signal. The above-described output signal SL acts as a maximum value selection signal with respect to the hunter circuit 46 of
Returning to
The adder 42 is configured to invert a carry flag generated when the sum of the maximum value A selected by the selection circuit 48 and the minimum value B selected by the selection circuit 50 is no less than the value of the grid interval dg (in this embodiment, 16) and output the carry flag, so that SP=1 in a case where a relationship of A+B<dg is satisfied and SP=0 in a case besides the case where the relationship of A+B<dg is satisfied.
In accordance with the output value SP of the adder 42, the selection circuits 48, 50, and 51, output the output values of the selection circuit 48 (maximum value), the output of the selection circuit 49 (intermediate value), and the output of the selection circuit 50 (minimum value) without inverting the output values when SP=0. When SP=1, the output values are inverted (i.e. converted from 1 to 0 or converted from 0 to 1) via the NOT circuits 32, 33, 34. The inverted output values are rearranged so that the maximum and minimum values are correctly output as interpolation coefficients nL, nm, and nS.
Accordingly, in a case where the sum of the maximum value A and the minimum value B of rL, gL, bL satisfies a relationship of A+B<dg, nL, nm, nS each correspond to the maximum value, the intermediate value, and the minimum value of rL, gL, and bL. In a case where the sum of the maximum value A and the minimum value B of rL, gL, bL satisfies a relationship of A+B>dg, nL, nm, nS each correspond to the compliment of the maximum value, the intermediate value, and the minimum value of rL, gL, and bL.
The address table 32 of the address generating part 21 corresponds to the address table indicated with broken lines in the table of
It is to be noted that an output replacing part for replacing an output value is realized by the signal rel′ (upper three bits) and the switching signal SP (lower single bit) input to the address table 32 and the table configuration shown in
The adder 35a outputs a five bit value obtained by adding the highest value of the three bit outputs of the address table 32 to the base address rh. Likewise, the adder 35b outputs a five bit value obtained by adding the intermediate value of the three bit outputs of the address table 32 to the base address gh. Likewise, the adder 35c outputs a five bit value obtained by adding the lowest value of the three bit outputs of the address table 32 to the base address bh. The output values of the adders 35a, 35b, and 35c are combined from the higher bits in this order, to thereby generate an address signal AL of 15 bits. The color conversion table 39a outputs a value corresponding to the vertex PL of the above-described tetrahedron block according to the generated address signal AL.
By performing the above-described process in the same manner, an address signal Am is generated by using the address table 33 and the adders 36a-36c. The color conversion table 39b outputs a value corresponding to the vertex Pm of the above-described tetrahedron block according to the generated address signal Am. Likewise, an address signal As is generated by using the address table 34 and the adders 37a-37c. The color conversion table 39c outputs a value corresponding to the vertex Ps of the above-described tetrahedron block according to the generated address signal As.
The color conversion tables 39a-39c, which associate output values with respect to corresponding lattice points of an input space beforehand, may be an LUT having the same content. Therefore, memory space can be saved by shifting the timing of reading out the LUT so that reference can be made to the same LUT. Alternatively, three LUT of the same content may be prepared so that simultaneous reference can be made to PL, Pm, PS, for example. Thereby, implementation prioritizing execution speed can be achieved.
The LUT 38, acting as the body-center value generating part for generating values corresponding to the body-center point P0, stores predetermined values according to the data of the color conversion table 39a.
In a case where an input value A0 satisfying a relationship of rh=gh=bh, an average value of two vertices satisfying the relationship (rh=gh=bh) in a cubic lattice block having a base address of (rh, gh, bh) is obtained (P[000]+P[111]/2). Likewise, in a case where an input value A0 satisfies a relationship of rh=gh, an average value of four vertices satisfying the relationship (rh=gh) in the cubic lattice block having the base address of (rh, gh, bh) is obtained (P[000]+P[001]+P[110]+P[111]/4).
Likewise, in a case where an input value A0 satisfies a relationship of rh=bh, an average value of four vertices satisfying the relationship (rh=bh) in the cubic lattice block having the base address of (rh, gh, bh) is obtained (P[000]+P[010]+P[101]+P[111]/4). Likewise, in a case where an input value A0 satisfies a relationship of gh=bh, an average value of four vertices satisfying the relationship (gh=bh) in the cubic lattice block having the base address of (rh, gh, bh) is obtained (P[000]+P[100]+P[011]+P[111]/4). In other cases where there is no equivalence relationship between rh, gh, bh, the average of all of the eight vertices of the cubic lattice block is obtained.
Although the above-described embodiment of the present invention is explained by using an example where there are three input channels, it may be applied to a case where there are n channels. The method of designating the value of the body-center of an n-dimensional cube is the same as the case of three input channels. That is, the value of the body-center of the n-dimensional cube is designated by selecting an equivalence relationship satisfied by the base address of the n-dimensional cubic lattice block as the condition of the offset address used for selecting corresponding vertices of the cubic lattice block and obtaining the average of the output values of the selected vertices. The equivalence relationship satisfied by the base address may be considered the same as an equivalence relationship satisfied by coordinates of a body-center obtained as the average of the coordinates of 2{circumflex over (0)}n vertices of an n-dimensional cubic lattice.
Next, the lookup table and the relationship between the address signal AL and the color conversion table 39a are described below.
In the above-described example shown in
In the address converting part 40, the multiplication circuit 71 multiplies the upper five bits of a 15 bit input signal 75 (indicated as [14:10] in
It is to be noted that although P is described as one of the multi-channel output values, P may be vector data having R, G, and B combined as long as bit length can be sufficiently matched.
Next, the interpolating part 23 is described in detail.
The interpolating part 23 shown in
The multiplication circuit 81 obtains a 12 bit value by multiplying 2ns (obtained by multiplying input value ns two times by adding 0 to the lowest first bit (1 bit shift to the left)) with input value P0, round downs the lower four bits of the 12 bit value, and outputs the upper eight bits of the 12 bit value. The rounding out of the lower four bits corresponds to the division “/dg” in the above-described formula (4).
The multiplication circuit 86 inverts the output (nL+ns) of the adder circuit 85, adds 1 to the inverted output, and outputs dg−nL−ns. It is noted that replacing the process of the adder circuit 86 with a mere inversion of (nL+ns) is not permitted since it exhibits significant error and results to degradation of image quality. Furthermore, each of the subtraction circuits 90, 91 outputs nL−nm and nm−ns, respectively.
Then, the output values are multiplied with each input value Ps, Pm, PL at the multiplication circuits 82-84, the lower four bits of the multiplied values are rounded down, and the remaining upper eight bits are selected. Then, the selected values are added by the adder circuits 87-89. Thereby, the output of the above-described formula (4) is obtained.
However, the selection signal 94 is composed of the highest bit signals of the NOR circuit 93 and the ns so that the output value P=P0 when the input value ns is ns=dg/2 and the output value P is P=Ps when the input value nL is nL=0.
The address generating part 21 according to the first embodiment of the present invention may be implemented with combination of logic processes instead of using the above-described address table. More specifically, instead of using the address table, an output replacing part may be provided after the body-center value generating part for replacing output values, to thereby realize a color conversion apparatus 20 having a simple configuration.
In the following, a color conversion apparatus 20 according to the second embodiment of the present invention is described.
As shown in
In other words, instead of the address table 32 shown in
In comparison with
The output of the color conversion table 39a and the output of the color conversion table 39b are switched by the selection circuits 101 and 102 according to the output value sP of the interpolation coefficient replacing part 24. This is a process utilizing the relation where the Pm value and the PL value corresponding to the same ref value (as shown in
Thereby, an output of PL is obtained from the selection circuit 101, and an output of Pm is obtained from the selection circuit 102. Likewise, the output of the color conversion table 39c and the output of the color conversion table 39d are selected by the selection circuits 103 according to the output value sP of the interpolation coefficient replacing part 24. Thereby, an output of PS is obtained from the selection circuit 103.
With the above-described configuration according to the first embodiment of the present invention, the vertices of the cubic lattice block 2 selected by the address tables 32, 33, 34 can be adaptively changed with ease. The configuration also has an advantage of being compatible to different interpolation methods.
Meanwhile, with the second configuration according to the second embodiment of the present invention, only the selection circuits 101-103 of the output replacing part 100 are needed as an alternative of the address tables 32-34 shown in
Alternatively, although the output replacing part 100 is provided after the body-center value generating part 22 in the configuration shown in
<Comparison of Advantages with Respect to Related Art Example>
Next, advantages attained with the present invention are described in comparison with a related art example. It is to be noted that, although a two-dimensional grid is used in the following description, other multidimensional (e.g., three-dimensional) grids may also be used.
First, a phenomenon, which occurs when an interpolation method of a related art example is used, is described.
Next, a phenomenon, which occurs when an interpolation method according to an embodiment of the present invention is used, is described.
Although
Next, a case of applying the color conversion method to a two-dimensional lattice grid according to an embodiment of the present invention is described. In
The fact of the ripples of
Hence, in a case of using the color conversion apparatus of the present invention with respect to a three-dimensional input, ripples can be prevented from being generated in input values (r, g, b) in the direction of the primary six color hues of RGBCMY (satisfying any of the relationships of r=g, r=b, g=b) and in the direction of the grey axis (satisfying the relationship of r=g=b). At the same time, ripples in directions other than the aforementioned directions can also be prevented.
With the embodiment of the color conversion apparatus 20 having above-described configuration, differences of reproduced colors caused by characteristic differences among different devices can be precisely corrected.
Although the above-described color conversion apparatus 20 can perform the color conversion method of the present invention by using a device(s) dedicated for performing the color conversion method, the color conversion method may alternatively be performed by a program (execution program) causing a computer to execute the processes of the parts/components of the color conversion apparatus 20. For example, the color conversion method according to the above-described embodiment of the present invention may be realized by installing the program in a general purpose personal computer, a server or the like.
Next, a hardware configuration of a computer 500 for executing a color conversion process (color conversion method) according to an embodiment of the present invention is described.
As shown in
The input apparatus 121 includes, for example, a keyboard, a pointing device (e.g., mouse), or an audio input device operated by a user. The input apparatus 121 is configured to input execution commands of a program from the user, various control signals, and audio signals. The output apparatus 122 includes, for example, a speaker and a display for displaying various windows and data required for operating the computer 500. The output apparatus 122 is configured to display or perform audio outputs of a process or a result executed by a control program in the CPU 126.
In this embodiment of the present invention, the program (execution program used for executing the above-described color conversion method), which is to be installed in the computer 500, is provided in a recording medium 128 (e.g., CD-ROM, DVD). The recording medium 128 to which the program is recorded can be loaded to a drive apparatus 123. Then, the program recorded in the recording medium can be installed in the auxiliary storage apparatus 124 via the drive apparatus 123.
The drive apparatus 123 is configured to record the program to the recording medium 128. This enables other computers to easily install the program and execute the above-described color conversion method by using the recording medium 128.
The auxiliary storage apparatus 124 includes, for example, a storage part (e.g., hard disk) for storing the execution program of the present invention and other control programs installed in the computer 500 for performing input/outputs according to necessity.
The memory apparatus 125 is configured to store the execution program read out from the auxiliary storage apparatus 124 by the CPU 126. The memory apparatus 125 includes, for example, ROM (Read Only Memory) and RAM (Random Access Memory).
The CPU 126 is configured to perform various processes of the above-described color conversion method by performing overall controls on the computer 500 (e.g., operations (calculations) and input/output of data) based on the control program (e.g., OS (Operating System) and the execution program read out from the auxiliary storage apparatus 124 and stored in the memory apparatus 125. Furthermore, necessary data required during execution of the program may be obtained from the auxiliary storage apparatus 124 or stored, for example, in the memory apparatus 125.
The network connecting apparatus 127 is connected to, for example, a communication network such as a telephone line or a LAN (Local Area Network). Thereby, the execution program can be obtained from other terminals connected to the communication network or provided to other terminals connected to the communication network. Furthermore, the results obtained by the execution program may also be provided to other terminals connected to the communication network.
Since the above-described embodiment of the hardware configuration requires no additional device dedicated for the color conversion method of the present invention, the color conversion method can be performed at a low cost. Furthermore, by installing the above-described execution program to a computer or a recording medium, the color conversion method can be easily performed. Next, an operation using the execution program according to an embodiment of the present invention is described by using a flowchart.
Although above-described embodiments of the present invention explains a case of dividing r, g, b input values of eight bits into upper four bits and lower four bits and using the upper four bits for generating the base address and the lower four bits for generating an interpolation coefficient, other bit lengths may be used. Therefore, in the following example, the bit length of the input signal is assumed as N bits (N≧8) wherein the upper s bits are used for generating a base address and the lower (N−s) bits are used for generating the interpolation coefficient.
Since the input channels are divided into D<2{circumflex over (0)}s parts, the dimension of multidimensional lookup tables P, P0 are (D+1)×(D+1)×(D+1). The components in the lookup table are indicated as P [i, j, k] with respect to i, j, k=0, 1, . . . , D−1.
In the following example, component P[i, j, k] is considered as a scalar. The same process can be achieved whether it is regarded to perform a process in correspondence with the number of output channels or to perform vector calculation where component P[i, j, k] is regarded as vectors assuming that the number of output channels represents dimension.
In
P
0
[i, i, i]=(P[i, i, i]+P[i+1, i+1, i+1])/2
P
0
[i, i, j]=(P[i, i, i]+P[i, i, j+1]+P [i+1, i+1, j]+P[i+1, i+1, j+1])/4
P
0
[i, j, i]=(P[i, j, i]+P[i, j+1, i]+P[i+1, j, i+1]+P[i+1, j+1, i+1])/4
P
0
[j, i, i]=(P[j, i, i]+P[j+1, i, i]+P[j, i1, i+1]+P[j+1, i+1, i+1])/4
P
0
[i, j, k]=(P[i, j, k]+P[i, j, k+1]+P[i, j+1, k]+P[i, j+1, k+1]+P[i+1, j, k]+P[i+1, j, k+1]+P[i+1, j+1, k]+P[i+1, j+1, k+1])/8
However, i, j, and k are different integers ranging from 0 to D.
It is to be noted that, although the body-center value generating part is realized by the above-described lookup table P0, an algorithm for initializing the lookup table P0 may be directly built-in as a logic circuit.
After the initialization of Step S100, (r, g, b) of N bits are input (Step S101). Then, each of r, g, and b is shifted (N−s) bits to the right, to thereby extract the upper s bits of r, g, b (rh=r>>(N−s), gh=g>>(N−s), bh=b>>(N−s)) (Step S102).
Then, the lower (N−s) bits of r, g, b obtained by logical multiplication with a constant MASK=2 (N−s)−1 is extracted, and each of the extracted bits is divided by 2(N−s) as a floating point. Thereby, normalized floating points (rL=(r&MASK)/2(N−s), gL=(g&MASK)/2(N−s), bL=(b&MASK)/2(N−s)) in a range of 0-1 are obtained (Step S103). In Step S105 and steps thereafter, allocation (assignment) is performed according to the size relationship between rL, gL, bL based on the above-described table shown in
Furthermore, in the process of Step S106, when rL+bL<1 is not satisfied (No in Step S106), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S108, and the operation continues to {circle around (2)} of
Furthermore, in the process of Step S105, when rL>gL>bL is not satisfied (No in Step S105), it is determined whether a relationship of rL>bL≧gL is satisfied (Step S109). When rL>bL≧gL is satisfied (Yes in Step S109), it is further determined whether a relationship of rL+gL<1 (Step S110). When rL+gL<1 is satisfied (Yes in Step S110), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S111, and the operation continues to {circle around (2)} of
Furthermore, in the process of Step S110, when rL+gL<1 is not satisfied (No in Step S110), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S112, and the operation continues to {circle around (2)} of
Furthermore, when rL>bL≧gL is not satisfied (No in Step S109), it is further determined whether a relationship of bL≧rL>gL (Step S113). When bL≧rL>gL is satisfied (Yes in Step S113), it is further determined whether bL+gL<1 (Step S114). When bL+gL<1 is satisfied (Yes in Step S114), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S115, and the operation continues to {circle around (2)} of
Furthermore, when BL+gL<1 is not satisfied (No in Step S114), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S116, and the operation continues to {circle around (2)} of
Furthermore, when bL≧rL>gL is not satisfied (No in Step S113), it is determined whether a relationship of gL≧rL>bL is satisfied (Step S117). When gL≧rL>bL is satisfied (Yes in Step S117), it is further determined whether a relationship of gL+bL<1 is satisfied (Step S118). When gL+bL<1 is satisfied (Yes in Step S118), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S119, and the operation continues to {circle around (2)} of
Furthermore, when gL+bL<1 is not satisfied (No in Step S118), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S120, and the operation continues to {circle around (2)} of
Furthermore, when gL≧rL>bL is not satisfied (No in Step S117), it is further determined whether a relationship of gL>bL≧rL is satisfied (Step S121). When gL>bL≧rL is satisfied (Yes in Step S121), it is further determined whether a relationship of gL+rL<1 is satisfied (Step S122). When gL+rL<1 is satisfied (Yes in Step S122), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S123, and the operation continues to {circle around (2)} of
Furthermore, when gL+rL<1 is not satisfied (No in Step S122), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S124, and the operation continues to {circle around (2)} of
Since the remaining condition would bL≧gL≧rL when gL>bL≧rL is not satisfied (No in Step S121), determination for such relationship is not omitted and proceeds to determining whether a relationship of bL+rL<1 is satisfied (Step S125). When bL+rL<1 is satisfied (Yes in Step S125), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S126, and the operation continues to {circle around (2)} of
Furthermore, when bL+rL<1 is not satisfied (No in Step S125), the interpolation coefficients xs, xm, xL and the vertices Ps, Pm, PL of a tetrahedron are assigned with values shown in Step S127, and the operation continues to {circle around (2)} of
The size determination in Steps S105, S109, S113, S117, and S121 correspond to the relationships indicated in the column “relationship” in the lookup table of
When the interpolation coefficients xs, xm, xL and the vertices P0, Ps, Pm, PL of the tetrahedrons are determined by the processes shown in
More specifically, in the process of Step S128, P=2*xs*P0+(1−xL−xS)*PS+(xL−xm)*Pm+(xm−xS)*PL.
After the process of Step S129 is completed, the color conversion operation, according to necessity, may return to Step S101 and repeat the processes on another input value (r, g, b). Thereby, processes substantially equivalent to those of the first embodiment of the present invention can be realized by an algorithm processible with software.
Although the above-described embodiments of the present invention describe an exemplary case where RGB are the parameters of an input space, other input parameters may also be used. For example, input parameters such as complementary colors of RGB (e.g., CMY), XYZ defined by CIE or L*a*b.
In a case where L*a*b are the input parameters, regardless of the dividing method of a cubic lattice block, ripples are not generated along the grey axis since brightness can easily be assigned along the grid from the beginning. It is, however, effective for reducing ripples of hue that cross over the diagonal line of a cubic lattice block.
With the above-described embodiments of the present invention, differences of reproduced colors caused by characteristic differences among different devices can be precisely corrected. More specifically, addresses of appropriate vertices including the addresses of the vertices of a tetrahedron block are generated by an address generating part, and interpolation coefficients are rearranged by an interpolation coefficient replacing part. Thereby, a common (shared) interpolating part can be used for tetrahedron blocks oriented in different directions. This simplifies the logic of the interpolating part. Furthermore, since rearranging of vertex data can be conducted by an easily usable output replacing part, the address generating part can be simplified as well as reducing logic circuit size.
The color conversion apparatus, the color conversion method, and the color conversion program according to the above-described embodiments of the present invention can be applied to color printers, color printing presses, or pre-processing apparatuses thereof (e.g., personal computers) for precisely correcting differences of reproduced colors caused by characteristic differences among different devices.
The present invention is not limited to the specifically disclosed embodiments, and variations and modifications may be made without departing from the scope of the present invention.
The present application is based on Japanese Priority Application No. 2007-139685 filed on May 25, 2007 with the Japanese Patent Office, the entire contents of which are hereby incorporated herein by reference.
Number | Date | Country | Kind |
---|---|---|---|
2007-139685 | May 2007 | JP | national |