JP2007158928A - Apparatus, method and program for color space conversion - Google Patents

Apparatus, method and program for color space conversion Download PDF

Info

Publication number
JP2007158928A
JP2007158928A JP2005353548A JP2005353548A JP2007158928A JP 2007158928 A JP2007158928 A JP 2007158928A JP 2005353548 A JP2005353548 A JP 2005353548A JP 2005353548 A JP2005353548 A JP 2005353548A JP 2007158928 A JP2007158928 A JP 2007158928A
Authority
JP
Japan
Prior art keywords
color space
interpolation
color
input
lookup table
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.)
Granted
Application number
JP2005353548A
Other languages
Japanese (ja)
Other versions
JP4682833B2 (en
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 JP2005353548A priority Critical patent/JP4682833B2/en
Publication of JP2007158928A publication Critical patent/JP2007158928A/en
Application granted granted Critical
Publication of JP4682833B2 publication Critical patent/JP4682833B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an apparatus, a method and a program for color space conversion which can properly interpolate a three-dimensional lookup table in consideration of reproducibility of gradation while giving priority to reproducibility of a gray color for each input color space. <P>SOLUTION: The color space conversion apparatus converts a color space of a digital image expressed by an input color space into an output color space, using a three-dimensional lookup table corresponding to the input color space and an arbitrary output color space. The color space conversion apparatus is provided with a determining means for determining whether points corresponding to pixel values representing a gray color are a color space arranged on a diagonal of a cube, when the input color space is expressed as a cube on a three-dimensional space; and a conversion means for interpolating the three-dimensional lookup table by tetrahedral interpolation if the determining means gives positive determination, and interpolating the three-dimensional lookup table by hexahedral interpolation or triangular prism interpolation if the determining means gives negative determination, thereby converting the color space of the digital image. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、3次元ルックアップテーブルを用いて色空間変換を行う色空間変換装置、色空間変換方法及び色空間変換プログラムに関する。   The present invention relates to a color space conversion apparatus, a color space conversion method, and a color space conversion program that perform color space conversion using a three-dimensional lookup table.

従来、ディジタル画像の色空間変換に用いる3次元ルックアップテーブルを補間する補間アルゴリズムとして、六面体補間、三角柱補間、四面体補間などが公知である。これらの補間アルゴリズムにはそれぞれ次のような長所、短所がある。
例えば六面体補間は、四面体補間よりも参照する格子点の数が多いので色空間によらず四面体補間より階調の再現性に優れるという長所がある。その反面、六面体補間は、RGB色空間などのように各画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色(例えば、R=G=B)を表す画素値に対応する点が立方体の対角線上に並ぶ入力色空間のとき、グレー色の補間にグレー色ではない色を表す格子点を参照してしまうので、四面体補間よりグレー色の再現性が劣るという欠点がある。三角柱補間も六面体補間と同様の性質を持つ。
Conventionally, hexahedral interpolation, triangular prism interpolation, tetrahedral interpolation and the like are known as interpolation algorithms for interpolating a three-dimensional lookup table used for color space conversion of a digital image. Each of these interpolation algorithms has the following advantages and disadvantages.
For example, hexahedral interpolation has an advantage in that the reproducibility of gradation is superior to tetrahedral interpolation regardless of the color space because there are more reference points than tetrahedral interpolation. On the other hand, hexahedral interpolation corresponds to a pixel value representing a gray color (for example, R = G = B) when expressed as a cube in a three-dimensional space with each pixel component as a coordinate axis, such as an RGB color space. When the input color space is aligned on the diagonal line of the cube, the gray color is less reproducible than tetrahedral interpolation because it refers to the grid points representing non-gray colors for gray interpolation. is there. Triangular prism interpolation has the same properties as hexahedral interpolation.

一方、四面体補間は、入力色空間がRGB色空間のときグレー色の補間にグレー色を表す格子点のみを参照するので、六面体補間よりグレー色の再現性に優れるという長所がある。その反面、四面体補間は六面体補間よりも参照する格子点の数が少ないので色空間によらず六面体補間より階調の再現性に劣るという欠点がある。   On the other hand, tetrahedral interpolation has an advantage that gray color reproducibility is superior to hexahedral interpolation because the gray color interpolation refers only to the grid points representing the gray color when the input color space is the RGB color space. On the other hand, tetrahedron interpolation has a drawback in that the reproducibility of gradation is inferior to hexahedron interpolation regardless of the color space because the number of grid points to be referenced is smaller than hexahedron interpolation.

ところで、ユーザがディジタル画像を見たときに受ける画質の印象に対する影響度合いは一般に階調の再現性よりもグレー色の再現性の方が高い。ただし、グレー色の再現性よりも影響度合いが低いとはいえ当然ながら階調の再現性もユーザの画質への印象に影響する。
しかしながら、従来の色空間変換ではいずれか一つの補間アルゴリズムを用いていた。このため、例えばグレー色の再現性を優先して四面体補間を用いた場合は常に階調の再現性が低いという印象を与えるという問題があった。逆に、階調の再現性を優先して六面体補間や三角柱補間を用いた場合は、入力色空間がRGB色空間のときにグレー色の再現性が劣るという問題があった。
By the way, in general, the reproducibility of gray color is higher than the reproducibility of gradation in terms of the degree of influence on the impression of image quality that a user receives when viewing a digital image. However, although the degree of influence is lower than the reproducibility of the gray color, the reproducibility of the gradation naturally affects the user's impression of the image quality.
However, in the conventional color space conversion, any one interpolation algorithm is used. For this reason, for example, when tetrahedral interpolation is used with priority given to gray color reproducibility, there is a problem that the impression that the reproducibility of gradation is always low is given. Conversely, when hexahedral interpolation or triangular prism interpolation is used with priority given to gradation reproducibility, there is a problem that gray color reproducibility is poor when the input color space is the RGB color space.

本発明は、上述の問題を解決するために創作されたものであって、入力色空間毎にグレー色の再現性を優先しつつ階調の再現性を考慮して適切に3次元ルックアップテーブルを補間する色空間変換装置、色空間変換方法及び色空間変換プログラムを提供することを目的とする。   The present invention was created in order to solve the above-described problem, and appropriately takes into account the reproducibility of the gray color while giving priority to the reproducibility of the gray color for each input color space, and appropriately three-dimensional lookup table. An object of the present invention is to provide a color space conversion device, a color space conversion method, and a color space conversion program.

(1)上記目的を達成するための色空間変換装置は、3つの画素成分からなる画素値で色を表す入力色空間と任意の出力色空間とに応じた3次元ルックアップテーブルを用いて前記入力色空間で表されているディジタル画像の色空間を前記出力色空間に変換する色空間変換装置であって、前記入力色空間は各前記画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶ色空間であるかを判定する判定手段と、前記判定手段で肯定判定された場合は四面体補間によって前記3次元ルックアップテーブルを補間し、否定判定された場合は六面体補間または三角柱補間によって前記3次元ルックアップテーブルを補間して前記ディジタル画像の色空間を変換する変換手段と、を備える。
本発明によると、グレー色を表す画素値に対応する点が立方体の対角線上に並ぶ入力色空間の場合は四面体補間を行うことによってグレー色の再現性に優れた補間を行える。一方、グレー色が対角線上に並ぶ色空間ではない入力色空間の場合は、六面体補間または三角柱補間を行うことにより、グレー色が3次元空間の座標軸上に並ぶ入力色空間についてはグレー色の再現性に優れつつ階調の再現性に優れた補間を行うことができ、また、グレー色が3次元空間の座標軸上に並ぶ色空間ではない入力色空間についてはグレー色の再現性は劣るものの階調の再現性に優れた補間を行える。
すなわち本発明によると、六面体補間または三角柱補間によってグレー色および階調の再現性がともに優れる補間をされ得る入力色空間については六面体補間または三角柱補間を適用する。また、六面体補間または三角柱補間を行ってもグレー色および階調の再現性がともに優れる補間はされ得ないものの四面体補間によってグレー色の再現性に優れる補間をされ得る入力色空間については階調の再現性よりもグレー色の再現性を優先して四面体補間を適用する。六面体補間または三角柱補間を行ってもグレー色および階調の再現性がともに優れる補間はされ得ず且つ四面体補間を行ってもグレー色の再現性に優れる補間をされ得ない入力色空間については六面体補間または三角柱補間を適用することによって階調の再現性に優れた補間を行う。よって本発明によると、3次元ルックアップテーブルを用いた色空間変換において、入力色空間毎にグレー色の再現性を優先しつつ階調の再現性を考慮して適切に3次元ルックアップテーブルを補間できる。
(1) A color space conversion apparatus for achieving the above object uses a three-dimensional lookup table corresponding to an input color space representing a color by a pixel value composed of three pixel components and an arbitrary output color space. A color space conversion device for converting a color space of a digital image represented in an input color space into the output color space, wherein the input color space is expressed as a cube in a three-dimensional space with the pixel components as coordinate axes. If it is determined that the point corresponding to the pixel value representing the gray color is a color space lined up on the diagonal of the cube, and if the determination is positive, the 3 A conversion that interpolates a three-dimensional lookup table and interpolates the three-dimensional lookup table by hexahedral interpolation or triangular prism interpolation when a negative determination is made, and converts the color space of the digital image It includes a stage, a.
According to the present invention, in the case of an input color space in which points corresponding to pixel values representing a gray color are arranged on a diagonal line of a cube, interpolation with excellent gray color reproducibility can be performed by performing tetrahedral interpolation. On the other hand, in the case of an input color space that is not a color space in which the gray colors are arranged on the diagonal line, the gray color is reproduced for the input color space in which the gray colors are arranged on the coordinate axes of the three-dimensional space by performing hexahedral interpolation or triangular prism interpolation. Interpolation with excellent gradation and reproducibility is possible, and the input color space that is not a color space in which the gray colors are arranged on the coordinate axes of the three-dimensional space is inferior in gray color reproducibility. Interpolation with excellent tone reproducibility.
That is, according to the present invention, hexahedral interpolation or triangular prism interpolation is applied to an input color space that can be interpolated with excellent gray color and gradation reproducibility by hexahedral interpolation or triangular prism interpolation. In addition, even if hexagonal interpolation or triangular prism interpolation is performed, both gray color and gradation reproducibility cannot be interpolated, but input color space that can be interpolated with excellent gray color reproducibility by tetrahedral interpolation is a gradation. The tetrahedral interpolation is applied in favor of the gray color reproducibility over the color reproducibility. For input color spaces that cannot be interpolated with excellent gray color and gradation reproducibility even with hexahedral interpolation or triangular prism interpolation, and cannot be interpolated with excellent gray color reproducibility even with tetrahedral interpolation Interpolation with excellent gradation reproducibility is performed by applying hexahedral interpolation or triangular prism interpolation. Therefore, according to the present invention, in color space conversion using a three-dimensional lookup table, a three-dimensional lookup table is appropriately set in consideration of gradation reproducibility while giving priority to gray color reproducibility for each input color space. Can be interpolated.

(2)前記判定手段は、前記入力色空間の種類を判別することにより、グレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶか否かを調べることなく判定してもよい。
本発明によると、入力色空間の種類を判別して判定するので、グレー色を表す画素値に対応する点が立方体の対角線上に並ぶか否かを実際に調べる必要がない。よって簡素な処理で判定できる。
(2) The determination unit may determine the type of the input color space without checking whether or not the points corresponding to the pixel values representing the gray color are aligned on the diagonal of the cube. .
According to the present invention, since the type of the input color space is determined and determined, there is no need to actually check whether or not the points corresponding to the pixel values representing the gray color are aligned on the diagonal of the cube. Therefore, it can be determined by simple processing.

(3)前記入力色空間はRGB色空間であり、前記出力色空間はL*a*b*色空間であってもよい。
RGB色空間はグレー色を表す画素値に対応する点が立方体の対角線上に並ぶ色空間なので、本発明によるとディジタル画像の色空間をRGB色空間からL*a*b*色空間に変換する場合に階調の再現性は劣るもののグレー色の再現性に優れた補間を行える。
(3) The input color space may be an RGB color space, and the output color space may be an L * a * b * color space.
Since the RGB color space is a color space in which points corresponding to pixel values representing a gray color are arranged on a diagonal of a cube, according to the present invention, the color space of a digital image is converted from the RGB color space to the L * a * b * color space. In this case, although the gradation reproducibility is inferior, interpolation with excellent gray color reproducibility can be performed.

(4)前記入力色空間はL*a*b*色空間であり、前記出力色空間はRGB色空間であってもよい。
L*a*b*色空間はグレー色を表す画素値に対応する点が立方体の対角線上に並ばないものの3次元空間の座標軸上に並ぶ色空間なので、本発明によるとディジタル画像の色空間をL*a*b*色空間からRGB色空間に変換する場合にグレー色および階調の再現性がともに優れる補間を行える。
(4) The input color space may be an L * a * b * color space, and the output color space may be an RGB color space.
The L * a * b * color space is a color space in which points corresponding to pixel values representing a gray color are not arranged on the diagonal of the cube, but are arranged on the coordinate axis of the three-dimensional space. When converting from the L * a * b * color space to the RGB color space, interpolation with excellent gray color and gradation reproducibility can be performed.

(5)上記目的を達成するための色空間変換方法は、3つの画素成分からなる画素値で色を表す入力色空間と任意の出力色空間とに応じた3次元ルックアップテーブルを用いて前記入力色空間で表されているディジタル画像の色空間を前記出力色空間に変換する色空間変換方法であって、前記入力色空間は各前記画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶ色空間であるかを判定する判定段階と、前記判定段階で肯定判定された場合は四面体補間によって前記3次元ルックアップテーブルを補間し、否定判定された場合は六面体補間または三角柱補間によって前記3次元ルックアップテーブルを補間して前記ディジタル画像の色空間を変換する変換段階と、を含む。
本発明によると、3次元ルックアップテーブルを用いた色空間変換において、入力色空間毎にグレー色の再現性を優先しつつ階調の再現性を考慮して適切に3次元ルックアップテーブルを補間できる。
(5) A color space conversion method for achieving the above object uses the three-dimensional lookup table corresponding to an input color space representing a color by a pixel value composed of three pixel components and an arbitrary output color space. A color space conversion method for converting a color space of a digital image represented in an input color space into the output color space, wherein the input color space is expressed as a cube in a three-dimensional space with the pixel components as coordinate axes. A determination step for determining whether a point corresponding to a pixel value representing a gray color is a color space arranged on a diagonal line of the cube, and, if affirmative determination is made in the determination step, the step 3 A conversion that interpolates a three-dimensional lookup table and interpolates the three-dimensional lookup table by hexahedral interpolation or triangular prism interpolation when a negative determination is made, and converts the color space of the digital image It includes a floor, a.
According to the present invention, in color space conversion using a three-dimensional lookup table, a three-dimensional lookup table is appropriately interpolated in consideration of gradation reproducibility while giving priority to gray color reproducibility for each input color space. it can.

(6)上記目的を達成するための色空間変換プログラムは、3つの画素成分からなる画素値で色を表す入力色空間と任意の出力色空間とに応じた3次元ルックアップテーブルを用いて前記入力色空間で表されているディジタル画像の色空間を前記出力色空間に変換する色空間変換プログラムであって、前記入力色空間は各前記画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶ色空間であるかを判定する判定手段と、前記判定手段で肯定判定された場合は四面体補間によって前記3次元ルックアップテーブルを補間し、否定判定された場合は六面体補間または三角柱補間によって前記3次元ルックアップテーブルを補間して前記ディジタル画像の色空間を変換する変換手段としてコンピュータを機能させる。
本発明によると、3次元ルックアップテーブルを用いた色空間変換において、入力色空間毎にグレー色の再現性を優先しつつ階調の再現性を考慮して適切に3次元ルックアップテーブルを補間できる。
(6) A color space conversion program for achieving the above object uses the three-dimensional lookup table corresponding to an input color space representing a color by a pixel value composed of three pixel components and an arbitrary output color space. A color space conversion program for converting a color space of a digital image represented in an input color space into the output color space, wherein the input color space is expressed as a cube in a three-dimensional space with the pixel components as coordinate axes. If it is determined that the point corresponding to the pixel value representing the gray color is a color space lined up on the diagonal of the cube, and if the determination is positive, the 3 Interpolate a three-dimensional lookup table, and if a negative determination is made, interpolate the three-dimensional lookup table by hexahedral interpolation or triangular prism interpolation to obtain the color space of the digital image. Causing a computer to function as converting means for conversion.
According to the present invention, in color space conversion using a three-dimensional lookup table, a three-dimensional lookup table is appropriately interpolated in consideration of gradation reproducibility while giving priority to gray color reproducibility for each input color space. it can.

尚、本発明に備わる複数の手段の各機能は、構成自体で機能が特定されるハードウェア資源、プログラムにより機能が特定されるハードウェア資源、又はそれらの組み合わせにより実現される。また、これら複数の手段の各機能は、各々が物理的に互いに独立したハードウェア資源で実現されるものに限定されない。   Each function of the plurality of means provided in the present invention is realized by hardware resources whose functions are specified by the configuration itself, hardware resources whose functions are specified by a program, or a combination thereof. Further, the functions of the plurality of means are not limited to those realized by hardware resources that are physically independent of each other.

以下、本発明の実施の形態を実施例に基づいて説明する。
図2は、本発明の一実施例に係る色空間変換装置としてのプリンタ10の概略構成を示すブロック図である。プリンタ10はリムーバブルメモリ11からディジタル画像を読み込み、そのディジタル画像に基づいて印刷が可能な所謂スタンドアロン型プリンタである。またプリンタ10は、ディジタルカメラ30、PC(Personal Computer)31、カメラ付携帯型電話端末32などの外部システムからディジタル画像を入力し、そのディジタル画像に基づいて印刷が可能である。
Hereinafter, embodiments of the present invention will be described based on examples.
FIG. 2 is a block diagram showing a schematic configuration of the printer 10 as a color space conversion apparatus according to an embodiment of the present invention. The printer 10 is a so-called stand-alone printer that can read a digital image from the removable memory 11 and perform printing based on the digital image. The printer 10 can input a digital image from an external system such as a digital camera 30, a PC (Personal Computer) 31, and a camera-equipped mobile phone terminal 32, and can print based on the digital image.

外部IF(Inter Face)12は、ディジタルカメラ30、PC31、カメラ付携帯型電話端末32などの外部システムと通信するためのUSBコントローラ、USBコネクタなどを備える。通信規格はUSBに限らず、IEEE1394、赤外線、イーサネット(登録商標)などのいかなる規格でもよい。
リムーバブルメモリコントローラ(RMC)13は、図示しないコネクタを介してリムーバブルメモリ11に接続され、リムーバブルメモリ11とRAM14との間でデータ転送を制御する。リムーバブルメモリ11は、カード型フラッシュメモリ(所謂メモリカード)でもよいし、その他の繰り返し書き込み可能ないかなる不揮発性記憶媒体であってもよい。
The external IF (Inter Face) 12 includes a USB controller, a USB connector, and the like for communicating with an external system such as the digital camera 30, the PC 31, and the camera-equipped mobile phone terminal 32. The communication standard is not limited to USB, but may be any standard such as IEEE 1394, infrared, Ethernet (registered trademark).
A removable memory controller (RMC) 13 is connected to the removable memory 11 via a connector (not shown), and controls data transfer between the removable memory 11 and the RAM 14. The removable memory 11 may be a card-type flash memory (so-called memory card) or any other nonvolatile storage medium that can be repeatedly written.

画像処理部15は、圧縮されているディジタル画像の伸張処理、γ補正、カラーマッチング、シャープネス補整処理・階調補整処理などの画像補整処理、分版処理、ハーフトーニング、インタレース処理などをCPUと協働して実行し、印刷データを生成する画像処理LSIである。なお、画像処理部15は例えばDSPで構成されもよい。また、これらの処理をCPU16によるプログラム処理によって実行してもよい。本実施例ではカラーマッチングをCPU16で実行する場合を例に説明する。   The image processing unit 15 performs decompression processing of compressed digital images, γ correction, color matching, image correction processing such as sharpness correction processing / gradation correction processing, color separation processing, halftoning, interlace processing, and the like with the CPU. An image processing LSI that executes in cooperation and generates print data. The image processing unit 15 may be configured by a DSP, for example. These processes may be executed by a program process by the CPU 16. In this embodiment, a case where color matching is executed by the CPU 16 will be described as an example.

印刷部17は、画像処理部15で生成された印刷データに基づいてインクジェット方式で用紙に画像を形成するための記録ヘッド、記録ヘッドの往復移動機構、給排紙機構などを備える。尚、印刷方式は、インクジェット方式、レーザ方式、サーマル方式、ドットインパクト方式などのいかなる印刷方式でも採用し得る。   The printing unit 17 includes a recording head for forming an image on a sheet by an inkjet method based on the print data generated by the image processing unit 15, a reciprocating mechanism of the recording head, a paper supply / discharge mechanism, and the like. As the printing method, any printing method such as an ink jet method, a laser method, a thermal method, or a dot impact method can be adopted.

表示部20は、LCDなどのFPD(Flat Panel Display)、グラフィックコントローラなどを備える。FPDに文字や画像を表示するために必要なフレームメモリ領域は表示部20の専用メモリに確保してもよいし、RAM14の一部領域に割り当ててもよい。フレームメモリ領域に書き込まれたデータがグラフィックコントローラによって定期的に読み出されることにより、FPDに表示される文字や画像が更新される。   The display unit 20 includes an FPD (Flat Panel Display) such as an LCD, a graphic controller, and the like. A frame memory area necessary for displaying characters and images on the FPD may be secured in a dedicated memory of the display unit 20 or may be assigned to a partial area of the RAM 14. Characters and images displayed on the FPD are updated by periodically reading data written in the frame memory area by the graphic controller.

操作部19は、ユーザのメニュー操作や印刷要求を受け付けるための操作ボタン、ジョグダイヤル、その他各種のボタンを供えている。特定のモードで特定のボタンが押されると、そのモードに応じた各種の要求がプリンタ10に入力される。
RAM14は、各種のプログラムやデータが一時的に格納される揮発性メモリである。
The operation unit 19 includes operation buttons for accepting user menu operations and print requests, a jog dial, and other various buttons. When a specific button is pressed in a specific mode, various requests corresponding to the mode are input to the printer 10.
The RAM 14 is a volatile memory that temporarily stores various programs and data.

CPU16は、フラッシュメモリ18に格納されている制御プログラムを実行することにより、プリンタ10の各部を制御して印刷の実行を制御する。また、CPU16はフラッシュメモリ18に格納されている色空間変換プログラムを実行することにより、判定手段、および変換手段としても機能する。フラッシュメモリ18は制御プログラム、色空間変換プログラム、各種のICCプロファイルなどを記憶している不揮発性メモリである。これら各種のプログラムやデータはコンピュータ読み取り可能な記憶媒体からフラッシュメモリ18に転送してもよいし、遠隔地のサーバから通信ネットワークを経由してフラッシュメモリ18に転送してもよい。   The CPU 16 controls each part of the printer 10 by executing a control program stored in the flash memory 18 to control execution of printing. The CPU 16 also functions as a determination unit and a conversion unit by executing a color space conversion program stored in the flash memory 18. The flash memory 18 is a nonvolatile memory that stores a control program, a color space conversion program, various ICC profiles, and the like. These various programs and data may be transferred from a computer-readable storage medium to the flash memory 18 or may be transferred from a remote server to the flash memory 18 via a communication network.

次に、3次元ルックアップテーブル(3DLUT)について説明する。
図3(A)は、ディジタル画像の色空間をRGB色空間からCIE L*a*b*色空間(以下単に「Lab色空間」という)に変換するための3DLUTを示す模式図である。RGB色空間をR成分、G成分およびB成分を座標軸とする3次元空間上で表すと図示するように立方体として表すことができる。この立方体をR軸、G軸およびB軸方向に均等に9分割すると、729個(9の3乗個)の立方体に分割される。なお、分割数は適宜選択可能であり、例えば16分割でもよい。以降の説明では単に立方体という場合は分割された個々の立方体のことをいうものとする。3DLUTは、立方体の各頂点(以下「格子点」という)にLab色空間の変換先の画素値(出力画素値)を対応付けているテーブルである。入力画素値(R,G,B)に対応する点が格子点である場合は、3DLUTを参照することによってその入力画素値に対応する出力画素値(L,a,b)を直接得ることができる。しかしながら、入力画素値に対応する点が格子点でない場合は出力画素値を直接得ることはできない。この場合はその入力画素値に対応する点が属する立方体を構成している各格子点に対応付けられている出力画素値を用いて3DLUTを補間することによって出力画素値を求めることができる。補間方法としては六面体補間、三角柱補間、四面体補間などが公知である。
Next, a three-dimensional lookup table (3DLUT) will be described.
FIG. 3A is a schematic diagram showing a 3DLUT for converting a color space of a digital image from an RGB color space to a CIE L * a * b * color space (hereinafter simply referred to as “Lab color space”). If the RGB color space is represented on a three-dimensional space with the R component, G component and B component as coordinate axes, it can be represented as a cube as shown in the figure. When this cube is equally divided into nine in the R-axis, G-axis, and B-axis directions, it is divided into 729 cubes (the cube of 9). Note that the number of divisions can be selected as appropriate, and may be, for example, 16 divisions. In the following description, a simple cube means an individual divided cube. The 3DLUT is a table in which a pixel value (output pixel value) of the conversion destination of the Lab color space is associated with each vertex (hereinafter referred to as “grid point”) of the cube. When the point corresponding to the input pixel value (R, G, B) is a grid point, the output pixel value (L, a, b) corresponding to the input pixel value can be directly obtained by referring to the 3DLUT. it can. However, if the point corresponding to the input pixel value is not a grid point, the output pixel value cannot be obtained directly. In this case, the output pixel value can be obtained by interpolating the 3DLUT using the output pixel value associated with each grid point constituting the cube to which the point corresponding to the input pixel value belongs. As the interpolation method, hexahedral interpolation, triangular prism interpolation, tetrahedral interpolation and the like are known.

図3(B)は、ディジタル画像の色空間をLab色空間からRGB色空間に変換するための3DLUTを示す模式図である。図3(B)に示す3DLUTは、座標軸がL*軸、a*軸およびb*軸である点と、各格子点にRGB色空間の変換先の画素値(出力画素値)が対応付けられている点とを除いて図3(A)に示す3DLUTと同一である。   FIG. 3B is a schematic diagram showing a 3DLUT for converting the color space of the digital image from the Lab color space to the RGB color space. In the 3DLUT shown in FIG. 3B, a point whose coordinate axes are the L * axis, a * axis, and b * axis, and a pixel value (output pixel value) of the RGB color space are associated with each grid point. This is the same as the 3DLUT shown in FIG.

次に、四面体補間について説明する。
図4および図5は、四面体補間を説明するための模式図である。四面体補間では補間対象の入力画素値に対応する点Qxが属している立方体(図4参照)を図5に示すように6個の三角錐(四面体)に分割する。この分割において、立方体は3次元座標の原点に最も近い格子点Q5を始点とし3次元座標の原点から最も遠い格子点Q2を終点とする対角線31をいずれの四面体においても一辺として用いるように分割される。四面体捕間では、点Qxが属している四面体の各格子点に対応付けられている出力画素値を、点Qxの位置に応じた体積比で重み付け平均することによって点Qxに対応する出力画素値を補間する。以下、点Qxが格子点Q5、Q0、Q1およびQ2を頂点とする四面体32に属している場合を例に説明する。
Next, tetrahedral interpolation will be described.
4 and 5 are schematic diagrams for explaining tetrahedral interpolation. In tetrahedral interpolation, the cube (see FIG. 4) to which the point Qx corresponding to the input pixel value to be interpolated belongs is divided into six triangular pyramids (tetrahedron) as shown in FIG. In this division, the cube is divided so that the diagonal line 31 starting from the lattice point Q5 closest to the origin of the three-dimensional coordinate and starting from the lattice point Q2 farthest from the origin of the three-dimensional coordinate is used as one side in any tetrahedron. Is done. In the tetrahedron trap, the output pixel value associated with each grid point of the tetrahedron to which the point Qx belongs is weighted and averaged with a volume ratio corresponding to the position of the point Qx, thereby outputting the output corresponding to the point Qx. Interpolate pixel values. Hereinafter, a case where the point Qx belongs to the tetrahedron 32 having the lattice points Q5, Q0, Q1, and Q2 as vertices will be described as an example.

以下に示す式1〜4は、四面体32の各格子点に対応する三角錐の体積を算出する式である。ここでは立方体の各辺の長さを1とし、立方体の格子点Q5を原点としたときの点Qxの位置を(DL,Da,Db)として説明する。以下に示す式においてV2は格子点Q2に対応する三角錐(Q0,Q1、Q5、Qx)の体積、V5は格子点Q5に対応する三角錐(Q0,Q1、Q2、Qx)の体積、V1は格子点Q1に対応する三角錐(Q0,Q2、Q5、Qx)の体積、V0は格子点Q0に対応する三角錐(Q1,Q2、Q5、Qx)の体積である。   Expressions 1 to 4 shown below are expressions for calculating the volume of the triangular pyramid corresponding to each lattice point of the tetrahedron 32. Here, it is assumed that the length of each side of the cube is 1, and the position of the point Qx when the lattice point Q5 of the cube is the origin is (DL, Da, Db). In the following equation, V2 is the volume of the triangular pyramid (Q0, Q1, Q5, Qx) corresponding to the lattice point Q2, V5 is the volume of the triangular pyramid (Q0, Q1, Q2, Qx) corresponding to the lattice point Q5, V1 Is the volume of the triangular pyramid (Q0, Q2, Q5, Qx) corresponding to the lattice point Q1, and V0 is the volume of the triangular pyramid (Q1, Q2, Q5, Qx) corresponding to the lattice point Q0.

Figure 2007158928
Figure 2007158928

以下に示す式5は、格子点Q5、Q0、Q1およびQ2に対応付けられている出力画素値を式1〜式4で求めた体積比で重み付け平均する式である。P2を格子点Q2に対応付けられている出力画素値、P5を格子点Q5に対応付けられている出力画素値、P1を格子点Q1に対応付けられている出力画素値、P0を格子点Q0に対応付けられている出力画素値とすると、点Qxに対応する出力画素値Pxは式5によって求められる。ここで分母の1/6は四面体32の体積である。   Expression 5 shown below is an expression that weights and averages the output pixel values associated with the lattice points Q5, Q0, Q1, and Q2 with the volume ratio obtained by Expressions 1 to 4. P2 is an output pixel value associated with the lattice point Q2, P5 is an output pixel value associated with the lattice point Q5, P1 is an output pixel value associated with the lattice point Q1, and P0 is a lattice point Q0. Assuming that the output pixel value is associated with, the output pixel value Px corresponding to the point Qx is obtained by Equation 5. Here, 1/6 of the denominator is the volume of the tetrahedron 32.

Figure 2007158928
Figure 2007158928

なお、ここでは点Qxが四面体32に属している場合を例に説明したが、点Qxが他の四面体に属する場合についても同様である。四面体補間は公知の補間方法であるため他の四面体に属する場合についての詳細な説明は省略する。   Here, the case where the point Qx belongs to the tetrahedron 32 has been described as an example, but the same applies to the case where the point Qx belongs to another tetrahedron. Since tetrahedral interpolation is a known interpolation method, a detailed description of the case of belonging to another tetrahedron is omitted.

次に、四面体補間の利点および欠点について説明する。
(1)RGB色空間から他の色空間に変換する場合のグレー色の再現性。
RGB色空間を3次元座標で表すとグレー色(R=G=B)を表している画素値に対応する点は対角線31上に位置する。上述した式3および式4によると、点Qxが対角線31上にあるときDL=Da=Dbが成立するので、
Da−Db=0
DL−Da=0
になり、従ってV1およびV0は0になる。すなわち四面体補間では、RGB色空間においてグレー色を表している入力画素値については、グレー色でない格子点Q1およびQ0を参照せず、グレー色である格子点Q2およびQ5のみを参照して補間する。このため四面体補間ではRGB色空間から他の色空間への色空間変換においてグレー色の再現性が優れる。
Next, advantages and disadvantages of tetrahedral interpolation will be described.
(1) Gray color reproducibility when converting from the RGB color space to another color space.
When the RGB color space is represented by three-dimensional coordinates, a point corresponding to a pixel value representing a gray color (R = G = B) is located on the diagonal line 31. According to Equation 3 and Equation 4 above, DL = Da = Db holds when the point Qx is on the diagonal line 31.
Da-Db = 0
DL-Da = 0
Therefore, V1 and V0 become zero. That is, in the tetrahedral interpolation, the input pixel value representing the gray color in the RGB color space is not referred to the non-gray grid points Q1 and Q0, but only the gray grid points Q2 and Q5 are referred to. To do. For this reason, in the tetrahedral interpolation, the gray color reproducibility is excellent in the color space conversion from the RGB color space to another color space.

(2)Lab色空間から他の色空間に変換する場合のグレー色の再現性。
Lab色空間を3次元座標で表すとグレー色(L,0,0)を表している画素値に対応する点はL軸上に位置する。点QxがL軸上にあるとき、
Da=Db=0
になり、従ってV2およびV1は0になる。すなわち四面体補間では、Lab色空間においてグレー色を表している入力画素値については、グレー色でない格子点Q1およびQ2を参照せず、グレー色である格子点Q0およびQ5のみを参照して補間する。このため四面体補間ではLab色空間から他の色空間への色空間変換においてもグレー色の再現性が優れる。
(2) Reproducibility of gray color when converting from the Lab color space to another color space.
When the Lab color space is represented by three-dimensional coordinates, a point corresponding to a pixel value representing a gray color (L, 0, 0) is located on the L axis. When point Qx is on the L axis,
Da = Db = 0
Therefore, V2 and V1 become zero. That is, in tetrahedral interpolation, the input pixel value representing the gray color in the Lab color space is not referred to the non-gray grid points Q1 and Q2, but only the gray grid points Q0 and Q5 are interpolated. To do. For this reason, in tetrahedral interpolation, gray color reproducibility is excellent even in color space conversion from the Lab color space to another color space.

(3)階調の再現性。
四面体補間は六面体補間に比べて参照する格子点の数が少ないので、六面体補間に比べて階調の再現性が劣る。
(3) Tone reproducibility.
Tetrahedral interpolation is inferior in gradation reproducibility compared with hexahedral interpolation because it has a smaller number of reference points than hexahedral interpolation.

次に、六面体補間について説明する。
図6は、六面体補間を説明するための模式図である。六面体補間では補間対象の入力画素値に対応する点Qxが属する立方体(六面体)を、点Qxを通り各座標軸に垂直な3つの平面によって8個の直方体に分割する。六面体捕間では、入力画素値に対応する出力画素値Pxを、六面体の格子点Q0〜Q7に対応付けられている出力画素値P0〜P7を8個の直方体の体積比で重み付け平均することによって補間する。
Next, hexahedral interpolation will be described.
FIG. 6 is a schematic diagram for explaining hexahedral interpolation. In hexahedral interpolation, a cube (hexahedron) to which a point Qx corresponding to an input pixel value to be interpolated belongs is divided into eight rectangular parallelepipeds by three planes passing through the point Qx and perpendicular to the coordinate axes. In the hexahedron trap, the output pixel value Px corresponding to the input pixel value is weighted and averaged with the output pixel values P0 to P7 associated with the lattice points Q0 to Q7 of the hexahedron at a volume ratio of eight cuboids. Interpolate.

以下に示す式6は、六面体の格子点Q0〜Q7に対応付けられている出力画素値P0〜P7を8個の直方体の体積比で重み付け平均する式である。ここでは分割前の立方体の各辺の長さを1とし、立方体の格子点Q5を原点としたときの点Qxの位置を(DL,Da,Db)として説明する。   Expression 6 shown below is an expression that weights and averages the output pixel values P0 to P7 associated with the hexahedral lattice points Q0 to Q7 by the volume ratio of the eight rectangular parallelepipeds. Here, it is assumed that the length of each side of the cube before division is 1, and the position of the point Qx when the lattice point Q5 of the cube is the origin is (DL, Da, Db).

Figure 2007158928
Figure 2007158928

次に、六面体補間の利点および欠点について説明する。
(1)RGB色空間から他の色空間に変換する場合のグレー色の再現性。
RGB色空間を3次元座標で表すとグレー色(R=G=B)を表している画素値に対応する点は対角線31上に位置する。上述した式6によると、点Qxが対角線31上にあるとき、格子点Q0〜Q7を全て参照して出力画素値を補間する。すなわち六面体補間では、RGB色空間においてグレー色を表している入力画素値であっても、グレー色でない格子点Q0、Q1、Q3、Q4、Q6およびQ7を参照して補間する。このため六面体補間ではRGB色空間から他の色空間への色空間変換において、四面体補間よりもグレー色の再現性に劣る。
Next, advantages and disadvantages of hexahedral interpolation will be described.
(1) Gray color reproducibility when converting from the RGB color space to another color space.
When the RGB color space is represented by three-dimensional coordinates, a point corresponding to a pixel value representing a gray color (R = G = B) is located on the diagonal line 31. According to Equation 6 described above, when the point Qx is on the diagonal line 31, the output pixel value is interpolated with reference to all the lattice points Q0 to Q7. That is, in the hexahedral interpolation, even an input pixel value representing a gray color in the RGB color space is interpolated with reference to grid points Q0, Q1, Q3, Q4, Q6, and Q7 that are not gray. For this reason, in the hexahedral interpolation, the gray color reproducibility is inferior to the tetrahedral interpolation in the color space conversion from the RGB color space to another color space.

(2)Lab色空間から他の色空間に変換する場合のグレー色の再現性。
Lab色空間を3次元座標で表すとグレー色(L,0,0)を表している画素値に対応する点はL軸上に位置する。上述した式によると、点QxがL軸上にあるとき、
Px=(1−DL)×P5+DL×P0
になる。すなわち六面体補間では、Lab色空間においてグレー色を表している入力画素値については、グレー色でない格子点Q1〜Q4、Q6およびQ7を参照せず、グレー色である格子点Q0およびQ5のみを参照して補間する。このため六面体補間ではLab色空間から他の色空間への色空間変換において、他の格子点も参照する場合に比べてグレー色の再現性が優れる。
(2) Reproducibility of gray color when converting from the Lab color space to another color space.
When the Lab color space is represented by three-dimensional coordinates, a point corresponding to a pixel value representing a gray color (L, 0, 0) is located on the L axis. According to the above equation, when the point Qx is on the L axis,
Px = (1-DL) × P5 + DL × P0
become. That is, in the hexahedral interpolation, for the input pixel value representing the gray color in the Lab color space, the grid points Q1 to Q4, Q6, and Q7 that are not gray are not referred to, and only the grid points Q0 and Q5 that are the gray color are referred to. And interpolate. For this reason, in the hexahedral interpolation, in the color space conversion from the Lab color space to another color space, the reproducibility of the gray color is superior to the case of referring to other grid points.

(3)階調の再現性。
六面体補間は四面体補間に比べて参照する格子点の数が多いので、階調の再現性は四面体補間に比べて優れている。
(3) Tone reproducibility.
Since hexahedral interpolation has a larger number of reference points than tetrahedral interpolation, gradation reproducibility is superior to tetrahedral interpolation.

以上を整理すると、RGB色空間から他の色空間への変換においてグレー色に対応する出力画素値を正確に補間できるのは四面体補間のみとなる。本実施例では階調の再現性よりグレー色を優先するので、RGB色空間から他の色空間への変換のときは四面体補間が適切であるといえる。   To summarize the above, only tetrahedral interpolation can accurately interpolate the output pixel value corresponding to the gray color in the conversion from the RGB color space to another color space. In this embodiment, the gray color is prioritized over the gradation reproducibility, so it can be said that tetrahedral interpolation is appropriate when converting from the RGB color space to another color space.

Lab色空間から他の色空間への変換では、四面体補間でも六面体補間でもグレー色に対応する出力画素値を正確に補間できる。グレー色についてはどちらの補間方法でも正確に補間できるが、階調の再現性は六面体補間の方が優れている。本実施例ではグレー色を優先しつつ階調の再現性を考慮するので、Lab色空間から他の色空間への変換のときは六面体補間が適切であるといえる。   In the conversion from the Lab color space to another color space, the output pixel value corresponding to the gray color can be accurately interpolated by either tetrahedral interpolation or hexahedral interpolation. Gray interpolation can be performed accurately by either interpolation method, but hexagonal interpolation is superior in terms of gradation reproducibility. In this embodiment, grayscale is prioritized and gradation reproducibility is taken into account, so that hexahedral interpolation is appropriate when converting from the Lab color space to another color space.

ただし、XYZ色空間のようにグレー色に対応する点が座標軸上にも対角線31上にもない色空間もある。グレー色に対応する点が座標軸上にも対角線31上にもない場合は、四面体補間でも六面体補間でもグレー色に対応する出力画素値を正確に補間できない。本実施例ではグレー色を優先しつつも階調の再現性を考慮するので、どちらの補間方法でもグレー色を正確に補間できない場合は階調の再現性に優れる六面体補間が適切であるといえる。   However, there is a color space in which the point corresponding to the gray color is neither on the coordinate axis nor on the diagonal line 31 like the XYZ color space. If the point corresponding to the gray color is neither on the coordinate axis nor on the diagonal line 31, the output pixel value corresponding to the gray color cannot be accurately interpolated by either tetrahedral interpolation or hexahedral interpolation. In this embodiment, the gray color is prioritized and the reproducibility of the gradation is taken into account. Therefore, if the gray color cannot be accurately interpolated by either interpolation method, it can be said that the hexahedral interpolation which is excellent in the gradation reproducibility is appropriate. .

次に、カラーマッチングにおいて実行される色空間変換について説明する。
カラーマッチングでは例えばディジタルスチルカメラ(DSC)で生成されたディジタル画像を当該DSCのプロファイルを用いてRGB色空間からLab色空間に変換する色空間変換と、Lab色空間に変換したディジタル画像を印刷部17のプロファイルを用いて印刷部17固有のRGB色空間に変換する色空間変換とが行われる。プロファイルはLab色空間やXYZ色空間などのPCS(Profile Connection Space)からある機器に依存する色空間へ、あるいはある機器に依存する色空間からPCSへ変換するための3DLUTを格納しているデータである。プロファイルとしては例えばカラーマネジメント技術の国際標準規格であるICCプロファイルなどが公知である。以下にカラーマッチングにおいて行われる色空間変換の処理の流れについて説明する。
Next, color space conversion executed in color matching will be described.
In color matching, for example, color space conversion for converting a digital image generated by a digital still camera (DSC) from the RGB color space to the Lab color space using the DSC profile, and the digital image converted to the Lab color space are printed Color space conversion is performed using the 17 profiles to convert to the RGB color space unique to the printing unit 17. A profile is data that stores a 3DLUT for converting from a PCS (Profile Connection Space) such as Lab color space or XYZ color space to a color space depending on a certain device, or from a color space depending on a certain device to PCS. is there. As the profile, for example, an ICC profile, which is an international standard for color management technology, is known. The flow of color space conversion processing performed in color matching will be described below.

図1は、入力色空間と出力色空間とに応じた3DLUTを用いた色空間変換の処理の流れを示すフローチャートである。
S105では、CPU16はディジタル画像の色空間(入力色空間)の種類がLab色空間であるか否かを判定する。この判定は、例えば3DLUTがどの色空間を入力色空間として扱うものであるかを判別することによって判定してもよいし、変換対象のディジタル画像の色空間を判別することによって判定してもよい。
FIG. 1 is a flowchart showing a flow of color space conversion processing using a 3DLUT corresponding to an input color space and an output color space.
In S105, the CPU 16 determines whether or not the type of the color space (input color space) of the digital image is the Lab color space. This determination may be made, for example, by determining which color space the 3DLUT handles as the input color space, or by determining the color space of the digital image to be converted. .

例えば3DLUTがLab色空間を入力色空間として扱うものである場合、CPU16は入力色空間の種類はLab色空間であると判定する。言い換えると、CPU16は、入力色空間はグレー色を表す画素値に対応する点が立方体の対角線31上に並ぶ色空間ではないと判定する。この判定において、CPU16は前述したように入力色空間の種類によって判定するので、グレー色を表す画素値に対応する点が立方体の対角線上に並ぶか否かを実際に調べる必要がなく、簡素な処理で判定できる。
CPU16は、入力色空間がLab色空間の場合は六面体補間処理(S120)に進み、それ以外の場合はS110に進む。
For example, when the 3DLUT handles the Lab color space as the input color space, the CPU 16 determines that the type of the input color space is the Lab color space. In other words, the CPU 16 determines that the input color space is not a color space where the points corresponding to the pixel values representing the gray color are arranged on the diagonal line 31 of the cube. In this determination, since the CPU 16 determines based on the type of the input color space as described above, it is not necessary to actually check whether or not the points corresponding to the pixel values representing the gray color are aligned on the diagonal line of the cube. Can be determined by processing.
If the input color space is the Lab color space, the CPU 16 proceeds to hexahedral interpolation processing (S120), and otherwise proceeds to S110.

S110では、CPU16は入力色空間の種類がRGB色空間であるか否かを判定する。
例えば3DLUTがRGB色空間を入力色空間として扱うものである場合、CPU16は入力色空間の種類はRGB色空間であると判定する。言い換えると、CPU16は、入力色空間はグレー色を表す画素値に対応する点が立方体の対角線31上に並ぶ色空間であると判定する。
CPU16は、入力色空間がRGB色空間の場合は四面体補間処理(S115)に進み、それ以外の場合は六面体補間処理(S120)に進む。
In S110, the CPU 16 determines whether or not the type of the input color space is the RGB color space.
For example, when the 3DLUT handles the RGB color space as the input color space, the CPU 16 determines that the type of the input color space is the RGB color space. In other words, the CPU 16 determines that the input color space is a color space in which points corresponding to pixel values representing a gray color are arranged on the diagonal line 31 of the cube.
The CPU 16 proceeds to tetrahedral interpolation processing (S115) when the input color space is RGB color space, and proceeds to hexahedral interpolation processing (S120) otherwise.

なお、上述した処理によると、RGB色空間であれば四面体補間が実行され、それ以外の色空間は全て六面体補間が実行されることになる。すなわち、四面体補間を実行するか六面体補間を実行するかは結局はS110における判定のみで振り分けできるので、S110の処理のみを行ってもよい。   According to the above-described processing, tetrahedral interpolation is executed in the RGB color space, and hexahedral interpolation is executed in all other color spaces. That is, whether tetrahedron interpolation or hexahedron interpolation is to be performed can be determined only by the determination in S110, so that only the processing of S110 may be performed.

図7は、六面体補間処理の流れを示すフローチャートである。
S205では、CPU16はディジタル画像から注目画素を一つ選択する。
S210では、CPU16は注目画素の画素値(入力画素値)に対応する点が属する六面体の8つの格子点の出力画素値を3DLUTから取得する。
S215では、CPU16は入力画素値に対応する出力画素値を六面体補間によって補間する。
FIG. 7 is a flowchart showing the flow of hexahedral interpolation processing.
In S205, the CPU 16 selects one target pixel from the digital image.
In S210, the CPU 16 acquires the output pixel values of the eight lattice points of the hexahedron to which the point corresponding to the pixel value (input pixel value) of the target pixel belongs from the 3DLUT.
In S215, the CPU 16 interpolates the output pixel value corresponding to the input pixel value by hexahedral interpolation.

S220では、CPU16は全ての画素の選択が終了したか否かを判定し、終了していなければS205に戻って全ての画素の選択が終了するまで処理を繰り返す。全ての画素の選択が終了していれば処理を終了する。   In S220, the CPU 16 determines whether or not all pixels have been selected. If not, the process returns to S205 and repeats the process until all pixels have been selected. If all pixels have been selected, the process ends.

図8は、四面体補間処理の流れを示すフローチャートである。
S305では、CPU16はディジタル画像から入力画素値を一つ選択する。
S310では、CPU16は図9に示す判定テーブルを参照し、入力画素値に対応する点がどの四面体に属するか判定する。図9において「○」は真、「×」は偽を意味している。例えば、DB≧DRが真、DR≧DGが真、DG≧DBが偽であれば四面体(Q5、Q0、Q1、Q2)に属すると判定される。
FIG. 8 is a flowchart showing the flow of tetrahedral interpolation processing.
In S305, the CPU 16 selects one input pixel value from the digital image.
In S310, the CPU 16 refers to the determination table shown in FIG. 9 to determine which tetrahedron the point corresponding to the input pixel value belongs to. In FIG. 9, “◯” means true and “x” means false. For example, if DB ≧ DR is true, DR ≧ DG is true, and DG ≧ DB is false, it is determined to belong to the tetrahedron (Q5, Q0, Q1, Q2).

S315では、CPU16は判定された四面体の4つの格子点の出力画素値を3DLUTから取得する。
S320では、CPU16は入力画素値に対応する出力画素値を四面体補間によって補間する。
S325では、CPU16は全ての画素の選択が終了したか否かを判定し、終了していなければS305に戻って全ての画素の選択が終了するまで処理を繰り返す。全ての画素の選択が終了していれば処理を終了する。
In S315, the CPU 16 acquires the output pixel values of the four lattice points of the determined tetrahedron from the 3DLUT.
In S320, the CPU 16 interpolates the output pixel value corresponding to the input pixel value by tetrahedral interpolation.
In S325, the CPU 16 determines whether or not all pixels have been selected. If not, the process returns to S305 and repeats the process until all pixels have been selected. If all pixels have been selected, the process ends.

上述したフローによると、例えばLab色空間からRGB色空間への変換では六面体補間が行われ、RGB色空間からLab色空間への変換では四面体補間が行われる。また、例えばXYZ色空間からRGB色空間への変換では六面体補間が行われ、RGB色空間からXYZ色空間への変換では四面体補間が行われる。   According to the above-described flow, for example, hexahedral interpolation is performed in the conversion from the Lab color space to the RGB color space, and tetrahedral interpolation is performed in the conversion from the RGB color space to the Lab color space. Further, for example, hexahedral interpolation is performed in the conversion from the XYZ color space to the RGB color space, and tetrahedral interpolation is performed in the conversion from the RGB color space to the XYZ color space.

以上説明した本発明の一実施例に係る色空間変換方法によると、Lab色空間については六面体補間または三角柱補間を適用し、RGB色空間については階調の再現性よりもグレー色の再現性を優先して四面体補間を適用する。XYZ色空間については六面体補間または三角柱補間を適用することによってグレー色の再現性は劣るものの階調の再現性に優れた補間を行う。よって本発明によると、3次元ルックアップテーブルを用いた色空間変換において、入力色空間毎にグレー色の再現性を優先しつつ階調の再現性を考慮して適切に3次元ルックアップテーブルを補間できる。   According to the color space conversion method according to the embodiment of the present invention described above, hexahedral interpolation or triangular prism interpolation is applied to the Lab color space, and the gray color reproducibility is higher than the gradation reproducibility for the RGB color space. Preferentially apply tetrahedral interpolation. For the XYZ color space, by applying hexahedral interpolation or triangular prism interpolation, interpolation with excellent grayscale reproducibility is performed, although gray color reproducibility is poor. Therefore, according to the present invention, in color space conversion using a three-dimensional lookup table, a three-dimensional lookup table is appropriately set in consideration of gradation reproducibility while giving priority to gray color reproducibility for each input color space. Can be interpolated.

なお、本実施例ではカラーマッチングを行う場合を例に説明したが、本発明はカラーマッチング以外の目的で色空間変換を行う場合にも適用可能である。例えば、スキャンユニット固有のRGB色空間で表されているディジタル画像を3DLUTを用いてYCbCr色空間に変換する場合や、YCbCr色空間で表されているディジタル画像を3DLUTを用いて印刷部17固有のCMYK色空間に変換する場合に適用してもよい。YCbCr色空間はLab色空間と同様にグレー色を表す画素値に対応する点が座標軸(Y軸)上に並ぶので、YCbCr色空間からRGB色空間への変換では六面体補間によりグレー色および階調の再現性がいずれも優れる補間を行える。逆に、RGB色空間からYCbCr色空間への変換では四面体補間によりグレー色を優先した補間を行える。   In the present embodiment, the case where color matching is performed has been described as an example. However, the present invention can also be applied to a case where color space conversion is performed for purposes other than color matching. For example, when a digital image expressed in the RGB color space unique to the scan unit is converted into a YCbCr color space using 3DLUT, or a digital image expressed in the YCbCr color space is converted into a unique property of the printing unit 17 using 3DLUT. It may be applied when converting to the CMYK color space. In the YCbCr color space, points corresponding to pixel values representing a gray color are arranged on the coordinate axis (Y axis) in the same manner as the Lab color space. Therefore, in the conversion from the YCbCr color space to the RGB color space, gray color and gradation are obtained by hexahedral interpolation. Can be interpolated with excellent reproducibility. Conversely, in the conversion from the RGB color space to the YCbCr color space, the gray color can be preferentially interpolated by tetrahedral interpolation.

また、本発明では六面体補間を例に説明したが、六面体補間に代えて三角柱補間を用いることもできる。三角柱補間は公知の方法であり、またグレー色の再現性や階調の再現性に関する性質は六面体補間と実質的に同一なので、三角柱補間についての詳細な説明については省略する。
また、本実施例では色空間変換装置としてスタンドアロン型プリンタ10を例に説明したが、本発明は色空間変換を行う任意の機器に適用可能である。例えば、パーソナルコンピュータ(PC)とPCに制御されて印刷を行うプリンタとで色空間変換装置を構成してもよい。また、色空間変換装置はディジタル画像を表示するパーソナルコンピュータや画像ビューワ、ディジタル画像を生成するディジタルスチルカメラなどであってもよい。
In the present invention, hexahedral interpolation has been described as an example, but triangular prism interpolation can be used instead of hexahedral interpolation. Triangular prism interpolation is a well-known method, and the properties relating to gray color reproducibility and gradation reproducibility are substantially the same as hexahedral interpolation, and therefore detailed description of triangular prism interpolation is omitted.
In the present embodiment, the stand-alone printer 10 is described as an example of the color space conversion device. However, the present invention can be applied to any device that performs color space conversion. For example, the color space conversion device may be configured by a personal computer (PC) and a printer that performs printing under the control of the PC. The color space conversion device may be a personal computer that displays a digital image, an image viewer, a digital still camera that generates a digital image, or the like.

本発明の一実施例に係るフローチャート。The flowchart which concerns on one Example of this invention. 本発明の一実施例に係る色空間変換装置の概略構成を示すブロック図。1 is a block diagram showing a schematic configuration of a color space conversion apparatus according to an embodiment of the present invention. (A)及び(B)は本発明の一実施例に係る3次元ルックアップテーブルの模式図。(A) And (B) is a schematic diagram of the three-dimensional lookup table which concerns on one Example of this invention. 本発明の一実施例に係る四面体補間を説明するための模式図。The schematic diagram for demonstrating tetrahedral interpolation which concerns on one Example of this invention. 本発明の一実施例に係る四面体補間を説明するための模式図。The schematic diagram for demonstrating tetrahedral interpolation which concerns on one Example of this invention. 本発明の一実施例に係る六面体補間を説明するための模式図。The schematic diagram for demonstrating the hexahedral interpolation which concerns on one Example of this invention. 本発明の一実施例に係るフローチャート。The flowchart which concerns on one Example of this invention. 本発明の一実施例に係るフローチャート。The flowchart which concerns on one Example of this invention. 本発明の一実施例に係る判定テーブルの模式図。The schematic diagram of the determination table which concerns on one Example of this invention.

符号の説明Explanation of symbols

10 プリンタ(色空間変換装置)、11 リムーバブルメモリ、12 外部IF、13 リムーバブルメモリコントローラ、14 RAM、15 画像処理部、16 CPU(判定手段、変換手段)、17 印刷部、18 フラッシュメモリ、19 操作部、20 表示部 DESCRIPTION OF SYMBOLS 10 Printer (color space conversion device), 11 Removable memory, 12 External IF, 13 Removable memory controller, 14 RAM, 15 Image processing part, 16 CPU (determination means, conversion means), 17 Printing part, 18 Flash memory, 19 Operation Part, 20 display part

Claims (6)

3つの画素成分からなる画素値で色を表す入力色空間と任意の出力色空間とに応じた3次元ルックアップテーブルを用いて前記入力色空間で表されているディジタル画像の色空間を前記出力色空間に変換する色空間変換装置であって、
前記入力色空間は各前記画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶ色空間であるかを判定する判定手段と、
前記判定手段で肯定判定された場合は四面体補間によって前記3次元ルックアップテーブルを補間し、否定判定された場合は六面体補間または三角柱補間によって前記3次元ルックアップテーブルを補間して前記ディジタル画像の色空間を変換する変換手段と、
を備えることを特徴とする色空間変換装置。
A color space of a digital image represented by the input color space is output using a three-dimensional lookup table corresponding to an input color space representing a color by a pixel value composed of three pixel components and an arbitrary output color space. A color space conversion device for converting to a color space,
When the input color space is expressed as a cube in a three-dimensional space with the pixel components as coordinate axes, it is determined whether the point corresponding to the pixel value representing the gray color is a color space arranged on the diagonal of the cube. Determination means to perform,
If the determination means makes an affirmative determination, the three-dimensional lookup table is interpolated by tetrahedral interpolation. If the determination is negative, the three-dimensional lookup table is interpolated by hexahedral interpolation or triangular prism interpolation. Conversion means for converting the color space;
A color space conversion device comprising:
前記判定手段は、前記入力色空間の種類を判別することにより、グレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶか否かを調べることなく判定することを特徴とする請求項1に記載の色空間変換装置。   The determination means determines the type of the input color space without checking whether or not the points corresponding to the pixel values representing the gray color are aligned on the diagonal of the cube. Item 2. The color space conversion device according to Item 1. 前記入力色空間はRGB色空間であり、前記出力色空間はL*a*b*色空間であることを特徴とする請求項1又は2に記載の色空間変換装置。   The color space conversion apparatus according to claim 1 or 2, wherein the input color space is an RGB color space, and the output color space is an L * a * b * color space. 前記入力色空間はL*a*b*色空間であり、前記出力色空間はRGB色空間であることを特徴とする請求項1又は2に記載の色空間変換装置。   3. The color space conversion device according to claim 1, wherein the input color space is an L * a * b * color space, and the output color space is an RGB color space. 3つの画素成分からなる画素値で色を表す入力色空間と任意の出力色空間とに応じた3次元ルックアップテーブルを用いて前記入力色空間で表されているディジタル画像の色空間を前記出力色空間に変換する色空間変換方法であって、
前記入力色空間は各前記画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶ色空間であるかを判定する判定段階と、
前記判定段階で肯定判定された場合は四面体補間によって前記3次元ルックアップテーブルを補間し、否定判定された場合は六面体補間または三角柱補間によって前記3次元ルックアップテーブルを補間して前記ディジタル画像の色空間を変換する変換段階と、
を含むことを特徴とする色空間変換方法。
A digital image color space represented by the input color space is output using a three-dimensional lookup table corresponding to an input color space representing a color by a pixel value composed of three pixel components and an arbitrary output color space. A color space conversion method for converting to a color space,
When the input color space is expressed as a cube in a three-dimensional space with the pixel components as coordinate axes, it is determined whether the point corresponding to the pixel value representing the gray color is a color space aligned on the diagonal of the cube. A determination stage to perform,
If the determination is affirmative, the three-dimensional lookup table is interpolated by tetrahedral interpolation. If the determination is negative, the three-dimensional lookup table is interpolated by hexahedral interpolation or triangular prism interpolation. A conversion stage to convert the color space;
A color space conversion method comprising:
3つの画素成分からなる画素値で色を表す入力色空間と任意の出力色空間とに応じた3次元ルックアップテーブルを用いて前記入力色空間で表されているディジタル画像の色空間を前記出力色空間に変換する色空間変換プログラムであって、
前記入力色空間は各前記画素成分を座標軸とする3次元空間上の立方体として表現された場合にグレー色を表す画素値に対応する点が前記立方体の対角線上に並ぶ色空間であるかを判定する判定手段と、
前記判定手段で肯定判定された場合は四面体補間によって前記3次元ルックアップテーブルを補間し、否定判定された場合は六面体補間または三角柱補間によって前記3次元ルックアップテーブルを補間して前記ディジタル画像の色空間を変換する変換手段としてコンピュータを機能させることを特徴とする色空間変換プログラム。



A digital image color space represented by the input color space is output using a three-dimensional lookup table corresponding to an input color space representing a color by a pixel value composed of three pixel components and an arbitrary output color space. A color space conversion program for converting to a color space,
When the input color space is expressed as a cube in a three-dimensional space with the pixel components as coordinate axes, it is determined whether the point corresponding to the pixel value representing the gray color is a color space aligned on the diagonal of the cube. Determination means to perform,
If the determination means makes an affirmative determination, the three-dimensional lookup table is interpolated by tetrahedral interpolation. If the determination is negative, the three-dimensional lookup table is interpolated by hexahedral interpolation or triangular prism interpolation. A color space conversion program which causes a computer to function as conversion means for converting a color space.



JP2005353548A 2005-12-07 2005-12-07 Color space conversion device, color space conversion method, and color space conversion program Expired - Fee Related JP4682833B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005353548A JP4682833B2 (en) 2005-12-07 2005-12-07 Color space conversion device, color space conversion method, and color space conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005353548A JP4682833B2 (en) 2005-12-07 2005-12-07 Color space conversion device, color space conversion method, and color space conversion program

Publications (2)

Publication Number Publication Date
JP2007158928A true JP2007158928A (en) 2007-06-21
JP4682833B2 JP4682833B2 (en) 2011-05-11

Family

ID=38242675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005353548A Expired - Fee Related JP4682833B2 (en) 2005-12-07 2005-12-07 Color space conversion device, color space conversion method, and color space conversion program

Country Status (1)

Country Link
JP (1) JP4682833B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010082320A1 (en) * 2009-01-14 2010-07-22 株式会社ミマキエンジニアリング Program, image forming method, and printing system
WO2020253053A1 (en) * 2019-06-17 2020-12-24 Tcl华星光电技术有限公司 Color enhancement method employing image saliency, and image processing apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09186905A (en) * 1995-12-27 1997-07-15 Ricoh Co Ltd Color correction device
JP2001218075A (en) * 2000-02-01 2001-08-10 Canon Inc Device and method for image processing and storage medium
JP2002077652A (en) * 2000-08-31 2002-03-15 Canon Inc Image processing method and recording medium
JP2004304485A (en) * 2003-03-31 2004-10-28 Brother Ind Ltd Color conversion apparatus, image forming apparatus, and color conversion program
JP2004328485A (en) * 2003-04-25 2004-11-18 Brother Ind Ltd Color conversion device, image-forming device, and color conversion program
JP2004336815A (en) * 2004-06-28 2004-11-25 Fujitsu Ltd Color conversion table, color conversion apparatus, color signal generating apparatus, color conversion table creation method, color conversion method, and color gamut judgment method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09186905A (en) * 1995-12-27 1997-07-15 Ricoh Co Ltd Color correction device
JP2001218075A (en) * 2000-02-01 2001-08-10 Canon Inc Device and method for image processing and storage medium
JP2002077652A (en) * 2000-08-31 2002-03-15 Canon Inc Image processing method and recording medium
JP2004304485A (en) * 2003-03-31 2004-10-28 Brother Ind Ltd Color conversion apparatus, image forming apparatus, and color conversion program
JP2004328485A (en) * 2003-04-25 2004-11-18 Brother Ind Ltd Color conversion device, image-forming device, and color conversion program
JP2004336815A (en) * 2004-06-28 2004-11-25 Fujitsu Ltd Color conversion table, color conversion apparatus, color signal generating apparatus, color conversion table creation method, color conversion method, and color gamut judgment method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010082320A1 (en) * 2009-01-14 2010-07-22 株式会社ミマキエンジニアリング Program, image forming method, and printing system
CN102171051A (en) * 2009-01-14 2011-08-31 株式会社御牧工程 Program, image forming method, and printing system
JPWO2010082320A1 (en) * 2009-01-14 2012-06-28 株式会社ミマキエンジニアリング Program, image forming method, and printing system
WO2020253053A1 (en) * 2019-06-17 2020-12-24 Tcl华星光电技术有限公司 Color enhancement method employing image saliency, and image processing apparatus

Also Published As

Publication number Publication date
JP4682833B2 (en) 2011-05-11

Similar Documents

Publication Publication Date Title
US9538046B2 (en) Image reproduction using a particular color space
JP2004120217A (en) Image processing apparatus, image processing method, program, and recording medium
JP2008028679A (en) Color conversion table, and method and device for generating the same
US8503025B2 (en) Image processing apparatus, image processing method, and computer program product
JP4533287B2 (en) Color processing method and apparatus
JP2009154365A (en) Image processing apparatus, image processing method, image processing program and recording medium
JP2019029826A (en) Image processing apparatus, image processing method, and program
JP3303805B2 (en) Data conversion device, computer, and printing device
JP4682833B2 (en) Color space conversion device, color space conversion method, and color space conversion program
JP2011114824A (en) Image processing apparatus and image processing program
JP5103304B2 (en) Image processing apparatus, image processing method, and image processing program
JP2014042117A (en) Image processing apparatus and image processing method
EP1784024A1 (en) Image reproduction using particular color space
JP5605041B2 (en) Image processing device
JP5008391B2 (en) Image processing apparatus and processing method thereof
JP2004096447A (en) Image processing apparatus and method thereof
JPH10173951A (en) Device and method for manufacturing color conversion table, and recording medium
JP2006180062A (en) Information processing method and processor
JP2006254369A (en) Color processing method and device thereof
JP6707262B2 (en) Image forming apparatus and program
JP5138088B2 (en) Image processing apparatus and processing method thereof
JP2005323293A (en) Image processing apparatus
JP2006173826A (en) Image processing method and apparatus
JP4974762B2 (en) Color processing apparatus and method
JP2022114384A (en) Image processing apparatus, control method, and program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070405

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100406

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100713

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100830

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110111

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110124

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

Free format text: PAYMENT UNTIL: 20140218

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees