JP2007189487A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2007189487A
JP2007189487A JP2006005719A JP2006005719A JP2007189487A JP 2007189487 A JP2007189487 A JP 2007189487A JP 2006005719 A JP2006005719 A JP 2006005719A JP 2006005719 A JP2006005719 A JP 2006005719A JP 2007189487 A JP2007189487 A JP 2007189487A
Authority
JP
Japan
Prior art keywords
color
correction
data
color data
grid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006005719A
Other languages
Japanese (ja)
Inventor
Masanori Ishida
正紀 石田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006005719A priority Critical patent/JP2007189487A/en
Publication of JP2007189487A publication Critical patent/JP2007189487A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor for performing the flexible color correction of an image at high speed. <P>SOLUTION: The image processor for for automatically correcting colors of an image represented in a digital color space having N colors includes: a memory; a general processor which derives (n) grid correction color data representing correction colors corresponding to (n) (n<N) grid colors to generate a three-dimensional color conversion table holding the grid correction color data by the grid colors in the memory; and a dedicated processor which acquires original color data stored in the memory, acquires unit data composed of a plurality of grid correction color data corresponding to a plurality of grid colors close to the color of a pixel of an interest from the three-dimensional color conversion table based upon the original color data, and derives correction color data corresponding to the original color data by linear interpolation operation using the unit data to generate a corrected image in which colors of respective pixels are represented with the correction color data. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は画像処理装置に関し、特に3次元色変換テーブルを用いた画像の色補正に関する。   The present invention relates to an image processing apparatus, and more particularly to color correction of an image using a three-dimensional color conversion table.

写真画像の色補正では、トーンカーブ変換やレベル変換によるダイナミックレンジの改善、明るさやコントラストの調整、色かぶり除去のためのカラーバランス調整、特定の色相に対する色味の変換などの様々な色変換が行われる。これらの色変換も、それらを組み合わせた色変換も、全て変換前の色を表すデータ(以下、元色データという。)が何らかの変換規則によって別の色を表すデータ(以下、補正色データという。)に置き換わる処理である。従来、補正前の色に対応する補正後の色を表す補正色データを保持する3次元色変換テーブルを用いた色補正が知られている。3次元色変換テーブルを用いた色補正では、注目画素毎に補正色データをメモリから読み込むだけで、注目画素の色を補正した結果の色を表す補正色データを取得することができるため、高速な色補正が可能である。また、3次元色変換テーブルを用いた色補正では、色成分毎に補正結果を求める必要がないため、1次元色変換テーブルを用いた色補正に比べても高速な色補正が可能である。しかし、3次元色変換テーブルで全ての色に対応する補正色データが保持される場合、3次元色変換テーブルのデータ量が膨大になる。特許文献1には色空間の格子点に対応する色(以下、色空間の格子点に対応する色をグリッド色という。)についてのみ3次元色変換テーブルで補正色データを保持しておき(以下、3次元色変換テーブルで保持される補正色データをグリッド補正色データという。)、グリッド色でない任意の色に対応する補正色データは線形補間演算によって求める技術が開示されている。   In color correction of photographic images, various color conversions such as dynamic range improvement by tone curve conversion and level conversion, brightness and contrast adjustment, color balance adjustment for color cast removal, and color conversion for specific hues, etc. Done. Both of these color conversions and color conversions combining them are data (hereinafter referred to as correction color data) in which data representing the color before conversion (hereinafter referred to as original color data) represents another color according to some conversion rule. ). Conventionally, color correction using a three-dimensional color conversion table that holds corrected color data representing a corrected color corresponding to a color before correction is known. In color correction using a three-dimensional color conversion table, correction color data representing the color resulting from correcting the color of the target pixel can be acquired simply by reading the correction color data from the memory for each target pixel. Color correction is possible. In color correction using a three-dimensional color conversion table, it is not necessary to obtain a correction result for each color component, so that color correction can be performed at a higher speed than color correction using a one-dimensional color conversion table. However, when correction color data corresponding to all colors is held in the three-dimensional color conversion table, the data amount of the three-dimensional color conversion table becomes enormous. In Patent Document 1, correction color data is held in a three-dimensional color conversion table only for colors corresponding to grid points in the color space (hereinafter, colors corresponding to grid points in the color space are referred to as grid colors) (hereinafter referred to as “color colors”). The correction color data held in the three-dimensional color conversion table is referred to as grid correction color data.), And a technique for obtaining correction color data corresponding to an arbitrary color other than the grid color by linear interpolation is disclosed.

ところで、写真画像の色を自動補正するためには、例えば色かぶりした失敗写真について照明光の色温度に応じてカラーバランスを調整したり、写真画像の明るさに応じて輝度を調整する必要がある。写真画像の画質に応じて色を自動補正する目的で3次元色変換テーブルを利用するためには、写真画像の画質に応じて選択可能な多数の3次元色変換テーブルを予め用意しておく必要がある。しかし、データ量の多い3次元色変換テーブルを画像処理装置に多数保持させることは、記憶容量の限られた条件下では現実的ではない。また、補正アルゴリズムの変更や補正量の変更に合わせて3次元色変換テーブルを更新する必要があるため、設計変更が容易でない。   By the way, in order to automatically correct the color of a photographic image, for example, it is necessary to adjust the color balance according to the color temperature of the illumination light or to adjust the luminance according to the brightness of the photographic image for a failed photograph with color cast. is there. In order to use the 3D color conversion table for the purpose of automatically correcting the color according to the image quality of the photographic image, it is necessary to prepare in advance a large number of 3D color conversion tables that can be selected according to the image quality of the photographic image. There is. However, it is not realistic to hold a large number of three-dimensional color conversion tables with a large amount of data in the image processing apparatus under conditions where the storage capacity is limited. In addition, the design change is not easy because the three-dimensional color conversion table needs to be updated in accordance with the change of the correction algorithm and the change of the correction amount.

特開平3−244292号公報JP-A-3-244292

本発明は、上記の問題に鑑みて創作されたものであって、画像の柔軟な色補正を高速に実行できる画像処理装置を提供することを目的とする。   The present invention has been created in view of the above problems, and an object thereof is to provide an image processing apparatus capable of performing flexible color correction of an image at high speed.

(1)上記目的を達成するための画像処理装置は、色数がN個であるディジタル色空間で表された画像の色を補正するための画像処理装置であって、メモリと、n(n<N)個のグリッド色に対応する補正色を表すn個のグリッド補正色データを導出し、前記グリッド色毎に前記グリッド補正色データを保持する3次元色変換テーブルを前記メモリ内に生成する汎用プロセッサと、前記メモリに格納されている元画像の注目画素の色を表す元色データを取得し、前記注目画素の色に近い複数の前記グリッド色に対応する複数の前記グリッド補正色データで構成されるユニットデータを前記元色データに基づいて前記3次元色変換テーブルから取得し、前記3次元色変換テーブルから取得した前記ユニットデータを用いた線形補間演算によって前記元色データに対応する補正色データを導出し、前記注目画素に関して前記補正色データを前記メモリに格納する、一連の処理を繰り返すことにより各画素の色が前記補正色データで表された補正画像を生成する専用プロセッサと、を備える。
本発明によると、グリッド色に対応する補正色を表すグリッド補正色データを汎用プロセッサが導出するため、任意の3次元色変換テーブルを生成することができる。すなわち、本発明による画像処理装置は、補正対象画像の画質や目標画質に応じて自由に任意の3次元色変換テーブルを生成することができる。3次元色変換テーブルを用いた画像の色補正は、注目画素の色を表す元色データの取得、注目画素の色に近いグリッド補正色を表すグリッド補正色データのアドレス特定、グリッド補正色データの取得、線形補間演算、補正色データの格納という一連の処理の繰り返しになる。これらの一連の処理機能は、比較的小規模で段数の少ない回路によって実現することができる。また、これらの一連の処理機能をハードウェアで実現すると、データラインの幅を無視した場合には、メモリアクセスは、元色データの取得、グリッド補正色データの取得、補正色データの格納の3回となる。すなわち、これらの一連の処理機能をハードウェアで実現すると、補間演算に必要なメモリアクセス回数が激減する。そこで本発明では、これらの一連の処理機能を専用プロセッサで実現し、画像の色補正を高速化する。したがって、本発明による画像処理装置は、補正対象である元画像の画質や目標画質に応じた画像の柔軟な色補正を高速に実行することができる。
(1) An image processing apparatus for achieving the above object is an image processing apparatus for correcting the color of an image represented in a digital color space having N colors, and includes a memory, n (n <N) N grid correction color data representing correction colors corresponding to the grid colors are derived, and a three-dimensional color conversion table that holds the grid correction color data for each grid color is generated in the memory. A plurality of grid correction color data corresponding to a plurality of grid colors that are close to the color of the target pixel, and obtains original color data representing the color of the target pixel of the original image stored in the memory; Unit data configured is acquired from the three-dimensional color conversion table based on the original color data, and linear interpolation is performed using the unit data acquired from the three-dimensional color conversion table. Correction color data corresponding to the original color data is derived, and the correction color data for the pixel of interest is stored in the memory. By repeating a series of processes, the color of each pixel is represented by the correction color data. A dedicated processor for generating an image.
According to the present invention, since the general-purpose processor derives grid correction color data representing a correction color corresponding to the grid color, an arbitrary three-dimensional color conversion table can be generated. That is, the image processing apparatus according to the present invention can freely generate an arbitrary three-dimensional color conversion table according to the image quality of the correction target image and the target image quality. Color correction of an image using a three-dimensional color conversion table is performed by acquiring original color data representing the color of the target pixel, specifying an address of grid correction color data representing a grid correction color close to the color of the target pixel, A series of processes of acquisition, linear interpolation calculation, and correction color data storage are repeated. These series of processing functions can be realized by a relatively small circuit having a small number of stages. Further, when these series of processing functions are realized by hardware, when the data line width is ignored, the memory access includes acquisition of original color data, acquisition of grid correction color data, and storage of correction color data. Times. That is, if these series of processing functions are realized by hardware, the number of memory accesses necessary for the interpolation calculation is drastically reduced. Therefore, in the present invention, these series of processing functions are realized by a dedicated processor to speed up the color correction of the image. Therefore, the image processing apparatus according to the present invention can perform flexible color correction of an image according to the image quality of the original image to be corrected and the target image quality at high speed.

(2)前記汎用プロセッサは、前記元画像を解析し、各前記グリッド色に対応する各前記グリッド補正色データを前記元画像の解析結果に基づいて導出してもよい。
汎用プロセッサで元画像を解析し、解析結果に応じてグリッド色に対応するグリッド補正色データを導出することにより、補正対象である元画像の画質や目標画質に応じた3次元色変換テーブルを生成することができる。
(2) The general-purpose processor may analyze the original image and derive each grid correction color data corresponding to each grid color based on the analysis result of the original image.
Analyzing the original image with a general-purpose processor and deriving grid correction color data corresponding to the grid color according to the analysis result, thereby generating a three-dimensional color conversion table according to the image quality of the original image to be corrected and the target image quality can do.

(3)前記汎用プロセッサは、複数の色空間で前記元画像を解析してもよい。
複数の色空間で元画像を解析することにより、元画像の画質を緻密に解析することができる。具体的には例えば、輝度空間、RGB色空間及びHSB色空間で元画像を解析することにより、元画像の平均輝度、カラーバランス、平均彩度等を個別に解析することができる。したがって、複数の色空間で元画像を解析し、各グリッド色に対応する各グリッド補正色を解析結果に基づいて導出することにより、元画像の画質に忠実に適合した緻密な3次元色変換テーブルを生成することができる。
(3) The general-purpose processor may analyze the original image in a plurality of color spaces.
By analyzing the original image in a plurality of color spaces, it is possible to precisely analyze the image quality of the original image. Specifically, for example, by analyzing the original image in the luminance space, RGB color space, and HSB color space, the average luminance, color balance, average saturation, and the like of the original image can be individually analyzed. Therefore, by analyzing the original image in a plurality of color spaces and deriving each grid correction color corresponding to each grid color based on the analysis result, a precise three-dimensional color conversion table that faithfully matches the image quality of the original image Can be generated.

(4)前記専用プロセッサは、6面体補間演算モードでは前記線形補間演算としての6面体補間演算によって前記補正色データを導出し、4面体補間演算モードでは前記線形補間演算としての4面体補間演算によって前記補正色データを導出してもよい。前記汎用プロセッサは、前記6面体補間演算モードと前記四面体補間演算モードとの切換を制御してもよい。
6面体補間演算では、4面体補間演算に比べてなめらかな階調の補正画像を生成することができる。4面体補間演算では、6面体補間演算に比べて色変換による色のねじれを抑制することができる。このように6面体補間演算と4面体補間演算とは変換特性が異なる。本発明によると、専用プロセッサが6面体補間演算及び4面体補間演算の両方で補正色データを導出でき、汎用プロセッサが6面体補間演算モード、4面体補間演算モードのいずれによって専用プロセッサを作動させるかを制御できる。この画像処理装置によると、補正画像の目標画質に応じて6面体補間演算と4面体補間演算とを使い分けて画像の色を補正できる。
(4) The dedicated processor derives the correction color data by hexahedral interpolation calculation as the linear interpolation calculation in the hexahedral interpolation calculation mode, and by tetrahedral interpolation calculation as the linear interpolation calculation in the tetrahedral interpolation calculation mode. The correction color data may be derived. The general-purpose processor may control switching between the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode.
In the hexahedral interpolation calculation, it is possible to generate a corrected image with a smooth gradation compared to the tetrahedral interpolation calculation. In the tetrahedral interpolation calculation, color twist due to color conversion can be suppressed as compared with the hexahedral interpolation calculation. Thus, the conversion characteristics are different between the hexahedral interpolation calculation and the tetrahedral interpolation calculation. According to the present invention, the dedicated processor can derive the correction color data by both the hexahedral interpolation calculation and the tetrahedral interpolation calculation, and the general-purpose processor operates in the hexahedral interpolation calculation mode or the tetrahedral interpolation calculation mode. Can be controlled. According to this image processing apparatus, the color of the image can be corrected by properly using the hexahedral interpolation calculation and the tetrahedral interpolation calculation in accordance with the target image quality of the corrected image.

(5)前記汎用プロセッサは、互いに隣り合う8個の前記グリッド色に対応する前記グリッド補正色データで構成される各前記ユニットデータを前記メモリの互いに異なる連続アドレスに格納することによって前記3次元色変換テーブルを生成してもよい。前記専用プロセッサは、前記メモリの連続する複数のアドレスから1つの前記ユニットデータに対応する複数の前記グリッド補正色データを同時に取得するデータ取得手段と、6面体補間演算モードでは前記線形補間演算としての6面体補間演算によって前記補正色データを導出する補間演算手段と、を有してもよい。
本発明によると、専用プロセッサは、6面体補間演算によって補正色データを導出するために必要な8個のグリッド補正色データをメモリから高速に取得することができるため、さらに高速に画像の色を補正することができる。
(5) The general-purpose processor stores the unit data composed of the grid correction color data corresponding to the eight grid colors adjacent to each other at different consecutive addresses of the memory to store the three-dimensional color. A conversion table may be generated. The dedicated processor includes data acquisition means for simultaneously acquiring a plurality of grid correction color data corresponding to one unit data from a plurality of consecutive addresses in the memory, and in the hexahedral interpolation calculation mode, Interpolation calculation means for deriving the correction color data by hexahedral interpolation calculation.
According to the present invention, the dedicated processor can acquire eight pieces of grid correction color data necessary for deriving correction color data by hexahedral interpolation calculation at high speed from the memory. It can be corrected.

(6)前記補間演算手段は、前記6面体補間演算モード及び4面体補間演算モードにおいて、前記ユニットデータを構成している8個の前記グリッド補正色データを前記データ取得手段から順次取得し、前記データ取得手段から取得した前記グリッド補正色データに対応する係数を前記元色データに基づいて生成し、前記ユニットデータを構成している8個の前記グリッド補正色データを、対応する前記係数で重み付けして、成分毎に累積加算することによって前記補正色データを導出する。前記補間演算手段は、前記4面体補間演算モードにおいて、取得した前記ユニットデータのうち前記元色データによって決まる4個の前記グリッド補正色データに対応する前記係数として0を生成する。前記汎用プロセッサは、前記6面体補間演算モードと前記4面体補間演算モードとの切換を制御する。
本発明による画像処理装置は、専用プロセッサが6面体補間演算及び4面体補間演算の両方で補正色データを導出でき、汎用プロセッサが6面体補間演算モード、4面体補間演算モードのいずれによって専用プロセッサを作動させるかを制御できるため、補正画像の目標画質に応じて6面体補間演算又は4面体補間演算のいずれか一方で高速に画像の色を補正できる。
6面体補間演算で必要なグリッド補正色データは8個である。4面体補間演算で必要なグリッド補正色データは4個である。したがって、互いに隣り合う8個のグリッド色に対応する8個のグリッド補正色データがあれば、それら8個のグリッド色を頂点とする6面体の色領域内(以下、8個のグリッド色を頂点とする6面体の色領域をユニットという。)に包含される任意の色に対応する補正色データを6面体補間演算によっても4面体補間演算によっても導出することができる。6面体補間演算モードで作動する回路と4面体補間演算モードで作動する回路の共通化を進めることにより専用プロセッサの回路規模を小さくすることができる。本発明によると、専用プロセッサは、元色データによって決まる4個のグリッド補正色データに対応する係数として0を生成するため、6面体補間演算モードでも4面体補間演算モードでも、8個のグリッド補正色データを取得し、8個のグリッド補正色データと8個の係数とを掛け合わせることができる。このため本発明によると、6面体補間演算及び4面体補間演算が可能な専用プロセッサの製造コストを低減することができる。
(6) The interpolation calculation means sequentially acquires the eight grid correction color data constituting the unit data from the data acquisition means in the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode, A coefficient corresponding to the grid correction color data acquired from the data acquisition unit is generated based on the original color data, and the eight grid correction color data constituting the unit data are weighted with the corresponding coefficient. Then, the correction color data is derived by accumulating each component. The interpolation calculation means generates 0 as the coefficient corresponding to the four grid correction color data determined by the original color data among the acquired unit data in the tetrahedral interpolation calculation mode. The general-purpose processor controls switching between the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode.
In the image processing apparatus according to the present invention, the dedicated processor can derive the correction color data by both the hexahedron interpolation calculation and the tetrahedron interpolation calculation, and the general-purpose processor can select the dedicated processor in any of the hexahedron interpolation calculation mode and the tetrahedron interpolation calculation mode. Since the operation can be controlled, the color of the image can be corrected at high speed by either the hexahedral interpolation calculation or the tetrahedral interpolation calculation according to the target image quality of the corrected image.
Eight grid correction color data are required for the hexahedral interpolation calculation. Four pieces of grid correction color data are required for the tetrahedral interpolation calculation. Therefore, if there are 8 grid correction color data corresponding to 8 grid colors adjacent to each other, the color area of the hexahedron having these 8 grid colors as vertices (hereinafter, 8 grid colors as vertices). Correction color data corresponding to any color included in the hexahedral color area can be derived by either hexahedral interpolation calculation or tetrahedral interpolation calculation. The circuit scale of the dedicated processor can be reduced by promoting the common use of the circuit operating in the hexahedral interpolation calculation mode and the circuit operating in the tetrahedral interpolation calculation mode. According to the present invention, since the dedicated processor generates 0 as a coefficient corresponding to the four grid correction color data determined by the original color data, the eight grid corrections are performed in both the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode. Color data can be acquired and 8 grid correction color data can be multiplied by 8 coefficients. Therefore, according to the present invention, it is possible to reduce the manufacturing cost of a dedicated processor capable of performing hexahedral interpolation calculation and tetrahedral interpolation calculation.

(7)前記補間演算手段は、前記データ取得手段から取得した前記グリッド補正色データを、対応する前記係数で重み付けして、成分毎に累積加算することによって前記補正色データを導出する累積加算回路と、前記注目画素の色を表す前記元色データの各成分の下位ビットパターンの大小関係を比較する比較回路と、前記注目画素の色を表す前記元色データの各成分の前記下位ビットパターンに基づいて、前記累積加算回路によって取得される前記グリッド補正色データに対応する前記係数を生成する係数生成回路とを有する。前記係数生成回路は、前記6面体補間演算モードでは、前記注目画素の色を表す前記元色データの各色成分の前記下位ビットパターンの大小関係と無関係に、前記累積加算回路によって取得される全ての前記グリッド補正色データに対応する前記係数を生成し、前記4面体補間演算モードでは、前記累積加算回路によって取得される1つの前記ユニットデータのうち、前記注目画素の色を表す前記元色データの各色成分の前記下位ビットパターンの大小関係に応じて決まる4個の前記グリッド補正色データに対応する前記係数として0を生成する。
6面体領域であるユニットはユニットの1つの対角線を共有する6つの4面体領域に分割することができる。注目画素の色がユニット内のいずれの4面体領域に包含されるかによって、4面体補間演算モードにおいて重み付けが0であるべき4個のグリッド補正色データが決まる。注目画素の色を包含するユニット内の4面体領域は、注目画素の色の各成分の下位ビットパターンの大小関係に応じて決まる。本発明によると、専用プロセッサは、注目画素の色の各成分の下位ビットパターンの大小関係を比較した結果に応じて4個のグリッド補正色データに対応する係数として0を生成するため、4面体補間演算モードにおいて重み付けが0であるべき4個のグリッド補正色データの係数として0を生成することができる。
(7) A cumulative addition circuit for deriving the correction color data by weighting the grid correction color data acquired from the data acquisition unit with the corresponding coefficient and performing cumulative addition for each component. A comparison circuit that compares the magnitude relationship of the lower bit patterns of each component of the original color data representing the color of the target pixel, and the lower bit pattern of each component of the original color data representing the color of the target pixel. And a coefficient generation circuit for generating the coefficient corresponding to the grid correction color data acquired by the cumulative addition circuit. In the hexahedral interpolation calculation mode, the coefficient generation circuit performs all the acquisition by the cumulative addition circuit regardless of the magnitude relation of the lower bit pattern of each color component of the original color data representing the color of the target pixel. The coefficient corresponding to the grid correction color data is generated, and in the tetrahedral interpolation calculation mode, the original color data representing the color of the target pixel among the one unit data acquired by the cumulative addition circuit. 0 is generated as the coefficient corresponding to the four pieces of grid correction color data determined according to the magnitude relation of the lower bit pattern of each color component.
A unit that is a hexahedron region can be divided into six tetrahedron regions that share one diagonal of the unit. Depending on which tetrahedron region in the unit the color of the pixel of interest is included in, four grid correction color data that should have a weight of 0 in the tetrahedron interpolation calculation mode are determined. The tetrahedron region in the unit including the color of the pixel of interest is determined according to the magnitude relationship of the lower bit patterns of each component of the color of the pixel of interest. According to the present invention, the dedicated processor generates 0 as a coefficient corresponding to the four grid correction color data according to the result of comparing the magnitude relations of the lower bit patterns of the components of the color of the target pixel. It is possible to generate 0 as a coefficient of the four grid correction color data whose weight should be 0 in the interpolation calculation mode.

(8)前記専用プロセッサはワイヤードロジックで動作してもよい。
ワイヤードロジックで動作する専用プロセッサは、マイクロプログラム制御方式で動作する専用プロセッサに比べて、高速に補正画像を生成することができる。
(8) The dedicated processor may operate with wired logic.
A dedicated processor operating with wired logic can generate a corrected image at a higher speed than a dedicated processor operating with a microprogram control system.

(9)前記専用プロセッサは、シフト演算回路と乗算回路の組み合わせで除算結果の近似値を導出してもよい。
線形補間演算では除算が必須である。2nで割る除算は単純なシフト演算回路で実現可能であるが、2nでない数で割る除算に必要な回路の段数は多くなる。任意の数で割る除算は2nで割る除算と乗算の組み合わせで近似することができる。そこで、専用プロセッサにおいてシフト演算回路と乗算回路の組み合わせで除算結果の近似値を導出することにより、専用プロセッサの回路の段数を少なくすることができる。
(9) The dedicated processor may derive an approximate value of a division result by a combination of a shift operation circuit and a multiplication circuit.
Division is essential for linear interpolation operations. Division by 2 n can be realized by a simple shift operation circuit, but the number of circuit stages required for division by a number other than 2 n increases. Division by an arbitrary number can be approximated by a combination of division and multiplication by 2 n . Therefore, the number of stages of the dedicated processor circuit can be reduced by deriving an approximate value of the division result by combining the shift operation circuit and the multiplication circuit in the dedicated processor.

本発明の実施の形態を以下の順に説明する。
[画像処理装置のハードウェア構成]
[画像処理装置のソフトウェア構成]
[3次元色変換テーブル]
・・元画像の解析と補正パラメータの設定
・・グリッド色に対応するグリッド補正色データの導出
・・3次元色変換テーブルの構成
[色変換ブロックの構成と作動]
・・全体構成
・・データ転送
・・補間演算
・・・4面体補間
・・・6面体補間
・・ディザ処理
[画像補正の流れ]
[他の実施形態]
Embodiments of the present invention will be described in the following order.
[Hardware configuration of image processing apparatus]
[Software configuration of image processing device]
[3D color conversion table]
・ ・ Analysis of original image and setting of correction parameters ・ ・ Derivation of grid correction color data corresponding to grid color ・ ・ Configuration of 3D color conversion table [Configuration and operation of color conversion block]
・ ・ Overall structure ・ ・ Data transfer ・ ・ Interpolation calculation ... tetrahedral interpolation ... hexahedral interpolation ・ ・ Dither processing [Flow of image correction]
[Other Embodiments]

[画像処理装置のハードウェア構成]
図2は、本発明を適用したプリンタ1の概略構成を示すブロック図である。プリンタ1は、リムーバブルメモリ10からJPEGなどの汎用フォーマットの写真画像やRAWデータを読み込み、自動で色補正された写真画像の印刷が可能な所謂スタンドアロン型プリンタである。またプリンタ1は、ディジタルカメラ30、PC(Personal Computer)32、カメラ付携帯型電話端末34等の外部システムから汎用フォーマットの画像やRAWデータを直接入力し、色が自動補正された写真画像を印刷することが可能である。
[Hardware configuration of image processing apparatus]
FIG. 2 is a block diagram showing a schematic configuration of the printer 1 to which the present invention is applied. The printer 1 is a so-called stand-alone printer that reads a photographic image of a general format such as JPEG or RAW data from the removable memory 10 and can automatically print a photographic image whose color is corrected. The printer 1 directly inputs images in a general format or RAW data from an external system such as a digital camera 30, a PC (Personal Computer) 32, a camera-equipped mobile phone terminal 34, etc., and prints a photographic image whose color is automatically corrected. Is possible.

外部IF(Inter Face)20は、ディジタルカメラ30、PC32、カメラ付携帯型電話端末34等の外部システムと通信するためのUSBコントローラ、USBコネクタ等を備え、汎用フォーマットの画像やRAWデータや印刷設定パラメータをプリンタ1に入力する。   The external interface (IF) 20 includes a USB controller, a USB connector, and the like for communicating with an external system such as the digital camera 30, the PC 32, and the camera-equipped mobile phone terminal 34. Input parameters to the printer 1.

リムーバブルメモリコントローラ(RMC)12は、図示しないコネクタを介してリムーバブルメモリ10に接続され、リムーバブルメモリ10とRAM14との間でデータ転送を制御し、汎用フォーマットの画像やRAWデータをプリンタ1に入力する。   A removable memory controller (RMC) 12 is connected to the removable memory 10 via a connector (not shown), controls data transfer between the removable memory 10 and the RAM 14, and inputs images and RAW data in a general format to the printer 1. .

画像処理ユニット16は、JPEGデコード、3次元色変換テーブルを用いた色補正、シャープネス補正処理、分版処理、ハーフトーニング、インタレース処理等の印刷対象画像から印刷データを生成するための処理をCPU22と協働して高速に実行するための画像処理LSIやDSPで構成される。   The image processing unit 16 performs processing for generating print data from an image to be printed such as JPEG decoding, color correction using a three-dimensional color conversion table, sharpness correction processing, color separation processing, halftoning, interlace processing, and the like. And an image processing LSI or DSP for high-speed execution in cooperation with

画像処理ユニット16の一部を構成している色変換ブロック17(図3参照)は、3次元色変換テーブルを用いた色補正のための専用プロセッサである。色変換ブロック17は、CPU22によって指定される元画像に対しCPU22が生成した3次元色変換テーブルを用いて画像の色補正を実行することにより、色が自動補正された補正画像を生成する。以下、元画像の色も補正画像の色も2563色のRGBディジタル色空間で表されるものとして説明するが、元画像の色空間の色数も、補正画像の色空間の色数も、2563色に限定されない。また色空間の表色系もRGB表色系に限らずいかなるものでもよい。 A color conversion block 17 (see FIG. 3) constituting a part of the image processing unit 16 is a dedicated processor for color correction using a three-dimensional color conversion table. The color conversion block 17 performs color correction of the image using the three-dimensional color conversion table generated by the CPU 22 on the original image specified by the CPU 22, thereby generating a corrected image in which the color is automatically corrected. Following description, it is assumed that the color of the original image is also represented by the RGB digital color space colors 256 3-color corrected image, the number of colors of the color space of the original image, nor the number of colors of the corrected image color space, It is not limited to 256 three colors. Further, the color space color system is not limited to the RGB color system, and any color system may be used.

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

操作ユニット26は、ユーザのメニュー操作や印刷設定要求や印刷開始要求を受け付けるための各種のボタンを備えている。特定のモードで特定のボタンが押されると、そのモードに応じた各種の要求がプリンタ1に入力される。
表示ユニット28は、メニューや印刷対象画像を表示するためのLCD等のFPD(Flat Panel Display)、グラフィックコントローラ等を備える。
The operation unit 26 includes various buttons for accepting user menu operations, print setting requests, and print start requests. When a specific button is pressed in a specific mode, various requests corresponding to the mode are input to the printer 1.
The display unit 28 includes an FPD (Flat Panel Display) such as an LCD for displaying menus and images to be printed, a graphic controller, and the like.

RAM14は、プログラムやプログラムの処理対象となるデータ、例えば元画像や補正画像や3次元色変換テーブルが一時的に格納される揮発性の記憶媒体である。
汎用プロセッサとしてのCPU22は、フラッシュメモリ24に格納されている制御プログラムを実行することにより、プリンタ1の各部を制御して印刷の実行を制御する。制御プログラムはコンピュータ読み取り可能な記憶媒体からフラッシュメモリ24に転送してもよいし、遠隔地のサーバからネットワークを経由してフラッシュメモリ24に転送してもよい。
The RAM 14 is a volatile storage medium that temporarily stores a program and data to be processed by the program, such as an original image, a corrected image, and a three-dimensional color conversion table.
The CPU 22 as a general-purpose processor controls each part of the printer 1 by executing a control program stored in the flash memory 24 to control printing. The control program may be transferred from a computer-readable storage medium to the flash memory 24, or may be transferred from a remote server to the flash memory 24 via a network.

[画像処理装置のソフトウェア構成]
図4はCPU22によって実行される制御プログラムの構成を示すブロック図である。
印刷制御モジュール40は、操作ユニット26又はプリンタ1に接続されているディジタルカメラ30、PC32、携帯型電話機34等の外部システムによって設定される印刷設定パラメータに応じてJPEGデコード、色補正、分版処理、ハーフトーニング、インタレース処理等の印刷データを生成するための処理の実行を制御するためのプログラム部品である。
[Software configuration of image processing device]
FIG. 4 is a block diagram showing a configuration of a control program executed by the CPU 22.
The print control module 40 performs JPEG decoding, color correction, and color separation processing in accordance with print setting parameters set by an external system such as the digital camera 30 connected to the operation unit 26 or the printer 1, the PC 32, and the mobile phone 34. This is a program component for controlling execution of processing for generating print data such as halftoning and interlace processing.

色補正制御モジュール42は、印刷制御モジュール40から渡された印刷対象の元画像と印刷設定パラメータとに基づいて色補正モジュール46を制御するためのプログラム部品である。具体的には、色補正制御モジュール42は、補正方法判定モジュール44に補正パラメータを渡してS/W色補正モジュール52、H/W色補正モジュール54のいずれによって色変換を実行させるかを判定させ、判定結果に応じてS/W色補正モジュール52、H/W色補正モジュール54のいずれかによって色変換を実行させるかを設定する。S/W色補正モジュール52がCPU22によって実行されるモードが連続補正モードである。H/W色補正モジュール54がCPU22によって実行されるモードが補間補正モードである。色補正制御モジュール42は、CPU22をモード設定手段として機能させる。   The color correction control module 42 is a program component for controlling the color correction module 46 based on the original image to be printed and the print setting parameters passed from the print control module 40. Specifically, the color correction control module 42 passes correction parameters to the correction method determination module 44 and determines which of the S / W color correction module 52 and the H / W color correction module 54 is to execute color conversion. Depending on the determination result, whether to perform color conversion by either the S / W color correction module 52 or the H / W color correction module 54 is set. A mode in which the S / W color correction module 52 is executed by the CPU 22 is a continuous correction mode. A mode in which the H / W color correction module 54 is executed by the CPU 22 is an interpolation correction mode. The color correction control module 42 causes the CPU 22 to function as mode setting means.

色補正モジュール46は印刷対象の元画像の色を補正して補正画像を生成するためのプログラム部品である。色補正モジュール46の一部を構成する補正パラメータ生成モジュール48は元画像を解析し、色補正のための補正パラメータを解析結果に基づいて設定するためのプログラム部品である。補正パラメータ生成モジュール48はCPU22を解析手段として機能させる。テーブル生成モジュール50は補正パラメータに基づいて3次元色変換テーブルを生成するためのプログラム部品である。テーブル生成モジュール50はCPU22をテーブル生成手段として機能させる。S/W色補正モジュール52は補正パラメータに基づいてCPU22によって色を補正するためのプログラム部品である。S/W色補正モジュール52はCPU22を連続補正手段として機能させる。H/W色補正モジュール54は3次元色変換テーブルを用いて色変換ブロック17に色を補正させるためのプログラム部品である。すなわち、H/W色補正モジュール54は色変換ブロック17をCPU22が制御するためのプログラム部品である。H/W色補正モジュール54は色変換ブロック17を補間補正手段として機能させる。   The color correction module 46 is a program component for generating a corrected image by correcting the color of the original image to be printed. A correction parameter generation module 48 constituting a part of the color correction module 46 is a program component for analyzing the original image and setting correction parameters for color correction based on the analysis result. The correction parameter generation module 48 causes the CPU 22 to function as analysis means. The table generation module 50 is a program component for generating a three-dimensional color conversion table based on the correction parameters. The table generation module 50 causes the CPU 22 to function as a table generation unit. The S / W color correction module 52 is a program component for correcting the color by the CPU 22 based on the correction parameter. The S / W color correction module 52 causes the CPU 22 to function as a continuous correction unit. The H / W color correction module 54 is a program component for causing the color conversion block 17 to correct colors using a three-dimensional color conversion table. That is, the H / W color correction module 54 is a program component for the CPU 22 to control the color conversion block 17. The H / W color correction module 54 causes the color conversion block 17 to function as an interpolation correction unit.

補正方法判定モジュール44は、補正パラメータ及び3次元色変換テーブルをパラメータ基準及びテーブル基準に照らして検証し、CPU22、色変換ブロック17のいずれに色補正を実行させるかを判定するためのプログラム部品である。補正方法判定モジュール44はCPU22をパラメータ判定手段及びテーブル判定手段として機能させる。   The correction method determination module 44 is a program component for verifying the correction parameter and the three-dimensional color conversion table against the parameter reference and the table reference, and determining which of the CPU 22 and the color conversion block 17 should perform color correction. is there. The correction method determination module 44 causes the CPU 22 to function as a parameter determination unit and a table determination unit.

[3次元色変換テーブルの生成]
・・3次元色変換テーブルの概要
3次元色変換テーブルは図5(A)に示すRGB色空間の格子点の色であるグリッド色(Gr、Gg、Gb)毎に、その色が補正された結果の色を表すグリッド補正色データ(Pr、Pg、Pb)(図5(B)参照)を保持するデータ構造体である。3次元色変換テーブルは、CPU22によって写真画像毎に生成されるため、3次元色変換テーブルによって決まる補正前後の変化量が写真画像の画質に応じて変更される。
[Generation of three-dimensional color conversion table]
.. Outline of 3D color conversion table The 3D color conversion table is corrected for each grid color (Gr, Gg, Gb) which is the color of the grid point in the RGB color space shown in FIG. It is a data structure that holds grid correction color data (Pr, Pg, Pb) (see FIG. 5B) representing the resulting color. Since the three-dimensional color conversion table is generated for each photographic image by the CPU 22, the amount of change before and after correction determined by the three-dimensional color conversion table is changed according to the image quality of the photographic image.

・・元画像の解析と補正パラメータの設定
本実施形態では、写真画像の色を自動補正するために複数の補正パラメータが設定される。写真画像の画質を決める要素には、露出、光源色温度、コントラスト、ディジタルカメラのイメージセンサ特性、被写体自体の色等がある。写真画像の画質を補正するには、これらの要素を元画像の解析によって特定し、これらの要素に応じて補正パラメータを設定する必要がある。これらの要素は元画像を複数の色空間で解析することによって特定される。元画像の解析及び補正パラメータの設定は、補正パラメータ生成モジュール48を実行するCPU22によって以下のように行われる。
.. Analysis of original image and setting of correction parameters In this embodiment, a plurality of correction parameters are set to automatically correct the color of a photographic image. Factors that determine the image quality of a photographic image include exposure, light source color temperature, contrast, image sensor characteristics of the digital camera, and the color of the subject itself. In order to correct the image quality of a photographic image, it is necessary to specify these elements by analyzing the original image and set correction parameters according to these elements. These elements are specified by analyzing the original image in a plurality of color spaces. The analysis of the original image and the setting of correction parameters are performed by the CPU 22 that executes the correction parameter generation module 48 as follows.

露出、被写体の色等によって決まる輝度を補正するための補正パラメータである輝度補正パラメータは、例えば輝度の平均値に応じて設定される。被写体の色、光源の強さ等に応じて決まるコントラストを補正するための補正パラメータであるシャドーパラメータ及びハイライトパラメータは、それぞれハイライトポイントとシャドーポイントに応じて設定される。輝度補正パラメータ、シャドーパラメータ及びハイライトパラメータの設定のために、QVGAサイズのグレートーン画像の画素値である輝度についてヒストグラムが生成され、ヒストグラムに基づいて輝度の平均値、最大値、最小値がそれぞれ解析される。QVGAサイズのグレートーン画像は元画像のサンプリングによって生成される。グレートーン画像とは画素毎に輝度の階調レベルを表す1成分の画像である。平均値と予め決められた固定値との差が輝度補正パラメータして設定される。輝度補正パラメータはR(Red)、G(Green)、B(Blue)、それぞれのトーンカーブ毎に2つある制御点を上下させる幅に相当する。最大値と予め決められた固定値との差がハイライトパラメータとして設定される。ハイライトパラメータはR(Red)、G(Green)、B(Blue)、それぞれのトーンカーブ毎に2つある制御点のうちハイライト側の1点を上下させる幅に相当する。最小値と予め決められた固定値との差がコントラスト補正パラメータとしてのシャドーパラメータとして設定される。シャドーパラメータはR(Red)、G(Green)、B(Blue)それぞれのトーンカーブ毎に2つある制御点のうちシャドー側の1点を上下させる幅に相当する。   A luminance correction parameter that is a correction parameter for correcting the luminance determined by the exposure, the color of the subject, and the like is set according to, for example, an average value of luminance. Shadow parameters and highlight parameters, which are correction parameters for correcting the contrast determined according to the color of the subject, the intensity of the light source, and the like, are set according to the highlight point and the shadow point, respectively. In order to set the brightness correction parameter, the shadow parameter, and the highlight parameter, a histogram is generated for the brightness that is the pixel value of the QVGA size gray-tone image, and the average value, the maximum value, and the minimum value of the brightness are respectively based on the histogram. Analyzed. A QVGA size graytone image is generated by sampling the original image. A gray-tone image is a one-component image that represents the gradation level of luminance for each pixel. A difference between the average value and a predetermined fixed value is set as a luminance correction parameter. The brightness correction parameter corresponds to R (Red), G (Green), B (Blue), and a width for moving up and down two control points for each tone curve. A difference between the maximum value and a predetermined fixed value is set as the highlight parameter. The highlight parameter corresponds to a width for raising and lowering one point on the highlight side among two control points for each tone curve of R (Red), G (Green), and B (Blue). A difference between the minimum value and a predetermined fixed value is set as a shadow parameter as a contrast correction parameter. The shadow parameter corresponds to a width for moving up and down one point on the shadow side among the two control points for each tone curve of R (Red), G (Green), and B (Blue).

被写体の色、光源色温度、イメージセンサ特性等によって決まる記憶色を補正するための補正パラメータである記憶色補正パラメータは、各記憶色の平均値に応じて決まる。記憶色補正パラメータの設定のために、QVGAサイズのRGBトーン画像のうち、色相が葉緑色、空色、赤色、肌色の色相に近似する画素群についてR(Red)、G(Green)、B(Blue)それぞれのヒストグラムがそれらの色相毎に生成され、各ヒストグラムに基づいて色相が葉緑色、空色、赤色、肌色の色相に近似する画素群のR(Red)、G(Green)、B(Blue)の平均値が解析される。QVGAサイズのRGBトーン画像は元画像のサンプリングによって生成される。RGBトーン画像とは画素毎にR(Red)、G(Green)、B(Blue)の階調レベルを表す3成分の画像である。各平均値と予め決められた固定値の差がそれぞれ葉緑色の記憶色補正パラメータ、空色の記憶色補正パラメータ、赤色の記憶色補正パラメータ、肌色の記憶色補正パラメータとして設定される。各記憶色補正パラメータはRGBトーンカーブ毎に2つある制御点を上下させる幅に相当する。   A memory color correction parameter, which is a correction parameter for correcting a memory color determined by the subject color, light source color temperature, image sensor characteristics, and the like, is determined according to the average value of each memory color. For setting the memory color correction parameters, R (Red), G (Green), and B (Blue) for a pixel group whose hue is similar to the hues of leaf green, sky blue, red, and flesh color among the RGB tone images of QVGA size. ) Each histogram is generated for each hue, and R (Red), G (Green), and B (Blue) of the pixel group whose hue approximates the hues of leaf green, sky blue, red, and skin color based on each histogram. The average value of is analyzed. A QVGA size RGB tone image is generated by sampling the original image. An RGB tone image is a three-component image representing the gradation levels of R (Red), G (Green), and B (Blue) for each pixel. The difference between each average value and a predetermined fixed value is set as a leaf green memory color correction parameter, a sky blue memory color correction parameter, a red memory color correction parameter, and a skin color memory color correction parameter. Each memory color correction parameter corresponds to a width for moving up and down two control points for each RGB tone curve.

光源色温度に応じて決まるカラーバランスを補正するための補正パラメータであるカラーバランス補正パラメータは、解析によって特定されるR(Red)、G(Green)、B(Blue)、輝度それぞれの平均値に応じて決まる。カラーバランス補正パラメータの設定のために、QVGAサイズのRGBトーン画像についてR(Red)、G(Green)、B(Blue)のヒストグラムが生成され、QVGAサイズのグレートーン画像について輝度のヒストグラムが生成され、各ヒストグラムに基づいて輝度、R(Red)、G(Green)、B(Blue)の各平均値が解析される。輝度平均値とR(Red)の平均値の差、輝度平均値とG(Green)の平均値の差、輝度平均値とB(Blue)の平均値との差がそれぞれ重み付けされた値がカラーバランス補正パラメータとして設定される。カラーバランス補正パラメータはRGBトーンカーブ毎に2つある制御点のうちハイライト側の制御点を上下させる幅に相当する。   The color balance correction parameter, which is a correction parameter for correcting the color balance determined according to the light source color temperature, is an average value of each of R (Red), G (Green), B (Blue), and luminance specified by the analysis. It depends on it. In order to set the color balance correction parameters, R (Red), G (Green), and B (Blue) histograms are generated for the QVGA size RGB tone image, and a luminance histogram is generated for the QVGA size gray tone image. The average values of luminance, R (Red), G (Green), and B (Blue) are analyzed based on each histogram. The difference between the luminance average value and the average value of R (Red), the difference between the luminance average value and the average value of G (Green), and the difference between the luminance average value and the average value of B (Blue) are weighted. Set as a balance correction parameter. The color balance correction parameter corresponds to a width for moving up and down the control point on the highlight side among the two control points for each RGB tone curve.

被写体である人物の肌色、光源色温度等によって決まる人物の肌色を補正するための補正パラメータである肌色補正パラメータは、解析によって特定される人物の顔領域内のR(Red)、G(Green)、B(Blue)それぞれの平均値に応じて決まる。人物の顔領域は目や口や鼻の配置に応じたテンプレート等を用いたパターン認識によって特定される。肌色補正パラメータの設定のために、QVGAサイズのグレートーン画像について人物の顔領域が特定される。QVGAサイズのRGBトーン画像について人物の顔領域毎に256画素のR(Red)、G(Green)、B(Blue)の各平均値が求められる。各平均値と予め決められた固定値との差に応じて肌色補正パラメータが設定される。肌色補正パラメータは、R(Red)、G(Green)、B(Blue)のトーンカーブの肌色制御点の座標と、階調とびを抑制する補間制御点の座標とに相当する。肌色制御点は好ましい肌色をピンポイントで指定するための制御点である。   The skin color correction parameters, which are correction parameters for correcting the skin color of the person determined by the skin color of the person who is the subject, the light source color temperature, etc., are R (Red) and G (Green) in the face area of the person specified by the analysis. , B (Blue) is determined according to the average value. The face area of a person is specified by pattern recognition using a template or the like corresponding to the arrangement of eyes, mouth, and nose. In order to set the skin color correction parameter, a human face region is specified for a QVGA-size gray-tone image. Each average value of R (Red), G (Green), and B (Blue) of 256 pixels is obtained for each face area of a person for an RGB tone image of QVGA size. A skin color correction parameter is set according to the difference between each average value and a predetermined fixed value. The skin color correction parameters correspond to the coordinates of the skin color control points of the tone curves of R (Red), G (Green), and B (Blue) and the coordinates of the interpolation control points that suppress gradation skipping. The skin color control point is a control point for designating a preferable skin color pinpoint.

・・グリッド色に対応するグリッド補正色データの導出
図6は元画像の色と補正画像の色との対応関係を成分毎に規定するトーンカーブを示す図である。元画像の色と補正画像の色とが等しい対応関係をR(Red)、G(Green)、B(Blue)の成分毎に規定する直線のトーンカーブに2つずつの制御点が存在している(図6の(A)、(B)、(C)参照)。2つの制御点の座標は、例えばシャドー側が(64/255、64/255)、ハイライト側が(195/255、195/255)として予め決められている。尚、制御点の座標成分は元画像の階調(入力階調)、補正画像の階調(出力階調)の順に記載するものとする。また、本実施形態では元画像、補正画像ともにR、G、B各成分は256階調(0−255)であるとして説明されるが、階調数は任意である。上述した輝度補正パラメータ、シャドーパラメータ、ハイライトパラメータ、葉緑色の記憶色補正パラメータ、空色の記憶色補正パラメータ、赤色の記憶色補正パラメータ、肌色記憶色補正パラメータ及びカラーバランス補正パラメータが制御点の出力階調成分に累積加算されることによって制御点が移動する。さらに肌色制御点及び補間制御点の座標が肌色補正パラメータによって決まる。また、印刷設定パラメータに応じて補正パラメータが調整される。例えば印刷設定パラメータに応じて補正パラメータの制御値が+10に設定され、画像解析によって設定された補正パラメータが+20であれば最終的な補正パラメータは+30となる。このようにして補正パラメータによって決まる各制御点と(0/255、0/255)と(255/255、255/255)とをなめらかに結ぶトーンカーブが曲線補間処理によって導出される。入力階調と出力階調の対応関係を成分毎に規定するトーンカーブ(図6の(A)、(B)、(C)参照)は、元色データの1成分である入力階調毎に補正色データの1成分である出力階調を保持する3つの1次元色変換テーブルとしてRAM14に格納される。3つの1次元色変換テーブルによって、2563個の色に対する2563個の補正色を表す2563個の補正色データが規定される。したがって、3つの1次元色変換テーブルの合計データサイズは6144ビット(256×8×3)である。3つの1次元色変換テーブルは関数情報に相当する。
Derivation of grid correction color data corresponding to the grid color FIG. 6 is a diagram showing a tone curve that defines the correspondence between the color of the original image and the color of the correction image for each component. There are two control points in a linear tone curve that defines the correspondence between the color of the original image and the color of the corrected image for each component of R (Red), G (Green), and B (Blue). (See (A), (B), and (C) of FIG. 6). The coordinates of the two control points are determined in advance as, for example, (64/255, 64/255) on the shadow side and (195/255, 195/255) on the highlight side. The coordinate components of the control points are described in the order of the gradation of the original image (input gradation) and the gradation of the corrected image (output gradation). In the present embodiment, the R, G, and B components are described as having 256 gradations (0-255) in both the original image and the corrected image, but the number of gradations is arbitrary. The brightness correction parameter, shadow parameter, highlight parameter, leaf green memory color correction parameter, sky blue memory color correction parameter, red memory color correction parameter, skin color memory color correction parameter, and color balance correction parameter described above are output as control points. The control point moves by accumulatively adding to the gradation component. Further, the coordinates of the skin color control point and the interpolation control point are determined by the skin color correction parameter. The correction parameter is adjusted according to the print setting parameter. For example, if the control value of the correction parameter is set to +10 according to the print setting parameter, and the correction parameter set by image analysis is +20, the final correction parameter is +30. In this way, a tone curve that smoothly connects each control point determined by the correction parameter and (0/255, 0/255) and (255/255, 255/255) is derived by the curve interpolation process. A tone curve (see (A), (B), and (C) of FIG. 6) that defines the correspondence between the input gradation and the output gradation for each component is provided for each input gradation that is one component of the original color data. It is stored in the RAM 14 as three one-dimensional color conversion tables that hold the output gradation that is one component of the correction color data. By three 1-dimensional color conversion table, 256 3 corrected color data representing a 256 3 corrected color for 256 3 colors are defined. Therefore, the total data size of the three one-dimensional color conversion tables is 6144 bits (256 × 8 × 3). The three one-dimensional color conversion tables correspond to function information.

R成分のトーンカーブを規定する一次元色変換テーブルのとびとびの入力階調がグリッド色のR成分であり、とびとびの入力階調に対応するとびとびの出力階調がグリッド補正色データのR成分(Pr)である。G及びB成分のトーンカーブについても同様である。したがって、R、G及びB成分のトーンカーブを生成するための上述の処理によってグリッド色に対するグリッド補正色データが導出される。例えば、図7にP0で示されるグリッド色に対応するグリッド補正色データのR成分P0rは、R成分のトーンカーブを規定する一次元色変換テーブルから取り出される出力階調であって、対応する入力階調がグリッド色のR成である出力階調である。   The discrete input gradation of the one-dimensional color conversion table that defines the tone curve of the R component is the R component of the grid color, and the discrete output gradation corresponding to the discrete input gradation is the R component of the grid correction color data ( Pr). The same applies to the tone curves of the G and B components. Accordingly, grid correction color data for the grid color is derived by the above-described processing for generating tone curves of R, G, and B components. For example, the R component P0r of the grid correction color data corresponding to the grid color indicated by P0 in FIG. 7 is an output gradation extracted from a one-dimensional color conversion table that defines the tone curve of the R component, and the corresponding input This is an output gradation whose gradation is an R component of the grid color.

・・3次元色変換テーブルの構成
線形補間演算は、色空間を構成する多面体の部分領域毎に実行される。線形補間演算の対象となる部分領域をユニットというものとする。本来、4面体補間演算で必要なグリッド補正色データは4個であり、6面体補間演算で必要なグリッド補正色データは8個である。したがって、4面体補間演算の対象となるユニットは本来4面体であり、6面体補間演算の対象となるユニットは本来6面体である。しかし、4面体補間演算にも6面体補間演算にも対応する色変換ブロック17を単純化するため、色変換ブロック17では4面体補間演算でも6面体補間演算でも同一のユニット単位で補間演算が実行される。すなわち、4面体補間演算でも6面体補間演算でも、8個のグリッド補正色データで構成されるユニットデータがRAM14から色変換ブロック17に転送される。
.. Configuration of three-dimensional color conversion table The linear interpolation operation is executed for each partial area of the polyhedron constituting the color space. A partial region to be subjected to linear interpolation calculation is referred to as a unit. Essentially, four pieces of grid correction color data are necessary for the tetrahedral interpolation calculation, and eight pieces of grid correction color data are necessary for the hexahedral interpolation calculation. Therefore, the unit that is the target of the tetrahedral interpolation calculation is originally a tetrahedron, and the unit that is the target of the hexahedral interpolation calculation is originally a hexahedron. However, in order to simplify the color conversion block 17 corresponding to both the tetrahedral interpolation calculation and the hexahedral interpolation calculation, the color conversion block 17 executes the interpolation calculation in the same unit for both the tetrahedral interpolation calculation and the hexahedral interpolation calculation. Is done. That is, unit data composed of eight grid correction color data is transferred from the RAM 14 to the color conversion block 17 in both tetrahedral interpolation calculation and hexahedral interpolation calculation.

図8は本実施形態のユニットとRGB色空間との関係を示す模式図である。色空間を細かく分割してユニットを小さくすればするほど、線形補間演算の精度は向上するが、グリッド変換色データの数が多くなるため3次元色変換テーブルのデータ量が増大する。色空間を何個のユニットで分割するかは任意であって、分版精度等に応じて決めればよいが、本実施形態では色空間は4096個のユニットに分割される。各頂点を隣接ユニットで共有することにより、補間演算の精度を実質的に下げずに3次元色変換テーブルのデータ量を低減することができる。しかし、一画素の元色データを補正色データに変換するためには、1つのユニットデータをRAM14から色変換ブロック17に読み込む必要がある。したがって、グリッド補正色データがユニットデータ毎にRAM14の連続アドレスに格納されていなければ、ユニットデータをRAM14から色変換ブロック17に転送するために必要な時間が長くなる。ユニットの各頂点を隣接ユニットで共有し、グリッド補正色データを冗長性無しにRAM14に格納すると、1ユニットの全頂点分のグリッド補正色データで構成される1つのユニットデータを連続アドレスに格納することができなくなる。本実施形態では、ユニットデータの転送時間を短縮して画像の色補正を高速化するため、グリッド補正色データはユニットデータ毎にRAM14の連続アドレスに格納され、隣接ユニットで頂点は共有されない。その結果、本実施形態では、4096×8個のグリッド色に対応する4096×8個のグリッド補正色データが3次元色変換テーブルに保持され、1つのユニットは一辺の長さが15である直方体の領域になる。   FIG. 8 is a schematic diagram showing the relationship between the unit of this embodiment and the RGB color space. As the color space is finely divided and the units are made smaller, the accuracy of the linear interpolation calculation is improved, but the number of grid conversion color data increases, so the data amount of the three-dimensional color conversion table increases. The number of units used to divide the color space is arbitrary and may be determined in accordance with the color separation accuracy. However, in this embodiment, the color space is divided into 4096 units. By sharing each vertex with adjacent units, the data amount of the three-dimensional color conversion table can be reduced without substantially reducing the accuracy of the interpolation calculation. However, in order to convert the original color data of one pixel into the corrected color data, it is necessary to read one unit data from the RAM 14 into the color conversion block 17. Therefore, if the grid correction color data is not stored in the continuous address of the RAM 14 for each unit data, the time required for transferring the unit data from the RAM 14 to the color conversion block 17 becomes long. When each vertex of a unit is shared by adjacent units and grid correction color data is stored in the RAM 14 without redundancy, one unit data composed of grid correction color data for all vertices of one unit is stored in a continuous address. I can't do that. In this embodiment, in order to shorten the unit data transfer time and speed up the color correction of the image, the grid correction color data is stored in the continuous address of the RAM 14 for each unit data, and the vertexes are not shared by adjacent units. As a result, in this embodiment, 4096 × 8 grid correction color data corresponding to 4096 × 8 grid colors are held in the three-dimensional color conversion table, and one unit has a rectangular parallelepiped whose length is 15 It becomes the area of.

ここで、任意の1つのユニットの各頂点に対応するグリッド色を、それらの色空間内の位置に応じて図9に示すようにP0、P1、P2、P3、P4、P5、P6、P7と定義する。P0はユニットの原点に最も近い頂点に対応するグリッド色である。P7はユニットの原点から最も遠い頂点に対応するグリッド色である。ユニットデータは、1ユニットの8個の頂点に対応するグリッド補正色データ群で構成される。   Here, the grid colors corresponding to the vertices of any one unit are represented by P0, P1, P2, P3, P4, P5, P6, P7 according to their positions in the color space, as shown in FIG. Define. P0 is the grid color corresponding to the vertex closest to the origin of the unit. P7 is a grid color corresponding to the vertex farthest from the origin of the unit. The unit data is composed of a grid correction color data group corresponding to eight vertices of one unit.

図10は、3次元色変換テーブルのデータ配置を示す表である。[a:b]はアドレス又はデータのa桁目(b=0,1,2・・・)からb桁目(a=0,1,2・・・)までのビット列で表される数値を表すものとする。グリッド色Pn(n=0、1、2・・・7)に対応するグリッド補正色データのR成分をPnr、グリッド色Pnに対応するグリッド補正色データのG成分をPng、グリッド色Pnに対応するグリッド補正色データのB成分をPnbと表記するものとする。本実施形態ではRAM14は8ビットあたりに1アドレスが割り当てられている。色変換ブロック17によって生成される補正画像はR、G、Bの各階調が8ビットで表現されるRGBトーン画像であるため、グリッド補正色データのR、G、B各成分(Pnr、Png、Pnb(n=0,1,2・・・7))はそれぞれ8ビットである。したがって、グリッド補正色データのR、G、B各成分はそれぞれ1アドレスに格納される。連続した4アドレスのうちの1アドレスにはグリッド補正色データが格納されない。すなわち、合計192ビットになる8個のグリッド補正色データで構成される1つのユニットデータは256ビットの連続領域に割り付けられる。尚、グリッド補正色データの各成分を何ビットにするかは設計事項であって、補正画像の色を表すディジタル色空間の色数に応じて決めればよい。また、上述して3次元色変換テーブルのデータ配置はあくまで一例であって、ユニットデータ単位で連続領域にグリッド補正色データが割り付けられていればよい。また、ユニットデータを圧縮することにより、1つのユニットデータを1度のメモリアクセスで色変換ブロック17に読み込むこともできる。   FIG. 10 is a table showing the data arrangement of the three-dimensional color conversion table. [A: b] is a numerical value represented by a bit string from the a digit (b = 0, 1, 2,...) To the b digit (a = 0, 1, 2,...) Of the address or data. It shall represent. R component of grid correction color data corresponding to the grid color Pn (n = 0, 1, 2,... 7) corresponds to Pnr, G component of grid correction color data corresponding to the grid color Pn corresponds to Png, and grid color Pn. The B component of the grid correction color data to be written is denoted as Pnb. In this embodiment, the RAM 14 is assigned one address per 8 bits. Since the correction image generated by the color conversion block 17 is an RGB tone image in which each gradation of R, G, and B is expressed by 8 bits, each of the R, G, and B components (Pnr, Png, Each of Pnb (n = 0, 1, 2,... 7) is 8 bits. Accordingly, the R, G, and B components of the grid correction color data are stored at one address. Grid correction color data is not stored in one of the four consecutive addresses. That is, one unit data composed of 8 grid correction color data having a total of 192 bits is allocated to a continuous area of 256 bits. It should be noted that how many bits are used for each component of the grid correction color data is a design matter and may be determined according to the number of colors in the digital color space representing the color of the corrected image. Further, the data arrangement of the three-dimensional color conversion table described above is merely an example, and it is only necessary that the grid correction color data is allocated to the continuous area in units of unit data. Further, by compressing the unit data, one unit data can be read into the color conversion block 17 by one memory access.

[色変換ブロックの構成と作動]
・・全体構成
図11は専用プロセッサとしての色変換ブロック17の構成を示すブロック図である。色変換ブロック17は、元画像の注目画素の順次選択、注目画素の色を表す元色データの読み込み、注目画素の色に対応するユニットデータを読み込むためのアドレス特定、ユニットデータの読み込み、線形補間演算、補正色データの書き込みという一連の処理を自律的に繰り返す専用回路である。色変換ブロック17を構成するホストインタフェースブロック60、データインタフェースブロック62、ユニットアドレス生成ブロック66、アービタブロック64、補間演算ブロック68はそれぞれワイヤードロジックで制御されるため、マイクロプログラム制御方式に比べて高速に作動する。尚、色変換ブロック17はマイクロプログラム制御方式で作動してもよい。
[Configuration and operation of color conversion block]
.. Overall Configuration FIG. 11 is a block diagram showing the configuration of the color conversion block 17 as a dedicated processor. The color conversion block 17 sequentially selects the target pixel of the original image, reads the original color data representing the color of the target pixel, specifies the address for reading the unit data corresponding to the color of the target pixel, reads the unit data, and linear interpolation This is a dedicated circuit that autonomously repeats a series of processes of calculation and correction color data writing. Since the host interface block 60, the data interface block 62, the unit address generation block 66, the arbiter block 64, and the interpolation operation block 68 constituting the color conversion block 17 are controlled by wired logic, respectively, the speed is higher than that of the microprogram control method. Operate. The color conversion block 17 may be operated by a microprogram control method.

ホストインタフェースブロック60は、元画像の開始アドレス、元画像の画像サイズ、3次元色変換テーブルの開始アドレス、補正画像の開始アドレス、色変換ブロック17のモード(4面体補間演算モード、6面体補間演算モード)、色補正の開始・中断等を制御するためのレジスタ群を備えている。端子ainはレジスタ群のアドレスを指定するための端子である。端子dinは指定されたアドレスに格納される元画像の開始アドレス、補正画像の開始アドレス、3次元色変換テーブルの開始アドレス等のデータを入力するための端子である。これらのデータはH/W色補正モジュール54を実行しているCPU22によって入力される。端子doutはCPU22に色変換ブロック17の状態を認識させるためにレジスタ群のデータを出力するための端子である。端子doutからは例えばある時点の注目画素について補正色データを書き込まれたRAM14のアドレス信号が出力される。したがって、H/W色補正モジュール54を実行しているCPU22は任意の時点における注目画素を認識できる。また、注目画素の色に応じて4面体補間演算モードと6面体補間演算モードとを切り換えることも可能である。例えば、グレー軸近傍の色については4面体補間演算モードで補正し、グレー軸から遠い色については6面体補間演算モードで補正することなども可能である。   The host interface block 60 includes the start address of the original image, the image size of the original image, the start address of the three-dimensional color conversion table, the start address of the corrected image, and the mode of the color conversion block 17 (tetrahedral interpolation calculation mode, hexahedral interpolation calculation). Mode), and a register group for controlling start / interruption of color correction. The terminal ain is a terminal for designating the address of the register group. The terminal din is a terminal for inputting data such as the start address of the original image, the start address of the corrected image, and the start address of the three-dimensional color conversion table stored at the specified address. These data are input by the CPU 22 executing the H / W color correction module 54. The terminal dout is a terminal for outputting register group data to make the CPU 22 recognize the state of the color conversion block 17. From the terminal dout, for example, an address signal of the RAM 14 in which correction color data is written for a pixel of interest at a certain time is output. Therefore, the CPU 22 executing the H / W color correction module 54 can recognize the target pixel at an arbitrary time. It is also possible to switch between the tetrahedral interpolation calculation mode and the hexahedral interpolation calculation mode according to the color of the target pixel. For example, the color near the gray axis can be corrected in the tetrahedral interpolation calculation mode, and the color far from the gray axis can be corrected in the hexahedral interpolation calculation mode.

・・データ入力
図12はRAM14と色変換ブロック17とのデータ転送タイミングを示す図である。1回のRAMアクセスサイクルでRAM14と色変換ブロック17との間で転送可能なデータ量は128ビットである。また色変換ブロック17は4つの注目画素の色変換をパイプライン処理する。このため、4つの注目画素の色を表す4つの元色データ、Dnr−0、Dnr−1、Dnr−2、Dnr−3が1回のRAMアクセスサイクルでRAM14から色変換ブロック17に転送され、続いて、4つのユニットデータ(Pn0、Pn1、Pn2、Pn3、Pn4、Pn5、Pn6、Pn7(n=0、1,2,3))が8回のRAMアクセスサイクルでRAM14から色変換ブロック17に転送され、続いて、4つの補正色データ、Dnw−0、Dnw−1、Dnw−2、Dnw−3が一回のRAMアクセスサイクルで色変換ブロック17からRAM14に転送される。
Data input FIG. 12 is a diagram showing data transfer timing between the RAM 14 and the color conversion block 17. The amount of data that can be transferred between the RAM 14 and the color conversion block 17 in one RAM access cycle is 128 bits. The color conversion block 17 pipelines the color conversion of the four target pixels. Therefore, the four original color data Dnr-0, Dnr-1, Dnr-2, and Dnr-3 representing the colors of the four target pixels are transferred from the RAM 14 to the color conversion block 17 in one RAM access cycle. Subsequently, four unit data (P n 0, P n 1, P n 2, P n 3, P n 4, P n 5, P n 6, P n 7 (n = 0, 1, 2, 3) ) Is transferred from the RAM 14 to the color conversion block 17 in eight RAM access cycles, and then four correction color data, Dnw-0, Dnw-1, Dnw-2, and Dnw-3 are stored in one RAM access cycle. Then, the data is transferred from the color conversion block 17 to the RAM 14.

データインタフェースブロック62(図11参照)は元画像の4つの注目画素の色を表す4つの元色データを読み出すための1つのアドレス信号sd_ra_dをアービタブロック64に出力する。データインタフェースブロック62は4つの注目画素の色を表す元色データが端子sd_d_inから入力されると、4つの注目画素について1つの補間演算開始要求rgb_enをユニットアドレス生成ブロック66に出力し、元色データの各成分Rin[7:0]、Gin[7:0]、Bin[7:0]を1画素毎に順次ユニットアドレス生成ブロック66に出力する。 The data interface block 62 (see FIG. 11) outputs to the arbiter block 64 one address signal sd_ra_d for reading four original color data representing the colors of the four target pixels of the original image. When the original color data representing the colors of the four target pixels is input from the terminal sd_d_in, the data interface block 62 outputs one interpolation calculation start request rgb_en for the four target pixels to the unit address generation block 66, and the original color data The components R in [7: 0], G in [7: 0], and B in [7: 0] are sequentially output to the unit address generation block 66 for each pixel.

ユニットアドレス生成ブロック66は、注目画素の元色データを、注目画素の色に近い8個のグリッド色に対応するグリッド補正色データで構成されるユニットデータのアドレスに変換する。アービタブロック64は、ユニットアドレス生成ブロック66から出力される、ユニットデータを読み出すための要求信号req_sr_lと、データインタフェースブロック62から出力される、注目画素の元色データを読み出すための要求信号req_srdとを調停し、いずれかの要求信号に応じたアドレス信号sd_sr_lまたはsd_ra_dを端子sd_raからRAMC15に出力する。端子sd_raから出力されるアドレス信号は、16アドレス分のデータを一括して読み出すため、物理アドレスの[25:4]のビットパターンになっている。端子sd_raから出力されるアドレス信号に応じて4アドレス分のデータが1度にRAM14からデータインタフェースブロック62又はユニットアドレス生成ブロック66に転送される。注目画素の元色データを読み出すためのアドレス信号sd_ra_dが端子sd_raから出力されると注目画素の元色データがRAM14からデータインタフェースブロック62に転送される。ユニットデータを読み出すためのアドレス信号sd_sr_lが端子sd_raから出力されると4つのグリッド補正色データがRAM14からユニットアドレス生成ブロック66に転送される。ユニットアドレス生成ブロック66は注目画素の元色に対応するユニットデータを読み出すためのアドレス信号とユニットデータとを保持するためのキャッシュメモリを有する。ユニットアドレス生成ブロック66のキャッシュメモリに注目画素に対応するユニットデータが保持されている場合、要求信号req_sr_lとキャッシュメモリに保持されたアドレス信号sd_sr_lとはアービタブロック64に出力されない。データインタフェースブロック62、アービタブロック64及びユニットアドレス生成ブロック66は、データ取得手段に相当する。   The unit address generation block 66 converts the original color data of the target pixel into an address of unit data composed of grid correction color data corresponding to eight grid colors close to the color of the target pixel. The arbiter block 64 outputs a request signal req_sr_l output from the unit address generation block 66 for reading unit data and a request signal req_srd output from the data interface block 62 for reading the original color data of the target pixel. Arbitration is performed, and the address signal sd_sr_l or sd_ra_d corresponding to one of the request signals is output from the terminal sd_ra to the RAMC 15. The address signal output from the terminal sd_ra has a bit pattern of [25: 4] of the physical address in order to read data for 16 addresses at a time. In accordance with the address signal output from the terminal sd_ra, data for four addresses is transferred from the RAM 14 to the data interface block 62 or the unit address generation block 66 at a time. When the address signal sd_ra_d for reading the original color data of the target pixel is output from the terminal sd_ra, the original color data of the target pixel is transferred from the RAM 14 to the data interface block 62. When the address signal sd_sr_l for reading the unit data is output from the terminal sd_ra, the four grid correction color data are transferred from the RAM 14 to the unit address generation block 66. The unit address generation block 66 has a cache memory for holding an address signal and unit data for reading unit data corresponding to the original color of the target pixel. When the unit data corresponding to the target pixel is held in the cache memory of the unit address generation block 66, the request signal req_sr_l and the address signal sd_sr_l held in the cache memory are not output to the arbiter block 64. The data interface block 62, the arbiter block 64, and the unit address generation block 66 correspond to data acquisition means.

図13は元色データとユニットデータのアドレスとの対応関係を示す図である。RAM_address[16:4]はユニットアドレス生成ブロック66の端子sd_sr_lから出力されるアドレス信号のビットパターンの一部を表している。端子sd_sr_lから出力されるアドレス信号はホストインタフェースブロック60のレジスタにセットされる3次元色変換テーブルの開始アドレスとRAM_address[16:4]の和である。CPU22は常に[16:4]=0のアドレスからはじまるRAM14の連続領域に3次元色変換テーブルを格納する。したがって3次元色変換テーブルの開始アドレスはCPU22によって常に[16:4]=0にセットされる。   FIG. 13 is a diagram showing the correspondence between original color data and unit data addresses. RAM_address [16: 4] represents a part of the bit pattern of the address signal output from the terminal sd_sr_l of the unit address generation block 66. The address signal output from the terminal sd_sr_l is the sum of the start address of the three-dimensional color conversion table set in the register of the host interface block 60 and RAM_address [16: 4]. The CPU 22 always stores the three-dimensional color conversion table in a continuous area of the RAM 14 starting from the address [16: 4] = 0. Therefore, the start address of the three-dimensional color conversion table is always set to [16: 4] = 0 by the CPU 22.

任意の元色データとRAM_address[16:4]との対応関係は高速化と回路の単純化のため次のように定められている。ユニットデータを読み込むためのアドレス信号の[16:5]のビットパターンは、当該ユニットデータによって補間演算が実行される元色データのR、G、B各上位4ビットのパターン(Rin[7:4]、Gin[7:4]、Bin[7:4])をRGBの順に直結したビットパターンと同一である。グリッド色P0、P1、P2、P3に対応するグリッド補正色データを読み込むためのアドレス信号の[4:4]のビットSは0であり、グリッド補正色データP4、P5、P6、P7に対応するグリッド補正色データを読み込むためのアドレス信号の[4:4]のビットSは1である。 The correspondence between arbitrary original color data and RAM_address [16: 4] is determined as follows for speeding up and circuit simplification. The bit pattern of [16: 5] of the address signal for reading the unit data is a pattern of the upper 4 bits of each of R, G and B of the original color data (R in [7: 4], G in [7: 4], B in [7: 4]) is the same as the bit pattern directly connected in the order of RGB. [4: 4] bits S of the address signal for reading the grid correction color data corresponding to the grid colors P0, P1, P2, and P3 are 0 and correspond to the grid correction color data P4, P5, P6, and P7. Bits [4: 4] of the address signal for reading grid correction color data are 1.

上述したとおり、補間演算ブロック68は、6面体補間演算モードであっても、4面体補間演算モードであっても、8個のグリッド色で構成されるユニットデータ単位で補間演算を実行するため、6面体補間演算モードであっても、4面体補間演算モードであっても、データインタフェースブロック62、ユニットアドレス生成ブロック66、アービタブロック64の動作は以下の1通りである(図11参照)。   As described above, the interpolation calculation block 68 executes the interpolation calculation in units of unit data composed of eight grid colors regardless of whether it is the hexahedral interpolation calculation mode or the tetrahedral interpolation calculation mode. The operation of the data interface block 62, the unit address generation block 66, and the arbiter block 64 is one of the following operations (see FIG. 11) regardless of whether it is the hexahedral interpolation calculation mode or the tetrahedral interpolation calculation mode.

具体的には、注目画素の色に近い4個のグリッド色P0、P1、P2、P3に対応するグリッド補正色データを読み出すためのアドレス信号と、注目画素の色に近い4個のグリッド色P4、P5、P6、P7に対応するグリッド補正色データ群を読み出すためのアドレス信号とが注目画素毎に元色データに基づいてユニットアドレス生成ブロック66によって生成され、それらのアドレス信号がユニットアドレス生成ブロック66の端子sd_sr_lから出力される。RAM14と色変換ブロック17との間でのデータ転送単位は128ビットであるため、RAM14と色変換ブロック17との間では4アドレス分のデータが1つのアドレス指定によって1度に転送される。ユニットアドレス生成ブロック66の端子sd_sr_lから出力されるアドレス信号は物理アドレスの[25:4]のビットパターンである。   Specifically, an address signal for reading grid correction color data corresponding to four grid colors P0, P1, P2, and P3 close to the color of the target pixel, and four grid colors P4 close to the color of the target pixel. , P5, P6, and P7, an address signal for reading the grid correction color data group is generated by the unit address generation block 66 based on the original color data for each target pixel, and these address signals are generated by the unit address generation block. 66 terminal sd_sr_l. Since the data transfer unit between the RAM 14 and the color conversion block 17 is 128 bits, data for four addresses is transferred at a time by one address designation between the RAM 14 and the color conversion block 17. The address signal output from the terminal sd_sr_l of the unit address generation block 66 is a [25: 4] bit pattern of the physical address.

・・補間演算
データインタフェースブロック62からユニットアドレス生成ブロック66に補間演算開始要求rgb_enが入力されると、1つの注目画素の色を表す元色データの各成分Rin[7:0]、Gin[7:0]、Bin[7:0]の下位4ビット(r[3:0]、g[3:0]、b[3:0])と、ユニットデータとがユニットアドレス生成ブロック66から補間演算ブロック68に出力される。具体的にはユニットデータはグリッド補正色データ毎に補間演算ブロック68に入力され、1つのグリッド補正色データのR、G、Bの各成分であるPr、Pg、Pbは同時に補間演算ブロック68に入力される。
.. Interpolation calculation When an interpolation calculation start request rgb_en is input from the data interface block 62 to the unit address generation block 66, each component R in [7: 0], G in of the original color data representing the color of one pixel of interest The lower 4 bits (r [3: 0], g [3: 0], b [3: 0]) of [7: 0] and B in [7: 0] and unit data are unit address generation block 66. Is output to the interpolation calculation block 68. Specifically, unit data is input to the interpolation calculation block 68 for each grid correction color data, and Pr, Pg, and Pb that are R, G, and B components of one grid correction color data are simultaneously input to the interpolation calculation block 68. Entered.

図14は補間演算手段としての補間演算ブロック68の構成を示す回路図である。補間演算ブロック68は、ユニットアドレス生成ブロック66から入力されるユニットデータと注目画素の元色データの各成分Rin[7:0]、Gin[7:0]、Bin[7:0]の下位4ビット(r[3:0]、g[3:0]、b[3:0])とを用いた線形補間演算によって4つの注目画素について補正色データをパイプライン処理によって順次導出する。補間演算ブロック68は、係数生成回路に相当する係数演算ブロック102と、累積加算回路に相当する累積加算ブロック104とで構成されている。係数演算ブロック102は、注目画素の元色データの各成分Rin[7:0]、Gin[7:0]、Bin[7:0]の下位4ビット(r、g、b)に基づいて8個のグリッド補正色データのそれぞれに掛け合わせる係数を導出する。累積加算ブロック104は、係数演算ブロック102から出力される係数を8個のグリッド補正色データのそれぞれに掛け合わせ、乗算結果を累積加算する。尚、シフト演算回路が係数演算ブロック102、累積加算ブロック104のそれぞれに組み込まれているが、シフト演算はどの段階で実行されてもよい。 FIG. 14 is a circuit diagram showing a configuration of an interpolation calculation block 68 as an interpolation calculation means. The interpolation calculation block 68 includes the component R in [7: 0], G in [7: 0], and B in [7: 0] of the unit data input from the unit address generation block 66 and the original color data of the target pixel. Correction color data is sequentially derived by pipeline processing for four pixels of interest by linear interpolation using the lower 4 bits (r [3: 0], g [3: 0], b [3: 0]). . The interpolation calculation block 68 includes a coefficient calculation block 102 corresponding to a coefficient generation circuit and a cumulative addition block 104 corresponding to a cumulative addition circuit. The coefficient calculation block 102 applies the lower 4 bits (r, g, b) of each component R in [7: 0], G in [7: 0], B in [7: 0] of the original color data of the target pixel. Based on this, a coefficient to be multiplied with each of the eight grid correction color data is derived. The cumulative addition block 104 multiplies the coefficient output from the coefficient calculation block 102 by each of the eight grid correction color data, and cumulatively adds the multiplication results. Although the shift calculation circuit is incorporated in each of the coefficient calculation block 102 and the cumulative addition block 104, the shift calculation may be executed at any stage.

・・・6面体補間演算モードにおける線形補間演算
6面体補間演算では、補正色データの各成分Rout、Gout、Boutは原理的には以下の演算によって求められる。尚、Pnr、Png、Pnbは、それぞれグリッド色Pnに対応する補正色データのR成分、G成分、B成分である。
out=(15−r)×(15−g)×(15−b)×P0r/153
+(15−r)×(15−g)×b×P1r/153
+(15−r)×g×(15−b)×P2r/153
+(15−r)×g×b×P3r/153
+r×(15−g)×(15−b)×P4r/153
+r×(15−g)×b×P5r/153
+r×g×(15−b)×P6r/153
+r×g×b×P7r/153
out=(15−r)×(15−g)×(15−b)×P0g/153
+(15−r)×(15−g)×b×P1g/153
+(15−r)×g×(15−b)×P2g/153
+(15−r)×g×b×P3g/153
+r×(15−g)×(15−b)×P4g/153
+r×(15−g)×b×P5g/153
+r×g×(15−b)×P6g/153
+r×g×b×P7g/153
out=(15−r)×(15−g)×(15−b)×P0b/153
+(15−r)×(15−g)×b×P1b/153
+(15−r)×g×(15−b)×P2b/153
+(15−r)×g×b×P3b/153
+r×(15−g)×(15−b)×P4b/153
+r×(15−g)×b×P5b/153
+r×g×(15−b)×P6b/153
+r×g×b×P7b/153
... Linear interpolation calculation in hexahedral interpolation calculation mode In hexahedral interpolation calculation, the components R out , G out , and B out of the correction color data are obtained in principle by the following calculation. Incidentally, Pn r, Pn g, Pn b is, R component of the correction color data corresponding to the grid color Pn respectively, G component, and B component.
R out = (15−r) × (15−g) × (15−b) × P0 r / 15 3
+ (15-r) × (15-g) × b × P1 r / 15 3
+ (15-r) × g × (15-b) × P2 r / 15 3
+ (15-r) × g × b × P3 r / 15 3
+ R × (15−g) × (15−b) × P4 r / 15 3
+ R × (15−g) × b × P5 r / 15 3
+ R × g × (15−b) × P6 r / 15 3
+ R × g × b × P7 r / 15 3
G out = (15−r) × (15−g) × (15−b) × P0 g / 15 3
+ (15-r) × (15-g) × b × P1 g / 15 3
+ (15-r) × g × (15-b) × P2 g / 15 3
+ (15-r) × g × b × P3 g / 15 3
+ R × (15−g) × (15−b) × P4 g / 15 3
+ R × (15−g) × b × P5 g / 15 3
+ R * g * (15-b) * P6 g / 15 < 3 >
+ R × g × b × P7 g / 15 3
B out = (15−r) × (15−g) × (15−b) × P0 b / 15 3
+ (15-r) × (15-g) × b × P1 b / 15 3
+ (15-r) × g × (15-b) × P2 b / 15 3
+ (15-r) × g × b × P3 b / 15 3
+ R × (15−g) × (15−b) × P4 b / 15 3
+ R × (15−g) × b × P5 b / 15 3
+ R × g × (15−b) × P6 b / 15 3
+ R × g × b × P7 b / 15 3

しかし、153で割る除算回路は段数が多くなるため、本実施形態では、153で割る除算をシフト演算に置き換える。具体的には、以下の演算とディザ処理(0,1,2,3の固定値加算)の組み合わせによって補正色データの各成分Rout[7:0」、Gout[7:0」、Bout[7:0」が求められる。尚、以下の数式において>>nはnビット繰り下げるシフト演算を意味する。
out=(64−mR)×(64−mG)×(64−mB)×P0r>>16
+(64−mR)×(64−mG)×mB×P1r>>16
+(64−mR)×mG×(64−mB)×P2r>>16
+(64−mR)×mG×mB×P3r>>16
+mR×(64−mG)×(64−mB)×P4r>>16
+mR×(64−mG)×mB×P5r>>16
+mR×mG×(64−mB)×P6r>>16
+mR×mG×mB×P7r>>16
out={(64−mR)×(64−mG)×(64−mB)×P0g>>16
+(64−mR)×(64−mG)×mB×P1g>>16
+(64−mR)×mG×(64−mB)×P2g>>16
+(64−mR)×mG×mB×P3g>>16
+mR×(64−mG)×(64−mB)×P4g>>16
+mR×(64−mG)×mB×P5g>>16
+mR×mG×(64−mB)×P6g>>16
+mR×mG×mB×P7g>>16
out={(64−mR)×(64−mG)×(64−mB)×P0b>>16
+(64−mR)×(64−mG)×mB×P1b>>16
+(64−mR)×mG×(64−mB)×P2b>>16
+(64−mR)×mG×mB×P3b>>16
+mR×(64−mG)×(64−mB)×P4b>>16
+mR×(64−mG)×mB×P5b>>16
+mR×mG×(64−mB)×P6b>>16
+mR×mG×mB×P7b>>16
However, since the division circuit that divides by 15 3 has a large number of stages, in this embodiment, division by 15 3 is replaced with a shift operation. Specifically, each component R out [7: 0], G out [7: 0], B out of the correction color data is obtained by a combination of the following calculation and dither processing (fixed value addition of 0, 1, 2, 3). out [7: 0] is obtained. In the following formula, >> n means a shift operation that lowers n bits.
R out = (64−mR) × (64−mG) × (64−mB) × P0 r >> 16
+ (64-mR) × (64-mG) × mB × P1 r >> 16
+ (64-mR) × mG × (64-mB) × P2 r >> 16
+ (64-mR) × mG × mB × P3 r >> 16
+ MR × (64−mG) × (64−mB) × P4 r >> 16
+ MR × (64−mG) × mB × P5 r >> 16
+ MR × mG × (64−mB) × P6 r >> 16
+ MR × mG × mB × P7 r >> 16
G out = {(64-mR) × (64-mG) × (64-mB) × P0 g >> 16
+ (64-mR) × (64-mG) × mB × P1 g >> 16
+ (64-mR) × mG × (64-mB) × P2 g >> 16
+ (64-mR) × mG × mB × P3 g >> 16
+ MR × (64-mG) × (64-mB) × P4 g >> 16
+ MR × (64-mG) × mB × P5 g >> 16
+ MR × mG × (64−mB) × P6 g >> 16
+ MR × mG × mB × P7 g >> 16
B out = {(64-mR) × (64-mG) × (64-mB) × P0 b >> 16
+ (64-mR) × (64-mG) × mB × P1 b >> 16
+ (64-mR) × mG × (64-mB) × P2 b >> 16
+ (64-mR) × mG × mB × P3 b >> 16
+ MR × (64-mG) × (64-mB) × P4 b >> 16
+ MR × (64−mG) × mB × P5 b >> 16
+ MR × mG × (64−mB) × P6 b >> 16
+ MR × mG × mB × P7 b >> 16

回路70は、元色データの各成分Rin[7:0]、Gin[7:0]、Bin[7:0]の下位4ビット(r[3:0]、g[3:0]、b[3:0])が表す数を、その4倍に近い数mR、mG、mBに変換する。r[3:0]とmR[6:0]の対応関係は例えば図15に示すとおりである。回路74はセレクタ78に64及び0を入力する。回路76は(64−mR)、(64−mG)及び(64−mB)をそれぞれ出力する除算回路である。セレクタ78はグリッド補正色データ毎に(64−mR)、(64−mG)、(64−mB)、mR、mG、mBのうちのいずれか3つを選択しフリップフロップ80に出力する選択回路である。グリッド補正色データとセレクタ78が選択する3つのデータとの対応関係は上記の式に対応している。例えばP0に対応するグリッド補正色データに対しては(64−mR)、(64−mG)、(64−mB)が選択され、P1に対応するグリッド補正色データに対しては(64−mR)、(64−mG)、mBが選択される。乗算回路82はセレクタ78によって選択された(64−mR)、(64−mG)、(64−mB)、mR、mG、mBのうちのいずれか3つを掛け合わせる。回路84は乗算回路82から出力される値を32で割るために5ビットシフトするシフト演算回路である。 The circuit 70 outputs the lower 4 bits (r [3: 0], g [3: 0] of each component R in [7: 0], G in [7: 0], B in [7: 0] of the original color data. ], B [3: 0]) are converted into numbers mR, mG, and mB that are nearly four times the number. The correspondence between r [3: 0] and mR [6: 0] is, for example, as shown in FIG. The circuit 74 inputs 64 and 0 to the selector 78. The circuit 76 is a division circuit that outputs (64-mR), (64-mG), and (64-mB), respectively. The selector 78 selects any three of (64-mR), (64-mG), (64-mB), mR, mG, and mB for each grid correction color data and outputs the selected data to the flip-flop 80. It is. The correspondence between the grid correction color data and the three data selected by the selector 78 corresponds to the above equation. For example, (64-mR), (64-mG), and (64-mB) are selected for grid correction color data corresponding to P0, and (64-mR) for grid correction color data corresponding to P1. ), (64-mG), mB are selected. The multiplication circuit 82 multiplies any three of (64-mR), (64-mG), (64-mB), mR, mG, and mB selected by the selector 78. The circuit 84 is a shift arithmetic circuit that shifts the value output from the multiplication circuit 82 by 5 bits to divide by 32.

乗算回路90、103、112には、グリッド補正色データのR、G、Bの各成分であるPr、Pg、Pbがフリップフロップ86、88を介して入力される。乗算回路90はグリッド補正色データのR成分であるPrと係数演算ブロック102から出力される値とを掛け合わせる。ユニットアドレス生成ブロック66から順次出力される8個のグリッド補正色データのR成分であるP0r、P1r、P2r、P3r、P4r、P5r、P6r、P7rと係数演算ブロック102から順次出力される8個の値とが掛け合わされた8個の乗算結果が乗算回路90から順次出力される。乗算回路103、112はグリッド補正色データのG、B成分であるPg、Pbについて乗算回路90と同一の演算を実行する。
回路92、回路105、回路114は乗算回路90、乗算回路103、乗算回路112から出力される値をそれぞれ211で割るためのシフト演算回路である。
The multiplication circuits 90, 103, and 112 receive Pr, Pg, and Pb that are R, G, and B components of the grid correction color data via the flip-flops 86 and 88. The multiplication circuit 90 multiplies Pr, which is the R component of the grid correction color data, and the value output from the coefficient calculation block 102. Eight components sequentially output from the coefficient calculation block 102 and P0r, P1r, P2r, P3r, P4r, P5r, P6r, P7r, which are R components of the eight grid correction color data sequentially output from the unit address generation block 66. Eight multiplication results multiplied by the value are sequentially output from the multiplication circuit 90. The multiplication circuits 103 and 112 execute the same operation as the multiplication circuit 90 for Pg and Pb which are the G and B components of the grid correction color data.
Circuits 92, 105, and 114 are shift operation circuits for dividing the values output from the multiplier circuit 90, the multiplier circuit 103, and the multiplier circuit 112 by 2 11 , respectively.

上述の演算によって回路92から1つの注目画素のR成分について以下の8個の値が順次出力される。加算回路94及びフリップフロップ96は、以下の8個の値を累積加算する。
(64−mR)×(64−mG)×(64−mB)×P0r>>16
(64−mR)×(64−mG)×mB×P1r>>16
(64−mR)×mG×(64−mB)×P2r>>16
(64−mR)×mG×mB×P3r>>16
mR×(64−mG)×(64−mB)×P4r>>16
mR×(64−mG)×mB×P5r>>16
mR×mG×(64−mB)×P6r>>16
mR×mG×mB×P7r>>16
By the above calculation, the following eight values are sequentially output from the circuit 92 for the R component of one target pixel. The adder circuit 94 and the flip-flop 96 cumulatively add the following eight values.
(64-mR) × (64-mG) × (64-mB) × P0 r >> 16
(64-mR) × (64-mG) × mB × P1 r >> 16
(64-mR) × mG × (64-mB) × P2 r >> 16
(64-mR) × mG × mB × P3 r >> 16
mR × (64-mG) × (64-mB) × P4 r >> 16
mR × (64-mG) × mB × P5 r >> 16
mR × mG × (64−mB) × P6 r >> 16
mR × mG × mB × P7 r >> 16

また、上述の演算によって回路105から1つの注目画素のG成分について以下の8個の値が順次出力される。加算回路106及びフリップフロップ108は、以下の8個の値を累積加算する。
(64−mR)×(64−mG)×(64−mB)×P0g>>16
(64−mR)×(64−mG)×mB×P1g>>16
(64−mR)×mG×(64−mB)×P2g>>16
(64−mR)×mG×mB×P3g>>16
mR×(64−mG)×(64−mB)×P4g>>16
mR×(64−mG)×mB×P5g>>16
mR×mG×(64−mB)×P6g>>16
mR×mG×mB×P7g>>16
Further, the following eight values are sequentially output from the circuit 105 for the G component of one target pixel by the above-described calculation. The adder circuit 106 and the flip-flop 108 cumulatively add the following eight values.
(64-mR) × (64-mG) × (64-mB) × P0 g >> 16
(64-mR) × (64-mG) × mB × P1 g >> 16
(64-mR) × mG × (64-mB) × P2 g >> 16
(64-mR) × mG × mB × P3 g >> 16
mR × (64-mG) × (64-mB) × P4 g >> 16
mR × (64-mG) × mB × P5 g >> 16
mR × mG × (64-mB) × P6 g >> 16
mR × mG × mB × P7 g >> 16

また、上述の演算によって回路114から1つの注目画素のB成分について以下の8個の値が順次出力される。加算回路116及びフリップフロップ118は、以下の8個の値を累積加算する。
(64−mR)×(64−mG)×(64−mB)×P0b>>16
(64−mR)×(64−mG)×mB×P1b>>16
(64−mR)×mG×(64−mB)×P2b>>16
(64−mR)×mG×mB×P3b>>16
mR×(64−mG)×(64−mB)×P4b>>16
mR×(64−mG)×mB×P5b>>16
mR×mG×(64−mB)×P6b>>16
mR×mG×mB×P7b>>16
Further, the following eight values are sequentially output from the circuit 114 for the B component of one target pixel by the above-described calculation. The adder circuit 116 and the flip-flop 118 cumulatively add the following eight values.
(64-mR) × (64-mG) × (64-mB) × P0 b >> 16
(64-mR) × (64-mG) × mB × P1 b >> 16
(64-mR) × mG × (64-mB) × P2 b >> 16
(64-mR) × mG × mB × P3 b >> 16
mR × (64-mG) × (64-mB) × P4 b >> 16
mR × (64-mG) × mB × P5 b >> 16
mR × mG × (64-mB) × P6 b >> 16
mR × mG × mB × P7 b >> 16

回路98、110、120はそれぞれディザ処理と4で割るための2ビットシフト演算によって補正色データのR成分Rout[7:0」、G成分Gout[7:0」、B成分Bout[7:0」を生成する。ディザ処理では、注目画素の位置に応じて0,1,2,3のいずれかの値が加算される。図16はディザパターンを例示している。この結果、8ビット精度のRout[7:0」、Gout[7:0」、Bout[7:0」は、10ビット精度の面積階調を有することになる。補正色データの各成分Rout[7:0」、Gout[7:0」、Bout[7:0」はフリップフロップ100を介して累積加算ブロック104から同時に出力される。 Circuit 98,110,120 correction color data by 2 bits shift operation for dividing by dithering and 4 each R component R out [7: 0 ", G component G out [7: 0", B component B out [ 7: 0 "is generated. In the dither processing, one of 0, 1, 2, and 3 is added according to the position of the target pixel. FIG. 16 illustrates a dither pattern. As a result, R out [7: 0], G out [7: 0], and B out [7: 0] with 8-bit precision have area gradations with 10-bit precision. The components R out [7: 0], G out [7: 0], and B out [7: 0] of the correction color data are simultaneously output from the cumulative addition block 104 via the flip-flop 100.

・・・4面体補間演算モードにおける係数演算
図17に示すように、P0とP7を結ぶ対角線で1個のユニットは6個の4面体領域に分割される。この4面体領域をサブユニットというものとする。4面体補間演算では、注目画素の色を包含するサブユニットの頂点に対応する4個のグリッド補正色データが必要になる。しかし、本実施形態では、4面体補間演算モードでも6面体補間演算モードでもセレクタ78を除いて色変換ブロック17の作動は同一である。このため4面体補間演算モードでは、係数演算ブロック102はユニットデータを構成する8個のグリッド補正色データのうちの4個に掛け合わせる係数を0にセットする。すなわち、注目画素の色を包含するサブユニットの頂点に対応しない4個のグリッド補正色データに対応する係数が0にセットされる。具体的には、4面体補間演算モードでは、注目画素の色を包含するサブユニットを特定するための判定を比較回路としての回路72及びセレクタ78で実行し、セレクタ78はその演算結果に応じて係数の要素として64、0、(64−mR)、(64−mG)、(64−mB)、mR、mG、mB、(mR−mG)、(mR−mB)、(mG−mR)、(mG−mB)、(mB−mR)、(mB−mG)のうちのいずれか3つを選択しフリップフロップ80に出力する。回路72は、元色データの各成分Rin[7:0]、Gin[7:0]、Bin[7:0]の下位4ビット(r[3:0]、g[3:0]、b[3:0])の大小関係を明らかにするための減算回路である。
... Coefficient calculation in tetrahedral interpolation calculation mode As shown in FIG. 17, one unit is divided into six tetrahedron regions by a diagonal line connecting P0 and P7. This tetrahedral region is called a subunit. In the tetrahedral interpolation calculation, four grid correction color data corresponding to the vertices of the subunits including the color of the target pixel are required. However, in this embodiment, the operation of the color conversion block 17 is the same except for the selector 78 in both the tetrahedral interpolation calculation mode and the hexahedral interpolation calculation mode. Therefore, in the tetrahedral interpolation calculation mode, the coefficient calculation block 102 sets the coefficient to be multiplied to four of the eight grid correction color data constituting the unit data to zero. That is, the coefficients corresponding to the four grid correction color data that do not correspond to the vertices of the subunits including the color of the target pixel are set to 0. Specifically, in the tetrahedral interpolation calculation mode, a determination for specifying a subunit including the color of the pixel of interest is performed by the circuit 72 and the selector 78 as a comparison circuit, and the selector 78 determines according to the calculation result. 64, 0, (64-mR), (64-mG), (64-mB), mR, mG, mB, (mR-mG), (mR-mB), (mG-mR) as coefficient elements Any three of (mG-mB), (mB-mR), and (mB-mG) are selected and output to the flip-flop 80. The circuit 72 outputs the lower 4 bits (r [3: 0], g [3: 0] of each component R in [7: 0], G in [7: 0], B in [7: 0] of the original color data. ], B [3: 0]) is a subtraction circuit for clarifying the magnitude relationship.

回路72及びセレクタ78によって行われるサブユニットの特定は次の表1の通りである。

Figure 2007189487
The subunits specified by the circuit 72 and the selector 78 are as shown in Table 1 below.
Figure 2007189487

四面体補間モードにおいてセレクタ78によって選択される3つの係数要素とグリッド変換色データの対応関係は下記の表2〜表7の通りである。尚、注目画素の色が6つのサブユニットによって共有されるユニットの対角線上に位置する場合、mR−mG、mG−mB、mB−mRがいずれも0になる。この場合、いずれのサブユニットについて補間演算を行っても同一の演算結果が得られる。本実施形態では、mR−mG、mG−mB、mB−mRがいずれも正または0の場合にはサブユニットAについて補間演算が実行され、mR−mG、mG−mB、mB−mRがいずれも負の場合にはサブユニットFについて補間演算が実行される。

Figure 2007189487
Figure 2007189487
Figure 2007189487
Figure 2007189487
Figure 2007189487
Figure 2007189487
The correspondence relationships between the three coefficient elements selected by the selector 78 in the tetrahedral interpolation mode and the grid conversion color data are as shown in Tables 2 to 7 below. Note that when the color of the target pixel is located on a diagonal line of a unit shared by the six subunits, mR-mG, mG-mB, and mB-mR are all 0. In this case, the same calculation result can be obtained regardless of the interpolation calculation for any subunit. In the present embodiment, when mR-mG, mG-mB, and mB-mR are all positive or 0, interpolation calculation is performed for subunit A, and mR-mG, mG-mB, and mB-mR are all If negative, an interpolation operation is performed for subunit F.
Figure 2007189487
Figure 2007189487
Figure 2007189487
Figure 2007189487
Figure 2007189487
Figure 2007189487

・・データ出力
以上の演算によって累積加算ブロック104から出力される補正色データは、データインタフェースブロック62(図11参照)に出力される。また、4つの注目画素について補間演算が終了すると補間演算ブロック68から補間演算終了通知out_enがデータインタフェースブロック62に出力され、補間演算終了通知out_enの入力に応じてデータインタフェースブロック62から4画素分の補正色データが端子sd_d_outから出力される。このとき4画素分の補正色データで色が表される画素(4つの注目画素に対応する補正画像の4つの画素)に対応するアドレス信号req_swが出力され、4画素分の補正色データをRAM14に書き込むための書き込み要求信号req_swが出力される。また、補間演算終了通知out_enが入力されると、データインタフェースブロック62は次の4画素について上述したデータ入力を繰り返す。
.. Data output The correction color data output from the cumulative addition block 104 by the above calculation is output to the data interface block 62 (see FIG. 11). When the interpolation calculation is completed for the four target pixels, an interpolation calculation end notification out_en is output from the interpolation calculation block 68 to the data interface block 62, and four pixels worth of data are output from the data interface block 62 according to the input of the interpolation calculation end notification out_en. The corrected color data is output from the terminal sd_d_out. At this time, the address signal req_sw corresponding to the pixel whose color is represented by the correction color data for four pixels (four pixels of the correction image corresponding to the four target pixels) is output, and the correction color data for four pixels is stored in the RAM 14. A write request signal req_sw for writing to is output. When the interpolation calculation end notification out_en is input, the data interface block 62 repeats the data input described above for the next four pixels.

[画像補正の流れ]
図1は、プリンタ1による写真画像の自動画質補正のための色補正の流れを示すフローチャートである。図1に示す処理はステップS114を除いて上述した制御プログラムを実行するCPU22によって実行される。
ステップS100では印刷設定パラメータが解析され、補正パラメータを変動させるための制御値が設定される。具体的には印刷制御モジュール40(図4参照)から渡された印刷設定パラメータが色補正制御モジュール42によって解析され、印刷設定パラメータに応じて補正パラメータの制御値が設定される。画像補正に影響を与える印刷設定パラメータは例えば印刷対象の写真画像に対して設定されるシーンや輝度操作値やコントラスト操作値である。シーン設定としては、標準、人物、風景、夜景、逆光等がある。シーン設定、輝度操作値、コントラスト操作値等に応じて補正パラメータが表す制御点の上下幅を変動させる制御値が設定される。
[Flow of image correction]
FIG. 1 is a flowchart showing the flow of color correction for automatic image quality correction of a photographic image by the printer 1. The process shown in FIG. 1 is executed by the CPU 22 that executes the control program described above except for step S114.
In step S100, the print setting parameter is analyzed, and a control value for changing the correction parameter is set. Specifically, the print setting parameter passed from the print control module 40 (see FIG. 4) is analyzed by the color correction control module 42, and the control value of the correction parameter is set according to the print setting parameter. The print setting parameters that affect image correction are, for example, scenes, brightness operation values, and contrast operation values that are set for a photographic image to be printed. The scene settings include standard, person, landscape, night view, backlight, and the like. A control value for changing the vertical width of the control point represented by the correction parameter is set according to the scene setting, the brightness operation value, the contrast operation value, and the like.

ステップS102では印刷対象の元画像が解析される。すなわち、補正パラメータ生成モジュール48によって、RGBトーンの元画像がサンプリングされ、サンプリングによって生成されたQVGAサイズのRGBトーン画像等の統計値が導出される。尚、印刷対象がJPEGフォーマットである場合には、解析前のデコードによりRGBトーンの元画像が生成される。また印刷対象がRAWデータの場合には、解析前のデモザイク処理によりRGBトーンの元画像が生成される。詳細は、3次元色変換テーブルの生成について既に述べたとおりである。   In step S102, the original image to be printed is analyzed. That is, the correction parameter generation module 48 samples an RGB tone original image, and derives a statistical value such as a QVGA size RGB tone image generated by the sampling. When the print target is the JPEG format, an RGB tone original image is generated by decoding before analysis. When the print target is RAW data, an RGB tone original image is generated by demosaic processing before analysis. The details are as described above for generating the three-dimensional color conversion table.

ステップS104では補正パラメータが設定される。すなわち、補正パラメータ生成モジュール48によって、元画像の解析結果と補正パラメータの制御値とに応じた補正パラメータが設定される。詳細は、3次元色変換テーブルの生成について既に述べたとおりである。   In step S104, correction parameters are set. In other words, the correction parameter generation module 48 sets a correction parameter according to the analysis result of the original image and the control value of the correction parameter. The details are as described above for generating the three-dimensional color conversion table.

補正パラメータによって決まるトーンカーブの制御点の上下幅が大きくなると、トーンカーブの曲率半径が平均的に小さくなるため、トーンカーブを規定する1次元色変換テーブルによって求まる補正色データの各成分と線形補間演算によって求まる補正色データの各成分との差(図18に示すΔB参照)が大きくなる。この差が大きくなると、補正画像の階調のなめらかさが損なわれる。   When the vertical width of the control point of the tone curve determined by the correction parameter increases, the radius of curvature of the tone curve decreases on average, so each component of the correction color data determined by the one-dimensional color conversion table that defines the tone curve and linear interpolation A difference (see ΔB shown in FIG. 18) from each component of the correction color data obtained by the calculation becomes large. When this difference increases, the smoothness of the gradation of the corrected image is impaired.

そこでステップS106では、3次元色変換テーブルの検証結果がハードウェアによる色補正の可能な範囲を決める第一の基準であるパラメータ基準を満たすか否かが補正方法判定モジュール44によって判定される。具体的には例えば、各補正パラメータの下限値及び上限値をパラメータ基準として保持する図19に示すテーブルに基づいて次のように判定される。このテーブルは制御プログラムに包含されている。補正パラメータの1つであるパラメータ1(例えばハイライトパラメータ)が基準下限値である−50以下又は基準上限値である+50以上であればパラメータ基準は満たされていないと判定される。この場合、連続モードに設定され、ステップS116の処理に進む。また、基準下限値以下又は基準上限値以上の補正パラメータが1つでも存在すればパラメータ基準は満たされていないと判定される。パラメータ基準は例えば次のように定められる。まず多数の写真画像に対して任意の補正パラメータが設定され、設定された補正パラメータに応じて3次元色変換テーブルが生成される。次に、生成された3次元色変換テーブルを用いた線形補間演算によって多数の補正画像が生成される。このようにして生成された多数の補正画像を感覚的に評価することによって、いずれの補正画像についても十分な画質の補正画像が得られる補正パラメータを特定することができる。   Therefore, in step S106, the correction method determination module 44 determines whether or not the verification result of the three-dimensional color conversion table satisfies a parameter criterion that is a first criterion for determining a color correction possible range by hardware. Specifically, for example, the determination is made as follows based on a table shown in FIG. 19 that holds the lower limit value and the upper limit value of each correction parameter as parameter references. This table is included in the control program. If parameter 1 (for example, a highlight parameter), which is one of the correction parameters, is −50 or less that is a reference lower limit value or +50 or more that is a reference upper limit value, it is determined that the parameter criterion is not satisfied. In this case, the continuous mode is set, and the process proceeds to step S116. If there is even one correction parameter that is equal to or less than the reference lower limit value or greater than the reference upper limit value, it is determined that the parameter criterion is not satisfied. The parameter criterion is determined as follows, for example. First, arbitrary correction parameters are set for a large number of photographic images, and a three-dimensional color conversion table is generated according to the set correction parameters. Next, a large number of corrected images are generated by linear interpolation using the generated three-dimensional color conversion table. By evaluating a large number of correction images generated in this way, it is possible to specify a correction parameter for obtaining a correction image with sufficient image quality for any correction image.

パラメータ基準が満たされている場合、テーブル生成モジュール50によって3次元色変換テーブルが生成される(ステップS108)。パラメータ基準が満たされない限り、3次元色変換テーブルが生成されないため、十分な画質の補正画像を生成できない3次元色変換テーブルが無駄に生成されることがない。まず、R、G及びB成分のトーンカーブに対応する1次元色変換テーブルが補正パラメータに基づいて生成される。また、3次元色変換テーブルの開始アドレスが設定される。任意のグリッド色の各成分に対応する出力階調が3つの1次元色変換テーブルからそれぞれグリッド補正色データの各成分として取得される。取得された各グリッド補正色データは対応するグリッド色に対応するアドレスに格納される。これらの詳細は既に説明したとおりである。実際には、各画素がグリッド色である画像を元画像としてS/W色補正モジュール52による色補正を実行すれば、各画素がグリッド補正色データで構成される画像が生成されるため、このように生成した画像の各画素の画素値をグリッド補正色データとして順次所定のアドレスに格納すればよい。   If the parameter criterion is satisfied, the table generation module 50 generates a three-dimensional color conversion table (step S108). Since the 3D color conversion table is not generated unless the parameter criterion is satisfied, the 3D color conversion table that cannot generate a corrected image with sufficient image quality is not generated wastefully. First, a one-dimensional color conversion table corresponding to the tone curves of the R, G, and B components is generated based on the correction parameters. In addition, the start address of the three-dimensional color conversion table is set. Output gradation corresponding to each component of an arbitrary grid color is acquired as each component of grid correction color data from the three one-dimensional color conversion tables. Each acquired grid correction color data is stored at an address corresponding to the corresponding grid color. These details are as described above. Actually, if color correction by the S / W color correction module 52 is performed using an image in which each pixel has a grid color as an original image, an image in which each pixel is composed of grid correction color data is generated. The pixel value of each pixel of the generated image may be sequentially stored at a predetermined address as grid correction color data.

ステップS110では、3次元色変換テーブルが補正方法判定モジュール44によって検証される。線形補間演算の精度が統計的に最も悪くなるのは、元色データが表す色がユニットの重心に位置する場合である。したがって、ユニットの重心に対応する色(判定色)を表す元色データに対して色変換ブロック17による線形補間演算を実行し、線形補間演算の結果として求まる補正色データ(第二補正色データ)と、R、G及びBのトーンカーブに対応する1次元色変換テーブルを用いたソフトウェア処理によって求まる補正色データ(第一補正色データ)とを比較することによって線形補間演算の精度を判定することができる。ここで、色変換ブロック17による線形補間演算によって求まる補正色データを(Rh、Gh、Bh)とし、R、G及びBのトーンカーブに対応する1次元色変換テーブルを用いたソフトウェア処理(S/W色補正モジュール52による色補正処理)によって求まる補正色データを(Rs、Gs、Bs)とする(図20参照)。ステップS110では、ユニットの重心に対応する2つの補正色データ(Rh、Gh、Bh)及び(Rs、Gs、Bs)が示す色空間内の2点間の距離Δdの二乗が求められる。
Δd2=(Rh−Rs)2+(Gh−Gs)2+(Rh−Rs)2
In step S110, the three-dimensional color conversion table is verified by the correction method determination module 44. The accuracy of the linear interpolation calculation is statistically worst when the color represented by the original color data is located at the center of gravity of the unit. Therefore, the correction color data (second correction color data) obtained as a result of the linear interpolation calculation by executing the linear interpolation calculation by the color conversion block 17 on the original color data representing the color (determination color) corresponding to the center of gravity of the unit. And the accuracy of the linear interpolation operation is determined by comparing the correction color data (first correction color data) obtained by software processing using the one-dimensional color conversion table corresponding to the R, G, and B tone curves. Can do. Here, the correction color data obtained by the linear interpolation calculation by the color conversion block 17 is (R h , G h , B h ), and software processing using a one-dimensional color conversion table corresponding to the R, G, and B tone curves. The correction color data obtained by (color correction processing by the S / W color correction module 52) is assumed to be (R s , G s , B s ) (see FIG. 20). In step S110, the two correction color data (R h , G h , B h ) corresponding to the center of gravity of the unit and the square of the distance Δd between the two points in the color space indicated by (R s , G s , B s ) Is required.
Δd 2 = (Rh−Rs) 2 + (Gh−Gs) 2 + (Rh−Rs) 2

3次元色変換テーブルの検証は全てのユニットを対象として実行されてもよいし、一部のユニットを対象として実行されてもよい。例えば、Rin=Gin=Binであるグレー軸では色のねじれや階調飛びが特に目立つため、グレー軸が貫くユニットのみ、或いはグレー軸が貫くユニットとそれらに隣接するユニットのみを対象として3次元色変換テーブルの検証が実行されてもよい。3次元色変換テーブルの検証を一部のユニットに限定して実行することにより、検証に要する時間を短縮することができる。 The verification of the three-dimensional color conversion table may be executed for all units, or may be executed for some units. For example, since the color twist and gradation jump are particularly noticeable on the gray axis where R in = G in = B in , only the unit through which the gray axis penetrates, or only the unit through which the gray axis penetrates and the adjacent unit are targeted. Verification of the three-dimensional color conversion table may be performed. By executing the verification of the three-dimensional color conversion table only for some units, the time required for the verification can be shortened.

具体的には例えば以下のようにして3次元色変換テーブルが検証される。まず、検証対象となる各ユニットの重心に対応する元色データで各画素の色が表されたサンプル画像に対してS/W色補正モジュール52によって1次元色変換テーブルを用いた色補正が実行され、その結果としてS/W補正画像が生成される。また、同じサンプル画像に対して色変換ブロック17による線形補間演算が実行され、その結果としてH/W補正画像が生成される。そして、S/W補正画像とH/W補正画像の全画素についてΔd2が導出される。最後に、全画素について導出されたΔd2を母集団として、平均値、最大値、中央値等の統計値が導出される。 Specifically, for example, the three-dimensional color conversion table is verified as follows. First, the S / W color correction module 52 performs color correction using a one-dimensional color conversion table on the sample image in which the color of each pixel is represented by the original color data corresponding to the center of gravity of each unit to be verified. As a result, an S / W corrected image is generated. Further, a linear interpolation operation by the color conversion block 17 is executed on the same sample image, and as a result, an H / W corrected image is generated. Then, Δd 2 is derived for all the pixels of the S / W corrected image and the H / W corrected image. Finally, statistical values such as an average value, a maximum value, and a median value are derived using Δd 2 derived for all pixels as a population.

ステップS112では、3次元色変換テーブルの検証結果がハードウェアによる色補正の可能な範囲を決める第二の基準であるテーブル基準を満たしているか否かが補正方法判定モジュール44によって判定される。具体的には例えば、S/W補正画像とH/W補正画像とから求められたΔd2を母集団として導出された平均値、最大値、中央値等の統計値がテーブル基準として予め決められた固定値以下であれば、テーブル基準を満たしていると判定される。このような定量解析によってハードウェアによる色補正の可能な範囲を決めることにより、元画像がどのような画質であっても補正画像の目標画質を精度よく管理することができる。 In step S112, the correction method determination module 44 determines whether or not the verification result of the three-dimensional color conversion table satisfies a table criterion that is a second criterion for determining a color correction possible range by hardware. Specifically, for example, statistical values such as an average value, a maximum value, and a median value derived as a population from Δd 2 obtained from the S / W correction image and the H / W correction image are determined in advance as a table reference. If it is less than the fixed value, it is determined that the table criterion is satisfied. By determining the possible range of color correction by hardware through such quantitative analysis, the target image quality of the corrected image can be accurately managed regardless of the image quality of the original image.

パラメータ基準もテーブル基準も満たされている場合、ステップS114においてハードウェアによる画像の色補正が実行される。すなわち、色変換ブロック17によって既に述べたとおりの線形補間演算が実行され、色変換ブロック17によって導出された変換データがH/W色補正モジュール54によって設定される補正画像の開始アドレスから順次RAM14に格納される。その結果、各画素の色が変換データで表された補正画像が生成される。
パラメータ基準、テーブル基準のいずれかが満たされていない場合、ステップS116においてソフトウェアによる画像補正が実行される。すなわち、S/W色補正モジュール52を実行するCPU22によって以下の処理が行われる。
If both the parameter criterion and the table criterion are satisfied, color correction of the image by hardware is executed in step S114. In other words, the linear interpolation operation as described above is executed by the color conversion block 17, and the conversion data derived by the color conversion block 17 is sequentially stored in the RAM 14 from the start address of the correction image set by the H / W color correction module 54. Stored. As a result, a corrected image in which the color of each pixel is represented by the conversion data is generated.
If either the parameter criterion or the table criterion is not satisfied, image correction by software is executed in step S116. That is, the CPU 22 that executes the S / W color correction module 52 performs the following processing.

図21はソフトウェアによる画像補正の処理の流れを示すフローチャートである。
ステップS200では、元画像の画素の1つが注目画素として選択される。
ステップS202では、注目画素の色を表す元色データがRAM14からCPU22に読み込まれる。
ステップS204では、元色データのR成分がR成分のトーンカーブに対応する一次元変換テーブルのアドレスに変換され、元色データのG成分がG成分のトーンカーブに対応する一次元変換テーブルのアドレスに変換され、元色データのB成分がB成分のトーンカーブに対応する一次元変換テーブルのアドレスに変換される。生成された3つのアドレスから補正色データのR、G及びB成分が順次CPU22に読み込まれる。
ステップS206では、注目画素に対応する画素に補正色データが格納される。すなわち、注目画素に対応するRAM14のアドレスに補正色データが格納される。
ステップS208では注目画素が元画像の最終画素であるかが判定される。ステップS200からステップS206までの処理が元画像の最終画素まで繰り返される。
FIG. 21 is a flowchart showing a flow of image correction processing by software.
In step S200, one of the pixels of the original image is selected as the target pixel.
In step S202, original color data representing the color of the target pixel is read from the RAM 14 into the CPU 22.
In step S204, the R component of the original color data is converted into an address of a one-dimensional conversion table corresponding to the tone curve of the R component, and the address of the one-dimensional conversion table corresponding to the G component of the original color data corresponds to the tone curve of the G component. The B component of the original color data is converted into an address of a one-dimensional conversion table corresponding to the tone curve of the B component. The R, G, and B components of the correction color data are sequentially read into the CPU 22 from the three generated addresses.
In step S206, the correction color data is stored in the pixel corresponding to the target pixel. That is, the correction color data is stored at the address of the RAM 14 corresponding to the target pixel.
In step S208, it is determined whether the target pixel is the last pixel of the original image. The processing from step S200 to step S206 is repeated up to the last pixel of the original image.

以上述べた連続モードにおけるソフトウェアによる色補正では、元色データの読み込み、R成分の1次元色変換テーブルのアドレス生成、補正色データのR成分の読み込み、G成分の1次元色変換テーブルのアドレス生成、補正色データのG成分の読み込み、B成分の1次元色変換テーブルのアドレス生成、補正色データのB成分の読み込み、補正色データの書き込みという一連の処理が画素毎にCPU22によって繰り返されるため、ハードウェアによる色補正よりも色補正にかかる時間が長くなる。一方、ソフトウェアによる色補正では、2563色のRGB色空間で表される全色に対応する補正色データを保持する1次元色変換テーブルで非線形な色変換が実行されるため、3次元色変換テーブルを用いた線形補間演算による色変換に比べて緻密な色変換が可能である。本実施形態では、補正パラメータによって決まる補正量に応じてソフトウェアによる色補正とハードウェアによる色補正とが切り換わるため、ハードウェアによる色補正によって補正画像の画質が実質的に劣化することはない。またハードウェアによって色補正がされる限りは高速に色補正が実行される。また自動設定された撮像条件のもとでディジタルカメラによって生成された写真画像に対しては、ほとんどの場合、補正量が小幅な色補正によって適性画質を得ることができる。したがって、実際には相当高い割合でハードウェアによる色補正によって写真画像の画質改善が可能である。 In the color correction by software in the continuous mode described above, reading of the original color data, generation of the address of the R component one-dimensional color conversion table, reading of the R component of the correction color data, generation of the address of the G component one-dimensional color conversion table The CPU 22 repeats a series of processes of reading the G component of the correction color data, generating the address of the one-dimensional color conversion table of the B component, reading the B component of the correction color data, and writing the correction color data for each pixel. The time required for color correction is longer than that for hardware color correction. On the other hand, in the color correction by software, 256 for nonlinear color conversion by a one-dimensional color conversion table holding the correction color data corresponding to all the colors represented by the three colors RGB color space is executed, three-dimensional color conversion More precise color conversion is possible than color conversion by linear interpolation using a table. In the present embodiment, since the color correction by software and the color correction by hardware are switched according to the correction amount determined by the correction parameter, the image quality of the corrected image is not substantially deteriorated by the color correction by hardware. As long as color correction is performed by hardware, color correction is performed at high speed. In most cases, a suitable image quality can be obtained by color correction with a small correction amount for a photographic image generated by a digital camera under an automatically set imaging condition. Therefore, the image quality of photographic images can be improved by color correction by hardware at a considerably high rate in practice.

[他の実施形態]
以上述べた実施形態では、写真画像の解析結果に基づいて3次元色変換テーブルが生成されたが、写真画像を解析せずに3次元色変換テーブルを生成してもよい。例えば、補正パラメータが一義的に決まる制御値が印刷対象となる画像に添付されているような場合には、写真画像を解析しなくても、その写真画像に対して適正な3次元色変換テーブルを生成することが可能である。また本実施形態では、ソフトウェア処理による色補正では、1次元色変換テーブルを用いたトーンカーブ変換で補正色データが導出されたが、1画素毎に四則演算を伴う関数演算によって補正色データが導出されてもよい。このような関数演算を定義する情報(プログラムコード)や一次元色変換テーブルが関数情報に相当する。また、本発明はプリンタ以外の様々な画像処理装置に適用可能である。本発明が適用可能な画像処理装置としては、例えばプロジェクタ、ディジタルカメラ、イメージスキャナ、MFP(Multi Function Printer)、レーザ複写機、写真画像の専用プリントシステムなどがある。
[Other Embodiments]
In the embodiment described above, the three-dimensional color conversion table is generated based on the analysis result of the photographic image. However, the three-dimensional color conversion table may be generated without analyzing the photographic image. For example, when a control value for which a correction parameter is uniquely determined is attached to an image to be printed, an appropriate three-dimensional color conversion table for the photographic image can be obtained without analyzing the photographic image. Can be generated. In this embodiment, in the color correction by software processing, the correction color data is derived by tone curve conversion using a one-dimensional color conversion table. However, the correction color data is derived by function calculation with four arithmetic operations for each pixel. May be. Information (program code) defining such a function operation and a one-dimensional color conversion table correspond to the function information. Further, the present invention can be applied to various image processing apparatuses other than a printer. Examples of the image processing apparatus to which the present invention can be applied include a projector, a digital camera, an image scanner, an MFP (Multi Function Printer), a laser copying machine, and a photographic image dedicated printing system.

本発明の一実施形態に係るフローチャート。The flowchart which concerns on one Embodiment of this invention. 本発明の一実施形態に係るブロック図。The block diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るブロック図。The block diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るブロック図。The block diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るトーンカーブを示す図。The figure which shows the tone curve which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るメモリマップ。The memory map which concerns on one Embodiment of this invention. 本発明の一実施形態に係るブロック図。The block diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るタイミング図。The timing diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るアドレス信号を説明する表。The table explaining the address signal concerning one embodiment of the present invention. 本発明の一実施形態に係るブロック図。The block diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るトーンカーブを示す図。The figure which shows the tone curve which concerns on one Embodiment of this invention. 本発明の一実施形態に係るパラメータ基準を示す表。The table which shows the parameter standard concerning one embodiment of the present invention. 本発明の一実施形態に係る模式図。The schematic diagram which concerns on one Embodiment of this invention. 本発明の一実施形態に係るフローチャート。The flowchart which concerns on one Embodiment of this invention.

符号の説明Explanation of symbols

1:プリンタ(画像処理装置)、17:色変換ブロック(専用プロセッサ)、22:CPU22(汎用プロセッサ)、42:色補正制御モジュール(モード設定手段)、44:補正方法判定モジュール(パラメータ判定手段、テーブル設定手段)、48:補正パラメータ生成モジュール(解析手段)、50:テーブル生成モジュール(テーブル生成手段)、52:S/W色補正モジュール(連続補正手段)、62:データインタフェースブロック(データ取得手段)、64:アービタブロック(データ取得手段)、66:ユニットアドレス生成ブロック(データ取得手段)、68:補間演算ブロック(補間演算手段)、72:回路(比較回路)、78:セレクタ(比較回路)、102:係数演算ブロック(係数生成回路)、104:累積加算ブロック(累積加算回路) 1: printer (image processing apparatus), 17: color conversion block (dedicated processor), 22: CPU 22 (general-purpose processor), 42: color correction control module (mode setting means), 44: correction method determination module (parameter determination means, Table setting means), 48: correction parameter generation module (analysis means), 50: table generation module (table generation means), 52: S / W color correction module (continuous correction means), 62: data interface block (data acquisition means) ), 64: Arbiter block (data acquisition means), 66: Unit address generation block (data acquisition means), 68: Interpolation calculation block (interpolation calculation means), 72: Circuit (comparison circuit), 78: Selector (comparison circuit) , 102: Coefficient calculation block (coefficient generation circuit), 104: Cumulative addition Lock (cumulative addition circuit)

Claims (9)

色数がN個であるディジタル色空間で表された画像の色を補正するための画像処理装置であって、
メモリと、
n(n<N)個のグリッド色に対応する補正色を表すn個のグリッド補正色データを導出し、前記グリッド色毎に前記グリッド補正色データを保持する3次元色変換テーブルを前記メモリ内に生成する汎用プロセッサと、
前記メモリに格納されている元画像の注目画素の色を表す元色データを取得し、前記注目画素の色に近い複数の前記グリッド色に対応する複数の前記グリッド補正色データで構成されるユニットデータを前記元色データに基づいて前記3次元色変換テーブルから取得し、前記3次元色変換テーブルから取得した前記ユニットデータを用いた線形補間演算によって前記元色データに対応する補正色データを導出し、前記注目画素に関して前記補正色データを前記メモリに格納する、一連の処理を繰り返すことにより各画素の色が前記補正色データで表された補正画像を生成する専用プロセッサと、
を備える画像処理装置。
An image processing apparatus for correcting the color of an image represented in a digital color space having N colors,
Memory,
A three-dimensional color conversion table for deriving n grid correction color data representing correction colors corresponding to n (n <N) grid colors and holding the grid correction color data for each grid color is stored in the memory. A general-purpose processor that generates
A unit configured to acquire original color data representing the color of a target pixel of an original image stored in the memory and to include a plurality of grid correction color data corresponding to the plurality of grid colors close to the color of the target pixel Data is acquired from the three-dimensional color conversion table based on the original color data, and corrected color data corresponding to the original color data is derived by linear interpolation using the unit data acquired from the three-dimensional color conversion table. A dedicated processor that stores the correction color data in the memory for the pixel of interest, and generates a corrected image in which the color of each pixel is represented by the correction color data by repeating a series of processes;
An image processing apparatus comprising:
前記汎用プロセッサは、前記元画像を解析し、各前記グリッド色に対応する各前記グリッド補正色データを前記元画像の解析結果に基づいて導出する、
請求項1に記載の画像処理装置。
The general-purpose processor analyzes the original image and derives each grid correction color data corresponding to each grid color based on an analysis result of the original image.
The image processing apparatus according to claim 1.
前記汎用プロセッサは、複数の色空間で前記元画像を解析する、
請求項2に記載の画像処理装置。
The general-purpose processor analyzes the original image in a plurality of color spaces;
The image processing apparatus according to claim 2.
前記専用プロセッサは、6面体補間演算モードでは前記線形補間演算としての6面体補間演算によって前記補正色データを導出し、4面体補間演算モードでは前記線形補間演算としての4面体補間演算によって前記補正色データを導出し
前記汎用プロセッサは、前記6面体補間演算モードと前記四面体補間演算モードとの切換を制御する、
請求項1〜3のいずれか一項に記載の画像処理装置。
The dedicated processor derives the correction color data by the hexahedral interpolation calculation as the linear interpolation calculation in the hexahedral interpolation calculation mode, and the correction color by the tetrahedral interpolation calculation as the linear interpolation calculation in the tetrahedral interpolation calculation mode. Deriving data The general-purpose processor controls switching between the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode.
The image processing apparatus according to claim 1.
前記汎用プロセッサは、互いに隣り合う8個の前記グリッド色に対応する前記グリッド補正色データで構成される各前記ユニットデータを前記メモリの互いに異なる連続アドレスに格納することによって前記3次元色変換テーブルを生成し、
前記専用プロセッサは、前記メモリの連続する複数のアドレスから1つの前記ユニットデータに対応する複数の前記グリッド補正色データを同時に取得するデータ取得手段と、6面体補間演算モードでは前記線形補間演算としての6面体補間演算によって前記補正色データを導出する補間演算手段と、を有する、
請求項1〜3のいずれか一項に記載の画像処理装置。
The general-purpose processor stores the three-dimensional color conversion table by storing the unit data composed of the grid correction color data corresponding to the eight grid colors adjacent to each other at different consecutive addresses in the memory. Generate
The dedicated processor includes data acquisition means for simultaneously acquiring a plurality of grid correction color data corresponding to one unit data from a plurality of consecutive addresses in the memory, and in the hexahedral interpolation calculation mode, Interpolation calculation means for deriving the correction color data by hexahedral interpolation calculation,
The image processing apparatus according to claim 1.
前記補間演算手段は、前記6面体補間演算モード及び4面体補間演算モードにおいて、前記ユニットデータを構成している8個の前記グリッド補正色データを前記データ取得手段から順次取得し、前記データ取得手段から取得した前記グリッド補正色データに対応する係数を前記元色データに基づいて生成し、前記ユニットデータを構成している8個の前記グリッド補正色データを、対応する前記係数で重み付けして、成分毎に累積加算することによって前記補正色データを導出し、前記4面体補間演算モードにおいて、取得した前記ユニットデータのうち前記元色データによって決まる4個の前記グリッド補正色データに対応する前記係数として0を生成し、
前記汎用プロセッサは、前記6面体補間演算モードと前記4面体補間演算モードとの切換を制御する、
請求項5に記載の画像処理装置。
The interpolation calculation means sequentially acquires the eight grid correction color data constituting the unit data from the data acquisition means in the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode, and the data acquisition means A coefficient corresponding to the grid correction color data acquired from the above is generated based on the original color data, and the eight grid correction color data constituting the unit data are weighted by the corresponding coefficient, The coefficient corresponding to the four grid correction color data determined by the original color data among the obtained unit data in the tetrahedral interpolation calculation mode is derived by accumulatively adding each component. Produces 0 as
The general-purpose processor controls switching between the hexahedral interpolation calculation mode and the tetrahedral interpolation calculation mode;
The image processing apparatus according to claim 5.
前記補間演算手段は、前記データ取得手段から取得した前記グリッド補正色データを、対応する前記係数で重み付けして、成分毎に累積加算することによって前記補正色データを導出する累積加算回路と、前記注目画素の色を表す前記元色データの各成分の下位ビットパターンの大小関係を比較する比較回路と、前記注目画素の色を表す前記元色データの各成分の前記下位ビットパターンに基づいて、前記累積加算回路によって取得される前記グリッド補正色データに対応する前記係数を生成する係数生成回路とを有し、
前記係数生成回路は、前記6面体補間演算モードでは、前記注目画素の色を表す前記元色データの各色成分の前記下位ビットパターンの大小関係と無関係に、前記累積加算回路によって取得される全ての前記グリッド補正色データに対応する前記係数を生成し、前記4面体補間演算モードでは、前記累積加算回路によって取得される1つの前記ユニットデータのうち、前記注目画素の色を表す前記元色データの各色成分の前記下位ビットパターンの大小関係に応じて決まる4個の前記グリッド補正色データに対応する前記係数として0を生成する、
請求項6に記載の画像処理装置。
The interpolation calculation unit weights the grid correction color data acquired from the data acquisition unit with the corresponding coefficient, and cumulatively adds the components for each component to derive the correction color data; and Based on the comparison circuit that compares the magnitude relationship of the lower bit pattern of each component of the original color data that represents the color of the target pixel, and the lower bit pattern of each component of the original color data that represents the color of the target pixel, A coefficient generation circuit that generates the coefficient corresponding to the grid correction color data acquired by the cumulative addition circuit;
In the hexahedral interpolation calculation mode, the coefficient generation circuit performs all the acquisition by the cumulative addition circuit regardless of the magnitude relation of the lower bit pattern of each color component of the original color data representing the color of the target pixel. The coefficient corresponding to the grid correction color data is generated, and in the tetrahedral interpolation calculation mode, the original color data representing the color of the target pixel among the one unit data acquired by the cumulative addition circuit. Generating 0 as the coefficient corresponding to the four pieces of grid correction color data determined according to the magnitude relationship of the lower bit pattern of each color component;
The image processing apparatus according to claim 6.
前記専用プロセッサはワイヤードロジックで動作する、
請求項1〜7のいずれか一項に記載の画像処理装置。
The dedicated processor operates in wired logic,
The image processing apparatus according to claim 1.
前記専用プロセッサは、シフト演算回路と乗算回路の組み合わせで除算結果の近似値を導出する、
請求項1〜8のいずれか一項に記載の画像処理装置。





The dedicated processor derives an approximate value of a division result by a combination of a shift operation circuit and a multiplication circuit.
The image processing apparatus according to claim 1.





JP2006005719A 2006-01-13 2006-01-13 Image processor Pending JP2007189487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006005719A JP2007189487A (en) 2006-01-13 2006-01-13 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006005719A JP2007189487A (en) 2006-01-13 2006-01-13 Image processor

Publications (1)

Publication Number Publication Date
JP2007189487A true JP2007189487A (en) 2007-07-26

Family

ID=38344354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006005719A Pending JP2007189487A (en) 2006-01-13 2006-01-13 Image processor

Country Status (1)

Country Link
JP (1) JP2007189487A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000123153A (en) * 1998-10-16 2000-04-28 Murata Mach Ltd Image processor
JP2002015314A (en) * 2000-04-28 2002-01-18 Fuji Photo Film Co Ltd Image outputting method, device, and storage medium
JP2004328485A (en) * 2003-04-25 2004-11-18 Brother Ind Ltd Color conversion device, image-forming device, and color conversion program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000123153A (en) * 1998-10-16 2000-04-28 Murata Mach Ltd Image processor
JP2002015314A (en) * 2000-04-28 2002-01-18 Fuji Photo Film Co Ltd Image outputting method, device, and storage medium
JP2004328485A (en) * 2003-04-25 2004-11-18 Brother Ind Ltd Color conversion device, image-forming device, and color conversion program

Similar Documents

Publication Publication Date Title
JP4924264B2 (en) Image processing apparatus, image processing method, and computer program
US11288783B2 (en) Method and system for image enhancement
JP2009038523A (en) Unit and method for processing image
US8340411B2 (en) Smart image resizing with color-based entropy and gradient operators
US20020008762A1 (en) Method, apparatus and recording medium for image processing
JP2003179762A (en) Conversion of color image to gray value image
JP2007074414A (en) Color processing method and its device
JP4877074B2 (en) Image processing apparatus, image processing method, and computer program
JP2019145030A (en) Image processing device, image formation apparatus, image processing method and program
JP2019204439A (en) Image processing device, image processing method, and program
JP2018056873A (en) Image processing device and computer program
JP6376767B2 (en) Image processing apparatus and image processing method
JP2006115445A (en) Image processing device, image processing program, electronic camera, and image processing method
JP4595801B2 (en) Image processing device
US20080240561A1 (en) Image processing apparatus
JP2017184040A (en) Image processing device, and computer program
JP2005192162A (en) Image processing method, image processing apparatus, and image recording apparatus
JP3880465B2 (en) Method and apparatus for creating color conversion table
CN104519237B (en) Image processing apparatus and image processing method
JPH0750761A (en) Color reproducing mthod for image processing system constituted of independent type input/output machine
JP5457123B2 (en) Method for generating LUT, method for reading luminance value from LUT, program and apparatus
JP2007189487A (en) Image processor
JP2007180965A (en) Image processing apparatus and method, and computer program and storage medium
JP2010273012A (en) Image processor, imaging apparatus and program
JP2012205190A (en) Image processing apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100204

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100415

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100907