JP2005099892A - Image processor and method therefor - Google Patents
Image processor and method therefor Download PDFInfo
- Publication number
- JP2005099892A JP2005099892A JP2003329521A JP2003329521A JP2005099892A JP 2005099892 A JP2005099892 A JP 2005099892A JP 2003329521 A JP2003329521 A JP 2003329521A JP 2003329521 A JP2003329521 A JP 2003329521A JP 2005099892 A JP2005099892 A JP 2005099892A
- Authority
- JP
- Japan
- Prior art keywords
- color space
- image data
- error diffusion
- color
- representative
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、画像データに対して誤差拡散処理を行う画像処理装置およびその方法に関する。 The present invention relates to an image processing apparatus and method for performing error diffusion processing on image data.
画質の改善のために、誤差拡散と呼ばれる方法が用いられている。
また、例えば、ICC(International Color Consortium)プロファイルの普及などに伴い、複数の種類の色空間に属するカラー画像処理が必要とされている。
これまで、一般に、誤差拡散処置は、処理の対象となる画像データが、いずれの色空間に属するかを考慮せずに行われてきた。
In order to improve the image quality, a method called error diffusion is used.
For example, with the spread of the ICC (International Color Consortium) profile, color image processing belonging to a plurality of types of color spaces is required.
So far, generally, error diffusion processing has been performed without considering which color space the image data to be processed belongs to.
しかしながら、人間の目に色差をほぼ均等に感させる均等知覚色空間などでは、画素値と色光強度とが、非線形の関係にある。
このような非線形色空間に属する画像に対してで誤差拡散を行うと、拡散された誤差が本来の値にならないので、誤差拡散後の画像の印象と、誤差拡散前の画像の印象とが異なってしまう。
このような不具合を解消するために、例えば、特許文献1は、非線形色空間の画像を、線形色空間の画像に変換した後、誤差拡散を行い、再び、非線形空間の画像に戻す方法を開示している。
When error diffusion is performed on an image belonging to such a nonlinear color space, the diffused error does not become the original value, so the impression of the image after error diffusion is different from the impression of the image before error diffusion. End up.
In order to solve such problems, for example,
本発明は、以上説明した背景からなされたものであり、処理の前後の画像の変化を少なくすることができる画像処理装置およびその方法を提供することを目的とする。
また、本発明は、誤差拡散処理を高速化することを目的とする。
The present invention has been made based on the background described above, and an object thereof is to provide an image processing apparatus and method that can reduce changes in images before and after processing.
Another object of the present invention is to speed up error diffusion processing.
[画像処理装置]
上記目的を達成するために、本発明に係る画像処理装置は、第1の色空間における第1の画像データの画素に対する誤差拡散処理を行う誤差拡散手段と、前記誤差拡散処理された第1の画像データを、前記第1の色空間と異なる第2の色空間における第2の画像データに変換する第1の色空間変換手段と、前記変換の結果として得られた第2の画像データに含まれる画素に対する所定の処理を行う画像処理手段とを有する画像処理装置であって、前記誤差拡散手段は、前記所定の処理がなされた第2の画像データに含まれる画素の値に対応する前記第1の色空間の画像データの画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う。
[Image processing device]
To achieve the above object, an image processing apparatus according to the present invention includes error diffusion means for performing error diffusion processing on pixels of first image data in a first color space, and first error-diffused first Included in first color space conversion means for converting image data into second image data in a second color space different from the first color space, and in the second image data obtained as a result of the conversion An image processing unit that performs a predetermined process on a pixel to be processed, wherein the error diffusion unit includes a first value corresponding to a value of a pixel included in the second image data subjected to the predetermined process. The error diffusion process is performed by diffusing the pixel value of the image data of one color space to the pixel value included in the first image data.
好適には、前記画像処理手段は、前記変換の結果として得られた第2の画像データに含まれる画素の代表色を識別し、前記識別の結果として得られた代表色に対応する前記第1の色空間の画素値を生成し、前記誤差拡散手段は、前記生成された第1の色空間の画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う。 Preferably, the image processing means identifies a representative color of a pixel included in the second image data obtained as a result of the conversion, and the first color corresponding to the representative color obtained as a result of the identification. The error diffusion means diffuses the generated pixel value of the first color space into the pixel value included in the first image data, thereby generating the pixel value of the color space. Perform error diffusion processing.
好適には、前記第1の色空間は、非線形色空間であり、前記第2の色空間は、線形色空間であり、前記第1の色空間変換手段は、線形色空間における前記第1の画像データを、非線形色空間における前記第2の画像データに変換する。 Preferably, the first color space is a non-linear color space, the second color space is a linear color space, and the first color space conversion means is the first color space in the linear color space. Image data is converted into the second image data in a non-linear color space.
好適には、前記第1の色空間は、均等知覚色空間、相対明度色空間または等価中性明度の色空間であり、前記第2の色空間は、NTSC、PALまたはRGBの色空間であり、前記第1の色空間変換手段は、均等知覚色空間、相対明度色空間または等価中性明度の色空間における前記第1の画像データを、NTSC、PALまたはRGBの色空間における前記第2の画像データに変換する。 Preferably, the first color space is a uniform perceptual color space, a relative lightness color space or an equivalent neutral lightness color space, and the second color space is an NTSC, PAL or RGB color space. The first color space conversion means converts the first image data in the uniform perceptual color space, the relative lightness color space, or the equivalent neutral lightness color space into the second color space in the NTSC, PAL, or RGB color space. Convert to image data.
好適には、前記第1の色空間は、NTSC、PAL、sRGBまたはRGBの線形色空間であり、前記第2の色空間は、均等知覚色空間、相対明度色空間または等価中性明度の色空間であり、前記第1の色空間変換手段は、NTSC、PAL、sRGBまたはRGBの線形色空間における前記第1の画像データを、均等知覚色空間、相対明度色空間または等価中性明度の色空間における前記第2の画像データに変換する。 Preferably, the first color space is an NTSC, PAL, sRGB or RGB linear color space, and the second color space is a uniform perceptual color space, a relative lightness color space or an equivalent neutral lightness color. And the first color space conversion means converts the first image data in an NTSC, PAL, sRGB or RGB linear color space into a color of uniform perceptual color space, relative lightness color space or equivalent neutral lightness. It converts into the said 2nd image data in space.
好適には、前記代表色が識別された第2の画像データを、前記第1の色空間における第3の画像データに変換する第2の色空間変換手段をさらに有す。 Preferably, the image processing apparatus further includes second color space conversion means for converting the second image data in which the representative color is identified into third image data in the first color space.
[画像処理方法]
また、画像処理方法は、第1の色空間における第1の画像データの画素に対する誤差拡散処理を行い、前記誤差拡散処理された第1の画像データを、前記第1の色空間と異なる第2の色空間における第2の画像データに変換し、前記変換の結果として得られた第2の画像データに含まれる画素に対する所定の処理を行う画像処理方法であって、前記誤差拡散処理は、前記所定の処理がなされた第2の画像データに含まれる画素の値に対応する前記第1の色空間の画像データの画素の値を、前記第1の画像データに含まれる画素の値に拡散させる。
[Image processing method]
In the image processing method, error diffusion processing is performed on the pixels of the first image data in the first color space, and the first image data subjected to the error diffusion processing is different from the first color space. Is converted into second image data in the color space of the image data, and a predetermined process is performed on the pixels included in the second image data obtained as a result of the conversion. The pixel value of the image data in the first color space corresponding to the value of the pixel included in the second image data subjected to the predetermined processing is diffused to the value of the pixel included in the first image data. .
好適には、前記画像処理は、前記変換の結果として得られた第2の画像データに含まれる画素の代表色を識別し、前記識別の結果として得られた代表色に対応する前記第1の色空間の画素値を生成し、前記誤差拡散処理は、前記生成された第1の色空間の画素の値を、前記第1の画像データに含まれる画素の値に拡散させる。 Preferably, the image processing identifies a representative color of a pixel included in the second image data obtained as a result of the conversion, and the first color corresponding to the representative color obtained as a result of the identification. A color space pixel value is generated, and the error diffusion process diffuses the generated first color space pixel value to a pixel value included in the first image data.
[プログラム]
また、本発明に係るプログラムは、第1の色空間における第1の画像データの画素に対する誤差拡散処理を行う誤差拡散ステップと、前記誤差拡散処理された第1の画像データを、前記第1の色空間と異なる第2の色空間における第2の画像データに変換する第1の色空間変換ステップと、前記変換の結果として得られた第2の画像データに含まれる画素に対する所定の処理を行う画像処理ステップとをコンピュータに実行させるプログラムであって、前記誤差拡散ステップは、前記所定の処理がなされた第2の画像データに含まれる画素の値に対応する前記第1の色空間の画像データの画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う。
[program]
The program according to the present invention includes an error diffusion step for performing error diffusion processing on pixels of the first image data in the first color space, and the first image data subjected to the error diffusion processing as the first image data. A first color space conversion step for converting to second image data in a second color space different from the color space, and a predetermined process for pixels included in the second image data obtained as a result of the conversion are performed. An image processing step for causing a computer to execute the image processing step, wherein the error diffusion step includes image data in the first color space corresponding to a pixel value included in the second image data subjected to the predetermined processing. The error diffusion process is performed by diffusing the value of the pixel to the value of the pixel included in the first image data.
本発明に係る画像処理装置およびその方法によれば、誤差拡散処理の前後の画質の変化を少なくすることができる。
また、本発明に係る画像処理装置およびその方法によれば、誤差拡散処理を高速化することができる。
According to the image processing apparatus and method of the present invention, it is possible to reduce the change in image quality before and after error diffusion processing.
Moreover, according to the image processing apparatus and method of the present invention, the error diffusion process can be speeded up.
以下、本発明の最良の実施形態を説明する。 The best mode of the present invention will be described below.
[第1の誤差拡散処理装置1]
まず、本発明の第1の実施形態として第1の誤差拡散処理装置1を説明する。
図1は、本発明に係る第1の誤差拡散処理装置1の構成を示す図である。
図2は、図1に示した誤差拡散処理装置1がソフトウェア的に実現されるときに、誤差拡散処理装置1を実行するコンピュータ16の構成を例示する図である。
図1に示すように、誤差拡散処理装置1は、誤差拡散処理部12、代表色決定部14、線形化部100、第1の色空間変換部102および第2の色空間変換部104から構成される。
誤差拡散処理部12は、誤差配分部120および誤差加算部122から構成される。
代表色決定部14は、代表色テーブル140および代表色識別部142から構成される。
[First error diffusion processing apparatus 1]
First, a first error
FIG. 1 is a diagram showing a configuration of a first error
FIG. 2 is a diagram illustrating a configuration of the computer 16 that executes the error
As shown in FIG. 1, the error
The error diffusion processing unit 12 includes an
The representative color determination unit 14 includes a representative color table 140 and a representative
図2に示すように、コンピュータ16は、CPU162およびメモリ164などを含むコンピュータ本体160、キーボード・ディスプレイなどを含む表示・入力装置166、画像データの入出力を行う画像入出力装置168、および、CD装置・HDD装置などの記録装置170から構成される。
つまり、コンピュータ16は、画像データの入出力が可能な一般的なコンピュータとしての構成部分を含んでいる。
As shown in FIG. 2, the computer 16 includes a computer
That is, the computer 16 includes a configuration part as a general computer capable of inputting and outputting image data.
誤差拡散処理装置1の構成部分それぞれは、例えば、専用のハードウェアにより実現される。
あるいは、誤差拡散処理装置1の構成部分それぞれは、例えば、コンピュータプログラムとして実現され、記録媒体172を介してコンピュータ16に供給され、メモリ164にロードされて実行される。
誤差拡散処理装置1は、これらの構成部分により、外部(画像入出力装置168を介してコンピュータ16(図2)に接続されたスキャナなど(図示せず))から入力されるカラー入力画像データに対して誤差分散処理を行い、代表色を決定して、出力画像データとする。
Each component of the error
Alternatively, each component of the error
With these components, the error
入力画像データは、例えば、NTSC、PAL、sRGBまたはRGBなどの非線形色空間に属し、多数の画素から構成され、1/2.2乗特性が付された非線形の状態で誤差拡散処理装置1に入力される。
線形化部100は、入力画像データを、付された特性に応じて変換し、線形な入力画像データとして誤差拡散処理部12に対して出力する。
つまり、例えば、入力画像データに対して、上述のように、1/2.2乗特性が付されているときには、線形化部100は、非線形の入力画像データを2.2乗して、線形の入力画像データとする。
The input image data belongs to a non-linear color space such as NTSC, PAL, sRGB, or RGB, for example, is composed of a large number of pixels, and is input to the error
The
That is, for example, when the input image data is given the 1 / 2.2 power characteristic as described above, the
図3は、図1に示した誤差拡散処理部12による誤差拡散処理を例示する図である。
誤差拡散処理部12は、線形化部100から入力された線形の入力画像データに対して誤差拡散処理を行う。
誤差拡散処理部12において、誤差配分部120は、代表色決定部14の代表色識別部142から入力された代表色に対応する線形色空間の画像データ(線形色空間内色値;図4を参照して後述)の画素の値と、この画素に対応する線形な入力画像データの画素の値との誤差εを、図3に示すように、線形の入力画像データの周囲の画素pに拡散するための誤差εpを算出する。
FIG. 3 is a diagram illustrating error diffusion processing by the error diffusion processing unit 12 shown in FIG.
The error diffusion processing unit 12 performs error diffusion processing on the linear input image data input from the
In the error diffusion processing unit 12, the
図3に示すように、誤差εは、誤差εが計算された画素(斜線を付した画素)の右隣、左下、下および右下の画素1〜4(p=1〜4)に対して拡散される。
これらの画素1〜4に配分される誤差ε1〜ε4は、誤差εに、それぞれ係数w1〜w4を乗算することにより算出される(εp=ε×wp)。
係数w1〜w4としては、図3に示すように、それぞれ7/16,3/16,5/16,1/16(Floyed-Steinbergによる)が用いられる。
As shown in FIG. 3, the error ε is relative to the
Errors ε 1 to ε 4 allocated to these
As the coefficients w 1 to w 4 , 7/16, 3/16, 5/16, and 1/16 (by Floyed-Steinberg) are used, respectively, as shown in FIG.
誤差加算部122は、上述のように周囲に配分された誤差εpを、周囲の画素値pに加算して、誤差拡散を行う。
この結果、誤差加算部122が出力する画素値Iijの値は、線形化部100からの線形入力画素値I0ijに対して、[Iij=I0ij+Σεkl×wijkl(式1)]となる。
但し、式1において、ijは画素の位置を示し、k=i−1〜i+1,l=j−1〜j+1(i≠k,j≠l)、wijklは、画素値Iijの算出のために、周囲の画素値klの誤差εklに対して乗算される係数。
The
As a result, the pixel value I ij output from the
However, in
第1の色空間変換部102は、誤差拡散処理部12により誤差拡散処理がなされた線形の入力画像データを、人間の色知覚に近い非線形色空間のカラー画像データ(以下、非線形画像データと記す)に変換し、代表色決定部14に対して出力する。
なお、以下、特記なき限り、色空間変換部102が、線形の入力画像データを、均等知覚色空間(CIELABなど)の画像データに変換する場合を具体例とする。
The first color
Hereinafter, unless otherwise specified, a specific example is a case where the color
図4は、図1に示した代表色テーブル140の内容を例示する図である。
代表色決定部14において、代表色テーブル140は、図4に示すように、代表色の番号と、均等知覚色空間の画像データの画素値(均等知覚色空間内色値)と、均等知覚色空間内色値に対応する線形色空間の画像データの画素値(線形色空間内色値)を対応付けて、テーブル形式で記憶し、代表色識別部142による参照の用に供する。
FIG. 4 is a diagram illustrating the contents of the representative color table 140 shown in FIG.
In the representative color determination unit 14, as shown in FIG. 4, the representative color table 140 includes a representative color number, pixel values of image data in the uniform perceptual color space (color values in the uniform perceptual color space), and uniform perceptual colors. The pixel values (color values in the linear color space) of the image data in the linear color space corresponding to the color values in the space are associated with each other, stored in a table format, and used for reference by the representative
代表色識別部142は、代表色テーブル140を参照し、色空間変換部102から入力された非線形画像データに含まれる画素の値それぞれが、代表色テーブル140内の均等知覚色空間内色値(図4)のいずれに近いかを算出し、非線形画像データに含まれる画素それぞれに対して、これらの画素の値に最も近い均等知覚色空間内色値に対応する代表色番号をマッピングし、対応する線形色空間内値を画素値として第2の色空間変換部104に対して出力する。
つまり、代表色識別部142は、非線形画像データに含まれる画素それぞれの色を、これらの画素それぞれの値と、ユークリッド的な距離が一番近い均等知覚色空間内色値に対応する代表色番号が示す代表色と識別する。
The representative
That is, the representative
以上説明したように、代表色決定部14により代表色が決定された線形画像データ(以下、代表色データと記す)は、色空間変換部104に対して出力される。
また、代表色識別部142は、代表色テーブル140を参照し、非線形画像データの画素それぞれに対して識別された代表色に対応する線形色空間の画素値(線形色空間内色値;図4)を、誤差配分部120に対して出力する。
第2の色空間変換部104は、代表色データを、入力画像データと同じ色空間の画像データに変換し、さらに、入力画像データと同じ特性を付して、出力画像データとし、外部(例えば、画像入出力装置168・記録装置170(図2)など)に対して出力する。
As described above, linear image data (hereinafter referred to as representative color data) for which the representative color is determined by the representative color determination unit 14 is output to the color
Further, the representative
The second color
[誤差拡散処理装置1の全体動作]
以下、誤差拡散処理装置1の全体的な動作を説明する。
誤差拡散処理装置1に、線形色空間の入力画像データが入力される。
線形化部100は、入力画像データに付された特性(1/2.2乗特性など)を取り除く変換を行い、線形入力画像データとして、誤差拡散処理部12に対して出力する。
[Overall Operation of Error Diffusion Processing Apparatus 1]
Hereinafter, the overall operation of the error
Input image data in a linear color space is input to the error
The
誤差拡散処理部12は、代表色決定部14から入力された線形色空間内色値(図4)と、線形画像データとの誤差εを、図3に示したように、周囲の画素に拡散し、色空間変換部102に対して出力する。
第1の色空間変換部102は、線形入力画像データを、非線形画像データに変換し、代表色決定部14に対して出力する。
The error diffusion processing unit 12 diffuses an error ε between the linear color space color value (FIG. 4) input from the representative color determination unit 14 and the linear image data to surrounding pixels as shown in FIG. And output to the color
The first color
代表色決定部14は、非線形画像データに含まれる画素の代表色に対応する線形色空間内値(図4)を代表色データとして第2の色空間変換部104に対して出力する。
また、代表色決定部14は、非線形画像データに含まれる画素の代表色に対応する線形色空間内色値(図4)を、誤差拡散処理部12に対して出力する。
The representative color determination unit 14 outputs the value in the linear color space (FIG. 4) corresponding to the representative color of the pixel included in the non-linear image data to the second color
Further, the representative color determination unit 14 outputs the color value in the linear color space (FIG. 4) corresponding to the representative color of the pixel included in the non-linear image data to the error diffusion processing unit 12.
図5は、入力画像データがγ補正された線形NTSC−RGBであるとき、つまり第1の色空間変換部102への入力が線形NTSC−RGBで、色変換部102の出力が相対明度色空間である場合の色空間変換特性を例示する図である。
なお、以上の説明においては、誤差拡散処理装置1において、非線形色空間として均等知覚色空間(CIELABなど)が用いられる場合を具体例としたが、図5に示すように、第1の色空間変換部102への入力が線形NTSC−RGBの色空間に属するときに、RGBそれぞれ(色空間のチャネル)を独立に、最小値から最大値までにマッピングして得られる相対的な明度示す相対明度色空間も、誤差拡散処理装置1において、均等知覚色空間の代わりに用いられ得る。
FIG. 5 shows a case where the input image data is γ-corrected linear NTSC-RGB, that is, the input to the first color
In the above description, the error
さらに、誤差拡散処理装置1においては、相対明度として、等価中性明度が用いられ得る。
等価中性明度は、グレーの明度と、そのグレーを表現する色空間のチャネルとの関係を表す。
Furthermore, in the error
The equivalent neutral lightness represents the relationship between the lightness of gray and the channel of the color space that expresses the gray.
誤差拡散処理装置1において、均等知覚色空間の代わりに、相対明度または等価中性明度の色空間が、非線形色空間として用いられるときには、誤差拡散処理装置1の各構成部分の動作は、以下のように変更される。
第1の色空間変換部102は、線形色空間の線形入力画像データを、相対明度または等価中性明度の色空間の非線形画像データに変換する。
In the error
The first color
代表色決定部14の代表色テーブル140は、均等知覚色空間色値の代わりに、相対明度または等価中性明度の色空間の色値と、線形色空間内色値(図4)と、代表色の番号とを対応付けてテーブル形式で記憶し、代表色識別部142に参照させる。
代表色識別部142は、代表色テーブル140を参照して、相対明度または等価中性明度の色空間の画像データに含まれる画素の代表色を識別して代表色データを生成し、この代表色データに対応する線形色空間色値を、誤差拡散処理部12に対して出力する。
これらの他の誤差拡散処理装置1の構成部分の動作は、既に述べた通りである。
The representative color table 140 of the representative color determination unit 14 represents the color value of the color space of the relative lightness or equivalent neutral lightness, the color value in the linear color space (FIG. 4), and the representative instead of the uniform perceptual color space color value. The color numbers are associated with each other and stored in a table format, and are referred to the representative
The representative
The operation of the components of these other error
[第2の誤差拡散処理装置2]
次に、本発明の第2の実施形態として、第2の誤差拡散処理装置2を説明する。
[Second error diffusion processing device 2]
Next, a second error
図6は、CIELAB色空間の色域を概念的に例示す図である。
CIELABなどの均等知覚色空間においては、色域が直方体にならず、歪んだ形になるので、代表色は、色空間内に均等に分布しない。
例えば、CIELAB色空間における色域は、図6に示す曲線で囲まれた領域が色域となり、色域内の点が代表色に対応する。
FIG. 6 is a diagram conceptually illustrating the color gamut of the CIELAB color space.
In a uniform perceptual color space such as CIELAB, the color gamut is not a rectangular parallelepiped, but is distorted, so that the representative colors are not evenly distributed in the color space.
For example, in the color gamut in the CIELAB color space, the area surrounded by the curve shown in FIG. 6 is the color gamut, and the points in the color gamut correspond to the representative color.
図6に示すように、CIELAB色空間では、色域の内部の領域では代表色の間隔を均等にすることができる。
しかしながら、CIELAB色空間では、色域の外周に近い領域では、代表色の分布が特に不均等になり、また、重要なR,G,Bの純色などを、曲線上に付加する必要がある。
As shown in FIG. 6, in the CIELAB color space, the intervals between the representative colors can be made uniform in the area inside the color gamut.
However, in the CIELAB color space, the distribution of representative colors is particularly uneven in a region near the outer periphery of the color gamut, and it is necessary to add important pure colors such as R, G, and B on the curve.
また、代表色の間隔を均等にできたとしても、色域の領域によって代表色の密度が異なってしまう。
従って、CIELAB色空間においては、簡単な演算では最近代表色を決めることができず、最近代表色を決めるために、非線形画像データの画素値と、全ての代表色との距離を計算して差分を計算しなければならないことが多い。
本発明に係る第2の誤差拡散処理装置2は、均等知覚色空間の代わりに相対明度色空間を用いることで、入力画像の印象をあまり損なわずに、しかも高速に、誤差拡散処理を行うことができるように工夫されている。
Even if the intervals between the representative colors can be made uniform, the density of the representative colors varies depending on the color gamut region.
Therefore, in the CIELAB color space, it is not possible to determine the representative color recently by simple calculation. In order to determine the representative color recently, the distance between the pixel value of the nonlinear image data and all the representative colors is calculated and the difference is calculated. Often has to be calculated.
The second error
図7は、本発明に係る第2の誤差拡散処理装置2の構成を示す図である。
なお、図7に示す誤差拡散処理装置2の各構成部分の内、図1に示した誤差拡散処理装置1の構成部分と実質的に同一の者には、同じ符号が付してある。
図7に示すように、第2の誤差拡散処理装置2は、第1の誤差拡散処理装置1(図1)の代表色決定部14、第1の色空間変換部102および第2の色空間変換部104それぞれを、第2の代表色識別部202、第3の色空間変換部200および第4の色空間変換部204それぞれで置換した構成を採る。
第1の誤差拡散処理装置2は、これらの構成部分により、均等知覚色空間の代わりに相対明度色空間を用いて、第1の誤差拡散処理装置1と同様に、代表色データの生成および誤差拡散処理を行う。
FIG. 7 is a diagram showing the configuration of the second error
7 that are substantially the same as the constituent parts of the error
As shown in FIG. 7, the second error
With these components, the first error
誤差拡散処理装置2には、例えば、RGB色空間のカラー入力画像データが入力される。
誤差拡散処理装置2において、入力画像データは、まず、誤差拡散処理装置1(図1)においてと同様に、線形化部100により線形入力画像データとされる。
第3の色空間変換部200は、誤差拡散処理部12から入力される線形入力画像データに含まれるR,G,Bチャネルそれぞれを、相対明度色空間のR,G,Bチャネルに変換する。
For example, color input image data in the RGB color space is input to the error
In the error
The third color
代表色識別部202は、相対明度色空間のR,G,Bチャネルそれぞれを、代表値を求めるための関数lに代入し、チャネルごとの代表値Ri,Gj,Bk(=l(R),l(G),l(B))に変換する。
例えば、代表値を等間隔にする場合は、関数lは入力を間隔値で除し、四捨五入した後に間隔値dを乗じることで、簡単に代表値が計算できる(l (x)=nint(x/d) * d (ただし、関数nintは最も近い整数に四捨五入するものとする))。
さらに、代表色識別部202は、相対明度色空間での代表値を線形色空間での値Ri',Gj',Bk'に戻して色空間変換部204に出力する。
色空間変換部204は、代表色識別部202が変換した代表値Ri,Gj,Bkを、元のRGB色空間の出力画像データに変換する。
The representative
For example, when the representative values are equally spaced, the function l can simply calculate the representative value by dividing the input by the interval value and rounding off and multiplying by the interval value d (l (x) = nint (x / d) * d (where the function nint rounds to the nearest integer)).
Further, the representative
The color
[第2の誤差拡散処理装置2の全体動作]
以下、第2の誤差拡散処理装置2の全体的な動作を説明する。
誤差拡散処理装置2に、RGB色空間の入力画像データが入力される。
線形化部100は、この入力画像データを、線形入力画像データとする。
色空間変換部200は、線形入力画像データに含まれるR,G,Bチャネルそれぞれを、関数lを用いて、相対明度色空間のR,G,Bチャネルそれぞれに変換する。
[Overall Operation of Second Error Diffusion Processing Apparatus 2]
Hereinafter, the overall operation of the second error
Input image data in the RGB color space is input to the error
The
The color
代表色識別部202は、関数lを用いて、相対明度色空間のR,G,Bチャネルそれぞれを、代表値Ri,Gj,Bkに変換し、これを線形色空間での値に戻したRi',Gj',Bk'を代表値データとして、色空間変換部204および誤差拡散処理部12に対して出力する。
誤差拡散処理部12は、代表色識別部202から入力された代表値Ri',Gj',Bk'を用いて誤差拡散処理を行う。
色空間変換部204は、代表色識別部202から入力された代表値データを、線形色空間から、RGB色空間に変換し、出力画像データとして出力する。
The representative
The error diffusion processing unit 12 performs error diffusion processing using the representative values R i ′, G j ′, B k ′ input from the representative
The color
[変形例1]
次に、第2の誤差拡散処理装置2の第1の変形例を説明する。
図8は、代表色識別部202により用いられ得る1次元的なルックアップテーブルを例示する図である。
なお、以上の説明においては、代表色識別部202が、相対明度入力画像データに含まれるチャネルそれぞれを、関数lに代入することにより、チャネルごとに代表値に変換する場合を説明したが、関数lの計算を行う代わりに、図8に示すようなルックアップテーブルを用いて、相対明度入力画像データに含まれる各チャネルの代表値を求めることもできる。
[Modification 1]
Next, a first modification of the second error
FIG. 8 is a diagram illustrating a one-dimensional lookup table that can be used by the representative
In the above description, the case where the representative
このように、ルックアップテーブルを用いて代表値を求めるようにすると、代表色識別部202の処理量が減るので、代表値を求める処理を、より高速化することができる。
また、このように、ルックアップテーブルを用いて代表値を求めるようにすると、用途に応じて、誤差拡散処理装置2が求める代表値の値の設定の自由度が増す。
As described above, when the representative value is obtained using the lookup table, the processing amount of the representative
In addition, when the representative value is obtained using the lookup table in this way, the degree of freedom in setting the value of the representative value obtained by the error
[変形例2]
次に、第2の誤差拡散処理装置2の第2の変形例を説明する。
図9は、図7に示した第2の誤差拡散処理装置2の変形例(第3の誤差拡散処理装置3)の構成を示す図である。
なお、図9においても、第3の誤差拡散処理装置3の構成部分の内、第1の誤差拡散処理装置1(図1)の構成部分と実質的に同じ構成部分には、同じ符号が付してある。
図9に示すように、第3の誤差拡散処理装置3は、線形化部100、誤差拡散処理部12、第1の代表色識別・色空間変換部300および第2の代表色識別・色空間変換部302から構成される。
[Modification 2]
Next, a second modification of the second error
FIG. 9 is a diagram showing a configuration of a modified example (third error diffusion processing device 3) of the second error
Also in FIG. 9, the same reference numerals are given to the components substantially the same as the components of the first error diffusion processing device 1 (FIG. 1) among the components of the third error
As shown in FIG. 9, the third error
例えば、第2の誤差拡散処理装置2(図7)の第3の色空間変換部200の処理は、関数gで表され、代表色識別部202の処理は関数g-1(l)で表され、第4の色空間変換部204の処理は、関数f-1で表わされ得る。
従って、色空間変換部200、代表色識別部202および色空間変換部204の処理は、これら関数g,l,f-1を用いて、関数f-1(g-1(l(g)))と表わされる。
また、色空間変換部200および代表色識別部202の処理は、これら関数g,l,f-1を用いて、関数g-1(l(g))と表わされる。
For example, the process of the third color
Therefore, the processing of the color
The processing of the color
従って、代表色識別・色空間変換部300に、関数f-1(g-1(l(g)))の処理を行わせ、代表色識別・色空間変換部302に、関数g-1(l(g))の処理を行わせることにより、第3の誤差拡散処理装置3に、第2の誤差拡散処理装置2(図7)と同じ処理を実行させることができる。
第1および第2の代表色識別・色空間変換部300,302の処理は、第2の誤差拡散処理装置2における代表色識別部202の処理と同様に、1次元的なルックアップテーブルを用いて実現可能であり、代表色識別・色空間変換部300,302において、ルックアップテーブルを用いることにより、誤差拡散処理装置3の処理を、より高速化することができる。
Accordingly, the representative color identification / color
The processing of the first and second representative color identification / color
以上説明したように、本発明に係る誤差拡散処理装置においては、入力された線形色空間の画像データは、非線形の均等知覚色空間などに変換され、均等知覚色空間中で、画素値に最も近い代表色(最近代表色)が識別される。
一方、線形色空間中で誤差拡散処理(誤差計算および誤差配分)が行われる。
このように、非線形色空間において代表色を求めることにより、画素それぞれに対して、人の目にとって最も自然な代表色をマッピングすることができる。
As described above, in the error diffusion processing device according to the present invention, the input image data in the linear color space is converted into a non-linear uniform perceptual color space, etc. Near representative colors (recent representative colors) are identified.
On the other hand, error diffusion processing (error calculation and error distribution) is performed in a linear color space.
Thus, by obtaining the representative color in the nonlinear color space, the most natural representative color for the human eye can be mapped to each pixel.
本発明は、画像データの処理に利用可能である。 The present invention can be used for processing image data.
1〜3・・・誤差拡散処理装置、
100・・・線形化部、
102,104,200,204・・・色空間変換部、
12・・・誤差拡散処理部、
120・・・誤差配分部、
122・・・誤差加算部、
14・・・代表色決定部、
140・・・代表色テーブル、
142,202・・・代表色識別部、
300,302・・・代表色識別・色空間変換部、
1-3 ... error diffusion processing device,
100 ... linearization part,
102, 104, 200, 204 ... color space conversion unit,
12: Error diffusion processing unit,
120 ... error distribution unit,
122... Error adding unit,
14: representative color determining unit,
140 ... representative color table,
142, 202 ... representative color identification unit,
300, 302 ... representative color identification / color space conversion unit,
Claims (14)
前記誤差拡散処理された第1の画像データを、前記第1の色空間と異なる第2の色空間における第2の画像データに変換する第1の色空間変換手段と、
前記変換の結果として得られた第2の画像データに含まれる画素に対する所定の処理を行う画像処理手段と
を有する画像処理装置であって、
前記誤差拡散手段は、前記所定の処理がなされた第2の画像データに含まれる画素の値に対応する前記第1の色空間の画像データの画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う
画像処理装置。 Error diffusion means for performing error diffusion processing on the pixels of the first image data in the first color space;
First color space conversion means for converting the first image data subjected to the error diffusion processing into second image data in a second color space different from the first color space;
An image processing apparatus comprising: an image processing unit that performs predetermined processing on pixels included in the second image data obtained as a result of the conversion,
The error diffusion means includes, in the first image data, a pixel value of the image data in the first color space corresponding to a pixel value included in the second image data subjected to the predetermined processing. An image processing apparatus that performs the error diffusion process by diffusing the pixel value.
前記誤差拡散手段は、前記生成された第1の色空間の画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う
請求項1に記載の画像処理装置。 The image processing means identifies a representative color of a pixel included in the second image data obtained as a result of the conversion, and includes a first color space corresponding to the representative color obtained as a result of the identification. Generate pixel values,
The error diffusion unit performs the error diffusion process by diffusing the generated pixel value of the first color space into the pixel value included in the first image data. Image processing apparatus.
前記第2の色空間は、線形色空間であり、
前記第1の色空間変換手段は、線形色空間における前記第1の画像データを、非線形色空間における前記第2の画像データに変換する
請求項1または2に記載の画像処理装置。 The first color space is a non-linear color space;
The second color space is a linear color space;
The image processing apparatus according to claim 1, wherein the first color space conversion unit converts the first image data in a linear color space into the second image data in a non-linear color space.
前記第1の色空間は、NTSC、PAL、sRGBまたはRGBの線形色空間であり、
前記第1の色空間変換手段は、NTSC、PAL、sRGBまたはRGBの線形色空間における前記第1の画像データを、均等知覚色空間、相対明度色空間または等価中性明度の色空間における前記第2の画像データに変換する
請求項1または2に記載の画像処理装置。 The second color space is a uniform perceptual color space, a relative lightness color space or an equivalent neutral lightness color space;
The first color space is an NTSC, PAL, sRGB or RGB linear color space;
The first color space conversion means converts the first image data in an NTSC, PAL, sRGB or RGB linear color space into the first perceptual color space, relative lightness color space or equivalent neutral lightness color space. The image processing apparatus according to claim 1, wherein the image processing apparatus converts the image data into two image data.
前記第1の画像データに付された前記所定の特性を補正する補正手段
をさらに有し、
前記誤差拡散手段は、前記補正された第1の画像データに対して、前記誤差拡散処理を行う
請求項1〜4のいずれかに記載の画像処理装置。 The first image data has a predetermined characteristic,
Correction means for correcting the predetermined characteristic attached to the first image data;
The image processing apparatus according to claim 1, wherein the error diffusion unit performs the error diffusion process on the corrected first image data.
をさらに有する請求項1〜5のいずれかに記載の画像処理装置。 The second color space conversion means for converting the second image data in which the representative color is identified into third image data in the first color space. Image processing device.
前記誤差拡散処理された第1の画像データを、前記第1の色空間と異なる第2の色空間における第2の画像データに変換し、
前記変換の結果として得られた第2の画像データに含まれる画素に対する所定の処理を行う
画像処理方法であって、
前記誤差拡散処理は、前記所定の処理がなされた第2の画像データに含まれる画素の値に対応する前記第1の色空間の画像データの画素の値を、前記第1の画像データに含まれる画素の値に拡散させる
画像処理方法。 Performing error diffusion processing on the pixels of the first image data in the first color space;
Converting the error-diffused first image data into second image data in a second color space different from the first color space;
An image processing method for performing predetermined processing on pixels included in second image data obtained as a result of the conversion,
The error diffusion process includes, in the first image data, a pixel value of the image data in the first color space corresponding to a pixel value included in the second image data on which the predetermined process has been performed. An image processing method that diffuses the pixel values.
前記誤差拡散処理は、前記生成された第1の色空間の画素の値を、前記第1の画像データに含まれる画素の値に拡散させる
請求項7に記載の画像処理方法。 The image processing identifies a representative color of a pixel included in the second image data obtained as a result of the conversion, and a pixel in the first color space corresponding to the representative color obtained as a result of the identification Generate a value,
The image processing method according to claim 7, wherein the error diffusion processing diffuses the generated pixel value of the first color space into a pixel value included in the first image data.
前記誤差拡散処理された第1の画像データを、前記第1の色空間と異なる第2の色空間における第2の画像データに変換する第1の色空間変換ステップと、
前記変換の結果として得られた第2の画像データに含まれる画素に対する所定の処理を行う画像処理ステップと
をコンピュータに実行させるプログラムであって、
前記誤差拡散ステップは、前記所定の処理がなされた第2の画像データに含まれる画素の値に対応する前記第1の色空間の画像データの画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う
プログラム。 An error diffusion step for performing error diffusion processing on the pixels of the first image data in the first color space;
A first color space conversion step of converting the first image data subjected to the error diffusion processing into second image data in a second color space different from the first color space;
A program for causing a computer to execute an image processing step of performing predetermined processing on pixels included in second image data obtained as a result of the conversion,
The error diffusion step includes, in the first image data, a pixel value of the image data in the first color space corresponding to a pixel value included in the second image data on which the predetermined processing has been performed. A program for performing the error diffusion process by diffusing the pixel value.
前記誤差拡散ステップは、前記生成された第1の色空間の画素の値を、前記第1の画像データに含まれる画素の値に拡散させることにより、前記誤差拡散処理を行う
請求項9に記載のプログラム。 The image processing step identifies a representative color of a pixel included in the second image data obtained as a result of the conversion, and the first color space corresponding to the representative color obtained as a result of the identification. Generate pixel values,
The error diffusion step performs the error diffusion process by diffusing the generated pixel value of the first color space into the pixel value included in the first image data. Program.
前記第2の色空間は、非線形色空間であり、
前記第1の色空間変換ステップは、線形色空間における前記第1の画像データを、非線形色空間における前記第2の画像データに変換する
請求項9または10に記載のプログラム。 The first color space is a linear color space;
The second color space is a non-linear color space;
The program according to claim 9 or 10, wherein the first color space conversion step converts the first image data in a linear color space into the second image data in a non-linear color space.
前記第1の色空間は、NTSC、PALまたはRGBの色空間であり、
前記第1の色空間変換ステップは、NTSC、PAL、sRGBまたはRGBの線形色空間における前記第1の画像データを、均等知覚色空間、相対明度色空間または等価中性明度の色空間における前記第2の画像データに変換する
請求項9または10に記載のプログラム。 The second color space is a uniform perceptual color space, a relative lightness color space or an equivalent neutral lightness color space;
The first color space is an NTSC, PAL or RGB color space;
The first color space conversion step converts the first image data in an NTSC, PAL, sRGB or RGB linear color space into the first perceptual color space, relative lightness color space or equivalent neutral lightness color space. The program according to claim 9 or 10, wherein the program is converted into image data of 2.
前記第1の画像データに付された前記所定の特性を補正する補正ステップ
をさらにコンピュータに実行させ、
前記誤差拡散ステップは、前記補正された第1の画像データに対して、前記誤差拡散処理を行う
請求項9〜12のいずれかに記載のプログラム。 The first image data has a predetermined characteristic,
A correction step of correcting the predetermined characteristic attached to the first image data;
The program according to any one of claims 9 to 12, wherein the error diffusion step performs the error diffusion process on the corrected first image data.
をさらにコンピュータに実行させる請求項9〜13のいずれかに記載のプログラム。 14. The computer according to claim 9, further causing a computer to execute a second color space conversion step of converting the second image data in which the representative color is identified into third image data in the first color space. The program described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003329521A JP2005099892A (en) | 2003-09-22 | 2003-09-22 | Image processor and method therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003329521A JP2005099892A (en) | 2003-09-22 | 2003-09-22 | Image processor and method therefor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005099892A true JP2005099892A (en) | 2005-04-14 |
Family
ID=34458743
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003329521A Pending JP2005099892A (en) | 2003-09-22 | 2003-09-22 | Image processor and method therefor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005099892A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101835052B (en) * | 2009-03-13 | 2013-02-06 | 华硕电脑股份有限公司 | Image processing device and method |
CN112799224A (en) * | 2019-11-14 | 2021-05-14 | 徕卡仪器(新加坡)有限公司 | System and method for generating output image data and microscope |
-
2003
- 2003-09-22 JP JP2003329521A patent/JP2005099892A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101835052B (en) * | 2009-03-13 | 2013-02-06 | 华硕电脑股份有限公司 | Image processing device and method |
CN112799224A (en) * | 2019-11-14 | 2021-05-14 | 徕卡仪器(新加坡)有限公司 | System and method for generating output image data and microscope |
US11733503B2 (en) | 2019-11-14 | 2023-08-22 | Leica Instruments (Singapore) Pte. Ltd. | System and a method for generating output image data and a microscope |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4263131B2 (en) | Color conversion method and image processing apparatus | |
JP4565260B2 (en) | Signal processing device | |
JP2012028903A (en) | Color processing apparatus and program | |
JP2004252620A (en) | Image processing device and method, and program | |
KR20080043688A (en) | Image forming apparatus and image forming method capable of revising gray image | |
JP5257158B2 (en) | Color conversion apparatus, color conversion method and program | |
JP3931886B2 (en) | Device link profile creation method and apparatus, and image processing apparatus | |
JP2011045052A (en) | Image processing apparatus | |
JP4250863B2 (en) | Color correction processing method and apparatus | |
JP4449503B2 (en) | Image processing device | |
KR20050109663A (en) | Method and apparatus for creating profile | |
JP2008042711A (en) | Color converter, color converting method, color conversion program, color conversion coefficient creating apparatus, color conversion coefficient creating method, and color conversion coefficient creation program | |
JP2009147492A (en) | Image processor and program | |
JP4853296B2 (en) | Color conversion apparatus, color conversion method, color conversion program, color conversion coefficient creation apparatus, color conversion coefficient creation method, and color conversion coefficient creation program | |
JP2005099892A (en) | Image processor and method therefor | |
JP4633806B2 (en) | Color correction techniques for color profiles | |
JP4300780B2 (en) | Color conversion coefficient creation method, color conversion coefficient creation apparatus, program, and storage medium | |
JP5206428B2 (en) | Color processing apparatus and program | |
JPH0946529A (en) | Image processing unit and method | |
JP2005210339A (en) | Image processor, print controller, and image processing method and program | |
JP2011024031A (en) | Color processing apparatus and program | |
JP2008160298A (en) | Color gamut generator, color gamut generation method, color gamut generation program and color converter | |
JP2008245274A (en) | Method and apparatus for regulating color conversion profile | |
JP2008301341A (en) | Image signal processing apparatus | |
JP2005184117A (en) | Color conversion apparatus and color conversion method |