JP2010074317A - Image processor, image processing program, and image processing method - Google Patents
Image processor, image processing program, and image processing method Download PDFInfo
- Publication number
- JP2010074317A JP2010074317A JP2008237201A JP2008237201A JP2010074317A JP 2010074317 A JP2010074317 A JP 2010074317A JP 2008237201 A JP2008237201 A JP 2008237201A JP 2008237201 A JP2008237201 A JP 2008237201A JP 2010074317 A JP2010074317 A JP 2010074317A
- Authority
- JP
- Japan
- Prior art keywords
- hue
- lookup table
- pixel
- image data
- mapping
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、入力画像データから、出力装置で出力可能な出力画像データに変換する画像処理装置、画像処理プログラム、及び画像処理方法に関するものである。 The present invention relates to an image processing device, an image processing program, and an image processing method for converting input image data into output image data that can be output by an output device.
スキャナやデジタルカメラ等のカラー画像入力装置からの入力データやコンピュータを用いて作成したドキュメントデータを、電子写真プロセスやインクジェット方式を用いた画像形成装置等のカラー画像出力装置にて印字出力する場合、通常、入力画像の色再現範囲(以下、入力ガマットと称す)とカラー画像出力装置の色再現範囲(以下、出力ガマットと称す)とは異なる。このため、複数の機器を通じてカラー画像を取り扱う際には、与えられたカラー画像信号を出力装置で再現可能な色にマッピングする技術、所謂ガマット処理と呼ばれる色変換処理を行うことが必要となる。 When printing out the input data from a color image input device such as a scanner or a digital camera or the document data created using a computer with a color image output device such as an image forming device using an electrophotographic process or an inkjet method, Usually, the color reproduction range of an input image (hereinafter referred to as input gamut) is different from the color reproduction range of a color image output device (hereinafter referred to as output gamut). For this reason, when a color image is handled through a plurality of devices, it is necessary to perform a technique for mapping a given color image signal to a color that can be reproduced by an output device, that is, a color conversion process called a gamut process.
従来のガマット処理技術に関して、例えば、特許文献1に記載された発明のように、入力信号値を出力信号値に変換する際に、プリンタのガマット形状を考慮して入力信号の色相を補正した後、色相補正後の色信号を色相一定にして出力デバイスのガマット外の色を、出力デバイスのガマット内にするガマット処理を行う方式が提案されている。この方式では、特に高彩度色を同一色相上の色に写像するよりも鮮やかな色に再現することが可能となり、ユーザーの期待した色に近い色再現を行うことができる。
Regarding conventional gamut processing technology, for example, after converting the input signal value to the output signal value after correcting the hue of the input signal in consideration of the gamut shape of the printer, as in the invention described in
しかしながら、全ての入力画像に対して上述したような同じ色変換パラメータを用いて色変換処理を行う方式は、全ての入力画像データに対して最適な出力結果を得ることができない。そのため、入力画像の色分布に応じて適応的にガマット処理を行う方式も提案されている。例えば、特許文献2では、入力画像の色分布に応じて、階調が潰れないように非線形圧縮の圧縮率とガマット・マッピングの方向とを制御している。
However, the method of performing color conversion processing using the same color conversion parameter as described above for all input images cannot obtain an optimal output result for all input image data. For this reason, a method of adaptively performing gamut processing according to the color distribution of the input image has been proposed. For example, in
しかしながら、特許文献2などで提案されている従来の画像適応ガマット処理は、入力画像データに対し等色相面上の色分布に応じたガマット・マッピング処理を行っているのみであり、色相補正については考慮されていない。そのため、高彩度色の色再現性を重視して色相を補正すると、同一色相上にあるプリンタ再現域内の色の色相までも変化してしまい色の忠実さが損なわれるという問題があった。逆に、色相を保存してガマット処理を行うと高彩度色がくすんでしまう場合があった。
However, the conventional image adaptive gamut processing proposed in
本発明は、上記に鑑みてなされたものであって、入力画像データの色分布に適したガマット処理を行う場合に、入力画像データの色相再現性と高彩度色の再現性を両立する画像処理装置、画像処理プログラム、及び画像処理方法を提供することを目的とする。 The present invention has been made in view of the above, and an image processing apparatus that achieves both hue reproducibility of input image data and high chroma color reproducibility when performing gamut processing suitable for the color distribution of the input image data. An object of the present invention is to provide an image processing program and an image processing method.
上述した課題を解決し、目的を達成するために、本発明にかかる画像処理装置は、入力画像データの各画素値を、出力装置で表現可能な画素値に変換する3次元ルックアップテーブルを参照して、入力画像データを出力画像データに変換する画像処理装置において、入力画像データを取得する取得手段と、前記入力画像データの画素毎に、3次元色空間上において、当該画素の画素値から、出力装置で出力可能な色の範囲を表した出力ガマット表面までの写像距離を算出する距離算出手段と、3次元ルックアップテーブルの格子点毎に、前記3次元色空間上で当該格子点に対応する所定の領域に含まれる前記画素毎の前記写像距離に基づいて、当該格子点の色相の補正量を特定する特定手段と、前記格子点毎に、前記補正量に基づいて補正された前記色相上で前記出力ガマット内の色データに写像する3次元ルックアップテーブルを生成する生成手段と、を備える。 In order to solve the above-described problems and achieve the object, the image processing apparatus according to the present invention refers to a three-dimensional lookup table that converts each pixel value of input image data into a pixel value that can be expressed by the output apparatus. Then, in the image processing apparatus for converting the input image data into the output image data, the acquisition means for acquiring the input image data, and the pixel value of the pixel in the three-dimensional color space for each pixel of the input image data A distance calculating means for calculating a mapping distance to the output gamut surface representing a range of colors that can be output by the output device, and a grid point on the three-dimensional color space for each grid point of the three-dimensional lookup table. Based on the mapping distance for each of the pixels included in the corresponding predetermined region, specifying means for specifying a hue correction amount for the grid point, and correction for each grid point based on the correction amount. And and a generating means for generating a 3-dimensional look-up table that maps the color data in the output gamut on the hue.
また、本発明にかかる画像処理プログラムは、入力画像データの各画素値を、出力装置で表現可能な画素値に変換する3次元ルックアップテーブルを参照して、入力画像データを出力画像データに変換する画像処理プログラムにおいて、入力画像データを取得する取得ステップと、前記入力画像データの画素毎に、3次元色空間上において、当該画素の画素値から、出力装置で出力可能な色の範囲を表した出力ガマット表面までの写像距離を算出する距離算出ステップと、3次元ルックアップテーブルの格子点毎に、前記3次元色空間上で当該格子点に対応する所定の領域に含まれる前記画素毎の前記写像距離に基づいて、当該格子点の色相の補正量を特定する特定ステップと、前記格子点毎に、前記補正量に基づいて補正された前記色相上で前記出力ガマット内の色データに写像する3次元ルックアップテーブルを生成する生成ステップと、をコンピュータに実行させる。 The image processing program according to the present invention converts input image data into output image data by referring to a three-dimensional lookup table that converts each pixel value of input image data into a pixel value that can be expressed by an output device. In the image processing program, an acquisition step of acquiring input image data, and for each pixel of the input image data, in a three-dimensional color space, a range of colors that can be output by the output device is represented from the pixel value of the pixel. A distance calculating step for calculating a mapping distance to the surface of the output gamut, and for each lattice point of the three-dimensional lookup table, for each pixel included in a predetermined region corresponding to the lattice point on the three-dimensional color space. A specifying step of specifying a hue correction amount of the grid point based on the mapping distance; and for each grid point on the hue corrected based on the correction amount To execute a generating step of generating a 3-dimensional look-up table that maps the color data in the output gamut, to a computer.
また、本発明にかかる画像処理方法は、画像処理装置で、入力画像データの各画素値を、出力装置で表現可能な画素値に変換する3次元ルックアップテーブルを参照して、入力画像データを出力画像データに変換する画像処理方法において、取得手段が、入力画像データを取得する取得ステップと、距離算出手段が、前記入力画像データの画素毎に、3次元色空間上において、当該画素の画素値から、出力装置で出力可能な色の範囲を表した出力ガマット表面までの写像距離を算出する距離算出ステップと、特定手段が、3次元ルックアップテーブルの格子点毎に、前記3次元色空間上で当該格子点に対応する所定の領域に含まれる前記画素毎の前記写像距離に基づいて、当該格子点の色相の補正量を特定する特定ステップと、生成手段が、前記格子点毎に、前記補正量に基づいて補正された前記色相上で前記出力ガマット内の色データに写像する3次元ルックアップテーブルを生成する生成ステップと、を有する。 The image processing method according to the present invention refers to a three-dimensional lookup table that converts each pixel value of input image data into a pixel value that can be expressed by the output device by the image processing apparatus, and converts the input image data In the image processing method for converting to output image data, an acquisition step in which the acquisition unit acquires the input image data, and a distance calculation unit includes a pixel of the pixel in the three-dimensional color space for each pixel of the input image data. A distance calculating step for calculating a mapping distance from the value to an output gamut surface representing a range of colors that can be output by the output device, and a specifying means for each grid point of the three-dimensional lookup table, the three-dimensional color space Based on the mapping distance for each of the pixels included in the predetermined region corresponding to the grid point above, a specifying step for specifying a correction amount of the hue of the grid point, and a generation unit, Each serial grid point, having: a generation step of generating a 3-dimensional look-up table that maps the color data in the output gamut on corrected said hue based on the correction amount.
本発明によれば、生成された3次元ルックアップテーブルを適用して入力画像データを出力画像データに変換することで、色相再現性と高彩度色の再現性とを両立できるという効果を奏する。 According to the present invention, by applying the generated three-dimensional lookup table and converting input image data to output image data, there is an effect that both hue reproducibility and high chroma color reproducibility can be achieved.
以下に添付図面を参照して、この発明にかかる画像処理装置、画像処理プログラム、及び画像処理方法の最良な実施の形態を詳細に説明する。本実施の形態では、画像処理装置に適用した例について説明するが、入力系カラー画像情報を出力系の色再現範囲内のカラー画像情報に変換する画像処理装置であれば良く、例えば、カラーファクシミリ、カラー・プリンタ、カラー複写機に適用しても良い。また、これら装置上で実行されるソフトウェアに適用しても良い。 Exemplary embodiments of an image processing apparatus, an image processing program, and an image processing method according to the present invention are explained in detail below with reference to the accompanying drawings. In this embodiment, an example applied to an image processing apparatus will be described. However, any image processing apparatus that converts input color image information into color image information within a color reproduction range of an output system may be used. The present invention may be applied to color printers and color copiers. Further, the present invention may be applied to software executed on these devices.
(第1の実施の形態)
図1は、第1の実施の形態にかかる画像処理システムの構成を示すブロック図である。図1に示すように、画像処理システムは、画像処理装置100と、画像入力装置150、コンピュータに接続されたディスプレイ120と、媒体駆動装置130、画像出力装置140と、で構成されている。
(First embodiment)
FIG. 1 is a block diagram illustrating a configuration of an image processing system according to the first embodiment. As shown in FIG. 1, the image processing system includes an image processing apparatus 100, an
まずは、従来から用いていたガマット・マッピングについて説明する。ところで、彩度、色相及び明度を3次元色空間の軸に割り当てた場合、入力色Tと、その対応色Mとの関係は3次元的な位置関係にある。そこで、3次元的な位置関係の説明を容易にするために3軸のうち2軸に絞って説明する。図2で入力色Tと、その対応色Mとの間の彩度と色相の関係図を示した。さらに、図3で、入力色Tと、その対応色Mとの間の明度と彩度の関係図を示した。但し、図3では、出力デバイスの色相hiにおける出力ガマット40と色相hoにおける出力ガマット41を同じ二次元上に重ねて図示した。また、色Toは、入力色Tと色位相が一定でマッピングした色とする。
First, gamut mapping that has been used conventionally will be described. By the way, when the saturation, hue, and brightness are assigned to the axes of the three-dimensional color space, the relationship between the input color T and the corresponding color M is a three-dimensional positional relationship. Therefore, in order to facilitate the description of the three-dimensional positional relationship, the description will be made focusing on two of the three axes. FIG. 2 shows a relationship between saturation and hue between the input color T and the corresponding color M. Further, FIG. 3 shows a relationship between lightness and saturation between the input color T and the corresponding color M. However, in FIG. 3, the
図2及び図3に示すように、入力色Tの同じ色相hi上でマッピングされているToと、入力色Tと異なる色相ho上の対応色Mとでは、入力色Tからの距離が短い対応色Mの方が、入力色Tに近い色となる。このように、入力色信号が出力装置の色再現域から離れている場合、同じ色相上でマッピングするよりも、色相をずらした方がより忠実な色再現が可能になることが多い。一方、色相hiの全ての色について色相をずらしてしまうと、出力ガマット内の色までもが色相変換されてしまい、入力画像と異なった色味で再現されてしまう。そこで、本実施の形態では、入力色から出力ガマット表面までの距離に応じて、適切なマッピングを行うこととした。 As shown in FIG. 2 and FIG. 3, the distance from the input color T is short between To mapped on the same hue hi of the input color T and the corresponding color M on the hue ho different from the input color T. The color M is closer to the input color T. Thus, when the input color signal is far from the color gamut of the output device, it is often possible to reproduce the color more faithfully by shifting the hue than when mapping on the same hue. On the other hand, if the hue is shifted for all the colors of the hue hi, even the colors in the output gamut are subjected to hue conversion, and are reproduced with a color different from that of the input image. Therefore, in this embodiment, appropriate mapping is performed according to the distance from the input color to the output gamut surface.
図1に戻り、画像入力装置150は、画像データをコンピュータに入力するための入力装置とする。入力装置の例としては、デジタルスチルカメラやスキャナなどが一般的に用いられる。画像出力装置140は、画像データをプリントアウトするための出力装置であって、カラー・プリンタ、カラーファクシミリ、又は複合機等の画像形成装置を用いることができる。
Returning to FIG. 1, the
ディスプレイ120は、画像データを表示する。媒体駆動装置130は画像データの格が可能であり、画像データの読み込み元や画像データの出力先として用いられる。
The
画像処理装置100は、画像取得部101と、色変換パラメータ生成部102と、色変換処理部103と、BG/UCR処理部104と、ハーフトーン処理部105と、画像出力部106とを備える。
The image processing apparatus 100 includes an image acquisition unit 101, a color conversion
画像取得部101は、画像処理装置100内部の図示しないHDD、媒体駆動装置130に格納されている情報記録媒体、画像入力装置150から、入力画像データを取得する。取得した画像データは、画像処理装置100のワークメモリ用の記憶領域(例えばRAM13)に格納する。本実施の形態かかる入力画像データは、通常ディスプレイで表示するためのR(赤)、G(緑)、B(青)の色成分からなる色信号とするが、RGB形式以外の入力画像データであっても良い。
The image acquisition unit 101 acquires input image data from an HDD (not shown) in the image processing apparatus 100, an information recording medium stored in the
色変換パラメータ生成部102は、入力画像データのRGBデータをCMYデータに変換するための色変換パラメータを生成する。色変換パラメータとして、本実施の形態にかかる色変換パラメータ生成部102は、入力画像データのRGBデータと、出力画像データのCMYデータと、を対応づけた3次元ルックアップテーブル(以下、カラープロファイルとする)を生成する。なお、色変換パラメータは、上述した3次元ルックアップテーブルに制限するものではなく、入力画像データ及び出力画像データの色信号に応じて適切な変換を行う3次元ルックアップテーブルであればよい。本実施の形態においては、色変換パラメータ生成部102内部の構成及びこれら構成が行う処理に特に特徴がある。なお、色変換パラメータ生成部102の具体的な構成については後述する。
The color conversion
色変換処理部103は、色変換パラメータ生成部102から入力された色変換パラメータを用いて入力画像データをC(シアン)、M(マゼンタ)、Y(イエロー)の色成分からなる画像データに色変換する。
The color
本実施の形態にかかる色変換処理部103の色変換処理としては、カラープロファイルを用いたメモリマップ補間法を用いる。メモリマップ補間法とは、図4に示すように、入力色空間を同種類の立体図形(ここでは立方体)に分割し、入力色信号を含む立体図形の頂点(格子点)に対応付けられた出力画素値を用いて、入力画素値に対応する出力画素値を求める方式である。
As the color conversion processing of the color
例えば、入力画素P(例えばRGB)における出力画素値(例えばCMY)を求めるには、入力画素Pを3次元色空間の座標で示した後、当該座標を含む立方体を選択する。そして、該選択された立方体の8点の格子点に対して予め設定されている出力画素値と、入力画素Pの立方体の中における位置(各格子点からの距離)と、に基づいて線形補間を実施し、入力画素Pに対応する出力画素値を導出する。本実施の形態の場合、入力色信号は入力R(赤),G(緑),B(青)信号に相当し、出力色信号は、Y(イエロー),M(マゼンダ),C(シアン)信号などに相当する。 For example, in order to obtain an output pixel value (for example, CMY) in the input pixel P (for example, RGB), the input pixel P is indicated by coordinates in a three-dimensional color space, and then a cube including the coordinates is selected. Then, linear interpolation is performed based on output pixel values set in advance for the eight lattice points of the selected cube and the position (distance from each lattice point) of the input pixel P in the cube. To derive an output pixel value corresponding to the input pixel P. In this embodiment, the input color signals correspond to input R (red), G (green), and B (blue) signals, and the output color signals are Y (yellow), M (magenta), and C (cyan). It corresponds to a signal.
なお、上記の説明では、カラープロファイルの格子点出力値はY(イエロー),M(マゼンダ),C(シアン)としているが、BG/UCR処理後のY(イエロー),M(マゼンダ),C(シアン)、K(ブラック)信号を格子点出力値に設定して、後述するBG/UCR処理部104の処理を一括して行ってもよい。
In the above description, the grid point output values of the color profile are Y (yellow), M (magenta), and C (cyan), but Y (yellow), M (magenta), and C after BG / UCR processing. (Cyan) and K (black) signals may be set as grid point output values, and processing of the BG /
また、本実施の形態では、図2を用いた立方体補間法を用いることとしたが、これ以外のメモリマップ補間法も存在する。カラープロファイルを用いたメモリマップ補間法の他の例としては、4面体補間、三角柱補間、立方体補間などがある。このように、色変換に適用するメモリマップ補間法として、各種様々な補間法を適用して良い。 In this embodiment, the cubic interpolation method shown in FIG. 2 is used. However, other memory map interpolation methods exist. Other examples of the memory map interpolation method using a color profile include tetrahedral interpolation, triangular prism interpolation, and cube interpolation. As described above, various kinds of interpolation methods may be applied as the memory map interpolation method applied to the color conversion.
BG/UCR処理部104は、CMYデータを所定の変換式でCMYK成分に分解する。CMYK成分に分解することで、インク使用量の削減や画質向上を行うことができる。CMYK成分に分解する手法としては、どのような手法を用いても良いが、例えばMin(C,M,Y)をK信号に置き換えるなどが考えられる。
The BG /
ハーフトーン処理部105は、CMYKの画像データに対して、ハーフトーン処理を行って、少ない階調数の画像データに変換する。これは、CMYKデータは8bit以上の多値信号であるが、通常の画像出力装置の場合、8bit以上の階調再現ができない場合が多い。そこで、ハーフトーン処理部105がハーフトーン処理を行うことで、CMYKデータの階調数を少なくすることを可能とする。ハーフトーン処理としては、あらゆる手法を用いて良いが、例えばディザ処理や誤差拡散処理など各種の提案方式をそのまま利用しても良い。
The
画像出力部106は、ハーフトーン処理までが行われたCMYK画像データを、画像出力装置140に対して出力する。これにより、画像データの印刷処理を行うことができる。
The
図5は、色変換パラメータ生成部102の構成を示したブロック図である。図2に示すように、色変換パラメータ生成部102は、距離計算用ルックアップテーブル生成部501と、距離計算用ルックアップテーブル記憶部502と、標準カラープロファイル記憶部503と、サンプリング部504と、HLS変換部505と、写像距離算出部506と、判断部507と、写像ルックアップテーブル生成部508と、標準カラープロファイル読込部509と、カラープロファイル生成部510と、で構成されている。
FIG. 5 is a block diagram illustrating a configuration of the color conversion
距離計算用ルックアップテーブル生成部501は、写像距離計算用ルックアップテーブルを生成する。この写像距離計算用ルックアップテーブルの生成は、初期電源投入時などに一回だけ行えばよい。写像距離計算用ルックアップテーブルの生成手順については後述する。なお、距離計算用ルックアップテーブル生成部501を備えなくともよい。この場合、後述する生成手順で生成された写像距離計算用ルックアップテーブルが、予め距離計算用ルックアップテーブル記憶部502に予め記憶されている必要がある。
The distance calculation lookup
距離計算用ルックアップテーブル記憶部502は、距離計算用ルックアップテーブル生成部501により生成された写像距離計算用ルックアップテーブルを記憶する。
The distance calculation lookup
標準カラープロファイル記憶部503は、予め画像処理装置100に格納されている標準のカラープロファイルを記憶する。
The standard color
サンプリング部504は、画像取得部101が取得した入力画像データに対して、サンプリングし、間引き画像(以下、サンプリング画像データと称す)を生成する。このサンプリング画像データの生成は、入力画像データの画素数が400万画素あったとしても、カラープロファイルの作成には10万画素程度で十分なために行う。このように、縦横とも5分の1程度に間引きした縮小画像(サンプリング画像データ)を生成することで、計算負荷を軽減することができる。
The
HLS変換部505は、サンプリング画像データのRGBデータを、色相H、明るさL、飽和度Sで表されるHLSデータに変換する。
The
HLSカラーモデルはOstwaldカラーシステムに基づく色相H、明るさL、飽和度Sの信号とする。図6は、HLSカラーモデルの3次元色空間における形状を示した図である。図6に示すように、HLSカラーモデルは、RGB色立体を変形した双6角錐部分空間で形成される。色相Hは、双6角錐の垂直軸まわりの角度で、ある色相の補色色相は、双6角錐の対角に位置し、軸上0から面上1の垂直軸から半径方向に飽和度を測る(グレーはS=0)。明るさは、(双6角錐の低い頂点での)黒には0、(上方の頂点での)白には1とする。また最大飽和色は、S=1、L=0.5とする。RGBデータからHLSデータへの変換は、周知の手法を問わず、あらゆる手法を用いて良い。以下に、RGBデータからHLSデータへの変換式の例を示す。 The HLS color model is a signal of hue H, brightness L, and saturation S based on the Ostwald color system. FIG. 6 is a diagram showing the shape of the HLS color model in the three-dimensional color space. As shown in FIG. 6, the HLS color model is formed by a double hexagonal pyramid partial space obtained by modifying an RGB color solid. Hue H is an angle around the vertical axis of the hexagonal pyramid, and the complementary hue of a certain hue is located at the diagonal of the hexagonal pyramid, and the saturation is measured in the radial direction from the vertical axis from 0 on the axis to 1 on the surface. (Gray is S = 0). The brightness is 0 for black (at the lower vertex of the double hexagonal pyramid) and 1 for white (at the upper vertex). The maximum saturated color is S = 1 and L = 0.5. Any method may be used for conversion from RGB data to HLS data regardless of a known method. An example of a conversion formula from RGB data to HLS data is shown below.
MAX=max(R,G,B)と、MIN=min(R,G,B)とした場合、Lは以下の式(1)で算出する。
L=(MAX+MIN)/2……(1)
When MAX = max (R, G, B) and MIN = min (R, G, B), L is calculated by the following equation (1).
L = (MAX + MIN) / 2 (1)
そして、MAX==MINの場合、S=0、H=0となる。 When MAX == MIN, S = 0 and H = 0.
一方、MAX=MIN以外の場合、L≦0.5の場合には、以下の式(2)でSを算出し、L>0.5の場合には、以下の式(3)でSを算出する。
S=(MAX―MIN)/(MAX+MIN)……(2)
S=(MAX―MIN)/(2−MAX―MIN)……(3)
On the other hand, when MAX ≦ MIN, when L ≦ 0.5, S is calculated by the following equation (2), and when L> 0.5, S is calculated by the following equation (3). calculate.
S = (MAX−MIN) / (MAX + MIN) (2)
S = (MAX-MIN) / (2-MAX-MIN) (3)
さらに、式(4)〜(6)で各パラメータを算出する。
Cr=(MAX―R)/(MAX―MIN)……(4)
Cg=(MAX―G)/(MAX―MIN)……(5)
Cb=(MAX―B)/(MAX―MIN)……(6)
Furthermore, each parameter is calculated by the equations (4) to (6).
Cr = (MAX-R) / (MAX-MIN) (4)
Cg = (MAX-G) / (MAX-MIN) (5)
Cb = (MAX-B) / (MAX-MIN) (6)
また、R,G、Bの値に応じて、Hは以下の(7)〜(9)を適用する。
H=Cb−Cg(R==MAX)……(7)
H=Cr−Cb(G==MAX)……(8)
H=Cg−Cr(B==MAX)……(9)
Further, the following (7) to (9) are applied to H according to the values of R, G, and B.
H = Cb-Cg (R == MAX) (7)
H = Cr-Cb (G == MAX) (8)
H = Cg-Cr (B == MAX) (9)
さらにHに対して以下の式(10)を適用する。また、H<0の場合、式(11)を適用する。
H=60×H……(10)
H=H+360(H<0)……(11)
Further, the following formula (10) is applied to H. In addition, when H <0, Expression (11) is applied.
H = 60 × H (10)
H = H + 360 (H <0) (11)
上述した式を用いることで、各パラメータを算出できる。また、本実施の形態においては、HLS空間のデータに変換する場合について説明した。ところで、HSV色空間(別名、HSB空間とも言う)信号もRGB色立体を変形して明度、彩度、色相の信号に変換している点で、HLS空間に類似している。そこで、本実施の形態で示したHLS空間の代わりにHSV空間を用いても良い。 Each parameter can be calculated by using the above formula. Further, in the present embodiment, the case where data is converted to HLS space data has been described. By the way, the HSV color space (also referred to as HSB space) signal is similar to the HLS space in that the RGB color solid is transformed into a signal of brightness, saturation, and hue. Therefore, an HSV space may be used instead of the HLS space shown in the present embodiment.
写像距離算出部506は、距離計算用ルックアップテーブル記憶部502に記憶された写像距離計算用ルックアップテーブルを参照して、入力HLSデータに対する出力ガマット表面までの写像距離D(i)を計算する。
The mapping
一般に、入力色信号を出力デバイスの出力ガマットにマッピングする際、出力ガマット表面から離れている場合には、色相を補正してガマット表面までの距離を短くする方が好ましいことが多い。 In general, when the input color signal is mapped to the output gamut of the output device, it is often preferable to correct the hue and shorten the distance to the gamut surface when the input color signal is away from the output gamut surface.
そこで、本実施の形態においては、写像距離算出部506が、HLSデータに対し、入力色信号を画像出力装置140のガマット表面に写像した場合の距離(以下、写像距離とも称す)を算出する。そして、写像ルックアップテーブル生成部508が、算出した写像距離に基づいて色相の補正を行うこととした。
Therefore, in the present embodiment, mapping
写像距離の計算は、画素単位で逐一、出力ガマット表面までの距離を計算する方法もあるが、本実施の形態では、距離計算用ルックアップテーブル記憶部502に記憶された写像距離計算用ルックアップテーブル(以下、DistLUTとも称す)を用いて、HLSデータを写像距離に直接変換することとした。具体的には、DistLUTを、用いて入力されたHLSデータに対する写像距離D(i)を補間演算で算出する。これにより、高速な変換処理を可能としている。
There is a method of calculating the distance to the output gamut surface by pixel unit by pixel, but in this embodiment, the mapping distance calculation lookup table stored in the distance calculation lookup
DistLUTは、HLS空間のH,L,S軸をそれぞれ分割して作成し、分割格子点に対して写像距離の計算値を対応付けた三次元ルックアップテーブルである。この3次元ルックアップテーブルの各格子点は、図6に示すHLS空間を展開した、図7に示した座標系で表現できる。図7に示すように、HLS空間に対して、明るさLを4分割する座標面を設定し、色相Hを12分割する軸を設定し、飽和度Sを3分割する軸を設定し、これら軸及び座標面の交わりを格子点に設定する。これにより、合計240点(=5×4×12)の格子点データが定義できる。そして、各格子点に対して写像距離が対応付けられている。 The DistLUT is a three-dimensional lookup table created by dividing the H, L, and S axes of the HLS space and associating calculated values of mapping distances with divided grid points. Each lattice point of the three-dimensional lookup table can be expressed by the coordinate system shown in FIG. 7 in which the HLS space shown in FIG. 6 is developed. As shown in FIG. 7, for the HLS space, a coordinate plane that divides the brightness L into 4 is set, an axis that divides the hue H into 12 is set, an axis that divides the saturation S into 3 is set, and these Set the intersection of the axis and coordinate plane to the grid point. Thereby, a total of 240 points (= 5 × 4 × 12) of lattice point data can be defined. A mapping distance is associated with each lattice point.
写像距離算出部506が、このDistLUTを用いて、入力画像データを示すHLSデータの各画素値から、写像距離D(i)を計算手法について説明する。図8は、図7で示したHLS空間の一部の領域の各格子点と、補間演算の対象となる画素値と、を示した図である。
The mapping
入力画像データの画素PiのHLSデータが[hi,li,si]とし、Piの隣接格子点が下記のG1〜G8とする。 The HLS data of the pixel Pi of the input image data is [hi, li, si], and the adjacent grid points of Pi are G1 to G8 below.
これら格子点のHLSデータを、G1(hg1,lg1,sg1),G2(hg2,lg2,sg2),G3(hg3,lg3,sg3),G4(hg4,lg4,sg4),G5(hg5,lg5,sg5),G6(hg6,lg6,sg6),G7(hg7,lg7,sg7),G8(hg8,lg8,sg8)とする。 The HLS data of these lattice points are converted into G1 (hg1, lg1, sg1), G2 (hg2, lg2, sg2), G3 (hg3, lg3, sg3), G4 (hg4, lg4, sg4), G5 (hg5, lg5). sg5), G6 (hg6, lg6, sg6), G7 (hg7, lg7, sg7), G8 (hg8, lg8, sg8).
そして、写像距離算出部506は、HLS空間内で画素Piの周囲に隣接している8個の隣接格子点それぞれに対応付けられている写像距離Dを用いて立方体補間演算を行うことで、画素値Piの写像距離D(i)を算出できる。
Then, the mapping
具体的には、写像距離算出部506は、画素Piの写像距離D(i)を算出するために、明るさLの内分比を用いて、T1〜T4の写像距離を線形補間で求めた。その後、写像距離算出部506は、T1〜T4の写像距離と、飽和度の内分比と、色相の内分比と、を用いて写像距離D(i)を算出する。
Specifically, the mapping
そして、写像距離算出部506は、上述した補間演算を、サンプリング画像データに含まれている全ての画素に対して行う。これにより、サンプリング画像データに含まれている全画素の写像距離を算出できる。
Then, the mapping
なお、写像距離算出部506は、各画素それぞれについて写像距離を算出すると共に、判断部による判断に用いる出力ガマット内画素の総数Ninもカウントする。なお、画素Piが出力ガマット内であるか否かは、写像距離D(i)=0か否かで判定できる。
The mapping
判断部507は、各画素の写像距離に基づいて、標準カラープロファイル記憶部503に記憶されている標準のカラープロファイルを使用するか、入力画像に応じたカラープロファイルを新規に生成するか、を判断する。本実施の形態においては、判断基準となる各画素の写像距離として、全画素の写像距離D(i)の分布を用いる例とする。なお、判断部507による判断は、写像距離に基づけばよく、全画素の写像距離D(i)の分布に制限するものではない。
The
本実施の形態にかかる判断部507は、サンプリング画像データの全画素の写像距離D(i)の分布において、出力ガマット内外の比率から、標準のカラープロファイルを用いるか、入力画像に応じたカラープロファイルを生成するか判断する。具体的には、写像距離D(i)の分布で、出力ガマット外の内外比率が高い場合には、入力画像データに応じてカラープロファイルを生成し、出力ガマット外の内外比率が低い場合には、標準のカラープロファイルを使用する。
The
つまり、出力ガマット内の画素の総数をNin、全画素数をNallとした場合、内外比率は式(12)で導出できる。
Rs=Nin/Nall……(12)
In other words, when the total number of pixels in the output gamut is Nin and the total number of pixels is Nall, the internal / external ratio can be derived by Expression (12).
Rs = Nin / Nall (12)
そして、標準カラープロファイルを用いるか、入力画像データに応じたカラープロファイルを生成するかの基準となる閾値を予め設定しておく。そして、内外比率Rsが、閾値を超える場合には、標準カラープロファイルを用いるように標準カラープロファイル読込部509に指示する。
Then, a threshold value that serves as a reference for using a standard color profile or generating a color profile corresponding to input image data is set in advance. If the internal / external ratio Rs exceeds the threshold value, the standard color
標準カラープロファイル読込部509は、判断部507で標準のカラープロファイルを使用すると判断された場合に、標準カラープロファイル記憶部503に記憶されている標準のカラープロファイル(色変換パラメータ)を読み出して、色変換処理部103に出力する。
The standard color
この標準の色変換パラメータは、通常の画像出力装置140の出力ガマット内の色信号を、忠実に変換するように設計されているのが望ましい。これにより、色変換処理部103が行う変換処理において、出力ガマット外の画素をほとんど含まない画像データに対しては、色相補正がほとんど行われなくなる。これにより、ガマット処理に伴う色変わりを最小限に抑えることができる。
The standard color conversion parameter is preferably designed to faithfully convert the color signal in the output gamut of the normal
写像ルックアップテーブル生成部508は、特定部511を備え、判断部507でカラープロファイルを新規に生成すると判断された場合、HLSデータを出力デバイスの色再現範囲内のデバイス独立信号に変換するための写像用ルックアップテーブル(以下、写像LUT)を生成する。その後、カラープロファイル生成部510は、生成された写像用ルックアップテーブルと出力デバイスの特性プロファイルを連結し、RGBデータをCMYデータに変換するためカラープロファイルを生成する。
The mapping lookup
写像ルックアップテーブル生成部508が生成する写像LUTは、HLSデータを出力ガマットのガマット内の色信号に変換するための3次元ルックアップテーブルである。そして、写像LUTは、DistLUTと同様に、色相H、明るさL、飽和度Sのそれぞれの軸が交差した格子点毎に、ガマット・マッピング後の知覚色空間上の色信号が対応づけられている。知覚色空間としては、CIECAM02空間が代表的であるが、他にCIELAB空間、CIELUV空間など、デバイス独立色信号な色空間であれば他の色空間でも構わない。本実施の形態にかかる写像LUTは、DistLUTと異なる分割を行う例とする。具体的には、写像LUTは、色相Hを30度ごとに12分割、飽和度Sを4分割、明るさLを10分割に等分割した。なお、本実施の形態は、このような分割に制限するものでもなく、実施の形態に応じて適した分割を行えばよい。また、写像LUTの分割数を、DistLUTと一致させても良い。
The mapping LUT generated by the mapping lookup
写像LUTを生成するためには、写像ルックアップテーブル生成部508は、まず、写像LUTの初期化を行う。次に、特定部511が写像LUTの各格子点の補正量を特定する。その後、写像ルックアップテーブル生成部503が、写像LUTの格子点毎に、特定された補正量で色相補正を行う。
In order to generate the mapping LUT, the mapping lookup
ところで、同じ色相面上で出力ガマット表面から離れている色ほど、色相補正を行った方が彩度を高くすることができる傾向にある。そこで、本実施の形態にかかる特定部511は、HLS格子点毎に、当該格子点毎に対応する所定の領域に含まれる、各画素の写像距離の統計値に基づいて、色相補正量を異ならせることとした。このように、本実施の形態においては、各画素の写像距離に基づいて、各格子点の色相補正量が特定している。なお、具体的な補正量の算出手法については後述する。
By the way, the color which is farther from the output gamut surface on the same hue plane tends to have higher saturation when the hue correction is performed. Therefore, the specifying
そして、本実施の形態における写像ルックアップテーブル生成部508は、入力画像データの各画素の写像距離に基づいて色相が補正された格子点を含む3次元ルックアップテーブルを生成する。当該3次元ルックアップテーブルを用いることで、入力画像データから、色相再現性と高彩度色の再現性とを両立した出力画像に変換できる。
Then, the mapping lookup
なお、本実施の形態では、飽和度や色相が異なる格子点に対しては異なる色相補正量を調整できるようにしているが、同一色相かつ同一飽和度の格子点に対しては同じ補正値で色相を補正できるようにしている。 In the present embodiment, different hue correction amounts can be adjusted for lattice points having different saturation levels and hues. However, the same correction value is used for lattice points having the same hue and the same saturation level. The hue can be corrected.
写像ルックアップテーブル生成部508は、各格子点の色相の補正が終了した後、色相補正後の格子点出力値を出力ガマット内の色にマッピングし、出力ガマット範囲内のJaCbCデータに変換する。マッピング方法としては、既に提案されている手法を問わず、あらゆる手法を用いてよい。マッピング手法の例としては、圧縮目標点を決めて彩度圧縮を行っても良いし、特許第3719911号で提案されている発明されているように分布に応じて、彩度圧縮率や圧縮方向を設定する方式を用いてもよい。
After completing the correction of the hue of each grid point, the mapping lookup
写像ルックアップテーブル生成部508は、上述した処理を全ての格子点に付いて行い、写像LUTに設定することで、写像LUTを生成する。
The mapping look-up
図9は、格子点Tが色相補正によりシフトしたTpと、Tpに対するマッピング処理で写像されたToとを示した図である。図9に示すように、格子点Tについて、最も距離が短い点Toにマッピングされたことが確認できる。これにより、適切なマッピングが行われることになる。 FIG. 9 is a diagram showing Tp in which the lattice point T is shifted by hue correction and To mapped by mapping processing for Tp. As shown in FIG. 9, it can be confirmed that the lattice point T is mapped to the point To having the shortest distance. As a result, appropriate mapping is performed.
カラープロファイル生成部510は、写像ルックアップテーブル生成部508による写像LUTの生成が終了した後、RGBデータをCMYデータに変換するためのカラープロファイルを生成する。ところで、写像ルックアップテーブル生成部508が生成した写像LUTは、HLS格子点に対してガマット・マッピング後の出力値JaCbCデータが対応付けられている。そこで、カラープロファイル生成部510は、写像LUTを用いて、RGBデータをCMYデータに変換するカラープロファイルを生成する。
The color
カラープロファイル生成部510は、具体的には以下の処理を行う。
1) RGB格子点データをHLSデータに変換
2) HLSデータに対して、写像LUTを用いてガマット内のJaCbCデータに変換
3) JaCbCデータに対して、デバイスモデルを用いてCMYデータに変換
Specifically, the color
1) Convert RGB grid point data to HLS data 2) Convert HLS data to JaCbC data in gamut using mapping LUT 3) Convert JaCbC data to CMY data using device model
1)は、HLS変換部505の変換処理と同様なので説明を省略する。2)の変換は、上述したように立方体補間演算で算出できる。3)の変換は、画像出力装置140の色再現特性をモデル化した色予測モデルに基づき、JaCbCデータを画像出力装置140に依存するCMYデータに変換する。色予測モデルは、離散的なCMYデータに対応するJaCbCデータを計算するためのモデルであって、典型的には、ニューラルネット、多次多項式、三次元ルックアップテーブルなどが用いられる。これらカラープロファイルを生成するための処理は、周知の手法を問わず、あらゆる手法を用いて良いので、説明を省略する。
Since 1) is the same as the conversion process of the
また、色予測モデルは、CMYデータをJaCbCデータに変換するモデルであるため、JaCbCデータに対応するCMYデータを求める際には、ニュートンラプソン法などを用いて逆写像を行って、出力するCMYデータを演算する。 The color prediction model is a model for converting CMY data into JaCbC data. Therefore, when obtaining CMY data corresponding to JaCbC data, CMY data to be output by performing reverse mapping using the Newton-Raphson method or the like. Is calculated.
上述した処理により、RGB格子点に対するCMY出力値が特定されるので、カラープロファイル生成部510は、入力画像の色分布に適したカラープロファイルを生成できる。
Since the CMY output values for the RGB grid points are specified by the above-described processing, the color
また、本実施の形態にかかる画像処理装置100の色変換パラメータ生成部102においては、入力画像データのほとんどが出力デバイス(画像出力装置140)の色再現範囲内に含まれる場合に、標準カラープロファイルを用いることで色相補正を行わず、出力ガマットまでの写像距離が大きい画素を多く含んでいる場合に限り入力画像データに適した色相補正を行う。これにより、色変化の少ない出力画像データを得られると共に、当該出力画像データを生成するための処理負担を軽減できる。
Further, in the color conversion
次に、本実施の形態にかかる画像処理装置100における全体的な処理について説明する。図10は、本実施の形態にかかる画像処理装置100における上述した処理の手順を示すフローチャートである。 Next, overall processing in the image processing apparatus 100 according to the present embodiment will be described. FIG. 10 is a flowchart illustrating the above-described processing procedure in the image processing apparatus 100 according to the present embodiment.
まず、画像取得部101が、画像入力装置150、図示しないHDD、又は情報記録媒体に格納されている入力画像データを取得する(ステップS1001)。この取得した画像データは、ワークメモリ用の図示しないRAMに格納される。なお、入力画像データは、RGBの色成分からなる色信号とする。
First, the image acquisition unit 101 acquires input image data stored in the
次に、色変換パラメータ生成部102は、RAMに格納された入力画像データのRGBデータを、CMYデータに変換するための色変換パラメータの生成又は取得する(ステップS1002)。なお、本実施の形態においては、色変換パラメータとして、入力RGBデータと出力CMYデータとを対応付けたカラープロファイルを生成又は取得する。
Next, the color conversion
その後、色変換処理部103が、入力画像データに対して、色変換パラメータ生成部102から入力された色変換パラメータを用いて、C(シアン)、M(マゼンタ)、Y(イエロー)の色成分からなる色変換処理を行い、出力画像データを生成する(ステップS1003)。
Thereafter, the color
次に、BG/UCR処理部104が、CMYの色成分からなる出力画像データに対して、BG/UCR処理を行うことで、CMYKの色成分からなる出力画像データを生成する(ステップS1004)。
Next, the BG /
そして、ハーフトーン処理部105が、CMYKの色成分からなる出力画像データに対してハーフトーン処理を行って、階調数が少ない出力画像データを生成する(ステップS1005)。
Then, the
その後、画像出力部106が、生成した出力画像データを、画像出力装置140に出力する(ステップS1006)。これにより、画像出力装置140によるプリント出力が可能となる。
Thereafter, the
次に色変換パラメータ生成部102による処理について説明する。色変換パラメータ生成部102は、入力画像データの各画素の出力ガマット表面までの写像距離に応じて、適切な色変化パラメータを生成する。そして、写像距離を算出するためには、予め距離計算用ルックアップテーブル記憶部502に、予め写像距離計算用ルックアップテーブル(DistLUT)を記憶しておく必要がある。そこで、最初に、写像距離計算用ルックアップテーブルの生成手順について説明する。図11は、本実施の形態にかかる距離計算用ルックアップテーブル生成部501における上述した処理の手順を示すフローチャートである。
Next, processing by the color conversion
まずは、距離計算用ルックアップテーブル生成部501は、DistLUTのHLS格子点データを読み込む(ステップS1101)。次に、距離計算用ルックアップテーブル生成部501は、各HLS格子点を、知覚色空間上の色信号に変換する(ステップS1102)。知覚色空間としては、CIECAM02空間が代表的であるが、他にCIELAB空間、CIELUV空間など、デバイス独立色信号な色空間であれば他の色空間でも構わない。
First, the distance calculation lookup
例えば、HLSデータをCIECAM02空間上の直交座標値であるJaCbCデータに変換する場合、HLSデータを上述したRGB−>HLS変換の逆変換を行って、RGBデータに変換した後、IEC61966−2−1で標準化されている変換式に従って、RGBデータをXYZデータに変換する。そして、CIE159−2004のテクニカルレポートに詳述されている計算方法に従って、XYZデータをJaCbCデータに変換する。なお、IEC 61966−2−1は、入力RGBデータがsRGBデータの場合の変換式であるが、仮に入力RGBデータがsRGBデータ以外の場合には、そのRGBデータの色特性を取得してRGB−>YZ変換を行えばよい。 For example, when converting HLS data into JaCbC data which is an orthogonal coordinate value in the CIECAM02 space, the HLS data is converted into RGB data by performing inverse conversion of the RGB-> HLS conversion described above, and then converted into RGB data. The RGB data is converted into XYZ data in accordance with the conversion formula standardized in FIG. Then, XYZ data is converted into JaCbC data according to the calculation method detailed in the technical report of CIE 159-2004. Note that IEC 61966-2-1 is a conversion formula when the input RGB data is sRGB data. However, if the input RGB data is other than sRGB data, the color characteristics of the RGB data are acquired and the RGB- > YZ conversion may be performed.
その後、距離計算用ルックアップテーブル生成部501は、HLS格子点に対応するJaCbCデータ(以下、GridJabデータとする)を得た後、知覚色空間上において、HLS格子点が出力ガマットの色再現範囲内に有るか否かを判定する(ステップS1103)。
After that, the distance calculation lookup
判定の結果、距離計算用ルックアップテーブル生成部501が、HLS格子点が出力ガマットの色再現範囲内に有ると判断した場合(ステップS1103:Yes)、写像距離D(i)=0と設定する(ステップS1104)。
As a result of the determination, when the distance calculation lookup
一方、距離計算用ルックアップテーブル生成部501が、HLS格子点が出力ガマットの色再現範囲内にないと判断した場合(ステップS1103:No)、HLS格子点が出力ガマット表面までの距離を算出する必要がある。
On the other hand, if the distance calculation lookup
そこで、距離計算用ルックアップテーブル生成部501は、CIECAM02空間上でGridJabデータをガマット表面へ写像して交点を算出する(ステップS1105)。その後、距離計算用ルックアップテーブル生成部501は、該交点とGridJabデータとのユークリッド距離を算出する(ステップS1106)。ところで、写像手法としては、どのような手法を用いても良いが、例えば、ガマット表面上で最も色差が最小となる点を探索して写像する手法や、出力ガマット内に写像目標点を設定し、GridJabデータと写像目標点と結んだラインがガマット表面を記述しているポリゴンとの交差している点に写像する手法などを用いることができる。
Therefore, the distance calculation lookup
また、本実施例では出力デバイスのガマット表面をポリゴン群で記述しているものとして説明しているが、他にも種々のガマットの記述方法が提案されている。例えば、色空間を色相、明度に基づいて細分化し、明度、色相ごとに彩度の最大値を記述する方式など他の記述モデルを使用して写像距離を計算するようにしても良い。 In this embodiment, the gamut surface of the output device is described as a polygon group, but various other gamut description methods have been proposed. For example, the mapping distance may be calculated by subdividing the color space based on hue and lightness and using another description model such as a method of describing the maximum value of saturation for each lightness and hue.
その後、距離計算用ルックアップテーブル生成部501は、ステップS1106又はS1104で求められた格子点の写像距離D(i)を、HLS格子点出力値としてDistLUTに設定する(ステップS1107)。
Thereafter, the distance calculation lookup
その後、距離計算用ルックアップテーブル生成部501は、全ての格子点について写像距離D(i)を算出したか否か判断する(ステップS1108)。算出していないと判断した場合(ステップS1108:No)、再びステップS1101から処理を開始する。
Thereafter, the distance calculation lookup
一方、距離計算用ルックアップテーブル生成部501が、全ての格子点について写像距離D(i)を算出したと判断した場合(ステップS1108:Yes)、処理を終了する。
On the other hand, when the distance calculation lookup
以上の処理手順で生成されたDistLUTは、距離計算用ルックアップテーブル記憶部502に記憶する。これにより、色変換処理プログラムの実行時にいつでも参照することができる。
The DistLUT generated by the above processing procedure is stored in the distance calculation lookup
次に、図10のステップS1002における、色変換パラメータ生成部102の色変換パラメータ生成手順について説明する。図12は、本実施の形態にかかる色変換パラメータ生成部102における上述した処理の手順を示すフローチャートである。
Next, the color conversion parameter generation procedure of the color conversion
まずは、サンプリング部504が、入力画像データを取得する(ステップS1201)。次に、サンプリング部504が、入力画像データに対してサンプリング処理を施し、画素を間引いたサンプリング画像データを生成する(ステップS1202)。本実施の形態では、縦横とも5分の1程度に間引きしたサンプリング画像を生成するものとする。
First, the
次に、HLS変換部505が、RGB色成分で構成されたサンプリング画像を、色相H、明るさL、飽和度Sで表されるHLSデータに変換する(ステップS1203)。
Next, the
次に、写像距離算出部506は、距離計算用ルックアップテーブル記憶部502に記憶されていた写像距離計算用ルックアップテーブルを読み込む(ステップS1204)。
Next, the mapping
その後、写像距離算出部506は、写像距離計算用ルックアップテーブルを参照して、サンプル画像データを示すHLSデータの各画素Piについて、出力ガマット表面までの写像距離D(i)を算出する(ステップS1205)。この際、写像距離算出部506は、出力ガマット内の画素数もカウントする。
Thereafter, the mapping
その後、判断部507が、写像距離D(i)の分布に基づいて、標準カラープロファイル記憶部503に記憶された標準のカラープロファイルを使用するか、入力画像に応じたカラープロファイルを新規に生成するかを判断する(ステップS1206)。
Thereafter, the
そして、判断部507が、標準のカラープロファイルを使用する、つまりプロファイルの生成不要と判断した場合(ステップS1206:No)、標準カラープロファイル読込部509が、標準カラープロファイル記憶部503に記憶されている標準のカラープロファイルを読み出して、色変換処理部103に出力する(ステップS1207)。
If the
一方、判断部507が、カラープロファイルを新規に生成すると判断した場合(ステップS1206:Yes)、HLSデータを画像出力装置140の色再現範囲内のデバイス独立信号に変換するための、写像LUTを生成する(ステップS1208)。
On the other hand, when the
次に、カラープロファイル生成部510が、すでに生成された写像LUTと、画像出力装置140の特性プロファイルを連結し、RGBデータをCMYデータに変換するためカラープロファイルを生成する(ステップS1209)。そして、生成されたカラープロファイルは、色変換処理部103に出力される。
Next, the color
上述した処理手順により、入力画像データに適切なカラープロファイルを用意できるので、色変換処理部103において適切な色変換を行うことができる。
The color
次に、以上のように構成された本実施の形態にかかる図12のステップS1208で示した、写像ルックアップテーブル生成部508による写像LUTの生成手順について説明する。図13は、本実施の形態にかかる写像ルックアップテーブル生成部508における上述した処理の手順を示すフローチャートである。
Next, the mapping LUT generation procedure by the mapping lookup
まず、写像ルックアップテーブル生成部508は、写像LUTの初期化を行い、初期値を設定する(ステップS1301)。
First, the mapping lookup
次に、特定部511は、色相補正を行うために写像LUTの分割色相面の隣接色相領域である部分色相領域毎に、写像距離の統計値を算出する(ステップS1302)。図14は、部分色相領域を示した説明図である。図14に示すように、色相角30度に写像LUTの格子点を含む分割色相面が設定されている場合、±15度の領域が部分色相領域となる。例えば、部分色相面1402に対応する部分色相領域は、符号1401で示された領域となる。なお、部分色相領域の色相幅は写像LUTの色相間隔と必ずしも一致する必要はなく、例えば±5度の領域などに設定しても良い。
Next, the specifying
つまり、部分色相面1402に含まれる格子点毎に、部分色相領域1401が対応付けられていることを示している。
That is, the
また、写像ルックアップテーブル生成部508による写像距離の統計値としては、例えば、部分色相領域内に含まれる画素の写像距離の最大値Dmaxと、部分色相領域に含まれる画素の総数に対する、部分色相領域に含まれる出力ガマット内の画素の総数が占める割合Rs(以下、内外比率)のいずれか一方または両方を用いることとする。なお、詳細な統計値の算出手法については後述する。
The statistical value of the mapping distance by the mapping lookup
そして、特定部511は、各部分色相領域における最大の色相補正量ΔHuePx[Hid]を算出する(ステップS1303)。なお、Hidは、部分色相領域とする。本実施の形態においては、基本的に、部分色相領域内で写像距離が最大のHLSデータが、最も色相を大きく補正したほうが良いと仮定して、特定部511が、部分色相領域における最大の色相補正量を特定する。
Then, the specifying
次に、次に色相補正量の算出手法について説明する。まず、部分色相領域Hid内における写像距離が最大となるHLSデータの画素値をPx[hx,lx,sx]とする。また、Pxと最も色差が小さくなる出力ガマット表面上の画素値をPs[hs,ls,ss]とする。この場合、部分色相領域Hidの最大の色相補正量は、以下に示す式(13)で算出する。 Next, a method for calculating the hue correction amount will be described. First, let the pixel value of the HLS data that has the maximum mapping distance in the partial hue region Hid be Px [hx, lx, sx]. Further, a pixel value on the output gamut surface having the smallest color difference from Px is defined as Ps [hs, ls, ss]. In this case, the maximum hue correction amount of the partial hue area Hid is calculated by the following equation (13).
ΔHuePx[Hid]=hx−hs……(13) ΔHuePx [Hid] = hx−hs (13)
色差最小点を求める手法としては、種々の手法が提案されているため、詳細な説明は省略するが、例えば、ポリゴンを構成する頂点とPxとの色差を計算し、色差最小となるポリゴン頂点を求めた後、色差最小となるポリゴン頂点を含む複数のポリゴン面と法線ベクトルとの交点を求め、交点までの距離が最小となる交点を色差最小点とするなどの手法がある。また、色差としてはCIE1976Lab色差式に限らず、ΔE94色差式やΔE2000色差式などいずれの色差式を用いても良い。 Various methods have been proposed for obtaining the minimum color difference point, and detailed description thereof is omitted. For example, the color difference between the vertex constituting the polygon and Px is calculated, and the polygon vertex having the minimum color difference is calculated. After obtaining, there is a method of obtaining intersections between a normal vector and a plurality of polygon planes including polygon vertices having the smallest color difference, and setting the intersection having the smallest distance to the intersection as the smallest color difference point. Further, the color difference is not limited to the CIE1976Lab color difference formula, and any color difference formula such as a ΔE94 color difference formula or a ΔE2000 color difference formula may be used.
次に、写像ルックアップテーブル生成部508は、部分色相領域Hidに含まれる写像LUTの色相面に対して、飽和度sx毎に、特定部511により特定された最大の色相補正量ΔHuePx色相で補正する(ステップS1304)。つまり、写像ルックアップテーブル生成部508は、色相面に含まれている各格子点について、飽和度Sに応じた、最大の色相補正量ΔHuePx色相で補正することになる。なお、部分色相領域Hidに含まれる全ての画像の写像距離が0又は画素が存在しない場合、色相補正量ΔHuePx[Hid]=0として、色相補正を行わないものとする。
Next, the mapping lookup
具体的な色相補正量の算出手法について説明する。特定部511は、部分色相領域Hid毎に最大となる色相補正量ΔHuePx[Hid]をもとに、部分色相領域に含まれているHLS格子点のS=0.25、0.5、0.75、1.0の4点それぞれの色相補正量ΔHue[Hid,S]を、以下に示す式(14)を用いて算出する。なお、式(14)におけるαは定数とする。
ΔHue[Hid,S]= α×Rs×(S−sx)+ΔHuePx[Hid]……(14)
A specific method for calculating the hue correction amount will be described. Based on the hue correction amount ΔHuePx [Hid] that is maximum for each partial hue area Hid, the specifying
ΔHue [Hid, S] = α × Rs × (S−sx) + ΔHuePx [Hid] (14)
式(14)に示すように、特定部511が特定する色相補正量は、飽和度Sの値に応じて異なることになる。式(14)を用いた色相補正量ΔHue[Hid,S]は、αやRs等の値に基づいて、様々な色相補正値の設定パターンが導き出せる。この設定パターンの例として、図15〜図17のパターンを示す。図15に示すパターンは、同一色相上の格子点を、飽和度Sにかかわらず、全て同じ色相補正量で補正する例である。図16及び図17は、飽和度Sが小さくなるほど色相補正量を小さくしている例である。
As shown in Expression (14), the hue correction amount specified by the specifying
ただし、図15〜図17のいずれのパターンであっても、最大写像距離Dmax[Hid]の飽和度に等しい飽和度SではΔHuePxの色相補正を行うようにしている。 However, in any of the patterns of FIGS. 15 to 17, hue correction of ΔHuePx is performed at the saturation S equal to the saturation of the maximum mapping distance Dmax [Hid].
そして、本実施の形態では、飽和度Sに応じて色相補正量を小さくする度合いを画像データの内外比率によって制御するようにしている。式(14)に示すように、内外比率Rs[Hid](出力ガマット内に含まれる割合)が高い場合に、図16や図17で示したグラフの傾きが大きくなる。 In the present embodiment, the degree to which the hue correction amount is reduced according to the saturation S is controlled by the internal / external ratio of the image data. As shown in Expression (14), when the inside / outside ratio Rs [Hid] (the ratio included in the output gamut) is high, the slopes of the graphs shown in FIGS. 16 and 17 increase.
即ち、内外比率Rs[Hid]が大きくなるに従って、飽和度が小さい場合にさらに色相補正値が小さくするという特性を実現できる。また、全ての画素が出力デバイスのガマット外の場合には、内外比率Rs=0となる。この場合、Rs=0を式(14)に代入すると、式(15)が導き出せる。つまり、内外比率Rs=0の場合、飽和度Sに係わらず、色相補正量が一定となる。 That is, as the inside / outside ratio Rs [Hid] increases, the hue correction value can be further reduced when the saturation is small. If all the pixels are outside the gamut of the output device, the inside / outside ratio Rs = 0. In this case, substituting Rs = 0 into equation (14) yields equation (15). That is, when the internal / external ratio Rs = 0, the hue correction amount is constant regardless of the saturation degree S.
ΔHue[Hid,S] = ΔHueMax[Hid]……(15)
このように、本実施の形態においては、全ての画素が出力デバイスのガマット外の場合には、図15のパターンになるということが示された。
ΔHue [Hid, S] = ΔHueMax [Hid] (15)
Thus, in the present embodiment, it has been shown that when all the pixels are outside the gamut of the output device, the pattern shown in FIG. 15 is obtained.
そして、写像ルックアップテーブル生成部508は、このように算出されたΔHue[Hid,S]で、飽和度S毎の格子点の補正処理を行う。
Then, the mapping lookup
その後、写像ルックアップテーブル生成部508は、色相逆転が生じているか否かをチェックする(ステップS1305)。色相逆転が生じていないと判断された場合には(ステップS1305:No)、特に処理を行わない。
Thereafter, the mapping lookup
一方、色相逆転が生じていると判断された場合(ステップS1305:Yes)、色相値の補間処理(色相の補正値の修正)を行って逆転が起こらないようにする(ステップS1306)。 On the other hand, when it is determined that hue inversion has occurred (step S1305: YES), hue value interpolation processing (correction of hue correction value) is performed to prevent inversion (step S1306).
そして、写像ルックアップテーブル生成部508が、色相補正後に画像出力装置140の出力ガマット内の知覚色データに変換する(ステップS1307)。これにより、図9に示すように、格子点Tが色相補正によりTpにシフトした後、マッピング処理によりToに写像される。
The mapping lookup
次に、本実施の形態にかかる図13のステップS1302における、写像距離の統計値の算出手順について説明する。図18は、本実施の形態にかかる写像ルックアップテーブル生成部508における上述した処理の手順を示すフローチャートである。
Next, the procedure for calculating the statistical value of the mapping distance in step S1302 of FIG. 13 according to the present embodiment will be described. FIG. 18 is a flowchart showing a procedure of the above-described processing in the mapping lookup
まず、写像ルックアップテーブル生成部508は、統計値を計算するための統計値データを保持するための配列を初期化する(ステップS1801)。具体的には、写像ルックアップテーブル生成部508は、部分色相領域Hid=0,1,……,11における最大写像距離Dmax[Hid]及び出力ガマット内の画素数Nin[Hid]、全画素数Nall[Hid]を‘0’で初期化する。
First, the mapping lookup
次に、写像ルックアップテーブル生成部508は、サンプリング画像データの各画素のHLSデータから、各画素が属する部分色相領域Hidを判定する(S1802)。具体的には、写像ルックアップテーブル生成部508は、サンプリング画像データの各画素Piの色相角hiが、部分色相領域Hidの色相範囲に含まれるか否かを順次判定すればよい。
Next, the mapping look-up
次に、写像ルックアップテーブル生成部508は、画素Pi毎に、DistLUTを用いて算出された写像距離D(i)を読み込む(ステップS1803)。
Next, the mapping lookup
そして、写像ルックアップテーブル生成部508は、写像距離D(i)が‘0’か否かを判断する(S1804)。写像ルックアップテーブル生成部508が、写像距離D(i)を‘0’と判断した場合(ステップS1804:Yes)、出力画像のガマット内の色信号であるため、Nin[Hid]をインクリメントする(ステップS1805)。
The mapping lookup
その後、写像ルックアップテーブル生成部508は、全画素数Nall[Hid]をインクリメントする(ステップS1806)。
Thereafter, the mapping lookup
次に、写像ルックアップテーブル生成部508は、画素Piの写像距離が、部分色相領域の最大写像距離Dmaxよりも大きいか否か判断する(ステップS1807)。そして、大きいと判断した場合(ステップS1807:Yes)、この画素Piの写像距離で、最大写像距離Dmax[Hid]を更新する(ステップS1808)。また、色相補正量を決定する際に用いる最大写像距離を与える画像データのHLSデータも同時に記録しておく。
Next, the mapping lookup
そして、写像ルックアップテーブル生成部508は、全画素についてステップS1802〜S1808の処理を行ったか否か判断する(ステップS1809)。全画素について行っていないと判断した場合(ステップS1809:No)、再びステップS1802から処理を開始する。
Then, mapping lookup
一方、写像ルックアップテーブル生成部508が、全画素をカウントしたと判断した場合(ステップS1809:Yes)、処理を終了する。
On the other hand, if the mapping lookup
上述した処理を行うことで、12の部分色相領域全てについて、最大写像距離Dmax及びNin、Nallを算出できる。これにより、Rs[Hid]=Nin[Hid]/Nall[Hid]による内外比率Rs[Hid]を算出できる。 By performing the above-described processing, the maximum mapping distance Dmax, Nin, and Nall can be calculated for all 12 partial hue regions. Thereby, the inside / outside ratio Rs [Hid] by Rs [Hid] = Nin [Hid] / Nall [Hid] can be calculated.
上述した画像処理装置100によれば、入力画像データのほとんどが出力デバイスの色再現範囲内に含まれる場合には色相補正を行わず、出力ガマットまでの写像距離が大きい画素を含んでいるときのみ色相補正を行うため、入力画像データに応じた色変換処理を行うことができる。これにより、適切な出力画像データを得られる。 According to the image processing apparatus 100 described above, when most of the input image data is included in the color reproduction range of the output device, hue correction is not performed, and only when a pixel having a large mapping distance to the output gamut is included. Since hue correction is performed, color conversion processing according to input image data can be performed. Thereby, appropriate output image data can be obtained.
本実施の形態にかかる画像処理装置100によれば、入力色空間の部分色相領域ごとに求めた写像距離の統計値に基づいてガマット・マッピングを行うルックアップテーブルの各格子点の色相補正量を制御しているため、写像距離の大きな画素を含む、即ち出力デバイスのガマット表面からの距離が大きな画素を多く含む画像データの場合には色相補正を行って彩度の再現性に優れた色変換を行える共に、ほとんどの画素が出力ガマット内の色の場合には、不要な色相補正を行わないようにすることができる。 According to the image processing apparatus 100 according to the present embodiment, the hue correction amount of each grid point of the lookup table that performs gamut mapping based on the statistical value of the mapping distance obtained for each partial hue area of the input color space is calculated. Because it is controlled, color conversion with excellent reproducibility of saturation by performing hue correction in the case of image data that includes pixels with a large mapping distance, that is, many pixels with a large distance from the gamut surface of the output device When most of the pixels have colors in the output gamut, unnecessary hue correction can be avoided.
さらに、本実施の形態にかかる画像処理装置100によれば、部分色相領域内に含まれる画素の写像距離の最大値と部分色相領域に含まれる画素の総数に対する部分色相領域に含まれる出力ガマット内の画素の総数が占める割合を用いて部分色相領域の色相補正量を決めているため、色相ごとに色相補正の効果を正確に判定することができる。 Furthermore, according to the image processing apparatus 100 according to the present embodiment, within the output gamut included in the partial hue area relative to the maximum value of the mapping distance of the pixels included in the partial hue area and the total number of pixels included in the partial hue area. Since the hue correction amount of the partial hue region is determined using the ratio occupied by the total number of pixels, the effect of the hue correction can be accurately determined for each hue.
さらに、本実施の形態にかかる画像処理装置100によれば、写像距離が最大となる画素の色相補正量に基づいてルックアップテーブルの格子点の色相補正量を決定しているために、色相補正の効果が大きい入力色に対して確実に色相補正を行うことができる。 Furthermore, according to the image processing apparatus 100 according to the present embodiment, since the hue correction amount of the grid point of the lookup table is determined based on the hue correction amount of the pixel having the maximum mapping distance, the hue correction is performed. It is possible to reliably perform hue correction for an input color having a large effect.
さらに、本実施の形態にかかる画像処理装置100によれば、部分色相領域に含まれる画素の総数に対する部分色相領域に含まれる出力ガマット内の画素の総数が占める割合が大きいほど、色相補正量を小さくしているため、画像出力装置のガマット内の格子点に対する色相補正量を小さくすることができ、原画像に忠実な色相再現を実現できる。 Furthermore, according to the image processing apparatus 100 according to the present embodiment, the hue correction amount is increased as the ratio of the total number of pixels in the output gamut included in the partial hue area to the total number of pixels included in the partial hue area increases. Since it is made small, the hue correction amount for the lattice points in the gamut of the image output apparatus can be reduced, and hue reproduction faithful to the original image can be realized.
さらに、本実施の形態にかかる画像処理装置100によれば、入力色相とルックアップテーブルの色相が逆転しているか否かを判定し、逆転している場合には色相を再補正するようにしているため、色相の連続性が保証され、階調性に優れた色再現を実現できる。 Furthermore, according to the image processing apparatus 100 according to the present embodiment, it is determined whether or not the input hue and the hue of the lookup table are reversed. If the hue is reversed, the hue is recorrected. Therefore, continuity of hue is guaranteed and color reproduction with excellent gradation can be realized.
さらに、本実施の形態にかかる画像処理装置100によれば、入力色空間を分割した格子点について写像距離を対応づけた写像距離計算用ルックアップテーブルを用いて、サンプル画像データから写像距離を計算しているため、写像距離を高速に計算できる。 Furthermore, according to the image processing apparatus 100 according to the present embodiment, the mapping distance is calculated from the sample image data by using the mapping distance calculation lookup table in which the mapping distance is associated with the grid points obtained by dividing the input color space. Therefore, the mapping distance can be calculated at high speed.
さらに、本実施の形態にかかる画像処理装置100によれば、写像距離計算用ルックアップテーブルの格子点が出力ガマット内である場合には、写像距離を0とし、ガマット外である場合にはガマット表面との色差を写像距離としているため、入力画像データがガマット内か外かを高速に判定できる。 Furthermore, according to the image processing apparatus 100 according to the present embodiment, when the grid point of the mapping distance calculation lookup table is within the output gamut, the mapping distance is set to 0, and when it is outside the gamut, the gamut is set. Since the color difference from the surface is used as the mapping distance, it can be determined at high speed whether the input image data is inside or outside the gamut.
(第2の実施の形態)
第1の実施の形態では、色相H、明るさL、飽和度Sをそれぞれ等分割して写像LUTを作成した。しかしながら、非均等分割して写像LUTを作成してもよい。そこで、第2の実施の形態では、非均等分割して写像LUTを生成する例について説明する。
(Second Embodiment)
In the first embodiment, the mapping LUT is created by equally dividing the hue H, brightness L, and saturation S. However, the mapping LUT may be created by non-uniform division. Therefore, in the second embodiment, an example in which the mapping LUT is generated by non-uniform division will be described.
図19は、第2の実施の形態にかかる色変換パラメータ生成部1901の構成を示すブロック図である。色変換パラメータ生成部1901は、上述した第1の実施の形態にかかる色変換パラメータ生成部102とは、写像ルックアップテーブル生成部508とは処理が異なる写像ルックアップテーブル生成部1911に変更された構成を有している点で異なる。以下の説明では、上述した第1の実施の形態と同一の構成要素には同一の符号を付してその説明を省略している。写像ルックアップテーブル生成部1911は、さらに設定部1912を備える。
FIG. 19 is a block diagram illustrating a configuration of a color conversion
写像ルックアップテーブル生成部1911は、色相を非均等分割した写像LUTを生成する。このために、まず設定部1912は、入力画像データの色分布に応じて、写像LUTにおける色相分割面を特定する。当該色相分割面上には、3次元ルックアップテーブルの格子点が含まれているため、格子点が設定されたことになる。
The mapping lookup
図20は、第2の実施の形態にかかる、HLS空間における色相分割を示した説明図である。図20に示された斜線領域は、入力画像データの写像距離の分布を示している。 FIG. 20 is an explanatory diagram showing hue division in the HLS space according to the second embodiment. The hatched area shown in FIG. 20 indicates the distribution of the mapping distance of the input image data.
ところで、第1の実施の形態では、写像LUTの色相分割面は30度ずつ等間隔に分割するようにしていた。しかしながら、2つの色相分割面の中間に彩度の高い色が集中して分布しているような場合、2つの色相分割面の色相補正値で補間処理されてしまうため最適な色相補正にならない場合がある。 By the way, in the first embodiment, the hue division plane of the mapping LUT is divided at equal intervals by 30 degrees. However, when high-saturated colors are concentrated and distributed between the two hue division planes, interpolation processing is performed using the hue correction values of the two hue division planes, and the optimum hue correction is not achieved. There is.
そこで、本実施の形態にかかる写像ルックアップテーブル生成部1911の設定部1912は、写像距離の大きい色が集中して分布している色相面で色相分割を行うように設定する。例えば、色相H[11]の場合、写像ルックアップテーブル生成部1911は、330度±15度の範囲内で写像距離が最大となる入力画像データを探索する。最大写像距離のHLS値が、(ha,la,sa)とすると、haの値が330度±5度以内であれば、色相分割点をシフトし、haの値が335〜355度の範囲内であれば新たに色相分割面を追加する。これにより、設定部1912により、当該色相分割面に含まれる格子点が設定されたことを意味する。
Therefore, the
色相分割面が決定すると、第1の実施の形態と同様に、部分色相領域ごとに写像距離の統計値を求めて、写像距離の統計値に基づいてHLS格子点の色相補正量を決定し、決定した色相補正量に基づいて格子点データの色相補正処理を行い、画像出力装置140の出力ガマット内の知覚色データに変換する。
When the hue division plane is determined, as in the first embodiment, a statistical value of the mapping distance is obtained for each partial hue region, and the hue correction amount of the HLS lattice point is determined based on the statistical value of the mapping distance. Based on the determined hue correction amount, the hue correction processing of the lattice point data is performed and converted into perceptual color data in the output gamut of the
この時、重要色である肌色の色相は補正しないなどの制限をつけても良い。図20に示す例では、肌色を示す色相である30度と60度の色相補正値を0に固定するなどが考えられる。 At this time, a restriction such as not correcting the hue of the skin color that is an important color may be applied. In the example shown in FIG. 20, it is conceivable to fix the hue correction values of 30 degrees and 60 degrees, which are hues indicating the skin color, to zero.
第2の実施の形態にかかる画像処理装置では、画像データの写像距離分布、具体的には最大写像距離となる画素の色相を求め、該色相に対して3次元ルックアップテーブルの色相分割面及び当該分割面に含まれる格子点を設定するため、最も高彩度な色が補間演算誤差によって彩度が平準化されてしまうことがなく、確実に彩度を向上できる色相へ補正することができる。これにより、補間演算誤差が少なくなると共に、色相補正の効果が大きい色相を高精度に補正することができる。 In the image processing apparatus according to the second embodiment, the mapping distance distribution of the image data, specifically, the hue of the pixel having the maximum mapping distance is obtained, and the hue dividing plane of the three-dimensional lookup table is obtained for the hue, Since the grid points included in the division plane are set, the highest saturation color is not leveled by the interpolation calculation error, and the hue can be reliably corrected. As a result, the interpolation calculation error is reduced, and a hue having a great effect of hue correction can be corrected with high accuracy.
さらに本実施の形態においては、色相分割面のうち、肌色の出力色相は固定しているため、色変わりの目立ちやすい肌色の色変わりを抑制できる。 Furthermore, in this embodiment, since the skin hue output hue is fixed in the hue division plane, it is possible to suppress the skin color change that is easily noticeable.
第1〜2の実施の形態の画像処理装置は、図21に示すように、全体を制御するCPU2101と、画像処理プログラム等が記憶されているROM(Read Only Memory)2102と、ワークエリア等として使用されるRAM2103と、ネットワーク上の機器と通信を行なう通信I/F2104と、HDD2105と、これらを接続するバス2106と、を備えており、通常のコンピュータを利用したハードウェア構成となっている。
As shown in FIG. 21, the image processing apparatuses according to the first and second embodiments include a CPU 2101 that controls the whole, a ROM (Read Only Memory) 2102 that stores image processing programs, and a work area. A RAM 2103 to be used, a communication I / F 2104 for communicating with devices on the network, an
第1〜2の実施の形態の画像処理装置で実行される画像処理プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。 An image processing program executed by the image processing apparatuses according to the first and second embodiments is a file in an installable format or an executable format, and is a CD-ROM, a flexible disk (FD), a CD-R, a DVD (Digital It is recorded on a computer readable recording medium such as Versatile Disk).
上記の記録媒体で提供される場合、図1の媒体駆動装置130にセットされると、記録媒体からHDD2105に画像処理プログラムを格納後、HDD2105に格納されたプログラムをCPU2101により実行されることにより機能するようになっている。また、画像処理装置か読み出した画像処理ブログラムを実行することにより、当該画像処理プログラムの指示に基づき、画像処理装置上で稼動しているOS(オペレーティングシステム)やデパイス・ドライパなどか実際の処理の一部または全部を行う場合もある。
When provided in the above recording medium, when set in the
なお、上述した第1〜2の実施の形態においては、画像処理装置100上でのソフトウェアにより、色変換機能を実現しているが、これに限定されるわけではなく、例えばLSI等のハードウェアで実現しても良いし、画像出力装置140内に設けられた画像処理装置にて実現してもよい。
In the first and second embodiments described above, the color conversion function is realized by software on the image processing apparatus 100. However, the present invention is not limited to this. For example, hardware such as an LSI is used. Or an image processing apparatus provided in the
また、第1〜2の実施の形態の画像処理プログラムを、ROM等に予め組み込んで提供するように構成してもよい。 Further, the image processing programs of the first and second embodiments may be provided by being incorporated in advance in a ROM or the like.
第1〜2の実施の形態の画像処理装置で実行される画像処理プログラムは、上述した各部(画像取得部、色変換パラメータ生成部、色変換処理部、BG/UCR処理部、ハーフトーン処理部、画像出力部)を含むモジュール構成となっており、実際のハードウェアとしてはCPU(プロセッサ)が上記記憶媒体から画像処理プログラムを読み出して実行することにより上記各部が主記憶装置(RAM2103)上にロードされ、画像取得部、色変換パラメータ生成部、色変換処理部、BG/UCR処理部、ハーフトーン処理部、画像出力部が主記憶装置RAM2103上に生成されるようになっている。 The image processing program executed by the image processing apparatuses according to the first and second embodiments includes the above-described units (image acquisition unit, color conversion parameter generation unit, color conversion processing unit, BG / UCR processing unit, halftone processing unit). The image output unit) is a module configuration. As actual hardware, the CPU (processor) reads out and executes the image processing program from the storage medium, so that each unit is stored in the main storage device (RAM 2103). The image acquisition unit, the color conversion parameter generation unit, the color conversion processing unit, the BG / UCR processing unit, the halftone processing unit, and the image output unit are generated on the main storage RAM 2103.
また、本発明を複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。 Further, even if the present invention is applied to a system composed of a plurality of devices (for example, a host computer, interface device, reader, printer, etc.), it can be applied to a device (for example, a copier, a facsimile machine, etc.) composed of a single device. You may apply.
100 画像処理装置
101 画像取得部
102、1901 色変換パラメータ生成部
103 色変換処理部
104 BG/UCR処理部
105 ハーフトーン処理部
106 画像出力部
120 ディスプレイ
130 媒体駆動装置
140 画像出力装置
150 画像入力装置
501 距離計算用ルックアップテーブル生成部
502 距離計算用ルックアップテーブル記憶部
503 標準カラープロファイル記憶部
504 サンプリング部
505 HLS変換部
506 写像距離算出部
507 判断部
508、1911 写像ルックアップテーブル生成部
509 標準カラープロファイル読込部
510 カラープロファイル生成部
511 特定部
1912 設定部
DESCRIPTION OF SYMBOLS 100 Image processing apparatus 101
Claims (20)
入力画像データを取得する取得手段と、
前記入力画像データの画素毎に、3次元色空間上において、当該画素の画素値から、出力装置で出力可能な色の範囲を表した出力ガマット表面までの写像距離を算出する距離算出手段と、
3次元ルックアップテーブルの格子点毎に、前記3次元色空間上で当該格子点に対応する所定の領域に含まれる前記画素毎の前記写像距離に基づいて、当該格子点の色相の補正量を特定する特定手段と、
前記格子点毎に、前記補正量に基づいて補正された前記色相上で前記出力ガマット内の色データに写像する3次元ルックアップテーブルを生成する生成手段と、
を備えることを特徴とする画像処理装置。 In an image processing device that converts input image data into output image data with reference to a three-dimensional lookup table that converts each pixel value of input image data into a pixel value that can be expressed by the output device,
Obtaining means for obtaining input image data;
Distance calculation means for calculating a mapping distance from the pixel value of the pixel to the output gamut surface representing the range of colors that can be output by the output device in a three-dimensional color space for each pixel of the input image data;
For each grid point of the three-dimensional lookup table, the hue correction amount of the grid point is calculated based on the mapping distance for each pixel included in a predetermined region corresponding to the grid point on the three-dimensional color space. Identification means to identify;
Generating means for generating, for each grid point, a three-dimensional lookup table that maps to color data in the output gamut on the hue corrected based on the correction amount;
An image processing apparatus comprising:
前記距離算出部手段により算出された前記画素毎の前記写像距離が所定の閾値を超えたか否かに基づいて、前記標準3次元ルックアップテーブルを使用するか否か判断する判断手段と、
前記標準3次元ルックアップテーブルを使用すると判断した場合に、前記入力画像データに対して適用する前記標準3次元ルックアップテーブルを読み出す読出手段と、をさらに備え、
前記標準3次元ルックアップテーブルを使用しないと判断した場合に、前記生成手段が、前記3次元ルックアップテーブルを生成すること、
を特徴とする請求項1に記載の画像処理装置。 When each pixel of the input image data is included in the output gamut, a standard three-dimensional lookup table for converting the pixel value of each pixel of the input image data into the pixel value of the output image data is stored. Standard storage means;
Determining means for determining whether or not to use the standard three-dimensional lookup table based on whether or not the mapping distance for each pixel calculated by the distance calculating section means exceeds a predetermined threshold;
Reading means for reading out the standard three-dimensional lookup table to be applied to the input image data when it is determined that the standard three-dimensional lookup table is used;
When it is determined that the standard three-dimensional lookup table is not used, the generation unit generates the three-dimensional lookup table;
The image processing apparatus according to claim 1.
前記距離算出部手段は、前記距離変換テーブルを参照して、前記画素毎に前記写像距離を算出すること、
を特徴とする請求項1又は2に記載の画像処理装置。 Table storage means for storing a distance conversion table for converting each pixel value of input image data in a three-dimensional color space into a mapping distance to the output gamut surface;
The distance calculating unit calculates the mapping distance for each pixel with reference to the distance conversion table;
The image processing apparatus according to claim 1, wherein:
前記特定手段は、前記設定手段により設定された前記格子点毎に、当該格子点の色相の補正量を特定すること、
を特徴とする請求項1乃至4のいずれか一つに記載の画像処理装置。 A setting unit for obtaining a hue including a pixel having the maximum mapping distance and setting a lattice point of the three-dimensional lookup table on the hue;
The specifying means specifies, for each grid point set by the setting means, a hue correction amount of the grid point;
The image processing apparatus according to claim 1, wherein:
を特徴とする請求項1乃至6のいずれか一つに記載の画像処理装置。 The specifying unit calculates, for each grid point of the three-dimensional lookup table, a statistical value of the mapping distance of the pixel included in an area defined for each grid point, and based on the statistical value, Specify the correction amount of the hue of the grid points;
The image processing apparatus according to claim 1, wherein:
を特徴とする請求項1乃至7のいずれか一つに記載の画像処理装置。 As the statistical value of the mapping distance calculated by the specifying means, the maximum value of the mapping distance to the output gamut surface of the pixel included in a predetermined region for each lattice point, and the predetermined Using any one or more of the ratio of the number included in the output gamut among the pixels included in the region;
The image processing apparatus according to claim 1, wherein:
入力画像データを取得する取得ステップと、
前記入力画像データの画素毎に、3次元色空間上において、当該画素の画素値から、出力装置で出力可能な色の範囲を表した出力ガマット表面までの写像距離を算出する距離算出ステップと、
3次元ルックアップテーブルの格子点毎に、前記3次元色空間上で当該格子点に対応する所定の領域に含まれる前記画素毎の前記写像距離に基づいて、当該格子点の色相の補正量を特定する特定ステップと、
前記格子点毎に、前記補正量に基づいて補正された前記色相上で前記出力ガマット内の色データに写像する3次元ルックアップテーブルを生成する生成ステップと、
をコンピュータに実行させるための画像処理プログラム。 In an image processing program for converting input image data into output image data with reference to a three-dimensional lookup table that converts each pixel value of input image data into a pixel value that can be expressed by an output device,
An acquisition step of acquiring input image data;
A distance calculating step of calculating a mapping distance from a pixel value of the pixel to an output gamut surface representing a range of colors that can be output by the output device in a three-dimensional color space for each pixel of the input image data;
For each grid point of the three-dimensional lookup table, the hue correction amount of the grid point is calculated based on the mapping distance for each pixel included in a predetermined region corresponding to the grid point on the three-dimensional color space. Specific steps to identify;
A generating step for generating a three-dimensional lookup table that maps to color data in the output gamut on the hue corrected based on the correction amount for each grid point;
An image processing program for causing a computer to execute.
前記距離算出部ステップにより算出された前記画素毎の前記写像距離が所定の閾値を超えたか否かに基づいて、前記標準3次元ルックアップテーブルを使用するか否か判断する判断ステップと、
前記標準3次元ルックアップテーブルを使用すると判断した場合に、前記入力画像データに対して適用する前記標準3次元ルックアップテーブルを前記標準記憶手段から読み出す読出ステップと、をさらにコンピュータに実行させ、
前記標準3次元ルックアップテーブルを使用しないと判断した場合に、前記生成ステップが、前記3次元ルックアップテーブルを生成すること、
を特徴とする請求項11に記載の画像処理プログラム。 The computer converts a pixel value of each pixel of the input image data into a pixel value of the output image data when each pixel of the input image data is included in the output gamut. A standard storage means for storing the table;
A determination step of determining whether or not to use the standard three-dimensional lookup table based on whether or not the mapping distance for each pixel calculated by the distance calculation unit step exceeds a predetermined threshold;
If the standard three-dimensional lookup table is determined to be used, the computer further executes a reading step of reading out the standard three-dimensional lookup table to be applied to the input image data from the standard storage means;
If it is determined that the standard three-dimensional lookup table is not used, the generating step generates the three-dimensional lookup table;
The image processing program according to claim 11.
前記距離算出部ステップは、前記距離変換テーブルを参照して、前記画素毎に前記写像距離を算出すること、
を特徴とする請求項11又は12に記載の画像処理プログラム。 The computer further comprises table storage means for storing a distance conversion table for converting each pixel value of input image data in a three-dimensional color space to a mapping distance to the output gamut surface,
The distance calculating step refers to the distance conversion table to calculate the mapping distance for each pixel;
The image processing program according to claim 11 or 12, characterized in that:
前記特定ステップは、前記設定ステップにより設定された前記格子点毎に、当該格子点の色相の補正量を特定すること、
を特徴とする請求項11乃至14のいずれか一つに記載の画像処理プログラム。 Obtaining a hue of a pixel that becomes the maximum mapping distance, and further causing the computer to execute a setting step of setting a lattice point of the three-dimensional lookup table on the hue;
The specifying step specifies, for each grid point set by the setting step, a hue correction amount of the grid point;
The image processing program according to any one of claims 11 to 14, wherein:
取得手段が、入力画像データを取得する取得ステップと、
距離算出手段が、前記入力画像データの画素毎に、3次元色空間上において、当該画素の画素値から、出力装置で出力可能な色の範囲を表した出力ガマット表面までの写像距離を算出する距離算出ステップと、
特定手段が、3次元ルックアップテーブルの格子点毎に、前記3次元色空間上で当該格子点に対応する所定の領域に含まれる前記画素毎の前記写像距離に基づいて、当該格子点の色相の補正量を特定する特定ステップと、
生成手段が、前記格子点毎に、前記補正量に基づいて補正された前記色相上で前記出力ガマット内の色データに写像する3次元ルックアップテーブルを生成する生成ステップと、
を有することを特徴とする画像処理方法。 In an image processing method for converting input image data into output image data by referring to a three-dimensional lookup table for converting each pixel value of input image data into a pixel value that can be expressed by the output device in an image processing device,
An acquisition step in which the acquisition means acquires the input image data;
A distance calculation unit calculates, for each pixel of the input image data, a mapping distance from the pixel value of the pixel to the output gamut surface representing the range of colors that can be output by the output device in a three-dimensional color space. A distance calculating step;
For each grid point of the three-dimensional lookup table, the specifying unit determines the hue of the grid point based on the mapping distance for each pixel included in a predetermined area corresponding to the grid point on the three-dimensional color space. A specific step of identifying the correction amount of
A generating step of generating, for each grid point, a three-dimensional lookup table that maps to color data in the output gamut on the hue corrected based on the correction amount;
An image processing method comprising:
判断手段が、前記距離算出部ステップにより算出された前記画素毎の前記写像距離が所定の閾値を超えたか否かに基づいて、前記標準3次元ルックアップテーブルを使用するか否か判断する判断ステップと、
読出手段が、前記標準3次元ルックアップテーブルを使用すると判断した場合に、前記入力画像データに対して適用する前記標準3次元ルックアップテーブルを前記標準記憶手段から読み出す読出ステップと、を有し、
前記標準3次元ルックアップテーブルを使用しないと判断した場合に、前記生成ステップが、前記3次元ルックアップテーブルを生成すること、
を特徴とする請求項16に記載の画像処理方法。 The image processing apparatus converts a pixel value of each pixel of the input image data into a pixel value of the output image data when each pixel of the input image data is included in the output gamut. A standard storage means for storing a lookup table;
A determination step for determining whether or not to use the standard three-dimensional lookup table based on whether or not the mapping distance for each pixel calculated by the distance calculation unit step exceeds a predetermined threshold. When,
A reading step of reading the standard three-dimensional lookup table to be applied to the input image data from the standard storage unit when the reading unit determines to use the standard three-dimensional lookup table;
If it is determined that the standard three-dimensional lookup table is not used, the generating step generates the three-dimensional lookup table;
The image processing method according to claim 16.
前記距離算出部ステップは、前記距離変換テーブルを参照して、前記画素毎に前記写像距離を算出すること、
を特徴とする請求項16又は17に記載の画像処理方法。 The image processing apparatus further comprises table storage means for storing a distance conversion table for converting each pixel value of input image data in a three-dimensional color space into a mapping distance to the output gamut surface,
The distance calculating step refers to the distance conversion table to calculate the mapping distance for each pixel;
The image processing method according to claim 16 or 17, characterized in that:
前記特定ステップは、前記設定ステップにより設定された前記格子点毎に、当該格子点の色相の補正量を特定すること、
を特徴とする請求項16乃至20のいずれか一つに記載の画像処理方法。 The setting means further includes a setting step of obtaining a hue including a pixel having the maximum mapping distance and setting a lattice point of the three-dimensional lookup table on the hue;
The specifying step specifies, for each grid point set by the setting step, a hue correction amount of the grid point;
The image processing method according to any one of claims 16 to 20.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008237201A JP2010074317A (en) | 2008-09-16 | 2008-09-16 | Image processor, image processing program, and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008237201A JP2010074317A (en) | 2008-09-16 | 2008-09-16 | Image processor, image processing program, and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010074317A true JP2010074317A (en) | 2010-04-02 |
Family
ID=42205723
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008237201A Pending JP2010074317A (en) | 2008-09-16 | 2008-09-16 | Image processor, image processing program, and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010074317A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012028903A (en) * | 2010-07-21 | 2012-02-09 | Fuji Xerox Co Ltd | Color processing apparatus and program |
GB2502295A (en) * | 2012-05-22 | 2013-11-27 | Mcor Technologies Ltd | Coloured layered object manufacturing, (LOM), system |
US8879866B2 (en) | 2011-04-08 | 2014-11-04 | Rohm Co., Ltd. | Image processing circuit, semiconductor device, image processing device, and electronic appliance |
CN110796990A (en) * | 2018-08-02 | 2020-02-14 | 三星显示有限公司 | Apparatus and method for controlling color gamut |
JP2021071905A (en) * | 2019-10-30 | 2021-05-06 | キヤノン株式会社 | Image processing system, image processing method and program |
-
2008
- 2008-09-16 JP JP2008237201A patent/JP2010074317A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012028903A (en) * | 2010-07-21 | 2012-02-09 | Fuji Xerox Co Ltd | Color processing apparatus and program |
US8879866B2 (en) | 2011-04-08 | 2014-11-04 | Rohm Co., Ltd. | Image processing circuit, semiconductor device, image processing device, and electronic appliance |
GB2502295A (en) * | 2012-05-22 | 2013-11-27 | Mcor Technologies Ltd | Coloured layered object manufacturing, (LOM), system |
WO2014015994A1 (en) * | 2012-05-22 | 2014-01-30 | Mcor Technologies Limited | Colour 3-dimensional printing with 3d gamut mapping |
CN104470704A (en) * | 2012-05-22 | 2015-03-25 | Mcor科技有限公司 | Colour 3-dimensional printing with 3d gamut mapping |
GB2502295B (en) * | 2012-05-22 | 2015-12-09 | Mcor Technologies Ltd | Colour 3-dimensional printing with 3D gamut mapping |
US10071527B2 (en) | 2012-05-22 | 2018-09-11 | Mcor Technologies Limited | Colour 3-dimensional printing with 3D gamut mapping |
CN110796990A (en) * | 2018-08-02 | 2020-02-14 | 三星显示有限公司 | Apparatus and method for controlling color gamut |
CN110796990B (en) * | 2018-08-02 | 2022-11-25 | 三星显示有限公司 | Apparatus and method for controlling color gamut |
JP2021071905A (en) * | 2019-10-30 | 2021-05-06 | キヤノン株式会社 | Image processing system, image processing method and program |
JP7427423B2 (en) | 2019-10-30 | 2024-02-05 | キヤノン株式会社 | Image processing device, image processing method and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4845127B2 (en) | Image processing device | |
US7764411B2 (en) | Color processing apparatus and method, and storage medium storing color processing program | |
US8204304B2 (en) | Color gamut mapping by forming curved cross-sectional surfaces | |
US8139265B2 (en) | Color space conversion apparatus and method for controlling the same | |
JP2012029276A (en) | Image forming device, color adjustment method and color adjustment program | |
JP2004180013A (en) | Color conversion device and color conversion method | |
JP4562162B2 (en) | Color processing method and apparatus, computer program, and lookup table manufacturing method | |
JP4974853B2 (en) | Image processing apparatus, image processing method, and program | |
JP2005253072A (en) | System and method for gamut mapping control | |
JP2006340105A (en) | Image processing method, profile generating method, and image processing apparatus | |
US8773723B2 (en) | Generating color separation table for printer having color forming materials with high and low relative densities using a gamut boundary to limit use of dark color material | |
JP2010074317A (en) | Image processor, image processing program, and image processing method | |
JP2007028148A (en) | Apparatus, method and program for color conversion, and recording medium | |
US6995881B2 (en) | Image processing method and program capable of reducing graininess | |
JP5257158B2 (en) | Color conversion apparatus, color conversion method and program | |
JP5882763B2 (en) | Image processing apparatus and profile creation method | |
JP4471021B2 (en) | Color printing control apparatus, color printing control method, and color printing control program | |
JP2014135544A (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP4618683B2 (en) | Image processing apparatus, gamut correction method, image processing method, program, and recording medium | |
JP2011155352A (en) | Image processor, image processing method and computer-executable program | |
JP2008072550A (en) | Color processing method, color processing apparatus, image forming apparatus, program and recording medium | |
JP5021504B2 (en) | Computer-readable recording medium recording color profile creation apparatus, method and program | |
JP5630231B2 (en) | Color adjustment method, color adjustment apparatus, color adjustment program, and medium storing color adjustment program | |
JP2009296139A (en) | Image processor, image processing method and computer program | |
JP4740164B2 (en) | Image processing apparatus, image processing method, and image processing program |