JP4314473B2 - Color processing method, color processing apparatus, color processing program, and storage medium - Google Patents

Color processing method, color processing apparatus, color processing program, and storage medium Download PDF

Info

Publication number
JP4314473B2
JP4314473B2 JP2004022179A JP2004022179A JP4314473B2 JP 4314473 B2 JP4314473 B2 JP 4314473B2 JP 2004022179 A JP2004022179 A JP 2004022179A JP 2004022179 A JP2004022179 A JP 2004022179A JP 4314473 B2 JP4314473 B2 JP 4314473B2
Authority
JP
Japan
Prior art keywords
color
target
adjustment
optimum
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004022179A
Other languages
Japanese (ja)
Other versions
JP2004254303A (en
Inventor
信 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2004022179A priority Critical patent/JP4314473B2/en
Publication of JP2004254303A publication Critical patent/JP2004254303A/en
Application granted granted Critical
Publication of JP4314473B2 publication Critical patent/JP4314473B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color, Gradation (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Description

本発明は、カラー画像中の特定領域の色を最適に調整するための技術に関するものであり、例えば人物の肌色、空の青、草の緑などのような、人間が画像の印象として記憶する記憶色を含む自然画像において、調整対象となる記憶色から調整後の最適な目標色を決定し、さらに、その自然画像の記憶色の領域を最適な目標色に再現する技術に関するものである。   The present invention relates to a technique for optimally adjusting the color of a specific area in a color image, and humans memorize it as an image impression, such as human skin color, sky blue, grass green, etc. The present invention relates to a technique for determining an optimum target color after adjustment from a memory color to be adjusted in a natural image including a memory color, and further reproducing a memory color area of the natural image to an optimum target color.

一般に、人間の記憶色領域を有する自然画像を自動的に調整する場合は、対象となる記憶色の目標とする色を与え、その自然画像中の記憶色領域を目標とする色へ向かって調整する手法をとる。例えば特許文献1に記載されている記憶色調整方法では、入力画像から画素値が所定の範囲の色相に属する画素のヒストグラムを作成し、そのヒストグラムから画像中の記憶色領域の平均値を算出し、あらかじめ設定された最適値との差が解消されるように各色成分ごとに作成されたルックアップテーブルを用いて色調整を行っている。   Generally, when a natural image having a human memory color area is automatically adjusted, a target color of the target memory color is given, and the memory color area in the natural image is adjusted toward the target color. Take a technique. For example, in the memory color adjustment method described in Patent Document 1, a histogram of pixels whose pixel values belong to a hue in a predetermined range is created from an input image, and an average value of memory color areas in the image is calculated from the histogram. The color adjustment is performed by using a look-up table created for each color component so that the difference from the preset optimum value is eliminated.

また、特許文献2には、画像から調整対象となる記憶色領域の代表色を抽出した後、あらかじめ用意されている色相ごとの補整量を用いて調整を行う技術が記載されている。この場合、目標とする色は、あらかじめメモリに確保されている補正量によって、すでに決定したものを用いている。   Japanese Patent Application Laid-Open No. 2004-228561 describes a technique for performing adjustment using a correction amount for each hue prepared in advance after extracting a representative color of a memory color area to be adjusted from an image. In this case, the target color is already determined according to the correction amount secured in the memory in advance.

画像中で色調整の対象となる領域の補整量は、対象となる領域の明度や彩度の度合いによっても大きく異なる。このため、上記のような従来の手法を用いると、強い補整をかける場合と、弱い補整をかける場合の補整量のバランスをとるのが困難で、あらかじめ補整量を色領域ごとに設定しておいたとしても、その設定に労力を要する。   The amount of correction of the area to be color-adjusted in the image varies greatly depending on the brightness and saturation of the area to be adjusted. For this reason, using the conventional method as described above, it is difficult to balance the correction amount when applying strong correction and when applying weak correction, and the correction amount is set for each color region in advance. If so, it takes effort to set it up.

また、上述のような従来の技術では、理想の記憶色に近づけることはできても、調整前の原画に対して不自然になってしまう場合がある。原画像に対して不自然になるということは、原画における記憶色からかけ離れすぎてしまうような補整になる場合である。例えば、曇り空に近い空色が、晴天の空色のようになってしまう場合は、特別な要求がない限りは、好ましい再現とはいえない。肌色や草の緑の場合も同様で、原画と離れすぎる補整は好ましい再現というには難しい。しかしながら、このような場合に対応し、色調整量を弱めてしまうと、たとえば、一般的な青空などの場合も補整が弱くなってしまい、好ましい再現を良好に行えなくなるという問題があった。   In addition, with the conventional techniques as described above, there are cases where the original image before adjustment is unnatural even though it can be close to the ideal memory color. Being unnatural with respect to the original image is a case where the correction is too far from the memory color in the original image. For example, when a sky blue close to a cloudy sky becomes like a sky blue sky, it is not a preferable reproduction unless there is a special request. The same applies to the skin color and green of grass, and it is difficult to achieve a desirable reproduction if the correction is too far from the original image. However, in response to such a case, if the color adjustment amount is weakened, for example, in the case of a general blue sky, the correction is weakened, and there is a problem that preferable reproduction cannot be performed satisfactorily.

特開2001−169135号公報JP 2001-169135 A 特許第3264273号公報Japanese Patent No. 3264273

本発明は、このような問題を解消するためになされたもので、記憶色などの特定領域の色を調整する際に、原画像に対して不自然さがなく、かつ、好ましさを十分に引き出せる最適な目標色を決定する色処理方法および色処理装置、および、決定した最適な目標色を用いて特定領域の色の調整を行う色処理方法および色処理装置を提供することを目的とするものである。また、このような色処理方法を実行する色処理プログラムと、そのような色処理プログラムを記録した記録媒体を提供することを目的とするものである。   The present invention has been made to solve such a problem, and when adjusting the color of a specific area such as a memory color, there is no unnaturalness with respect to the original image, and the preference is sufficiently high. A color processing method and a color processing apparatus for determining an optimum target color that can be drawn out, and a color processing method and a color processing apparatus for adjusting a color in a specific region using the determined optimal target color To do. It is another object of the present invention to provide a color processing program for executing such a color processing method and a recording medium on which such a color processing program is recorded.

本発明は、カラー画像中の色調整の対象となる特定領域の色を調整する色処理方法及び色処理装置において、カラー画像の中で、特定領域の代表となる色を表す代表色と、特定領域で目標とする色を表す目標色とから、その代表色と目標色との色空間上での距離である色調整距離を算出し、その色調整距離を用いて代表色と目標色の間で色調整後の特定領域の色を表す最適目標色を算出することを特徴とするものである。このように色調整距離を用いて最適目標色を算出することによって、代表色と目標色がかけ離れている場合に目標色に調整することによる不自然さをなくし、両者が近い場合には良好な色調整を行うことによって好ましい再現を可能とすることができる。   The present invention relates to a color processing method and a color processing apparatus for adjusting a color of a specific area that is a target of color adjustment in a color image, and a representative color that represents a color that is representative of the specific area in the color image, Calculate the color adjustment distance, which is the distance in the color space between the representative color and the target color, from the target color that represents the target color in the area, and use the color adjustment distance to determine the distance between the representative color and the target color. And calculating the optimum target color representing the color of the specific area after color adjustment. By calculating the optimum target color using the color adjustment distance in this way, it is possible to eliminate the unnaturalness caused by adjusting to the target color when the representative color and the target color are far apart, and good when both are close. By performing color adjustment, a preferable reproduction can be achieved.

特に最適目標色を算出する際には、色調整距離から色調整後の特定領域の色を表す最適目標色を算出するための最適距離係数を算出し、その最適距離係数と前記目標色及び前記代表色を用いて最適目標色を算出するように構成している。この最適距離係数は、色調整距離が増加するに従い滑らかに減少、または、前記色調整距離が増加するに従い滑らかに増減する関数、あるいは、色調整距離が所定の値以下の場合は一定値で、所定の値より大きい場合は滑らかに増減する関数に従って算出している。
さらに代表色から最適目標色の明度の調整を行うための明度調整係数を、代表色の明度が大きいときに小さい値となる関数に従って算出し、この明度調整係数と最適距離係数を用いて最適目標色を算出するように構成することもできる。このときの明度調整係数は、代表色の彩度または色相に応じて前記明度調整係数の変化の度合いを変えて算出することができる。
In particular, when calculating the optimum target color, the optimum distance coefficient for calculating the optimum target color representing the color of the specific area after color adjustment is calculated from the color adjustment distance, and the optimum distance coefficient, the target color, and the target color are calculated. The optimum target color is calculated using the representative color. The optimum distance coefficient is a function that smoothly decreases as the color adjustment distance increases, or a function that increases or decreases smoothly as the color adjustment distance increases, or a constant value when the color adjustment distance is a predetermined value or less. When the value is larger than the predetermined value, it is calculated according to a function that smoothly increases and decreases.
Further, a brightness adjustment coefficient for adjusting the brightness of the optimum target color from the representative color is calculated according to a function that becomes a small value when the brightness of the representative color is large, and the optimum target is calculated using the brightness adjustment coefficient and the optimum distance coefficient. It can also be configured to calculate the color. The brightness adjustment coefficient at this time can be calculated by changing the degree of change of the brightness adjustment coefficient in accordance with the saturation or hue of the representative color.

代表色に対応する目標色としては、例えば与えられた1色、または、複数の色から選択された1色としたり、あるいは、所定の色成分比を有する色とすることができる。また、目標色として、代表色の色成分比と同じ色成分比を有する色とすることができ、代表色に応じた目標色を設定することができる。   The target color corresponding to the representative color can be, for example, a given color, a single color selected from a plurality of colors, or a color having a predetermined color component ratio. Further, the target color can be a color having the same color component ratio as that of the representative color, and a target color corresponding to the representative color can be set.

最適目標色は、色調整を行う色空間の色域内となるように算出することができる。または、代表色と目標色との間で探索を行うことによって、色調整を行う色空間の色域内となるように算出することができる。色調整を行う色空間の色域は、例えばカラー画像を再現するデバイスにおける色空間の色域とすることができる。   The optimum target color can be calculated so as to be within the color gamut of the color space in which color adjustment is performed. Alternatively, by performing a search between the representative color and the target color, it can be calculated so as to be within the color gamut of the color space in which color adjustment is performed. The color gamut of the color space in which color adjustment is performed can be, for example, the color gamut of a color space in a device that reproduces a color image.

さらに本発明は、上述のようにして算出された最適目標色に向かって、特定領域の色の調整を行うことを特徴とするものである。最適目標色は、上述のように色調整距離を用いて代表色と目標色の間で最適な目標色として設定されているので、この最適目標色に向かって色調整を行うことによって、特定領域について好ましい色に調整することができる。   Furthermore, the present invention is characterized in that the color of a specific area is adjusted toward the optimum target color calculated as described above. Since the optimum target color is set as the optimum target color between the representative color and the target color using the color adjustment distance as described above, by performing color adjustment toward the optimum target color, the specific area is set. Can be adjusted to a preferred color.

また本発明は、上述のような色処理をコンピュータに実行させる色処理プログラム、及び、そのようなプログラムを格納した記憶媒体を提供するものである。   The present invention also provides a color processing program for causing a computer to execute the color processing as described above, and a storage medium storing such a program.

以上の説明から明らかなように、本発明によれば、記憶色などの特定領域の色を調整する際に、その特定領域の代表色と目標色から最適な色調整距離を算出して最適目標色を設定する。その最適目標色を用いて色調整を行えば、かけ離れた色に調整されるのを防ぎ、原画像に対して不自然さがなく、かつ、好ましさを十分に引き出した画像への色調整が可能となるという効果がある。   As is clear from the above description, according to the present invention, when adjusting the color of a specific area such as a memory color, the optimal target is calculated by calculating the optimum color adjustment distance from the representative color and the target color of the specific area. Set the color. By adjusting the color using the optimum target color, it is possible to prevent the color from being adjusted to a distant color, to adjust the color to an image that is not unnatural with respect to the original image and sufficiently draws out the preference. There is an effect that becomes possible.

図1は、本発明の第1の実施の形態を示すブロック図である。図中、11は代表色算出部、12は色調整距離算出部、13は最適目標色算出部である。代表色算出部11は、入力画像から、色調整の対象となる領域を代表する色を算出し、これを代表色とする。代表色の算出は、画像領域認識に関する公知の技術を用いて行うことができる。例えば、色相などによりあらかじめ色範囲を決定しておき、その色範囲内の画素の平均値で求めるなど、種々の手法を用いることができる。   FIG. 1 is a block diagram showing a first embodiment of the present invention. In the figure, 11 is a representative color calculation unit, 12 is a color adjustment distance calculation unit, and 13 is an optimum target color calculation unit. The representative color calculation unit 11 calculates a color that represents a region to be subjected to color adjustment from the input image, and uses this as a representative color. The calculation of the representative color can be performed using a known technique related to image area recognition. For example, various methods can be used, such as determining a color range in advance based on the hue and obtaining the average value of pixels within the color range.

色調整距離算出部12は、代表色算出部11で算出した代表色と与えられた目標色との色空間上でのユークリッド距離を算出して色調整距離とする。ここで、目標色は当該色調整の対象となる領域で目標とする色であり、あらかじめ1点用意しておいてもよいし、複数用意されたものから選択してもよい。また、あらかじめ、調整対象となる領域で目標色となる色成分の比を、R:G:B=kR :kG :kB のように用意しておき、代表色のRGB成分がこの比となるように変換して求めてもよい。例えば調整対象となる領域が空領域の場合、代表色のRGB色空間上の座標を(RO ,GO ,BO )、目標色のRGB色空間上座標を(Rt ,Gt ,Bt )としたとき、空の色の特徴をもっともよく表すB成分を代表色の成分のまま固定し、すなわちRG成分もB成分から生成することとし、
(Rt,Gt,Bt)=((kR /kB )BO ,(kG /kB )BO ,BO ) (式1)
により比変換を行って求めることができる。なお、代表色と目標色との距離である色調整距離は、ユークリッド距離に限らず、色の感度などを加味した重み付け距離など、種々の距離を適用可能である。
The color adjustment distance calculation unit 12 calculates the Euclidean distance in the color space between the representative color calculated by the representative color calculation unit 11 and the given target color and sets it as the color adjustment distance. Here, the target color is a target color in the area to be subjected to the color adjustment, and one point may be prepared in advance or may be selected from a plurality of prepared colors. In addition, a ratio of color components that are target colors in the region to be adjusted is prepared in advance as R: G: B = k R : k G : k B , and the RGB components of the representative colors are included in this ratio. You may obtain | require by converting so that it may become. For example, when the area to be adjusted is an empty area, the coordinates of the representative color in the RGB color space are (R O , G O , B O ), and the coordinates of the target color in the RGB color space are (R t , G t , B t ), the B component that best represents the characteristics of the sky color is fixed as the representative color component, that is, the RG component is also generated from the B component,
(R t , G t , B t ) = ((k R / k B ) B O , (k G / k B ) B O , B O ) (Formula 1)
Can be obtained by performing a ratio conversion. Note that the color adjustment distance, which is the distance between the representative color and the target color, is not limited to the Euclidean distance, and various distances such as a weighted distance that takes color sensitivity into consideration can be applied.

最適目標色算出部13は、調整対象となる領域の調整後の色を表す最適目標色を算出する。上記の(式1)で求めた目標色は、あくまで色調整の方向を示すものであり、実際に色調整を行う場合は、この最適目標色算出部13で算出する最適目標色を用いて行うことになる。上述のように、目標色を設定していても、代表色がその目標色に完全に置き換わるような補整を施した場合は、例えば、曇り空の風景が晴天の空の風景に変わるといった、原画像に対して不自然な仕上がりとなる場合がある。肌色や草の緑色の場合も同様であり、原画像に対してかけ離れた補整を施した場合は、好ましい再現ではなくなってしまう。しかしながら、代表色が目標色から適度に離れている場合は、十分に目標色に近づけた方が好ましい。このように、代表色を目標色に完全に一致させると不具合が発生する可能性があるため、代表色と目標色の間に最適目標色を設け、この最適目標色に代表色を近づけることによって、好ましい再現を実現している。このときの最適目標色は、色調整距離の大きさによって決定することができる。ここでは、上記のような再現を可能とする色調整距離と最適目標色との関係をあらかじめ用意しておいてもよいし、また、このような最適目標色が算出できれば、手法はどのようなものを用いてもよい。   The optimum target color calculation unit 13 calculates the optimum target color that represents the color after adjustment of the region to be adjusted. The target color obtained in the above (Expression 1) indicates the direction of color adjustment to the last, and when the actual color adjustment is performed, the optimum target color calculated by the optimum target color calculation unit 13 is used. It will be. As described above, when the target color is set, but the correction is performed so that the representative color completely replaces the target color, for example, the original image in which the cloudy sky landscape changes to a clear sky landscape May result in an unnatural finish. The same applies to the skin color or the green color of grass. If the original image is subjected to a large correction, the reproduction is not preferable. However, when the representative color is appropriately separated from the target color, it is preferable that the representative color is sufficiently close to the target color. In this way, there is a possibility that a problem may occur if the representative color is made to completely match the target color. Therefore, an optimum target color is provided between the representative color and the target color, and the representative color is brought close to the optimum target color. , A preferable reproduction is realized. The optimum target color at this time can be determined by the size of the color adjustment distance. Here, the relationship between the color adjustment distance enabling the reproduction as described above and the optimum target color may be prepared in advance, and any method can be used as long as such an optimum target color can be calculated. A thing may be used.

図2は、本発明の第2の実施の形態を示すブロック図である。図中、図1と同様の部分には同じ符号を付してある。21は最適距離係数算出部である。なお、代表色算出部11と色調整距離算出部12は、上述の第1の実施の形態と同様であるので、ここでは説明を省略する。   FIG. 2 is a block diagram showing a second embodiment of the present invention. In the figure, parts similar to those in FIG. Reference numeral 21 denotes an optimum distance coefficient calculation unit. The representative color calculation unit 11 and the color adjustment distance calculation unit 12 are the same as those in the first embodiment described above, and thus the description thereof is omitted here.

最適距離係数算出部21は、調整後の対象領域の色が、調整前に対して自然で好ましい再現となるような最適目標色を算出するために、色調整距離に乗じる係数である最適距離係数を算出する。   The optimum distance coefficient calculation unit 21 calculates an optimum target color such that the color of the target area after adjustment is natural and preferable reproduction before the adjustment, and is an optimum distance coefficient that is a coefficient by which the color adjustment distance is multiplied. Is calculated.

図3は、色調整距離と最適距離係数及び最適距離の関係の一例を示すグラフである。図3(A)に示すような色調整距離dと最適距離係数rの関数は、例えば以下の式により表すことができる。
r=1/(1+(d/dinf p ) (式2)
ここで、dinf は関数の変曲点を表すパラメータ、pは関数の勾配を表すパラメータである。
FIG. 3 is a graph showing an example of the relationship between the color adjustment distance, the optimum distance coefficient, and the optimum distance. A function of the color adjustment distance d and the optimum distance coefficient r as shown in FIG. 3A can be expressed by the following equation, for example.
r = 1 / (1+ (d / d inf ) p ) (Formula 2)
Here, d inf is a parameter that represents the inflection point of the function, and p is a parameter that represents the gradient of the function.

この(式2)に示すような単調減少関数で定義された最適距離係数rを用いて、代表色から最適目標色への距離である最適距離dopt は、
opt =r・d (式3)
で表される。このように算出された最適距離dopt は、以下のようになる。
opt =r・d=r/(1+(d/dinf p ) (式4)
この(式4)で表される色調整距離dと最適距離dopt の関係のグラフを図3(B)に示した。図3(B)に示したグラフの概形は、(式4)を1回微分することにより極値を算出し、容易に描画することができる。
Using the optimum distance coefficient r defined by the monotonically decreasing function as shown in (Equation 2), the optimum distance d opt, which is the distance from the representative color to the optimum target color, is
d opt = r · d (Formula 3)
It is represented by The optimum distance d opt calculated in this way is as follows.
d opt = r · d = r / (1+ (d / d inf ) p ) (Formula 4)
A graph of the relationship between the color adjustment distance d and the optimum distance d opt represented by (Equation 4) is shown in FIG. The outline of the graph shown in FIG. 3B can be drawn easily by calculating extreme values by differentiating (Equation 4) once.

図4は、最適目標色の一例の説明図である。図3(B)から分かるように、代表色と目標色がかけ離れている場合は、ほとんど色調整が行われないような最適目標色が算出され、代表色と目標色が適度に離れている場合は、好ましい最大限の調整を行うための最適目標色が算出される。当然のことながら代表色が目標色と一致している場合は、代表色から最適目標色までの距離も0となる。このような関係を、図4では代表色及び目標色の位置関係から説明している。   FIG. 4 is an explanatory diagram of an example of the optimum target color. As can be seen from FIG. 3B, when the representative color and the target color are far from each other, the optimum target color is calculated so that almost no color adjustment is performed, and the representative color and the target color are appropriately separated. The optimal target color for performing the preferred maximum adjustment is calculated. Naturally, when the representative color matches the target color, the distance from the representative color to the optimum target color is also zero. Such a relationship is illustrated in FIG. 4 from the positional relationship between the representative color and the target color.

図4(A)では、代表色と目標色がほとんど一致している場合であり、この場合には最適距離もほとんど0となり、図示していないが最適目標色も代表色及び目標色とほぼ同様の色となる。従って、代表色を目標色や最適目標色に調整したり、あるいは調整しなくても、ほぼ好ましい色再現が可能である。   FIG. 4A shows a case where the representative color and the target color are almost the same. In this case, the optimum distance is almost 0, and although not shown, the optimum target color is almost the same as the representative color and the target color. It becomes the color. Therefore, it is possible to achieve almost preferable color reproduction with or without adjusting the representative color to the target color or the optimum target color.

図4(B)、(C)では、代表色と目標色が適度に離れている場合を示している。この場合には、最適距離を代表色と目標色の距離に近い値とし、最適目標色を目標色に近い色に設定する。そして、代表色を最適目標色となるように、あるいは最適目標色に近づけるように、色調整を行えばよい。これによって、好ましい色再現を行うことができる。   4B and 4C show a case where the representative color and the target color are appropriately separated. In this case, the optimum distance is set to a value close to the distance between the representative color and the target color, and the optimum target color is set to a color close to the target color. Then, color adjustment may be performed so that the representative color becomes the optimum target color or approaches the optimum target color. Thereby, preferable color reproduction can be performed.

図4(D)、(E)では、代表色と目標色がかけ離れている場合を示している。このような場合には、上述のように代表色を目標色あるいは目標色に近い色に調整してしまうと不自然な色再現となってしまう場合が発生する。このような不具合の発生を防止するため、最適距離として小さい値が算出され、最適目標色も代表色に近い色に設定される。これによって、目標色へ向けて色調整がなされるものの、その調整量は小さくなり、かけ離れた色による不自然な色再現を防止することができる。   4D and 4E show a case where the representative color and the target color are far apart. In such a case, if the representative color is adjusted to the target color or a color close to the target color as described above, an unnatural color reproduction may occur. In order to prevent such a problem from occurring, a small value is calculated as the optimum distance, and the optimum target color is also set to a color close to the representative color. As a result, although the color adjustment is performed toward the target color, the amount of adjustment is small, and unnatural color reproduction due to a distant color can be prevented.

上記の例では、最適距離係数と色調整距離との関係を連続した関数として表したが、これに限られるものではない。例えば色調整距離と最適距離係数をあらかじめ対応づけておいて、例えばルックアップテーブルとして用意しておくなど、対応関係が上記の関数関係となれば、どのような手法を用いてもよい。   In the above example, the relationship between the optimum distance coefficient and the color adjustment distance is expressed as a continuous function, but the present invention is not limited to this. For example, any method may be used as long as the correspondence relationship is the above-described functional relationship, for example, by associating the color adjustment distance and the optimum distance coefficient in advance and preparing the lookup table as a lookup table, for example.

図3に色調整距離と最適距離係数との関係の一例を示したが、この例に限らず、種々の関係により最適距離係数を算出するように構成することができる。図5は、色調整距離と最適距離係数及び最適距離の関係の別の例を示すグラフである。例えば図5(A)には、色調整距離が所定範囲内にあれば最適距離係数を0とする例を示している。同様の関係を連続関数によって示した例を図5(B)に示している。   FIG. 3 shows an example of the relationship between the color adjustment distance and the optimum distance coefficient. However, the present invention is not limited to this example, and the optimum distance coefficient can be calculated based on various relationships. FIG. 5 is a graph showing another example of the relationship between the color adjustment distance, the optimum distance coefficient, and the optimum distance. For example, FIG. 5A shows an example in which the optimum distance coefficient is set to 0 if the color adjustment distance is within a predetermined range. FIG. 5B shows an example in which a similar relationship is shown by a continuous function.

例えば図5(A)に示した色調整距離と最適距離係数の関係から、色調整距離と最適距離の関係を算出すると、図5(C)に示すようになる。図5(C)に示すグラフからわかるように、図5(A)に示す関係から最適距離係数を決定した場合、色調整距離がある範囲内にあれば、最適距離は0となり、ある範囲を超えれば、最適距離が少しずつ増えていき、ある程度以上に色調整距離が離れると、色調整距離が大きくなるにつれ、最適距離が少しずつ減少していく関係となる。   For example, when the relationship between the color adjustment distance and the optimum distance coefficient is calculated from the relationship between the color adjustment distance and the optimum distance coefficient shown in FIG. 5A, the result is as shown in FIG. As can be seen from the graph shown in FIG. 5C, when the optimum distance coefficient is determined from the relationship shown in FIG. 5A, if the color adjustment distance is within a certain range, the optimum distance is 0, and the certain range is reduced. If it exceeds, the optimum distance increases little by little, and when the color adjustment distance is more than a certain degree, the optimum distance decreases gradually as the color adjustment distance increases.

図6は、最適目標色の別の例の説明図である。図5(A)、(C)に示した色調整距離と最適距離係数、最適距離の関係から得られる最適目標色の関係を図6に示している。図6(A)〜(C)では、色調整距離がある範囲内の場合を示している。この場合には、上述のように最適距離を0とするので、最適目標色は代表色そのものとなる。従って、代表色は調整が行われずにそのまま出力される。これによって、代表色が目標色と類似している場合には、原画の微妙な色をそのまま再現するように構成することができる。   FIG. 6 is an explanatory diagram of another example of the optimum target color. FIG. 6 shows the relationship between the optimum target color obtained from the relationship between the color adjustment distance shown in FIGS. 5A and 5C, the optimum distance coefficient, and the optimum distance. 6A to 6C show a case where the color adjustment distance is within a certain range. In this case, since the optimum distance is set to 0 as described above, the optimum target color is the representative color itself. Therefore, the representative color is output as it is without adjustment. Thus, when the representative color is similar to the target color, it can be configured to reproduce the delicate color of the original image as it is.

図6(D)、(E)は図4(B)、(C)の場合と同様であり、代表色と目標色が適度に離れている場合を示している。この場合は、最適目標色は目標色に近い色に設定される。これによって、代表色は目標色に近い最適目標色となるように色調整が行われることになる。   6D and 6E are the same as those in FIGS. 4B and 4C, and show a case where the representative color and the target color are appropriately separated. In this case, the optimum target color is set to a color close to the target color. As a result, the color adjustment is performed so that the representative color becomes the optimum target color close to the target color.

また図6(F)、(G)は図4(D)、(E)の場合と同様であり、代表色と目標色がかけ離れている場合を示している。この場合には、最適距離として小さい値が算出され、最適目標色も代表色に近い色に設定される。そのため、色調整はほとんど行われない。これによって、かけ離れた色に調整されることによる不自然な色再現を防止することができる。   6 (F) and 6 (G) are the same as those in FIGS. 4 (D) and 4 (E), and show a case where the representative color is far from the target color. In this case, a small value is calculated as the optimum distance, and the optimum target color is set to a color close to the representative color. Therefore, almost no color adjustment is performed. As a result, unnatural color reproduction due to being adjusted to a distant color can be prevented.

このように、代表色が目標色に非常に近い場合と非常に遠い場合には、無理に色調整を行わずに原画が有する色を優先させることによって、不自然な色再現を防止し、あるいは微妙な色再現を優先させて再現することが可能となる。   In this way, when the representative color is very close to or far from the target color, unnatural color reproduction is prevented by giving priority to the color of the original image without forcibly adjusting the color, or It is possible to give priority to subtle color reproduction.

図2に戻り、最適目標色算出部13は、上述のようにして最適距離係数算出部21で算出された最適距離係数と、代表色、目標色を用いて、最適目標色を算出する。最適目標色(Ropt ,Gopt ,Bopt )は、代表色(RO ,GO ,BO )、目標色(Rt ,Gt ,Bt )、及び最適距離係数rから
opt =RO +r(Rt −RO
opt =GO +r(Gt −GO ) (式5)
opt =BO +r(Bt −BO
で計算すればよい。なお、式3の関係から、r=(dopt /d)であるので、最適距離係数rから最適距離dopt を求め、最適距離dopt 及び色調整距離dを用いて最適距離係数rの代わりに(dopt /d)として計算してもよい。
Returning to FIG. 2, the optimum target color calculation unit 13 calculates the optimum target color using the optimum distance coefficient calculated by the optimum distance coefficient calculation unit 21 as described above, the representative color, and the target color. The optimal target colors (R opt , G opt , B opt ) are determined from the representative colors (R O , G O , B O ), the target colors (R t , G t , B t ), and the optimal distance coefficient r R opt = R O + r (R t −R O )
G opt = G O + r (G t −G O ) (Formula 5)
B opt = B O + r (B t −B O )
Calculate with Since r = (d opt / d) from the relationship of Expression 3, the optimum distance d opt is obtained from the optimum distance coefficient r, and instead of the optimum distance coefficient r using the optimum distance d opt and the color adjustment distance d. (D opt / d) may be calculated.

図7は、本発明の第3の実施の形態を示すブロック図である。図中、図1、図2と同様の部分には同じ符号を付してある。31は明度調整係数算出部である。なお、代表色算出部11,色調整距離算出部12、最適距離係数算出部21は、上述の第2の実施の形態と同様であるので、ここでは説明を省略する。この第3の実施の形態では、上述の第2の実施の形態として示した構成に、最適目標色の明度を微調整するための構成を加えたものである。明度は、人間の目がもっとも敏感に反応する特性を持っている。そのため、最適目標色の明度は、調整対象領域にとって好ましい再現が行われているか否かを判断する重要な要素となる。特に調整後の対象領域の明度が、原画の対象領域の明度と比べてかけ離れると、彩度がかけ離れているよりも、誤って調整された画像とみなされやすい。このため、原画像の対象領域の明度に対して自然になるように、代表色を用いて調整後の色を表す最適目標色を微調整することが望ましい。この第3の実施の形態では、そのような明度についての微調整を行う例を示している。   FIG. 7 is a block diagram showing a third embodiment of the present invention. In the figure, the same parts as those in FIGS. 1 and 2 are denoted by the same reference numerals. Reference numeral 31 denotes a brightness adjustment coefficient calculation unit. Note that the representative color calculation unit 11, the color adjustment distance calculation unit 12, and the optimum distance coefficient calculation unit 21 are the same as those in the second embodiment described above, and thus the description thereof is omitted here. In the third embodiment, a configuration for finely adjusting the brightness of the optimum target color is added to the configuration shown as the second embodiment. Lightness has the characteristic that the human eye reacts most sensitively. For this reason, the brightness of the optimum target color is an important factor for determining whether or not preferable reproduction is performed for the adjustment target region. In particular, if the brightness of the target area after adjustment is far from that of the target area of the original image, it is more likely to be an erroneously adjusted image than when the saturation is far away. For this reason, it is desirable to finely adjust the optimum target color representing the adjusted color using the representative color so as to be natural with respect to the brightness of the target area of the original image. In the third embodiment, an example in which such fine adjustment of brightness is performed is shown.

明度調整係数算出部31では、代表色に応じて最適目標色の明度の調整を行うための係数である明度調整係数を算出する。例えば、代表色の色成分を上述の(式1)等のように非変換を行って目標色としたときなどにおいて、目標色の明度が代表色の明度に比べ小さくなってしまうこともある。図8は、明度が低下する場合の一例の説明図である。図8に示す例では、代表色よりも目標色の明度が低い。この場合、矢印で示すように代表色を目標色へ向けて最適距離だけ近づけるように色調整を行った場合、明度が低下することは明らかである。明度調整係数算出部31では、このように色調整を行った場合に低下する明度を、ある程度軽減するための明度調整係数を算出するものである。   The lightness adjustment coefficient calculating unit 31 calculates a lightness adjustment coefficient that is a coefficient for adjusting the lightness of the optimum target color according to the representative color. For example, when the color component of the representative color is not converted as in the above (Equation 1) to obtain the target color, the lightness of the target color may be smaller than the lightness of the representative color. FIG. 8 is an explanatory diagram of an example of a case where the brightness decreases. In the example shown in FIG. 8, the lightness of the target color is lower than that of the representative color. In this case, when the color adjustment is performed so that the representative color approaches the target color by the optimum distance as indicated by the arrow, it is clear that the brightness decreases. The lightness adjustment coefficient calculation unit 31 calculates a lightness adjustment coefficient for reducing the lightness that is lowered when color adjustment is performed in this way to some extent.

図9は、代表色の明度と明度調整係数との関係の一例を示すグラフである。図9に示すグラフから得られる明度調整係数は、代表色の明度が大きいほど代表色の明度を保存せず、代表色の明度が小さいほど明度を保存する関係を示している。一般に、明度が大きい領域では色域が狭くなってしまう傾向があり、明度の大きい領域で代表色の明度を保存してしまうと、最適目標色が色域外となり、表現できる色ではなくなってしまう場合がある。このため、代表色の明度が大きい場合は、明度を若干小さくした方がよく、そのような特性を考慮して明度調整係数を設定したものである。   FIG. 9 is a graph showing an example of the relationship between the brightness of the representative color and the brightness adjustment coefficient. The brightness adjustment coefficient obtained from the graph shown in FIG. 9 indicates a relationship in which the brightness of the representative color is not saved as the brightness of the representative color is larger, and the brightness is saved as the brightness of the representative color is smaller. Generally, there is a tendency that the color gamut tends to be narrow in areas with high lightness, and if the lightness of the representative color is stored in areas with high lightness, the optimal target color will be out of the color gamut and will not be a color that can be expressed. There is. For this reason, when the lightness of the representative color is large, it is better to slightly reduce the lightness, and the lightness adjustment coefficient is set in consideration of such characteristics.

このような明度調整係数は最適目標色算出部13に渡される。最適目標色算出部13では、最適距離係数算出部21で算出した最適距離係数と、代表色、目標色とともに、明度調整係数算出部31で算出した明度調整係数を用いて最適目標色を算出する。このとき、明度調整係数を用いることによって、図8に示したように最適距離係数を用いて算出された最適目標色が代表色に対して明度が低下している場合に、代表色の明度に近づけることができる。以下、明度調整係数を利用した最適目標色の調整方法について説明する。なお、明度を表すことのできる色空間としてYCbCrやL* * * などの色空間があるが、この例ではYCbCr色空間を用いて説明をする。 Such a brightness adjustment coefficient is passed to the optimum target color calculation unit 13. The optimum target color calculation unit 13 calculates the optimum target color using the optimum distance coefficient calculated by the optimum distance coefficient calculation unit 21, the brightness adjustment coefficient calculated by the brightness adjustment coefficient calculation unit 31 together with the representative color and the target color. . At this time, by using the brightness adjustment coefficient, when the optimum target color calculated using the optimum distance coefficient is lower than the representative color as shown in FIG. You can get closer. Hereinafter, a method for adjusting the optimum target color using the brightness adjustment coefficient will be described. Note that there are color spaces such as YCbCr and L * a * b * as color spaces that can express the brightness. In this example, description will be made using the YCbCr color space.

代表色(RO ,GO ,BO )をYCbCr色空間で表した点を(YO ,CbO ,CrO )、上述の第2の実施の形態において最適距離係数、代表色、目標色から算出した最適目標色(Ropt ,Gopt ,Bopt )をYCbCr色空間で表した点を(Yopt ,Cbopt ,Cropt )とすると、(Yopt ,Cbopt ,Cropt )の明度を明度調整係数rY により明度を調整した点(Y'opt,Cb'opt,Cr'opt)は
Y'opt=YO +rY (Yopt −YO
Cb'opt=Cbopt (式6)
Cr'opt=Cropt
となる。このようにして算出された(Y'opt,Cb'opt,Cr'opt)をRGB空間へ逆変換した点(R'opt,G'opt,B'opt)を、明度調整後の最適目標色として出力すればよい。
The points representing the representative colors (R O , G O , B O ) in the YCbCr color space are (Y O , Cb O , Cr O ), and the optimum distance coefficient, representative color, target color in the second embodiment described above. brightness of the calculated optimum target color (R opt, G opt, B opt) points represented in the YCbCr color space (Y opt, Cb opt, Cr opt) When, (Y opt, Cb opt, Cr opt) from The point (Y ′ opt , Cb ′ opt , Cr ′ opt ) where the brightness is adjusted by the brightness adjustment coefficient r Y is Y ′ opt = Y O + r Y (Y opt −Y O )
Cb ′ opt = Cb opt (Formula 6)
Cr'opt = Cropt
It becomes. Thus it was calculated (Y 'opt, Cb' opt , Cr 'opt) point inverse transforming into RGB space (R' opt, G 'opt , B' opt) and the optimum target color after brightness adjustment As output.

図10は、本発明の第3の実施の形態において出力される最適目標色の一例の説明図である。図8でも説明したように、代表色と、その代表色よりも明度が低い目標色から最適距離に基づいて調整を行うと、図中Aとして示す色に調整される。この色Aが上述の第2の実施の形態で最適目標色として出力される色である。この第3の実施の形態では、さらに明度調整係数を用い、上述のようにして明度調整後の最適目標色を算出する。この明度調整後の最適目標色を図中Bとして示している。このように調整された色Bを最適目標色として出力することになる。このように、この第3の実施の形態では、明度低下をある程度抑えた色調整が可能となる。   FIG. 10 is an explanatory diagram showing an example of the optimum target color output in the third embodiment of the present invention. As described with reference to FIG. 8, when the adjustment is performed based on the optimum distance from the representative color and the target color whose brightness is lower than that of the representative color, it is adjusted to the color indicated as A in the figure. This color A is a color that is output as the optimum target color in the second embodiment. In the third embodiment, the brightness adjustment coefficient is further used to calculate the optimum target color after the brightness adjustment as described above. The optimum target color after this brightness adjustment is shown as B in the figure. The color B adjusted in this way is output as the optimum target color. As described above, in the third embodiment, it is possible to perform color adjustment while suppressing a decrease in brightness to some extent.

図11は、代表色の明度と明度調整係数との関係の別の例を示すグラフである。この本発明の第3の実施の形態で用いる代表色の明度と明度調整係数との関係は、上述の図9に示した例に限られるものではない。例えば図11に示すように代表色の明度と、明度の微調整も行った最終的な最適目標色(Y'opt,Cb'opt,Cr'opt)の明度をダイレクトに関係づけるような明度調整係数を用いてもよい。この図11に示すような関係の明度調整係数を用いる場合は、代表色(RO ,GO ,BO )をYCbCr色空間で表した点を(YO ,CbO ,CrO )とし、明度調整係数により、調整した明度は
Y'opt=rY O (式7)
で算出すればよい。
FIG. 11 is a graph showing another example of the relationship between the brightness of the representative color and the brightness adjustment coefficient. The relationship between the brightness of the representative color and the brightness adjustment coefficient used in the third embodiment of the present invention is not limited to the example shown in FIG. For example, as shown in FIG. 11, the brightness adjustment directly correlates the brightness of the representative color and the brightness of the final optimum target color (Y ′ opt , Cb ′ opt , Cr ′ opt ) after fine adjustment of the brightness. A coefficient may be used. When the brightness adjustment coefficient having the relationship as shown in FIG. 11 is used, a point representing the representative colors (R O , G O , B O ) in the YCbCr color space is defined as (Y O , Cb O , Cr O ), The brightness adjusted by the brightness adjustment coefficient is Y ′ opt = r Y Y O (Equation 7)
Calculate with

このように、代表色の明度から最適目標色の明度を調整できるような係数であれば、どのようなものでも採用することができる。例えば、図9や図11に示した明度調整係数の変化の度合いを、代表色の彩度や色相に応じて変えてもよい。   In this way, any coefficient can be adopted as long as it is a coefficient that can adjust the brightness of the optimum target color from the brightness of the representative color. For example, the degree of change in the brightness adjustment coefficient shown in FIGS. 9 and 11 may be changed according to the saturation and hue of the representative color.

図12は、本発明の第4の実施の形態を示すブロック図である。図中、41は色処理部、42は選択的色調整部である。この第4の実施の形態では、上述の本発明の第1〜3の実施の形態を利用して色調整を行う色処理システムの一例を示している。   FIG. 12 is a block diagram showing a fourth embodiment of the present invention. In the figure, 41 is a color processing unit, and 42 is a selective color adjustment unit. In the fourth embodiment, an example of a color processing system that performs color adjustment using the first to third embodiments of the present invention described above is shown.

色処理部41は、上述の本発明の第1〜3の実施の形態で説明した構成を含むものであり、代表色及び最適目標色を出力する。選択的色調整部42は、入力画像の調整対象となる領域について、その対象領域の代表色から、最適目標色に向かって色調整を行う。対象領域中には、代表色以外にも代表色に類似した様々な色が含まれていると考えられるが、それらの色についても、代表色と最適目標色との関係に対応した調整を行うことができる。例えば、代表色と最適目標色との差分を他の色に対しても加減算したり、代表色と最適目標色の比を他の色に対しても適用するなど、調整方法は任意である。   The color processing unit 41 includes the configuration described in the first to third embodiments of the present invention, and outputs a representative color and an optimum target color. The selective color adjustment unit 42 performs color adjustment from the representative color of the target area toward the optimum target color for the area to be adjusted in the input image. It is considered that the target area contains various colors similar to the representative color in addition to the representative color, and these colors are also adjusted according to the relationship between the representative color and the optimum target color. be able to. For example, the adjustment method is arbitrary, such as adding or subtracting the difference between the representative color and the optimum target color to other colors, or applying the ratio of the representative color to the optimum target color also to other colors.

このような調整を行うことによって、代表色は調整のしすぎなどを回避して良好な調整を施すことができるし、それに従って同じ対象領域内の色については、最適な色に調整することができる。従って、原画像とかけ離れた調整が行われることなく、好ましい色への調整が行われた画像を得ることができる。   By performing such adjustment, the representative color can be adjusted well by avoiding over-adjustment, and the colors in the same target area can be adjusted to the optimum color accordingly. it can. Therefore, it is possible to obtain an image that has been adjusted to a preferred color without being adjusted far from the original image.

次に、本発明の第5の実施の形態について説明する。上述の第1〜3の実施の形態では最適目標色を算出する際に、色域を考慮していない。例えば上述の第4の実施の形態の構成によって色調整を行ったカラー画像は、出力デバイスにより出力することになるが、出力デバイスによって再現可能な色域が存在し、調整後の色が再現可能な色域を逸脱して、良好な色再現を行えない場合も発生する。   Next, a fifth embodiment of the present invention will be described. In the first to third embodiments described above, the color gamut is not taken into account when calculating the optimum target color. For example, a color image that has undergone color adjustment according to the configuration of the fourth embodiment described above is output by an output device, but there is a color gamut that can be reproduced by the output device, and the adjusted color can be reproduced. In some cases, the color gamut may be deviated and satisfactory color reproduction cannot be performed.

図13は、最適目標色が色域外となる場合の色再現の一例の説明図である。上述の第1〜3の実施の形態で説明した方法によって代表色と目標色とから最適目標色を求めた時、図13に示すように、求めた最適目標色が色域外となっている場合を考える。このとき、第4の実施の形態で示した選択的色調整部42によって色調整を行うと、代表色及びその近傍の色(代表色を囲む楕円で示す)は、最適目標色及びその近傍の色(最適目標色を囲む楕円で示す)に調整されることになる。これらの調整された色は、この例では最適目標色を含めて色域外の色である。   FIG. 13 is an explanatory diagram of an example of color reproduction when the optimum target color is out of the color gamut. When the optimum target color is obtained from the representative color and the target color by the method described in the first to third embodiments, as shown in FIG. 13, the obtained optimum target color is out of the color gamut. think of. At this time, when the color adjustment is performed by the selective color adjustment unit 42 described in the fourth embodiment, the representative color and its neighboring colors (indicated by an ellipse surrounding the representative color) are the optimum target color and its neighboring colors. The color (shown by an ellipse surrounding the optimum target color) will be adjusted. These adjusted colors are out-of-gamut colors, including the optimal target color in this example.

このような色域外の色は、例えば出力デバイスにより出力する際には再現されない。あるいは、再現可能な色域内の色となるように色域圧縮処理を行って出力する。これによって、最適目標色及びその近傍の色は、色域外郭の色によって再現されてしまい、色や階調のつぶれが生じてしまう。例えば色調整前は類似した色によるグラデーションが表現されていた部分が色域外郭の単一色で再現されてしまうなどといった不具合が生じる場合もある。   Such a color outside the color gamut is not reproduced when output by an output device, for example. Alternatively, color gamut compression processing is performed so that the color is in a reproducible color gamut and output. As a result, the optimum target color and the color in the vicinity thereof are reproduced by the color of the color gamut outline, and the color and gradation are crushed. For example, there may be a problem that a portion where gradation of similar colors is expressed before color adjustment is reproduced with a single color outside the color gamut.

この第5の実施の形態では、色域を考慮した最適目標色の算出方法を説明する。なお、この第5の実施の形態では最適目標色算出部13の動作が異なるのみであり、構成は上述第1〜4の実施の形態と同様であるので、ここではブロック図等の図示を省略する。   In the fifth embodiment, a method for calculating the optimum target color in consideration of the color gamut will be described. In the fifth embodiment, only the operation of the optimum target color calculation unit 13 is different, and the configuration is the same as in the first to fourth embodiments. To do.

図14は、本発明の第5の実施の形態において色域内の最適目標色を求める処理の一例の説明図である。上述の第1〜3の実施の形態により算出された最適目標色が色域外である場合には、代表色と目標色(または代表色と色域外となった最適目標色)との間で、色域内となる最適目標色の探索を行う。探索方法は任意であり、例えば二分探索法などを用いることができる。もちろん、上述の第3の実施の形態のように明度調整を行っても良い。   FIG. 14 is an explanatory diagram showing an example of a process for obtaining the optimum target color in the color gamut according to the fifth embodiment of the present invention. When the optimum target color calculated by the above first to third embodiments is out of the color gamut, between the representative color and the target color (or the representative color and the optimum target color outside the color gamut), The optimum target color that falls within the color gamut is searched. The search method is arbitrary, and for example, a binary search method can be used. Of course, brightness adjustment may be performed as in the third embodiment described above.

図14では色域内の最適目標色として、色域外郭上の色を探索した例を示している。しかし、第4の実施の形態における選択的色調整部42が色調整を行う際に、代表色以外の代表色近傍の色についても最適目標色の近傍の色に調整する場合、最適目標色は色域内であっても、その近傍の色が色域外となってしまう場合も考えられる。その場合には、最適目標色の近傍の調整された色も色域内となるように、最適目標色を色域外郭よりも内側に設定するとよい。その場合の例を次に示す。   FIG. 14 shows an example of searching for a color on the color gamut outline as the optimum target color in the color gamut. However, when the selective color adjustment unit 42 in the fourth embodiment performs color adjustment, when the color near the representative color other than the representative color is also adjusted to a color near the optimum target color, the optimum target color is Even within the color gamut, there may be a case where a color in the vicinity of the color gamut is out of the color gamut. In that case, the optimum target color may be set inside the color gamut outline so that the adjusted color in the vicinity of the optimum target color is also in the color gamut. An example in that case is shown below.

図15は、本発明の第5の実施の形態において色域内の最適目標色を求める処理の別の例の説明図である。ここでは、第4の実施の形態における選択的色調整部42における色調整を、特願2002−275821号に記載されている方法で行った場合について示している。特願2002−275821号に記載されている方法では、移動元となる代表色を含む部分空間と移動先となる最適目標色を含む部分空間を含むカプセル体を考え、そのカプセル体の中で連続性を維持し、色の逆転が発生しないように、移動元から移動先へ向けた調整を行っている。図15においては、太線によって移動対象となるカプセル体領域の外形を示している。   FIG. 15 is an explanatory diagram of another example of the process for obtaining the optimum target color in the color gamut according to the fifth embodiment of the present invention. Here, a case where the color adjustment in the selective color adjustment unit 42 in the fourth embodiment is performed by the method described in Japanese Patent Application No. 2002-275821 is shown. In the method described in Japanese Patent Application No. 2002-275821, a capsule body including a partial space including a representative color serving as a movement source and a partial space including an optimum target color serving as a movement destination is considered. The adjustment from the movement source to the movement destination is performed so that the color is maintained and color reversal does not occur. In FIG. 15, the outline of the capsule region to be moved is indicated by a bold line.

このような色調整を行う場合、カプセル体領域の一部でも色域外となると、その部分での色のつぶれが発生することになる。従って、上述の第1〜3の実施の形態のようにして求めた最適目標色から決定されるカプセル体領域の一部でも色域外となる場合には、そのカプセル体領域全体が色域内となるように、移動先である最適目標色を修正すればよい。この場合の最適目標色の修正も、探索によって行うことができる。探索は、上述のように例えば代表色と目標色、または代表色と上述の第1〜3の実施の形態のようにして求めた最適目標色との間で行えばよい。このとき、求めるべき最適目標色とカプセル体領域の外郭との距離h以上、色域の外郭よりも内側にしなければならない。これは、求めるべき最適目標色と色域外郭との距離をDとするとき、h≦Dなる条件で表すことができ、探索の際にはこの条件を追加して探索を行えばよい。なお、探索に用いる手法は任意であり、上述のように二分探索法などを用いることができる。   When performing such color adjustment, if even a part of the capsule body region is out of the color gamut, color collapse occurs in that part. Therefore, when even a part of the capsule body area determined from the optimum target color obtained as in the first to third embodiments is out of the color gamut, the entire capsule body area is in the color gamut. In this way, the optimum target color that is the movement destination may be corrected. In this case, the correction of the optimum target color can also be performed by searching. The search may be performed, for example, between the representative color and the target color, or between the representative color and the optimum target color obtained as in the first to third embodiments as described above. At this time, it must be inside the outline of the color gamut by a distance h or more between the optimum target color to be obtained and the outline of the capsule body area. This can be expressed by the condition of h ≦ D, where D is the distance between the optimum target color to be obtained and the color gamut outline, and the search may be performed by adding this condition. Note that the method used for the search is arbitrary, and the binary search method or the like can be used as described above.

上述の例では、例えば上述の第4の実施の形態における選択的色調整部42で用いる調整方法として特願2002−275821号に記載されている方法を用いるものとして説明した。しかし、本発明はこの方法に限られるものではなく、種々の公知の選択的な色調整方法を適用することができ、その場合も同様に色域内の最適目標色を算出することができる。   In the above-described example, for example, the method described in Japanese Patent Application No. 2002-275821 has been described as the adjustment method used in the selective color adjustment unit 42 in the fourth embodiment described above. However, the present invention is not limited to this method, and various known selective color adjustment methods can be applied. In this case as well, the optimum target color within the color gamut can be calculated.

上述のようにして色域内の最適目標色を求め、選択的色調整を行ったカラー画像は、出力デバイスなどに出力され、カラー画像が出力されることになる。最適目標色を算出する際の色域は、色調整を行う色空間と、選択的色調整後のカラー画像を出力する出力デバイスとの対応関係が分かれば求めることができ、求めた色域を使用して色域内の最適目標色を求めればよい。例えば、調整を行う色空間がYCbCr色空間で、出力デバイスがRGB色空間であるとすると、RGB色空間→YCbCr色空間への変換行列の逆変換行列を用いて、探索時のYCbCr色空間の色が、RGB空間で色域内であるか否かを調べればよい。   The color image obtained by obtaining the optimum target color in the color gamut and performing the selective color adjustment as described above is output to an output device or the like, and the color image is output. The color gamut for calculating the optimal target color can be determined if the correspondence between the color space for color adjustment and the output device that outputs the color image after selective color adjustment is known. The optimum target color within the color gamut can be obtained by using it. For example, if the color space to be adjusted is the YCbCr color space and the output device is the RGB color space, the inverse conversion matrix of the conversion matrix from the RGB color space to the YCbCr color space is used to search for the YCbCr color space at the time of search. It may be checked whether the color is in the color gamut in the RGB space.

このようにして色域内の最適目標色を求め、その最適目標色を用いて選択的色調整を行うことによって、色域内の色に調整することができる。従って、色のつぶれ等が発生せず、良好な色再現が可能となる。   In this way, by obtaining the optimum target color within the color gamut and performing selective color adjustment using the optimum target color, the color within the color gamut can be adjusted. Accordingly, color collapse or the like does not occur, and good color reproduction is possible.

図16は、本発明の色処理装置の機能または色処理方法をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体の一例の説明図である。図中、101はプログラム、102はコンピュータ、111は光磁気ディスク、112は光ディスク、113は磁気ディスク、114はメモリ、121は光磁気ディスク装置、122は光ディスク装置、123は磁気ディスク装置である。   FIG. 16 is an explanatory diagram of an example of a computer program and a storage medium storing the computer program when the function or the color processing method of the color processing apparatus of the present invention is realized by the computer program. In the figure, 101 is a program, 102 is a computer, 111 is a magneto-optical disk, 112 is an optical disk, 113 is a magnetic disk, 114 is a memory, 121 is a magneto-optical disk apparatus, 122 is an optical disk apparatus, and 123 is a magnetic disk apparatus.

上述の本発明の各実施の形態で説明した機能は、コンピュータにより実行可能なプログラム101によっても実現することが可能である。その場合、そのプログラム101およびそのプログラムが用いるデータなどは、コンピュータが読み取り可能な記憶媒体に記憶することも可能である。記憶媒体とは、コンピュータのハードウェア資源に備えられている読取装置に対して、プログラムの記述内容に応じて、磁気、光、電気等のエネルギーの変化状態を引き起こして、それに対応する信号の形式で、読取装置にプログラムの記述内容を伝達できるものである。例えば、光磁気ディスク111,光ディスク112(CDやDVDなどを含む)、磁気ディスク113,メモリ114(ICカード、メモリカードなどを含む)等である。もちろんこれらの記憶媒体は、可搬型に限られるものではない。   The functions described in the above embodiments of the present invention can also be realized by a program 101 that can be executed by a computer. In that case, the program 101 and data used by the program can be stored in a computer-readable storage medium. A storage medium is a signal format that causes a state of change in energy such as magnetism, light, electricity, etc. according to the description of a program to a reader provided in the hardware resources of a computer. Thus, the description content of the program can be transmitted to the reading device. For example, a magneto-optical disk 111, an optical disk 112 (including a CD and a DVD), a magnetic disk 113, a memory 114 (including an IC card and a memory card), and the like. Of course, these storage media are not limited to portable types.

これらの記憶媒体にプログラム101を格納しておき、例えばコンピュータ102の光磁気ディスク装置121,光ディスク装置122,磁気ディスク装置123,あるいは図示しないメモリスロットにこれらの記憶媒体を装着することによって、コンピュータからプログラム101を読み出し、本発明の色処理装置の機能または色処理方法を実行することができる。あるいは、予め記憶媒体をコンピュータ102に装着しておき、例えばネットワークなどを介してプログラム101をコンピュータ102に転送し、記憶媒体にプログラム101を格納して実行させてもよい。なお、本発明の一部の機能についてハードウェアによって構成することもできるし、あるいは、すべてをハードウェアで構成してもよい。   By storing the program 101 in these storage media and mounting these storage media in, for example, the magneto-optical disk device 121, optical disk device 122, magnetic disk device 123, or memory slot (not shown) of the computer 102, the computer 101 The program 101 can be read to execute the function or color processing method of the color processing apparatus of the present invention. Alternatively, a storage medium may be attached to the computer 102 in advance, and the program 101 may be transferred to the computer 102 via a network, for example, and the program 101 may be stored and executed on the storage medium. It should be noted that some of the functions of the present invention may be configured by hardware, or all may be configured by hardware.

本発明の第1の実施の形態を示すブロック図である。It is a block diagram which shows the 1st Embodiment of this invention. 本発明の第2の実施の形態を示すブロック図である。It is a block diagram which shows the 2nd Embodiment of this invention. 色調整距離と最適距離係数及び最適距離の関係の一例を示すグラフである。It is a graph which shows an example of the relationship between a color adjustment distance, an optimal distance coefficient, and an optimal distance. 最適目標色の一例の説明図である。It is explanatory drawing of an example of an optimal target color. 色調整距離と最適距離係数及び最適距離の関係の別の例を示すグラフである。It is a graph which shows another example of the relationship between a color adjustment distance, the optimal distance coefficient, and the optimal distance. 最適目標色の別の例の説明図である。It is explanatory drawing of another example of an optimal target color. 本発明の第3の実施の形態を示すブロック図である。It is a block diagram which shows the 3rd Embodiment of this invention. 明度が低下する場合の一例の説明図である。It is explanatory drawing of an example in case the brightness falls. 代表色の明度と明度調整係数との関係の一例を示すグラフである。It is a graph which shows an example of the relationship between the brightness of a representative color, and a brightness adjustment coefficient. 本発明の第3の実施の形態において出力される最適目標色の一例の説明図である。It is explanatory drawing of an example of the optimal target color output in the 3rd Embodiment of this invention. 代表色の明度と明度調整係数との関係の別の例を示すグラフである。It is a graph which shows another example of the relationship between the brightness of a representative color, and a brightness adjustment coefficient. 本発明の第4の実施の形態を示すブロック図である。It is a block diagram which shows the 4th Embodiment of this invention. 最適目標色が色域外となる場合の色再現の一例の説明図である。It is explanatory drawing of an example of color reproduction in case an optimal target color becomes out of a color gamut. 本発明の第5の実施の形態において色域内の最適目標色を求める処理の一例の説明図である。It is explanatory drawing of an example of the process which calculates | requires the optimal target color in a color gamut in the 5th Embodiment of this invention. 本発明の第5の実施の形態において色域内の最適目標色を求める処理の別の例の説明図である。It is explanatory drawing of another example of the process which calculates | requires the optimal target color in a color gamut in the 5th Embodiment of this invention. 本発明の色処理装置の機能または色処理方法をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体の一例の説明図である。It is explanatory drawing of an example of the storage medium which stored the computer program in the case of implement | achieving the function of the color processing apparatus or color processing method of this invention with a computer program, and the computer program.

符号の説明Explanation of symbols

11…代表色算出部、12…色調整距離算出部、13…最適目標色算出部、21…最適距離係数算出部、31…明度調整係数算出部、41…色処理部、42…選択的色調整部、101…プログラム、102…コンピュータ、111…光磁気ディスク、112…光ディスク、113…磁気ディスク、114…メモリ、121…光磁気ディスク装置、122…光ディスク装置、123…磁気ディスク装置。   DESCRIPTION OF SYMBOLS 11 ... Representative color calculation part, 12 ... Color adjustment distance calculation part, 13 ... Optimum target color calculation part, 21 ... Optimal distance coefficient calculation part, 31 ... Lightness adjustment coefficient calculation part, 41 ... Color processing part, 42 ... Selective color Adjustment unit, 101 ... program, 102 ... computer, 111 ... magneto-optical disk, 112 ... optical disk, 113 ... magnetic disk, 114 ... memory, 121 ... magneto-optical disk apparatus, 122 ... optical disk apparatus, 123 ... magnetic disk apparatus.

Claims (28)

カラー画像中の色調整の対象となる特定領域の色を調整する色処理方法において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と、前記特定領域で目標とする色を表す目標色とから、前記代表色と前記目標色との色空間上での距離である色調整距離を算出し、前記色調整距離が増加するに従い滑らかに減少、または、前記色調整距離が増加するに従い滑らかに増減する関数に従って、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出し、前記最適距離係数と前記目標色及び前記代表色を用いて前記最適目標色を算出することを特徴とする色処理方法。   In a color processing method for adjusting a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image, and a target color in the specific area A color adjustment distance, which is a distance in the color space between the representative color and the target color, is calculated from the target color representing the color and decreases smoothly as the color adjustment distance increases, or the color adjustment distance is According to a function that increases or decreases smoothly as it increases, an optimum distance coefficient for calculating an optimum target color representing the color of the specific area after color adjustment is calculated from the color adjustment distance, and the optimum distance coefficient and the target color and A color processing method comprising calculating the optimum target color using the representative color. カラー画像中の色調整の対象となる特定領域の色を調整する色処理方法において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と、前記特定領域で目標とする色を表す目標色とから、前記代表色と前記目標色との色空間上での距離である色調整距離を算出し、前記色調整距離が所定の値以下の場合は一定値で、所定の値より大きい場合は滑らかに増減する関数に従って、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出し、前記最適距離係数と前記目標色及び前記代表色を用いて前記最適目標色を算出することを特徴とする色処理方法。   In a color processing method for adjusting a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image, and a target color in the specific area A color adjustment distance that is a distance in the color space between the representative color and the target color is calculated from a target color that represents the color, and when the color adjustment distance is equal to or less than a predetermined value, the color adjustment distance is a constant value. If larger, an optimum distance coefficient for calculating an optimum target color representing the color of the specific region after color adjustment is calculated from the color adjustment distance according to a function that smoothly increases or decreases, and the optimum distance coefficient and the target color And calculating the optimal target color using the representative color. カラー画像中の色調整の対象となる特定領域の色を調整する色処理方法において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と、前記特定領域で目標とする色を表す目標色とから、前記代表色と前記目標色との色空間上での距離である色調整距離を算出し、前記色調整距離が増加するに従い滑らかに減少、または、前記色調整距離が増加するに従い滑らかに増減する関数に従って、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出し、前記代表色から前記最適目標色の明度の調整を行うための明度調整係数を前記代表色の明度が大きいときに小さい値となる関数に従って算出し、前記最適距離係数と前記明度調整係数と前記目標色及び前記代表色を用いて前記最適目標色を算出することを特徴とする色処理方法。   In a color processing method for adjusting a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image, and a target color in the specific area A color adjustment distance, which is a distance in the color space between the representative color and the target color, is calculated from the target color representing the color and decreases smoothly as the color adjustment distance increases, or the color adjustment distance is According to a function that increases or decreases smoothly as the number increases, an optimum distance coefficient for calculating an optimum target color representing the color of the specific area after color adjustment is calculated from the color adjustment distance, and the optimum target color is calculated from the representative color. A lightness adjustment coefficient for adjusting the lightness is calculated according to a function that becomes a small value when the lightness of the representative color is large, and the optimal distance coefficient, the lightness adjustment coefficient, the target color, and the representative color are used to calculate the lightness adjustment coefficient. Optimal Color processing method characterized by calculating a target color. カラー画像中の色調整の対象となる特定領域の色を調整する色処理方法において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と、前記特定領域で目標とする色を表す目標色とから、前記代表色と前記目標色との色空間上での距離である色調整距離を算出し、前記色調整距離が所定の値以下の場合は一定値で、所定の値より大きい場合は滑らかに増減する関数に従って、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を前記色調整距離が大きいときに小さい値となる関数に従って算出し、前記代表色から前記最適目標色の明度の調整を行うための明度調整係数を前記代表色の明度が大きいときに小さい値となる関数に従って算出し、前記最適距離係数と前記明度調整係数と前記目標色及び前記代表色を用いて前記最適目標色を算出することを特徴とする色処理方法。   In a color processing method for adjusting a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image, and a target color in the specific area A color adjustment distance, which is a distance in the color space between the representative color and the target color, is calculated from a target color representing the color, and when the color adjustment distance is equal to or less than a predetermined value, a constant value If the color adjustment distance is larger, the optimum distance coefficient for calculating the optimum target color representing the color of the specific area after color adjustment from the color adjustment distance according to a function that smoothly increases or decreases is set to a small value when the color adjustment distance is large. A lightness adjustment coefficient for adjusting the lightness of the optimum target color from the representative color is calculated according to a function that takes a small value when the lightness of the representative color is large, and the optimum distance coefficient and the Lightness adjustment factor The color processing method and calculates the optimum target color using the target color and the representative color. 前記明度調整係数の算出の際に、前記代表色の彩度または色相に応じて前記明度調整係数の変化の度合いを変えることを特徴とする請求項3または請求項4に記載の色処理方法。   5. The color processing method according to claim 3, wherein when the brightness adjustment coefficient is calculated, a degree of change in the brightness adjustment coefficient is changed according to a saturation or a hue of the representative color. 前記目標色は、与えられた1色、または、複数の色から選択された1色、または、所定の色成分比を有する色であることを特徴とする請求項1ないし請求項5のいずれか1項に記載の色処理方法。   6. The target color according to claim 1, wherein the target color is a given color, a single color selected from a plurality of colors, or a color having a predetermined color component ratio. 2. The color processing method according to item 1. 前記目標色は、前記代表色の色成分比と同じ色成分比を有する色であることを特徴とする請求項1ないし請求項5のいずれか1項に記載の色処理方法。   6. The color processing method according to claim 1, wherein the target color is a color having the same color component ratio as the color component ratio of the representative color. さらに、前記最適目標色に向かって前記特定領域の色の調整を行うことを特徴とする請求項1ないし請求項7のいずれか1項に記載の色処理方法。   The color processing method according to claim 1, further comprising adjusting the color of the specific area toward the optimum target color. 前記最適目標色は、色調整を行う色空間の色域内となるように算出することを特徴とする請求項1ないし請求項7のいずれか1項に記載の色処理方法。   The color processing method according to claim 1, wherein the optimum target color is calculated so as to be within a color gamut of a color space in which color adjustment is performed. 前記最適目標色は、前記代表色と前記目標色との間で探索を行うことによって、色調整を行う色空間の色域内となるように算出することを特徴とする請求項1ないし請求項7のいずれか1項に記載の色処理方法。   8. The optimal target color is calculated so as to be within a color gamut of a color space in which color adjustment is performed by searching between the representative color and the target color. The color processing method according to any one of the above. 前記最適目標色は、前記カラー画像を再現するデバイスにおける色空間の色域内となるように算出することを特徴とする請求項1ないし請求項7のいずれか1項に記載の色処理方法。   The color processing method according to claim 1, wherein the optimum target color is calculated so as to be within a color gamut of a color space in a device that reproduces the color image. 前記最適目標色は、前記代表色と前記目標色との間で探索を行うことによって、前記カラー画像を再現するデバイスにおける色空間の色域内となるように算出することを特徴とする請求項1ないし請求項7のいずれか1項に記載の色処理方法。   The optimal target color is calculated so as to be within a color gamut of a color space in a device that reproduces the color image by performing a search between the representative color and the target color. The color processing method according to claim 7. 前記最適目標色は、該最適目標色に向かって前記特定領域の色の調整を行ったときに調整後の色が前記色域内となるように算出し、該最適目標色に向かって前記特定領域の色の調整を行うことを特徴とする請求項9ないし請求項12のいずれか1項に記載の色処理方法。   The optimal target color is calculated so that the color after adjustment is within the color gamut when the color of the specific area is adjusted toward the optimal target color, and the specific area toward the optimal target color is calculated. The color processing method according to claim 9, wherein the color is adjusted. カラー画像中の色調整の対象となる特定領域の色を調整する色処理装置において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と前記特定領域で目標とする色を表す目標色とから前記代表色と前記目標色との色空間上の距離である色調整距離を算出する色調整距離算出手段と、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出する最適距離係数算出手段と、前記最適距離係数と前記目標色及び前記代表色を用いて前記最適目標色を算出する最適目標色算出手段を備え、最適距離係数算出手段は、前記色調整距離が増加するに従い滑らかに減少、または、前記色調整距離が増加するに従い滑らかに増減する関数に従って前記最適距離係数を算出することを特徴とする色処理装置。   In a color processing apparatus that adjusts a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image and a target color in the specific area A color adjustment distance calculating means for calculating a color adjustment distance that is a distance in the color space between the representative color and the target color from the target color to be expressed, and a color of the specific area after the color adjustment from the color adjustment distance An optimum distance coefficient calculating means for calculating an optimum distance coefficient for calculating an optimum target color; and an optimum target color calculating means for calculating the optimum target color using the optimum distance coefficient, the target color, and the representative color. The optimum distance coefficient calculating means calculates the optimum distance coefficient according to a function that decreases smoothly as the color adjustment distance increases, or smoothly increases or decreases as the color adjustment distance increases. Management apparatus. カラー画像中の色調整の対象となる特定領域の色を調整する色処理装置において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と前記特定領域で目標とする色を表す目標色とから前記代表色と前記目標色との色空間上の距離である色調整距離を算出する色調整距離算出手段と、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出する最適距離係数算出手段と、前記最適距離係数と前記目標色及び前記代表色を用いて前記最適目標色を算出する最適目標色算出手段を備え、最適距離係数算出手段は、前記色調整距離が所定の値以下の場合は一定値で、所定の値より大きい場合は滑らかに増減する関数に従って前記最適距離係数を算出することを特徴とする色処理装置。   In a color processing apparatus that adjusts a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image and a target color in the specific area A color adjustment distance calculating means for calculating a color adjustment distance that is a distance in the color space between the representative color and the target color from the target color to be expressed, and a color of the specific area after the color adjustment from the color adjustment distance An optimum distance coefficient calculating means for calculating an optimum distance coefficient for calculating an optimum target color; and an optimum target color calculating means for calculating the optimum target color using the optimum distance coefficient, the target color, and the representative color. The optimum distance coefficient calculating means calculates the optimum distance coefficient according to a function that is constant when the color adjustment distance is less than or equal to a predetermined value and smoothly increases or decreases when the color adjustment distance is greater than the predetermined value. Processing equipment. カラー画像中の色調整の対象となる特定領域の色を調整する色処理装置において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と前記特定領域で目標とする色を表す目標色とから前記代表色と前記目標色との距離である色調整距離を算出する色調整距離算出手段と、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出する最適距離係数算出手段と、前記代表色から前記最適目標色の明度の調整を行うための明度調整係数を前記代表色の明度が大きいときに小さい値となる関数に従って算出する明度調整係数算出手段と、前記最適距離係数と前記明度調整係数と前記目標色及び前記代表色を用いて前記最適目標色を算出する最適目標色算出手段を備え、最適距離係数算出手段は、前記色調整距離が増加するに従い滑らかに減少、または、前記色調整距離が増加するに従い滑らかに増減する関数に従って前記最適距離係数を算出することを特徴とする色処理装置。   In a color processing apparatus that adjusts a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image and a target color in the specific area A color adjustment distance calculating means for calculating a color adjustment distance that is a distance between the representative color and the target color from the target color to be expressed, and an optimum target color representing the color of the specific area after color adjustment from the color adjustment distance. The optimum distance coefficient calculating means for calculating the optimum distance coefficient for calculation, and the brightness adjustment coefficient for adjusting the brightness of the optimum target color from the representative color are small values when the brightness of the representative color is large. A brightness adjustment coefficient calculating means for calculating according to a function; and an optimum target color calculating means for calculating the optimum target color using the optimum distance coefficient, the brightness adjustment coefficient, the target color and the representative color, and calculating an optimum distance coefficient Stage, smoothly decreases, or the color processing unit and calculates the optimal distance coefficient according smoothly increase or decrease the function in accordance with the color adjustment distance increases in accordance with the color adjustment distance increases. カラー画像中の色調整の対象となる特定領域の色を調整する色処理装置において、前記カラー画像の中で前記特定領域の代表となる色を表す代表色と前記特定領域で目標とする色を表す目標色とから前記代表色と前記目標色との距離である色調整距離を算出する色調整距離算出手段と、前記色調整距離から色調整後の前記特定領域の色を表す最適目標色を算出するための最適距離係数を算出する最適距離係数算出手段と、前記代表色から前記最適目標色の明度の調整を行うための明度調整係数を前記代表色の明度が大きいときに小さい値となる関数に従って算出する明度調整係数算出手段と、前記最適距離係数と前記明度調整係数と前記目標色及び前記代表色を用いて前記最適目標色を算出する最適目標色算出手段を備え、最適距離係数算出手段は、前記色調整距離が所定の値以下の場合は一定値で、所定の値より大きい場合は滑らかに増減する関数に従って前記最適距離係数を算出するたことを特徴とする色処理装置。   In a color processing apparatus that adjusts a color of a specific area that is a target of color adjustment in a color image, a representative color that represents a color that is representative of the specific area in the color image and a target color in the specific area A color adjustment distance calculating means for calculating a color adjustment distance that is a distance between the representative color and the target color from the target color to be expressed, and an optimum target color representing the color of the specific area after color adjustment from the color adjustment distance. The optimum distance coefficient calculating means for calculating the optimum distance coefficient for calculation, and the brightness adjustment coefficient for adjusting the brightness of the optimum target color from the representative color are small values when the brightness of the representative color is large. A brightness adjustment coefficient calculating means for calculating according to a function; and an optimum target color calculating means for calculating the optimum target color using the optimum distance coefficient, the brightness adjustment coefficient, the target color and the representative color, and calculating an optimum distance coefficient Stage, a constant value if the color adjustment distance is equal to or less than a predetermined value, the color processing apparatus is characterized in that calculating the optimum distance factor in accordance with a function greater than a predetermined value that increases or decreases smoothly. 前記明度調整係数算出手段は、前記代表色の彩度または色相に応じて前記明度調整係数の変化の度合いを変えて前記明度調整係数を算出することを特徴とする請求項16または請求項17に記載の色処理装置。   The brightness adjustment coefficient calculating unit calculates the brightness adjustment coefficient by changing a degree of change of the brightness adjustment coefficient according to a saturation or a hue of the representative color. The color processing apparatus as described. 前記目標色は、与えられた1色、または、複数の色から選択された1色、または、所定の色成分比を有する色であることを特徴とする請求項14ないし請求項18のいずれか1項に記載の色処理装置。   19. The target color according to claim 14, wherein the target color is a given color, a single color selected from a plurality of colors, or a color having a predetermined color component ratio. Item 1. A color processing apparatus according to item 1. 前記目標色は、前記代表色の色成分比と同じ色成分比を有する色であることを特徴とする請求項14ないし請求項18のいずれか1項に記載の色処理装置。   The color processing apparatus according to claim 14, wherein the target color is a color having the same color component ratio as the color component ratio of the representative color. さらに、前記最適目標色に向かって前記特定領域の色の調整を行う色調整手段を有することを特徴とする請求項14ないし請求項20のいずれか1項に記載の色処理装置。   21. The color processing apparatus according to claim 14, further comprising color adjustment means for adjusting the color of the specific area toward the optimum target color. 前記最適目標色算出手段は、色調整を行う色空間の色域内となるように前記最適目標色を算出することを特徴とする請求項14ないし請求項20のいずれか1項に記載の色処理装置。   The color processing according to any one of claims 14 to 20, wherein the optimum target color calculation means calculates the optimum target color so as to be within a color gamut of a color space in which color adjustment is performed. apparatus. 前記最適目標色算出手段は、前記代表色と前記目標色との間で探索を行うことによって、色調整を行う色空間の色域内となるように前記最適目標色を算出することを特徴とする請求項14ないし請求項20のいずれか1項に記載の色処理装置。   The optimum target color calculation means calculates the optimum target color so as to be within a color gamut of a color space for color adjustment by performing a search between the representative color and the target color. The color processing apparatus according to any one of claims 14 to 20. 前記最適目標色算出手段は、前記カラー画像を再現するデバイスにおける色空間の色域内となるように前記最適目標色を算出することを特徴とする請求項14ないし請求項20のいずれか1項に記載の色処理装置。   21. The optimal target color calculation unit calculates the optimal target color so as to be within a color gamut of a color space in a device that reproduces the color image. The color processing apparatus as described. 前記最適目標色算出手段は、前記代表色と前記目標色との間で探索を行うことによって、前記カラー画像を再現するデバイスにおける色空間の色域内となるように前記最適目標色を算出することを特徴とする請求項14ないし請求項20のいずれか1項に記載の色処理装置。   The optimum target color calculation means calculates the optimum target color so as to be within a color gamut of a color space in a device that reproduces the color image by performing a search between the representative color and the target color. The color processing apparatus according to claim 14, wherein the color processing apparatus is a color processing apparatus. さらに、前記最適目標色に向かって前記特定領域の色の調整を行う色調整手段を有し、前記最適目標色算出手段は、前記色調整手段で前記最適目標色に向かって前記特定領域の色の調整を行ったときに前記特定領域の調整後の色が前記色域内となるように前記最適目標色を算出することを特徴とする請求項22ないし請求項25のいずれか1項に記載の色処理装置。   Furthermore, it has a color adjustment means for adjusting the color of the specific area toward the optimal target color, and the optimal target color calculation means is a color of the specific area toward the optimal target color by the color adjustment means. 26. The optimal target color is calculated so that the adjusted color of the specific area falls within the color gamut when the adjustment is performed. Color processing device. カラー画像中の色調整の対象となる特定領域の色を調整する色処理をコンピュータに実行させる色処理プログラムであって、請求項1ないし請求項13のいずれか1項に記載の色処理方法をコンピュータに実行させることを特徴とする色処理プログラム。   14. A color processing program for causing a computer to execute color processing for adjusting a color of a specific area to be subjected to color adjustment in a color image, wherein the color processing method according to claim 1 is performed. A color processing program executed by a computer. カラー画像中の色調整の対象となる特定領域の色を調整する色処理をコンピュータに実行させるプログラムを格納したコンピュータが読取可能な記憶媒体において、請求項1ないし請求項13のいずれか1項に記載の色処理方法をコンピュータに実行させるプログラムを格納したことを特徴とする記憶媒体。   14. A computer-readable storage medium storing a program for causing a computer to execute color processing for adjusting a color of a specific area to be subjected to color adjustment in a color image, according to any one of claims 1 to 13. A storage medium storing a program for causing a computer to execute the described color processing method.
JP2004022179A 2003-01-31 2004-01-29 Color processing method, color processing apparatus, color processing program, and storage medium Expired - Fee Related JP4314473B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004022179A JP4314473B2 (en) 2003-01-31 2004-01-29 Color processing method, color processing apparatus, color processing program, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003023565 2003-01-31
JP2004022179A JP4314473B2 (en) 2003-01-31 2004-01-29 Color processing method, color processing apparatus, color processing program, and storage medium

Publications (2)

Publication Number Publication Date
JP2004254303A JP2004254303A (en) 2004-09-09
JP4314473B2 true JP4314473B2 (en) 2009-08-19

Family

ID=33032253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004022179A Expired - Fee Related JP4314473B2 (en) 2003-01-31 2004-01-29 Color processing method, color processing apparatus, color processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP4314473B2 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4006431B2 (en) 2004-10-28 2007-11-14 キヤノン株式会社 Image processing method and image processing apparatus
KR100714395B1 (en) 2005-02-22 2007-05-04 삼성전자주식회사 Apparatus for adjusting color of input image selectively and method the same
KR100784177B1 (en) 2005-12-30 2007-12-11 엠텍비젼 주식회사 Display apparatus and image processor for adjusting specific color field and contorl method therefor
JP2008306377A (en) 2007-06-06 2008-12-18 Fuji Xerox Co Ltd Color adjusting device, and color adjusting program
US8428351B2 (en) 2008-12-24 2013-04-23 Brother Kogyo Kabushiki Kaisha Image processing device
JP4743271B2 (en) * 2008-12-24 2011-08-10 ブラザー工業株式会社 Image processing apparatus and image processing program
JP2010154009A (en) 2008-12-24 2010-07-08 Brother Ind Ltd Image processing unit and image processing program
JP4784642B2 (en) * 2008-12-24 2011-10-05 ブラザー工業株式会社 Image processing apparatus and image processing program
JP4930503B2 (en) 2008-12-25 2012-05-16 ブラザー工業株式会社 Image processing apparatus and image processing program
JP5867669B2 (en) * 2011-02-22 2016-02-24 富士ゼロックス株式会社 Color processing apparatus and color processing program
JP5799634B2 (en) * 2011-07-22 2015-10-28 株式会社リコー Image processing apparatus and image processing system

Also Published As

Publication number Publication date
JP2004254303A (en) 2004-09-09

Similar Documents

Publication Publication Date Title
US7623704B2 (en) Color processing method, color processing apparatus, and storage medium
US7310167B2 (en) Color converting device emphasizing a contrast of output color data corresponding to a black character
CN101360179B (en) Image processing device and method
JP5032911B2 (en) Image processing apparatus and image processing method
KR101954851B1 (en) Metadata-based image processing method and apparatus
AU2002300994B2 (en) Method and Apparatus for Processing Image Data, Storage Medium and Program
US6814420B2 (en) Image processing method and apparatus, storage medium and program
US7555140B2 (en) Image processing using object information
EP1933274B1 (en) System, medium, and method with noise reducing adaptive saturation adjustment
US20060029287A1 (en) Noise reduction apparatus and method
JP2001216498A (en) Method and device for processing image signal and medium with recorded image signal processing program
JP4314473B2 (en) Color processing method, color processing apparatus, color processing program, and storage medium
JP4428742B2 (en) Image processing apparatus and method
JP4393491B2 (en) Image processing apparatus and control method thereof
US20080062484A1 (en) Image processing device and image processing method
US20100328343A1 (en) Image signal processing device and image signal processing program
US8498332B2 (en) Chroma supression features
US7315397B2 (en) Image processing with conversion of non-linear to linear conversion
JP4359730B2 (en) Monotone conversion apparatus, monotone conversion method, and medium recording monotone conversion program
JP2004112494A (en) Image processor, image processing method and recording medium
JP4848903B2 (en) Color processing apparatus, color processing method, and program
JP2006203571A (en) Imaging apparatus, image processing apparatus, and image recording apparatus
KR100537509B1 (en) Method and apparatus for enhancing quality of color image adaptively
JP4224933B2 (en) Image processing method, image processing apparatus, and recording medium on which image processing program is recorded
JP2005260404A (en) Image processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080922

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081001

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081126

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090422

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090505

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120529

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120529

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130529

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140529

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees