JP2005260557A - Pseudo color reduction for color image - Google Patents

Pseudo color reduction for color image Download PDF

Info

Publication number
JP2005260557A
JP2005260557A JP2004068885A JP2004068885A JP2005260557A JP 2005260557 A JP2005260557 A JP 2005260557A JP 2004068885 A JP2004068885 A JP 2004068885A JP 2004068885 A JP2004068885 A JP 2004068885A JP 2005260557 A JP2005260557 A JP 2005260557A
Authority
JP
Japan
Prior art keywords
color
edge
pixel
edge pixel
hue
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
JP2004068885A
Other languages
Japanese (ja)
Inventor
Takashi Imai
俊 今井
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 JP2004068885A priority Critical patent/JP2005260557A/en
Publication of JP2005260557A publication Critical patent/JP2005260557A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide technology for appropriately reducing a pseudo color which is apt to occur in an edge pixel. <P>SOLUTION: The edge pixel existing in an edge in a color image and an edge direction in the edge pixel are first detected. A plurality of reference pixels which are confronted with each other across a virtual straight line along the edge direction and are adjacent to the edge pixel are detected. A color of the edge pixel is adjusted based on a relation between the colors of a plurality of the reference pixels and the color of the edge pixel. Thus, the pseudo color of the edge pixel is reduced. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

この発明は、カラー画像の偽色を低減する技術に関する。   The present invention relates to a technique for reducing false colors in a color image.

デジタルカメラとしては、単板式の固体撮像素子とベイヤー配列のカラーフィルタとを利用したものが一般的である。よく知られているように、ベイヤー配列のカラーフィルタでは、各画素に1つの色成分のフィルタのみが設けられている。このような単板式の固体撮像素子で得られる原データ(RAWデータと呼ばれる)は、各画素が1色分のデータのみで構成されている。通常は、このRAWデータに色補間(「画素補間」とも呼ぶ)を行うことによって、各画素における3つの色成分RGBが算出される。   As a digital camera, a camera using a single-plate solid-state imaging device and a Bayer color filter is generally used. As is well known, in a Bayer color filter, only one color component filter is provided for each pixel. Original data (referred to as RAW data) obtained with such a single-plate solid-state image sensor is composed of only one color of data for each pixel. Usually, three color components RGB in each pixel are calculated by performing color interpolation (also referred to as “pixel interpolation”) on the RAW data.

ところで、このような色補間を行うと、いわゆる偽色が発生することが知られている。特に、エッジの近傍ではRAWデータの画素値が急激に変動しているために、偽色が発生しやすい傾向がある。そこで、従来から偽色を低減するために種々の方法が提案されている。   By the way, it is known that when such color interpolation is performed, a so-called false color is generated. In particular, since the pixel value of the RAW data fluctuates rapidly in the vicinity of the edge, a false color tends to occur. Therefore, various methods have been proposed in the past to reduce false colors.

特開2002−209224号公報JP 2002-209224 A 特開2002−77930号公報JP 2002-77930 A 特開2002−232902号公報JP 2002-232902 A

しかし、従来の方法では、偽色が十分に低減できなかったり、あるいは、偽色の低減に伴って鮮鋭度が過度に低下してしまうという問題があった。   However, the conventional method has a problem that the false color cannot be sufficiently reduced, or the sharpness is excessively lowered as the false color is reduced.

本発明は、偽色を低減するための新たな技術を提供することを目的とする。   An object of this invention is to provide the new technique for reducing a false color.

上記目的を達成するために、本発明の装置は、カラー画像の偽色を低減するための画像処理装置であって、
カラー画像内のエッジに存在するエッジ画素と前記エッジ画素におけるエッジ方向とを検出するエッジ検出部と、
前記エッジ方向に沿った仮想的な直線を挟んで対向し前記エッジ画素に隣接する複数の参照画素を検出するとともに、前記複数の参照画素の色と前記エッジ画素の色との関係に基づいて前記エッジ画素の色を調整することによって前記エッジ画素の偽色を低減する偽色低減処理部と、
を備える。
In order to achieve the above object, an apparatus of the present invention is an image processing apparatus for reducing false colors of a color image,
An edge detection unit that detects edge pixels existing at edges in a color image and an edge direction of the edge pixels;
A plurality of reference pixels that are opposed to and adjacent to the edge pixel across a virtual straight line along the edge direction are detected, and based on the relationship between the color of the plurality of reference pixels and the color of the edge pixel A false color reduction processing unit that reduces the false color of the edge pixel by adjusting the color of the edge pixel;
Is provided.

この装置によれば、エッジ画素の色と、エッジの両側にある参照画素の色とに応じてエッジ画素の色を調整するので、エッジ画素に生じ易い偽色を適切に低減することができる。   According to this apparatus, since the color of the edge pixel is adjusted according to the color of the edge pixel and the color of the reference pixel on both sides of the edge, it is possible to appropriately reduce false colors that are likely to occur in the edge pixel.

前記偽色低減処理部は、前記複数の参照画素のうちで前記エッジ画素の色相により近い色相を有する色近接参照画素の色相に近づくように前記エッジ画素の色調整を実行する第1の偽色低減モードを有するようにしてもよい。   The false color reduction processing unit performs first color adjustment of the edge pixel so as to approach the hue of a color proximity reference pixel having a hue closer to the hue of the edge pixel among the plurality of reference pixels. A reduction mode may be provided.

この構成によれば、エッジ画素に偽色が発生している場合に、エッジ画素の色相を色近接参照画素の色相に近づけることによって偽色を低減することができる。   According to this configuration, when a false color is generated in the edge pixel, the false color can be reduced by bringing the hue of the edge pixel close to the hue of the color proximity reference pixel.

前記偽色低減処理部は、
(i)前記色近接参照画素の色相と前記エッジ画素の色相との差分が所定の第1の閾値よりも小さい場合に、前記第1の偽色低減モードを実行し、
(ii)前記色相の差分が前記第1の閾値よりも大きい場合には、前記エッジ画素の彩度を低減する第2の偽色低減モードを実行するようにしてもよい。
The false color reduction processing unit
(I) executing the first false color reduction mode when a difference between a hue of the color proximity reference pixel and a hue of the edge pixel is smaller than a predetermined first threshold;
(Ii) When the difference in hue is larger than the first threshold value, a second false color reduction mode for reducing the saturation of the edge pixel may be executed.

この構成によれば、色近接参照画素の色相とエッジ画素の色相との差分の大きさに応じたそれぞれ適切な方法で偽色を低減することができる。具体的には、色相の差分が比較的小さいときには、色近接参照画素の色相にエッジ画素の色相を近づけることによって、エッジ画素の本来の色相に近づけることができる。また、色相の差分が比較的大きいときには、エッジ画素の彩度を低下させることによって、エッジ画素に偽色が発生していても目立ち難くすることができる。   According to this configuration, it is possible to reduce the false color by an appropriate method according to the magnitude of the difference between the hue of the color proximity reference pixel and the hue of the edge pixel. Specifically, when the difference in hue is relatively small, the original hue of the edge pixel can be approximated by bringing the hue of the edge pixel close to the hue of the color proximity reference pixel. In addition, when the hue difference is relatively large, the saturation of the edge pixel is reduced, so that the edge pixel can be made inconspicuous even if a false color is generated.

前記第1の偽色低減モードは、
(i−1)前記色相の差分が前記第1の閾値よりも小さな第2の閾値よりも小さい場合には、前記エッジ画素の彩度を維持しつつ前記エッジ画素の色相を前記色近接参照画素の色相に近づけるように前記エッジ画素の色調整を実行する第1のサブモードと、
(i−2)前記色相の差分が前記第1の閾値と前記第2の閾値との間にある場合には、前記エッジ画素の彩度を低減しつつ前記エッジ画素の色相を前記色近接参照画素の色相に近づけるように前記エッジ画素の色調整を実行する第2のサブモードとを含むようにしてもよい。
The first false color reduction mode is:
(I-1) When the hue difference is smaller than a second threshold smaller than the first threshold, the hue of the edge pixel is changed to the color proximity reference pixel while maintaining the saturation of the edge pixel. A first sub-mode for performing color adjustment of the edge pixel so as to approach the hue of
(I-2) When the hue difference is between the first threshold value and the second threshold value, the hue of the edge pixel is referred to the color proximity reference while reducing the saturation of the edge pixel. A second sub-mode that performs color adjustment of the edge pixel so as to approach the hue of the pixel may be included.

この構成によれば、色近接参照画素の色相とエッジ画素の色相との差分の大きさに応じたそれぞれ適切な方法で偽色を低減することができる。   According to this configuration, it is possible to reduce the false color by an appropriate method according to the magnitude of the difference between the hue of the color proximity reference pixel and the hue of the edge pixel.

前記エッジ検出部は、前記エッジ方向として、45度間隔で予め設定された所定の複数の方向の中の1つを選択し、
前記偽色低減処理部は、前記複数の参照画素として、前記エッジ画素の周囲に存在する8つの隣接画素のうちの2つの画素を選択するようにしてもよい。
The edge detection unit selects one of a plurality of predetermined directions set in advance at intervals of 45 degrees as the edge direction,
The false color reduction processing unit may select two of the eight neighboring pixels existing around the edge pixel as the plurality of reference pixels.

この構成によれば、参照画素を容易に選択することができる。   According to this configuration, the reference pixel can be easily selected.

上記画像処理装置は、さらに、各画素が一部の色成分のみを有する色補間前のカラー画像に対して色補間処理を行うことによって、各画素の全色成分を求める色補間処理部を備えており、
前記エッジ検出部は、前記色補間処理前のカラー画像に対して処理を実行し、
前記偽色低減処理部は、前記色補間処理後のカラー画像に対して処理を実行するようにしてもよい。
The image processing apparatus further includes a color interpolation processing unit that obtains all color components of each pixel by performing color interpolation processing on a color image before color interpolation in which each pixel has only some color components. And
The edge detection unit performs a process on the color image before the color interpolation process,
The false color reduction processing unit may execute processing on the color image after the color interpolation processing.

この構成によれば、色補間前のカラー画像に基づいて、適切な偽色低減処理を実行することができる。   According to this configuration, it is possible to execute appropriate false color reduction processing based on the color image before color interpolation.

なお、本発明は、種々の形態で実現することが可能であり、例えば、画像処理方法および装置、偽色低減方法および装置、それらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、そのコンピュータプログラムを含み搬送波内に具現化されたデータ信号、等の形態で実現することができる。   The present invention can be realized in various forms. For example, an image processing method and apparatus, a false color reduction method and apparatus, a computer program for realizing the functions of the method or apparatus, and the computer The present invention can be realized in the form of a recording medium recording the program, a data signal including the computer program and embodied in a carrier wave, and the like.

次に、本発明の実施の形態を以下の順序で説明する。
A.実施例:
B.変形例
Next, embodiments of the present invention will be described in the following order.
A. Example:
B. Modified example

A.実施例:
図1は、本発明の一実施例としての画像処理システムを示す説明図である。この画像処理システムは、デジタルカメラ100とコンピュータ200とを備えている。コンピュータ200は、デジタルカメラ100のRAWデータからビットマップデータBMIGを作成する画像処理部210を備えている。なお、画像処理部210は、デジタルカメラ100の内部に設けられていてもよく、また、他の装置(例えばカラープリンタ)に設けられていてもよい。
A. Example:
FIG. 1 is an explanatory diagram showing an image processing system as an embodiment of the present invention. This image processing system includes a digital camera 100 and a computer 200. The computer 200 includes an image processing unit 210 that creates bitmap data BMIG from RAW data of the digital camera 100. The image processing unit 210 may be provided inside the digital camera 100 or may be provided in another device (for example, a color printer).

図2は、デジタルカメラ100のカラーフィルタ配列(ベイヤー配列)の一例を示している。四角い枠は、それぞれ1つの画素に相当する。各画素には、3原色RGBのうちの1つの色成分のフィルタのみが設けられている。従って、RAWデータにおける各画素の画素値は、R成分とG成分とB成分とのうちの1つの成分のみで構成されている。なお、カラーフィルタとしては、原色系のフィルタ(RGBフィルタ)の代わりに、補色系のフィルタ(YMCGフィルタ)が用いられる場合もある。   FIG. 2 shows an example of a color filter array (Bayer array) of the digital camera 100. Each square frame corresponds to one pixel. Each pixel is provided with a filter for only one color component of the three primary colors RGB. Accordingly, the pixel value of each pixel in the RAW data is composed of only one component of the R component, the G component, and the B component. As a color filter, a complementary color filter (YMCG filter) may be used instead of the primary color filter (RGB filter).

図1の画素補間部220は、RAWデータに各種の処理を行うことによって、各画素に関してすべての色成分(例えばRGBやYCbCr)を算出する。画素補間部220は、エッジ検出処理部222と、色補間処理部224と、偽色低減処理部226とを含んでいる。これらの各部の処理内容については後述する。   The pixel interpolation unit 220 in FIG. 1 calculates all color components (for example, RGB and YCbCr) for each pixel by performing various processes on the RAW data. The pixel interpolation unit 220 includes an edge detection processing unit 222, a color interpolation processing unit 224, and a false color reduction processing unit 226. The processing contents of these units will be described later.

色調整部230は、画素補間後のカラー画像データ(例えばYCbCrデータ)に対してホワイトバランスなどの色調整を実行し、階調補正部240はさらに露出補正やγ補正などの階調補正を実行する。こうして生成されたビットマップ画像データBMIGは、コンピュータ200のハードディスク内に設けられた画像格納部250に格納される。なお、画像処理部210の各部の機能は、コンピュータプログラムによって実現される。   The color adjustment unit 230 performs color adjustment such as white balance on color image data (for example, YCbCr data) after pixel interpolation, and the gradation correction unit 240 further performs gradation correction such as exposure correction and γ correction. To do. The bitmap image data BMIG generated in this way is stored in the image storage unit 250 provided in the hard disk of the computer 200. Note that the function of each unit of the image processing unit 210 is realized by a computer program.

図3は、画素補間部220の処理手順を示すフローチャートである。ステップS1では、エッジ検出処理部222が、RAWデータで表されているカラー画像内の各画素のエッジ強度とエッジ方向とを検出する。図4(A)は、画素配列の一例を示している。説明の便宜上、各画素にはカラーフィルタの色を示すR、GまたはBの文字と、画素の位置を示す2桁の数字とが割り当てられている。なお、R,G,Bのカラーフィルタが設けられた画素をそれぞれ「R画素」、「G画素」、「B画素」とも呼ぶ。この例では、中央にある画素R33がエッジ検出処理の対象画素である。図4(B),(C)は、45度方向と135度方向のエッジ量を検出するためのエッジフィルタの係数配列の一例をそれぞれ示している。処理対象画素Pxにおける45度方向のエッジ量Δd45と135度方向のエッジ量Δd135は、以下の式で算出される。   FIG. 3 is a flowchart showing a processing procedure of the pixel interpolation unit 220. In step S1, the edge detection processing unit 222 detects the edge strength and the edge direction of each pixel in the color image represented by the RAW data. FIG. 4A shows an example of a pixel array. For convenience of explanation, each pixel is assigned an R, G or B character indicating the color of the color filter and a two-digit number indicating the pixel position. The pixels provided with R, G, and B color filters are also referred to as “R pixels”, “G pixels”, and “B pixels”, respectively. In this example, the pixel R33 at the center is the target pixel for the edge detection process. FIGS. 4B and 4C show examples of edge filter coefficient arrays for detecting edge amounts in the 45-degree direction and the 135-degree direction, respectively. The edge amount Δd45 in the 45 degree direction and the edge amount Δd135 in the 135 degree direction in the processing target pixel Px are calculated by the following equations.

Figure 2005260557
ここで、a〜hは所定の正の係数であり、G41,G32…は各画素の画素値(G成分値)である。なお、処理対象画素がB画素の場合も同じエッジフィルタを用いることができる。
Figure 2005260557
Here, a to h are predetermined positive coefficients, and G41, G32... Are pixel values (G component values) of the respective pixels. The same edge filter can also be used when the processing target pixel is a B pixel.

図5(A)は、G画素を中心とする画素配列を示し、図5(B),(C)はG画素用のエッジフィルタを示している。この時のエッジ量Δd45,Δd135は、以下の式で算出される。   FIG. 5A shows a pixel array centered on G pixels, and FIGS. 5B and 5C show edge filters for G pixels. The edge amounts Δd45 and Δd135 at this time are calculated by the following equations.

Figure 2005260557
Figure 2005260557

図4および図5に示したエッジフィルタを用いることによって、RAWデータの各画素における45度方向と135度方向のエッジ量をそれぞれ算出することができる。なお、上記数式1,2から理解できるように、本実施例では処理対象がR,B,G画素のいずれの場合にも、エッジ検出にはG成分のみが使用される。これは、(1)G画素がチェッカーボード状に1画素おきに配置されていて最も多く存在すること、および、(2)RGB成分の中でG成分が輝度に最も大きな影響を有しているのでエッジの発生に対する影響も大きいこと、の2つの理由からである。すなわち、G成分を用いることによって各画素のエッジを正確に検出することができる。   By using the edge filters shown in FIGS. 4 and 5, the edge amounts in the 45 degree direction and the 135 degree direction in each pixel of the RAW data can be respectively calculated. As can be understood from Equations 1 and 2, in this embodiment, only the G component is used for edge detection when the processing target is any of R, B, and G pixels. This is because (1) G pixels are arranged every other pixel in a checkerboard pattern, and there are the most, and (2) G components have the greatest influence on luminance among RGB components. This is because of the two reasons that the influence on the occurrence of the edge is large. That is, the edge of each pixel can be accurately detected by using the G component.

図6(A)は、45度方向と135度方向のエッジ量Δd45,Δd135を用いたエッジ方向の決定方法を示している。ここでは、エッジ方向θxとエッジ強度Axが次の式に従って算出される。   FIG. 6A shows an edge direction determination method using edge amounts Δd45 and Δd135 in the 45 degree direction and the 135 degree direction. Here, the edge direction θx and the edge strength Ax are calculated according to the following equations.

Figure 2005260557
Figure 2005260557

この式および図6(A)から理解できるように、エッジ方向θxは画素配列の135度方向から右回りに測った角度である。本実施例では、エッジ方向θxの値として、45°おきの4つの値(0°,45°,90°,135°)のうちから、上記数式3で得られたエッジ角度に最も近い値を1つ選択する。また、エッジ強度Axが所定の閾値Ath以上の場合にこの画素をエッジ画素であると判定し、閾値Ath未満の場合には非エッジ画素であると判定する。なお、各画素がエッジ画素であるか否かを示すデータ(「エッジ画像データ」とも呼ぶ)は、コンピュータ200のメモリ内に一時的に格納される。あるいは、カラー画像データにおける各画素の画素データに、エッジ画素であるか否かのフラグを付加するようにしてもよい。   As can be understood from this equation and FIG. 6A, the edge direction θx is an angle measured clockwise from the 135-degree direction of the pixel array. In this embodiment, as the value of the edge direction θx, a value closest to the edge angle obtained by the above Equation 3 is selected from four values (0 °, 45 °, 90 °, 135 °) every 45 °. Select one. Further, when the edge intensity Ax is equal to or greater than the predetermined threshold Ath, this pixel is determined to be an edge pixel, and when it is less than the threshold Ath, it is determined to be a non-edge pixel. Note that data indicating whether each pixel is an edge pixel (also referred to as “edge image data”) is temporarily stored in the memory of the computer 200. Or you may make it add the flag of whether it is an edge pixel to the pixel data of each pixel in color image data.

なお、本実施例では、複数のエッジ方向に関するエッジ成分の大きさを「エッジ量」と呼び、複数のエッジ方向のエッジ量を総合して得られるエッジ成分の大きさを「エッジ強度」と呼んでいる。しかし、「エッジ量」と「エッジ強度」の両方を「エッジ量」と呼ぶことも可能であり、あるいは、両方を「エッジ強度」と呼ぶようにしでもよい。   In this embodiment, the size of the edge component for a plurality of edge directions is referred to as “edge amount”, and the size of the edge component obtained by combining the edge amounts in the plurality of edge directions is referred to as “edge strength”. It is out. However, both “edge amount” and “edge strength” can be called “edge amount”, or both can be called “edge strength”.

図6(B)は、4つのエッジ方向の場合の2つの参照画素Pref1,Pref2を示している。ここで、「参照画素」とは、後述する偽色低減処理においてエッジ画素Pxの色調整に利用する画素を意味する。本実施例では、参照画素Pref1,Pref2として、エッジ画素Pxに隣接する8つの画素P1〜P8のうちで、エッジ方向θxを有する仮想的な直線(矢印で示す)を挟んで対向する2つの画素が選択される。例えば、エッジ方向θxが0°の場合には、画素P3,P6が参照画素Pref1,Pref2として選択される。なお、この仮想的な直線は、画像内のエッジの境界と一致していることが多い。参照画素Pref1,Pref2は、エッジ画素Pxを通るエッジの境界の両側の領域に存在するものであると考えることができる。例えば、第1の参照画素Pref1が輝度の高い領域にあるときには、第2の参照画素Pref2は輝度の低い領域にある。従って、2つの参照画素Pref1,Pref2の画素値にはかなり大きな差異があるのが普通である。エッジ画素Pxの色は、後述する色補間処理において色成分が補充される際に、隣接画素P1〜P8の影響を受けて偽色が発生することがある。そこで、エッジ画素Pxの色を、参照画素Pref1,Pref2の色を用いて調整することによって偽色を低減することができる。なお、参照画素の選択は、エッジ検出処理部222が行っても良く、あるいは、偽色低減処理部226が行ってもよい。   FIG. 6B shows two reference pixels Pref1 and Pref2 in the case of four edge directions. Here, the “reference pixel” means a pixel used for color adjustment of the edge pixel Px in a false color reduction process described later. In the present embodiment, as the reference pixels Pref1 and Pref2, of the eight pixels P1 to P8 adjacent to the edge pixel Px, two pixels facing each other across a virtual straight line (indicated by an arrow) having the edge direction θx. Is selected. For example, when the edge direction θx is 0 °, the pixels P3 and P6 are selected as the reference pixels Pref1 and Pref2. This virtual straight line often coincides with the boundary of the edge in the image. It can be considered that the reference pixels Pref1 and Pref2 exist in regions on both sides of the edge boundary passing through the edge pixel Px. For example, when the first reference pixel Pref1 is in a high luminance region, the second reference pixel Pref2 is in a low luminance region. Therefore, the pixel values of the two reference pixels Pref1 and Pref2 are usually significantly different. The color of the edge pixel Px may generate a false color due to the influence of the adjacent pixels P1 to P8 when a color component is supplemented in a color interpolation process described later. Therefore, the false color can be reduced by adjusting the color of the edge pixel Px using the colors of the reference pixels Pref1 and Pref2. The selection of the reference pixel may be performed by the edge detection processing unit 222 or may be performed by the false color reduction processing unit 226.

こうしてエッジ検出処理が終了すると、図3のステップS2において、色補間処理部224が色補間処理を実行する。この色補間処理は、RAWデータの各画素に欠けている色成分を周囲の画素から補間する処理であり、狭義の画素補間処理である。この色補間処理としては、単純補間などの任意の処理を利用することができる。この色補間処理の結果、すべての画素の画素値がRGBの3成分を有する画素値となる。また、本実施例では、色補間後のRGB値から、輝度・色差色空間(YCbCr色空間)の画素値が算出される。この理由は、次の偽色低減処理においてYCbCrデータを使用するからである。   When the edge detection process is thus completed, the color interpolation processing unit 224 executes the color interpolation process in step S2 of FIG. This color interpolation process is a process of interpolating a color component lacking in each pixel of RAW data from surrounding pixels, and is a pixel interpolation process in a narrow sense. As this color interpolation processing, any processing such as simple interpolation can be used. As a result of this color interpolation processing, the pixel values of all the pixels become pixel values having three components of RGB. In this embodiment, the pixel value of the luminance / color difference color space (YCbCr color space) is calculated from the RGB values after color interpolation. This is because YCbCr data is used in the next false color reduction process.

なお、ステップS2の色補間処理とステップS1のエッジ検出処理との間には直接的な関係が無いので、色補間処理をエッジ検出処理の前に実行することも可能である。   Since there is no direct relationship between the color interpolation process in step S2 and the edge detection process in step S1, the color interpolation process can be executed before the edge detection process.

ステップS3では、偽色低減処理部226が偽色低減処理を実行する。図7は、ステップS3の詳細手順を示すフローチャートである。図7のルーチンは、カラー画像内の各画素毎にそれぞれ実行される。   In step S3, the false color reduction processing unit 226 executes a false color reduction process. FIG. 7 is a flowchart showing the detailed procedure of step S3. The routine in FIG. 7 is executed for each pixel in the color image.

ステップT1では、処理対象画素がエッジ画素であるか否かが判断される。非エッジ画素の場合には、ステップT2において、非エッジ画素用の彩度調整が実行される。図8は、非エッジ画素に対する彩度調整の内容を示すグラフである。図8(A)の横軸は輝度Yの値を示し、縦軸は彩度調整に使用される係数αの値を示している。彩度調整後のCb’,Cr’成分は、元のCb,Cr成分に係数αを乗じることによって得られる。図8(B)示すように、対象画素色Pxの彩度SはCbCr平面上(図8(B))の原点から対象画素色Pxまでの距離で与えられる。また、その色相Hは、Cr軸から対象画素色Pxまでの角度で与えられる。図8(A)に示すように、輝度Yが0から所定の値(図8(A)では200)までの範囲では、係数αは1であり、実質的には彩度は維持される。輝度Yが200以上の場合には、係数αは1.0から0まで徐々に減少している。この例では、係数αの減少は直線的である。図8(B)は、αが1未満の場合に彩度が低減される状態を示している。すなわち、彩度調整後の対象画素色Px’(黒四角で示す)は、色相Hが調整前と同じであり、彩度Sが低下していることが理解できる。   In step T1, it is determined whether the processing target pixel is an edge pixel. In the case of a non-edge pixel, saturation adjustment for the non-edge pixel is executed in step T2. FIG. 8 is a graph showing the content of saturation adjustment for non-edge pixels. In FIG. 8A, the horizontal axis indicates the value of luminance Y, and the vertical axis indicates the value of coefficient α used for saturation adjustment. The Cb ′ and Cr ′ components after saturation adjustment are obtained by multiplying the original Cb and Cr components by a coefficient α. As shown in FIG. 8B, the saturation S of the target pixel color Px is given by the distance from the origin on the CbCr plane (FIG. 8B) to the target pixel color Px. The hue H is given by an angle from the Cr axis to the target pixel color Px. As shown in FIG. 8A, when the luminance Y is in the range from 0 to a predetermined value (200 in FIG. 8A), the coefficient α is 1, and the saturation is substantially maintained. When the luminance Y is 200 or more, the coefficient α gradually decreases from 1.0 to 0. In this example, the decrease in coefficient α is linear. FIG. 8B shows a state where the saturation is reduced when α is less than 1. That is, it can be understood that the target pixel color Px ′ (indicated by a black square) after the saturation adjustment has the same hue H as that before the adjustment and the saturation S is lowered.

このように、輝度Yが所定値よりも大きく明るい非エッジ画素において彩度を低減する理由は、明るい領域においては非エッジ画素でも偽色が発生し易い傾向があるからである。すなわち、仮に明るい非エッジ画素に偽色が発生していても、図8の処理によってその彩度が低下するので、偽色が目立ちにくくすることができる。   As described above, the reason why the saturation is reduced in the bright non-edge pixels whose luminance Y is larger than the predetermined value is that false colors tend to occur even in the non-edge pixels in a bright region. That is, even if a false color is generated in a bright non-edge pixel, the saturation is reduced by the processing of FIG. 8, so that the false color can be made inconspicuous.

図7のステップT1において対象画素がエッジ画素である場合には、ステップT3〜T5が実行される。ステップT3では、そのエッジ画素と参照画素の色相がそれぞれ算出される。図9(A)は、CbCr平面上におけるエッジ画素Pxの色相H(x)と参照画素Pref1,Pref2の色相H(ref1),H(ref2)の例を示している。色相Hは、次の式で算出される。   If the target pixel is an edge pixel in step T1 in FIG. 7, steps T3 to T5 are executed. In step T3, the hues of the edge pixel and the reference pixel are calculated. FIG. 9A shows an example of the hue H (x) of the edge pixel Px on the CbCr plane and the hues H (ref1) and H (ref2) of the reference pixels Pref1 and Pref2. Hue H is calculated by the following equation.

Figure 2005260557
Figure 2005260557

ステップT4では、エッジ画素Pxと2つの参照画素Pref1,Pref2との色相差ΔH1,ΔH2、および、その最小値ΔHminが次の式で算出される。   In step T4, the hue differences ΔH1 and ΔH2 between the edge pixel Px and the two reference pixels Pref1 and Pref2, and the minimum value ΔHmin are calculated by the following equations.

Figure 2005260557
Figure 2005260557

ステップT5では、最小色相差ΔHminの値に応じてエッジ画素の色が調整される。図9(B)は、エッジ画素に対する色調整モードを示している。この例では、最小色相差ΔHminが2つの閾値TH1,TH2によって3つの範囲に区分されており、各範囲においてそれぞれ異なる色調整モードが実行される。この際、図9(A)に記載されているように、最小色相値ΔHminが第1の閾値TH1以下であるか否かに応じて、色調整の目標色相Htgの有無が判定される。すなわち、ΔHmin≦TH1の場合には、最小色相値ΔHminを与える参照画素の色相が、目標色相Htgとして使用される。図9(A)の例では、第1の参照画素Pref1に対する色相差ΔH1の方が小さいので、その色相H(pref1)が目標色相Htgとなる。一方、TH1<ΔHminの場合には、目標色相Htgが無いものと判定される。図9(B)に示すように、目標色相Htgが存在する場合には、この目標色相Htgを用いた色調整モード(色相回転モードまたは色相/彩度調整モード)が実行される。一方、目標色相Htgが存在しない場合には、目標色相Htgを用いない彩度低減モードが実行される。   In step T5, the color of the edge pixel is adjusted according to the value of the minimum hue difference ΔHmin. FIG. 9B shows a color adjustment mode for edge pixels. In this example, the minimum hue difference ΔHmin is divided into three ranges by two thresholds TH1 and TH2, and different color adjustment modes are executed in each range. At this time, as described in FIG. 9A, the presence / absence of the target hue Htg for color adjustment is determined according to whether or not the minimum hue value ΔHmin is equal to or less than the first threshold value TH1. That is, when ΔHmin ≦ TH1, the hue of the reference pixel that gives the minimum hue value ΔHmin is used as the target hue Htg. In the example of FIG. 9A, since the hue difference ΔH1 with respect to the first reference pixel Pref1 is smaller, the hue H (pref1) becomes the target hue Htg. On the other hand, if TH1 <ΔHmin, it is determined that there is no target hue Htg. As shown in FIG. 9B, when the target hue Htg exists, a color adjustment mode (hue rotation mode or hue / saturation adjustment mode) using the target hue Htg is executed. On the other hand, when the target hue Htg does not exist, the saturation reduction mode that does not use the target hue Htg is executed.

図10(A)は、色相回転モードの内容を示している。このモードは、エッジ画素Pxの色相と、目標色相Htgとの差が十分に小さい場合(ΔHmin≦TH2の場合)に実行される。色相回転モードでは、彩度を一定に維持しつつ、エッジ画素Pxの色相が目標色相Htgに一致するように、エッジ画素PxのCbCr成分が調整される。図10(A)には、色調整後のエッジ画素Px’の色が黒四角で示されている。なお、輝度Yは一定に維持されることが好ましい。これは他のモードでも同様である。   FIG. 10A shows the content of the hue rotation mode. This mode is executed when the difference between the hue of the edge pixel Px and the target hue Htg is sufficiently small (when ΔHmin ≦ TH2). In the hue rotation mode, the CbCr component of the edge pixel Px is adjusted so that the hue of the edge pixel Px matches the target hue Htg while keeping the saturation constant. In FIG. 10A, the color of the edge pixel Px ′ after color adjustment is indicated by a black square. Note that the luminance Y is preferably maintained constant. The same applies to other modes.

このような色相回転モードを行う理由は次の通りである。前述したように、参照画素Pref1,Pref2はエッジの境界の両側の領域(高輝度領域と低輝度領域)に存在するものと考えられる。エッジ画素Pxの色相と目標色相Htgとの差が十分に小さいときには、ステップS3の色補間処理によってエッジ画素Pxの色が被写体の本来の色からあまりずれておらず、エッジ画素Pxの本来の色相は目標色相Htgに近いものであった可能性が高い。そこで、この場合には、エッジ画素Pxの色相を、これに近い色相を有する参照画素Pref1(「色近接参照画素」とも呼ぶ)の色相Htgに一致させることによって、偽色を低減することができる。   The reason for performing such a hue rotation mode is as follows. As described above, the reference pixels Pref1 and Pref2 are considered to exist in the regions (high luminance region and low luminance region) on both sides of the edge boundary. When the difference between the hue of the edge pixel Px and the target hue Htg is sufficiently small, the color of the edge pixel Px is not significantly deviated from the original color of the subject by the color interpolation processing in step S3, and the original hue of the edge pixel Px. Is likely to be close to the target hue Htg. Therefore, in this case, the false color can be reduced by matching the hue of the edge pixel Px with the hue Htg of the reference pixel Pref1 (also referred to as “color proximity reference pixel”) having a hue close thereto. .

図10(B)は、色相/彩度調整モードの内容を示している。このモードは、エッジ画素Pxの色相と、目標色相Htgとの差が中間的な範囲にある場合(TH2<ΔHmin≦TH1の場合)に実行される。色相/彩度調整モードでは、彩度を低減しつつ、エッジ画素Pxの色相が目標色相Htgに一致するようにエッジ画素の色成分CbCrが調整される。図10(B)では、エッジ画素PxのCr成分を維持したままCb成分を低下させることによって色相と彩度とを同時に調整している。なお、第1象限において、エッジ画素色Pxの色相が参照画素Pref1の色相よりも右側に存在する場合には、図10(B)とは逆に、エッジ画素PxのCb成分を維持したままCr成分を低下させる。但し、Cb成分とCr成分の両方を変更することによって、彩度を低減しつつエッジ画素Pxの色相を目標色相Htgに一致させることも可能である。   FIG. 10B shows the contents of the hue / saturation adjustment mode. This mode is executed when the difference between the hue of the edge pixel Px and the target hue Htg is in an intermediate range (when TH2 <ΔHmin ≦ TH1). In the hue / saturation adjustment mode, the color component CbCr of the edge pixel is adjusted so that the hue of the edge pixel Px matches the target hue Htg while reducing the saturation. In FIG. 10B, hue and saturation are simultaneously adjusted by reducing the Cb component while maintaining the Cr component of the edge pixel Px. In the first quadrant, when the hue of the edge pixel color Px is on the right side of the hue of the reference pixel Pref1, contrary to FIG. 10B, Cr is maintained while maintaining the Cb component of the edge pixel Px. Reduce ingredients. However, it is also possible to match the hue of the edge pixel Px with the target hue Htg while reducing the saturation by changing both the Cb component and the Cr component.

この色相/彩度調整モードでは、エッジ画素Pxの彩度が低下するので、偽色を目立ち難くすることができる。また、エッジ画素Pxの本来の色相は目標色相Htgに近いものであったと考えられるので、これを目標色相Htgに一致させることによって更に効果的に偽色を低減できる。   In this hue / saturation adjustment mode, the saturation of the edge pixel Px decreases, so that false colors can be made inconspicuous. Further, since the original hue of the edge pixel Px is considered to be close to the target hue Htg, the false color can be further effectively reduced by making this coincide with the target hue Htg.

図10(A)と図10(B)に示した2つのモードは、いずれもエッジ画素Pxの色相を目標色相Htgに一致させる点で共通している。なお、これらの2つのモードではエッジ画素Pxの色相を目標色相Htgに一致させているが、完全に一致させる必要は無く、一般にはエッジ画素Pxの色相を目標色相Htgに近づけるようにすればよい。   The two modes shown in FIGS. 10A and 10B are common in that the hue of the edge pixel Px matches the target hue Htg. In these two modes, the hue of the edge pixel Px is made to match the target hue Htg, but it is not necessary to make it completely match. Generally, the hue of the edge pixel Px may be made closer to the target hue Htg. .

図10(C)は、彩度低減モードの内容を示している。このモードは、エッジ画素Pxの色相と、目標色相Htgとの差が大きな場合(TH1<ΔHminの場合)に実行されるものである。彩度低減モードでは、エッジ画素Pxの色相を維持しつつ彩度を低減する。図10(B)では、エッジ画素PxのCb,Cr成分がいずれも0に設定される。従って、色調整後のエッジ画素Px’の色はグレーになる。この代わりに、Cb,Cr成分に1未満の共通の係数を乗ずることによって彩度を低減するようにしてもよい。こうすれば、色相を変化させずに彩度のみを低下させることができる。   FIG. 10C shows the content of the saturation reduction mode. This mode is executed when the difference between the hue of the edge pixel Px and the target hue Htg is large (when TH1 <ΔHmin). In the saturation reduction mode, the saturation is reduced while maintaining the hue of the edge pixel Px. In FIG. 10B, the Cb and Cr components of the edge pixel Px are both set to 0. Therefore, the color of the edge pixel Px ′ after color adjustment is gray. Instead, the saturation may be reduced by multiplying the Cb and Cr components by a common coefficient less than 1. In this way, it is possible to reduce only the saturation without changing the hue.

この彩度低減モードでは、エッジ画素Pxの彩度が低下するので、偽色を目立ち難くすることができる。特に、エッジ画素Pxの本来の色相が2つの参照画素Pref1,Pref2の色相から大きく離れている場合には、エッジ画素Pxの色相を参照画素Pref1,Pref2の色相に一致させると、却って偽色が強まる可能性がある。従って、エッジ画素Pxの色相を変化させずに彩度のみを低下させることによって、より効果的に偽色を低減できる可能性が高い。   In this saturation reduction mode, the saturation of the edge pixel Px is lowered, so that the false color can be made inconspicuous. In particular, when the original hue of the edge pixel Px is far away from the hues of the two reference pixels Pref1 and Pref2, if the hue of the edge pixel Px matches the hue of the reference pixels Pref1 and Pref2, a false color is displayed. There is a possibility of strengthening. Therefore, there is a high possibility that false colors can be reduced more effectively by reducing only the saturation without changing the hue of the edge pixel Px.

こうして各画素の偽色低減処理が終了すると、処理後のYCbCrデータが画素補間部220から色調整部230(図1)に供給される。色調整部230は、このYCbCrデータ)に対してホワイトバランスなどの色調整を実行する。また、階調補正部240は、露出補正やγ補正などの階調補正を実行する。この結果、色やコントラスが適正に補正されたビットマップ画像データBMIGが生成される。   When the false color reduction processing for each pixel is completed in this way, the processed YCbCr data is supplied from the pixel interpolation unit 220 to the color adjustment unit 230 (FIG. 1). The color adjustment unit 230 performs color adjustment such as white balance on the YCbCr data. The gradation correction unit 240 also performs gradation correction such as exposure correction and γ correction. As a result, bitmap image data BMIG in which the color and contrast are appropriately corrected is generated.

このように、上記実施例では、エッジ画素の色とこれに隣接する複数の参照画素の色との関係に基づいてエッジ画素の色を調整するようにしたので、エッジ部分で発生し易い偽色を適切に低減することが可能である。特に、図9(B)に示したように、エッジ画素と参照画素の最小色相差ΔHminの範囲に応じて色調整モードを切り換えるようにしたので、エッジ画素とその周囲の色との関係に応じた適切な方法で偽色を低減することが可能である。   Thus, in the above embodiment, the color of the edge pixel is adjusted based on the relationship between the color of the edge pixel and the colors of a plurality of reference pixels adjacent to the color of the edge pixel. Can be appropriately reduced. In particular, as shown in FIG. 9B, since the color adjustment mode is switched according to the range of the minimum hue difference ΔHmin between the edge pixel and the reference pixel, the color adjustment mode is changed according to the relationship between the edge pixel and the surrounding color. It is possible to reduce false colors by an appropriate method.

B.変形例:
なお、この発明は上記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
B. Variation:
The present invention is not limited to the above-described examples and embodiments, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.

B1.変形例1:
上記実施例では、2つの参照画素を用いてエッジ画素の色を調整していたが、3つ以上の参照画素を用いることも可能である。但し、この場合にも、参照画素としては、エッジ方向に沿った仮想的な直線を挟んで対向し、かつ、エッジ画素に隣接する画素群を選択することが好ましい。ここで、「エッジ画素に隣接する画素群」とは、そのすべての画素がエッジ画素に接している必要は無く、エッジ画素に最も近い画素がエッジ画素に接していれば良い。例えば、図6(B)に示した8隣接画素よりも外側にある画素を参照画素群の一部として選択することも可能である。なお、3つ以上の参照画素を利用する場合にも、上記実施例と同様に、エッジ画素に最も近い色相を有する参照画素の色相を用いてエッジ画素の色調整を行うことが好ましい。
B1. Modification 1:
In the above embodiment, the color of the edge pixel is adjusted using two reference pixels, but it is possible to use three or more reference pixels. However, in this case as well, it is preferable to select a pixel group that faces and sandwiches a virtual straight line along the edge direction and is adjacent to the edge pixel. Here, the “pixel group adjacent to the edge pixel” does not have to be in contact with the edge pixel, and it is sufficient that the pixel closest to the edge pixel is in contact with the edge pixel. For example, it is possible to select a pixel outside the eight adjacent pixels shown in FIG. 6B as a part of the reference pixel group. Even when three or more reference pixels are used, it is preferable to adjust the color of the edge pixel using the hue of the reference pixel having the hue closest to the edge pixel, as in the above embodiment.

B2.変形例2:
エッジ画素の色調整方法としては上記実施例で採用した方法以外の種々の方法を採用することができる。例えば、上記実施例ではエッジ画素の色相と参照画素の色相との関係に応じてエッジ画素の色調整を実行していたが、エッジ画素や参照画素の輝度も考慮にいれてエッジ画素の色調整を実行することも可能である。例えば、輝度の小さいエッジ画素は偽色が発生しているとしても目立ち難い傾向にある。従って、輝度が小さいエッジ画素に対しては偽色低減処理を行わないようにしてもよい。
B2. Modification 2:
As a method for adjusting the color of the edge pixel, various methods other than the method employed in the above embodiment can be employed. For example, in the above embodiment, the color adjustment of the edge pixel is executed in accordance with the relationship between the hue of the edge pixel and the hue of the reference pixel. However, the color adjustment of the edge pixel is performed in consideration of the luminance of the edge pixel and the reference pixel. It is also possible to execute. For example, edge pixels with low luminance tend to be inconspicuous even if false colors are generated. Therefore, the false color reduction process may not be performed on edge pixels with low luminance.

また、非エッジ画素に対する偽色低減処理(図8)は省略してもよい。但し、上記実施例のように、非エッジ画素に対する偽色低減処理とエッジ画素に対する偽色低減処理とを互いに異なる方法で実行することが好ましい。こうすることによって、エッジ画素と非エッジ画素とに対してそれぞれ適した偽色低減処理を行うことが可能である。   Further, the false color reduction process (FIG. 8) for non-edge pixels may be omitted. However, as in the above-described embodiment, it is preferable that the false color reduction process for non-edge pixels and the false color reduction process for edge pixels are executed by different methods. By doing so, it is possible to perform false color reduction processing suitable for edge pixels and non-edge pixels, respectively.

また、上記実施例では、エッジ画素と参照画素との色差の最小値ΔHminが第1の閾値TH1以下の場合を2つのサブモード(色相回転モードおよび色相/彩度調整モード)に分けていたが、これらを1つのモードに統合することも可能であり、あるいは、3つ以上のサブモードに分割することも可能である。このいずれの場合にも、ΔHmin≦TH1の各モードでは、エッジ画素の色相を目標色相Htgに近づけるような色調整を行うことが好ましい。   In the above embodiment, the case where the minimum value ΔHmin of the color difference between the edge pixel and the reference pixel is equal to or smaller than the first threshold value TH1 is divided into two submodes (hue rotation mode and hue / saturation adjustment mode). These can be combined into one mode, or divided into three or more submodes. In either case, in each mode of ΔHmin ≦ TH1, it is preferable to perform color adjustment so that the hue of the edge pixel approaches the target hue Htg.

なお、TH1<ΔHminの場合のモードに関しても、2つ以上のサブモードに分割するようにしてもよい。   Note that the mode in the case of TH1 <ΔHmin may also be divided into two or more submodes.

B3.変形例3:
エッジ方向の検出方法としては、図4〜図6で示した方法以外の種々のものを利用することができる。例えば、ソーベルフィルタなどの他のエッジフィルタを用いることも可能である。
B3. Modification 3:
As a method for detecting the edge direction, various methods other than the methods shown in FIGS. 4 to 6 can be used. For example, other edge filters such as a Sobel filter can be used.

B4.変形例4:
上記実施例は、偽色低減処理の際にYCbCr色空間を利用していたが、これ以外の任意の色空間を使用することが可能である。
B4. Modification 4:
In the above embodiment, the YCbCr color space is used in the false color reduction process, but any other color space can be used.

B5.変形例5:
上記実施例では、デジタルカメラ100で生成されたRAWデータに対して偽色低減処理を実行していたが、本発明の偽色低減処理は、RAWデータ以外の種々のカラー画像データに適用可能である。例えば、JPEG画像データを伸長して得られたビットマップデータ(YCbCrデータやRGBデータ)において、画素ブロックの境界にエッジが存在し、そのエッジ画素に偽色が発生している場合がある。このように、各画素がすべての色成分を有している画像データに対しても、本発明の偽色低減処理を実行することによって、エッジ画素における偽色を低減することが可能である。
B5. Modification 5:
In the above embodiment, the false color reduction process is performed on the RAW data generated by the digital camera 100. However, the false color reduction process of the present invention can be applied to various color image data other than the RAW data. is there. For example, in bitmap data (YCbCr data or RGB data) obtained by decompressing JPEG image data, an edge may exist at the boundary of the pixel block, and a false color may be generated at the edge pixel. As described above, it is possible to reduce the false color in the edge pixel by executing the false color reduction process of the present invention even for the image data in which each pixel has all the color components.

B6.変形例6:
上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。
B6. Modification 6:
In the above embodiment, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced by hardware.

本発明の一実施例としての画像処理システムを示す説明図。1 is an explanatory diagram showing an image processing system as one embodiment of the present invention. デジタルカメラのカラーフィルタ配列の一例を示す説明図。FIG. 3 is an explanatory diagram illustrating an example of a color filter array of a digital camera. 画素補間部の処理手順を示すフローチャート。The flowchart which shows the process sequence of a pixel interpolation part. R画素およびB画素用のエッジフィルタを示す説明図。Explanatory drawing which shows the edge filter for R pixel and B pixel. G画素用のエッジフィルタを示す説明図。Explanatory drawing which shows the edge filter for G pixels. エッジ方向の決定方法およびエッジ方向別の参照画素を示す説明図。Explanatory drawing which shows the determination method of edge direction, and the reference pixel according to edge direction. ステップS3の詳細手順を示すフローチャート。The flowchart which shows the detailed procedure of step S3. 非エッジ画素に対する彩度調整の内容を示すグラフ。The graph which shows the content of the saturation adjustment with respect to a non-edge pixel. エッジ画素と参照画素の色相の関係とエッジ画素に対する色調整モードを示す説明図。Explanatory drawing which shows the color adjustment mode with respect to the relationship between the hue of an edge pixel and a reference pixel, and an edge pixel. 3つの色調整モードの処理内容を示す説明図。Explanatory drawing which shows the processing content of three color adjustment modes.

符号の説明Explanation of symbols

100…デジタルカメラ
200…コンピュータ
210…画像処理部
220…画素補間部
222…エッジ検出処理部
224…色補間処理部
226…偽色低減処理部
230…色調整部
240…階調補正部
250…画像格納部
DESCRIPTION OF SYMBOLS 100 ... Digital camera 200 ... Computer 210 ... Image processing part 220 ... Pixel interpolation part 222 ... Edge detection processing part 224 ... Color interpolation processing part 226 ... False color reduction processing part 230 ... Color adjustment part 240 ... Tone correction part 250 ... Image Storage

Claims (8)

カラー画像の偽色を低減するための画像処理装置であって、
カラー画像内のエッジに存在するエッジ画素と前記エッジ画素におけるエッジ方向とを検出するエッジ検出部と、
前記エッジ方向に沿った仮想的な直線を挟んで対向し前記エッジ画素に隣接する複数の参照画素を検出するとともに、前記複数の参照画素の色と前記エッジ画素の色との関係に基づいて前記エッジ画素の色を調整することによって前記エッジ画素の偽色を低減する偽色低減処理部と、
を備える画像処理装置。
An image processing apparatus for reducing false colors in a color image,
An edge detection unit that detects edge pixels existing at edges in a color image and an edge direction of the edge pixels;
A plurality of reference pixels that are opposed to and adjacent to the edge pixel across a virtual straight line along the edge direction are detected, and based on the relationship between the color of the plurality of reference pixels and the color of the edge pixel A false color reduction processing unit that reduces the false color of the edge pixel by adjusting the color of the edge pixel;
An image processing apparatus comprising:
請求項1記載の画像処理装置であって、
前記偽色低減処理部は、前記複数の参照画素のうちで前記エッジ画素の色相により近い色相を有する色近接参照画素の色相に近づくように前記エッジ画素の色調整を実行する第1の偽色低減モードを有する、画像処理装置。
The image processing apparatus according to claim 1,
The false color reduction processing unit performs first color adjustment of the edge pixel so as to approach the hue of a color proximity reference pixel having a hue closer to the hue of the edge pixel among the plurality of reference pixels. An image processing apparatus having a reduction mode.
請求項1または2記載の画像処理装置であって、
前記偽色低減処理部は、
(i)前記色近接参照画素の色相と前記エッジ画素の色相との差分が所定の第1の閾値よりも小さい場合に、前記第1の偽色低減モードを実行し、
(ii)前記色相の差分が前記第1の閾値よりも大きい場合には、前記エッジ画素の彩度を低減する第2の偽色低減モードを実行する、画像処理装置。
The image processing apparatus according to claim 1 or 2,
The false color reduction processing unit
(I) executing the first false color reduction mode when a difference between a hue of the color proximity reference pixel and a hue of the edge pixel is smaller than a predetermined first threshold;
(Ii) An image processing device that executes a second false color reduction mode for reducing the saturation of the edge pixel when the difference in hue is larger than the first threshold.
請求項3記載の画像処理装置であって、
前記第1の偽色低減モードは、
(i−1)前記色相の差分が前記第1の閾値よりも小さな第2の閾値よりも小さい場合には、前記エッジ画素の彩度を維持しつつ前記エッジ画素の色相を前記色近接参照画素の色相に近づけるように前記エッジ画素の色調整を実行する第1のサブモードと、
(i−2)前記色相の差分が前記第1の閾値と前記第2の閾値との間にある場合には、前記エッジ画素の彩度を低減しつつ前記エッジ画素の色相を前記色近接参照画素の色相に近づけるように前記エッジ画素の色調整を実行する第2のサブモードとを含む、画像処理装置。
The image processing apparatus according to claim 3,
The first false color reduction mode is:
(I-1) When the hue difference is smaller than a second threshold smaller than the first threshold, the hue of the edge pixel is changed to the color proximity reference pixel while maintaining the saturation of the edge pixel. A first sub-mode for performing color adjustment of the edge pixel so as to approach the hue of
(I-2) When the hue difference is between the first threshold value and the second threshold value, the hue of the edge pixel is referred to the color proximity reference while reducing the saturation of the edge pixel. And a second sub mode for performing color adjustment of the edge pixel so as to approach the hue of the pixel.
請求項1ないし4のいずれかに記載の画像処理装置であって、
前記エッジ検出部は、前記エッジ方向として、45度間隔で予め設定された所定の複数の方向の中の1つを選択し、
前記偽色低減処理部は、前記複数の参照画素として、前記エッジ画素の周囲に存在する8つの隣接画素のうちの2つの画素を選択する、画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The edge detection unit selects one of a plurality of predetermined directions set in advance at intervals of 45 degrees as the edge direction,
The false color reduction processing unit is an image processing apparatus that selects two of the eight adjacent pixels existing around the edge pixel as the plurality of reference pixels.
請求項1ないし5のいずれかに記載の画像処理装置であって、さらに、
各画素が一部の色成分のみを有する色補間前のカラー画像に対して色補間処理を行うことによって、各画素の全色成分を求める色補間処理部を備えており、
前記エッジ検出部は、前記色補間処理前のカラー画像に対して処理を実行し、
前記偽色低減処理部は、前記色補間処理後のカラー画像に対して処理を実行する、画像処理装置。
The image processing apparatus according to claim 1, further comprising:
A color interpolation processing unit for obtaining all color components of each pixel by performing color interpolation processing on a color image before color interpolation in which each pixel has only a part of color components,
The edge detection unit performs a process on the color image before the color interpolation process,
The false color reduction processing unit is an image processing device that executes processing on the color image after the color interpolation processing.
カラー画像の偽色を低減するための方法であって、
(a)カラー画像内のエッジに存在するエッジ画素と前記エッジ画素におけるエッジ方向とを検出する工程と、
(b)前記エッジ方向に沿った仮想的な直線を挟んで対向し前記エッジ画素に隣接する複数の参照画素を検出する工程と、
(c)前記複数の参照画素の色と前記エッジ画素の色との関係に基づいて前記エッジ画素の色を調整することによって前記エッジ画素の偽色を低減する工程と、
を備える方法。
A method for reducing false colors in a color image,
(A) detecting an edge pixel existing at an edge in a color image and an edge direction of the edge pixel;
(B) detecting a plurality of reference pixels facing each other across the virtual line along the edge direction and adjacent to the edge pixel;
(C) reducing the false color of the edge pixel by adjusting the color of the edge pixel based on the relationship between the color of the plurality of reference pixels and the color of the edge pixel;
A method comprising:
カラー画像の偽色を低減するためのコンピュータプログラムであって、
カラー画像内のエッジに存在するエッジ画素と前記エッジ画素におけるエッジ方向とを検出するエッジ検出機能と、
前記エッジ方向に沿った仮想的な直線を挟んで対向し前記エッジ画素に隣接する複数の参照画素を検出するとともに、前記複数の参照画素の色と前記エッジ画素の色との関係に基づいて前記エッジ画素の色を調整することによって前記エッジ画素の偽色を低減する偽色低減処理機能と、
をコンピュータに実現させるコンピュータプログラム。
A computer program for reducing false colors in a color image,
An edge detection function for detecting an edge pixel existing at an edge in a color image and an edge direction of the edge pixel;
A plurality of reference pixels that are opposed to and adjacent to the edge pixel across a virtual straight line along the edge direction are detected, and based on the relationship between the color of the plurality of reference pixels and the color of the edge pixel A false color reduction processing function for reducing the false color of the edge pixel by adjusting the color of the edge pixel;
A computer program that causes a computer to realize
JP2004068885A 2004-03-11 2004-03-11 Pseudo color reduction for color image Pending JP2005260557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004068885A JP2005260557A (en) 2004-03-11 2004-03-11 Pseudo color reduction for color image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004068885A JP2005260557A (en) 2004-03-11 2004-03-11 Pseudo color reduction for color image

Publications (1)

Publication Number Publication Date
JP2005260557A true JP2005260557A (en) 2005-09-22

Family

ID=35085866

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004068885A Pending JP2005260557A (en) 2004-03-11 2004-03-11 Pseudo color reduction for color image

Country Status (1)

Country Link
JP (1) JP2005260557A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008013406A1 (en) * 2006-07-25 2008-01-31 Mtekvision Co., Ltd. Color interpolation method and device considering edge direction and cross stripe noise

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008013406A1 (en) * 2006-07-25 2008-01-31 Mtekvision Co., Ltd. Color interpolation method and device considering edge direction and cross stripe noise
KR100826215B1 (en) 2006-07-25 2008-04-29 엠텍비젼 주식회사 Color Interpolation Method and Device Considering Edge Direction and Cross Stripe Noise
US8229213B2 (en) 2006-07-25 2012-07-24 Mtekvision Co., Ltd. Color interpolation method and device considering edge direction and cross stripe noise

Similar Documents

Publication Publication Date Title
US7418132B2 (en) Signal processing apparatus, signal processing program and electronic camera
JP4666274B2 (en) Color image processing apparatus and method
JP5107355B2 (en) Method, apparatus, and program for gamut mapping to reproduction gamut narrower than input gamut
JP4822773B2 (en) Color noise reduction circuit and imaging apparatus using the same
JP5337049B2 (en) Reducing position-dependent noise in digital images
US7889942B2 (en) Dynamic range compensation-dependent noise reduction
JP2001320722A (en) Signal processor and signal processing method
JP2007065916A (en) Image processing method, image processor, image forming apparatus, computer program and recording medium
JPWO2002071761A1 (en) Image processing apparatus and image processing program
JP2008252474A (en) Image processor and program recording medium
JP2004328564A (en) Color correcting apparatus, color correcting method, color correcting program, and digital camera using color correcting apparatus
JP2008107893A (en) Noise reduction device and method
US20080292209A1 (en) Dynamic Range Compensation-Dependent Noise Reduction
JP2009010636A (en) Adaption histogram equalization method, and adaption histogram equalization apparatus
JP2005260557A (en) Pseudo color reduction for color image
US7372989B2 (en) Color misregistration reducer
US11108999B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
JP2000358166A (en) Image process, image reader with the processor, image forming device, image processing method and computer readable storage medium storing image processing procedure
JP2000206756A (en) Image processor
JP3502828B2 (en) Computer image processing system
JP2008257680A (en) Image processor and program storage medium
JP2009239396A (en) Image processor
JP2000357237A (en) Image processor, image reading device and image forming device mounted with the processor, image processing method, and computer-readable storage medium stored with image processing procedure
JP6843510B2 (en) Image processing equipment, image processing methods and programs
JP2004096625A (en) Image processing apparatus and method therefor