JP2009219064A - Image processing method, image processor, printer, and image processing program - Google Patents

Image processing method, image processor, printer, and image processing program Download PDF

Info

Publication number
JP2009219064A
JP2009219064A JP2008063246A JP2008063246A JP2009219064A JP 2009219064 A JP2009219064 A JP 2009219064A JP 2008063246 A JP2008063246 A JP 2008063246A JP 2008063246 A JP2008063246 A JP 2008063246A JP 2009219064 A JP2009219064 A JP 2009219064A
Authority
JP
Japan
Prior art keywords
color
color gamut
printer
outer shell
conversion
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
Application number
JP2008063246A
Other languages
Japanese (ja)
Inventor
Takeshi Wada
健 和田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2008063246A priority Critical patent/JP2009219064A/en
Publication of JP2009219064A publication Critical patent/JP2009219064A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus that generates a color conversion table fast. <P>SOLUTION: An LUT for color conversion from device colors of a display 20 to device colors of a printer 40 is generated, a color gamut of the printer 40 is generated with a polygon, and it is determined whether a half-line extending from a gray axis of the color gamut to coordinates after conversion by a color table generating means comes in contact with the polygon plane; and an intersection with the polygon plane determined to be in contact is calculated, the distance from a reference point to the intersection is compared with the distance from the reference point to the coordinates after the mapping to determine whether the coordinates after the conversion by the color conversion generating means are in the color gamut, and coordinates determined to be outside the color gamut are re-mapped in the color gamut. The contact decision making targets the polygon plane decided to include an intersection with the coordinates obtained by last color conversion and a polygon plane enclosing a circumference thereof. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理方法、画像処理装置、プリンタおよび画像処理プログラムに関し、特に、第1の機器依存色の第1色空間と第2の機器依存色の第2色空間との対応関係を設定し、該対応関係に基づいて、前記第1色空間における第1の色を前記第2色空間における第2の色に変換する画像処理方法、画像処理装置、プリンタおよび画像処理プログラムに関する。   The present invention relates to an image processing method, an image processing apparatus, a printer, and an image processing program, and in particular, sets a correspondence relationship between a first color space of a first device-dependent color and a second color space of a second device-dependent color. And an image processing method, an image processing apparatus, a printer, and an image processing program for converting a first color in the first color space into a second color in the second color space based on the correspondence.

一般的に、デジタルスチルカメラ、スキャナ等の画像入力デバイス、プリンタのような出力デバイス、ディスプレイのような表示デバイス等の間では、色域(色再現域)が異なる。また、画像データであっても、色域の異なるものがある。色域が異なる場合、一方の色域で表現された画像データを他方の色域にて表示させる場合には、階調性や色再現性を保つためにカラーマッチング処理(色域変換処理)が行われる。
特開2007−189632号公報
Generally, color gamuts (color reproduction gamuts) differ among image input devices such as digital still cameras and scanners, output devices such as printers, display devices such as displays, and the like. Some image data have different color gamuts. When the color gamuts are different, when image data expressed in one color gamut is displayed in the other color gamut, color matching processing (color gamut conversion processing) is performed to maintain gradation and color reproducibility. Done.
JP 2007-189632 A

カラーマッチング処理は、一般に、各色域の代表的な格子点間を対応付ける色変換テーブル(LUT)を利用して行われる。このようなLUTは、例えば特許文献1に記載のように、入力デバイスのICCプロファイルと出力デバイスのICCプロファイルとを参照しつつ、両プロファイルを所定の接続空間にて対応付けることにより行われる。ただしこのような処理には時間がかかり、処理の高速化が望まれていた。   The color matching process is generally performed using a color conversion table (LUT) that associates representative grid points in each color gamut. Such an LUT is performed by associating both profiles in a predetermined connection space while referring to the ICC profile of the input device and the ICC profile of the output device, as described in Patent Document 1, for example. However, such processing takes time, and it is desired to increase the processing speed.

本発明は、前記課題に鑑みてなされたもので、色変換テーブルの作成を高速化することが可能な画像処理方法、画像処理装置、プリンタおよび画像処理プログラムの提供を目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an image processing method, an image processing apparatus, a printer, and an image processing program capable of speeding up the creation of a color conversion table.

前記課題を解決するために、本発明の画像処理方法では、第1の機器依存色の第1色空間と第2の機器依存色の第2色空間との対応関係を設定し、該対応関係に基づいて、前記第1色空間における第1の色を前記第2色空間における第2の色に変換する画像処理方法であって、色変換テーブル設定工程と、外殻設定工程と、検出工程と、内外判定工程と、マッピング工程と、を備える構成としてある。該構成において、前記色変換テーブル設定工程においては、前記第1の色を前記第2の色に変換する際に参照する色変換テーブルを所定の変換規則に基づいて設定する。前記外殻設定工程においては、複数の多角形平面を組合せて前記第2色空間の外殻を設定する。前記検出工程においては、前記第2色空間内の所定点を始点とし前記色変換テーブルに基づいて変換された色の色座標へと向かう半直線が交点を持つ多角形平面を検出する。前記内外判定工程においては、前記交点と前記色座標とを比較し、該座標が前記外殻内にあるか否かを判定する。前記マッピング工程においては、該座標が前記内外判定工程において前記外殻内に無いと判定された場合、該色を前記外殻内に対応付ける。以上の構成において、前記検出工程においては、まず直前に検出された多角形平面とその周囲の多角形平面とを検出対象とし、これらの多角形平面が交点を持たない場合に全ての多角形平面を検出対象とする。
すなわち、前記複数の多角形平面の何れかと前記半直線との当り判定を行って前記半直線と交点持つ多角形平面を検出するにあたり、全ての多角形平面を判定対象とするのではなく、最も当り判定されそうな多角形平面を予測し、該予測された多角形平面に当り判定を優先的に行うのである。これにより、より短時間で交点を持つ多角形平面が検出可能となり、処理を高速化できる。つまり、直前に色変換テーブルに基づいて変換された座標とその直後に色変換された座標とは、比較的近い座標値に色変換される可能性が高いため、直前に色変換された座標に対し交点有りと判定された多角形平面を中心として、該多角形平面に隣接する多角形平面を判定対象とすることにより、短時間で交点を持つ多角形平面を検出できる。なお、直接隣接する多角形平面で当り判定しなかった場合は、隣接する多角形平面に更に隣接する多角形平面を判定対象とする等、徐々に探索エリアを拡大するような手法を採用すればよい。
In order to solve the above problems, in the image processing method of the present invention, a correspondence relationship between the first color space of the first device-dependent color and the second color space of the second device-dependent color is set, and the correspondence relationship is set. An image processing method for converting a first color in the first color space into a second color in the second color space based on a color conversion table setting step, an outer shell setting step, and a detection step And an inside / outside determination step and a mapping step. In this configuration, in the color conversion table setting step, a color conversion table to be referred to when converting the first color to the second color is set based on a predetermined conversion rule. In the outer shell setting step, the outer shell of the second color space is set by combining a plurality of polygonal planes. In the detecting step, a polygonal plane having a half line that intersects with a half line from a predetermined point in the second color space to a color coordinate of the color converted based on the color conversion table is detected. In the inside / outside determination step, the intersection and the color coordinate are compared to determine whether the coordinate is within the outer shell. In the mapping step, when it is determined that the coordinates are not in the outer shell in the inner / outer determination step, the color is associated with the outer shell. In the above configuration, in the detection step, first, a polygon plane detected immediately before and a polygon plane around the polygon plane are detected, and all the polygon planes have no intersection when these polygon planes have no intersection. Is the detection target.
That is, when performing a hit determination between any of the plurality of polygon planes and the half line to detect a polygon plane having an intersection with the half line, not all polygon planes are to be determined. A polygon plane that is likely to be hit is predicted, and the hit determination is preferentially performed on the predicted polygon plane. Thereby, a polygonal plane having an intersection can be detected in a shorter time, and the processing can be speeded up. In other words, the coordinates converted immediately before based on the color conversion table and the coordinates converted immediately after that are highly likely to be color-converted to relatively close coordinate values. On the other hand, a polygonal plane having an intersection can be detected in a short time by setting a polygonal plane adjacent to the polygonal plane centering on the polygonal plane determined to have an intersection. In addition, if the hit determination is not performed on the directly adjacent polygon plane, a method that gradually expands the search area, such as a polygon plane further adjacent to the adjacent polygon plane, is adopted. Good.

ここで、機器独立色空間としては種々の色空間を採用することが可能であり、LabやJab、XYZ等種々の絶対色空間を採用可能である。第1および第2の機器依存色(機器依存色を有する画像機器)も特に限定されず、画像データを使用して所定の画像を扱う機器の機器依存色であれば良く、例えば、ディスプレイ,プリンタ,スキャナ,デジタルカメラ等種々の画像機器の機器依存色を採用可能である。むろん、第1と第2の機器依存色を有する機器は別体でなくてもよく、例えば、fax機は第1の画像機器としてのスキャナと第2の画像機器としてのプリンタとが一体になっていると言え、かかるfax機に本発明を適用することも可能である。   Here, various color spaces can be adopted as the device independent color space, and various absolute color spaces such as Lab, Jab, and XYZ can be adopted. The first and second device-dependent colors (image devices having device-dependent colors) are not particularly limited, and may be any device-dependent color of a device that handles a predetermined image using image data. For example, a display or a printer Device-dependent colors of various image devices such as scanners and digital cameras can be adopted. Of course, the devices having the first and second device-dependent colors may not be separate. For example, in a fax machine, a scanner as a first image device and a printer as a second image device are integrated. However, the present invention can be applied to such a fax machine.

また、本発明の選択的な一側面として、前記複数の多角形平面を明度と色相角とで並び替える並び替え工程を更に備え、前記交点検出工程においては、前記色座標の明度と色相角とに近似する多角形平面から順に検出対象とする構成としてもよい。すなわち直前に色変換された座標に対し交点有りと判定された多角形平面を中心として当り判定を行った結果、交点を有する多角形平面を発見できなかった場合には全ての多角形平面を判定対象とすることになるが、このときに色相角と明度とを拠り所にして判定順を決めることが可能になる。よって、全ての多角形平面に対して当り判定を実行することになっても、交点を有する多角形平面を効率的に発見可能となる。   Further, as a selective aspect of the present invention, the method further comprises a rearrangement step of rearranging the plurality of polygonal planes by brightness and hue angle, and in the intersection detection step, the brightness and hue angle of the color coordinates It is good also as a structure made into a detection target in an order from the polygonal plane approximated to. In other words, if all the polygonal planes that have intersections are not found as a result of hitting the polygonal plane that has been determined to have an intersection with the color-transformed coordinates immediately before, all polygonal planes are determined. At this time, the determination order can be determined based on the hue angle and lightness. Therefore, even if hit determination is executed for all polygon planes, polygon planes having intersections can be efficiently found.

また、本発明の選択的な一側面として、前記マッピング工程においては、前記検出手段によって検出された多角形平面とその周囲を囲む多角形平面の中から最近傍点を探索し、該最近傍店に対応付ける構成としてもよい。最近傍点は必ずしも交点を有する多角形平面とは限らないが、前記マッピング工程におけるマッピングが必要となる座標値が色域外殻から大きく離れて可能性は低く、交点を有する多角形平面の近傍に高確率で最近傍点が存在する。従って、いたずらに計算量を増加させずにマッピング先を決定する手法として、本選択的な一側面が適するのである。   Further, as a selective aspect of the present invention, in the mapping step, the nearest neighbor point is searched from the polygon plane detected by the detection means and the polygon plane surrounding the periphery, and the nearest store is searched. It is good also as a structure matched. The nearest neighbor point is not necessarily a polygonal plane having an intersection point, but the coordinate value that needs to be mapped in the mapping step is not likely to be far away from the color gamut outer shell, and it is unlikely to be high in the vicinity of the polygonal plane having the intersection point. There is a nearest point with probability. Therefore, this selective aspect is suitable as a technique for determining a mapping destination without unnecessarily increasing the amount of calculation.

また、本発明の選択的な一側面として、前記所定点が、前記第2色空間のグレー軸上の点である構成としてもよい。グレー軸は色域の略中心を通る軸であるため、グレー軸から伸びる半直線は高確率で色域外殻と一点で交わることになる。従って、当り判定や交点算出などにおいて、誤判定や誤った座標が算出される可能性が低くなり好適である。   Further, as a selective aspect of the present invention, the predetermined point may be a point on the gray axis of the second color space. Since the gray axis is an axis passing through the approximate center of the color gamut, the half line extending from the gray axis intersects the color gamut shell at a single point with a high probability. Therefore, the possibility of erroneous determination or incorrect coordinates being calculated in the hit determination or intersection calculation is reduced, which is preferable.

前述した画像処理方法は、他の方法の一環として実施されたり各工程に対応する手段を備えた画像処理装置や該方法で作成された色変換テーブルを備えた画像処理装置として実現されたりする等の各種の態様を含む。また、本発明は前記画像処理装置を備える画像処理システム、前述した方法の構成に対応した機能をコンピュータに実現させるプログラム、該プログラムを記録したコンピュータ読み取り可能な記録媒体、等としても実現可能である。これら画像処理システム、画像処理装置、画像処理プログラム、該プログラムを記録した媒体、の発明も、前述した作用、効果を奏する。むろん、請求項2〜4に記載した構成も、前記システムや前記装置や前記プログラムや前記記録媒体に適用可能である。   The image processing method described above may be implemented as part of another method, or may be realized as an image processing device provided with means corresponding to each process, or an image processing device provided with a color conversion table created by the method, etc. Including various embodiments. The present invention can also be realized as an image processing system including the image processing apparatus, a program for causing a computer to implement functions corresponding to the above-described method configuration, a computer-readable recording medium storing the program, and the like. . The inventions of the image processing system, the image processing apparatus, the image processing program, and the medium on which the program is recorded also have the above-described operations and effects. Of course, the configurations described in claims 2 to 4 are also applicable to the system, the apparatus, the program, and the recording medium.

また、本発明を画像処理装置として実現した場合の選択的な一側面として、前記画像処理装置は、GPU(Graphics Processing Unit)を搭載したグラフィックボードを更に備えており、前記検出手段は、前記GPUに前記半直線と交点を持つ前記多角形平面を検出させ、前記内外判定手段は、前記所定点から前記色座標までの距離及び前記所定点から前記交点までの距離、を前記GPUに算出させる構成としてもよい。すなわち通常のCPUよりも高速かつ画像処理に最適化されたGPUを使用することにより短時間で当り判定や距離算出が可能となる。また、ポリゴン(polygon)とレイ(ray)の交点を求める機能に特化されたAPIを呼び出し、該APIが前記GPUを利用して当り判定と距離算出を実行する構成としてもよい。   Further, as an optional aspect when the present invention is implemented as an image processing device, the image processing device further includes a graphic board equipped with a GPU (Graphics Processing Unit), and the detection means includes the GPU. The polygon plane having the intersection with the half line is detected, and the inside / outside determination means causes the GPU to calculate a distance from the predetermined point to the color coordinate and a distance from the predetermined point to the intersection. It is good. In other words, by using a GPU that is faster than a normal CPU and optimized for image processing, it is possible to perform hit determination and distance calculation in a short time. Further, an API specialized in a function for obtaining an intersection of a polygon and a ray may be called, and the API may use the GPU to execute a hit determination and a distance calculation.

以下、下記の順序に従って本発明の実施形態を説明する。
(1)画像処理装置の構成:
(2)LUT作成処理:
(3)印刷処理:
(4−1)色域変換処理:
(4−2)色域変換処理の変形例:
(5)色相間の尖頭値変動の平滑化処理:
(6)逆方向変換処理の高速化:
(7)色域の内外判定処理:
(8)まとめ:
Hereinafter, embodiments of the present invention will be described in the following order.
(1) Configuration of image processing apparatus:
(2) LUT creation processing:
(3) Printing process:
(4-1) Color gamut conversion processing:
(4-2) Modification of color gamut conversion process:
(5) Smoothing processing of peak value fluctuation between hues:
(6) Speeding up the reverse conversion process:
(7) Color gamut inside / outside determination processing:
(8) Summary:

(1)画像処理装置の構成:
図1は本発明の実施形態にかかる画像処理装置を実現するコンピュータのハードウェア構成を示すブロック図である。同図において、コンピュータ100は、CPU10aとRAM10bとを備える制御部10と、ROM11と、大容量記録装置としてのハードディスク(HDD)15と、外部入出力機器を接続するUSBI/F13と、ディスプレイ20が接続されるビデオI/F14と、操作入力用機器を接続する操作入力用機器I/F17とを備えており、バス16によって各構成要素が相互通信可能に接続されている。なお、USBI/F13には外部のプリンタ40が接続され、操作入力用機器I/F17にはキーボード30aとマウス30bが接続されている。
(1) Configuration of image processing apparatus:
FIG. 1 is a block diagram showing a hardware configuration of a computer that realizes an image processing apparatus according to an embodiment of the present invention. In FIG. 1, a computer 100 includes a control unit 10 having a CPU 10a and a RAM 10b, a ROM 11, a hard disk (HDD) 15 as a large capacity recording device, a USB I / F 13 for connecting an external input / output device, and a display 20. A video I / F 14 to be connected and an operation input device I / F 17 for connecting an operation input device are provided, and each component is connected by a bus 16 so as to be able to communicate with each other. Note that an external printer 40 is connected to the USB I / F 13, and a keyboard 30 a and a mouse 30 b are connected to the operation input device I / F 17.

CPU10aは、ROM11およびHDD15からプログラムデータを読み出してRAM10b上に展開することにより、BIOSやBIOS上で実行されるオペレーティングシステム(OS)、さらにはOS上で実行されるアプリケーションPを実行する。本実施形態においては、OSやアプリケーションPはプログラムデータとして予めHDD15に記憶されているが、記録媒体はこれに限定されるものではない。例えば、フレキシブルディスクやCD−ROMであってもよい。これらの記録媒体に記録されたプログラムはフレキシブルディスクドライブやCD−ROMドライブを介してコンピュータ100に読み込まれ、HDD15にインストールされたり直接実行されたりする。そして、RAM10b上に読み込まれてコンピュータを制御することになる。また、記録媒体はこれに限らず、光磁気ディスク、半導体デバイスとしてフラッシュカードなどの不揮発性メモリなどを利用することも可能である。また、モデムや通信回線を介して外部のファイルサーバにアクセスしてダウンロードする場合には通信回線が伝送媒体となって本発明が利用される。   The CPU 10a reads out program data from the ROM 11 and the HDD 15 and develops the program data on the RAM 10b, thereby executing an operating system (OS) executed on the BIOS or the BIOS and an application P executed on the OS. In the present embodiment, the OS and application P are stored in advance in the HDD 15 as program data, but the recording medium is not limited to this. For example, a flexible disk or a CD-ROM may be used. Programs recorded on these recording media are read into the computer 100 via a flexible disk drive or a CD-ROM drive, and installed in the HDD 15 or directly executed. Then, it is read onto the RAM 10b to control the computer. The recording medium is not limited to this, and a non-volatile memory such as a flash card can be used as a magneto-optical disk or a semiconductor device. In addition, when an external file server is accessed and downloaded via a modem or a communication line, the communication line becomes a transmission medium and the present invention is used.

図2はコンピュータ100のソフトウェア構成を示すブロック図である。同図において、コンピュータ100では、プリンタドライバ(PRTDRV)21と操作用入力機器ドライバ(DRV)22とディスプレイドライバ(DRV)23と色域変換モジュール24とがOSに組み込まれている。ディスプレイDRV23はディスプレイ20における画像データ等の表示を制御するドライバであり、操作用入力機器DRV22は前記キーボードやマウスからのコード信号を受信して所定の入力操作を受け付けるドライバである。色域変換モジュール24は、異なるデバイスの色域(色再現域)の対応関係を作成するとともに、該対応関係に基づいて、一のデバイスの色域の色を、他のデバイスの色域の色に変換する。なお、この変換を行う際に色や階調の再現性も調整出来るようになっている(以下、色域の調整と称する。)。またOS上ではAPL25が実行可能になっている。   FIG. 2 is a block diagram showing a software configuration of the computer 100. In the figure, in the computer 100, a printer driver (PRTDRV) 21, an operation input device driver (DRV) 22, a display driver (DRV) 23, and a color gamut conversion module 24 are incorporated in the OS. The display DRV 23 is a driver that controls display of image data and the like on the display 20, and the operation input device DRV 22 is a driver that receives a code signal from the keyboard and mouse and receives a predetermined input operation. The color gamut conversion module 24 creates a correspondence relationship between the color gamuts (color reproduction gamuts) of different devices and, based on the correspondence relationship, changes the color gamut color of one device to the color gamut color of another device. Convert to Note that the color and gradation reproducibility can be adjusted when performing this conversion (hereinafter referred to as color gamut adjustment). In addition, the APL 25 can be executed on the OS.

APL25は、表示されたHDD15に記録された画像データ15aをRAM12に読み出してレタッチ等の処理を実行可能であり、ディスプレイDRV23はRAM12に読み出された画像データ15aに基づいてディスプレイ20上に画像を表示させる。利用者が操作用入力機器30を操作するとその操作内容が操作用入力機器DRV22を介して取得されて内容が解釈されるようになっており、APL25はその操作内容に応じて印刷実行やレタッチなど種々の処理を行う。   The APL 25 can read the image data 15a recorded on the displayed HDD 15 to the RAM 12 and execute processing such as retouching. The display DRV 23 can display an image on the display 20 based on the image data 15a read to the RAM 12. Display. When the user operates the operation input device 30, the operation content is acquired via the operation input device DRV 22 and the content is interpreted, and the APL 25 executes printing or retouching according to the operation content. Various processes are performed.

また、利用者は当該APL25の実行下において、操作用入力機器30を操作して設定処理を行うことにより、所定のデバイスにおいて形成される画像を再現して表示させる事が可能である。この再現は、本実施形態においては前記色域変換モジュール24を利用して行われる。例えば、sRGB色空間で作成された画像データの表示を行うにあたり、ディスプレイの色域がsRGB色空間よりも狭い場合に、ディスプレイの色域からはみ出す部位がディスプレイ20の色域内にある所定の色で表現されるように色変換を行うように調整できる。すると画像データにおいて表現されている階調性や色彩がディスプレイ表示において維持されることになる。また、この画像データがプリンタ40の色域にて表現可能な所定の色で表現されるように色変換を行うと、所定のプリンタにおける印刷結果をディスプレイ上に再現できる。無論、印刷結果の再現においても、画像データの階調性や色彩が維持されるように色変換した上で印刷結果を再現してもよい。さらに、このように調整して表示された印刷結果のカラー画像をプリンタ40にて印刷させることも出来る。以下、色域変換モジュールにて実行される色域の調整の一例として、プリンタ40の印刷結果に調整を施してディスプレイ表示させる例について説明する。   In addition, the user can reproduce and display an image formed in a predetermined device by performing setting processing by operating the operation input device 30 under execution of the APL 25. This reproduction is performed using the color gamut conversion module 24 in the present embodiment. For example, when displaying the image data created in the sRGB color space, when the color gamut of the display is narrower than the sRGB color space, the portion that protrudes from the color gamut of the display is a predetermined color within the color gamut of the display 20. It can be adjusted to perform color conversion as expressed. Then, the gradation and color expressed in the image data are maintained in the display display. In addition, when color conversion is performed so that the image data is expressed in a predetermined color that can be expressed in the color gamut of the printer 40, a print result in the predetermined printer can be reproduced on the display. Of course, in the reproduction of the print result, the print result may be reproduced after performing color conversion so that the gradation and color of the image data are maintained. Furthermore, the printer 40 can print a color image of the print result displayed with such adjustment. Hereinafter, as an example of color gamut adjustment executed by the color gamut conversion module, an example in which the print result of the printer 40 is adjusted and displayed on the display will be described.

図3は、色域調整の設定処理を行う画面の一例を示している。該設定処理においては、入力側、出力側のデバイス選択、デバイスに対応するプロファイル(Device Model Profile: DMP)の選択、異なる色域の調整や変換の方式(Rendering Intent)を指定するプロファイル(Gamut Map Model Profile: GMMP)の選択、を行う。設定処理が完了して色域の変換が指示されると色域変換モジュール24が起動され、設定されたDMPやGMMPを参照しつつ、入力側デバイスの色域を出力側デバイスの色域に変換するためのLUT15bを作成し、HDD15に記憶する。このLUT15bの作成については後述する。次に、利用者がマウスを操作してプリンタ40の印刷結果の表示を指示すると色域の調整指示がなされ、画像データ15aが色域変換モジュール24に受け渡される。画像データ15aが色域変換モジュール24に受け渡されると図3に示す色変換処理が開始される。   FIG. 3 shows an example of a screen for performing color gamut adjustment setting processing. In the setting process, device selection on the input side and output side, selection of a profile (Device Model Profile: DMP) corresponding to the device, and a profile (Gamut Map) for specifying a different color gamut adjustment and conversion method (Rendering Intent) Model Profile: GMMP) is selected. When the setting process is completed and conversion of the color gamut is instructed, the color gamut conversion module 24 is activated, and the color gamut of the input side device is converted to the color gamut of the output side device while referring to the set DMP and GMMP. Is created and stored in the HDD 15. The creation of the LUT 15b will be described later. Next, when the user operates the mouse to instruct the display of the print result of the printer 40, an instruction to adjust the color gamut is made, and the image data 15a is transferred to the color gamut conversion module 24. When the image data 15a is transferred to the color gamut conversion module 24, the color conversion process shown in FIG. 3 is started.

なお、本実施形態では、色域変換モジュール24はLUT15bを作成した上で、該LUT15bを参照しつつ色域変換処理を実行するものとして説明を行うが、無論、動的にLUTを作成する構成としても構わない。例えば、画像データ15aを構成する色座標の入力された順にLUTを作成しつつ、前記色調整モジュール24bの色調整が実行されてもよい。また、このようにして作成されたLUT15bをHDD15に記憶しておき、同一の色域間の色域変換処理が指示された場合は作成済みのLUTを参照して色変換処理を行う等、種々の構成が可能である。   In the present embodiment, the color gamut conversion module 24 creates the LUT 15b and then executes the color gamut conversion process while referring to the LUT 15b. Of course, the color gamut conversion module 24 dynamically creates the LUT. It does not matter. For example, the color adjustment of the color adjustment module 24b may be executed while creating LUTs in the order in which the color coordinates constituting the image data 15a are input. Further, the LUT 15b created in this way is stored in the HDD 15, and when the gamut conversion processing between the same gamuts is instructed, the color conversion processing is performed by referring to the created LUT. Is possible.

ここで、図4を参照しつつ、色域変換モジュール24の構成を説明する。本実施形態の色域変換モジュール24は以下の各モジュールM1〜M4を備えている。XYZ値算出モジュールM1は入力側デバイスのDMPを参照しつつRGB値で表現された入力側デバイスの色域をCIE三刺激値XYZ値に変換する。XYZ値算出モジュールM2は出力側デバイスのDMPを参照しつつRGB値で表現された出力側デバイスの色域をCIE三刺激値XYZ値に変換する。CA変換モジュールM3はXYZ値算出モジュールM1,M2において算出されたXYZ値にカラーアピアランス(CA)変換式の順方向変換を行ってJ値を算出し、J色空間における入力デバイスの色域を確定する。色域マッピングモジュールM5はGMMPを参照しつつCA変換モジュールM3によって確定された入力側デバイスの色域を、同じくCA変換モジュールM3によって算出された出力側デバイスの色域へとマッピングする。CA変換モジュールM4は色域マッピングモジュールM5によって算出されたJ値にカラーアピアランス(CA)変換式の逆方向変換を行ってXYZ値を算出し、XYZ色空間における出力デバイスの色域を確定する。なお、各CA変換モジュールM3,M4の行うカラーアピアランス変換においては、入力もしくは出力デバイスに対して指定されたDMPに指定された観察条件(D55、D65等の光源情報)を考慮した変換が実行される。 Here, the configuration of the color gamut conversion module 24 will be described with reference to FIG. The color gamut conversion module 24 of this embodiment includes the following modules M1 to M4. The XYZ value calculation module M1 converts the color gamut of the input device expressed by RGB values into CIE tristimulus values XYZ values while referring to the DMP of the input device. The XYZ value calculation module M2 converts the color gamut of the output device expressed by RGB values into CIE tristimulus values XYZ values while referring to the DMP of the output device. CA conversion module M3 went forward conversion of the color appearance (CA) conversion formula into XYZ values calculated in XYZ value calculating module M1, M2 calculates the J * a * b * values, J * a * b * Determine the color gamut of the input device in the color space. The color gamut mapping module M5 maps the color gamut of the input device determined by the CA conversion module M3 with reference to the GMMP to the color gamut of the output device calculated by the CA conversion module M3. The CA conversion module M4 calculates the XYZ value by performing the reverse transformation of the color appearance (CA) conversion formula on the J * a * b * value calculated by the color gamut mapping module M5, and outputs the color of the output device in the XYZ color space. Determine the area. In the color appearance transformation performed by the respective CA conversion module M3, M4, conversion in consideration of the input or observation conditions specified in the specified DMP for the output device (D 55, D 65, etc. source information) Executed.

以上の各モジュールM1〜M4で利用されるプロファイルDMP1〜n、GMMP1〜nは、HDD15に記憶されている。各DMPにはsRGB色空間におけるデバイスの色再現域を測色値に変換するための対応関係および上述の観察条件が記述されており、GMMPには色域間を対応付ける変換式や条件式が記述されている。なお本実施形態においては、DMPに記述されているデバイスの色再現域をsRGB色空間における色再現範囲で記述してあるが、無論他の色空間で表現されていても構わない   The profiles DMP1 to n and GMMP1 to GMMPn used in the modules M1 to M4 are stored in the HDD 15. Each DMP describes the correspondence for converting the color gamut of the device in the sRGB color space to the colorimetric values and the above observation conditions, and GMMP describes the conversion formulas and conditional expressions for associating the color gamuts. Has been. In this embodiment, the device color reproduction gamut described in the DMP is described as a color reproduction range in the sRGB color space, but may of course be expressed in another color space.

DMPを利用して行われる色域の変換には、順方向変換(ICCプロファイルのAToB1Tagの処理に相当)と逆方向変換(ICCプロファイルのBToA1Tagnの処理に相当)がある。順方向変換はデバイス色からXYZ値への変換を行う順方向多次元LUTもしくは変換式で実現される。逆方向変換は、順方向変換の結果を利用して順方向多次元LUTの逆引きや回帰分析法による多項式パラメータの最適化等を行い、これにより作成されるXYZ値からデバイス色への変換を行う多次元LUTもしくは変換式で実現される。   The color gamut conversion performed using DMP includes forward conversion (corresponding to the AToB1Tag processing of the ICC profile) and backward conversion (corresponding to the BToA1Tagn processing of the ICC profile). The forward conversion is realized by a forward multidimensional LUT or a conversion formula for converting device colors into XYZ values. In reverse conversion, the result of forward conversion is used to reverse the forward multidimensional LUT, optimize the polynomial parameters by regression analysis, etc., and convert the generated XYZ values to device colors. This is realized by a multidimensional LUT or conversion formula to be performed.

カラーアピアランス変換では、XYZ値に対してCIECAM02等の色知覚モデルの順方向変換を適用してカラーアピアランス空間の色値を求める。このカラーアピアランス空間の色値(例えば、J値とする)は、概ねCIE三刺激値XYZから計算することができるようになっている。このJを利用することにより、より人間の視覚特性に適合した色域マッピングを行うことができる。カラーアピアランス空間の色値Jを得るための変換は、色順応変換、錐体応答変換、反対色応答変換により行われ、人間の視覚特性に近付くように変換される。色順応変換においては観察環境下の光源に対応した変換が行われる。なお、色知覚モデルとしてはCIECAM02、CIECAM97s等に限定される必要は無く、人間の色知覚パラメータJ(lightness), C(Chroma), Q(brightness), M(colorfulness), h(huequadrature又はhueangle), H(huequadrature又はhueangle)を予測できる色知覚モデルであれば、他の知覚モデルであっても構わない。 In the color appearance conversion, the forward direction conversion of a color perception model such as CIECAM02 is applied to the XYZ values to obtain the color values in the color appearance space. The color value of this color appearance space (for example, J * a * b * value) can be calculated from the CIE tristimulus values XYZ. By using this J * a * b * , it is possible to perform color gamut mapping more suitable for human visual characteristics. The conversion for obtaining the color value J * a * b * of the color appearance space is performed by chromatic adaptation conversion, cone response conversion, and opposite color response conversion, and is converted so as to approach human visual characteristics. In the chromatic adaptation conversion, conversion corresponding to the light source under the observation environment is performed. The color perception model need not be limited to CIECAM02, CIECAM97s, etc., and human color perception parameters J (lightness), C (Chroma), Q (brightness), M (colorfulness), h (huequadrature or hueangle) , H (huequadrature or hueangle) as long as it is a color perception model, other perception models may be used.

(2)LUT作成処理:
図5は、LUT作成作業のフローチャートである。この作業においては多くの演算処理を必要とするので、コンピュータを使用して演算を実行するのが好ましい。
まずステップS200にて、ディスプレイ20に対して選択されたDMP1を取得してディスプレイ20の色域を設定する。たとえばディスプレイ20がRGB各色256階調で表現されているのであれば、XYZ値算出モジュールM1が、各色256階調で全ての組合せを考慮しつつ公知の変換式でXYZ値に変換すればXYZ色空間におけるディスプレイ20の色域が確定する。このように変換されたXYZ値に対し、さらにCA変換モジュールM3が、DMP1に記載の観察条件を考慮したカラーアピアランス変換を行ってJ値を算出する。以上、ディスプレイ20のRGB値とJ値との対応関係を規定したLUTが第1色変換テーブルとなる。そして、J値を受け取った色域マッピングモジュールM5が、得られたJ値を包含する領域(例えば三次元凸包やポリゴン等)の作成を行って色域を設定する。色域は、得られたJab値を包含する三次元立体である。
(2) LUT creation processing:
FIG. 5 is a flowchart of LUT creation work. Since this operation requires a lot of calculation processing, it is preferable to execute the calculation using a computer.
First, in step S200, the selected DMP1 for the display 20 is acquired and the color gamut of the display 20 is set. For example, if the display 20 is expressed with 256 gradations for each of RGB colors, the XYZ value calculation module M1 converts XYZ values into XYZ values using a known conversion formula while considering all combinations for each color 256 gradations. The color gamut of the display 20 in the space is determined. The CA conversion module M3 further performs color appearance conversion in consideration of the observation conditions described in DMP1 with respect to the XYZ values converted in this way to calculate J * a * b * values. The LUT that defines the correspondence between the RGB values of the display 20 and the J * a * b * values is the first color conversion table. Then, J * a * b * gamut mapping module M5 which has received the value, the color gamut by performing the creation of a region encompassing the resulting J * a * b * values (for example, a three-dimensional convex hull and polygons, etc.) Set. The color gamut is a three-dimensional solid that encompasses the obtained Jab values.

続いてステップS210では、プリンタ40に対して選択されたDMP2を取得して、プリンタ40の色域を設定する。プリンタ40のCMYK階調データが各色256階調で表現されているのであれば、これらの各階調で表現可能な色域がsRGB色空間のどの範囲に該当するかがDMP2に記載されており、XYZ値算出モジュールM2は、この範囲においてRGB各色256階調の組み合わせを考慮しつつ公知の変換式でXYZ値に変換すればXYZ色空間におけるプリンタ40の色域が確定する。さらにCA変換モジュールM3が、DMP2に記載された観察条件を考慮したカラーアピアランス変換をXYZ値に対して行ってJ値を算出する。以上、プリンタ40のRGB値とJ値との対応関係を規定したLUTが第2色変換テーブルとなる。そしてJ値を受け取った色域マッピングモジュールM5が、得られたJ値を包含する領域(例えば三次元凸包やポリゴン等)の作成を行って色域を設定する。 In step S210, the selected DMP2 is acquired for the printer 40, and the color gamut of the printer 40 is set. If the CMYK gradation data of the printer 40 is expressed with 256 gradations for each color, DMP2 describes which range in the sRGB color space the color gamut that can be expressed with these gradations corresponds to. The XYZ value calculation module M2 determines the color gamut of the printer 40 in the XYZ color space by converting the XYZ values into XYZ values using a known conversion formula while considering the combination of 256 gradations of each RGB color in this range. Further, the CA conversion module M3 performs color appearance conversion in consideration of the observation conditions described in DMP2 with respect to the XYZ values to calculate J * a * b * values. The LUT that defines the correspondence between the RGB values of the printer 40 and the J * a * b * values is the second color conversion table. The J * a * b * gamut mapping module M5 which has received the value, the color gamut by performing the creation of the resulting J * a * b * including the value area (for example, a three-dimensional convex hull and polygons, etc.) Set.

以上のように、ディスプレイ20およびプリンタ40の色域を確定した後、ステップS220にて色域変換処理を行ってJ色空間においてディスプレイ色域をプリンタ色域内にマッピングする。本願における色域変換処理においては、高明度においては彩度と明度の双方を変化させ、低明度においては明度を維持しつつ彩度を変化させるマッピングを行っている。従って、ディスプレイの色をプリンタの色域にて再現するにあたり、高明度においては高彩度の階調性が向上して色再現が良好になり、低明度においては暗部の階調性が向上する。この色域変換処理については後述する。 As described above, after determining the color gamuts of the display 20 and the printer 40, color gamut conversion processing is performed in step S220 to map the display color gamut in the printer color gamut in the J * a * b * color space. In the color gamut conversion process in the present application, mapping is performed in which both saturation and brightness are changed at high brightness, and saturation is changed while maintaining brightness at low brightness. Therefore, when reproducing the color of the display in the color gamut of the printer, the gradation of high saturation is improved at high brightness and the color reproduction is improved, and the gradation of the dark portion is improved at low brightness. This color gamut conversion process will be described later.

以上の変換によりディスプレイ色域とプリンタ色域との対応関係が規定されたことになるので、ステップS230においては色変換時の補間演算に必要な代表点を抽出してLUT15bを作成する。すなわち、前記第1色変換テーブルに基づいてディスプレイ20のRGB値をXYZ値に変換し、該XYZ値に色域変換処理を行ってプリンタ40の色再現域内に変換し、変換されたXYZ値を前記第2色変換テーブルに基づく逆引きによりプリンタ40のRGB値に変換して、sRGB色空間においてディスプレイ20のRGB値をプリンタ40のRGB値に対応付けるLUT15bを作成する。なお、色変換処理後のXYZ値は、第2色変換テーブルに記載されている点とは限らないため、近い値のXYZ値を第2色変換テーブルから探索し、色変換処理後のXYZ値を囲む数点のXYZ値を特定して、特定されたXYZ値に対応するRGB値から補間演算することにより、色変換処理後のXYZ値に対応するRGB値を決定することになる。   Since the correspondence between the display color gamut and the printer color gamut is defined by the above conversion, in step S230, representative points necessary for the interpolation calculation at the time of color conversion are extracted to create the LUT 15b. That is, the RGB values of the display 20 are converted into XYZ values based on the first color conversion table, the color gamut conversion processing is performed on the XYZ values, and the converted XYZ values are converted into the color gamut of the printer 40. By converting the RGB values of the printer 40 by reverse lookup based on the second color conversion table, an LUT 15b that associates the RGB values of the display 20 with the RGB values of the printer 40 in the sRGB color space is created. Since the XYZ values after the color conversion process are not necessarily the points described in the second color conversion table, the XYZ values after the color conversion process are searched from the second color conversion table for a close XYZ value. By specifying the XYZ values at several points surrounding the image and performing interpolation calculation from the RGB values corresponding to the specified XYZ values, the RGB values corresponding to the XYZ values after the color conversion process are determined.

ただし、RGB値を決定するまでに変換処理や演算が行われるため、決定されたRGB値がsRGB色空間におけるプリンタ色域から外れてしまう可能性もある。そこでステップS240においては、ディスプレイ20色域を包含する領域(例えば三次元凸包やポリゴン等)の作成を行ってsRGB色空間における色域を設定し、後述の色域内外判定処理を行うことになる。この結果設定されたsRGB色空間におけるプリンタの色域は、sRGB色空間におけるディスプレイの色域と一対一の対応関係にある。以上のようにして作成・設定されたLUT15bを参照して画像データ15aを変換することにより、プリンタ40の色再現範囲に色変換された画像をディスプレイ20上に再現できる。   However, since conversion processing and calculation are performed before the RGB value is determined, the determined RGB value may be out of the printer color gamut in the sRGB color space. Therefore, in step S240, an area including the display 20 color gamut (for example, a three-dimensional convex hull or polygon) is created to set a color gamut in the sRGB color space, and a color gamut inside / outside determination process described later is performed. Become. The printer color gamut in the sRGB color space thus set has a one-to-one correspondence with the display color gamut in the sRGB color space. By converting the image data 15a with reference to the LUT 15b created and set as described above, an image color-converted to the color reproduction range of the printer 40 can be reproduced on the display 20.

なお、前述のDMPやGMMPは必要に応じて追加したり変更したりすることが可能であり、ディスプレイ20やプリンタ40の機種変更、プリンタ40で使用するインク種類やメディア種類の変更などに容易に対応することが出来る。   The above-mentioned DMP and GMMP can be added or changed as necessary, and it is easy to change the model of the display 20 or the printer 40, change the ink type or media type used in the printer 40, etc. Can respond.

(3)印刷処理:
ここで、LUT15bを利用した印刷処理について以下に説明する。PRTDRV21が印刷実行指示を受け取ると、画像データ15aが画像データ取得モジュール21aに取得され、画像データ取得モジュール21aは前記色変換モジュール21bを起動する。色変換モジュール21bは、RGB階調値をCMYK階調値に変換するモジュールであり、画像データ15aの各ドットデータをCMYKのドットデータに変換する。このとき色変換モジュール21bは、HDD15に保存されたLUT15bとLUT15cを参照して補間演算を行うようになっている。LUT15cはsRGB値をCMYK値に変換するLUTである。なお、本実施形態においては、色域変換モジュール24が予めLUT15bを作成しており、この作成済みのLUT15bを色変換モジュール21bが取得して利用する構成として記載してあるが、無論、色変換モジュール21bの求めに応じて色域変換モジュール24がLUT15bを作成して色変換モジュール21bに供給する構成としても構わない。
(3) Printing process:
Here, a printing process using the LUT 15b will be described below. When the PRTDRV 21 receives a print execution instruction, the image data 15a is acquired by the image data acquisition module 21a, and the image data acquisition module 21a activates the color conversion module 21b. The color conversion module 21b is a module that converts RGB gradation values into CMYK gradation values, and converts each dot data of the image data 15a into CMYK dot data. At this time, the color conversion module 21b performs an interpolation operation with reference to the LUT 15b and the LUT 15c stored in the HDD 15. The LUT 15c is an LUT that converts sRGB values into CMYK values. In the present embodiment, the color gamut conversion module 24 creates the LUT 15b in advance, and the created LUT 15b is acquired and used by the color conversion module 21b. The color gamut conversion module 24 may create the LUT 15b and supply it to the color conversion module 21b in response to the request of the module 21b.

色変換モジュール21bが色変換を行ってCMYKの階調データを生成すると、当該CMYKの階調データは前記ハーフトーン処理モジュール21cに受け渡される。ハーフトーン処理モジュール21cは、各ドットのCMYK階調値を変換してインク滴の記録密度で表現するためのハーフトーン処理を行うモジュールであり、変換後の記録密度でインクを付着させるためのヘッド駆動データを生成する。印刷データ生成モジュール21dはかかるヘッド駆動データを受け取って、プリンタ40で使用される順番に並べ替える。すなわち、プリンタ40においてはインク吐出デバイスとして図示しない吐出ノズルアレイが搭載されており、当該ノズルアレイでは副走査方向に複数の吐出ノズルが並設されるため、副走査方向に数ドット分間離れたデータが同時に使用される。   When the color conversion module 21b performs color conversion to generate CMYK gradation data, the CMYK gradation data is transferred to the halftone processing module 21c. The halftone processing module 21c is a module that performs a halftone process for converting the CMYK gradation value of each dot and expressing it with the recording density of the ink droplets, and a head for attaching ink at the converted recording density. Generate drive data. The print data generation module 21d receives such head drive data and rearranges them in the order used by the printer 40. That is, in the printer 40, an ejection nozzle array (not shown) is mounted as an ink ejection device, and in the nozzle array, a plurality of ejection nozzles are arranged in parallel in the sub-scanning direction, and therefore data separated by several dots in the sub-scanning direction. Are used simultaneously.

そこで、主走査方向に並ぶデータのうち同時に使用されるべきものがプリンタ40にて同時にバッファリングされるように順番に並べ替えるラスタライズを行う。このラスタライズの後、画像の解像度などの所定の情報を付加して印刷データを生成し、前記USBI/F13を介してプリンタ40に出力する。プリンタ40においては当該印刷データに基づいて前記ディスプレイ20に表示された画像を印刷する。   Therefore, rasterization is performed in which data arranged in the main scanning direction is rearranged in order so that data to be used at the same time is buffered by the printer 40 at the same time. After the rasterization, print data is generated by adding predetermined information such as the resolution of the image, and is output to the printer 40 via the USB I / F 13. The printer 40 prints the image displayed on the display 20 based on the print data.

(4−1)色域変換処理
次に、前記ステップS220における色域変換処理を詳細に説明する。図6はディスプレイの色域とプリンタの色域とをJ空間における所定の色相角θにて切断した状態を示す模式図である。なお同図において横軸は彩度C(=(a+b1/2)、縦軸は明度Jである。本実施形態においては、色域変換処理にあたりディスプレイ色域のうちプリンタ色域の外部および外殻付近の領域を、プリンタ色域の外殻付近にマッピングする。なお、ディスプレイ色域のうちプリンタ色域の外殻付近を除いた内部の領域については、同一座標値にマッピングすることになる。
(4-1) Color Gamut Conversion Processing Next, the color gamut conversion processing in step S220 will be described in detail. FIG. 6 is a schematic diagram showing a state in which the color gamut of the display and the color gamut of the printer are cut at a predetermined hue angle θ in the J * a * b * space. In the figure, the horizontal axis represents saturation C (= (a 2 + b 2 ) 1/2 ), and the vertical axis represents lightness J. In the present embodiment, in the color gamut conversion process, areas outside the printer color gamut and near the outer shell in the display color gamut are mapped near the outer shell of the printer color gamut. It should be noted that the internal area of the display color gamut excluding the vicinity of the outer shell of the printer color gamut is mapped to the same coordinate value.

本実施形態における色域変換処理では、各色相角で切断したプリンタ色域において最大彩度Cmaxを示す座標(Cmax,J)の明度Jを境に、高明度側と低明度側とで異なるマッピングアルゴリズムを採用する。以下、(Cmax,J)を尖頭(cusp)と呼び、尖頭の明度を尖頭値と呼ぶことにする。図7は本実施形態における圧縮アルゴリズムを説明する図である。本実施形態の圧縮アルゴリズムは、尖頭値よりも高明度側においては、例えばSGCK(Sigmoidal Gaussian Cusp Knee)のように明度維持を重視しつつも彩度と明度の双方を圧縮するアルゴリズム(第1圧縮アルゴリズム)を採用するとともに、尖頭値よりも低明度側においては、例えばBasicPhoto((登録商標)Microsoft)のように明度を維持しつつ彩度を圧縮するアルゴリズム(第2圧縮アルゴリズム)を採用してある。以下の説明においてはSGCKとBasicPhotoを例にとって説明を行う。 In the color gamut conversion processing in the present embodiment, the boundary of lightness J 0 of the coordinate indicating the maximum chroma C max in the printer gamut cut at each hue angle (C max, J 0), the high brightness side and the low brightness side Different mapping algorithms are adopted. Hereinafter, (C max , J 0 ) is referred to as a peak (cusp), and the brightness of the peak is referred to as a peak value. FIG. 7 is a diagram for explaining a compression algorithm in the present embodiment. The compression algorithm of the present embodiment is an algorithm that compresses both saturation and lightness on the higher lightness side than the peak value while placing importance on maintaining the lightness, such as SGCK (Sigmoidal Gaussian Cusp Knee). Compression algorithm), and on the lower brightness side than the peak value, an algorithm (second compression algorithm) that compresses the saturation while maintaining the brightness, such as BasicPhoto (registered trademark Microsoft), is adopted. It is. In the following description, SGCK and BasicPhoto will be described as examples.

各圧縮アルゴリズムにおいては、まず、ディスプレイ色域がプリンタ色域の内部に収まっているか否かの内外判定が行われる。SGCKの内外判定では、(0,J)と判定対象の色点(C,J)とを結ぶ直線とディスプレイ色域の外殻との交点(C,J)が、プリンタ色域内であるか否かの判定を行う。一方、BasicPhotoの内外判定では、判定対象の色点(C’,J’)を含む直線J=J’とディスプレイ色域の外殻との交点(C’,J’)が、プリンタ色域内であるか否かの判定を行う。ここで、SGCKにおいて交点(C,J)を内外判定の判定対象とし、BasicPhotoにおいて交点(C’,J’)を内外判定の判定対象としている理由は、SGCKの圧縮方向が(0,J)方向でありBasicPhotoの圧縮方向がJ=J’方向だからである。なお、他の圧縮アルゴリズムであれば判定対象色点から圧縮方向に延びる直線とディスプレイ色域外殻との交点の内外判定を行うことになる。この内外判定において交点がプリンタ色域内と判定された色点については、座標値を変更することなくマッピングされる。 In each compression algorithm, first, whether the display color gamut is within the printer color gamut is determined. In the SGCK inside / outside determination, the intersection (C I , J I ) between the straight line connecting (0, J 0 ) and the color point (C, J) to be determined and the outer shell of the display color gamut is within the printer color gamut. It is determined whether or not there is. On the other hand, in the basic photo inside / outside determination, the intersection (C I ', J') between the straight line J = J 'including the color point (C', J ') to be determined and the outer shell of the display color gamut is within the printer color gamut. It is determined whether or not. Here, in SGCK, the intersection (C I , J I ) is the determination target for the inside / outside determination, and in Basic Photo, the intersection (C I ′, J ′) is the determination target for the inside / outside determination, because the SGCK compression direction is (0 , J 0 ) direction and the compression direction of BasicPhoto is the J = J ′ direction. For other compression algorithms, the inside / outside determination of the intersection of the straight line extending in the compression direction from the determination target color point and the display color gamut outer shell is performed. Color points for which the intersection point is determined to be within the printer color gamut in this inside / outside determination are mapped without changing the coordinate values.

一方、内外判定において交点(C,J)や交点(C’,J’)がプリンタ色域外と判定された色点については、圧縮対象の色点であるか否かを判定するための圧縮対象判定が行われる。圧縮対象判定は、処理対象の色点がプリンタ色域における所定の非圧縮領域P1の内部であるか否かを判定することによって行われる。本実施形態における非圧縮領域P1は、プリンタ色域を彩度方向に90%に圧縮した領域であり、該非圧縮領域P1内の彩度はプリンタ色域外殻における彩度の90%以下である。この非圧縮領域P1に位置するディスプレイ色域は、圧縮されずにプリンタ色域の同一の座標値にマッピングされる。これに対し、非圧縮領域P1の外部にはみ出しているディスプレイ色域は、線型圧縮されて圧縮領域P2に対応付けられる。圧縮領域P2は、プリンタ色域の外殻付近に設定される領域であり、本実施形態においては、非圧縮領域P1を除いた残りのプリンタ色域が該当する。 On the other hand, in order to determine whether or not the intersection (C I , J I ) or the intersection (C I ′, J ′) in the inside / outside determination is out of the printer color gamut is a color point to be compressed. The compression target determination is performed. The compression target determination is performed by determining whether or not the color point to be processed is inside a predetermined uncompressed region P1 in the printer color gamut. The uncompressed area P1 in this embodiment is an area in which the printer color gamut is compressed to 90% in the saturation direction, and the saturation in the uncompressed area P1 is 90% or less of the saturation in the printer color gamut outer shell. The display color gamut located in the uncompressed area P1 is mapped to the same coordinate value of the printer color gamut without being compressed. On the other hand, the display color gamut that protrudes outside the uncompressed area P1 is linearly compressed and associated with the compressed area P2. The compression area P2 is an area set in the vicinity of the outer shell of the printer color gamut, and in this embodiment, the remaining printer color gamut excluding the non-compression area P1 corresponds to the compression area P2.

なお、本実施形態では非圧縮領域P1をプリンタ色域の90%として記載してあるが、無論このパーセンテージに限るものではなく、0より大きく100未満の任意のパーセンテージを適宜採用可能である。また、必ずしも全明度域に亘って同一のパーセンテージで規定する必要もなく、非圧縮領域P1としては、プリンタ色域の外殻を含みつつプリンタ色域内部に広がる領域であれば、各明度における非圧縮領域P1のサイズを変えて様々な範囲を設定可能である。   In the present embodiment, the non-compressed area P1 is described as 90% of the printer color gamut. However, the present invention is not limited to this percentage, and any percentage greater than 0 and less than 100 can be adopted as appropriate. Further, it is not always necessary to specify the same percentage over the entire lightness range, and the non-compressed region P1 is a non-compressed region P1 as long as it is a region that includes the outer shell of the printer color gamut and extends inside the printer color gamut. Various ranges can be set by changing the size of the compression region P1.

圧縮対象判定が終了すると、第1圧縮アルゴリズムにおいては、圧縮対象と判定された色点に対し、図7に示すような線型的なマッピングが行われる。図7は第1圧縮アルゴリズムを説明する図である。同図に示すマッピングは、例えば下記(1)式により表すことが出来る。

ここで、(C,J)は圧縮前の色点の座標であり、(Cnew,Jnew)は圧縮後の色点の座標である。また、(0,J)と色点(C,J)とを結ぶ直線上において、(0,J)から色点までの距離をD、(0,J)から非圧縮領域P1の外殻までの距離をD、(0,J)からディスプレイ色域の外殻までの距離をD、(0,J)からプリンタ色域の外殻までの距離をDとしてある。
When the compression target determination is completed, in the first compression algorithm, linear mapping as shown in FIG. 7 is performed on the color point determined as the compression target. FIG. 7 is a diagram for explaining the first compression algorithm. The mapping shown in the figure can be expressed by, for example, the following formula (1).

Here, (C, J) is the coordinate of the color point before compression, and (C new , J new ) is the coordinate of the color point after compression. In addition, on the straight line connecting (0, J 0 ) and the color point (C, J), the distance from (0, J 0 ) to the color point is set to D 1 , (0, J 0 ) to the uncompressed region P 1. D 2 the distance to the outer shell of, as (0, J 0) distance from to the outer shell of the display color gamut of D 3, (0, J 0 ) D 4 the distance to the outer shell of the printer gamut from is there.

すなわち、前記式(1)では、非圧縮領域P1の外殻から色点までの距離(C−D)に対し、非圧縮領域P1の外殻からディスプレイ色域の外殻までの距離(D−D)と非圧縮領域P1の外殻からプリンタ色域の外殻までの距離(D−D)の比を乗ずることにより、非圧縮領域P1の外殻とディスプレイ色域の外殻との間における色点の位置関係を、非圧縮領域P1の外殻とプリンタ色域の外殻との間に規格化して再現してある。以上の圧縮により、プリンタ色域外の色点のうち尖頭値よりも高明度の色点は、明度と彩度とを圧縮されてプリンタ色域内部の圧縮領域P2にマッピングされることになる。なお、式(1)の圧縮アルゴリズムは一例であり、線形的なマッピングに限らず非線形的なアルゴリズムでマッピングしても無論構わない。 That is, in the above formula (1), the distance from the outer shell of the non-compressed region P1 to the outer shell of the display color gamut (C 1 -D 2 ) D 3 -D 2 ) and the ratio of the distance (D 4 -D 2 ) from the outer shell of the non-compressed region P1 to the outer shell of the printer color gamut, so that the outer shell of the non-compressed region P1 and the display color gamut The positional relationship of the color point between the outer shell and the outer shell of the non-compressed region P1 is normalized and reproduced between the outer shell of the printer color gamut. As a result of the above compression, the color point having a lightness higher than the peak value among the color points outside the printer color gamut is mapped to the compression region P2 inside the printer color gamut by compressing the lightness and the saturation. In addition, the compression algorithm of Formula (1) is an example, and it does not matter even if it maps not only with linear mapping but with a nonlinear algorithm.

一方、第2圧縮アルゴリズムにおいては、圧縮対象と判定された色点に対し、図8に示すようにな線形的なマッピングが行われる。図8は第2圧縮アルゴリズムを説明する図である。同図に示すマッピングは、例えば下記(2)式により表すことができる。

ここで、(C,J)は圧縮前の色点の座標、(Cnew,Jnew)は圧縮後の色点の座標である。また、明度Jにおける非圧縮領域P1の外殻の彩度をC、明度Jにおけるプリンタ色域の外殻の彩度をC、明度Jにおけるディスプレイ色域の外殻の彩度をCとしてある。前記式(2)では、非圧縮領域P1の外殻から色点までの距離(C−C)に対し、非圧縮領域P1の外殻からディスプレイ色域の外殻までの距離(C−C)と非圧縮領域P1の外殻からプリンタ色域の外殻までの距離(C−C)の比を乗ずることにより、非圧縮領域P1の外殻とディスプレイ色域の外殻との間における色点の位置関係を、非圧縮領域P1の外殻とプリンタ色域の外殻との間に規格化して再現してある。以上の圧縮により、プリンタ色域外の色点のうち尖頭値よりも低明度の色点は、明度を維持しつつ彩度を圧縮されてプリンタ色域内の圧縮領域P2にマッピングされることになる。なお、式(2)の圧縮アルゴリズムは一例であり、線形的なマッピングに限らず非線形的なアルゴリズムでマッピングしても無論構わない。
On the other hand, in the second compression algorithm, linear mapping as shown in FIG. 8 is performed on the color points determined to be compressed. FIG. 8 is a diagram for explaining the second compression algorithm. The mapping shown in the figure can be expressed by the following equation (2), for example.

Here, (C, J) is the coordinate of the color point before compression, and (C new , J new ) is the coordinate of the color point after compression. Further, the saturation of the outer shell of the uncompressed region P1 at lightness J is C 1 , the saturation of the outer shell of the printer color gamut at lightness J is C 2 , and the saturation of the outer shell of the display color gamut at lightness J is C 3. It is as. In the equation (2), the distance (C 3 − from the outer shell of the non-compressed region P1 to the outer shell of the display color gamut with respect to the distance (C−C 1 ) from the outer shell of the non-compressed region P1 to the color point. the C 1) and multiplying the ratio of the distance from the outer shell of the uncompressed region P1 to the outer shell of the printer gamut (C 2 -C 1), the outer shell and the outer shell of the display color gamut of the uncompressed region P1 The positional relationship between the color points is normalized and reproduced between the outer shell of the non-compressed region P1 and the outer shell of the printer color gamut. As a result of the above compression, among the color points outside the printer color gamut, color points having a lightness lower than the peak value are mapped to the compression region P2 within the printer color gamut by compressing the saturation while maintaining the lightness. . In addition, the compression algorithm of Formula (2) is an example, and it does not matter even if it maps not only with linear mapping but with a nonlinear algorithm.

以上説明した第1圧縮アルゴリズムにおいては、尖頭値から離れるほど明度の圧縮度合が高まり、尖頭値に近づくほど明度の圧縮度合が低くなり、尖頭値Jにおいては明度の圧縮率が0となる。もちろん、第2圧縮アルゴリズムにおいては、明度の大小に関わらず明度が維持されている。すなわち、尖頭値においては、第1圧縮アルゴリズムの圧縮率と圧縮方向は、第2圧縮アルゴリズムの圧縮率と圧縮方向に一致することになる。従って、尖頭値を挟んで異なる圧縮アルゴリズムを採用しながらも、マッピング後の色点間で尖頭値における連続性が確保されるし、尖頭値付近における明度の逆転も防止されることになる。明度の逆転を防止することにより、彩度よりも明度に対して感度が高い人間の目に対し、自然な印象を与える印刷結果を実現する色域変換が実現可能となる。 Or more at the first compression algorithm described, as increased compression degree of brightness away from the peak value, the compression degree of brightness closer to the peak value is low, the brightness of the compression ratio in the peak J 0 0 It becomes. Of course, in the second compression algorithm, the lightness is maintained regardless of the lightness. That is, at the peak value, the compression rate and the compression direction of the first compression algorithm coincide with the compression rate and the compression direction of the second compression algorithm. Therefore, while adopting different compression algorithms across the peak value, continuity in the peak value is ensured between the mapped color points, and brightness reversal in the vicinity of the peak value is also prevented. Become. By preventing the reversal of lightness, it is possible to realize color gamut conversion that realizes a print result that gives a natural impression to human eyes that are more sensitive to lightness than saturation.

図9は、以上説明した尖頭値を境に圧縮アルゴリズムを使い分けることによる作用効果を説明する図である。同図は緑色の階調性を示す図であり、円の左下から右上にかけて緑色の明度を連続的に変化させた画像データを各圧縮アルゴリズムでマッピングして印刷してある。図9(a)は全明度域に亘ってBasicPhotoでマッピングした場合の印刷結果、図9(b)は全明度域に亘ってSGCKでマッピングした場合の印刷結果、図9(c)は本願の圧縮アルゴリズムでマッピングした場合の印刷結果、をそれぞれ示している。BasicPhotoでマッピングした図9(a)の印刷結果では右上の高階調が白っぽくなっており見栄えが悪くなっており、SGCKでマッピングした図9(b)の印刷結果では、暗部に明度が大きく変わる箇所があるために暗部の階調性が悪く、黒の三日月がくっきりと見えている。これに対し、本実施形態の色域変換処理を行ってマッピングした図9(c)では高彩度において見栄え良く、暗部において階調性が維持されていることが分かる。   FIG. 9 is a diagram for explaining the effect of using different compression algorithms with the above-described peak value as a boundary. This figure shows the gradation of green, and image data in which the brightness of green is continuously changed from the lower left to the upper right of the circle is mapped and printed by each compression algorithm. 9A is a printing result when mapping is performed with BasicPhoto over the entire brightness range, FIG. 9B is a printing result when mapping is performed with SGCK over the entire brightness range, and FIG. Print results when mapping is performed using a compression algorithm are shown. In the printing result of FIG. 9A mapped with BasicPhoto, the high gradation in the upper right is whitish and looks bad, and in the printing result of FIG. 9B mapped with SGCK, the brightness changes greatly in the dark part. Therefore, the gradation in the dark part is poor and the black crescent moon is clearly visible. On the other hand, in FIG. 9C mapped by performing the color gamut conversion processing of the present embodiment, it can be seen that the gradation is good in the high saturation and the gradation is maintained in the dark portion.

図10は、前記式(1)(2)を使用して行う色域変換処理のフローチャートである。同図において、まず、ステップS300で処理対象の色相角θを決定し、ステップS305で該色相角θにおける初期座標(C,J)を決定する。そしてステップS310にて色相角θにおけるプリンタ色域の尖頭値Jを取得し、ステップS315において、初期座標の色点に対しプリンタ色域の内外判定を行う。内外判定の結果、プリンタ色域の内部と判定されると、ステップS320にて(C,J)と同一の座標値を有するプリンタ色域の色点にマッピングする。一方、プリンタ色域の外部と判定されると、ステップS310で取得した尖頭値に基づいてステップS325にて何れの圧縮アルゴリズムを使用するかを決定する。そして決定された圧縮アルゴリズムに従ってステップS330で圧縮先の座標(Cnew,Jnew)を決定し、この座標にマッピングする。 FIG. 10 is a flowchart of the color gamut conversion process performed using the equations (1) and (2). In the figure, first, the hue angle θ to be processed is determined in step S300, and initial coordinates (C, J) at the hue angle θ are determined in step S305. And it obtains the peak value J 0 of the printer gamut in the hue angle θ at step S310, the in step S315, performs outside judgment of the printer gamut to the color point of the initial coordinate. As a result of the inside / outside determination, if the inside of the printer color gamut is determined, the color is mapped to the color point of the printer color gamut having the same coordinate value as (C, J) in step S320. On the other hand, if it is determined that it is outside the printer color gamut, it is determined which compression algorithm to use in step S325 based on the peak value acquired in step S310. In step S330, the coordinates (C new , J new ) of the compression destination are determined according to the determined compression algorithm, and mapped to these coordinates.

このようにしてステップS315,S330にて座標(C,J)のマッピングが完了すると、ステップS335にて全座標に対する(Cnew,Jnew)の演算が終了したか否かを判断する。ここで、本色域変換処理はLUTを作成するための一過程としての処理であることから、全座標について演算が終了したか否か判別すると言っても、当該LUTを作成するために必要十分な座標に対する演算が終了したか否を判別すれば十分であり、整数座標値のみに対して演算したり、J空間で所定ピッチの格子点を考えてこの格子点についてのみ演算するようにすること等種々の態様を採用可能である。 In this way, when the mapping of the coordinates (C, J) is completed in steps S315 and S330, it is determined in step S335 whether or not the calculation of (C new , J new ) for all coordinates has been completed. Here, since this color gamut conversion process is a process as a process for creating an LUT, even if it is determined whether or not the calculation has been completed for all coordinates, it is necessary and sufficient to create the LUT. It is sufficient to determine whether or not the calculation for the coordinates has been completed. The calculation is performed only on the integer coordinate value, or the calculation is performed only for the lattice point in consideration of the lattice point having a predetermined pitch in the J * a * b * space. Various modes such as making it possible can be adopted.

ステップS335にて全座標について演算が終了したと判別されないときには、ステップS345にて次の演算候補座標(C,L)をセットし、ステップS315以降の処理を繰り返す。ステップS335にて全座標について演算が終了したと判別したときには、ステップS340にて全色相について色域変換処理が終了したか否かを判別し、全色相について色域変換処理が終了したと判別されるまでステップS300以降の処理を繰り返す。   If it is not determined in step S335 that the calculation has been completed for all coordinates, the next calculation candidate coordinate (C, L) is set in step S345, and the processes in and after step S315 are repeated. If it is determined in step S335 that the calculation has been completed for all coordinates, it is determined in step S340 whether or not the gamut conversion processing has been completed for all hues, and it is determined that the gamut conversion processing has been completed for all hues. Steps S300 and after are repeated until

なお、本発明の色域変換処理は、前述のような静的にLUTを作成する場合のみならず、入力されたsRGB値に対するマッピング先を動的算出して生成する場合にも適用可能である。LUT作成のように各色相角の色点を連続して処理する場合は、前述したフローチャートのようにステップS320の色域内外判定の前にステップS310の尖頭値の決定を行う方が処理効率がよいが、動的なマッピング処理において入力される色点の色相角がランダムに変化する場合は、ステップS320の色域内外判定の後にステップS310の尖頭値の決定を行う方が処理効率がよくなる。   Note that the color gamut conversion processing of the present invention is applicable not only when statically creating an LUT as described above but also when dynamically generating a mapping destination for an input sRGB value. . When continuously processing the color points of each hue angle as in the LUT creation, it is more efficient to determine the peak value in step S310 before the color gamut inside / outside determination in step S320 as in the flowchart described above. However, when the hue angle of the color point input in the dynamic mapping process changes randomly, it is more efficient to perform the peak value determination in step S310 after the color gamut inside / outside determination in step S320. Get better.

ところで、前述した実施形態ではプリンタ色域の尖頭値Jを境界として、高明度側においては第1の圧縮アルゴリズムにて色域変換を実行し、低明度側においては第2の圧縮アルゴリズムで色域変換を実行しているが、尖頭値をよりも明度が高いか低いかで圧縮アルゴリズムを切換える以外にも、例えば、外殻形状の類似度合に応じて圧縮アルゴリズムを切換えて選択してもよい。例えば、上に凸の外殻形状を有する色域を下に凸の外殻形状を有する色域に対してマッピングすると、明度や彩度の変化が強調されて急峻になり、特に階調性に大きく影響する。このような事情に鑑みて、外殻形状の膨らみ方向が異なる場合は、階調性を維持する明度維持型の圧縮アルゴリズムを採用し、外殻形状の膨らみ方向が一致する場合は、明度と彩度とを圧縮する圧縮アルゴリズムを採用する。すると色域形状に合わせて階調性の維持が適切に行われることになる。 Incidentally, as a boundary the peak value J 0 of the printer gamut in the embodiment described above, the high brightness side executes the color gamut conversion at a first compression algorithm, the low-brightness side in the second compression algorithm Although color gamut conversion is performed, in addition to switching the compression algorithm depending on whether the peak value is higher or lower than the peak value, for example, by switching the compression algorithm according to the similarity of the outer shell shape Also good. For example, if a color gamut having an upwardly convex outer shell shape is mapped to a color gamut having a downwardly convex outer shell shape, changes in lightness and saturation are emphasized, resulting in a sharp gradation. A big influence. In view of these circumstances, a brightness maintaining compression algorithm that maintains gradation is used when the bulge direction of the outer shell shape is different. Adopt a compression algorithm to compress the degree. Then, the gradation is appropriately maintained according to the color gamut shape.

(4−2)色域変換処理の変形例:
次に前述した色域変換処理の変形例について説明する。該変形例においてはプリンタ色域とディスプレイ色域との色域形状の相似度合に応じて、前述の実施形態のように尖頭値で圧縮アルゴリズムを切換えるか圧縮アルゴリズムの切換えを行わずに全明度域に亘って明度維持型の圧縮アルゴリズムを適用するかを選択する。相似度合の判断には、プリンタ色域の尖頭値Lcuspとディスプレイ色域の尖頭値Lcusp’の位置関係を利用する。すなわち、プリンタ色域とディスプレイ色域とで尖頭値が近い場合は色域形状が相似すると見做し、ディスプレイ色域においてプリンタ色域外の色点をプリンタ色域内にマッピングするにあたり、全明度域に渡って明度を略維持したマッピングを行うのである。このようにプリンタ色域の尖頭値とディスプレイ色域の尖頭値の関係に基づいて圧縮アルゴリズムの切り替えることによって、マッピング後の階調性がより適切に維持されることになる。
(4-2) Modification of color gamut conversion process:
Next, a modification of the above-described color gamut conversion process will be described. In this modification, according to the degree of similarity of the color gamut shape between the printer color gamut and the display color gamut, the entire lightness is switched without switching the compression algorithm with the peak value or switching the compression algorithm as in the above-described embodiment. Select whether to apply a lightness-maintaining compression algorithm over a range. The determination of the similarity degree, utilizing the positional relationship between the peak value L cusp 'of peak L cusp and the display color gamut of the printer gamut. In other words, when the peak values are close to each other between the printer gamut and the display gamut, the gamut shapes are considered to be similar, and in mapping the color points outside the printer gamut in the display gamut into the printer gamut, The mapping is performed while maintaining the lightness substantially. Thus, by switching the compression algorithm based on the relationship between the peak value of the printer color gamut and the peak value of the display color gamut, the gradation after mapping is more appropriately maintained.

図11はディスプレイの色域Jとプリンタの色域PとをJ空間におけるab平面で切断した状態を示している。なお、(a)は緑の色相角にて切断した状態であり、(b)はマゼンタの色相角にて切断した状態であり、(c)は青の色相角にて切断した状態である。同図において横軸は彩度C、縦軸は明度Jである。プリンタ色域の各色相における尖頭値は、尖頭値の存在する明度が色相角毎に異なっており、緑においては高明度に存在し、マゼンタにおいては中明度に存在し、青においては低明度に存在する。従って、尖頭値Jと尖頭値J’の値が近い色域間のマッピングであれば、全明度域に亘って明度維持型の圧縮アルゴリズムで色域変換処理を行っても階調性が十分に維持されるが、尖頭値Jと尖頭値J’の値が離れている色域間のマッピングであれば、彩度の移動に加えて明度のシフトを行った方が色再現の観点において好ましい。 FIG. 11 shows a state in which the display color gamut J * a * b * and the printer color gamut P are cut along the ab plane in the J * a * b * space. (A) is a state cut at a green hue angle, (b) is a state cut at a magenta hue angle, and (c) is a state cut at a blue hue angle. In the figure, the horizontal axis represents saturation C, and the vertical axis represents lightness J. The peak value in each hue of the printer gamut has a different brightness value for each hue angle, with high brightness in green, medium brightness in magenta, and low in blue. Present in lightness. Therefore, if mapping between color gamuts where the peak value J 0 and the peak value J 0 ′ are close to each other, even if the color gamut conversion processing is performed with the lightness maintaining compression algorithm over the entire lightness range, If the mapping is between color gamuts where the peak value J 0 and the peak value J 0 ′ are separated, the brightness is shifted in addition to the saturation shift. Is preferable from the viewpoint of color reproduction.

図12は本変形例の色域変換処理における圧縮アルゴリズムの切り替え方を説明する図である。同図に示すように、本変形例の色域変換処理においては、まず各色域の尖頭値に基づいて圧縮アルゴリズムの切り替えの要否を以下の式(3)によって判定する。

ここでJはプリンタ色域の尖頭値、Jはディスプレイ色域の尖頭値、Jはプリンタ色域(ディスプレイ色域)の白点、である。この式(3)によれば、白点と尖頭値Jの間隔の半分を閾値Jthとして、尖頭値間の差分Jsubと閾値Jthとの大小関係に基づいて圧縮アルゴリズムの切換えを行うか否かが判断される。すなわち尖頭値間の差分が前記閾値よりも大きい(Jsub>Jth)場合は、プリンタ色域とディスプレイ色域の形状が非相似であると判断し、前述した実施形態と同様に尖頭値Jを境にして第1圧縮アルゴリズムと第2圧縮アルゴリズムとを切換えて色域変換処理を行う。一方、尖頭値間の差分が該閾値以下(Jsub≦Jth)場合は、プリンタ色域とディスプレイ色域の形状が相似していると判断し、例えば全明度域に亘って明度を維持しつつ彩度を圧縮する第2圧縮アルゴリズムで色域変換処理を実行する。
FIG. 12 is a diagram for explaining how to switch the compression algorithm in the color gamut conversion processing of the present modification. As shown in the figure, in the color gamut conversion process of the present modification, first, the necessity of switching the compression algorithm is determined based on the peak value of each color gamut using the following equation (3).

Here J 0 is the peak value of the printer gamut, J 1 is the peak value of the display color gamut, J w white point of the printer gamut (display color gamut), a. According to this equation (3), half of the white point interval of peak J 0 as a threshold J th, compression algorithms based on the magnitude relation between the difference J sub and the threshold J th between peak switching It is determined whether or not to perform. That is, when the difference between the peak values is larger than the threshold value (J sub > J th ), it is determined that the printer color gamut and the display color gamut are not similar, and the peak is the same as in the above-described embodiment. performing color gamut conversion processing is switched to a first compression algorithm to a value J 0 at the boundary with the second compression algorithm. On the other hand, if the difference between the peak values is less than or equal to the threshold value (J sub ≦ J th ), it is determined that the printer color gamut and the display color gamut are similar, and for example, the lightness is maintained over the entire lightness range. In addition, the color gamut conversion process is executed by the second compression algorithm for compressing the saturation.

また、前述した実施形態における第1圧縮アルゴリズムの圧縮方向は、処理対象の色点(C,J)からプリンタ色域の尖頭値(0,J0p)に向かう方向であったが、本変形例においては、この方向に尖頭値間の差分Jthに応じた変更を加えてもよい。具体的には、下記式(4)のように、差分Jthに応じた角度を加味した圧縮方向とすることが考えられる。

ここで、ベクトルnは色点(C,L)からプリンタ色域の尖頭値(0,L)に向かうベクトルであり、ベクトルnはディスプレイの尖頭値(0,L)からプリンタ色域の尖頭値(0,L’)に向かうベクトルであり、ncompは差分Lthに応じた角度を加味した圧縮方向を表すベクトルである。この式(4)により、ベクトルnに対しベクトルnに所定の係数αを乗じて加えたncomp方向が決定され、このncomp方向に圧縮することにより圧縮における明度圧縮度合に尖頭値間の差が反映されることになる。すなわち、尖頭値間の距離が拡がるほど明度の圧縮度合が増加し、尖頭値間の距離が縮まるほど明度の圧縮度合が低下するマッピングが行える。なお、本変形例においてもプリンタ色域の尖頭値Lにおいて明度圧縮率が0になり、尖頭値Lにおける圧縮方向と圧縮率との連続性が保たれるのは前述した実施形態と同様である。
The compression direction of the first compression algorithm in the embodiment described above is the direction from the color point (C, J) to be processed toward the peak value (0, J 0p ) of the printer color gamut. In the example, a change corresponding to the difference J th between the peak values may be added in this direction. Specifically, it is conceivable to set the compression direction in consideration of the angle according to the difference J th as shown in the following formula (4).

Here, the vector n 1 is a vector from the color point (C, L) to the peak value (0, L 0 ) of the printer color gamut, and the vector n 2 is from the peak value (0, L 0 ) of the display. A vector toward the peak value (0, L 0 ′) of the printer color gamut, and n comp is a vector representing a compression direction in consideration of an angle corresponding to the difference L th . By this equation (4), the n comp direction obtained by multiplying the vector n 1 by multiplying the vector n 2 by a predetermined coefficient α is determined, and by compressing in the n comp direction, the peak value of the lightness compression degree in the compression is determined. The difference between them will be reflected. That is, mapping can be performed in which the degree of lightness compression increases as the distance between peak values increases, and the degree of lightness compression decreases as the distance between peak values decreases. The embodiments lightness compression ratio in the peak value L 0 of the printer gamut in the present modification becomes 0, the continuity with the compression direction and the compression ratio in peak L 0 is maintained in the aforementioned It is the same.

図13は、前記式(3)に基づいてマッピングアルゴリズムの選択を行いつつ色域変換処理を行うフローチャートである。処理が開始されると、まず、ステップS400で処理対象となる色点の存在する色相角θを決定し、ステップS405で該色相角θにおける初期座標(C,J)を決定する。そしてステップS410にて色相角θにおけるプリンタ色域の尖頭値Jを取得し、ステップS415において、初期座標の色点に対しプリンタ色域の内外判定を行う。内外判定の結果、プリンタ色域の内部と判定されると、ステップS420にて(C,J)と同一の座標値を有するプリンタ色域の色点にマッピングする。一方、プリンタ色域の外部と判定されると、ステップS425にて色相角θにおけるプリンタ色域の尖頭値Jおよびディスプレイの尖頭値J’を決定し、これら尖頭値間の差分Jsubと閾値Jthとを比較する。比較の結果が差分LsubがLthよりも小さいときはステップS430にてアルゴリズムを切換えないと判断してステップS435に進んで圧縮アルゴリズムの切換えを行わずに明度を維持するアルゴリズムのみを使用してマッピングを行うことを決定する。一方、比較の結果が差分LsubがLthよりも大きいと判断された場合は、ステップS440に進んで圧縮アルゴリズムを切換えつつマッピングを行うことを決定する。そして決定された方式にてマッピングを行う。そして決定された圧縮アルゴリズムに従ってステップS345で圧縮先の座標(Cnew,Jnew)を決定し、この座標にマッピングする。 FIG. 13 is a flowchart for performing a color gamut conversion process while selecting a mapping algorithm based on the equation (3). When the process is started, first, a hue angle θ at which a color point to be processed exists is determined in step S400, and initial coordinates (C, J) at the hue angle θ are determined in step S405. And it obtains the peak value J 0 of the printer gamut in the hue angle θ at step S410, in step S415, performs outside judgment of the printer gamut to the color point of the initial coordinate. As a result of the inside / outside determination, if the inside of the printer color gamut is determined, the color is mapped to the color point of the printer color gamut having the same coordinate value as (C, J) in step S420. On the other hand, if it is determined that it is outside the printer color gamut, the peak value J 0 of the printer color gamut and the peak value J 0 ′ of the display at the hue angle θ are determined in step S425, and the difference between these peak values. J sub is compared with the threshold value J th . If the difference L sub is smaller than L th as a result of the comparison, it is determined in step S430 that the algorithm is not switched, and the process proceeds to step S435, where only the algorithm that maintains the lightness without switching the compression algorithm is used. Decide to do the mapping. On the other hand, when it is determined that the difference L sub is larger than L th as a result of the comparison, the process proceeds to step S440, and it is determined to perform mapping while switching the compression algorithm. Then, mapping is performed using the determined method. Then, in accordance with the determined compression algorithm, the coordinates (C new , J new ) of the compression destination are determined in step S345 and mapped to these coordinates.

このようにしてステップS420、S445にて座標(C,J)のマッピングが完了すると、ステップS450にて全座標に対する(Cnew,Jnew)の演算が終了したか否かを判断する。ステップS450にて全座標について演算が終了したと判別されないときには、ステップS455にて次の演算候補座標(C,L)をセットし、ステップS415以降の処理を繰り返す。ステップS450にて全座標について演算が終了したと判別したときには、ステップS460にて全色相について色域変換処理が終了したか否かを判別し、全色相について色域変換処理が終了したと判別されるまでステップS400以降の処理を繰り返す。 When the mapping of the coordinates (C, J) is completed in steps S420 and S445 in this way, it is determined in step S450 whether or not the calculation of (C new , J new ) for all the coordinates has been completed. If it is not determined in step S450 that the calculation has been completed for all coordinates, the next calculation candidate coordinates (C, L) are set in step S455, and the processes in and after step S415 are repeated. If it is determined in step S450 that the calculation has been completed for all coordinates, it is determined in step S460 whether or not the gamut conversion processing has been completed for all hues, and it is determined that the gamut conversion processing has been completed for all hues. Step S400 and subsequent steps are repeated until

(5)色相間の尖頭値変動の平滑化処理:
以上の色域変換処理においては、プリンタ色域やディスプレイ色域の尖頭値を利用した処理を行っている。この尖頭値についてプリンタ色域の各色相における尖頭値をプロットしたグラフが図14である。同図においては、色相角が約110°、130°、260°に小刻みに振幅の起こる箇所が観察される。小刻みな振幅が発生する箇所では、前述の色域変換処理を行った際に、その振幅の前後で明度の逆転が発生し、擬似輪郭が起きる可能性がある。このような擬似輪郭の発生を防止するために、色相間の階調を平滑化しておくことが好ましい。以下、擬似輪郭の発生防止のための色相間の尖頭値変動を平滑化する処理について説明を行う。
(5) Smoothing processing of peak value fluctuation between hues:
In the above color gamut conversion processing, processing using the peak values of the printer color gamut and display color gamut is performed. FIG. 14 is a graph in which the peak value in each hue of the printer color gamut is plotted with respect to the peak value. In the figure, portions where the amplitude occurs in small increments are observed at hue angles of about 110 °, 130 °, and 260 °. In a portion where a small amplitude is generated, when the above-described color gamut conversion process is performed, inversion of lightness occurs before and after the amplitude, and a pseudo contour may occur. In order to prevent the occurrence of such a pseudo contour, it is preferable to smooth the gradation between hues. Hereinafter, processing for smoothing peak value fluctuations between hues for preventing the occurrence of pseudo contour will be described.

本実施形態の色相間の尖頭値変動の平滑化においては、最大彩度をとる色相の尖頭値を平滑化のための基準点として使用して平滑化を行う。一般にプライマリカラーは色表現能力が高いため最大彩度を取りやすい。そこでまずは平滑化の基準点としてプリンタ色域におけるプライマリカラー(本実施形態においては、加法混色と減法混色の一次色としてRGBCMYを想定してある。)の尖頭値を採用し、下記式(5)を用いて隣接プライマリカラーの尖頭値間を平滑化する。

ここで、L(θ)は所定色相θ(θ?θ?θ)における尖頭値、L0Mはマゼンタの色相θにおける尖頭値、L0Bは青の色相θにおける尖頭値、Rateは隣接するプライマリカラーの尖頭値間を線型補間する係数、である。なお、前記式(5)には青〜マゼンタの色相角を平滑化する式を例示してあるが、他のプライマリカラー間の尖頭値についても同様の式で平滑化できる。図15は前記図14のグラフをプライマリカラーの尖頭値を利用して近似したグラフである。小刻みに振幅していた箇所が平滑化されたことが見て取れる。このように既定のプライマリカラーの尖頭値間を補間すると、尖頭値の算出処理や補間処理が非常に簡易になる。
In the smoothing of the peak value variation between hues in the present embodiment, the peak value of the hue having the maximum saturation is used as a reference point for smoothing. In general, the primary color has a high color expression capability, so it is easy to obtain the maximum saturation. Therefore, first, the peak value of the primary color in the printer color gamut (in this embodiment, RGBCMY is assumed as the primary color of the additive color mixture and subtractive color mixture) is adopted as a smoothing reference point, and the following formula (5 ) To smooth the peak values between adjacent primary colors.

Here, L 0 (θ) is a peak value in a predetermined hue θ (θ B ? Θ? Θ M ), L 0M is a peak value in a magenta hue θ M , and L 0B is a peak value in a blue hue θ B. The value Rate is a coefficient for linear interpolation between the peak values of adjacent primary colors. In addition, although the formula for smoothing the hue angle of blue to magenta is illustrated in the formula (5), the peak value between other primary colors can be smoothed by the same formula. FIG. 15 is a graph obtained by approximating the graph of FIG. 14 using the peak value of the primary color. It can be seen that the portion that was oscillating in small increments was smoothed. If interpolation is performed between the peak values of the default primary color in this way, peak value calculation processing and interpolation processing become very simple.

ところで、例えばJCh色空間のように、プライマリカラーが最大彩度をとらない場合もある。このような場合は、まず、最大彩度となる基準点の検出を行う。すなわち、プライマリカラーに代えて、尖頭値の傾きが大きく変動する色相の尖頭値を基準点としてする。すなわち、色相の変化に対する尖頭値Jの変化度合いが大きく変動する色相角θ(以下、勾配変動点Iと称する。)を複数ポイント検出する。そして、各勾配変動点Iにおける尖頭値L(I)の間を所定の補間式で補間することにより、色相の変化に対する尖頭値Lの変化を平滑化する。 By the way, there is a case where the primary color does not take the maximum saturation, for example, as in the JCh color space. In such a case, first, a reference point having the maximum saturation is detected. That is, instead of the primary color, the peak value of a hue whose inclination of the peak value greatly varies is used as a reference point. That is, the hue angle θ that the degree of change in peak J 0 to the change in hue varies greatly (hereinafter, referred to as the slope change point I.) To a plurality of points detected. Then, by interpolating between the peak values L 0 (I) at each gradient fluctuation point I with a predetermined interpolation formula, the change in the peak value L 0 with respect to the change in hue is smoothed.

勾配変動点Iを検出するために、まず色相角θを所定量ずつ変化させつつプリンタ色域を所定色相角で切断した色域の尖頭値Jを順に求め、色相の対する尖頭値Jの変動データを取得する。次に所定の色相範囲Rを設定し、取得した変動データの所定の色相範囲Rを所定の色相範囲R内における尖頭値Jの傾きの変化度合を、所定の色相範囲Rを所定量ずつシフトさせつつ全色相に亘って算出する。このとき設定される所定の色相範囲Rの最小値は、前述した小刻みな振幅よりも広く設定される必要がある。そして、変動の大きい順に例えば12ポイントの色相角θ〜θ12を選択し、色相角の昇順に勾配変動点I〜I12として設定する。より具体的な勾配変動点の検出の仕方としては、図14のa,b,c等のように該勾配変動点の前後で傾きの符号が変化するような点であってもよいし、図14のdのように傾きの符号自体は変化しないが傾きが比較的大きく変化する点、等が可能である。実際には、以上の勾配変動点に設定されやすい部位は、極値や変曲点であることが多い。 In order to detect the gradient fluctuation point I, first, the peak value J 0 of the color gamut obtained by cutting the printer color gamut at a predetermined hue angle is sequentially obtained while changing the hue angle θ by a predetermined amount, and the peak value J for the hue is obtained. 0 fluctuation data is acquired. Then setting a predetermined hue range R, the degree of change of the slope of the peak value J 0 at a predetermined hue range R within a predetermined hue range R of the acquired variation data, by a predetermined amount a predetermined hue range R Calculation is performed over the entire hue while shifting. The minimum value of the predetermined hue range R set at this time needs to be set wider than the small amplitude described above. Then, for example, twelve hue angles θ 1 to θ 12 are selected in descending order of variation, and set as gradient variation points I 1 to I 12 in ascending order of hue angles. As a more specific method of detecting the gradient fluctuation point, it may be a point where the sign of the gradient changes before and after the gradient fluctuation point, such as a, b, c in FIG. It is possible that the slope sign itself does not change as in 14 d, but the slope changes relatively large. In practice, the portion that is likely to be set at the above-described gradient variation point is often an extreme value or an inflection point.

そして決定された勾配変動点の尖頭値間を以下の補間式(6)にて補間する。

前記式(6)では、θ?θ?θn+1のJ(θ)を求めることができる。ここで、J(I)は勾配変動点Iにおける尖頭値、J(θ)は色相角θにおける尖頭値、Rate’は隣接する基準点の尖頭値間を線型補間する係数である。以上の式(6)によれば、各勾配変動点の尖頭値の間の尖頭値が平滑化され、小刻みな振幅を解消できる。なお、基準点の尖頭値間の補間は、線型補間に限るものではなく、例えば3次補間などの高次の補間を利用しても構わない。
Then, the peak value of the determined gradient change point is interpolated by the following interpolation formula (6).

In the equation (6), J 0 (θ) of θ n ? Θ? Θ n + 1 can be obtained. Here, J 0 (I n) is the peak value of the gradient change point I n, J 0 (θ) is the peak value of the hue angle theta, Rate 'is linear interpolation between peak values of adjacent reference points It is a coefficient. According to the above formula (6), the peak value between the peak values of each gradient fluctuation point is smoothed, and the amplitude can be eliminated in small increments. The interpolation between the peak values of the reference points is not limited to linear interpolation, and high-order interpolation such as cubic interpolation may be used.

図16は色相間の尖頭値変動を平滑化する処理の流れを示すフローチャートである。本実施形態においては、ステップS600にて各色相角における尖頭値を色相角を所定角置きに取得する。ステップS605では、取得された尖頭値の色相変化に対する傾きを検出し、傾きの変動が大きい色相角θ〜θ12を色相角の昇順に勾配変動点I〜I12に決定する。そしてステップS610にて勾配変動点I〜I12における尖頭値L(I)〜L(I12)を式(6)で線型補間する。以上のようにして求めた各色相の尖頭値を使用して前述の色域変換処理を行えば、各色相間でマッピングベクトル方向を安定して色相変化に対する尖頭値変化に起因した小刻みな振幅が抑制され、擬似輪郭が発生しなくなる。 FIG. 16 is a flowchart showing a flow of processing for smoothing peak value fluctuations between hues. In the present embodiment, in step S600, the peak value at each hue angle is obtained for every hue angle. In step S605, the inclination of the acquired peak value with respect to the hue change is detected, and the hue angles θ 1 to θ 12 having a large inclination change are determined as the gradient change points I 1 to I 12 in ascending order of the hue angle. In step S610, the peak values L (I 1 ) to L (I 12 ) at the gradient fluctuation points I 1 to I 12 are linearly interpolated using Expression (6). If the above-described color gamut conversion processing is performed using the peak values of the hues obtained as described above, the mapping vector direction between the hues is stabilized, and the small amplitude resulting from the peak value change with respect to the hue change Is suppressed, and pseudo contour is not generated.

さらに、色相間の尖頭値変動を平滑化するにあたり、前述したプライマリカラー6色に加えて各プライマリカラーの中間値を基準点に追加したり、検出された勾配変動点Iの間に基準点を複数追加したりすると、補間された尖頭値の実際の尖頭値に対する近似精度の向上が期待できる。また、前述した勾配変動点Iの決定方法として、例えば傾きが正負で変化する部位のみを勾配変動点Iとして採用しても構わない。傾きの符号が変化しない場合は、補間などで近似が可能であり、実際の尖頭値と大幅なズレは発生しないと想定されるからである。また、補間には、尖頭値間の線型補間のみならず、各尖頭値を3次補間式などで非線形的に近似した補間を行っても無論構わない。3次補間を用いると、基準点における尖頭値の変動が緩やかな場合に、近似精度が向上する。   Further, in smoothing the peak value fluctuation between hues, in addition to the six primary colors described above, an intermediate value of each primary color is added to the reference point, or a reference point between the detected gradient change points I is added. If a plurality of values are added, the accuracy of approximation of the interpolated peak value to the actual peak value can be expected. Further, as a method of determining the gradient fluctuation point I described above, for example, only a portion where the gradient changes positively or negatively may be adopted as the gradient fluctuation point I. This is because when the sign of the slope does not change, approximation can be performed by interpolation or the like, and it is assumed that there is no significant deviation from the actual peak value. Of course, the interpolation is not limited to linear interpolation between peak values, but it is of course possible to perform interpolation in which each peak value is approximated nonlinearly by a cubic interpolation equation or the like. When cubic interpolation is used, approximation accuracy is improved when the fluctuation of the peak value at the reference point is moderate.

さらにプライマリカラーが勾配変動点であるか否かが不明な場合に好適な変形例として、前述した実施形態を組合せても良い。すなわち、プライマリカラーRGBCMYを仮の勾配変動点として設定しつつ、該プライマリカラーを略中心とする所定の色相範囲Rに含まれる各色相の尖頭値Jを順次取得し、取得した変動データにおける傾きの変動度合を算出する。この変動度合が所定の基準を超えていればプライマリカラーRGBCMYを真の勾配変動点として採用するのである。一方、変動度合が所定の基準を超えていない場合は、真の勾配変動点が他に存在する可能性があるため、前述の尖頭値の傾きが大きく変動する色相の探索を実行するのである。このようにプライマリカラーが勾配変動点になりやすいという前提に立ちつつも、プライマリカラーが本当に勾配変動点であるかを確認する処理を行うことにより、確実に真の勾配変動点を採用できる。さらに、プライマリカラーが勾配変動点であるか否かを判断する際に、各プライマリカラーの所定の色相範囲Rのみを確認対象とすることで演算量を最小限に抑えることができる。一般にプライマリカラーが勾配変動点であることが多いことを前提に、いわば、プライマリカラーが勾配変動点でない場合を例外処理とするのである。 Furthermore, the above-described embodiments may be combined as a suitable modification when it is unclear whether the primary color is a gradient change point. That is, while setting the primary color RGBCMY as a temporary gradient change point, the peak value J 0 of each hue included in the predetermined hue range R substantially centered on the primary color is sequentially obtained, and the obtained fluctuation data The degree of inclination variation is calculated. If the degree of change exceeds a predetermined reference, the primary color RGBCMY is adopted as the true gradient change point. On the other hand, if the degree of variation does not exceed a predetermined standard, there is a possibility that another true gradient variation point may exist, so the search for the hue in which the inclination of the peak value varies greatly is performed. . In this way, it is possible to reliably adopt the true gradient change point by performing the process of confirming whether the primary color is really the gradient change point, while assuming that the primary color is likely to be the gradient change point. Furthermore, when determining whether or not the primary color is a gradient change point, the amount of calculation can be minimized by making only the predetermined hue range R of each primary color a check target. In general, assuming that the primary color is often a gradient change point, the case where the primary color is not a gradient change point is an exception process.

前述した色相間の尖頭値を平滑化する処理は、ガマットに凹凸のあるプリンタ色域、特にフォトマット紙等の色域に適用すると好ましいが、無論、ディスプレイの色域に適用しても構わない。特に勾配変動点とプライマリカラーとが一致するのであれば、各色相角の尖頭値を逐次算出するのではなく、該色相階調平滑化処理にて各色相角の尖頭値を予測して処理速度を向上させることも可能である。
(6)逆方向変換処理の高速化:
ところで、前記逆方向変換処理において使用される第2色変換テーブルはRGB値をXYZ値に変換するための順方向多次元LUTであり、図17のようにRGB値の昇順に並んでいる。そのため、XYZ値の並び順には規則性が無く、逆方向変換処理において入力されたXYZ値に対応するRGB値を探索するためには、順方向多次元LUT中の逆引き、すなわちXYZ値を全検索して近似するXYZ値を抽出する処理が必要になっていた。しかしながら、逆引きは処理時間の増加を招くため、処理速度の向上が望まれていた。
The above-described processing for smoothing the peak value between hues is preferably applied to a printer color gamut having uneven gamuts, particularly a color gamut such as photomat paper, but of course may be applied to the display color gamut. Absent. In particular, if the gradient change point and the primary color match, instead of sequentially calculating the peak value of each hue angle, the peak value of each hue angle is predicted by the hue gradation smoothing process. It is also possible to improve the processing speed.
(6) Speeding up the reverse conversion process:
Incidentally, the second color conversion table used in the reverse direction conversion process is a forward multidimensional LUT for converting RGB values into XYZ values, and is arranged in ascending order of RGB values as shown in FIG. Therefore, there is no regularity in the arrangement order of the XYZ values, and in order to search for RGB values corresponding to the XYZ values input in the reverse conversion process, the reverse lookup in the forward multidimensional LUT, that is, the XYZ values are all set. Processing to retrieve and approximate XYZ values has been required. However, since reverse lookup causes an increase in processing time, an improvement in processing speed has been desired.

そこで本実施形態においては、XYZ値算出モジュールM2に、予測モジュールM21と、探索モジュールM22とを備えさせている。予測モジュールM21は、入力されたXYZ値に対応するRGB値のsRGB色空間における出現位置を予測し、最適な探索順を決定する。探索モジュールM22は、予測モジュールM21の決定した探索順に従って近似XYZ値を探索する。以下、予測モジュールM21の予測手法と、予測結果に基づいて決定される探索順について説明する。   Therefore, in the present embodiment, the XYZ value calculation module M2 includes a prediction module M21 and a search module M22. The prediction module M21 predicts the appearance position of the RGB value corresponding to the input XYZ value in the sRGB color space, and determines the optimum search order. The search module M22 searches for approximate XYZ values according to the search order determined by the prediction module M21. Hereinafter, the prediction method of the prediction module M21 and the search order determined based on the prediction result will be described.

図18は予測モジュールM21の予測手法を説明する模式図である。同図は説明の簡略のため、RGB色空間を任意のGB平面で切断した2次元で記載してあるが、実際は色空間の次数に合わせた次元数が必要であり、本実施形態のようにsRGB色空間であれば3次元空間で予測が行われることは言うまでも無い。同図においては、sRGB色空間のプリンタ40の色域Xを複数領域に分割してある。分割のロジックは二分探索法における二分岐分割のアナロジーであり、色域X全体を4等分して領域C1〜C4を設定し、さらに領域C1〜C4のそれぞれを4等分して領域B1〜B4を設定し、さらに領域B1〜B4のそれぞれを4等分して領域A1〜A4を設定する。図18においては、領域C1や領域B4を例にとって4分割した領域B1〜B4や領域A1〜A4を設定してあるが、領域C2〜C4においても領域B1〜B4と同様の領域設定がされているし、領域B1〜B4においても領域A1〜A4と同様の領域設定がされているものとする。なお、本実施形態においては、各段階の分割数を4分割として3段階の分割を行っているが、各段階における分割数は任意であるし、分割する回数も任意の回数を選択できる。   FIG. 18 is a schematic diagram for explaining a prediction method of the prediction module M21. For the sake of simplicity, the drawing shows the RGB color space in two dimensions cut along an arbitrary GB plane. However, in actuality, the number of dimensions according to the order of the color space is required, as in this embodiment. Needless to say, prediction is performed in a three-dimensional space in the sRGB color space. In the figure, the color gamut X of the printer 40 in the sRGB color space is divided into a plurality of regions. The division logic is an analogy of bifurcated division in the binary search method. The entire color gamut X is equally divided into four areas C1 to C4, and each of the areas C1 to C4 is equally divided into four areas B1 to B1. B4 is set, and regions A1 to A4 are set by dividing each of regions B1 to B4 into four equal parts. In FIG. 18, the areas B1 to B4 and the areas A1 to A4 divided into four areas are set by taking the area C1 and the area B4 as an example, but the areas similar to the areas B1 to B4 are also set in the areas C2 to C4. In the areas B1 to B4, the same area setting as that of the areas A1 to A4 is performed. In the present embodiment, the number of divisions at each stage is set to four, and three stages of division are performed. However, the number of divisions at each stage is arbitrary, and the number of divisions can be arbitrarily selected.

ところで、逆方向変換処理において変換されるXYZ値は、元はディスプレイ20のRGB値であり、ディスプレイ20のRGB値の入力される順番に変換される。つまり、LUT15bを作成する際に色域変換処理で処理される順番は、ディスプレイ20のしき生きにおけるRGB値の昇順になっている。そこで、予測モジュールM21は、直前に変換したXYZ値が変換された先のRGB値を記憶しておき、次に入力されたXYZ値の変換先の予測に利用する。すなわち、直前に色域変換処理された(X1,Y1,Z1)がプリンタ40の色域においてPx(R1,G1,B1)に変換された場合は、このPxを含む領域A2を記憶しておく。そして次に入力された(X2,Y2,Z2)の変換先である(R2,G2,B2)を探索する際には、まず探索モジュールM22に領域A2を探索させる。   By the way, the XYZ values converted in the reverse conversion process are originally RGB values of the display 20 and are converted in the order in which the RGB values of the display 20 are input. That is, the order in which the color gamut conversion process is performed when creating the LUT 15b is the ascending order of the RGB values of the display 20. Therefore, the prediction module M21 stores the previous RGB value converted from the XYZ value converted immediately before, and uses it for the prediction of the conversion destination of the next input XYZ value. That is, when (X1, Y1, Z1) that has been subjected to the color gamut conversion processing immediately before is converted into Px (R1, G1, B1) in the color gamut of the printer 40, the area A2 including this Px is stored. . Then, when searching for (R2, G2, B2) which is the conversion destination of the next input (X2, Y2, Z2), the search module M22 is first searched for the area A2.

また、RGBデータは、図19のように先頭からRGBの順で各座標値を並べたデータ列として生成される。従って、生成された順にデータ変換を行っていくと、まず(R,G,B)のうち最も下位ビットに配置されるBの座標値が1ビットずつ上昇されていく。そしてBが255に達すると、次に、Gの座標値が1ビットだけ繰り上がってから、再度Bの座標値が0から255まで上昇していく。Gの座標値が255ビットに達すると、Rの座標値が1ビット繰り上がって、再度Bの座標値を0から上昇していくことになる。すなわち色変換処理で処理されるRGB値は、直前に処理されたRGB値からディスプレイ20の色域においてBが上昇する方向に1ビットずれたRGB値になるはずである。さらに、色域変換処理後の色空間は、プリンタの色域内に限定されるもののsRGB色空間であるため、プリンタの色域におけるRGB値もディスプレイ20の色域におけるRGB値の変動に類似した挙動を示すことが推測される。この推測に基づいて、探索モジュールM22は、領域A2のRGB値に対応するXYZ値の中に(X2,Y2,Z2)を発見できなかった場合には、RGBデータの変動方向を予測して探索エリアを拡大する。   Further, the RGB data is generated as a data string in which coordinate values are arranged in the order of RGB from the top as shown in FIG. Accordingly, when data conversion is performed in the order of generation, first, the coordinate value of B arranged in the least significant bit of (R, G, B) is incremented bit by bit. When B reaches 255, the G coordinate value is incremented by 1 bit, and then the B coordinate value increases from 0 to 255 again. When the G coordinate value reaches 255 bits, the R coordinate value is incremented by 1 bit, and the B coordinate value is increased from 0 again. That is, the RGB value processed in the color conversion process should be an RGB value shifted by 1 bit in the direction of increasing B in the color gamut of the display 20 from the RGB value processed immediately before. Furthermore, the color space after the color gamut conversion processing is limited to the printer color gamut, but is an sRGB color space. Therefore, the RGB value in the printer color gamut behaves similarly to the variation of the RGB value in the color gamut of the display 20. It is estimated that Based on this estimation, when the search module M22 cannot find (X2, Y2, Z2) in the XYZ values corresponding to the RGB values in the area A2, the search module M22 searches by predicting the fluctuation direction of the RGB data. Enlarge the area.

図20、図21を参照して探索順についてより詳細に説明する。図20はRGB色空間における探索順を説明する図であり、図21は探索順を選択するフローチャートである。図20においては、RGB色空間の領域Pを8等分してある。同図において、変換処理対象の(X2,Y2,Z2)の直前に色域変換処理で変換された(X1,Y1,Z1)の変換先の座標が、Px(R1,G1,B1)であり、Pxの存在する領域が領域P0である。このようなRGB色空間において、最初の探索対象エリアはPxの存在する領域P0となる。そして領域P0のRGB値の変換先を順方向LUTから順次取得しつつ、取得したXYZ値の中から(X2,Y2,Z2)に近接する座標(近接XYZ値)を探索する。近接するか否かの判定は、例えば、所定の閾値よりも近いものを近接すると判定すればよく、閾値としては格子点間隔等が考えられる。   The search order will be described in more detail with reference to FIGS. FIG. 20 is a diagram for explaining the search order in the RGB color space, and FIG. 21 is a flowchart for selecting the search order. In FIG. 20, the region P of the RGB color space is divided into eight equal parts. In the figure, the coordinates of the conversion destination of (X1, Y1, Z1) converted by the color gamut conversion processing immediately before (X2, Y2, Z2) to be converted are Px (R1, G1, B1). , Px is an area P0. In such an RGB color space, the first search target area is a region P0 where Px exists. Then, while sequentially acquiring the conversion destination of the RGB value of the region P0 from the forward direction LUT, the coordinates (proximity XYZ value) close to (X2, Y2, Z2) are searched from the acquired XYZ values. The determination as to whether or not they are close may be made, for example, by determining that an object closer than a predetermined threshold is close, and the threshold may be a lattice point interval or the like.

近接XYZ値を所定数発見した場合は、発見した近接XYZ値に対応するRGB値を順方向変換LUTから取得し、補間演算を行って変換先の座標Py(R2,G2,B2)を決定する。所定数としては、例えば六面体補間を行うのであれば6点となるし、四面体補間を行うのであれば4点となる。一方、近接XYZ値を発見できなかった場合は、Bの座標値が増加する方向にある領域P4を次の探索対象エリアに決定する。その後、領域P4においても近接XYZ値を発見できなかった場合は、領域をP2→P6→P1→P5→P3→P7の順に変更して各々探索を行うことになる。その他、最初の探索対象エリアがP1であった場合の探索順は、P1→P5→P3→P7→P0→P4→P2→P6であり、最初の探索対象エリアがP4であった場合の探索順は、P7→P3→P5→P1→P6→P1→P4→P0となる。   When a predetermined number of proximity XYZ values are found, the RGB values corresponding to the found proximity XYZ values are acquired from the forward conversion LUT, and the transformation coordinates Py (R2, G2, B2) are determined by performing an interpolation operation. . The predetermined number is, for example, 6 points if hexahedral interpolation is performed, and 4 points if tetrahedral interpolation is performed. On the other hand, when the proximity XYZ value cannot be found, the region P4 in the direction in which the coordinate value of B increases is determined as the next search target area. Thereafter, when the proximity XYZ value cannot be found also in the region P4, the region is changed in the order of P2, P6, P1, P5, P3, and P7, and each search is performed. In addition, the search order when the first search target area is P1 is P1 → P5 → P3 → P7 → P0 → P4 → P2 → P6, and the search order when the first search target area is P4. Is P7-> P3-> P5-> P1-> P6-> P1-> P4-> P0.

以上のように決定される探索順に基づいて、XYZ値算出モジュールM2が実行する逆方向変換処理の流れを図22を参照して説明する。なお、この処理の説明においては、説明の簡略のため、図18の2次元で領域分割した図面に基づいて行う。処理が開始されると、ステップS500においてCA変換モジュールM5から最初に入力されたXYZ値を初期データとして取得する。そしてステップS505において、XYZ値の初期データに近接するXYZ値を順方向LUTから検索し、ステップS510において全検索で取得した近接XYZ値の変換先RGB値に基づく補間演算を実行する。補間演算で求められたRGB値は、XYZ値の変換先としてLUT15bに登録されるとともに、ステップS515においてPxとして一時的に記憶される。なお、ステップS515の実行の前に一連の色域変換処理におけるデータ入力が完了したか否かをステップS512において判断し、完了している場合は本処理を終了する一方、未完了の場合はステップS515,S520と進んでCA変換モジュールM5から次のXYZ値を取得する。   Based on the search order determined as described above, the flow of the backward conversion process executed by the XYZ value calculation module M2 will be described with reference to FIG. Note that the description of this process is based on the two-dimensional region drawing of FIG. 18 for the sake of simplicity. When the process is started, the XYZ values first input from the CA conversion module M5 are acquired as initial data in step S500. In step S505, an XYZ value close to the initial data of the XYZ value is searched from the forward LUT, and an interpolation operation based on the conversion destination RGB value of the close XYZ value acquired in all searches is executed in step S510. The RGB value obtained by the interpolation calculation is registered in the LUT 15b as the XYZ value conversion destination, and is temporarily stored as Px in step S515. In step S512, it is determined whether or not data input in a series of color gamut conversion processes is completed before execution of step S515. If completed, the process ends. If not, the process ends. Proceeding to S515 and S520, the next XYZ value is acquired from the CA conversion module M5.

ステップS525に進むと、図18においてPxを含む領域のうち最も狭く設定されている領域Aを予測エリアとし、ステップS525で取得したXYZ値の近接XYZ値を該領域A内の順方向LUTから検索する。検索の結果、領域Aに近接XYZ値を発見した場合は、ステップS530からステップS510に戻って発見した近接XYZ値の変換先RGB値に基づく補間演算を実行する。一方、領域Aを検索しても近接XYZ値を領域Aに発見しなかった場合は、ステップS535に進んで探索領域を拡大し、領域Bを探索することになる。この領域Bの探索においてもPxの存在する領域AからB軸方向へ位置する領域から順に検索を実行する。そして領域Bに近接XYZ値を発見した場合は、ステップS510に戻って発見した近接XYZ値の変換先RGB値に基づく補間演算を実行する。一方、領域Bを検索しても近接XYZ値を発見しなかった場合は、ステップS545に進んで探索領域を拡大し、領域Cを探索することになる。そして領域Cに近接XYZ値を発見した場合は、ステップS510に戻って発見した近接XYZ値の変換先RGB値に基づく補間演算を実行する。一方、領域Cを検索しても近接XYZ値を発見しなかった場合は、例外処理としてステップS505に戻って全検索処理によって近接XYZ値を探索する。   When the process proceeds to step S525, the narrowest area A among the areas including Px in FIG. 18 is set as the prediction area, and the adjacent XYZ values of the XYZ values acquired in step S525 are searched from the forward LUT in the area A. To do. If a proximity XYZ value is found in the region A as a result of the search, the process returns from step S530 to step S510, and an interpolation operation based on the converted RGB value of the proximity XYZ value found is executed. On the other hand, if the proximity XYZ value is not found in the region A even if the region A is searched, the process proceeds to step S535, the search region is expanded, and the region B is searched. Also in the search for the area B, the search is executed in order from the area located in the B-axis direction from the area A where Px exists. When the proximity XYZ value is found in the region B, the process returns to step S510 to execute an interpolation operation based on the converted RGB value of the found proximity XYZ value. On the other hand, if the proximity XYZ value is not found even after searching for the area B, the process proceeds to step S545, where the search area is expanded and the area C is searched. When the proximity XYZ value is found in the area C, the process returns to step S510 to execute an interpolation calculation based on the converted RGB value of the found proximity XYZ value. On the other hand, if the proximity XYZ value is not found even after searching the area C, the process returns to step S505 as an exception process, and the proximity XYZ value is searched by the all search process.

(7)色域の内外判定処理:
前述のように、色域変換モジュール24により実行される色域変換処理においては、プリンタの色域とディスプレイの色域とが一致するように色域の変換を行っている。しかしながら、色域の表面付近などでは、色域変換モジュールにて行う色域の設定方法とXYZ値算出モジュールにて行う色域の設定方法とが互いに異なる場合や、誤差、計算エラー等が原因で色域の外にマッピングされてしまうことがある。色域外部にマッピングされてしまった色点は、逆引きできなくなるため、色域内にマッピング先を変更(再マッピング)してやる必要がある。より具体的には、CA変換モジュールM4においてにおいて算出されたXYZ値に対し色域内外判定処理を実行し、色域内と判定された座標値については前述の逆方向変換処理を実行するが、色域外と判定された座標値については色域の最近傍点に再マッピングする。以下、色域内外判定処理について説明を行う。
(7) Color gamut inside / outside determination processing:
As described above, in the color gamut conversion processing executed by the color gamut conversion module 24, the color gamut conversion is performed so that the printer color gamut and the display color gamut coincide. However, near the surface of the color gamut, the color gamut setting method performed by the color gamut conversion module and the color gamut setting method performed by the XYZ value calculation module are different from each other, or due to errors, calculation errors, etc. It may be mapped outside the color gamut. Since a color point that has been mapped outside the color gamut cannot be reversed, it is necessary to change (remapping) the mapping destination within the color gamut. More specifically, the gamut inside / outside determination processing is executed for the XYZ values calculated in the CA conversion module M4, and the above-described backward conversion processing is executed for the coordinate values determined to be within the gamut. The coordinate value determined to be out of the gamut is remapped to the nearest point in the color gamut. Hereinafter, the color gamut inside / outside determination processing will be described.

図23は本実施形態にかかる内外判定処理の概略を説明する図である。同図はJ色空間を所定のab平面で切断して示した図であり、Pxは判定対象となる座標値、Oはグレー軸上の点、PはOPベクトルと色域外殻との交点、である。また、図24に示すように、本実施形態の色域はLUTの各格子点を結んで形成した六面体を、さらに6つの四面体に分割してある。例えば、LUTに0≦R,G,B≦255の範囲を9スライスしたRGBデータ(729色)とそれに対応するXYZ値を記述したデータが格納されている場合は、これら各データを接続して512個の六面体とし、さらにそれぞれの六面体を6つの四面体に分割する。すなわち色域の外殻は三角形の平面を繋ぎ合わせて形成され、いわゆるポリゴンとなる。以下、四面体を構成する三角形の平面のうち、色域の外殻を構成する面をメッシュと称して説明を行う。本内外判定処理においては、外殻を形成するメッシュのうち、ベクトルOPxと交わるメッシュを探索し、発見されたメッシュとベクトルOPxとの交点Pを算出する。そして|OP|(=A)と|OPx|(=B)とを比較して、B>Aの場合はPxをガマット外と判断して再マッピングを行い、A>Bの場合はPxをガマット内と判断して前述の色域変換処理を続行する。 FIG. 23 is a diagram for explaining the outline of the inside / outside determination processing according to this embodiment. The figure is a graph showing by cutting the J * a * b * color space prescribed ab plane, Px is the coordinate value to be determined, O is a point on the gray axis, P is OP vector and gamut The intersection with the shell. Further, as shown in FIG. 24, the color gamut of this embodiment is obtained by further dividing a hexahedron formed by connecting the lattice points of the LUT into six tetrahedrons. For example, if the LUT stores RGB data (729 colors) with 9 slices of the range 0 ≦ R, G, B ≦ 255 and data describing the corresponding XYZ values, connect these data. There are 512 hexahedrons, and each hexahedron is further divided into six tetrahedrons. That is, the outer shell of the color gamut is formed by connecting triangular planes to form a so-called polygon. Hereinafter, among the triangular planes that form the tetrahedron, the surface that forms the outer shell of the color gamut will be referred to as a mesh. In the inside / outside determination process, a mesh that intersects the vector OPx is searched from among the meshes that form the outer shell, and an intersection point P between the found mesh and the vector OPx is calculated. Then, | OP | (= A) and | OPx | (= B) are compared. When B> A, Px is determined to be out of gamut and remapping is performed. When A> B, Px is gamut. The above-described color gamut conversion process is continued.

図25を参照して、OPxと交わるメッシュの探索法について説明する。図25は内外判定処理のフローチャートである。処理が開始されると、ステップS700において、XYZ値の初期データを取得する。次に、ステップS705では、取得したXYZ値をPxとしてベクトルOPxと交わるメッシュを探索する。この探索対象はプリンタ40の色域の外殻を構成する全てのメッシュである。メッシュとベクトルOPxとが交わるか否かの判定は、例えば以下の方法で可能である。図26に示すように、メッシュの三面体の各頂点をABCとし、入力された出力デバイス色のデータをPとして、ベクトルで表すと下記式(7)で表すことが出来る。

Pが三角形ABCの内部であれば、前記式(7)において
が成立する。すなわち、前記式(7)において式(8)が成り立つのであればベクトルOPxはメッシュと交わると判定し、不成立であればベクトルOPxはメッシュと交わらないと判定できる。
With reference to FIG. 25, the search method of the mesh which cross | intersects OPx is demonstrated. FIG. 25 is a flowchart of the inside / outside determination process. When the process is started, initial data of XYZ values is acquired in step S700. In step S705, a search is made for a mesh that intersects the vector OPx using the acquired XYZ value as Px. This search target is all meshes constituting the outer shell of the color gamut of the printer 40. Whether or not the mesh and the vector OPx intersect can be determined by, for example, the following method. As shown in FIG. 26, each vertex of the mesh trihedron is represented as ABC, the input output device color data is represented as P, and can be represented by the following equation (7).

If P is inside the triangle ABC, in equation (7) above
Is established. That is, if equation (8) holds in equation (7), it is determined that vector OPx intersects with the mesh, and if not established, vector OPx can be determined not to intersect with the mesh.

続くステップS710では、ステップS705において当たり判定されたメッシュを記憶する。ステップS715に進むと、当たり判定されたメッシュとのベクトルOPxとの交点を求めて処理対象座標の内外判定を行う。内外判定で色域の内部と判定された場合は、ステップS725に進んでLUT作成処理を継続する一方、色域の外部と判定された場合は、ステップS720に進んで再マッピングを行う。再マッピング先は、ステップS705において当たり判定されたメッシュと該メッシュに隣接するメッシュの内、最も近くにあるメッシュとする。再マッピングが終了するとステップS725に進んで、LUT作成処理を継続する。そしてステップS730において、全データに対して内外判定を終了したか否かを判断する。全データ終了した場合は内外判定処理を終了し、全データ終了していない場合はステップS735に進んで、次のXYZ値を取得する。そしてステップS740において、ステップS710で記憶されたメッシュを利用して、記憶されたメッシュとその隣接メッシュとを当たり判定の探索対象とする当たり判定を行う。ステップS740において当たり判定が有った場合は、ステップS745からステップS710に進んで当たりメッシュを記憶する一方、当たり判定が無かった場合はステップS745からステップS705に進んで全メッシュに対する探索を行うことになる。   In the subsequent step S710, the mesh determined in step S705 is stored. In step S715, the intersection of the hit-determined mesh and the vector OPx is obtained, and the inside / outside determination of the processing target coordinates is performed. If the inside / outside determination determines that the color gamut is inside, the process proceeds to step S725 to continue the LUT creation process. If it is determined that the color gamut is outside, the process proceeds to step S720 to perform remapping. The remapping destination is the mesh closest to the mesh determined in step S705 and the mesh adjacent to the mesh. When the remapping is completed, the process proceeds to step S725, and the LUT creation process is continued. In step S730, it is determined whether the internal / external determination has been completed for all data. If all the data is finished, the inside / outside determination process is finished. If all the data is not finished, the process proceeds to step S735, and the next XYZ value is acquired. In step S740, using the mesh stored in step S710, a hit determination is performed using the stored mesh and its adjacent mesh as search targets for the hit determination. If there is a hit determination in step S740, the process proceeds from step S745 to step S710 to store the hit mesh. On the other hand, if there is no hit determination, the process proceeds from step S745 to step S705 to search for all meshes. Become.

なお、XYZ値と三角形平面との当たり判定や交点の算出を行う色空間としては、XYZ色空間で行ってもよいし、J色空間で実行してもよい。J色空間を利用する場合は、取得したXYZ値に対応するJ値と、RGB色空間の外殻メッシュを順方向LUTを利用してJ色空間に変換したものとで当たり判定や交点の算出を実行すればよい。さらに、色域変換モジュールM5にて色域変換処理を行う空間として、J色空間等の直交座標系ではなく、JCh等の極座標系を採用すると、Pxや交点Pまでの距離の算出が容易になる。 Note that the color space for determining the hit between the XYZ value and the triangular plane and calculating the intersection may be performed in the XYZ color space or in the J * a * b * color space. When using the J * a * b * color space, the J * a * b * value corresponding to the acquired XYZ value and the outer mesh of the RGB color space are used to generate the J * a * b using the forward LUT. * It is only necessary to execute a hit determination or an intersection calculation with the one converted into the color space. Further, when a polar coordinate system such as JCh is adopted as a space for performing the color gamut conversion processing in the color gamut conversion module M5 instead of an orthogonal coordinate system such as a J * a * b * color space, the distance to Px and the intersection P Is easily calculated.

また全検索を行う場合に好適な例として、前記メッシュデータを、明度と色相角とでメッシュをソートしておくことが考えられる。すなわちXYZ値が入力されると、公知の変換式と用いて該XYZ値から明度や色相角を算出し、内外判定処理の対象となる色点と交点を持つ可能性の高いメッシュを絞り込むことが出来る。よって、全検索を行う時に、当り判定を実行するメッシュの和を絞り込めるので処理を高速化できる。   Further, as a suitable example when performing a full search, it is conceivable to sort the mesh data according to lightness and hue angle. That is, when an XYZ value is input, brightness and hue angle are calculated from the XYZ value using a known conversion formula, and a mesh having a high possibility of having an intersection with a color point to be subjected to inside / outside determination processing is narrowed down. I can do it. Therefore, when performing a full search, the sum of meshes for performing the hit determination can be narrowed down, so that the processing can be speeded up.

さらに、本実施形態のより具体的な一例として、前記当たり判定や交点の算出を、任意の線と任意の平面とのあたり判定や交点座標算出に最適化された外部APIに実行させてもよい。外部APIとしては例えばDirectXが考えられる。DirectXは、グラフィックボードのGPU(Graphics Processing Unit)や高速なグラフィックメモリを利用して実行されるため高速な処理がかのうであり、且つボリゴン表面と所定の直線との当たり判定や交点の算出などを高速に実行する機能が備わっている。したがって、DirectXにベクトルOPxとメッシュの各頂点の座標値とを与えて所定の計算を実行させることにより当たり判定や交点座標の演算が高速に行える。   Further, as a more specific example of the present embodiment, the hit determination and intersection calculation may be executed by an external API optimized for hit determination and intersection coordinate calculation between an arbitrary line and an arbitrary plane. . For example, DirectX can be considered as an external API. DirectX is executed using the graphics board GPU (Graphics Processing Unit) and high-speed graphics memory, so it can be processed at high speed. It has a function to execute at high speed. Therefore, by giving the vector OPx and the coordinate value of each vertex of the mesh to DirectX and executing a predetermined calculation, the hit determination and the calculation of the intersection coordinates can be performed at high speed.

なお、再マッピングの発生頻度を抑制するために、以下のような手法を用いるとよい。
第一に、色域マッピングモジュールM5が行う色域の確定において使用される領域設定手法と、LUT作成時に行われるプリンタ色域を包含する領域設定手法とに、同一の手法を採用する。すると、領域外殻のズレがなくなるため、前述の再マッピングの発生回数が減少する。
第二に、プリンタ色域の領域設定において、前記第2色変換テーブルの格子点を忠実に繋ぎ合わせる手法にて形成された領域を設定する。プリンタの色域には外殻に凹凸があるため、例えば三次元凸包を用いると凹凸が潰れて色精度が劣化してしまい、実際の色域形状と異なってしまうためである。色精度の劣化を防止することにより再マッピングの発生回数が減少する。
第三に、色域マッピングモジュールM5における圧縮アルゴリズムとして、例えば前述のSGCKやBasicPhoto等を採用する。これらの圧縮アルゴリズムは、色相を変えずに一定方向にマッピングするため、マッピング前後のデータで、明度や再度の入れ替わりが発生しない。よって、プリンタ40色域に色域変換された座標値が、直前に変換された座標値の近辺に変換され、前述の逆方向変換処理における予測のヒット率が向上することになる。
第四に、色域変換を行うに当たり、前述の尖頭値変動を平滑化する処理を実行しておく。すると、マッピングデータが緩やかに変化するようになり、マッピング後のデータが一定の間隔で発生するようになる。よって、プリンタ40色域に色域変換された座標値が、直前に変換された座標値の近辺に変換され、前述の逆方向変換処理における予測のヒット率が向上することになる。
In order to suppress the occurrence frequency of remapping, the following method may be used.
First, the same method is adopted as the region setting method used in determining the color gamut performed by the color gamut mapping module M5 and the region setting method including the printer color gamut performed when creating the LUT. Then, since the deviation of the region outer shell is eliminated, the number of occurrences of the remapping described above is reduced.
Second, in the area setting of the printer color gamut, an area formed by a method of faithfully connecting the grid points of the second color conversion table is set. This is because the color gamut of the printer has irregularities in the outer shell, and for example, if a three-dimensional convex hull is used, the irregularities are crushed and the color accuracy deteriorates, resulting in a difference from the actual color gamut shape. The number of occurrences of remapping is reduced by preventing the deterioration of color accuracy.
Thirdly, as the compression algorithm in the color gamut mapping module M5, for example, the above-described SGCK or BasicPhoto is adopted. Since these compression algorithms map in a certain direction without changing the hue, there is no lightness or re-switching in the data before and after mapping. Therefore, the coordinate value converted to the color gamut of the printer 40 is converted to the vicinity of the coordinate value converted immediately before, and the prediction hit rate in the backward conversion process described above is improved.
Fourth, in performing color gamut conversion, the above-described processing for smoothing the peak value fluctuation is executed. Then, the mapping data changes gradually, and the data after mapping is generated at a constant interval. Therefore, the coordinate value converted to the color gamut of the printer 40 is converted to the vicinity of the coordinate value converted immediately before, and the prediction hit rate in the backward conversion process described above is improved.

(8)まとめ:
以上説明したように、ディスプレイ20のデバイス色をプリンタ40のデバイス色に色変換するLUTを作成し、ポリゴンにてプリンタ40の色域を形成し、該色域のグレー軸から前記色変換テーブル作成手段で変換後の座標へ延びる半直線と、前記多角形平面との当り判定を行い、当り有りと判定された多角形平面の交点を算出し、前記基準点から前記交点までの距離と、前記基準点から前記マッピング後の座標までの距離と、を比較して、前記色変換テーブル作成手段による変換後の座標が前記色域内にあるか否かを判定し、色域外と判断された座標については前記色域内に再マッピングする。なお当り判定は、まず直前に色変換された座標に対し交点有りと判定された多角形平面とその周囲を囲む多角形平面とを判定対象とする。よって、色変換テーブルの作成を高速化することが可能な画像処理装置の提供が可能になる。
(8) Summary:
As described above, the LUT for converting the device color of the display 20 to the device color of the printer 40 is created, the color gamut of the printer 40 is formed by polygons, and the color conversion table is created from the gray axis of the color gamut. Means to determine a hit between the half line extending to the coordinates after conversion and the polygonal plane, calculate an intersection of the polygonal plane determined to be hit, a distance from the reference point to the intersection, and The distance from the reference point to the coordinate after mapping is compared to determine whether the coordinate after conversion by the color conversion table creation means is within the color gamut. Remaps within the color gamut. In the hit determination, first, a polygon plane that is determined to have an intersection with respect to the color-converted coordinates and a polygon plane that surrounds the polygon plane are determined. Therefore, it is possible to provide an image processing apparatus capable of speeding up the creation of the color conversion table.

なお、本発明は上述した実施形態や変形例に限られず、上述した実施形態および変形例の中で開示した各構成を相互に置換したり組み合わせを変更したりした構成、公知技術並びに上述した実施形態および変形例の中で開示した各構成を相互に置換したり組み合わせを変更したりした構成、等も含まれる。   Note that the present invention is not limited to the above-described embodiments and modifications, and the structures disclosed in the above-described embodiments and modifications are mutually replaced, the combinations are changed, the known technique, and the above-described implementations. Configurations in which the configurations disclosed in the embodiments and modifications are mutually replaced or the combinations are changed are also included.

本発明の実施形態にかかる画像処理装置を実現するコンピュータのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the computer which implement | achieves the image processing apparatus concerning embodiment of this invention. コンピュータのソフトウェア構成を示すブロック図である。It is a block diagram which shows the software configuration of a computer. 色域調整の設定処理を行う画面の一例である。It is an example of the screen which performs the setting process of color gamut adjustment. 色変換モジュールの概念図である。It is a conceptual diagram of a color conversion module. LUT作成作業のフローチャートである。It is a flowchart of LUT creation work. ディスプレイの色域とプリンタの色域とをJ空間における所定の色相角θにて切断した状態を示す模式図である。FIG. 6 is a schematic diagram illustrating a state where a display color gamut and a printer color gamut are cut at a predetermined hue angle θ in a J * a * b * space. 第1圧縮アルゴリズムを説明する図である。It is a figure explaining a 1st compression algorithm. 第2圧縮アルゴリズムを説明する図である。It is a figure explaining a 2nd compression algorithm. 尖頭値を境に圧縮アルゴリズムを使い分けることによる作用効果を説明する図である。It is a figure explaining the effect by using properly a compression algorithm on the boundary of a peak value. 色域変換処理のフローチャートである。It is a flowchart of a color gamut conversion process. ディスプレイの色域Jとプリンタの色域PとをJ空間におけるab平面で切断した状態を示している。This shows a state where the display color gamut J * a * b * and the printer color gamut P are cut along the ab plane in the J * a * b * space. 変形例の色域変換処理における圧縮アルゴリズムの切り替え方を説明する図である。It is a figure explaining the switching method of the compression algorithm in the color gamut conversion process of a modification. マッピングアルゴリズムの選択を行いつつ色域変換処理を行うフローチャートである。It is a flowchart which performs a color gamut conversion process, selecting a mapping algorithm. 尖頭値についてプリンタ色域の各色相における尖頭値をプロットしたグラフである。It is the graph which plotted the peak value in each hue of a printer color gamut about the peak value. 図14のグラフをプライマリカラーの尖頭値を利用して近似したグラフである。It is the graph which approximated the graph of FIG. 14 using the peak value of the primary color. 色相間の尖頭値変動を平滑化する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which smoothes the peak value fluctuation | variation between hues. 逆方向変換処理において使用される順方向多次元LUTの一例である。It is an example of the forward multidimensional LUT used in a reverse direction conversion process. 予測モジュールの予測手法を説明する模式図である。It is a schematic diagram explaining the prediction method of a prediction module. 一般的なRGBデータのメモリ格納順である。This is the general memory storage order of RGB data. RGB色空間における探索順を説明する図である。It is a figure explaining the search order in RGB color space. 探索順を選択するフローチャートである。It is a flowchart which selects search order. 逆方向変換処理のフローチャートである。It is a flowchart of a reverse direction conversion process. 内外判定処理の概略を説明する図である。It is a figure explaining the outline of an inside / outside determination process. 六面体を6つの四面体に分割する例を示す図である。It is a figure which shows the example which divides | segments a hexahedron into six tetrahedrons. メッシュとの当たり判定処理のフローチャートである。It is a flowchart of a hit determination process with a mesh. メッシュとの当たり判定処理を説明する図である。It is a figure explaining the hit determination processing with a mesh.

符号の説明Explanation of symbols

10…制御部、10a…CPU、10b…RAM、11…ROM、13…USBI/F、14…ビデオI/F、15…HDD、15a…画像データ、15b…LUT、16…バス、17…操作入力用機器I/F、20…ディスプレイ、21…プリンタドライバ、21a…画像データ取得モジュール、21b…色変換モジュール、21c…ハーフトーン処理モジュール、21d…印刷データ生成モジュール、22…操作用入力機器ドライバ(DRV)、23…ディスプレイドライバ(DRV)、24…色域変換モジュール、30…操作用入力機器、30a…キーボード、30b…マウス、40…プリンタ、100…コンピュータ、M1…XYZ値算出モジュール、M2…XYZ値算出モジュール、M3…CA変換モジュール、M4…CA変換モジュール、M5…色域マッピングモジュール DESCRIPTION OF SYMBOLS 10 ... Control part, 10a ... CPU, 10b ... RAM, 11 ... ROM, 13 ... USB I / F, 14 ... Video I / F, 15 ... HDD, 15a ... Image data, 15b ... LUT, 16 ... Bus, 17 ... Operation Input device I / F, 20 ... display, 21 ... printer driver, 21a ... image data acquisition module, 21b ... color conversion module, 21c ... halftone processing module, 21d ... print data generation module, 22 ... input device driver for operation (DRV), 23 ... display driver (DRV), 24 ... color gamut conversion module, 30 ... operation input device, 30a ... keyboard, 30b ... mouse, 40 ... printer, 100 ... computer, M1 ... XYZ value calculation module, M2 ... XYZ value calculation module, M3 ... CA conversion module, M4 ... CA conversion module Yuru, M5 ... gamut mapping module

Claims (8)

第1の機器依存色の第1色空間と第2の機器依存色の第2色空間との対応関係を設定し、該対応関係に基づいて、前記第1色空間における第1の色を前記第2色空間における第2の色に変換する画像処理方法であって、
前記第1の色を前記第2の色に変換する際に参照する色変換テーブルを所定の変換規則に基づいて設定する色変換テーブル設定工程と、
複数の多角形平面を組合せて前記第2色空間の外殻を設定する外殻設定工程と、
前記第2色空間内の所定点を始点とし前記色変換テーブルに基づいて変換された色の色座標へと向かう半直線が交点を持つ多角形平面を検出する検出工程と、
前記交点と前記色座標とを比較し、該色座標が前記外殻内にあるか否かを判定する内外判定工程と、
該色座標が前記内外判定工程において前記外殻内に無いと判定された場合、該色座標を前記外殻内に対応付けるマッピング工程と、
を具備し、
前記検出工程においては、まず直前に検出された多角形平面とその周囲の多角形平面とを検出対象とし、これらの多角形平面が交点を持たない場合に全ての多角形平面を検出対象とすることを特徴とする画像処理方法。
A correspondence relationship between the first color space of the first device-dependent color and the second color space of the second device-dependent color is set, and the first color in the first color space is determined based on the correspondence relationship. An image processing method for converting to a second color in a second color space,
A color conversion table setting step for setting a color conversion table to be referred to when converting the first color into the second color based on a predetermined conversion rule;
A shell setting step of setting a shell of the second color space by combining a plurality of polygonal planes;
A detecting step of detecting a polygonal plane having an intersection point with a half line from a predetermined point in the second color space to a color coordinate of the color converted based on the color conversion table;
An inside / outside determination step of comparing the intersection point with the color coordinates and determining whether the color coordinates are within the outer shell;
A mapping step of associating the color coordinates in the outer shell when the color coordinates are determined not to be in the outer shell in the inner / outer determination step;
Comprising
In the detection step, first, a polygon plane detected immediately before and a surrounding polygon plane are set as detection targets, and when these polygon planes have no intersection, all polygon planes are set as detection targets. An image processing method.
前記複数の多角形平面を明度と色相角とで並び替える並び替え工程を更に備え、
前記交点検出工程においては、前記色座標の明度と色相角とに近似する多角形平面から順に検出対象とする請求項1又は請求項2に記載の画像処理方法。
A rearrangement step of rearranging the plurality of polygonal planes by brightness and hue angle;
3. The image processing method according to claim 1, wherein in the intersection detection step, detection is performed in order from a polygonal plane that approximates the brightness and hue angle of the color coordinates.
前記マッピング工程においては、前記検出工程において検出された多角形平面とその周囲を囲む多角形平面の中から最近傍点を探索し、該最近傍店に対応付ける請求項1〜請求項3の何れか一項に記載の画像処理方法。   The mapping step searches for the nearest point from the polygon plane detected in the detection step and the polygon plane surrounding the polygon plane, and associates it with the nearest store. The image processing method according to item. 前記所定点が、前記第2色空間のグレー軸上の点である請求項1〜請求項4の何れか一項に記載の画像処理方法。   The image processing method according to any one of claims 1 to 4, wherein the predetermined point is a point on a gray axis of the second color space. 前記第2の機器依存色がプリンタの機器依存色であり、
前記請求項1〜請求項4の何れか1項に記載の画像処理方法によって作成された色変換テーブルを備え、該色変換テーブルに基づいて色変換を行うことを特徴とするプリンタ。
The second device-dependent color is a device-dependent color of the printer;
A printer comprising a color conversion table created by the image processing method according to claim 1, and performing color conversion based on the color conversion table.
第1の機器依存色の第1色空間と第2の機器依存色の第2色空間との対応関係を設定し、該対応関係に基づいて、前記第1色空間における第1の色を前記第2色空間における第2の色に変換する画像処理装置であって、
前記第1の色を前記第2の色に変換する際に参照する色変換テーブルを所定の変換規則に基づいて設定する色変換テーブル設定手段と、
複数の多角形平面を組合せて前記第2色空間の外殻を設定する外殻設定手段と、
前記第2色空間内の所定点を始点とし前記色変換テーブルに基づいて変換された色の色座標へと向かう半直線が交点を持つ多角形平面を検出する検出手段と、
前記交点と前記色座標とを比較し、該色座標が前記外殻内にあるか否かを判定する内外判定手段と、
該色座標が前記内外判定手段にて前記外殻内に無いと判定された場合、該色座標を前記外殻内に対応付けるマッピング手段と、
を具備し、
前記検出手段においては、まず直前に検出された多角形平面とその周囲の多角形平面とを検出対象とし、これらの多角形平面が交点を持たない場合に全ての多角形平面を検出対象とすることを特徴とする画像処理装置。
A correspondence relationship between the first color space of the first device-dependent color and the second color space of the second device-dependent color is set, and the first color in the first color space is determined based on the correspondence relationship. An image processing device for converting to a second color in a second color space,
Color conversion table setting means for setting a color conversion table to be referred to when converting the first color into the second color based on a predetermined conversion rule;
Outer shell setting means for setting the outer shell of the second color space by combining a plurality of polygonal planes;
Detecting means for detecting a polygonal plane having an intersection of a half line from a predetermined point in the second color space to a color coordinate of a color converted based on the color conversion table;
An inside / outside determination means for comparing the intersection point with the color coordinate and determining whether the color coordinate is within the outer shell;
Mapping means for associating the color coordinates in the outer shell when the color coordinates are determined not to be in the outer shell by the inner / outer determination means;
Comprising
In the detecting means, first, the polygon plane detected immediately before and the surrounding polygon plane are set as detection targets, and when these polygon planes have no intersection, all polygon planes are set as detection targets. An image processing apparatus.
前記画像処理装置は、GPU(Graphics Processing Unit)を搭載したグラフィックボードを更に備えており、
前記検出手段は、前記GPUに前記半直線と交点を持つ前記多角形平面を検出させ、
前記内外判定手段は、前記所定点から前記色座標までの距離及び前記所定点から前記交点までの距離を、前記GPUに算出させる請求項6に記載の画像処理装置。
The image processing apparatus further includes a graphic board equipped with a GPU (Graphics Processing Unit),
The detection means causes the GPU to detect the polygonal plane having an intersection with the half line,
The image processing apparatus according to claim 6, wherein the inside / outside determination unit causes the GPU to calculate a distance from the predetermined point to the color coordinate and a distance from the predetermined point to the intersection.
第1の機器依存色の第1色空間と第2の機器依存色の第2色空間との対応関係を設定し、該対応関係に基づいて、前記第1色空間における第1の色を前記第2色空間における第2の色に変換する機能をコンピュータに実現させるための画像処理プログラムであって、
前記第1の色を前記第2の色に変換する際に参照する色変換テーブルを所定の変換規則に基づいて設定する色変換テーブル設定機能と、
複数の多角形平面を組合せて前記第2色空間の外殻を設定する外殻設定機能と、
前記第2色空間内の所定点を始点とし前記色変換テーブルに基づいて変換された色の色座標へと向かう半直線が交点を持つ多角形平面を検出する検出機能と、
前記交点と前記色座標とを比較し、該色座標が前記外殻内にあるか否かを判定する内外判定機能と、
該色座標が前記内外判定機能によって前記外殻内に無いと判定された場合、該色座標を前記外殻内に対応付けるマッピング機能と、
をコンピュータに実現させ、
前記検出機能においては、まず直前に検出された多角形平面とその周囲の多角形平面とを検出対象とし、これらの多角形平面が交点を持たない場合に全ての多角形平面を検出対象とすることを特徴とする画像処理プログラム。
A correspondence relationship between the first color space of the first device-dependent color and the second color space of the second device-dependent color is set, and the first color in the first color space is determined based on the correspondence relationship. An image processing program for causing a computer to realize a function of converting to a second color in a second color space,
A color conversion table setting function for setting a color conversion table to be referred to when converting the first color into the second color based on a predetermined conversion rule;
An outer shell setting function for setting an outer shell of the second color space by combining a plurality of polygonal planes;
A detection function for detecting a polygonal plane having an intersection of a half line from a predetermined point in the second color space to a color coordinate of a color converted based on the color conversion table;
An inside / outside determination function that compares the intersection point with the color coordinates and determines whether the color coordinates are within the outer shell;
A mapping function for associating the color coordinates in the outer shell when the color coordinates are determined not to be in the outer shell by the inner / outer determination function;
Is realized on a computer,
In the detection function, first, the polygon plane detected immediately before and the surrounding polygon planes are set as detection targets, and when these polygon planes have no intersection, all polygon planes are set as detection targets. An image processing program characterized by that.
JP2008063246A 2008-03-12 2008-03-12 Image processing method, image processor, printer, and image processing program Pending JP2009219064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008063246A JP2009219064A (en) 2008-03-12 2008-03-12 Image processing method, image processor, printer, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008063246A JP2009219064A (en) 2008-03-12 2008-03-12 Image processing method, image processor, printer, and image processing program

Publications (1)

Publication Number Publication Date
JP2009219064A true JP2009219064A (en) 2009-09-24

Family

ID=41190459

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008063246A Pending JP2009219064A (en) 2008-03-12 2008-03-12 Image processing method, image processor, printer, and image processing program

Country Status (1)

Country Link
JP (1) JP2009219064A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011155496A (en) * 2010-01-27 2011-08-11 Fujifilm Corp Image processing method, device, and program
US10540922B2 (en) 2017-03-15 2020-01-21 Samsung Electronics Co., Ltd. Transparent display apparatus and display method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011155496A (en) * 2010-01-27 2011-08-11 Fujifilm Corp Image processing method, device, and program
US10540922B2 (en) 2017-03-15 2020-01-21 Samsung Electronics Co., Ltd. Transparent display apparatus and display method thereof

Similar Documents

Publication Publication Date Title
JP5067276B2 (en) Color conversion method, color conversion table generated by the color conversion method, image processing apparatus, and color conversion program
JP4645662B2 (en) Color conversion table creation program, interpolation calculation program, color conversion table creation method, interpolation calculation method, color conversion device, and printing device
JP4771538B2 (en) Color conversion table generation method, color conversion table, and color conversion table generation apparatus
JP2006303711A (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
JP2007325192A (en) Color conversion apparatus, color conversion method and color conversion program
JP2008147937A (en) Image processor and image processing method
JP2009219064A (en) Image processing method, image processor, printer, and image processing program
JP2009218780A (en) Image processing method, printer, color conversion device, and color conversion program
JP4467202B2 (en) Color conversion apparatus and color conversion method
JP5457123B2 (en) Method for generating LUT, method for reading luminance value from LUT, program and apparatus
JP4983658B2 (en) Image processing method, image processing apparatus, and image processing program
JP2010050832A (en) Device and method for processing image, program, and recording medium
JP2009219062A (en) Image processing method, printer, image processor and image processing program
JP2009219063A (en) Image processing method, printer, image processor and image processing program
JP2009219059A (en) Image processing method, image processor, printer, and image processing program
JP2006173825A (en) Image processing apparatus and method thereof
JP4023417B2 (en) Image processing using LUT
JP2008042835A (en) Image processor, image processing method, program, and recording medium
JP5008391B2 (en) Image processing apparatus and processing method thereof
JP2003143425A (en) Image processing device
JP2024008265A (en) Image processing apparatus, image processing method, and program
JP2024008263A (en) Image processing apparatus, image processing method, and program
JP2009077106A (en) Color signal conversion device, image signal processing apparatus, image forming apparatus and program
JP2009296139A (en) Image processor, image processing method and computer program