JP2006109394A - Color processing apparatus and method - Google Patents

Color processing apparatus and method Download PDF

Info

Publication number
JP2006109394A
JP2006109394A JP2004362055A JP2004362055A JP2006109394A JP 2006109394 A JP2006109394 A JP 2006109394A JP 2004362055 A JP2004362055 A JP 2004362055A JP 2004362055 A JP2004362055 A JP 2004362055A JP 2006109394 A JP2006109394 A JP 2006109394A
Authority
JP
Japan
Prior art keywords
color
value
color system
color signal
processing method
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
JP2004362055A
Other languages
Japanese (ja)
Other versions
JP4095609B2 (en
Inventor
Hirochika Matsuoka
寛親 松岡
Suzuko Fukao
珠州子 深尾
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2004362055A priority Critical patent/JP4095609B2/en
Publication of JP2006109394A publication Critical patent/JP2006109394A/en
Application granted granted Critical
Publication of JP4095609B2 publication Critical patent/JP4095609B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that image defects such as pseudo-contours occur, when tetrahedral interpolation is used for correction of color reproduction associated with color adjustment, because the surfaces of the tetrahedron satisfy boundary condition. <P>SOLUTION: Pixel positions of digital image data are calculated and RGB values in the pixel positions are obtained (S801). The obtained RGB values are displayed in the RGB value display region (S802). L*a*b* values are calculated by the basis function and coefficient value of B-spline solid for color calculation (S803). The calculated L*a*b* values are displayed in the L*a*b* value display region (S804). <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は色処理装置およびその方法に関し、例えば、第一の表色系で表される色信号値から第二の表色系の色信号値を算出する色処理、並びに、プロファイルを作成するための色信号値の算出または予測に関する。   The present invention relates to a color processing apparatus and method, for example, for creating a color process for calculating a color signal value of a second color system from a color signal value represented by a first color system, and creating a profile. The present invention relates to the calculation or prediction of color signal values.

近年、パーソナルコンピュータやワークステーションの普及に伴い、デスクトップパブリッシング(DTP)やディジタル画像管理が広く一般に利用されるようになった。DTP用のカラーモニタとカラープリンタを有するコンピュータシステムにおいては、モニタ上においてカラー画像の作成・編集・加工などを行い、プレビューにより出力イメージのチェックを行った後、カラープリンタでカラー画像を出力する。あるいは、ディジタルカメラにより撮影された画像は、色調整を施した後、カラーモニタへ表示したり、カラープリンタで出力する。このような画像処理の分野において、所期の色処理を実現するために、目的に応じて様々な色算出方法が用いられる。   In recent years, with the spread of personal computers and workstations, desktop publishing (DTP) and digital image management have become widely used. In a computer system having a color monitor for DTP and a color printer, a color image is created / edited / processed on the monitor, an output image is checked by a preview, and a color image is output by the color printer. Alternatively, an image photographed by a digital camera is displayed on a color monitor or output by a color printer after color adjustment. In the field of such image processing, various color calculation methods are used depending on the purpose in order to realize desired color processing.

DTPにおけるプリント出力のプレビューでは、印刷機器のカラープロファイルを基に、RGB画像を印刷した際にどのような色再現になるかを示すL*a*b*値を算出し、このL*a*b*値から例えばsRGB値を算出してモニタにプレビュー表示する。ここで、印刷機器のカラープロファイルには、一般にルックアップテーブル(LUT)が用いられる。このLUTを用いてL*a*b*値を算出する際、四点で囲まれる小領域内において線形補間演算を行う四面体補間が広く用いられる。とくに、LUTを用いる四面体補間は、隣接する八つの色で囲まれる六面体領域を、さらに四面体領域に六分割し、各領域ごとに線形補間演算を行う。図1は四面体への六分割を模式的に示す図である。   In the print output preview in DTP, based on the color profile of the printing device, L * a * b * values are calculated to indicate what color reproduction will occur when an RGB image is printed, and this L * a * For example, the sRGB value is calculated from the b * value and previewed on the monitor. Here, a look-up table (LUT) is generally used for the color profile of the printing device. When calculating an L * a * b * value using this LUT, tetrahedral interpolation that performs linear interpolation calculation within a small region surrounded by four points is widely used. In particular, in tetrahedral interpolation using the LUT, a hexahedral area surrounded by eight adjacent colors is further divided into six tetrahedral areas, and linear interpolation is performed for each area. FIG. 1 is a diagram schematically showing six divisions into tetrahedrons.

また、ディジタルカメラ画像の色調整は、ある色を調整した際に、その調整色の周囲の色が変化するよう色再現を修正する。この色再現の修正には幾つもの方法が存在するが、代表的な方法として、RGBの階調特性を変更する方法が知られている。しかし、このような方法は、色再現の修正を局所領域に限定することが不可能である。そこで、さらに進んだ修正方法として、色域写像を用いた方法が用いられる。この方法によれば、例えば特開2002-33929号公報に開示された技術のように、写像パラメータを変更することで色再現を修正することができる。また、別の修正方法としては、色再現を複数の代表色で近似表現し、この代表色の変更と、代表色を用いた四面体補間を組み合わせて実現する方法がある。この方法によれば、調整色を含む四面体領域のみに影響範囲を限定し、色再現を修正することが可能である。   Further, in the color adjustment of the digital camera image, when a certain color is adjusted, the color reproduction is corrected so that the color around the adjusted color changes. There are various methods for correcting the color reproduction. As a typical method, a method of changing the gradation characteristics of RGB is known. However, such a method cannot limit the color reproduction correction to the local region. Therefore, as a further advanced correction method, a method using color gamut mapping is used. According to this method, the color reproduction can be corrected by changing the mapping parameter as in the technique disclosed in Japanese Patent Laid-Open No. 2002-33929, for example. As another correction method, there is a method in which color reproduction is approximated with a plurality of representative colors, and the change of the representative colors is combined with tetrahedral interpolation using the representative colors. According to this method, it is possible to limit the influence range only to the tetrahedron region including the adjustment color and correct the color reproduction.

しかし、四面体補間を用いる場合、四面体表面を境界として線形補間が切り替わることに起因し、画像障害が発生する場合がある。例えばプリント出力のプレビューでは、線形補間の切り替えに起因してL*a*b*値の算出精度の低下によるプレビュー表示精度の低下、または、擬似輪郭の発生といった画像障害が発生する場合がある。とくに、LUTの格子間隔が粗い場合は、四面体の表面を境界として値が急峻に変化して、画像障害が顕著に現れる傾向にある。   However, when tetrahedral interpolation is used, an image failure may occur due to switching of linear interpolation with the tetrahedral surface as a boundary. For example, in the preview of print output, there may be an image failure such as a decrease in preview display accuracy due to a decrease in L * a * b * value calculation accuracy or a pseudo contour due to switching of linear interpolation. In particular, when the lattice spacing of the LUT is coarse, the value changes abruptly with the surface of the tetrahedron as a boundary, and there is a tendency that an image defect appears remarkably.

また、色調整に伴う色再現の修正において四面体補間を用いる場合、同様に、四面体の表面が境界条件になることに起因して、擬似輪郭などの画像障害が発生する場合がある。とくに、四面体の表面を境界として明度の変化率が変動する場合、グラデーション画像などの滑らかな階調変化が失われ、変化率の変動が急峻であれば擬似輪郭など画像障害が一層顕著に現れる。   In addition, when tetrahedral interpolation is used in correction of color reproduction accompanying color adjustment, an image failure such as a pseudo contour may occur due to the surface of the tetrahedron becoming a boundary condition. In particular, when the rate of change in brightness varies with the surface of the tetrahedron as a boundary, smooth gradation changes such as gradation images are lost, and if the change in rate of change is steep, image disturbances such as pseudo contours appear more prominently. .

また、色調整に伴う色再現の修正において色域写像を行う場合、調整後の色を直接指定するのが困難という問題がある。例えば、一般によく用いられるL軸上の一点を目標点として圧縮写像を行うような写像方法によれば、ガマット境界近辺で色の変化が急峻になり擬似輪郭などの画像障害が発生する場合がある。図2(a)および(b)はガマット境界近辺で色の変化が急峻になる様子を示す図で、図2(a)に一点鎖線で示すのがモニタ色再現、図2(b)に実線で示すのが写像後のプリンタ色再現、図2(b)に点線で示すのがプリンタ色域である。   Further, when color gamut mapping is performed in correction of color reproduction accompanying color adjustment, there is a problem that it is difficult to directly specify the color after adjustment. For example, according to a mapping method in which compression mapping is performed using a point on the L axis that is commonly used as a target point, the color change may become steep near the gamut boundary, and an image defect such as a pseudo contour may occur. . Figures 2 (a) and 2 (b) show how the color change becomes steep near the gamut boundary.Figure 2 (a) shows the monitor color reproduction, and Figure 2 (b) shows the solid line. The printer color reproduction after mapping is indicated by, and the printer color gamut is indicated by a dotted line in FIG.

また、上述したDTPやCADのような分野においては、ディジタル画像を印刷または表示した際の、実際の物理刺激値を予測する色予測技術が必須になる。   In the fields such as DTP and CAD described above, a color prediction technique for predicting actual physical stimulus values when a digital image is printed or displayed is essential.

この色予測技術が必須の技術として、例えば、カラーマネージメントがある。例えば、カラーモニタ上でカラー画像の作成・編集・加工などを行い、カラープリンタで出力する際、モニタやプリンタのカラー特性の如何にかかわらず、モニタ上のカラー画像とプリンタの出力画像とを知覚的にマッチングさせることが要求される。このような要求を満たすカラーマネージメントを実現する技術の一例として、ICC (International Color Consortium)により定められた、ICCカラープロファイルに基づきカラーマネージメントを行うCMS (Color Management System)が存在する。   For example, there is color management as a technique in which this color prediction technique is indispensable. For example, when a color image is created, edited, or processed on a color monitor and output by a color printer, the color image on the monitor and the output image of the printer are perceived regardless of the color characteristics of the monitor or printer. Matching is required. As an example of a technique for realizing color management that satisfies such requirements, there is a CMS (Color Management System) that performs color management based on an ICC color profile defined by the ICC (International Color Consortium).

CMSは、カラーマッチングを行うための、デバイスに独立なハブ色空間あるいはPCS (Profile Connection Space)を定義し、その色空間上で、デバイス色空間からハブ色空間(またはPCS)への色変換を規定するソース側プロファイル、並びに、ハブ色空間(またはPCS)からデバイス色空間への色変換を規定するディスティネーション側プロファイルを用いてカラーマネージメントを実現する。   CMS defines a device independent hub color space or PCS (Profile Connection Space) for color matching, and performs color conversion from the device color space to the hub color space (or PCS) on that color space. Color management is realized by using a source-side profile to be defined and a destination-side profile to define color conversion from the hub color space (or PCS) to the device color space.

処理系は、入力デバイスに依存するデバイス色空間の入力色信号値を、ソース側プロファイルによりハブ色空間(またはPCS)の色信号値に変換し、さらに、ディスティネーション側プロファイルにより出力デバイスに適合したデバイス色空間の出力色信号に変換する、という二つの大きな変換処理より構成される。このシステムは、スキャナからプリンタにおけるカラーマッチングや、モニタからプリンタにおけるカラーマッチングなど、幅広く柔軟に対応することができる。例えば、DTPシステムにおいては、ソース側プロファイルにモニタプロファイルを指定し、ディスティネーション側プロファイルにプリンタプロファイルを指定すれば、モニタ上のカラー画像とプリンタの出力画像の間の知覚的なマッチングが可能になる。   The processing system converts the input color signal value of the device color space depending on the input device into the color signal value of the hub color space (or PCS) by the source side profile, and further adapted to the output device by the destination side profile. It consists of two large conversion processes that convert the output color signal of the device color space. This system can deal with a wide range of flexibility, such as color matching from a scanner to a printer, and color matching from a monitor to a printer. For example, in a DTP system, if a monitor profile is specified as the source profile and a printer profile is specified as the destination profile, perceptual matching between the color image on the monitor and the output image of the printer becomes possible. .

ここで、知覚的なマッチングの良否はプロファイルに左右されるため、デバイスに依存する色と、ハブ色空間またはPCSの色とをできるだけ正確に対応付けたプロファイルを作成しなければならない。そのために、デバイスに依存する色を、実際に印刷または表示した際の物理刺激値を予測する、色予測を正確に行う必要がある。   Here, since the quality of perceptual matching depends on the profile, it is necessary to create a profile that associates the color depending on the device with the color of the hub color space or the PCS as accurately as possible. Therefore, it is necessary to accurately perform color prediction that predicts a physical stimulus value when a device-dependent color is actually printed or displayed.

色予測技術として、パッチの測色値と線形補間を用いるテーブル型の色予測技術が存在し、その線形補間には四面体補間、立方体補間、三角柱補間など様々な補間方法が提案されている。しかし、これらの補間方法による予測精度は、テーブルの格子密度に依存する。そのため、高い精度を必要とする場合は格子数を増やして、非常に多くのパッチを測色する多大な労力が必要になる。   As a color prediction technique, there is a table-type color prediction technique using patch colorimetric values and linear interpolation, and various interpolation methods such as tetrahedral interpolation, cube interpolation, and triangular prism interpolation have been proposed for the linear interpolation. However, the prediction accuracy by these interpolation methods depends on the grid density of the table. For this reason, when high accuracy is required, a great amount of labor is required to increase the number of grids and measure a very large number of patches.

特開2002-33929号公報JP 2002-33929 A

本発明は、色再現を修正する際に、色の変化の傾向を反映した滑らかな変化で色を算出することを目的とする。   An object of the present invention is to calculate a color with a smooth change reflecting a tendency of a color change when correcting the color reproduction.

また、ユーザが制御し易い色調整用のインタフェイスを提供することを他の目的とする。   Another object of the present invention is to provide a color adjustment interface that can be easily controlled by the user.

また、所定の色座標値を通過するように基底関数の係数値を定める際に、後述する振動(図23(a)参照)の発生を抑えることを目的とする。   Another object of the present invention is to suppress the occurrence of vibration (see FIG. 23 (a)), which will be described later, when the coefficient value of the basis function is determined so as to pass a predetermined color coordinate value.

また、少ないパッチの測色結果から正確に色信号値を予測することを他の目的とする。   Another object is to accurately predict the color signal value from the colorimetric results of a small number of patches.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本発明の第一の面では、第一の表色系で表される色信号値から第二の表色系の色信号値を算出する際に、第一の表色系の次元数と同じ重度の、区分的多項式を基底関数とする多重総和演算を用いて前記第二の表色系の色信号値を算出することが開示される。   In the first aspect of the present invention, when the color signal value of the second color system is calculated from the color signal value represented by the first color system, it is the same as the number of dimensions of the first color system. It is disclosed that a color signal value of the second color system is calculated using a multiple sum operation using a severe piecewise polynomial as a basis function.

また、本発明の第二の面では、色の修正後の値を指定し、修正後の値に応じて色再現を計算し、色再現の計算結果に応じて、色再現の変化を擬似三次元表示するためのデータを生成することが開示される。   Further, in the second aspect of the present invention, the corrected value of the color is designated, the color reproduction is calculated according to the corrected value, and the change of the color reproduction is simulated according to the calculation result of the color reproduction. Generating data for original display is disclosed.

また、本発明の第三の面では、所定の表色系の色信号値を算出する際に、第一の表色系の次元数と同じ多重度の区分的多項式を基底関数とする多重総和演算による変換式を設定し、第一の表色系で表される複数の色信号値と、それら色信号値に対して算出されるべき第二の表色系の複数の色信号値との組み合わせを定めたデータに基づき、組み合わせの並びに近似する変換式、あるいは、組み合わせを結ぶ曲面集合、多面体集合または超多面体集合を平滑化する変換式に対応する区分的多項式の係数を求め、多重総和演算を用いて、第一の表色系で表現される色信号値に対応する第二の表色系の色信号値を算出することが開示される。   In the third aspect of the present invention, when calculating a color signal value of a predetermined color system, a multiple sum having a piecewise polynomial of the same multiplicity as the number of dimensions of the first color system as a basis function. A conversion formula is set by calculation, and a plurality of color signal values represented by the first color system and a plurality of color signal values of the second color system to be calculated for these color signal values Based on the data that defines the combination, find the coefficients of the piecewise polynomial corresponding to the conversion formula that approximates the combination, or the conversion formula that smooths the curved surface set, polyhedron set, or hyperpolyhedron set connecting the combinations, and performs multiple summation Is used to calculate the color signal value of the second color system corresponding to the color signal value expressed in the first color system.

また、本発明の第四の面では、所定の表色系の色信号値を算出する際に、第一の表色系の次元数と同じ多重度の区分的多項式を基底関数とする多重総和演算を設定し、第一の表色系で表される複数の色信号値と、それら色信号値に対する測色結果である第二の表色系の複数の色信号値との組み合わせを示すデータに基づき区分的多項式の係数を求め、多重総和演算を用いて、第一の表色系で表される複数の色信号値に対応する第二の表色系の複数の色信号値を算出することが開示される。   According to a fourth aspect of the present invention, when calculating a color signal value of a predetermined color system, a multiple sum having a piecewise polynomial having the same multiplicity as the number of dimensions of the first color system as a basis function. Data indicating a combination of a plurality of color signal values represented by the first color system and a plurality of color signal values of the second color system, which is a colorimetric result for these color signal values, by setting an operation And calculating a plurality of color signal values of the second color system corresponding to the plurality of color signal values represented by the first color system using a multiple sum operation. Is disclosed.

本発明によれば、色再現を修正する際に、色の変化の傾向を反映した滑らかな変化で色を算出することができる。   According to the present invention, when the color reproduction is corrected, the color can be calculated with a smooth change reflecting the tendency of the color change.

また、ユーザが制御し易い色調整用のインタフェイスを提供することができる。   In addition, it is possible to provide an interface for color adjustment that can be easily controlled by the user.

また、所定の色座標値を通過するように基底関数の係数値を定める際に、後述する振動(図23(a)参照)の発生を抑えることができる。   In addition, when the coefficient value of the basis function is determined so as to pass a predetermined color coordinate value, it is possible to suppress the occurrence of vibration (see FIG. 23 (a)) described later.

また、少ないパッチの測色結果から正確に色信号値を予測することができる。   Further, the color signal value can be accurately predicted from the color measurement results of a few patches.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。   Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings.

[構成]
図3は実施例1の色処理装置の構成例を示すブロック図である。
[Constitution]
FIG. 3 is a block diagram illustrating a configuration example of the color processing apparatus according to the first embodiment.

図3において、CPU 101は、ROMやRAMからなるメインメモリ102やハードディスクドライブ(HDD) 105に格納されたプログラムに従い、メインメモリ102をワークメモリとして、システムバス(およびPCIバス)114を介して後述する構成を制御して、後述する各種処理および制御を実行する。   In FIG. 3, a CPU 101 is described later via a system bus (and PCI bus) 114 using the main memory 102 as a work memory according to a program stored in a main memory 102 or a hard disk drive (HDD) 105 including ROM and RAM. Various processes and controls to be described later are executed by controlling the configuration to be performed.

SCSI (Small Computer Standard Interface)などの汎用パラレルインタフェイス(I/F) 103は、HDD 105とシステムバス114をインタフェイスする。グラフィックアクセラレータ106は、カラーモニタ107とシステムバス114をインタフェイスする。USBコントローラ108は、カラープリンタ109とシステムバス114をインタフェイスする。キーボード/マウスコントローラ110は、キーボード111やマウス112などの入力デバイスとシステムバス114をインタフェイスする。なお、SCSI I/F 103、キーボード/マウスコントローラ110などに代わりUSBコントローラ108やIEEE1394などのシリアルバスインタフェイスによって、HDD 105、キーボード111およびマウス112とシステムバス114をインタフェイスしてもよい。ネットワークインタフェイス(I/F) 104は、ローカルエリアネットワーク(LAN) 113とシステムバスをインタフェイスする。   A general-purpose parallel interface (I / F) 103 such as SCSI (Small Computer Standard Interface) interfaces the HDD 105 with the system bus 114. The graphic accelerator 106 interfaces the color monitor 107 and the system bus 114. The USB controller 108 interfaces the color printer 109 and the system bus 114. The keyboard / mouse controller 110 interfaces the input device such as the keyboard 111 and the mouse 112 with the system bus 114. Note that the HDD 105, the keyboard 111, and the mouse 112 may be interfaced with the system bus 114 by a serial bus interface such as the USB controller 108 or IEEE1394 instead of the SCSI I / F 103 and the keyboard / mouse controller 110. A network interface (I / F) 104 interfaces a local area network (LAN) 113 with a system bus.

[プレビュー動作]
上記の構成における、プリント画像のプレビュー動作を説明する。図4はプレビューを行う際のユーザインタフェイスの一例を示す図である。
[Preview operation]
A print image preview operation in the above configuration will be described. FIG. 4 is a diagram showing an example of a user interface for previewing.

まず、CPU 101の指令により、HDD 105に格納された画像プレビューアプリケーションが起動される。続いて、画像プレビューアプリケーションの処理に従いHDD 105に格納された初期プロファイルと初期ディジタル画像データが、CPU 101の指令に基づきSCSI I/F103、システムバス114を経由して、メインメモリ102に転送される。そして、CPU 101により、図4に示すウィンドウがカラーモニタ107に表示される。ユーザは、表示されたウィンドウ内の画像プレビュー203とL*a*b*値表示205を用いて、プリント画像の色再現を確認する。   First, an image preview application stored in the HDD 105 is activated by a command from the CPU 101. Subsequently, the initial profile and initial digital image data stored in the HDD 105 in accordance with the processing of the image preview application are transferred to the main memory 102 via the SCSI I / F 103 and the system bus 114 based on a command from the CPU 101. . Then, the CPU 101 displays the window shown in FIG. The user confirms the color reproduction of the print image using the image preview 203 and the L * a * b * value display 205 in the displayed window.

図4に示すウィンドウには、プロファイルの読み込みを指示するためのボタン201、プレビュー表示用の画像ファイルを読み込むためのボタン202、画像プレビュー表示領域203、RGB値表示領域204、L*a*b*値表示領域205、並びに、アプリケーション終了ボタン206がある。   The window shown in FIG. 4 includes a button 201 for instructing reading of a profile, a button 202 for reading an image file for preview display, an image preview display area 203, an RGB value display area 204, L * a * b * A value display area 205 and an application end button 206 are provided.

ユーザが画像ファイルの読込ボタン202をマウス112などでクリックして(または押して)、画像の読み込みを指示すると、画像プレビューアプリケーションの処理に従いHDD 105に格納されたディジタル画像データが、CPU 101の指令に基づきSCSI I/F103、システムバス114を経由して、メインメモリ102に転送される。あるいは、LAN 113に接続されたサーバに格納されたディジタル画像データまたはインターネット上のディジタル画像データが、CPU 101の指令により、ネットワークI/F 104、システムバス114を経由してメインメモリ102に転送される。そして、メインメモリ102に記憶されたディジタル画像データは然るべく処理された後、新たにプレビュー表示用の画像データとしてメインメモリ102に記憶されるとともに、表示領域203に表示される。   When the user clicks (or presses) the image file reading button 202 with the mouse 112 or the like and instructs to read the image, the digital image data stored in the HDD 105 according to the processing of the image preview application is sent to the CPU 101 command. Based on this, the data is transferred to the main memory 102 via the SCSI I / F 103 and the system bus 114. Alternatively, digital image data stored in a server connected to the LAN 113 or digital image data on the Internet is transferred to the main memory 102 via the network I / F 104 and the system bus 114 according to a command from the CPU 101. The The digital image data stored in the main memory 102 is appropriately processed and then newly stored as image data for preview display in the main memory 102 and displayed in the display area 203.

また、ユーザがプロファイルの読込ボタン201をマウス112などでクリックして、プロファイルの読み込みを指示すると、画像プレビューアプリケーションの処理に従い、指定されたプロファイルがHDD 105から、もしくは、ネットワーク経由で読み込まれ、色算出処理が設定される。そして、メインメモリ102に記憶されたディジタル画像データに然るべき処理を施してプレビュー表示用の画像データを作成し、プレビュー表示用の画像データは、メインメモリ102に記憶されるとともに、表示領域203に表示される。   Also, when the user clicks the profile load button 201 with the mouse 112 or the like and instructs to load the profile, the specified profile is read from the HDD 105 or via the network according to the processing of the image preview application, and the color Calculation processing is set. The digital image data stored in the main memory 102 is appropriately processed to generate image data for preview display. The image data for preview display is stored in the main memory 102 and displayed in the display area 203. Is done.

さらに、ユーザが色再現を確認するために表示領域203の任意位置をマウス112でクリックすると、画像プレビューアプリケーションは、クリック位置に対応する画素のRGB値をメインメモリ102に記憶されたディジタル画像データから取得し、後述する色算出処理によりL*a*b*値を算出し、RGB値表示領域204にRGB値を、L*a*b*値表示領域205にL*a*b*値を表示する。   Furthermore, when the user clicks an arbitrary position in the display area 203 with the mouse 112 to confirm color reproduction, the image preview application calculates the RGB value of the pixel corresponding to the click position from the digital image data stored in the main memory 102. Acquired and calculated L * a * b * value by the color calculation process described later, and displayed RGB value in RGB value display area 204 and L * a * b * value in L * a * b * value display area 205 To do.

また、ユーザが終了ボタン206をマウス112などでクリックすると、画像プレビューアプリケーションは、メインメモリ102のディジタル画像データ、プレビュー表示用画像データの記憶領域やワーク領域を解放し、処理を終了する。   When the user clicks the end button 206 with the mouse 112 or the like, the image preview application releases the storage area and work area for the digital image data and preview display image data in the main memory 102 and ends the processing.

[画像プレビューアプリケーションの動作]
図5は画像プレビューアプリケーションの動作を説明する状態遷移図である。
[Operation of image preview application]
FIG. 5 is a state transition diagram for explaining the operation of the image preview application.

まず、動作に必要な各種メモリ領域の確保など初期化を行い(S301)、初期ディジタル画像ファイルおよび色算出用のプロファイルとして初期プロファイルをHDD 105より読み込み、メインメモリ102に記憶する(S302)。なお、メインメモリ102に保持されるディジタル画像データは、RGB各色信号が符号無し8ビットで表現される画像データとして説明する。また、プロファイルは、RGB色空間の格子点の色座標ステップと、格子点が再現するL*a*b*色空間の座標値との対応を記した、図6Bに示すようなデータ構造を有する。その先頭には、R/G/B値のステップが記述され、その後に、各格子点に対応するL*a*b*色座標がR、G、Bの順にネストされて記述される。図6Aはプロファイルのデータ構造をRGB色空間で模式的に示す図である。   First, initialization such as securing various memory areas necessary for operation is performed (S301), an initial profile is read from the HDD 105 as an initial digital image file and a color calculation profile, and stored in the main memory 102 (S302). The digital image data held in the main memory 102 will be described as image data in which each RGB color signal is expressed by 8 bits without a sign. Further, the profile has a data structure as shown in FIG. 6B in which the correspondence between the color coordinate step of the grid point in the RGB color space and the coordinate value of the L * a * b * color space reproduced by the grid point is described. . The R / G / B value step is described at the head, and then L * a * b * color coordinates corresponding to each grid point are nested in the order of R, G, and B. FIG. 6A is a diagram schematically showing the data structure of the profile in the RGB color space.

次に、記憶したプロファイルを用いて、後述する処理により色算出用のB-スプライン体(B-Spline Solid)に対する係数および基底関数を算出し(S303)、後述する処理に従って、色算出用のB-スプライン体を用いて記憶したディジタル画像データをプレビュー用の画像データに変換し、表示領域203に表示し(S304)、ユーザの操作を待つ状態になる(S305)。   Next, using the stored profile, a coefficient and a basis function for a B-spline solid for color calculation (B-Spline Solid) are calculated by a process described later (S303), and a color calculation B is performed according to the process described later. The digital image data stored using the spline body is converted into image data for preview, displayed on the display area 203 (S304), and waiting for a user operation (S305).

ユーザの操作待ち状態(S305)で、プロファイルの読込ボタン201が押されると、読み込むべきプロファイルをユーザが指定するためのダイアログを表示し、プロファイルが指定されると、そのプロファイルがオープン可能か否かを判定し、オープン可能であればそのプロファイルを読み込んでメインメモリ102に記憶し、プロファイルのフォーマットが正しいか否かを判定する(S306)。オープン可能かつ正しいフォーマットであればステップS303へ遷移するが、オープン不可または不正なフォーマットの場合は、その旨を表示してステップS305へ戻る。   When the profile loading button 201 is pressed in the user operation waiting state (S305), a dialog for the user to specify a profile to be read is displayed. If a profile is specified, whether or not the profile can be opened. If it can be opened, the profile is read and stored in the main memory 102, and it is determined whether the profile format is correct (S306). If the format can be opened and is correct, the process proceeds to step S303. If the format is not open or illegal, the message is displayed and the process returns to step S305.

また、画像ファイルの読込ボタン202が押されると、読み込むべき画像ファイルをユーザが指定するためのダイアログを表示し、画像ファイルが指定されると、その画像ファイルがオープン可能か否かを判定し、オープン可能であればその画像ファイルを読み込んでメインメモリ102に記憶し、画像ファイルのフォーマットか正しいか否かを判定する(S307)。オープン可能かつ正しいフォーマットであればステップS304へ遷移するが、オープン不可または不正なフォーマットの場合は、その旨を表示してステップS305へ戻る。   When the image file reading button 202 is pressed, a dialog for the user to specify an image file to be read is displayed. When an image file is specified, it is determined whether the image file can be opened, If it can be opened, the image file is read and stored in the main memory 102, and it is determined whether or not the format of the image file is correct (S307). If the format can be opened and is correct, the process proceeds to step S304. If the format is not open or illegal, the fact is displayed and the process returns to step S305.

また、表示領域203でマウスがクリックされると、表示領域203上のマウスポインタの位置を記憶した後、後述する処理に従って、マウスポインタ位置に対応する画素のRGB値をRGB値表示領域204に、そのRGB値をプリントした際のL*a*b*値をL*a*b*値表示領域205に表示し(S308)、ステップS305へ戻る。   When the mouse is clicked in the display area 203, the position of the mouse pointer on the display area 203 is stored, and then the RGB value of the pixel corresponding to the mouse pointer position is stored in the RGB value display area 204 according to the processing described later. The L * a * b * value when the RGB value is printed is displayed in the L * a * b * value display area 205 (S308), and the process returns to step S305.

また、終了ボタン206が押されると、メモリ解放などの終了動作を行い、画像プレビューアプリケーションを終了する。   When the end button 206 is pressed, an end operation such as memory release is performed, and the image preview application is ended.

[色算出用B-スプライン体の設定(S303)]
色算出用のB-スプライン体は、次の区分的多項式を基底関数とする多重総和演算式で定義される。
λ= ΣiΣjΣkijkNri(rr)Ngj(gg)Nbk(bb)
a = ΣiΣjΣkcaijkNri(rr)Ngj(gg)Nbk(bb) …(1)
b = ΣiΣjΣkcbijkNri(rr)Ngj(gg)Nbk(bb)
ここで、rr、gg、bbはRGB値
λ、a、bはL*a*b*値
NrはR軸方向での基底関数
NgはG軸方向での基底関数
NbはB軸方向での基底関数
cλijk、caijk、cbijkは係数
Nr、Ng、Nbに付属するサフィクスi、j、kはそれぞれの軸に対する
基底における基底関数番号
[Setting of B-spline body for color calculation (S303)]
The B-spline body for color calculation is defined by a multiple sum operation formula having the following piecewise polynomial as a basis function.
λ = Σ i Σ j Σ kijk N ri (rr) N gj (gg) N bk (bb)
a = Σ i Σ j Σ k ca ijk N ri (rr) N gj (gg) N bk (bb)… (1)
b = Σ i Σ j Σ k cb ijk N ri (rr) N gj (gg) N bk (bb)
Where rr, gg, and bb are RGB values
λ, a, b are L * a * b * values
Nr is the basis function in the R-axis direction
Ng is the basis function in the G-axis direction
Nb is the basis function in the B-axis direction
cλijk, caijk, cbijk are coefficients
Suffixes i, j, and k attached to Nr, Ng, and Nb
Basis function number in the basis

図7は色算出用B-スプライン体の係数および基底関数の算出処理を説明するフローチャートである。   FIG. 7 is a flowchart for explaining the coefficient and basis function calculation processing of the B-spline body for color calculation.

まず、図6Bに示すデータ構造で表されるプロファイルからRGB値とL*a*b*値との対応関係を取得する(S401)。RGB値は、ネストの順番とR/G/B値のステップ値に従い算出され、L*a*b*値はプロファイルに記述された値である。以後、RGB値とL*a*b*値の対応データを、i番目の編集色のRGB値をrri、ggi、bbi、L*a*b*値をλi、ai、biと説明する。 First, the correspondence between RGB values and L * a * b * values is acquired from the profile represented by the data structure shown in FIG. 6B (S401). The RGB value is calculated according to the order of nesting and the step value of the R / G / B value, and the L * a * b * value is a value described in the profile. Thereafter, the corresponding data of the RGB value and the L * a * b * value, the RGB value of the i-th editing color as rr i , gg i , bb i , and the L * a * b * value as λ i , a i , b This is described as i .

次に、図6Bに示すデータ構造で表されるプロファイルより、R/G/B値のステップに基づいて基底関数を算出し、メインメモリ102に記憶する(S402)。基底関数の算出には、一般的なDeBoor-Coxのアルゴリズムを用いる。R/G/B値のステップが図6Bに示すように同一である場合、基底関数Nr、Ng、Nbが何れも三位のB-スプライン基底であれば、何れも図8に示すようなξ0〜ξ3の四節点の基底関数になる。なお、図8はR軸の基底関数Nrを示している。以下、基底関数は何れも三位のB-スプライン基底であるとして説明する。 Next, a basis function is calculated based on the R / G / B value step from the profile represented by the data structure shown in FIG. 6B, and stored in the main memory 102 (S402). A general DeBoor-Cox algorithm is used to calculate the basis function. If the steps of the R / G / B values are the same as shown in FIG. 6B, if the basis functions N r , N g , and N b are all B-spline bases in the third place, all are shown in FIG. It becomes a four-node basis function of ξ0 to ξ3. Incidentally, FIG. 8 shows the basis functions N r of R axis. In the following description, it is assumed that each basis function is a third-order B-spline basis.

次に、算出した基底関数と、取得したRGB値とL*a*b*値との対応関係を用いて、行列方程式f=MCを、λ*成分、a*成分、b*成分それぞれについてLU分解を用いて解くことで、各係数を算出する。以下、上記方程式による係数算出について詳しく説明する。   Next, using the calculated basis function and the correspondence relationship between the acquired RGB value and L * a * b * value, the matrix equation f = MC is changed to LU for each of the λ * component, the a * component, and the b * component. Each coefficient is calculated by solving using decomposition. Hereinafter, the coefficient calculation by the above equation will be described in detail.

まず、行列Mのs行t列成分mstを次のように算出する。
mst = Nri(rrs)Ngj(ggs)Nbk(bbs) …(2)
ここで、t = 25(i - 1) + 5(j - 1) + k
i、j、kは1から5までの整数
First, the s-row t-column component m st of the matrix M is calculated as follows.
m st = N ri (rr s ) N gj (gg s ) N bk (bb s )… (2)
Where t = 25 (i-1) + 5 (j-1) + k
i, j, k are integers from 1 to 5

なお、tとi、j、kの関係は、節点数と基底関数の位数によって変化する。例えば三位B-スプライン基底で、六節点の場合はt = 49(i - 1) + 7(j - 1) + kという関係になる。   Note that the relationship between t and i, j, k varies depending on the number of nodes and the order of basis functions. For example, in the case of a three-position B-spline basis and six nodes, the relationship is t = 49 (i-1) +7 (j-1) + k.

次に、係数cλijk、caijk、cbijkの算出をそれぞれ説明する。まず、係数cλijkを算出するために、次の行列方程式をLU分解を用いて解く。
fλ= [λ1, λ2, …, λ125]
cλ= [cλ111, cλ112, …, cλ115, cλ121, …, cλ155, cλ211, …, cλ554, cλ555] …(3)
fλ= M・cλ
Next, calculation of the coefficients cλ ijk , ca ijk , and cb ijk will be described. First, in order to calculate the coefficient cλ ijk , the following matrix equation is solved using LU decomposition.
fλ = [λ 1 , λ 2 ,…, λ 125 ]
cλ = [cλ 111 , cλ 112 ,…, cλ 115 , cλ 121 ,…, cλ 155 , cλ 211 ,…, cλ 554 , cλ 555 ]… (3)
fλ = M ・ cλ

次に、係数caijkを算出するために、次の行列方程式をLU分解を用いて解く。
fa = [a1, a2, …, a125]
ca = [ca111, ca112, …, ca115, ca121, …, ca155, ca211, …, ca554, ca555]
fa = M・ca …(4)
Next, in order to calculate the coefficient ca ijk , the following matrix equation is solved using LU decomposition.
fa = [a 1 , a 2 ,…, a 125 ]
ca = [ca 111 , ca 112 ,…, ca 115 , ca 121 ,…, ca 155 , ca 211 ,…, ca 554 , ca 555 ]
fa = M ・ ca… (4)

次に、係数cbijkを算出するために、次の行列方程式をLU分解を用いて解く。
fb = [b1, b2, …, b125]
cb = [cb111, cb112, …, cb115, cb121, …, cb155, cb211, …, cb554, cb555]
fb = M・cb …(5)
Next, in order to calculate the coefficient cb ijk , the following matrix equation is solved using LU decomposition.
fb = [b 1 , b 2 ,…, b 125 ]
cb = [cb 111 , cb 112 ,…, cb 115 , cb 121 ,…, cb 155 , cb 211 ,…, cb 554 , cb 555 ]
fb = M ・ cb (5)

そして、算出した係数をメインメモリ102に記憶する(S404)。   Then, the calculated coefficient is stored in the main memory 102 (S404).

以上で算出されたB-スプライン体を用いることで、図9の模式図に示すように、RGB値に対するL*a*b値の変化を滑らかに表現することができる。なお、図9はB-スプライン体の算出結果をL*a*b*空間における分布として表現したもので、図9に示す軸以外の線は、RGB値の何れか一つが変化した際のL*a*b*値の軌跡を表す。   By using the B-spline body calculated as described above, changes in L * a * b values relative to RGB values can be smoothly expressed as shown in the schematic diagram of FIG. In addition, FIG. 9 represents the calculation result of the B-spline body as a distribution in the L * a * b * space. A line other than the axis shown in FIG. 9 indicates the L when any one of the RGB values changes. Represents the trajectory of * a * b * values.

[RGB値とL*a*b*値の表示(S303)]
図10は指定された画像位置のRGB値とL*a*b*値の表示処理を説明するフローチャートである。
[Display of RGB value and L * a * b * value (S303)]
FIG. 10 is a flowchart for explaining the display processing of the RGB value and L * a * b * value at the designated image position.

まず、マウスポインタの位置に対応するディジタル画像データの画素位置を算出し、その画素位置のRGB値を取得し(S801)、取得したRGB値をRGB値表示領域204に表示し(S802)、メインメモリ102から色算出用B-スプライン体の基底関数と係数値を取得して、下式によってL*a*b*値を算出し(S803)、算出したL*a*b*値をL*a*b*値表示領域205に表示する(S804)。
λ= Σi 5Σj 5Σk 5ijkNri(rr)Ngj(gg)Nbk(bb)
a = Σi 5Σj 5Σk 5caijkNri(rr)Ngj(gg)Nbk(bb) …(6)
b = Σi 5Σj 5Σk 5cbijkNri(rr)Ngj(gg)Nbk(bb)
ここで、rr、gg、bbはRGB値
λ、a、bはL*a*b*値
First, the pixel position of the digital image data corresponding to the position of the mouse pointer is calculated, the RGB value of that pixel position is acquired (S801), and the acquired RGB value is displayed in the RGB value display area 204 (S802). Obtain the basis function and coefficient value of the B-spline body for color calculation from the memory 102, calculate the L * a * b * value using the following formula (S803), and use the calculated L * a * b * value as L * The data is displayed in the a * b * value display area 205 (S804).
λ = Σ i 5 Σ j 5 Σ k 5ijk N ri (rr) N gj (gg) N bk (bb)
a = Σ i 5 Σ j 5 Σ k 5 ca ijk N ri (rr) N gj (gg) N bk (bb)… (6)
b = Σ i 5 Σ j 5 Σ k 5 cb ijk N ri (rr) N gj (gg) N bk (bb)
Where rr, gg, and bb are RGB values
λ, a, b are L * a * b * values

[プレビュー用画像の生成(S304)]
図11はプレビュー用画像データの生成処理を説明するフローチャートである。
[Generate preview image (S304)]
FIG. 11 is a flowchart for explaining the process of generating preview image data.

まず、既存のプレビュー用画像データを破棄してプレビュー用画像データを生成する作業用のメモリ領域確保し、変数を初期化するなど、初期化動作を行い(S901)、ラスタスキャンの順に従ってメインメモリ102に記憶されたディジタル画像データから画素値(RGB値)を一つ取得し(S902)、メインメモリ102から色算出用B-スプライン体の基底関数と係数値を取得して、ステップS803と同様にして、色算出用B-スプライン体を用いてRGB値からL*a*b*値を算出する(S903)。   First, an initialization operation such as discarding the existing preview image data and securing the work memory area for generating the preview image data and initializing variables is performed (S901). One pixel value (RGB value) is acquired from the digital image data stored in 102 (S902), the basis function and coefficient value of the B-spline body for color calculation are acquired from the main memory 102, and the same as step S803 Then, the L * a * b * value is calculated from the RGB value using the B-spline body for color calculation (S903).

次に、算出したL*a*b*値をsRGBに基づくRGB値に変換し(S904)、そのRGB値を画素位置に応じたメモリアドレス(メインメモリ102)に格納し(S905)、ディジタル画像データの総ての画素に対して上記変換を施したか否かを判断し(S906)、総ての画素に変換を施すまでステップS902からS905を繰り返す。   Next, the calculated L * a * b * value is converted into an RGB value based on sRGB (S904), and the RGB value is stored in the memory address (main memory 102) corresponding to the pixel position (S905). It is determined whether or not the above conversion has been performed on all the pixels of the data (S906), and steps S902 to S905 are repeated until the conversion is performed on all the pixels.

総ての画素に変換を施すと、メインメモリ102に格納された変換後の画像データをプレビュー用画像データとしてメインメモリ102の所定領域に格納し(S907)、プレビュー用画像データを画像プレビューの表示領域203に表示し(S908)、作業用メモリを解放するなど終了処理を行い(S909)、プレビュー用画像の生成を終了する。   When all the pixels are converted, the converted image data stored in the main memory 102 is stored as a preview image data in a predetermined area of the main memory 102 (S907), and the preview image data is displayed as an image preview. The display is displayed in the area 203 (S908), end processing such as releasing the working memory is performed (S909), and generation of the preview image is ended.

このように、複数の代表色から色を算出する際、値の変化の傾向を自然に反映して滑らかな変化で色を算出するため、少ない代表色でも精度よく色を算出することができる。さらに、この色の算出を色調整に応用すれば、基底の局所性を利用して色修正の影響範囲を局所領域に限定することが可能になるとともに、調整後の色を直接指定することが可能になる。その修正に伴い、滑らかに色が変化するから階調性が非常に良好な色の修正が可能になる。   As described above, when calculating a color from a plurality of representative colors, the color is calculated with a smooth change by naturally reflecting the tendency of the change in the value, so that it is possible to accurately calculate a color with a small number of representative colors. Furthermore, if this color calculation is applied to color adjustment, it is possible to limit the range of influence of color correction to the local area using the locality of the base, and to specify the adjusted color directly. It becomes possible. Along with the correction, the color changes smoothly, so that it is possible to correct a color with very good gradation.

以下、本発明にかかる実施例2の画像処理を説明する。なお、本実施例において、実施例1と略同様の構成については、同一符号を付して、その詳細説明を省略する。   The image processing according to the second embodiment of the present invention will be described below. Note that in this embodiment, the same reference numerals as those in the first embodiment denote the same parts, and a detailed description thereof will be omitted.

実施例2では、色修正およびそのユーザインタフェイスを提供する色処理装置を説明する。なお、装置構成は図3と同じである。   Example 2 describes a color processing apparatus that provides color correction and its user interface. The apparatus configuration is the same as that in FIG.

[プロファイルの作成動作]
図12は色修正してプロファイルを作成するためのユーザインタフェイスを示す図である。
[Profile creation operation]
FIG. 12 is a diagram showing a user interface for creating a profile with color correction.

まず、ユーザの操作およびCPU 101の指令により、HDD 105に格納された色再現編集アプリケーションが起動される。続いて、色再現編集アプリケーションの処理に従いHDD 105に格納された初期プロファイルと初期編集色データが、CPU 101の指令に基づきSCSI I/F 103、システムバス114を経由して、メインメモリ102に転送される。そして、CPU 101により、図12に示すウィンドウがカラーモニタ107に表示される。ユーザは、ウィンドウ内の色再現の三次元表示を参照して、編集対象の色を修正することで、色再現を編集する。   First, a color reproduction editing application stored in the HDD 105 is activated by a user operation and a command from the CPU 101. Subsequently, the initial profile and initial edit color data stored in the HDD 105 are transferred to the main memory 102 via the SCSI I / F 103 and the system bus 114 based on the command of the CPU 101 in accordance with the processing of the color reproduction editing application. Is done. Then, the CPU 101 displays the window shown in FIG. The user edits the color reproduction by correcting the color to be edited with reference to the three-dimensional display of the color reproduction in the window.

図12に示すウィンドウには、編集色データの読み込みを指示するためのボタン1001、編集色データの保存を指示するためのボタン1002、色再現の編集結果をプロファイルとして保存するためのボタン1003、色再現の三次元表示領域1004、編集対象である色に関し、色番号、RGB値、L*a*b*値を表示または入力するための編集領域1005、色域表示のオンオフを指示するためのチェックボックス1006は、編集色のポイント表示をオンオフするためのチェックボックス1007、色再現編集結果である色再現表示のオンオフを指示するためのチェックボックス1008、プロファイル色分布の三次元表示をオンオフするためのチェックボックス1009、並びに、アプリケーション終了ボタン1010がある。   The window shown in FIG. 12 includes a button 1001 for instructing reading of editing color data, a button 1002 for instructing saving of editing color data, a button 1003 for saving editing results of color reproduction as a profile, and a color Reproduction 3D display area 1004, editing area 1005 for displaying or inputting the color number, RGB value, L * a * b * value for the color to be edited, check for instructing on / off of color gamut display A box 1006 has a check box 1007 for turning on / off the point display of the edit color, a check box 1008 for instructing on / off of the color reproduction display as the color reproduction editing result, and a three-dimensional display of the profile color distribution. There is a check box 1009 and an application end button 1010.

ユーザが編集色データの読込ボタン1001をマウス112などでクリックして(または押して)、編集色データの読み込みを指示すると、色再現編集アプリケーションの処理に従いHDD 105に格納され編集色データが、CPU 101の指令に基づきSCSI I/F 103、システムバス114を経由して、メインメモリ102に転送される。あるいは、LAN 113に接続されたサーバに格納された編集色データまたはインターネット上の編集色データが、CPU 101の指令により、ネットワークI/F 104、システムバス114を経由してメインメモリ102に転送される。そして、色再現の算出処理が実行される。また、ユーザが編集領域1005で色の編集を行った場合も色再現の算出処理が実行される。   When the user clicks (or presses) the edit color data read button 1001 with the mouse 112 or the like to instruct to read the edit color data, the edit color data stored in the HDD 105 according to the process of the color reproduction editing application is stored in the CPU 101. Is transferred to the main memory 102 via the SCSI I / F 103 and the system bus 114 based on the command. Alternatively, edit color data stored in a server connected to the LAN 113 or edit color data on the Internet is transferred to the main memory 102 via the network I / F 104 and the system bus 114 in accordance with a command from the CPU 101. The Then, a color reproduction calculation process is executed. The color reproduction calculation process is also executed when the user edits the color in the editing area 1005.

色再現の算出処理結果は、各チェックボックスの設定に従って、色再現の三次元表示領域1004に擬似三次元表示される。色域表示チェックボックス1006がチェックされている場合は編集色データの色域の三次元形状が表示され、編集色表示チェックボックス1007がチェックされている場合は総ての編集色がポイントとして表示され、色再現表示チェックボックス1008がチェックされている場合は現在の編集色のRGB値に従って構成された色再現情報が表示される。また、プロファイル分布表示チェックボックス1009がチェックされている場合はプロファイルのLUT値が点表示される。勿論、チェックボックス1006〜1009がそれぞれオンオフされた場合、表示領域1004は前記のような表示形態に更新される。   The calculation process result of color reproduction is displayed in a pseudo three-dimensional manner in the three-dimensional display area 1004 for color reproduction according to the setting of each check box. When the color gamut display check box 1006 is checked, the three-dimensional shape of the color gamut of the edit color data is displayed. When the edit color display check box 1007 is checked, all the edit colors are displayed as points. When the color reproduction display check box 1008 is checked, color reproduction information configured according to the RGB value of the current edit color is displayed. If the profile distribution display check box 1009 is checked, the profile LUT value is displayed as a dot. Of course, when the check boxes 1006 to 1009 are turned on and off, the display area 1004 is updated to the display form as described above.

また、ユーザが編集色データの保存ボタン1002を押して、編集色データの保存を指示すると、色再現編集アプリケーションは編集中の編集色データをHDD 105に保存する。   Further, when the user presses the edit color data save button 1002 to instruct to save the edit color data, the color reproduction edit application saves the edit color data being edited in the HDD 105.

また、ユーザがプロファイルの保存ボタン1003を押して、プロファイル保存を指示すると、色再現編集アプリケーションは生成したプロファイルをHDD 105に保存する。   When the user presses a profile save button 1003 to instruct profile saving, the color reproduction editing application saves the generated profile in the HDD 105.

また、ユーザが終了ボタン1010を押すと、色再現編集アプリケーションは、処理に使用した総てのデータの記憶領域やワーク領域を解放し、処理を終了する。   When the user presses the end button 1010, the color reproduction editing application releases all data storage areas and work areas used for the process, and ends the process.

[色再現編集アプリケーションの動作]
図13は色再現編集アプリケーションの動作を説明する状態遷移図である。
[Operation of color reproduction editing application]
FIG. 13 is a state transition diagram for explaining the operation of the color reproduction editing application.

まず、動作に必要な各種メモリ領域の確保など初期化を行い(S1101)、初期色編集データをHDD 105より読み込み、メインメモリ102に記憶する(S1102)。なお、メインメモリ102に保持される色編集データは、RGB色空間上の色を指定するRGB値と印刷時の再現色を表すL*a*b*色座標の組、および、色域を表す三角パッチデータからなる、図14に示すようなデータ構造を有する。その先頭には総データ数が記述され、その後にデータ総数だけ、RGB値とL*a*b*色座標の組が記述される。続いて、色域を表す三角パッチデータの総数が記述され、その後にパッチ総数だけ、三角形の三頂点を表す三つのL*a*b*値からなる三角パッチデータが記述される。   First, initialization such as securing various memory areas necessary for operation is performed (S1101), initial color editing data is read from the HDD 105 and stored in the main memory 102 (S1102). The color editing data held in the main memory 102 represents a set of RGB values that specify colors in the RGB color space and L * a * b * color coordinates that represent reproduction colors at the time of printing, and a color gamut. It has a data structure shown in FIG. 14 composed of triangular patch data. The total number of data is described at the top, and then a set of RGB values and L * a * b * color coordinates is described for the total number of data. Subsequently, the total number of triangular patch data representing the color gamut is described, and thereafter triangular patch data composed of three L * a * b * values representing the three vertices of the triangle is described by the total number of patches.

次に、メインメモリ102に記憶した色編集データを用いて、後述する処理により色算出用のB-スプライン体に対する係数および基底関数を算出し(S1103)、後述する処理に従って、色算出用のB-スプライン体を用いてプロファイルを作成し、メインメモリ102に記憶し(S1104)、後述する処理に従って、色算出用B-スプライン体およびプロファイルを用いて、擬似三次元表示用の3Dオブジェクトデータを算出する(S1105)。なお、3Dオブジェクトデータとして、色域表示用のソリッドデータ、編集色表示用のポイントデータ、色再現表示用のソリッドデータおよびプロファイル表示用のポイントデータを生成する。   Next, using the color editing data stored in the main memory 102, the coefficient and basis function for the B-spline body for color calculation are calculated by the process described later (S1103), and the color calculation B is performed according to the process described later. -Create a profile using the spline body, store it in the main memory 102 (S1104), and calculate 3D object data for pseudo 3D display using the B-spline body for color calculation and the profile according to the processing described later (S1105). As 3D object data, solid data for color gamut display, point data for edit color display, solid data for color reproduction display, and point data for profile display are generated.

続いて、ユーザの操作を待つ状態になる(S1106)。この状態で、図12に示す編集色データの読込ボタン1001が押されると、読み込むべき色編集データファイルをユーザが指定するためのダイアログを表示し、ファイルが指定されると、そのファイルがオープン可能か否かを判定し、オープン可能であればそのファイルを読み込んでメインメモリ102に記憶し、色編集データのフォーマットとして正しいか否か判定する(S1108)。オープン可能かつ正しいフォーマットであればステップS1103へ遷移するが、オープン不可または不正なフォーマットの場合は、その旨を表示してステップS1106へ戻る。   Subsequently, the process waits for a user operation (S1106). In this state, when the edit color data read button 1001 shown in FIG. 12 is pressed, a dialog for the user to specify the color edit data file to be read is displayed. When the file is specified, the file can be opened. If it can be opened, the file is read and stored in the main memory 102, and it is determined whether or not the format of the color editing data is correct (S1108). If the format is open and correct, the process proceeds to step S1103. If the format is not open or illegal, the message is displayed and the process returns to step S1106.

また、図12に示す編集色データの保存ボタン1002が押されると、メインメモリ102に記憶した編集色データを所定のフォーマットでHDD 105へ保存し(S1109)、ステップS1106へ戻る。   When the edit color data save button 1002 shown in FIG. 12 is pressed, the edit color data stored in the main memory 102 is saved in the HDD 105 in a predetermined format (S1109), and the process returns to step S1106.

また、図12に示すプロファイルの保存ボタン1003が押されると、メインメモリ102に記憶したプロファイルを所定のフォーマットにてHDD 105へ保存し(S1110)、ステップS1106へ戻る。   When the profile save button 1003 shown in FIG. 12 is pressed, the profile stored in the main memory 102 is saved in the HDD 105 in a predetermined format (S1110), and the process returns to step S1106.

また、図12に示す色域表示のチェックボックス1006が操作され、チェックされた場合は色域表示用のソリッドデータを表示し、チェックが外された場合は同ソリッドデータを非表示にし(S1111)、ステップS1106へ戻る。色域表示をオンにすると図12に示す三次元表示領域1004内のような図形が表示される。なお、図12は色再現表示用のソリッドデータの単体表示例を示し、他の3Dオブジェクトデータが重畳して表示される場合がある。   Also, if the color gamut display check box 1006 shown in FIG. 12 is operated and checked, the solid data for color gamut display is displayed, and if the check is removed, the solid data is not displayed (S1111). Return to step S1106. When the color gamut display is turned on, a figure in the three-dimensional display area 1004 shown in FIG. 12 is displayed. Note that FIG. 12 shows a single display example of solid data for color reproduction display, and other 3D object data may be superimposed and displayed.

また、図12に示す編集色表示のチェックボックス1007が操作され、チェックされた場合は編集色表示用のポイントデータを表示し、チェックが外された場合は同ポイントデータを非表示にし(S1112)、ステップS1106へ戻る。編集色表示をオンにすると図15に示す三次元表示領域1004内のような図形が表示される。なお、図14は編集色表示用のポイントデータの単体表示例を示し、他の3Dオブジェクトデータが重畳して表示される場合がある。   Also, the edit color display check box 1007 shown in FIG. 12 is operated, and if it is checked, the edit color display point data is displayed, and if the check is removed, the same point data is not displayed (S1112). Return to step S1106. When the edit color display is turned on, a figure as shown in the three-dimensional display area 1004 shown in FIG. 15 is displayed. Note that FIG. 14 shows a single display example of point data for editing color display, and other 3D object data may be superimposed and displayed.

また、図12に示す色再現表示のチェックボックス1008が操作され、チェックされた場合は色再現表示用のソリッドデータを表示し、チェックが外された場合は同ソリッドデータを非表示にし(S1113)、ステップS1106へ戻る。色再現表示をオンにすると図16に示す三次元表示領域1004内のような図形が表示される。なお、図15は色再現表示用のソリッドデータの単体表示例を示し、他の3Dオブジェクトデータが重畳して表示される場合がある。   In addition, when the color reproduction display check box 1008 shown in FIG. 12 is operated and checked, the solid data for color reproduction display is displayed, and when the check is removed, the solid data is not displayed (S1113). Return to step S1106. When the color reproduction display is turned on, a figure as shown in the three-dimensional display area 1004 shown in FIG. 16 is displayed. FIG. 15 shows an example of single display of solid data for color reproduction display, and other 3D object data may be displayed in a superimposed manner.

また、図12に示すプロファイル分布表示のチェックボックス1009が操作され、チェックされた場合はプロファイル表示用のポイントデータを表示し、チェックが外された場合は同ポイントデータを非表示にし(S1114)、ステップS1106へ戻る。プロファイル分布表示をオンにすると図17に示す三次元表示領域1004内のような図形が表示される。なお、図17はプロファイル表示用のポイントデータの単体表示例を示し、他の3Dオブジェクトデータが重畳して表示される場合がある。   In addition, when the check box 1009 of the profile distribution display shown in FIG. 12 is operated and checked, the point data for profile display is displayed, and when the check is removed, the point data is not displayed (S1114), The process returns to step S1106. When the profile distribution display is turned on, a figure as shown in the three-dimensional display area 1004 shown in FIG. 17 is displayed. Note that FIG. 17 shows an example of single display of point data for profile display, and other 3D object data may be superimposed and displayed.

また、図12に示す編集領域1005の色番号、RGB値、L*a*b*値の何れかが入力されると、その入力に基づき、指定された色番号のRGB値およびL*a*b*値を修正し、さらに、後述するL*a*b*値の修正を行い(S1107)、ステップS1103へ遷移する。   Also, when any one of the color number, RGB value, and L * a * b * value of the editing area 1005 shown in FIG. 12 is input, the RGB value and L * a * of the specified color number are input based on the input. The b * value is corrected, and an L * a * b * value to be described later is corrected (S1107), and the process proceeds to step S1103.

また、図12に示す終了ボタン1010が押されると、メモリ解放などの終了動作を行い、色再現編集アプリケーションを終了する。   When an end button 1010 shown in FIG. 12 is pressed, an end operation such as memory release is performed, and the color reproduction editing application is ended.

[色算出用B-スプライン体の設定(S1103)]
以下では、簡単のためにB-スプライン体の式を下のように表記する。なお、下式において、CijkはL*a*b*係数を表す三次元の列ベクトルで、実施例1において図7のフローチャートを用いて説明した係数cλijk、caijk、cbijkを列ベクトルにまとめたものである。
┌ ┐
│λ│
│ a│= ΣiΣjΣkCijkNri(rr)Ngj(gg)Nbk(bb) …(7)
│ b│
└ ┘
[Setting of B-spline body for color calculation (S1103)]
Below, for the sake of simplicity, the expression of the B-spline body is expressed as follows. In the following equation, C ijk is a three-dimensional column vector representing L * a * b * coefficients, and the coefficients cλ ijk , ca ijk , and cb ijk described with reference to the flowchart of FIG. Are summarized in
┌ ┐
│λ│
│ a│ = Σ i Σ j Σ k C ijk N ri (rr) N gj (gg) N bk (bb)… (7)
│ b│
└ ┘

図18は色算出用B-スプライン体に対する係数および基底関数を算出処理を説明するフローチャートである。   FIG. 18 is a flowchart for explaining processing for calculating coefficients and basis functions for a B-spline body for color calculation.

まず、図14に示すデータ構造で表される編集色データから、編集色のRGB値とL*a*b*値の対応関係を、総ての組について取得し(S1201)、取得した総ての組においてRGB値にγ=2.2のガンマ補正演算を施し(S1202)、基底関数を算出してメインメモリ102に記憶する(S1203)。ただし、編集色データの編集色データ総数n3より、節点数はn-1になる。 First, from the edit color data represented by the data structure shown in FIG. 14, the correspondence relationship between the RGB value of the edit color and the L * a * b * value is acquired for all the sets (S1201). Are subjected to a gamma correction operation of γ = 2.2 (S1202), and a basis function is calculated and stored in the main memory 102 (S1203). However, from the edit color data the total number n 3 of edit color data, the number of nodes is n-1.

次に、図7に示すステップS403と同様にして、行列方程式の算出と、その方程式を用いたB-スプライン体の係数算出を行い(S1204)、算出した係数をメインメモリ102に記憶する(S1205)。   Next, similarly to step S403 shown in FIG. 7, the matrix equation is calculated and the coefficient of the B-spline body is calculated using the equation (S1204), and the calculated coefficient is stored in the main memory 102 (S1205). ).

[プロファイルの算出(S1104)]
図19は色算出用のB-スプライン体を用いたプロファイルの作成を説明するフローチャートである。
[Calculate profile (S1104)]
FIG. 19 is a flowchart for explaining the creation of a profile using a B-spline body for color calculation.

まず、作業用のメモリ領域確保し、変数を初期化するなど、初期化動作を行い(S1401)、然るべき順序に従って、プロファイルのLUT格子点に相当するRGB値を一つ取得し(S1402)、インメモリ102から色算出用B-スプライン体の基底関数および係数値を取得し、下式を用いてL*a*b*値を算出する(S1403)。下式において、rr、gg、bbはそれぞれ、ステップS1402で取得したR値、G値、B値にγ=2.2のガンマ補正演算を施した値である。
┌ ┐
│λ│
│ a│= ΣiΣjΣkCijkNri(rr)Ngj(gg)Nbk(bb) …(8)
│ b│
└ ┘
First, an initializing operation such as allocating a working memory area and initializing variables is performed (S1401), and one RGB value corresponding to the LUT lattice point of the profile is acquired according to the appropriate order (S1402). The basis function and coefficient value of the B-spline body for color calculation are acquired from the memory 102, and the L * a * b * value is calculated using the following equation (S1403). In the following equation, rr, gg, and bb are values obtained by performing a gamma correction operation of γ = 2.2 on the R value, G value, and B value acquired in step S1402, respectively.
┌ ┐
│λ│
│ a│ = Σ i Σ j Σ k C ijk N ri (rr) N gj (gg) N bk (bb)… (8)
│ b│
└ ┘

次に、LUT格子点位置に対応するメモリアドレス(メインメモリ102)に、算出したL*a*b*値を格納し(S1404)、LUT格子点の総てに対し上記の変換を施したか否かを判断し(S1405)、LUT格子点の総てに対し上記の変換を施すまでステップS1402からS1404を繰り返す。   Next, the calculated L * a * b * value is stored in the memory address (main memory 102) corresponding to the LUT grid point position (S1404), and whether or not the above conversion is applied to all the LUT grid points. (S1405), and steps S1402 to S1404 are repeated until the above conversion is applied to all the LUT lattice points.

LUT格子点の総てに対し変換を施すと、メインメモリ102に格納された変換後のLUTデータをプロファイルデータとしてメインメモリ102の所定領域に格納し(S1406)、作業用メモリを解放するなど終了動作を行い(S1407)、プロファイルの作成処理を終了する。   When conversion is performed on all LUT lattice points, the converted LUT data stored in the main memory 102 is stored as profile data in a predetermined area of the main memory 102 (S1406), and the work memory is released, etc. The operation is performed (S1407), and the profile creation process is terminated.

[3Dオブジェクト生成(S1105)]
色域表示用のソリッドデータは、色編集データに付随する三角パッチデータを総て用いて、ポリゴン表記のソリッドデータを生成する。編集色表示用のポイントデータは、総ての編集データのL*a*b*値をポイントとし、ポイントデータを生成する。プロファイル表示用のポイントデータは、LUTにおける総てのL*a*b*テーブル値をポイントとし、ポイントデータを生成する。また、色再現表示用のソリッドデータは、次のように生成する。
[3D object generation (S1105)]
The solid data for gamut display uses all the triangular patch data attached to the color edit data to generate solid data in polygon notation. The point data for editing color display uses the L * a * b * values of all editing data as points, and generates point data. Point data for profile display is generated using all L * a * b * table values in the LUT as points. The solid data for color reproduction display is generated as follows.

まず、ステップが[0, 64, 128, 192, 255]からなる5×5×5の格子を生成し、格子立方体の頂点および編集色に隣接する格子点を頂点とする、体積が最大になる直方体を取得する。次に、直方体上の総ての格子点について、ステップS1403と同様にして、RGB値からL*a*b*値を算出し、最後に、算出されたL*a*b*値の組からポリゴン表記の色再現表示用のソリッドデータを生成する。   First, generate a 5x5x5 grid with steps [0, 64, 128, 192, 255], with the vertex of the grid cube and the grid point adjacent to the editing color as the vertex, and the volume is maximized Get a cuboid. Next, for all grid points on the rectangular parallelepiped, L * a * b * values are calculated from the RGB values in the same manner as in step S1403, and finally, from the calculated set of L * a * b * values Generate solid data for color reproduction display in polygon notation.

[編集色の編集(S1107)]
図20は、図12に示す編集領域1005において指定された番号の色編集データについて、RGB値、L*a*b*値またはその両方を修正する処理を説明するフローチャートである。
[Edit Color Edit (S1107)]
FIG. 20 is a flowchart for describing processing for correcting the RGB value, the L * a * b * value, or both of the color editing data of the number designated in the editing area 1005 shown in FIG.

まず、指定されたL*a*b*値が色域外か否かを判定し(S1501)、色域外であれば、指定されたL*a*b*値と、L*a*b*値(50, 0, 0)の色を結ぶ直線が色域と交差する交点を算出し、図21に示すように、算出した交点の値を目標色にする(S1502)。また、色域外でなければ指定されたL*a*b*値を目標色にする。そして、指定された番号の色編集データとして、RGB値および目標値のL*a*b*値をメインメモリ102に記憶する(S1503)。   First, it is determined whether or not the specified L * a * b * value is out of the color gamut (S1501). If it is out of the color gamut, the specified L * a * b * value and L * a * b * value are determined. An intersection point where a straight line connecting the colors (50, 0, 0) intersects the color gamut is calculated, and the calculated intersection value is set as a target color as shown in FIG. 21 (S1502). If it is not out of the gamut, the specified L * a * b * value is used as the target color. Then, the RGB value and the L * a * b * value of the target value are stored in the main memory 102 as the color editing data of the designated number (S1503).

このように、ユーザが制御し易い色調整用のインタフェイスを提供することができる。   In this way, it is possible to provide an interface for color adjustment that can be easily controlled by the user.

また、上記の各実施例では、色の算出における基本的な算出方法を説明し、その算出方法の応用例を説明した。従って、実施例に示すようなプレビューや色再現修正に限らず、色域写像、RGBからCMYKへの色分解、プロファイル作成、キャリブレーションなど画像処理に関する様々な用途に、本発明は応用可能である。   In each of the above embodiments, a basic calculation method in color calculation has been described, and an application example of the calculation method has been described. Therefore, the present invention can be applied not only to preview and color reproduction correction as shown in the embodiment, but also to various uses relating to image processing such as color gamut mapping, color separation from RGB to CMYK, profile creation, and calibration. .

[変形例]
上記の実施例では、ソリッド(solid)表現における基底関数としてB-スプラインを用いる例を説明した。しかし、基底関数としては有理(rational) B-スプライン、不均一有理(non uniform rational) B-スプライン、ベジェ(Bezier)、有理ベジェ(Rational Bezier)など、あらゆる区分的関数を用いることができる。なお、基底関数の局所性が存在するとより望ましいことから、最も代表的なB-スプラインを用いて実施例を説明した。
[Modification]
In the above embodiment, an example in which B-splines are used as basis functions in the solid representation has been described. However, any piecewise function such as rational B-spline, non-uniform rational B-spline, Bezier, rational Bezier, etc. can be used as the basis function. Since it is more desirable that the locality of the basis function exists, the embodiment has been described using the most representative B-spline.

上記の実施例では、各基底の節点数が同一であるとして説明した。しかし、容易に推測できるように、基底ごとに節点数を変更することも可能である。ただし、実施例1においてR軸方向の節点数をl、G軸方向の節点数をm、B軸方向の節点数をnとすると、プロファイルのデータ数は(l + 1)×(m + 1)×(n + 1)であるとともに、プロファイルのネスト数はRに対しては「l + 1」、Gに対しては「m + 1」、Bに対しては「n + 1」になる。また、実施例2においてR軸方向の節点数をl、G軸方向の節点数をm、B軸方向の節点数をnとすると、色編集データのデータ数は(l + 1)×(m + 1)×(n + 1)になる。   In the above embodiment, the number of nodes on each base is assumed to be the same. However, the number of nodes can be changed for each base so that it can be easily guessed. However, in Example 1, if the number of nodes in the R-axis direction is l, the number of nodes in the G-axis direction is m, and the number of nodes in the B-axis direction is n, the number of profile data is (l + 1) x (m + 1 ) X (n + 1), and the number of profile nesting is "l + 1" for R, "m + 1" for G, and "n + 1" for B . Further, in Example 2, if the number of nodes in the R-axis direction is l, the number of nodes in the G-axis direction is m, and the number of nodes in the B-axis direction is n, the number of data of the color editing data is (l + 1) × (m + 1) x (n + 1).

前記の実施例では、RGB三次元よりL*a*b*三次元を算出した。しかし、算出される次元に何ら拘束はない。例えば、RGB値よりグレー値(スカラ値)を算出する場合は、下式のように表現することができる。
gray = ΣiΣjΣkcijkNri(rr)Ngj(gg)Nbk(bb) …(9)
In the above embodiment, L * a * b * three-dimensional was calculated from RGB three-dimensional. However, there is no restriction on the calculated dimension. For example, when calculating a gray value (scalar value) from an RGB value, it can be expressed as the following equation.
gray = Σ i Σ j Σ k c ijk N ri (rr) N gj (gg) N bk (bb)… (9)

また、例えば、RGB値よりCMYK値を算出する場合は、下式のように表現することができる。
┌ ┐
│c│
│m│= ΣiΣjΣkCijkNri(rr)Ngj(gg)Nbk(bb) …(10)
│y│
│k│
└ ┘
ここで、Cijkはcmyk係数を表す四次元の列ベクトル
Also, for example, when calculating the CMYK value from the RGB value, it can be expressed as the following equation.
┌ ┐
│c│
│m│ = Σ i Σ j Σ k C ijk N ri (rr) N gj (gg) N bk (bb)… (10)
│y│
│k│
└ ┘
Where C ijk is a four-dimensional column vector representing the cmyk coefficient

前記の実施例では、式に与える色空間としてRGB三次元によるソリッド表現を用いた。しかし、容易に推測できるように、xy色度のような二次元によるsurface表現、あるいは、cmykのような四次元以上の表現に拡張することができる。例えば、xy色度から一つのRGB値を算出するような場合は下式を用いればよい。
┌ ┐
│R│
│G│= ΣiΣjCijNxi(x)Nyj(y) …(11)
│B│
└ ┘
In the above-described embodiment, solid representation by RGB three-dimensional is used as the color space given to the equation. However, as can be easily guessed, it can be extended to a two-dimensional surface representation such as xy chromaticity, or a four-dimensional representation such as cmyk. For example, when calculating one RGB value from xy chromaticity, the following equation may be used.
┌ ┐
│R│
│G│ = Σ i Σ j C ij N xi (x) N yj (y)… (11)
│B│
└ ┘

あるいは、CMYK値からL*a*b*値を算出する場合は下式を用いればよい。
┌ ┐
│λ│
│ a│= ΣiΣjΣkΣlCijklNci(c)Nmj(m)Nyk(y)Nbkl(bk) …(12)
│ b│
└ ┘
Alternatively, when calculating the L * a * b * value from the CMYK value, the following equation may be used.
┌ ┐
│λ│
│ a│ = Σ i Σ j Σ k Σ l C ijkl N ci (c) N mj (m) N yk (y) N bkl (bk)… (12)
│ b│
└ ┘

ただし、上記の式から明白であるように、総和演算の多重度は式に与える色空間、すなわち入力色信号値の次元数に等しくなければならない。また、総和式内の係数を求めるためには、ソリッド表現の拡張に伴い行列方程式を変更しなければならない。   However, as is clear from the above equation, the multiplicity of the sum operation must be equal to the color space given to the equation, that is, the number of dimensions of the input color signal value. In addition, in order to obtain the coefficients in the summation formula, the matrix equation must be changed as the solid representation is expanded.

以上の実施例から明らかなように、用いる色空間に何ら制限はなく、CMYK、L*a*b*、JCH、XYZ、xyなどの色空間を用いることができる。さらに、インク色分解などにも適用可能で、CMYKに淡シアンならびに淡マゼンタを加えた六次元色空間なども用いることができる。また、式に与える色空間と、式より算出される色空間は同一の色空間であってもよい。   As is clear from the above embodiments, the color space to be used is not limited, and color spaces such as CMYK, L * a * b *, JCH, XYZ, and xy can be used. Further, it can be applied to ink color separation, and a 6-dimensional color space obtained by adding light cyan and light magenta to CMYK can also be used. The color space given to the equation and the color space calculated from the equation may be the same color space.

実施例2では、B-スプライン体に与える前に、式にガンマ補正演算を施したが、この変換はもちろん他の高次変換や、RGB→RGBのアフィン変換などで置き換えることが可能である。   In the second embodiment, the gamma correction operation is performed on the equation before giving it to the B-spline body. However, this conversion can be replaced by other higher-order transformations or RGB → RGB affine transformations.

以下、本発明にかかる実施例3の色処理を説明する。なお、実施例3において、実施例1、2と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, color processing according to the third embodiment of the present invention will be described. Note that the same reference numerals in the third embodiment denote the same parts as in the first and second embodiments, and a detailed description thereof will be omitted.

[概要]
実施例1、2で説明した非線型演算で色の算出を実現する技術によれば、複数の代表色から色を算出する際に色値の変化のトレンドを自然に反映して滑らかな変化で色を算出するため、少ない代表色でも精度よく色を算出することができる。この技術を、さらに色調整に応用すれば、基底の局所性を利用して色修正の影響範囲を自然に局所領域に限定可能であるとともに、調整後の色を直接指定することが可能である。さらに、修正に伴い色が滑らかに変化するため、階調性が非常に良好な色の修正が可能である。勿論、この技術は、色域写像、RGBからCMYKへの色分解、プロファイル作成、キャリブレーションなど、画像処理に関する様々な用途に応用可能である。
[Overview]
According to the technology that realizes the color calculation by the non-linear calculation described in the first and second embodiments, when the color is calculated from a plurality of representative colors, the trend of the color value change is naturally reflected in a smooth change. Since the color is calculated, it is possible to calculate the color accurately even with a small number of representative colors. If this technology is further applied to color adjustment, it is possible to naturally limit the range of influence of color correction to the local region using the locality of the base, and to directly specify the color after adjustment. . Furthermore, since the color changes smoothly with the correction, it is possible to correct the color with very good gradation. Of course, this technique can be applied to various uses relating to image processing, such as color gamut mapping, color separation from RGB to CMYK, profile creation, and calibration.

しかし、非線型演算を定める際に、所定の色座標値を通過するように非線型演算の基底関数の係数値を定める。このような算出方法によれば、非線型演算は滑らかな演算特性を有するが、他方、一次元のスプライン関数から容易に推察できるように振動が発生する場合がある。   However, when determining the non-linear calculation, the coefficient value of the basis function of the non-linear calculation is determined so as to pass a predetermined color coordinate value. According to such a calculation method, the non-linear calculation has smooth calculation characteristics, but on the other hand, vibration may occur so that it can be easily inferred from a one-dimensional spline function.

図23(a)および(b)は上記の振動を一次元のBスプライン関数を例に説明する図である。所定の色座標値を通過するように基底関数の係数値を定めることは、図23(a)または(b)に示すように、所定の値を通るように一次元Bスプライン関数を定めることに相当し、図23(a)に示すように、たとえ若干であっても振動が発生する場合がある。このような振動は、算出する色信号によって問題になる場合がある。例えば、明度信号での振動は画像の輝度(または濃度)むらとして現れ、画像障害として容易に知覚される。   FIGS. 23 (a) and 23 (b) are diagrams for explaining the vibration described above using a one-dimensional B-spline function as an example. To determine the coefficient value of the basis function so as to pass the predetermined color coordinate value is to determine the one-dimensional B-spline function so as to pass the predetermined value as shown in FIG. 23 (a) or (b). Correspondingly, as shown in FIG. 23 (a), even a slight vibration may occur. Such vibration may cause a problem depending on the calculated color signal. For example, vibration in the brightness signal appears as unevenness in the brightness (or density) of the image and is easily perceived as an image failure.

[色算出用のBスプライン体の設定(S1103)]
まず、図13の色算出用のBスプライン体の係数および基底関数の算出処理(S1103)を説明するが、以後、色算出用のBスプライン体は式(13)で定義される。
λ = ΣiΣjΣkijkNri(rr)Ngj(gg)Nbk(bb)
a = ΣiΣjΣkcaijkNri(rr)Ngj(gg)Nbk(bb) …(13)
b = ΣiΣjΣkcbijkNri(rr)Ngj(gg)Nbk(bb)
ここで、rr、gg、bbはRGB値
λ、a、bはL*a*b*値
NrはR軸方向での基底関数
NgはG軸方向での基底関数
NbはB軸方向での基底関数
ijk、caijk、cbijkは係数
Nr、Ng、Nbに付属するサフィクスi、j、kは
それぞれの軸に対する基底における基底関数番号
[Setting of B-Spline body for color calculation (S1103)]
First, the calculation processing (S1103) of the coefficients and basis functions of the B-spline body for color calculation in FIG. 13 will be described. Hereinafter, the B-spline body for color calculation is defined by the equation (13).
λ = Σ i Σ j Σ kijk N ri (rr) N gj (gg) N bk (bb)
a = Σ i Σ j Σ k ca ijk N ri (rr) N gj (gg) N bk (bb)… (13)
b = Σ i Σ j Σ k cb ijk N ri (rr) N gj (gg) N bk (bb)
Where rr, gg, and bb are RGB values
λ, a, b are L * a * b * values
N r is the basis function in the R-axis direction
N g is the basis function in the G-axis direction
N b is the basis function in the B-axis direction
ijk , ca ijk , cb ijk are coefficients
Suffixes i, j, k attached to N r , N g , N b are
Basis function number in the basis for each axis

図22は色算出用のBスプライン体の係数および基底関数の算出処理(S1103)を説明するフローチャートである。   FIG. 22 is a flowchart for explaining the calculation processing (S1103) of the coefficients and basis functions of the B-spline body for color calculation.

まず、図14に示すデータ構造で表される編集色データから、編集色のRGB値とL*a*b*値の対応データを、すべての組について取得する(S401)。以後、RGB値とL*a*b*値の対応データを、i番目の編集色のRGB値をrri、ggi、bbi、L*a*b*値をλi、ai、biと説明する。 First, correspondence data between the RGB value and L * a * b * value of the edit color is acquired for all sets from the edit color data represented by the data structure shown in FIG. 14 (S401). Thereafter, the corresponding data of the RGB value and the L * a * b * value, the RGB value of the i-th editing color as rr i , gg i , bb i , and the L * a * b * value as λ i , a i , b This is described as i .

次に、適切に節点を決定した後、それら節点に基づき基底関数を算出し、メインメモリ102に記憶する(S402)。節点の決定方法は、予め節点数および座標を決めておいてもよいし、あるいは、L*a*b*値の変化から節点を決定しても構わない。節点が定まった後の基底関数の算出には、一般的なDeBoor-Coxのアルゴリズムを用いる。例えば、基底関数Nr、Ng、Nbが何れも三位のBスプライン基底であり、かつ、節点数が4であれば、何れも図8に示すようなξ0〜ξ3の四節点の基底関数になる。なお、図8はR軸の基底関数Nrを示している。以下、基底関数は何れも四節点の三位のBスプライン基底として説明する。 Next, after appropriately determining the nodes, a basis function is calculated based on the nodes and stored in the main memory 102 (S402). As a method for determining a node, the number of nodes and coordinates may be determined in advance, or the node may be determined from a change in L * a * b * value. A general DeBoor-Cox algorithm is used to calculate the basis function after the node is determined. For example, if the basis functions N r , N g , and N b are all third-order B-spline bases and the number of nodes is 4, all four-node bases ξ0 to ξ3 as shown in FIG. Become a function. Incidentally, FIG. 8 shows the basis functions N r of R axis. In the following, the basis functions will be described as B-spline bases with three positions of four nodes.

次に、算出した基底関数と、図14に示す編集色データから取得した、RGB値とL*a*b*値の対応データの並びに近似する(あるいは、それら対応データを結ぶ多面体集合を平滑化したような)特性を有するBスプライン体の各係数を算出する(S403)。例えば、一次元的に観ると、図23(a)に生じている振動やリプルが抑制された、図23(b)に示されるようなBスプライン関数を求めることに相当する。   Next, the calculated basis function and the correspondence data of RGB values and L * a * b * values obtained from the edit color data shown in Fig. 14 are approximated (or the polyhedron set connecting these correspondence data is smoothed) Each coefficient of the B-spline body having such characteristics is calculated (S403). For example, when viewed one-dimensionally, this corresponds to obtaining a B-spline function as shown in FIG. 23 (b) in which the vibration and ripple occurring in FIG. 23 (a) are suppressed.

この処理は、行列方程式f=MCを、L*成分、a*成分、b*成分それぞれについてLU分解を用いて解き、各係数を算出することで行う。以下、上記方程式による係数算出について詳しく説明する。   This process is performed by solving the matrix equation f = MC using LU decomposition for each of the L * component, the a * component, and the b * component, and calculating each coefficient. Hereinafter, the coefficient calculation by the above equation will be described in detail.

まず、行列Mのs行t列成分mstを次のように算出する。
mst = Σx{Nri(rrx)Ngj(ggx)Nbk(bbx)
・Nrl(rrx)Ngm(ggx)Nbn(bbx)} …(14)
First, the s-row t-column component m st of the matrix M is calculated as follows.
m st = Σ x (N ri (rr x ) N gj (gg x ) N bk (bb x )
・ N rl (rr x ) N gm (gg x ) N bn (bb x )}… (14)

ここで、sに対してi、j、kとの間にs = 25(I - 1) + 5(j- 1) + kがなり立ち、tに対してl、m、nとの間にt=25(l - 1) + 5(m - 1) + nがなり立つ。なお、この関係は、節点数と基底関数の位数によって変化する。例えば、三位のBスプライン基底で六節点の場合、t=49(I - 1) + 7(j - 1) + kという関係になる。   Here, s = 25 (I-1) + 5 (j-1) + k is established between i, j, and k with respect to s, and between l, m, and n with respect to t. t = 25 (l-1) + 5 (m-1) + n. This relationship varies depending on the number of nodes and the order of the basis function. For example, in the case of a six-node B-base spline at the third position, the relationship is t = 49 (I-1) +7 (j-1) + k.

次に、係数cλijk、caijk、cbijkの算出をそれぞれ説明する。まず、係数cλijkを算出するために、列ベクトルfλのs行成分fλsを次のように算出し、列ベクトルfλを定める。
s = ΣxNri(rrx)Ngj(ggx)Nbk(bbx)・λx …(15)
Next, calculation of the coefficients cλ ijk , ca ijk , and cb ijk will be described. First, in order to calculate the coefficient cλ ijk , the s row component fλ s of the column vector fλ is calculated as follows to determine the column vector fλ.
s = Σ x N ri (rr x ) N gj (gg x ) N bk (bb x ) ・ λ x … (15)

ここでも先と同様に、sに対してi、j、kとの間にs=25(I - 1) + 5(j - 1) + kがなり立つが、この関係は、節点数と基底関数の位数によって変化する。そして、LU分解を用いて、次の行列方程式を解き、係数cλijkを算出する。
cλ= [cλ111, cλ112, …, cλ115, cλ121,
…, cλ155, cλ211, …, cλ554, cλ555] …(16)
fλ= M・cλ
Again, as before, s = 25 (I-1) + 5 (j-1) + k stands for i, j, and k with respect to s. It depends on the order of the function. Then, using LU decomposition, the following matrix equation is solved to calculate the coefficient cλ ijk .
cλ = [cλ 111 , cλ 112 ,…, cλ 115 , cλ 121 ,
…, Cλ 155 , cλ 211 ,…, cλ 554 , cλ 555 ]… (16)
fλ = M ・ cλ

次に、係数caijkを算出するために、列ベクトルfaのs行成分fasを次のように算出し、列ベクトルfaを定める。
fas = ΣxNri(rrx)Ngj(ggx)Nbk(bbx)・ax …(17)
Next, in order to calculate the coefficient ca ijk , the s row component fa s of the column vector fa is calculated as follows to determine the column vector fa.
fa s = Σ x N ri (rr x ) N gj (gg x ) N bk (bb x ) ・ a x … (17)

この後、次の行列方程式をLU分解を用いて解く。
ca = [ca111, ca112, …, ca115, ca121,
…, ca155, ca211, …, ca554, ca555] …(18)
fa = M・ca
After this, the following matrix equation is solved using LU decomposition.
ca = [ca 111 , ca 112 ,…, ca 115 , ca 121 ,
…, Ca 155 , ca 211 ,…, ca 554 , ca 555 ]… (18)
fa = M ・ ca

次に、係数cbijkを算出するために、列ベクトルfbのs行成分fbsを次のように算出し、列ベクトルfbを定める。
fbs = ΣxNri(rrx)Ngj(ggx)Nbk(bbx)・bx …(19)
Next, in order to calculate the coefficient cb ijk , the s row component fb s of the column vector fb is calculated as follows to determine the column vector fb.
fb s = Σ x N ri (rr x ) N gj (gg x ) N bk (bb x ) ・ b x … (19)

この後、次の行列方程式をLU分解を用いて解く。
cb = [cb111, cb112, …, cb115, cb121,
…, cb155, cb211, …, cb554, cb555] …(20)
fb = M・cb
After this, the following matrix equation is solved using LU decomposition.
cb = [cb 111 , cb 112 ,…, cb 115 , cb 121 ,
…, Cb 155 , cb 211 ,…, cb 554 , cb 555 ]… (20)
fb = M ・ cb

そして、算出した係数をメインメモリ102に記憶する(S404)。上述の式(15)および(17)を用いることで、誤差の二乗和を小さくすることができる。その結果、振動やリプルを抑制することができる。   Then, the calculated coefficient is stored in the main memory 102 (S404). By using the above equations (15) and (17), the sum of squares of errors can be reduced. As a result, vibration and ripple can be suppressed.

[プロファイルの算出(S1104)]
次に、色算出用のBスプライン体を用いたプロファイルの作成(S1104)を、図19を用いて説明する。
[Calculate profile (S1104)]
Next, creation of a profile using a B-spline body for color calculation (S1104) will be described with reference to FIG.

まず、作業用のメモリ領域確保し、変数を初期化するなど、初期化動作を行い(S1401)、然るべき順序に従って、プロファイルのLUT格子点に相当するRGB値を一つ取得し(S1402)、インメモリ102から色算出用のBスプライン体の基底関数および係数値を取得し、下式を用いてL*a*b*値を算出する(S1403)。
λ = Σi=1 5Σj=1 5Σk=1 5ijkNri(rr)Ngj(gg)Nbk(bb)
a = Σi=1 5Σj=1 5Σk=1 5caijkNri(rr)Ngj(gg)Nbk(bb) …(21)
b = Σi=1 5Σj=1 5Σk=1 5cbijkNri(rr)Ngj(gg)Nbk(bb)
ここで、rr、gg、bbはRGB値
λ、a、bはL*a*b*値
NrはR軸方向での基底関数
NgはG軸方向での基底関数
NbはB軸方向での基底関数
ijk、caijk、cbijkは係数
Nr、Ng、Nbに付属するサフィクスi、j、kは
それぞれの軸に対する基底における基底関数番号
First, an initialization operation is performed, such as allocating a working memory area and initializing variables (S1401). The base function and coefficient value of the B-spline body for color calculation are acquired from the memory 102, and the L * a * b * value is calculated using the following equation (S1403).
λ = Σ i = 1 5 Σ j = 1 5 Σ k = 1 5ijk N ri (rr) N gj (gg) N bk (bb)
a = Σ i = 1 5 Σ j = 1 5 Σ k = 1 5 ca ijk N ri (rr) N gj (gg) N bk (bb)… (21)
b = Σ i = 1 5 Σ j = 1 5 Σ k = 1 5 cb ijk N ri (rr) N gj (gg) N bk (bb)
Where rr, gg, and bb are RGB values
λ, a, b are L * a * b * values
N r is the basis function in the R-axis direction
N g is the basis function in the G-axis direction
N b is the basis function in the B-axis direction
ijk , ca ijk , cb ijk are coefficients
Suffixes i, j, k attached to N r , N g , N b are
Basis function number in the basis for each axis

次に、LUT格子点位置に対応するメモリアドレス(メインメモリ102)に、算出したL*a*b*値を格納し(S1404)、LUT格子点の総てに対し上記の変換を施したか否かを判断し(S1405)、LUT格子点の総てに対し上記の変換を施すまでステップS1402からS1404を繰り返す。   Next, the calculated L * a * b * value is stored in the memory address (main memory 102) corresponding to the LUT grid point position (S1404), and whether or not the above conversion is applied to all the LUT grid points. (S1405), and steps S1402 to S1404 are repeated until the above conversion is applied to all the LUT lattice points.

LUT格子点の総てに対し変換を施すと、メインメモリ102に格納された変換後のLUTデータをプロファイルデータとしてメインメモリ102の所定領域に格納し(S1406)、作業用メモリを解放するなど終了動作を行い(S1407)、プロファイルの作成処理を終了する。   When conversion is performed on all LUT lattice points, the converted LUT data stored in the main memory 102 is stored as profile data in a predetermined area of the main memory 102 (S1406), and the work memory is released, etc. The operation is performed (S1407), and the profile creation process is terminated.

[3Dオブジェクト生成(S1105)]
ステップS1105における色域表示用のソリッドデータの生成は、実施例1と同様の処理であるから詳細説明を省略する。
[3D object generation (S1105)]
The generation of the solid data for displaying the color gamut in step S1105 is the same process as in the first embodiment, and thus detailed description thereof is omitted.

[編集色の編集(S1107)]
ステップS1107における編集色の編集は、実施例1と同様の処理であるから詳細説明を省略する。
[Edit Color Edit (S1107)]
The editing of the editing color in step S1107 is the same process as in the first embodiment, and thus detailed description thereof is omitted.

このように、分布する色を近似/平滑化するよう非線型演算を行うため、上述した非線型演算の振動やリプルを抑制して、良好な色再現を得ることができる。つまり、一次元Bスプライン関数を例にとると、図23(b)に示すような、振動やリプルを抑制した滑らかな関数を算出することができる。さらに、誤差の総和が最小になるよう非線型演算を定めるため、色再現の忠実性においても良好な結果が得られる。   As described above, since the non-linear operation is performed so as to approximate / smooth the distributed color, it is possible to suppress the above-described non-linear operation vibration and ripple, and obtain a good color reproduction. That is, taking a one-dimensional B-spline function as an example, it is possible to calculate a smooth function in which vibration and ripple are suppressed as shown in FIG. Further, since the non-linear operation is determined so that the total sum of errors is minimized, good results can be obtained in the fidelity of color reproduction.

従って、実施例3は、色信号値の変化のトレンドを自然に反映するとともに、振動やリプルが生じない滑らかな非線型演算を実現することができるため、色の算出に極めて有用である。   Therefore, the third embodiment naturally reflects the change trend of the color signal value and can realize a smooth non-linear calculation that does not generate vibration and ripple, and is thus extremely useful for color calculation.

なお、上記では、色の算出における基本的算出方法を説明し、かつ、その算出方法の応用例を示したが、本実施例は、上記の色再現修正に限らず、色域写像やキャリブレーションなどの画像処理に関する様々な用途に応用可能である。   In the above, a basic calculation method in color calculation has been described, and an application example of the calculation method has been described. However, the present embodiment is not limited to the above color reproduction correction, but includes color gamut mapping and calibration. It can be applied to various uses related to image processing.

以下、本発明にかかる実施例4の色処理を説明する。なお、実施例4において、実施例1〜3と略同様の構成については、同一符号を付して、その詳細説明を省略する。   The color processing according to the fourth embodiment of the present invention will be described below. Note that the same reference numerals in the fourth embodiment denote the same parts as in the first to third embodiments, and a detailed description thereof will be omitted.

実施例4においては、Bスプライン体を用いる色算出方法を変更する。具体的には、RGB値に対してガンマ補正演算を施した後にBスプライン体を用いて色を算出する。そこで以下では、実施例3との差異である、ステップS1103における色算出用のBスプライン体に対する係数および基底関数の算出処理、ステップS1104におけるプロファイル作成処理について、その変更点を説明する。   In the fourth embodiment, the color calculation method using the B spline body is changed. Specifically, after performing a gamma correction operation on the RGB values, a color is calculated using a B-spline body. In the following, changes in the coefficient and basis function calculation process for the color calculation B spline body in step S1103 and the profile creation process in step S1104, which are differences from the third embodiment, will be described.

[色算出用のBスプライン体の設定(S1103)]
以下では、簡単のためにB-スプライン体の式を下のように表記する。なお、下式において、CijkはL*a*b*係数を表す三次元の列ベクトルで、実施例1において図7のフローチャートを用いて説明した係数cλijk、caijk、cbijkを列ベクトルにまとめたものである。
┌ ┐
│λ│
│ a│= ΣiΣjΣkCijkNri(rr)Ngj(gg)Nbk(bb) …(22)
│ b│
└ ┘
[Setting of B-Spline body for color calculation (S1103)]
Below, for the sake of simplicity, the expression of the B-spline body is expressed as follows. In the following equation, C ijk is a three-dimensional column vector representing L * a * b * coefficients, and the coefficients cλ ijk , ca ijk , and cb ijk described with reference to the flowchart of FIG. Are summarized in
┌ ┐
│λ│
│ a│ = Σ i Σ j Σ k C ijk N ri (rr) N gj (gg) N bk (bb)… (22)
│ b│
└ ┘

次に、色算出用のBスプライン体に対する係数および基底関数を算出処理を図18に示すフローチャートを参照して説明する。   Next, processing for calculating coefficients and basis functions for a B-spline body for color calculation will be described with reference to the flowchart shown in FIG.

sRGB式では、RGB値にガンマ演算とマトリクス演算を施してXYZ値に変換するよう規定されている。従って、sRGBにおけるRGB再現色は、L*a*b*色空間上では、ある傾向をもって偏った分布を示す。そこで、Bスプライン体による色算出精度を向上するためには、予めRGB値をガンマ演算により補正しておくことが望ましい。   The sRGB formula stipulates that RGB values are converted into XYZ values by performing gamma calculation and matrix calculation. Therefore, the RGB reproduction colors in sRGB show a distribution with a certain tendency in the L * a * b * color space. Therefore, in order to improve the color calculation accuracy by the B-spline body, it is desirable to correct the RGB values in advance by gamma calculation.

まず、図14に示すデータ構造で表される編集色データから、編集色のRGB値とL*a*b*値の対応関係を、総ての組について取得し(S1201)、取得した総ての組においてRGB値にγ=2.2のガンマ補正演算を施し(S1202)、適切になるように節点を決定した後、それら節点に基づいて基底関数を算出してメインメモリ102に記憶する(S1203)。以下、基底関数は何れも四節点の三位のBスプライン基底として説明する。   First, from the edit color data represented by the data structure shown in FIG. 14, the correspondence relationship between the RGB value of the edit color and the L * a * b * value is acquired for all the sets (S1201). The gamma correction operation of γ = 2.2 is performed on the RGB value in the set (S1202), and nodes are determined so as to be appropriate, then basis functions are calculated based on these nodes and stored in the main memory 102 (S1203). . In the following, the basis functions will be described as B-spline bases with three positions of four nodes.

次に、図7に示すステップS403と同様にして、行列方程式の算出と、その方程式を用いたBスプライン体の係数算出を行い(S1204)、算出した係数をメインメモリ102に記憶する(S1205)。ただし、基底関数に代入する媒介変数値が、RGB値そのものではなくRGB値にガンマ補正演算を施した値になるところがステップS403と異なる。   Next, in the same manner as in step S403 shown in FIG. 7, the matrix equation is calculated and the coefficient of the B spline body is calculated using the equation (S1204), and the calculated coefficient is stored in the main memory 102 (S1205). . However, the difference from step S403 is that the parametric value to be assigned to the basis function is not the RGB value itself but a value obtained by performing a gamma correction operation on the RGB value.

なお、ここでのガンマ係数は、sRGB式におけるガンマ相当値2.2とは直接に関係しない。従って、2.2に限らず1.7などの値を用いた場合に、より色算出精度が向上する場合がある。   Note that the gamma coefficient here is not directly related to the gamma equivalent value 2.2 in the sRGB formula. Accordingly, the color calculation accuracy may be further improved when a value such as 1.7 is used instead of 2.2.

[プロファイルの算出(S1104)]
色算出用のBスプライン体を用いたプロファイルの作成手順は、図19に示した実施例1のフローチャートと同じである。従って、作業用のメモリ領域確保し、変数を初期化するなど、初期化動作を行い(S1401)、然るべき順序に従って、プロファイルのLUT格子点に相当するRGB値を一つ取得し(S1402)、インメモリ102から色算出用B-スプライン体の基底関数および係数値を取得し、下式を用いてL*a*b*値を算出する(S1403)。ただし、下式のrr、gg、bbはそれぞれステップS1402で取得したR値、G値、B値にγ=2.2のガンマ補正演算を施した値である。
┌ ┐
│λ│
│ a│= ΣiΣjΣkCijkNri(rr)Ngj(gg)Nbk(bb) …(23)
│ b│
└ ┘
[Calculate profile (S1104)]
The procedure for creating a profile using a B-spline body for color calculation is the same as the flowchart of the first embodiment shown in FIG. Therefore, an initialization operation such as securing a working memory area and initializing variables is performed (S1401), and one RGB value corresponding to the LUT lattice point of the profile is acquired according to the appropriate order (S1402). The basis function and coefficient value of the B-spline body for color calculation are acquired from the memory 102, and the L * a * b * value is calculated using the following equation (S1403). However, rr, gg, and bb in the following expression are values obtained by performing a gamma correction operation of γ = 2.2 on the R value, G value, and B value acquired in step S1402, respectively.
┌ ┐
│λ│
│ a│ = Σ i Σ j Σ k C ijk N ri (rr) N gj (gg) N bk (bb)… (23)
│ b│
└ ┘

次に、LUT格子点位置に対応するメモリアドレス(メインメモリ102)に、算出したL*a*b*値を格納し(S1404)、LUT格子点の総てに対し上記の変換を施したか否かを判断し(S1405)、LUT格子点の総てに対し上記の変換を施すまでステップS1402からS1404を繰り返す。   Next, the calculated L * a * b * value is stored in the memory address (main memory 102) corresponding to the LUT grid point position (S1404), and whether or not the above conversion is applied to all the LUT grid points (S1405), and steps S1402 to S1404 are repeated until the above conversion is applied to all the LUT lattice points.

[変形例]
●重み付け近似
上記の実施例3、4では、重み付けを行わず、Bスプライン体により算出される色と編集色の距離の総和が最小になるよう、Bスプライン体を算出した。しかし、各編集色に対して重み付けを行い、重み付き距離の総和が最小になるよう算出することも可能である。この際、行列方程式は例えば実施例1における明度算出用係数の算出を例にすると、行列要素および方程式の左辺のベクトル要素は下式のようになる。
mst = Σx{wxNri(rrx)Ngj(ggx)Nbk(bbx)
・Nrl(rrx)Ngm(ggx)Nbn(bbx)} …(24)
s = Σx{wxNri(rrx)Ngj(ggx)Nbk(bbx)・λx
[Modification]
Weighting approximation In Examples 3 and 4 described above, the B spline body was calculated so that the sum of the distance between the color calculated by the B spline body and the edit color was minimized without weighting. However, it is also possible to perform weighting for each editing color so that the sum of the weighted distances is minimized. At this time, when the matrix equation is, for example, the calculation of the lightness calculation coefficient in the first embodiment, the matrix element and the vector element on the left side of the equation are represented by the following expressions.
m st = Σ x (w x N ri (rr x ) N gj (gg x ) N bk (bb x )
・ N rl (rr x ) N gm (gg x ) N bn (bb x )}… (24)
s = Σ x (w x N ri (rr x ) N gj (gg x ) N bk (bb x ) ・ λ x

ここで、wxはx番目の編集色に対する重み値で、重み値が大きいほど当該色の近似が改善される。 Here, w x is a weight value for the x-th edit color, and the approximation of the color improves as the weight value increases.

重み係数の設定方法としては、例えばユーザが肌色近辺の編集色などに対して手動で重み係数を指定してもよい。重み係数をユーザが調整することにより、周辺への影響を観察しながら肌色などの重要色の近辺における色再現性の向上を図ることができる。   As a method for setting the weighting factor, for example, the user may manually specify the weighting factor for an editing color near the skin color. By adjusting the weighting coefficient, the user can improve color reproducibility in the vicinity of important colors such as skin color while observing the influence on the surroundings.

あるいは、別の重み係数の設定方法として、編集色の彩度に応じ、例えばwx=1/√(a2+b2)のように自動的に設定してもよい。CIEΔE94式からも明らかなように、人の視覚は高彩度付近で鈍感になるため、高彩度色において高い色再現性を得るよりも、低彩度色において高い色再現性を得た方が、色再現として効果的である。そこで、前述したように、自動的に重みを設定することで、低彩度付近で高い色再現性を獲得し、より視覚的に好ましい色再現を得ることが可能になる。 Alternatively, as another weighting factor setting method, for example, wx = 1 / √ (a 2 + b 2 ) may be automatically set according to the saturation of the editing color. As can be seen from the CIEΔE94 formula, human vision becomes insensitive near high saturation, so color reproduction is better when high color reproducibility is obtained with low saturation than when high saturation color is obtained. As effective. Therefore, as described above, by automatically setting the weight, it is possible to acquire high color reproducibility in the vicinity of low saturation and obtain more visually preferable color reproduction.

●ソリッド表現における、Bスプライン基底関数の他の区分多項式での置き換え
上記の実施例3、4では、ソリッド表現における基底関数としてBスプラインを用いる例を説明した。しかし、基底関数としては有理(rational) Bスプライン、不均一有理(non uniform rational) Bスプライン、ベジェ(Bezier)、有理ベジェ(Rational Bezier)など、あらゆる区分的関数を用いることができる。なお、基底関数の局所性が存在するとより望ましいことから、最も代表的なBスプラインを用いて実施例を説明した。
Replacement of B-spline basis functions with other piecewise polynomials in the solid representation In the third and fourth embodiments described above, examples of using B-splines as the basis functions in the solid representation have been described. However, as a basis function, any piecewise function such as rational B spline, non uniform rational B spline, Bezier, rational Bezier, etc. can be used. Since it is more desirable that the locality of the basis function exists, the embodiment has been described using the most typical B-spline.

●ソリッド表現の拡張
前記の実施例3、4では、式に与える色空間としてRGB三次元によるソリッド表現を用いた。しかし、xy色度のような二次元によるsurface表現、あるいは、cmykのような四次元以上の表現に拡張することができる。例えば、xy色度から一つのRGB値を算出するような場合は下式を用いればよい。
┌ ┐
│R│
│G│= ΣiΣjCijNxi(x)Nyj(y) …(25)
│B│
└ ┘
Expansion of solid representation In the above-described Examples 3 and 4, solid representation by RGB three-dimensional was used as the color space given to the expression. However, it can be extended to a two-dimensional surface representation such as xy chromaticity, or a four-dimensional representation such as cmyk. For example, when calculating one RGB value from xy chromaticity, the following equation may be used.
┌ ┐
│R│
│G│ = Σ i Σ j C ij N xi (x) N yj (y)… (25)
│B│
└ ┘

あるいは、cmyk値からxy色度値を算出するような場合には下式を用いればよい。
┌ ┐
│x│
│ │= ΣiΣjΣkΣlCijklNci(c)Nmj(m)Nyk(y)Nbkl(bk) …(26)
│y│
└ ┘
Alternatively, when the xy chromaticity value is calculated from the cmyk value, the following equation may be used.
┌ ┐
│x│
│ │ = Σ i Σ j Σ k Σ l C ijkl N ci (c) N mj (m) N yk (y) N bkl (bk)… (26)
│y│
└ ┘

ただし、上記の式から明白であるように、総和演算の多重度は式に与える色空間すなわち入力色信号値の次元数に等しくなければならない。   However, as is apparent from the above equation, the multiplicity of the sum operation must be equal to the color space given to the equation, that is, the number of dimensions of the input color signal value.

また、総和式内の係数を求めるためには、ソリッド表現の拡張に伴い、行列方程式を変更しなければならない。例えば、二次元による面(surface)表現の場合に、xy色度から算出する場合、R値係数に対して行列方程式は、下式のように、行列Mとベクトルfを定めなければならない。
mst = ΣaNxi(xa)Nyj(ya)Nxl(xa)Nym(ya) …(27)
frs = ΣaNxi(xa)Nyj(ya)・ra
In addition, in order to obtain the coefficients in the summation formula, the matrix equation must be changed as the solid representation is expanded. For example, in the case of two-dimensional surface expression, when calculating from the xy chromaticity, the matrix equation for the R value coefficient must be defined as a matrix M and a vector f as shown in the following equation.
m st = Σ a N xi (x a ) N yj (y a ) N xl (x a ) N ym (y a )… (27)
fr s = Σ a N xi (x a ) N yj (y a ) ・ r a

ここで、節点数が5の場合は、sに対してi、jとの間にs=5(i - 1) + jが、tに対してl、mとの間にも同様にt=5(l - 1) + mがなり立つ。   Here, when the number of nodes is 5, s = 5 (i-1) + j between i and j with respect to s, and t = 5 (l-1) + m stands.

また、cmykのような四次元表現に対して、x値係数に対する行列方程式は、下式のように、行列Mとベクトルfを定めなければならない。
mst = Σaci(ca)Nmj(ma)Nyk(ya)Nbkl(bka)
・Nco(ca)Nmp(ma)Nyq(ya)Nbkr(bka)} …(28)
fxs = ΣaNci(ca)Nmj(ma)Nyk(ya)Nbkl(bka)・xa
Also, for a four-dimensional representation such as cmyk, the matrix equation for the x-value coefficient must define a matrix M and a vector f as in the following equation.
m st = Σ aci (c a ) N mj (m a ) N yk (y a ) N bkl (bk a )
・ N co (c a ) N mp (m a ) N yq (y a ) N bkr (bk a )}… (28)
fx s = Σ a N ci (c a ) N mj (m a ) N yk (y a ) N bkl (bk a ) ・ x a

ここで、節点数が5の場合は、sに対してi、j、k、lとの間にs=125(i - 1) + 25(j - 1) + 5(k - 1) + lが、tに対してo、p、q、rとの間にも同様にt=125(o - 1) + 25(p - 1) + 5(q - 1) + rがなり立つ。   Here, when the number of nodes is 5, s = 125 (i-1) + 25 (j-1) + 5 (k-1) + l between i, j, k, and l However, t = 125 (o-1) + 25 (p-1) + 5 (q-1) + r similarly holds between o, p, q, and r with respect to t.

勿論、次元数が五次元以上になる場合も、同様に、行列方程式を変更しなければならない。   Of course, if the number of dimensions is five or more, the matrix equation must be changed as well.

●用いる色空間
実施例3、4は、色空間に何ら制限はなく、CMYK色空間、L*a*b*色空間、JCH色空間、XYZ色空間、xy色空間などを用いることができる。さらに、インク色分解などにも適用可能であり、CMYKに淡シアンならびに淡マゼンタを加えた六次元色空間、さらに、レッドインクおよびグリーンインクを加えた八次元色空間なども用いることができる。また、式に与える色空間と、式より算出される色空間とが同一の色空間であってもよい。
Color Space to be Used In Examples 3 and 4, there is no limitation on the color space, and a CMYK color space, an L * a * b * color space, a JCH color space, an XYZ color space, an xy color space, and the like can be used. Further, the present invention can be applied to ink color separation, and a 6-dimensional color space obtained by adding light cyan and light magenta to CMYK, and an 8-dimensional color space obtained by adding red ink and green ink can also be used. Further, the color space given to the equation and the color space calculated from the equation may be the same color space.

以下、本発明にかかる実施例5の色処理を説明する。なお、実施例5において、実施例1-4と同様の構成については、同一符号を付して、その詳細説明を省略する。   The color processing according to the fifth embodiment of the present invention will be described below. Note that the same reference numerals in the fifth embodiment denote the same parts as in the first to fourth embodiments, and a detailed description thereof will be omitted.

[構成および動作]
図24は実施例5の色処理装置の構成を示すブロック図である。図3に示す色処理装置との違いは、測色器115を有する点である。
[Configuration and operation]
FIG. 24 is a block diagram illustrating the configuration of the color processing apparatus according to the fifth embodiment. The difference from the color processing apparatus shown in FIG.

上記の構成において、カラーパッチを印刷し、カラーパッチを測色した結果に基づき、RGB値に対するL*a*b*値を予測してプロファイルを作成する一連の動作について説明する。   A series of operations for creating a profile by predicting L * a * b * values for RGB values based on the results of printing a color patch and measuring the color patch in the above configuration will be described.

まず、CPU 101の指令により、HDD 105に格納されたプロファイル作成アプリケーションが起動される。プロファイルアプリケーションは、図25に示すユーザインタフェイスをカラーモニタ107に表示する。   First, a profile creation application stored in the HDD 105 is activated by a command from the CPU 101. The profile application displays the user interface shown in FIG.

図25に示すユーザインタフェイスには、ユーザが、カラーパッチの印刷を指示するためのパッチ印刷ボタン2201、カラーパッチの測色を指示するためのパッチ測色ボタン2202、プロファイルを保存するためのプロファイル保存ボタン2203、および、プロファイル作成アプリケーションを終了させるための終了ボタン2204がある。   The user interface shown in FIG. 25 includes a patch print button 2201 for the user to instruct color patch printing, a patch colorimetry button 2202 for instructing color measurement of the color patch, and a profile for saving the profile. There is a save button 2203 and an end button 2204 for ending the profile creation application.

プロファイル作成アプリケーションは、ユーザがパッチ印刷ボタン2201を押すとプリンタ109にパッチ画像を印刷させる。続いて、ユーザがパッチ画像を測色器115の然るべき位置にセットした後、測色ボタン2202を押すと、測色器115により測定されたカラーパッチの分光反射率がUSBコントローラ108を介してメインメモリ102に格納される。   The profile creation application causes the printer 109 to print a patch image when the user presses the patch print button 2201. Subsequently, when the user sets the patch image at an appropriate position on the colorimeter 115 and then presses the colorimeter button 2202, the spectral reflectance of the color patch measured by the colorimeter 115 is changed to the main via the USB controller 108. Stored in the memory 102.

プロファイル作成アプリケーションは、メインメモリ102に格納されたカラーパッチの分光反射率をL*a*b*値へ変換し、変換したL*a*b*値をカラーパッチのRGB値と組み合わせてメインメモリ102に格納する。図26は測色データのL*a*b*値とRGB値と組み合わせのデータ形式例を示す図である。この後、プロファイル作成アプリケーションは、プロファイル保存ボタン2203をイネーブル(ユーザが押せる状態)にする。プロファイル保存ボタン2203のイネーブル後、ユーザがプロファイル作成ボタン2203を押すと、後述する手順によりプリンタ109のプロファイルを作成する。   The profile creation application converts the spectral reflectance of the color patches stored in the main memory 102 into L * a * b * values, and combines the converted L * a * b * values with the RGB values of the color patches. Store in 102. FIG. 26 is a diagram showing a data format example of a combination of L * a * b * values and RGB values of colorimetric data. Thereafter, the profile creation application enables the profile saving button 2203 (a state that the user can press). When the user presses the profile creation button 2203 after enabling the profile save button 2203, the profile of the printer 109 is created according to the procedure described later.

プロファイル作成アプリケーションは、ユーザが終了ボタン2204を押すと処理を終了し、メインメモリ102の作業用メモリ領域およびアプリケーションメモリ領域がクリアされる。   When the user presses the end button 2204, the profile creation application ends processing, and the working memory area and application memory area of the main memory 102 are cleared.

[プロファイルの作成動作]
図27は色予測用のBスプライン体の係数および基底関数を算出する処理を示すフローチャートである。なお、色予測用のBスプライン体は上述した式(13)で表される。
[Profile creation operation]
FIG. 27 is a flowchart showing a process for calculating coefficients and basis functions of a B-spline body for color prediction. Note that the B-spline body for color prediction is expressed by the above-described equation (13).

まず、図26に示すデータ構造で表される測色データから、RGB値とL*a*b*値の対応関係を、すべての組について取得する(S2401)。以後、RGB値とL*a*b*値の対応関係を、i番目のRGB値をrri、ggi、bbi、L*a*b*値をλi、ai、biと説明する。 First, from the colorimetric data represented by the data structure shown in FIG. 26, the correspondence between RGB values and L * a * b * values is acquired for all sets (S2401). Hereinafter, the correspondence between RGB values and L * a * b * values is described as i-th RGB values as rr i , gg i , bb i , and L * a * b * values as λ i , a i , and b i. To do.

次に、測色データのデータ総数(パッチ総数)n3に対して節点数をn-1とし、節点に基づき基底関数を算出し、メインメモリ102に記憶する(S2402)。図26に示す例はパッチ数125だから節点数は4になる。節点が定まった後の基底関数の算出には、実施例1で説明したように、一般的なDeBoor-Coxのアルゴリズムを用いる。以下、基底関数は何れも四節点の三位のBスプライン基底として説明する。 Then, the number of nodes and n-1 with respect to the total number of data (patches total) n 3 of colorimetric data, calculates the basis functions on the basis of the node is stored in the main memory 102 (S2402). Since the example shown in FIG. 26 has 125 patches, the number of nodes is 4. As described in the first embodiment, a general DeBoor-Cox algorithm is used to calculate the basis function after the node is determined. In the following, the basis functions will be described as B-spline bases with three positions of four nodes.

次に、算出した基底関数と、図26に示す測色データから取得した、RGB値とL*a*b*値の対応関係を示す対応データを用いて、行列方程式f=MCを、L*成分、a*成分、b*成分それぞれについてLU分解を用いて解き、Bスプライン体の各係数を算出する(S2403)。以下、上記方程式による係数算出について詳しく説明する。   Next, using the calculated basis function and the correspondence data indicating the correspondence between the RGB value and the L * a * b * value obtained from the color measurement data shown in FIG. 26, the matrix equation f = MC is expressed as L * Each component, a * component, and b * component are solved using LU decomposition, and each coefficient of the B-spline body is calculated (S2403). Hereinafter, the coefficient calculation by the above equation will be described in detail.

まず、行列Mのs行t列成分mstを次のように算出する。
mst = Nri(rrs)Ngj(ggs)Nbk(bbs) …(29)
ここで、t=25(I - 1) + 5(j - 1) + k
i, j, kは1から5までの整数
First, the s-row t-column component m st of the matrix M is calculated as follows.
m st = N ri (rr s ) N gj (gg s ) N bk (bb s )… (29)
Where t = 25 (I-1) + 5 (j-1) + k
i, j, k are integers from 1 to 5

なお、tとi、j、kの関係は、節点数と基底関数の位数によって変化する。例えば、三位のBスプライン基底で六節点の場合、t=49(I - 1) + 7(j - 1) + kという関係になる。   Note that the relationship between t and i, j, k varies depending on the number of nodes and the order of basis functions. For example, in the case of a six-node B-base spline at the third position, the relationship is t = 49 (I-1) +7 (j-1) + k.

次に、係数cλijk、caijk、cbijkの算出をそれぞれ説明する。まず、係数cλijkを算出するため、次の行列方程式をLU分解を用いて解く。
fλ = [λ1, λ2, …, λ124, λ125]
cλ= [cλ111, cλ112, …, cλ115, cλ121,
…, cλ155, cλ211, …, cλ554, cλ555] …(30)
fλ= M・cλ
Next, calculation of the coefficients cλ ijk , ca ijk , and cb ijk will be described. First, in order to calculate the coefficient cλ ijk , the following matrix equation is solved using LU decomposition.
fλ = [λ 1 , λ 2 ,…, λ 124 , λ 125 ]
cλ = [cλ 111 , cλ 112 ,…, cλ 115 , cλ 121 ,
…, Cλ 155 , cλ 211 ,…, cλ 554 , cλ 555 ]… (30)
fλ = M ・ cλ

次に、係数caijkを算出するため、次の行列方程式をLU分解を用いて解く。
fa = [a1, a2, …, a124, a125]
ca = [ca111, ca112, …, ca115, ca121,
…, ca155, ca211, …, ca554, ca555] …(31)
fa = M・ca
Next, in order to calculate the coefficient ca ijk , the following matrix equation is solved using LU decomposition.
fa = [a 1 , a 2 ,…, a 124 , a 125 ]
ca = [ca 111 , ca 112 ,…, ca 115 , ca 121 ,
…, Ca 155 , ca 211 ,…, ca 554 , ca 555 ]… (31)
fa = M ・ ca

次に、係数cbijkを算出するため、次の行列方程式をLU分解を用いて解く。
fb = [b1, b2, …, b124, b125]
cb = [cb111, cb112, …, cb115, cb121,
…, cb155, cb211, …, cb554, cb555] …(32)
fb = M・cb
Next, in order to calculate the coefficient cb ijk , the following matrix equation is solved using LU decomposition.
fb = [b 1 , b 2 ,…, b 124 , b 125 ]
cb = [cb 111 , cb 112 ,…, cb 115 , cb 121 ,
…, Cb 155 , cb 211 ,…, cb 554 , cb 555 ]… (32)
fb = M ・ cb

そして、算出した係数をメインメモリ102に記憶する(S2404)。   Then, the calculated coefficient is stored in the main memory 102 (S2404).

図28は色予測用のBスプライン体を用いて再現色を予測してプロファイルを作成する処理を説明するフローチャートである。   FIG. 28 is a flowchart for explaining a process for creating a profile by predicting a reproduction color using a B-spline body for color prediction.

まず、作業用のメモリ領域確保し、変数を初期化するなど、初期化動作を行い(S601)、然るべき順序に従って、プロファイルのLUT格子点に相当するRGB値を一つ取得し(S602)、メインメモリ102から色予測用のBスプライン体の基底関数および係数値を取得し、下式を用いて、RGB値で与えられる色を印刷した場合にどのような色になるかをL*a*b*値として予測する(S603)。   First, an initializing operation such as allocating a working memory area and initializing variables is performed (S601), and one RGB value corresponding to the LUT grid point of the profile is acquired according to the appropriate order (S602). Obtain the basis function and coefficient value of the B-spline body for color prediction from the memory 102, and use the following formula to determine what color it will be when the color given by the RGB value is printed L * a * b * Predicted as a value (S603).

λ = Σi=1 5Σj=1 5Σk=1 5ijkNri(rr)Ngj(gg)Nbk(bb)
a = Σi=1 5Σj=1 5Σk=1 5caijkNri(rr)Ngj(gg)Nbk(bb) …(33)
b = Σi=1 5Σj=1 5Σk=1 5cbijkNri(rr)Ngj(gg)Nbk(bb)
ここで、rr、gg、bbはRGB値
λ、a、bはL*a*b*値
NrはR軸方向での基底関数
NgはG軸方向での基底関数
NbはB軸方向での基底関数
ijk、caijk、cbijkは係数
Nr、Ng、Nbに付属するサフィクスi、j、kは
それぞれの軸に対する基底における基底関数番号
λ = Σ i = 1 5 Σ j = 1 5 Σ k = 1 5ijk N ri (rr) N gj (gg) N bk (bb)
a = Σ i = 1 5 Σ j = 1 5 Σ k = 1 5 ca ijk N ri (rr) N gj (gg) N bk (bb)… (33)
b = Σ i = 1 5 Σ j = 1 5 Σ k = 1 5 cb ijk N ri (rr) N gj (gg) N bk (bb)
Where rr, gg, and bb are RGB values
λ, a, b are L * a * b * values
N r is the basis function in the R-axis direction
N g is the basis function in the G-axis direction
N b is the basis function in the B-axis direction
ijk , ca ijk , cb ijk are coefficients
Suffixes i, j, k attached to N r , N g , N b are
Basis function number in the basis for each axis

次に、LUT格子点位置に対応するメモリアドレス(メインメモリ102)に、予測したL*a*b*値を格納し(S604)、LUT格子点の総てを予測したか否かを判断し(S605)、LUT格子点の総てを予測するまでステップS602からS604を繰り返す。   Next, the predicted L * a * b * value is stored in the memory address (main memory 102) corresponding to the LUT grid point position (S604), and it is determined whether all the LUT grid points have been predicted. (S605), steps S602 to S604 are repeated until all of the LUT lattice points are predicted.

LUT格子点の総てを予測すると、メインメモリ102に格納されたLUTデータをプロファイルデータとしてメインメモリ102の所定領域に格納し(S606)、作業用メモリを解放するなど終了動作を行い(S607)、プロファイルの作成処理を終了する。   When all the LUT lattice points are predicted, the LUT data stored in the main memory 102 is stored as profile data in a predetermined area of the main memory 102 (S606), and the termination operation such as releasing the working memory is performed (S607). Then, the profile creation process ends.

図29はプロファイルのデータ構造を示す図で、RGB色空間の格子点の色座標と、その格子点が再現するL*a*b*色空間の座標値の対応を記す。データ構造の先頭には、R/G/B値のステップを記述し、この後に、各格子点に対応するL*a*b*値の色座標がR、G、Bの順でネストされ記述されている。   FIG. 29 is a diagram showing the data structure of the profile, and shows the correspondence between the color coordinates of the grid points in the RGB color space and the coordinate values of the L * a * b * color space reproduced by the grid points. The R / G / B value step is described at the beginning of the data structure, and the color coordinates of the L * a * b * values corresponding to each grid point are nested and described in the order of R, G, B. Has been.

このように、値の変化のトレンドを自然に反映して滑らかな変化で色を算出することが可能なBスプラインを応用することで、少ないカラーパッチ数の測色でも、正確な色予測を実現することができる。   In this way, accurate color prediction is realized even with color measurement with a small number of color patches by applying the B-spline, which can naturally reflect the trend of value changes and calculate colors with smooth changes. can do.

[変形例]
●ソリッド表現における、Bスプライン基底関数の他の区分多項式での置き換え
実施例5では、ソリッド表現における基底関数としてBスプラインを用いる例を説明した。しかし、基底関数としては有理(rational) Bスプライン、不均一有理(non uniform rational) Bスプライン、ベジェ(Bezier)、有理ベジェ(Rational Bezier)など、あらゆる区分的関数を用いることができる。
[Modification]
Replacement of B-spline basis functions with other piecewise polynomials in solid representation In the fifth embodiment, an example in which B-splines are used as basis functions in solid representation has been described. However, as a basis function, any piecewise function such as rational B spline, non uniform rational B spline, Bezier, rational Bezier, etc. can be used.

●ソリッド表現における各基底の節点数
実施例5では、各基底の節点数が同一であるとして説明したが、基底ごとに節点数を変更することも可能である。
In the fifth embodiment, the number of nodes in each base is described as being the same. However, the number of nodes in each base may be changed.

●予測する色の次元数
実施例5では、RGB三次元空間からL*a*b*三次元空間の物理刺激値を予測したが、予測する色の次元数に何ら拘束はない。
In the fifth embodiment, the physical stimulus value in the L * a * b * three-dimensional space is predicted from the RGB three-dimensional space, but there is no restriction on the predicted color dimension.

●ソリッド表現の拡張
実施例5では、予測元の色空間としてRGB三次元色空間のソリッド表現を用いたが、この予測元の色空間の次元数に何ら拘束はない。
Expansion of Solid Representation In Example 5, the solid representation of the RGB three-dimensional color space was used as the color space of the prediction source, but there is no restriction on the number of dimensions of the color space of the prediction source.

[他の実施例]
なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。
[Other embodiments]
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, and a printer), and a device (for example, a copying machine and a facsimile device) including a single device. You may apply to.

また、本発明の目的は、前述した実施例の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施例の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれることは言うまでもない。   Also, an object of the present invention is to supply a storage medium (or recording medium) on which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or Needless to say, this can also be achieved by the MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれることは言うまでもない。   Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. Needless to say, the CPU of the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.

本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。   When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the flowcharts described above.

四面体への六分割を模式的に示す図、A diagram schematically showing six divisions into tetrahedrons, ガマット境界近辺で色の変化が急峻になる様子を示す図、A figure showing how the color change becomes steep near the gamut boundary, 色処理装置の構成例を示すブロック図、Block diagram showing a configuration example of a color processing device, プレビューを行う際のユーザインタフェイスの一例を示す図、A diagram showing an example of a user interface when previewing, 画像プレビューアプリケーションの動作を説明する状態遷移図、State transition diagram explaining the operation of the image preview application, プロファイルのデータ構造をRGB色空間で模式的に示す図、A diagram schematically showing the profile data structure in RGB color space, プロファイルのデータ構造を説明する図、A diagram explaining the data structure of the profile, 色算出用B-スプライン体の係数および基底関数の算出処理を説明するフローチャート、A flowchart for explaining the calculation processing of the coefficient and basis function of the B-spline body for color calculation, R軸の基底関数Nrを示す図、A diagram showing the R axis basis function N r , B-スプライン体の算出結果をL*a*b*空間における分布として表現した様子を示す図、A figure showing how the B-spline calculation results are expressed as a distribution in L * a * b * space. 指定された画像位置のRGB値とL*a*b*値の表示処理を説明するフローチャート、A flowchart for explaining display processing of RGB values and L * a * b * values at a specified image position; プレビュー用画像データの生成処理を説明するフローチャート、A flowchart for explaining a process of generating preview image data; 色修正してプロファイルを作成するためのユーザインタフェイスを示す図、Figure showing a user interface for color correction and creating a profile 色再現編集アプリケーションの動作を説明する状態遷移図、State transition diagram explaining the operation of the color reproduction editing application, 色編集データのデータ構造を説明する図、The figure explaining the data structure of color edit data, ユーザインタフェイスの操作に応じて三次元表示領域に表示される図形を示す図、The figure which shows the figure displayed on a three-dimensional display area according to operation of a user interface, ユーザインタフェイスの操作に応じて三次元表示領域に表示される図形を示す図、The figure which shows the figure displayed on a three-dimensional display area according to operation of a user interface, ユーザインタフェイスの操作に応じて三次元表示領域に表示される図形を示す図、The figure which shows the figure displayed on a three-dimensional display area according to operation of a user interface, 色算出用B-スプライン体に対する係数および基底関数を算出処理を説明するフローチャート、A flowchart for explaining processing for calculating coefficients and basis functions for a B-spline body for color calculation; 色算出用のB-スプライン体を用いたプロファイルの作成を説明するフローチャート、A flowchart for explaining creation of a profile using a B-spline body for color calculation; 色編集データについて、RGB値、L*a*b*値またはその両方を修正する処理を説明するフローチャート、Flowchart explaining processing for correcting RGB values, L * a * b * values, or both for color editing data, 色域外のL*a*b*値が指定された場合に目標色を設定する方法を説明する図、A diagram explaining how to set the target color when an L * a * b * value outside the color gamut is specified, 実施例2における色算出用のBスプライン体の係数および基底関数の算出処理を説明するフローチャート、Flowchart explaining the calculation processing of the coefficient and basis function of the B-spline body for color calculation in Example 2, 一次元のスプライン関数に発生する振動を説明する図、A diagram explaining vibrations that occur in a one-dimensional spline function, 実施例5の色処理装置の構成例を示すブロック図、Block diagram showing a configuration example of a color processing device of Example 5, プロファイル作成アプリケーションが表示するユーザインタフェイスの一例を示す図、The figure which shows an example of the user interface which a profile creation application displays, 測色データのL*a*b*値とRGB値と組み合わせのデータ形式を示す図、A diagram showing the data format of the combination of L * a * b * values and RGB values of colorimetric data, 色予測用のBスプライン体の係数および基底関数を算出する処理を示すフローチャート、A flowchart showing processing for calculating coefficients and basis functions of a B-spline body for color prediction, 色予測用のBスプライン体を用いて再現色を予測してプロファイルを作成する処理を説明するフローチャート、A flowchart for explaining a process of creating a profile by predicting a reproduction color using a B-spline body for color prediction; プロファイルのデータ構造を示す図である。It is a figure which shows the data structure of a profile.

Claims (18)

第一の表色系で表される色信号値から第二の表色系の色信号値を算出する色処理方法であって、
前記第一の表色系の次元数と同じ重度の、区分的多項式を基底関数とする多重総和演算を用いて前記第二の表色系の色信号値を算出する第一の算出ステップを有することを特徴とする色処理方法。
A color processing method for calculating a color signal value of a second color system from a color signal value represented by a first color system,
A first calculation step of calculating a color signal value of the second color system using a multiple sum operation having a piecewise polynomial as a basis function and having the same number of dimensions as the first color system; The color processing method characterized by the above-mentioned.
前記基底関数は、B-スプライン、有理B-スプライン、不均一有理B-スプライン、ベジェまたは有理ベジェであることを特徴とする請求項1に記載された色処理方法。   2. The color processing method according to claim 1, wherein the basis function is a B-spline, a rational B-spline, a non-uniform rational B-spline, a Bezier, or a rational Bezier. 前記多重総和演算における各総和項の総和演算数はすべて同一であることを特徴とする請求項1または請求項2に記載された色処理方法。   3. The color processing method according to claim 1, wherein the summation operation number of each summation term in the multiple summation operation is the same. 前記多重総和演算における各総和項の総和演算数は少なくとも一つが異なることを特徴とする請求項1から請求項3の何れかに記載された色処理方法。   4. The color processing method according to claim 1, wherein at least one sum operation number of each sum term in the multiple sum operation is different. さらに、前記第一の表色系の各次元上で定義される前記多重総和演算の基底関数値を前記第一の表色系の各次元の値から算出する第二の算出ステップと、
算出した前記基底関数値を使用する前記多重総和演算によって、前記第二の表色系の色信号値を算出する第三の算出ステップとを有することを特徴とする請求項1から請求項4の何れかに記載された色処理方法。
A second calculation step of calculating a basis function value of the multiple sum operation defined on each dimension of the first color system from a value of each dimension of the first color system;
5. The method according to claim 1, further comprising a third calculation step of calculating a color signal value of the second color system by the multiple sum operation using the calculated basis function value. The color processing method described in any one.
さらに、前記第一の表色系で表される色信号値に変換を施す第一の変換ステップと、
前記変換後の色信号値の空間の基本軸上で定義される前記多重総和演算の基底関数値を前記変換後の色信号値から算出する第二の算出ステップと、
算出した前記基底関数値を使用する前記多重総和演算によって、前記第二の表色系の色信号値を算出する第三の算出ステップとを有することを特徴とする請求項1から請求項4の何れかに記載された色処理方法。
A first conversion step for converting the color signal value represented by the first color system;
A second calculation step of calculating a basis function value of the multiple sum calculation defined on a basic axis of the space of the color signal value after the conversion from the color signal value after the conversion;
5. The method according to claim 1, further comprising a third calculation step of calculating a color signal value of the second color system by the multiple sum operation using the calculated basis function value. The color processing method described in any one.
前記第一の表色系で表される複数の色信号値に対し、算出されるべき前記第二の表色系で表される色信号値を定めた組から、前記多重総和演算の係数を求めることを特徴とする請求項5に記載された色処理方法。   For a plurality of color signal values represented by the first color system, a coefficient of the multiple sum operation is obtained from a set that defines the color signal values represented by the second color system to be calculated. 6. The color processing method according to claim 5, wherein the color processing method is obtained. さらに、前記第一の表色系で表される複数の色信号値に対し、算出されるべき前記第二の表色系で表される色信号値を定めた組の、前記第一の表色系で表される複数の色信号値に前記変換を施す第二の変換ステップと、
前記第二の変換ステップで変換後の色信号値の組から前記多重総和演算の係数を求めることを特徴とする請求項6に記載された色処理方法。
Further, the first table of a set of color signal values represented by the second color system to be calculated for a plurality of color signal values represented by the first color system A second conversion step for performing the conversion on a plurality of color signal values represented by a color system;
7. The color processing method according to claim 6, wherein a coefficient of the multiple sum calculation is obtained from a set of color signal values converted in the second conversion step.
前記多重総和演算の係数は前記第二の表色系に応じた次元を有することを特徴とする請求項7に記載された色処理方法。   8. The color processing method according to claim 7, wherein the coefficient of the multiple sum calculation has a dimension corresponding to the second color system. 前記第二の表色系の次元ごとに総和演算スカラ係数の組を有し、前記第二の表色系の色信号値を算出する際は前記第二の表色系の次元ごとに総和演算を行うことを特徴とする請求項8に記載された色処理方法。   A sum operation scalar coefficient set is provided for each dimension of the second color system, and when calculating the color signal value of the second color system, the sum operation is performed for each dimension of the second color system. 9. The color processing method according to claim 8, wherein: 第一の表色系で表される色信号値から第二の表色系の色信号値を算出する色処理装置であって、
前記第一の表色系の次元数と同じ重度の、区分的多項式を基底関数とする多重総和演算を用いて前記第二の表色系の色信号値を算出する計算手段を有することを特徴とする色処理装置。
A color processing device that calculates a color signal value of a second color system from a color signal value represented by a first color system,
It has a calculation means for calculating a color signal value of the second color system using a multiple sum operation having a piecewise polynomial as a basis function and having the same number of dimensions as the first color system. Color processing device.
所定の表色系の色信号値を算出する色処理方法であって、
第一の表色系の次元数と同じ多重度の区分的多項式を基底関数とする多重総和演算による変換式を設定する設定ステップと、
前記第一の表色系で表される複数の色信号値と、それら色信号値に対して算出されるべき第二の表色系の複数の色信号値との組み合わせを定めたデータに基づき、前記組み合わせの並びに近似する変換式、あるいは、前記組み合わせを結ぶ曲面集合、多面体集合または超多面体集合を平滑化する変換式に対応する前記区分的多項式の係数を求める第一の計算ステップと、
前記多重総和演算を用いて、前記第一の表色系で表現される色信号値に対応する前記第二の表色系の色信号値を算出する第二の計算ステップとを有することを特徴とする色処理方法。
A color processing method for calculating a color signal value of a predetermined color system,
A setting step for setting a conversion formula by a multiple sum operation using a piecewise polynomial of the same multiplicity as the number of dimensions of the first color system as a basis function;
Based on data defining a combination of a plurality of color signal values represented by the first color system and a plurality of color signal values of the second color system to be calculated for the color signal values A first calculation step for obtaining a coefficient of the piecewise polynomial corresponding to a conversion equation that approximates the combination of the combinations, or a conversion equation that smoothes a curved surface set, polyhedron set, or hyperpolyhedron set connecting the combinations;
A second calculation step of calculating a color signal value of the second color system corresponding to a color signal value expressed in the first color system using the multiple sum operation. Color processing method.
前記複数の色信号値の組み合わせごとに重みを付けて、前記係数を算出することを特徴とする請求項12に記載された色処理方法。   13. The color processing method according to claim 12, wherein the coefficient is calculated by assigning a weight to each combination of the plurality of color signal values. 前記基底関数は、Bスプライン、有理Bスプライン、不均一有理Bスプライン、ベジェ、有理ベジェの何れかであることを特徴とする請求項12または請求項13に記載された色処理方法。   14. The color processing method according to claim 12, wherein the basis function is any one of a B spline, a rational B spline, a non-uniform rational B spline, a Bezier, and a rational Bezier. 前記係数は前記第二の表色系に応じた次元を有することを特徴とする請求項12から請求項14の何れかに記載された色処理方法。   15. The color processing method according to claim 12, wherein the coefficient has a dimension corresponding to the second color system. 所定の表色系の色信号値を算出する色処理装置であって、
第一の表色系の次元数と同じ多重度の区分的多項式を基底関数とする多重総和演算による変換式を設定する設定手段と、
前記第一の表色系で表される複数の色信号値と、それら色信号値に対して算出されるべき第二の表色系の複数の色信号値との組み合わせを定めたデータに基づき、前記組み合わせの並びに近似する変換式、あるいは、前記組み合わせを結ぶ曲面集合、多面体集合または超多面体集合を平滑化する変換式に対応する前記区分的多項式の係数を求める第一の計算手段と、
前記多重総和演算を用いて、前記第一の表色系で表現される色信号値に対応する前記第二の表色系の色信号値を算出する第二の計算手段とを有することを特徴とする色処理装置。
A color processing device for calculating a color signal value of a predetermined color system,
A setting means for setting a conversion formula by multiple sum operation with a piecewise polynomial having the same multiplicity as the number of dimensions of the first color system as a basis function;
Based on data defining a combination of a plurality of color signal values represented by the first color system and a plurality of color signal values of the second color system to be calculated for the color signal values A first calculation means for obtaining a coefficient of the piecewise polynomial corresponding to a conversion equation that approximates the combination of the combinations, or a conversion equation that smoothes a curved surface set, polyhedron set, or hyperpolyhedron set connecting the combinations;
And second calculating means for calculating a color signal value of the second color system corresponding to a color signal value expressed in the first color system using the multiple sum operation. Color processing device.
画像処理装置を制御して、請求項1から請求項10および請求項12から請求項15の何れかに記載された色処理を実行することを特徴とするプログラム。   16. A program that controls an image processing apparatus to execute the color processing according to any one of claims 1 to 10 and claims 12 to 15. 請求項17に記載されたプログラムが格納されたことを特徴とする記録媒体。   18. A recording medium in which the program according to claim 17 is stored.
JP2004362055A 2003-12-15 2004-12-14 Color processing apparatus and method Expired - Fee Related JP4095609B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004362055A JP4095609B2 (en) 2003-12-15 2004-12-14 Color processing apparatus and method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2003416616 2003-12-15
JP2004264598 2004-09-10
JP2004362055A JP4095609B2 (en) 2003-12-15 2004-12-14 Color processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2006109394A true JP2006109394A (en) 2006-04-20
JP4095609B2 JP4095609B2 (en) 2008-06-04

Family

ID=36378543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004362055A Expired - Fee Related JP4095609B2 (en) 2003-12-15 2004-12-14 Color processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4095609B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010193385A (en) * 2009-02-20 2010-09-02 Canon Inc Color adjusting apparatus and color adjusting method
US8941679B2 (en) 2007-06-27 2015-01-27 Thomson Licensing Method of creating a gamut boundary descriptor preserving the discontinuities of an actual gamut surface
JP2017078990A (en) * 2015-10-21 2017-04-27 コニカミノルタ株式会社 Profile generation device, profile generating program, and color matching method
CN108986180A (en) * 2018-06-07 2018-12-11 阿里巴巴集团控股有限公司 A kind of generation method of palette, device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8941679B2 (en) 2007-06-27 2015-01-27 Thomson Licensing Method of creating a gamut boundary descriptor preserving the discontinuities of an actual gamut surface
JP2010193385A (en) * 2009-02-20 2010-09-02 Canon Inc Color adjusting apparatus and color adjusting method
JP2017078990A (en) * 2015-10-21 2017-04-27 コニカミノルタ株式会社 Profile generation device, profile generating program, and color matching method
CN108986180A (en) * 2018-06-07 2018-12-11 阿里巴巴集团控股有限公司 A kind of generation method of palette, device and electronic equipment

Also Published As

Publication number Publication date
JP4095609B2 (en) 2008-06-04

Similar Documents

Publication Publication Date Title
JP3664364B2 (en) Color conversion method
JP2008199634A (en) Color conversion device, color conversion method, color change program and recording medium
US20080111827A1 (en) Color-information processing method, and program
US7440136B2 (en) Color processing apparatus and method
JP4095609B2 (en) Color processing apparatus and method
JP2009004862A (en) Image processing apparatus
JP2009188948A (en) Image processing apparatus and image processing method
JP2003324624A (en) Method, apparatus and program for color conversion definition correction
JP2006173825A (en) Image processing apparatus and method thereof
JP6895791B2 (en) Color processing equipment, color processing method
JP5074659B2 (en) Color conversion definition creation method, color conversion definition creation device, and color conversion definition creation program
JPH07203235A (en) Method and processor for color picture
JP2005176200A (en) Color signal converting apparatus and method thereof
JP2006303785A (en) Image processing apparatus and method
JP2005175917A (en) Color reproduction information generating apparatus
JP3910323B2 (en) Profile creation method and profile creation apparatus
JP3929060B2 (en) Color processing method and color processing apparatus
JP2008072477A (en) Apparatus and method for color processing
JP4423016B2 (en) Image processing apparatus, image processing method, storage medium, and program
JP4262212B2 (en) Color processing method and apparatus
JP2006033245A (en) Color reproduction information generating device and smoothing designating information generating device
JP2004048588A (en) Method, device and program for creating color conversion definition
JP2006081024A (en) Color processing apparatus and method
JP3866129B2 (en) Color conversion definition creation method, color conversion definition creation device, and color conversion definition creation program
JP2006128815A (en) Image processor and processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070312

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070713

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070906

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: 20080222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080307

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

Free format text: PAYMENT UNTIL: 20110314

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4095609

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120314

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130314

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140314

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees