[go: up one dir, main page]

JP2010193112A - Image processing apparatus and digital still camera - Google Patents

Image processing apparatus and digital still camera Download PDF

Info

Publication number
JP2010193112A
JP2010193112A JP2009034598A JP2009034598A JP2010193112A JP 2010193112 A JP2010193112 A JP 2010193112A JP 2009034598 A JP2009034598 A JP 2009034598A JP 2009034598 A JP2009034598 A JP 2009034598A JP 2010193112 A JP2010193112 A JP 2010193112A
Authority
JP
Japan
Prior art keywords
correction
image
signal
processing apparatus
image processing
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.)
Withdrawn
Application number
JP2009034598A
Other languages
Japanese (ja)
Inventor
Yoko Fukui
陽康 福井
Kensuke Takai
健介 高井
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2009034598A priority Critical patent/JP2010193112A/en
Publication of JP2010193112A publication Critical patent/JP2010193112A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a mixture ratio of signal levels of R, G, B from subtly changing to change hue in correcting brightness of a captured image, in an image processing apparatus for processing a digital image signal of a color captured image obtained by shooting. <P>SOLUTION: This image processing apparatus includes: a YUV generation part 121 for generating, from a digital image signal of a color captured image obtained by shooting, respective signals such as a luminance signal representing luminance of the color captured image, a first difference signal representing the difference between the luminance signal and a blue component of the color captured image, and a second difference signal representing the difference between the luminance signal and a red component of the color captured image; and a brightness correction part 100b for correcting respective signal levels of the luminance signal and the first and second difference signals to make a dark part of the color captured image bright. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像処理装置およびディジタルスチルカメラに関し、特に、逆光撮影時などの画像の暗部の明るさ補正を行う画像処理装置、およびこのような画像処理装置を備えたディジタルスチルカメラに関するものである。   The present invention relates to an image processing apparatus and a digital still camera, and more particularly to an image processing apparatus for correcting the brightness of a dark part of an image at the time of backlight photographing and a digital still camera including such an image processing apparatus. .

従来から、CCDイメージセンサーやCMOSイメージセンサなどの固体撮像素子を用いたディジタルスチルカメラがある。   Conventionally, there are digital still cameras using a solid-state imaging device such as a CCD image sensor or a CMOS image sensor.

このようなディジタルスチルカメラでは、イメージセンサーであるCCDモジュールから画像データが取り込まれ、該画像データにおけるベイヤー配列の各画素のRGB値(各色信号)からYUV値(輝度、色差信号)への色空間変換処理、オートアイリス(明暗に応じた出力値の調整)処理、ホワイトバランス(色の調整)処理などの色濃度変換、さらにJPEGフォーマットへの画像圧縮などの各画像信号処理が行われることにより、被写体の撮影が行われている。   In such a digital still camera, image data is captured from a CCD module, which is an image sensor, and a color space from RGB values (each color signal) to YUV values (luminance, color difference signals) of each pixel in the Bayer array in the image data. Subject to image processing such as conversion, auto iris (output value adjustment according to light and darkness), white balance (color adjustment), and other image signal processing such as image compression to JPEG format. Is being taken.

図2は、ディジタルスチルカメラで用いられる従来の階調補正機能を備えた画像処理装置を説明する概略構成図である。   FIG. 2 is a schematic configuration diagram for explaining an image processing apparatus having a conventional gradation correction function used in a digital still camera.

図2に示すディジタルスチルカメラ(撮像装置)200は、例えばCCDイメージセンサーあるいはCMOSイメージセンサなどの固体撮像素子201と、該固体撮像素子201から画素データとして出力された画像データ(出力信号)から信号成分を取り出してサンプルホールドするサンプルホールド部202と、該サンプルホールド部202でサンプルホールドされた各画素データの信号成分をディジタルデータに変換するADコンバータ203と、該ADコンバータから出力されるディジタルデータに対する画像処理を行う、階調補正機能を持つ画像処理装置200aとを有している。   A digital still camera (imaging device) 200 shown in FIG. 2 receives a signal from a solid-state image sensor 201 such as a CCD image sensor or a CMOS image sensor and image data (output signal) output as pixel data from the solid-state image sensor 201. A sample hold unit 202 that extracts and samples and holds components, an AD converter 203 that converts the signal components of each pixel data sampled and held by the sample hold unit 202 into digital data, and digital data output from the AD converter An image processing apparatus 200a that performs image processing and has a gradation correction function.

ここで、イメージセンサーには上述したようにCCDイメージセンサやCMOSイメージセンサがあるが、例えば、CCDイメージセンサ(CCDモジュール)は、画素をマトリクス状に配列してなる画素アレイと、該画素アレイの各画素行に沿って配置され、各画素で得られた信号電荷を垂直方向に転送する垂直CCDと、該垂直CCDの一端側に配置され、垂直CCDからの信号電荷を水平方向に転送する水平CCDとを有しており、それぞれの画素にはR(赤)、G(緑)またはB(青)の色フィルタが設けられている。なお、以下の説明では、R、G、B各色のフィルタを有する画素をそれぞれR画素、G画素、B画素ともいう。   Here, as described above, the image sensor includes a CCD image sensor and a CMOS image sensor. For example, a CCD image sensor (CCD module) includes a pixel array in which pixels are arranged in a matrix, and the pixel array. A vertical CCD that is arranged along each pixel row and transfers the signal charge obtained in each pixel in the vertical direction, and a horizontal CCD that is arranged on one end side of the vertical CCD and transfers the signal charge from the vertical CCD in the horizontal direction. Each pixel is provided with a color filter of R (red), G (green) or B (blue). In the following description, pixels having R, G, and B color filters are also referred to as R pixels, G pixels, and B pixels, respectively.

画像処理装置200aは、ADコンバータでディジタルデータに変換された各画素データの黒レベルを規定値に固定するクランプ処理部211と、該クランプ処理部211からのR画素およびB画素の画素データに対して所定の値を乗算して、白色の調整がなされるよう(つまり白色の被写体を撮像したときのR、G、B各画素の画素データが等しくなるよう)該画素データのゲインを調整するホワイトバランス処理部212と、ホワイトバランス処理部212から出力されるR、G、B各画素の画素データに対する明るさ補正を行って、ブラウン管や液晶パネルなど特定のモニタ装置として用いられる各表示装置毎の階調表示特性を調整するガンマ(γ)補正部213とを有している。   The image processing apparatus 200a fixes a black level of each pixel data converted into digital data by an AD converter to a specified value, and R pixel and B pixel data from the clamp processing unit 211. White that adjusts the gain of the pixel data so that white adjustment is performed by multiplying a predetermined value (that is, the pixel data of each of the R, G, and B pixels becomes equal when a white subject is imaged) Brightness correction is performed on the pixel data of the R, G, and B pixels output from the balance processing unit 212 and the white balance processing unit 212 for each display device used as a specific monitor device such as a cathode ray tube or a liquid crystal panel. And a gamma (γ) correction unit 213 that adjusts gradation display characteristics.

また、画像処理装置200aは、後段の縮小処理(間引き処理など)によるエイリアシングが抑制されるよう、ガンマ補正部213からの画素データの高周波成分を減衰するローパスフィルタ部214と、各画素に対して、該画素が有するフィルタの色以外の色の画素データ(以下、画像データともいう。)を補間によって求める補間処理部215と、各色(RGB)に対応する画像データを間引く縮小処理を行う縮小処理部216と、縮小処理部216から出力されたRGBの画像データから、撮像画像の輝度信号データ(Y)、該輝度信号データと撮像画像の青色成分との差信号データ(U)(第1の差信号)および輝度信号データと撮像画像の赤色成分の差信号データ(V)(第2の差信号)とを生成するYUV生成部221とを有している。   In addition, the image processing apparatus 200a has a low-pass filter unit 214 that attenuates high-frequency components of pixel data from the gamma correction unit 213 and each pixel so that aliasing due to subsequent reduction processing (such as thinning-out processing) is suppressed. An interpolation processing unit 215 that obtains pixel data of a color other than the filter color of the pixel (hereinafter also referred to as image data) by interpolation, and a reduction process that performs a reduction process of thinning out image data corresponding to each color (RGB) From the RGB image data output from the unit 216 and the reduction processing unit 216, luminance signal data (Y) of the captured image, and difference signal data (U) between the luminance signal data and the blue component of the captured image (first) Difference signal) and luminance signal data, and a YUV generation unit 221 that generates difference signal data (V) (second difference signal) of the red component of the captured image. There.

さらに、画像処理部200aは、入力されたディジタル画像信号から抽出されたR、G、B毎の信号レベルに基づいて、その信号レベルのダイナミックレンジを分割して得られる複数のレベル範囲毎に、各レベル範囲内の信号レベルを有する画素が出現する頻度を検出し、範囲毎に対する信号レベルの頻度により表わされるヒストグラムを生成するヒストグラム生成部222と、生成したヒストグラムの形状から、信号レベルの階調補正が必要かどうかを判定する階調補正判定部223とを有している。なお、上記ガンマ(γ)補正部213、ヒストグラム生成部222、および階調補正判定部223は、明るさ補正部200bを構成している。   Further, the image processing unit 200a, based on the signal level for each of R, G, and B extracted from the input digital image signal, for each of a plurality of level ranges obtained by dividing the dynamic range of the signal level, A histogram generation unit 222 that detects the frequency of appearance of pixels having signal levels within each level range and generates a histogram represented by the frequency of the signal level for each range, and the gradation of the signal level from the shape of the generated histogram A gradation correction determination unit 223 for determining whether correction is necessary. The gamma (γ) correction unit 213, the histogram generation unit 222, and the gradation correction determination unit 223 constitute a brightness correction unit 200b.

次に動作について説明する。   Next, the operation will be described.

ディジタルスチルカメラ200では、画素が行方向および列方向に配置され、それぞれカラーフィルタを有するイメージセンサーなどを用いて被写体を撮像することによって画像データが得られる。   In the digital still camera 200, pixels are arranged in a row direction and a column direction, and image data is obtained by imaging a subject using an image sensor or the like having a color filter.

この画像データがサンプルホールド部202に入力されると、該画像データの信号成分が取り出されて保持され、この信号成分はさらにADコンバータ203によりディジタルデータ(ディジタル値)に変換されて画像処理装置200aに入力される。該画像処理装置200aでは、該ディジタルデータに対して、ディジタルクランプ処理、ホワイトバランス処理、輝度信号データおよび色差信号データの生成処理などが施され、生成された輝度信号データおよび色差信号データが外部メモリ(図示せず)に記憶される。   When this image data is input to the sample hold unit 202, a signal component of the image data is extracted and held, and this signal component is further converted into digital data (digital value) by the AD converter 203 to be image processing apparatus 200a. Is input. In the image processing apparatus 200a, the digital data is subjected to digital clamp processing, white balance processing, generation processing of luminance signal data and color difference signal data, and the generated luminance signal data and color difference signal data are stored in an external memory. (Not shown).

次に、画像処理装置200aの詳細な動作について説明する。   Next, a detailed operation of the image processing apparatus 200a will be described.

クランプ処理部211は、ADコンバータでディジタルデータに変換された各画素データ(ディジタルデータ)の黒レベルを規定値に固定する。ホワイトバランス処理部212は、クランプ処理部211からのRおよびBの画素データに対して、白色を調整するために所定の値を乗算してそのゲインの調整を行う。   The clamp processing unit 211 fixes the black level of each pixel data (digital data) converted into digital data by the AD converter to a specified value. The white balance processing unit 212 adjusts the gain by multiplying the R and B pixel data from the clamp processing unit 211 by a predetermined value in order to adjust the white color.

さらに、ガンマ(γ)補正部213は、ホワイトバランス処理部212からの画像データに対して該明るさを補正する処理を施す。この明るさの補正処理は、ブラウン管や液晶パネルなど特定のモニタ装置として用いられる各表示装置毎の階調表示特性を調整するために行われる。ガンマ補正が施された画像データはローパスフィルタ部214を通過することにより、その高周波成分が減衰させられる。この高周波成分の減衰は、後段の縮小処理(間引き処理など)によるエイリアシングを防ぐために行われる。   Further, the gamma (γ) correction unit 213 performs processing for correcting the brightness on the image data from the white balance processing unit 212. This brightness correction processing is performed to adjust the gradation display characteristics for each display device used as a specific monitor device such as a cathode ray tube or a liquid crystal panel. The image data on which the gamma correction has been performed passes through the low-pass filter unit 214, so that the high-frequency component is attenuated. The attenuation of the high frequency component is performed in order to prevent aliasing due to a subsequent reduction process (such as a thinning process).

また、補間処理部215は、ローパスフィルタ214からの画像データに対して、各画素に対して、当該画素のカラーフィルタの色以外の色成分を補間によって求める。つまり、例えば、緑色フィルタが設けられた画素(G画素)では、赤色フィルタが設けられた画素(G画素)および青色フィルタが設けられた画素(B画素)の画像データ、つまり赤色および青色の画像情報(画素値)は得られないため、補間処理部215では、このG画素での赤色および青色の画素値情報が周辺のR画素およびB画素の画素値から求められる。他のB画素およびR画素についても同様に、それ以外の色の画素の画素値が補間により求められる。   Further, the interpolation processing unit 215 obtains, for each pixel, color components other than the color filter color of the pixel of the image data from the low-pass filter 214 by interpolation. That is, for example, in a pixel (G pixel) provided with a green filter, image data of a pixel (G pixel) provided with a red filter and a pixel (B pixel) provided with a blue filter, that is, red and blue images. Since information (pixel value) cannot be obtained, the interpolation processing unit 215 obtains the red and blue pixel value information for the G pixel from the pixel values of the surrounding R and B pixels. Similarly, for other B pixels and R pixels, pixel values of pixels of other colors are obtained by interpolation.

さらに、縮小処理部216は、補間処理部215からのRGBの各色の画像データ(以下、RGB画像データともいう。)に対する間引き処理を行って画像サイズの縮小処理を行う。   Further, the reduction processing unit 216 performs a thinning process on the RGB color image data (hereinafter also referred to as RGB image data) from the interpolation processing unit 215 to reduce the image size.

また、YUV生成部221は、縮小処理部216から出力されるRGB画像データからYUV画像データを生成する。このYUV画像データは、輝度信号データ(Y)、輝度信号と青色成分の差信号データ(U)、および輝度信号と赤色成分の差信号データ(V)を含むものである。   Further, the YUV generation unit 221 generates YUV image data from the RGB image data output from the reduction processing unit 216. This YUV image data includes luminance signal data (Y), difference signal data (U) between the luminance signal and the blue component, and difference signal data (V) between the luminance signal and the red component.

また、上記ホワイトバランス処理部212から出力されたRGB画像データはヒストグラム生成部222に入力され、該ヒストグラム生成部222では、入力された画像データから抽出されたR、G、B毎の画像データの信号レベルに基づいて、該信号レベルの取り得る全範囲を分割して得られる複数のレベル範囲毎に、該レベル範囲内の信号レベルを有する画素の出現頻度を検出し、どの明るさの画素がどれだけ存在するかを表すヒストグラムを生成する。   Further, the RGB image data output from the white balance processing unit 212 is input to the histogram generation unit 222, and the histogram generation unit 222 outputs image data for each of R, G, and B extracted from the input image data. Based on the signal level, for each of a plurality of level ranges obtained by dividing the entire range that the signal level can take, the frequency of appearance of pixels having a signal level within the level range is detected. A histogram representing how much exists is generated.

階調補正判定部223では、生成したヒストグラムの形状から階調補正が必要かどうかを判定する。該階調補正が必要であると判定された場合は、ガンマ補正部213で、ガンマ補正と併せて階調補正が行われる。   The gradation correction determination unit 223 determines whether gradation correction is necessary from the shape of the generated histogram. When it is determined that the tone correction is necessary, the gamma correction unit 213 performs tone correction together with the gamma correction.

次に階調補正を用いた逆光補正手法について説明する。   Next, a backlight correction method using gradation correction will be described.

既に説明したが、ディジタルスチルカメラでは、画素が行方向および列方向に配置され、それぞれ色フィルタを有するイメージセンサー(例えば、CCDモジュール)を用いて撮像することによって撮影画像が得られる。   As described above, in a digital still camera, a captured image is obtained by imaging using an image sensor (for example, a CCD module) in which pixels are arranged in a row direction and a column direction and each has a color filter.

しかしながらイメージセンサーのダイナミックレンジはあまり大きくないため、逆光撮影時のように撮像画像内に含まれる明るい部分と暗い部分との輝度差が大きいときには両者を適正露光で撮像することは困難となってくる。   However, since the dynamic range of the image sensor is not so large, it is difficult to capture both images with appropriate exposure when the brightness difference between the bright and dark areas included in the captured image is large, such as during backlighting. .

たとえば、図3に示すように、窓のある室内での撮影の際において、被写体Tが室内にあり、窓を通して外の風景が映るような撮像画像全体Vでは、窓を通して見える明るい外の風景Bに露出を合わせると、被写体に対しては適正に露光調整されずに、被写体Tの撮像画像は暗くなってしまう。このように暗くなってしまった被写体Tの撮像画像を明るく補正する画像処理手法を逆光補正といい、従来から以下のような手法で行われてきた。   For example, as shown in FIG. 3, when photographing in a room with a window, in the entire captured image V in which the subject T is in the room and the outside scenery is reflected through the window, the bright outside scenery B that can be seen through the window. If the exposure is adjusted to, the captured image of the subject T becomes dark without properly adjusting the exposure for the subject. An image processing method for brightly correcting the captured image of the subject T that has become dark in this way is called backlight correction, and has been conventionally performed by the following method.

逆光画像を補正するには、まず撮影画像全体Vが逆光画像であるか否かをまず判定する必要がある。   In order to correct the backlight image, it is first necessary to determine whether or not the entire captured image V is a backlight image.

この判定を行う技術として、ヒストグラムを用いるものが提案されている。   As a technique for making this determination, a technique using a histogram has been proposed.

逆光画像は、明るさの飽和部分(図3の窓から見える風景)Bと暗い部分(図3の被写体)Tとが画像全体Vの大きな領域を占め、明るさが中間である領域の面積が狭いという特徴がある。このために、逆光画像のヒストグラムは、図4に示すように、輝度の高い領域(飽和領域)Rsと低い領域Rdとに度数の高い山があり、その間に度数の低い部分R4およびR5がある形になる。そのため、2つの領域R2およびR6で度数が高くなっているか否かによって、逆光画像の判定が行われ、逆光画像であるとの判断が真となった場合には次のような手法にて逆光補正が行われている。なお、図4のヒストグラムにおける領域R1、R3、R4、R5は、上記2つの領域R2およびR6に比べて度数の低い領域である。   In the backlight image, a saturated portion of brightness (scenery seen from the window of FIG. 3) B and a dark portion (subject of FIG. 3) T occupy a large region of the entire image V, and the area of the region where the brightness is intermediate It is characterized by being narrow. For this reason, as shown in FIG. 4, the histogram of the backlight image has a high mountain in the high luminance region (saturation region) Rs and the low region Rd, and there are low frequency portions R4 and R5 between them. Become a shape. Therefore, the backlight image is determined depending on whether the frequency is high in the two regions R2 and R6, and when it is determined that the backlight image is true, the backlight is illuminated by the following method. Corrections have been made. Note that the regions R1, R3, R4, and R5 in the histogram of FIG. 4 are regions that are less frequent than the two regions R2 and R6.

逆光画像においては、暗く撮影された被写体Tの撮像画像の明るさを適正な明るさに補正することが必要となる。この明るさ補正は、ヒストグラムにおける輝度の低い領域R2の輝度を階調補正により高くすることに相当し、従来は、ガンマ補正部213にて、モニタ装置として用いられる各表示装置毎の階調表示特性の明るさ補正と共に、逆光補正の明るさについても同時に補正することが一般的であった。   In the backlight image, it is necessary to correct the brightness of the captured image of the subject T photographed dark to an appropriate brightness. This brightness correction corresponds to increasing the luminance of the low-luminance region R2 in the histogram by gradation correction. Conventionally, the gamma correction unit 213 performs gradation display for each display device used as a monitor device. In general, the brightness of the backlight is corrected at the same time as the brightness of the characteristic.

しかしながら、ガンマ補正時に逆光による明るさも同時に補正した場合、被写体の肌の色が青みがかったりするなど色の再現性が微妙に変化してしまい、そのため色相が異なってしまう場合がある。これはガンマ補正部213で行われる表示装置毎の階調表示特性を調整する明るさ補正の非線形性によるものである。   However, if the brightness due to backlight is also corrected at the time of gamma correction, the color reproducibility changes slightly, such as the skin color of the subject being bluish, and therefore the hue may be different. This is due to the non-linearity of brightness correction for adjusting the gradation display characteristics for each display device performed by the gamma correction unit 213.

図5は、ガンマ補正部213で使用されるガンマ補正曲線(以下、ガンマ補正カーブともいう。)を示す。ガンマ補正部213では、R(赤)、G(緑)、B(青)の各色毎に明るさ補正が行われるが、表示装置に対応した階調表示特性を調整するガンマ補正カーブは、通常、図5に示すように非線形である。   FIG. 5 shows a gamma correction curve (hereinafter also referred to as a gamma correction curve) used in the gamma correction unit 213. In the gamma correction unit 213, brightness correction is performed for each color of R (red), G (green), and B (blue). A gamma correction curve for adjusting gradation display characteristics corresponding to a display device is normally used. As shown in FIG.

図5に示す実線の曲線Laは通常のガンマ補正カーブ、点線の曲線Lbは明るさ補正を含めたガンマ補正カーブであり、明るさ補正を含めたガンマ補正カーブは、通常のガンマ補正カーブに比べて、図5に示すように、明るさ補正分が最大でΔYだけ異なるよう設定されている。   The solid curve La shown in FIG. 5 is a normal gamma correction curve, the dotted curve Lb is a gamma correction curve including brightness correction, and the gamma correction curve including brightness correction is compared with the normal gamma correction curve. Thus, as shown in FIG. 5, the brightness correction amount is set to be different by ΔY at the maximum.

例えば、ガンマ補正前のR(赤)、G(緑)、B(青)の画像データのRGB値(各色の画素値)をそれぞれR0、G0、B0とし、通常のガンマ補正カーブ(曲線La)により補正されたRGB値をそれぞれR1、G1、B1、明るさ補正を含めたガンマ補正カーブ(曲線Lb)により補正されたRGB値をそれぞれR2、G2、B2とする。   For example, R (red), G (green), and B (blue) image data before gamma correction have RGB values (pixel values of each color) as R0, G0, and B0, respectively, and a normal gamma correction curve (curve La) The RGB values corrected by the above are R1, G1, and B1, respectively, and the RGB values corrected by the gamma correction curve (curve Lb) including the brightness correction are R2, G2, and B2, respectively.

このとき、ガンマ補正カーブの非線形性より、通常のガンマ補正カーブ(曲線La)を用いて補正したRGB値R1、G1、B1の混合比率と、明るさ補正を含めたガンマ補正カーブ(曲線Lb)を用いて補正したRGB値R2、G2、B2の混合比率とは、微妙に異なってしまい、逆光補正を行わない場合と逆光補正を行う場合とで、撮像画像の色相が変化することになる。このことが逆光補正を行った場合に被写体の肌の色が青みがかったりする原因となっていた。   At this time, due to the non-linearity of the gamma correction curve, the mixture ratio of RGB values R1, G1, and B1 corrected using the normal gamma correction curve (curve La) and the gamma correction curve (curve Lb) including brightness correction are used. The mixture ratio of the RGB values R2, G2, and B2 corrected by using S is slightly different, and the hue of the captured image changes between when the backlight correction is not performed and when the backlight correction is performed. This caused the skin color of the subject to be bluish when the backlight correction was performed.

このようにディジタルスチルカメラで撮影した撮像画像の明るさを補正する従来の技術では、逆光補正時において、明るさの補正をガンマ補正カーブやルックアップテーブルにて行う技術は提案されていたが、補正後の微妙な色相の変化まで対応した補正手法に関しては対応していなかった(例えば、特許文献1など)。   In the conventional technique for correcting the brightness of a captured image taken with a digital still camera in this way, a technique for correcting the brightness with a gamma correction curve or a lookup table at the time of backlight correction has been proposed. A correction method that supports even a slight change in hue after correction is not supported (for example, Patent Document 1).

特開2006−50014号公報JP 2006-5014 A

以上説明したように、従来の撮像技術では、逆光画像において暗く撮影された被写体の明るさを適正な明るさに補正する場合には、ガンマ補正部にて明るさを補正することが一般的であった。   As described above, in the conventional imaging technology, when correcting the brightness of a subject photographed dark in a backlight image to an appropriate brightness, it is common to correct the brightness by a gamma correction unit. there were.

しかしながら、ガンマ補正時に逆光による明るさも同時に補正した場合、色の再現性が微妙に変化してしまい、例えば、被写体の肌の色が青みがかったりしたりするなど、色相が異なってしまう場合がある。これは、ガンマ補正部で行われる、表示装置毎の階調表示特性を調整する明るさ補正の非線形性によるものである。   However, if the brightness due to backlight is also corrected at the time of gamma correction, the color reproducibility changes slightly, and the hue may be different, for example, the subject's skin color may be bluish. This is due to the non-linearity of brightness correction performed by the gamma correction unit for adjusting the gradation display characteristics for each display device.

つまり、ガンマ補正部ではR(赤)、G(緑)、B(青)の各色毎に明るさ補正が行われるが、表示装置に対応した階調表示特性を調整するガンマ補正カーブは、通常、図5に示すように非線形であり、この補正カーブを使用した補正後のR、G、Bの画素値の混合比率は、補正前の混合比率とは微妙に異なってしまい、これが色相の変化に表れることになる。   In other words, the gamma correction unit performs brightness correction for each color of R (red), G (green), and B (blue), but the gamma correction curve for adjusting the gradation display characteristics corresponding to the display device is usually As shown in FIG. 5, the mixture ratio of R, G, and B pixel values after correction using this correction curve is slightly different from the mixture ratio before correction, and this is a change in hue. Will appear.

このように、従来は、ディジタルスチルカメラなどの分野において、逆光補正時において明るさの補正をガンマ補正カーブやルックアップテーブルにて行う方法は提案されていたが、この従来の方法では、補正後の微妙な色相の変化が画質劣化を招くという問題がある。   As described above, conventionally, in the field of digital still cameras and the like, a method of performing brightness correction using a gamma correction curve or a lookup table at the time of backlight correction has been proposed. There is a problem that the subtle hue change causes image quality degradation.

本発明は、上記のような問題点を解決するためになされたものであり、明るさ補正を、R、G、B各画素の画素データの混合比率が微妙に変わって色相が変化してしまうといった画質劣化を招くことなく行うことができる画像処理装置を得ることを目的とする。   The present invention has been made to solve the above-described problems. Brightness correction is performed by slightly changing the hue of the mixture ratio of the pixel data of each of the R, G, and B pixels. An object of the present invention is to obtain an image processing apparatus that can be performed without causing image quality degradation.

本発明に係る画像処理装置は、撮像により得られたカラー撮像画像のディジタル画像信号を処理する画像処理装置であって、該ディジタル画像信号から、該カラー撮像画像の輝度を示す輝度信号、該輝度信号と該カラー撮像画像の青色成分との差分を示す第1の差信号、および該輝度信号と該カラー撮像画像の赤色成分との差分を示す第2の差信号の各信号を生成する信号生成部と、該カラー撮像画像における暗部が明るくなるよう、該輝度信号および第1および第2の差信号の各々の信号レベルを補正する明るさ補正部とを備えたものであり、そのことにより上記目的が達成される。   An image processing apparatus according to the present invention is an image processing apparatus that processes a digital image signal of a color captured image obtained by imaging, and from the digital image signal, a luminance signal indicating the luminance of the color captured image, the luminance Signal generation for generating a first difference signal indicating a difference between a signal and a blue component of the color captured image, and a second difference signal indicating a difference between the luminance signal and a red component of the color captured image And a brightness correction unit that corrects the signal level of each of the luminance signal and the first and second difference signals so that a dark part in the color captured image is brightened. The objective is achieved.

本発明は、上記画像処理装置において、前記明るさ補正部は、前記カラー撮像画像を構成する各画素の輝度信号の信号レベルである輝度値に基づいて、該カラー撮像画像にどの程度の輝度の画素がどの程度含まれているかを示す明るさ情報を作成する明るさ情報作成部と、該明るさ情報に基づいて該カラー撮像画像に対する明るさ補正が必要か否かを判定する補正要否判定部とを有し、該補正要否判定部での判定結果に応じて、該輝度信号および第1および第2の差信号の各々の信号レベルを補正することが好ましい。   In the image processing apparatus according to the aspect of the invention, the brightness correction unit may determine how much luminance the color captured image has based on a luminance value that is a signal level of a luminance signal of each pixel constituting the color captured image. A brightness information creation unit that creates brightness information indicating how many pixels are included, and a correction necessity determination that determines whether or not brightness correction is necessary for the color captured image based on the brightness information It is preferable that the signal level of each of the luminance signal and the first and second difference signals is corrected according to the determination result in the correction necessity determination unit.

本発明は、上記画像処理装置において、前記明るさ情報作成部は、予め設定された複数の輝度区間の各々に含まれる画素の度数を表すヒストグラムを生成するヒストグラム生成部であり、前記補正要否判定部は、該ヒストグラムの形状から前記カラー撮像画像に対する明るさ補正の要否を判定するよう構成されていることが好ましい。   The present invention is the above image processing apparatus, wherein the brightness information creation unit is a histogram generation unit that generates a histogram representing the frequency of pixels included in each of a plurality of preset luminance intervals, and whether or not the correction is necessary. The determination unit is preferably configured to determine whether or not brightness correction is necessary for the color captured image from the shape of the histogram.

本発明は、上記画像処理装置において、前記明るさ補正部は、前記ヒストグラムの形状に基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出する補正係数演算部を有することが好ましい。   In the image processing apparatus according to the aspect of the invention, the brightness correction unit may include a correction coefficient calculation unit that calculates a correction coefficient indicating a degree of brightness correction for the color captured image based on the shape of the histogram. preferable.

本発明は、上記画像処理装置において、前記補正要否判定部は、前記ヒストグラムの形状が、輝度の高い領域と輝度の低い領域とで、これらの間の中間的な輝度の領域に比べて、度数が高くなる形状であるときに、前記カラー撮像画像に対する明るさ補正が必要であると判定することが好ましい。   In the image processing apparatus according to the aspect of the invention, the correction necessity determination unit may be configured such that the shape of the histogram includes a high luminance region and a low luminance region, and an intermediate luminance region therebetween. It is preferable to determine that it is necessary to correct the brightness of the color captured image when the shape has a high frequency.

本発明は、上記画像処理装置において、前記補正要否判定部が前記カラー撮像画像に対する明るさ補正が必要であると判定するときは、前記輝度の低い領域での度数は、予め設定した閾値より大きい度数であるときであることが好ましい。   In the image processing apparatus according to the aspect of the invention, when the correction necessity determination unit determines that brightness correction is necessary for the color captured image, the frequency in the low luminance region is greater than a preset threshold value. It is preferable that the power is large.

本発明は、上記画像処理装置において、前記補正係数演算部は、前記輝度の高い領域での度数と、予め設定した閾値との差分が大きいほど、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数として、より明るさを増大させる補正係数を算出することが好ましい。   In the image processing apparatus according to the aspect of the invention, the correction coefficient calculation unit indicates the degree of brightness correction for the color captured image as the difference between the frequency in the high-luminance region and a preset threshold value increases. As the correction coefficient, it is preferable to calculate a correction coefficient that further increases brightness.

本発明は、上記画像処理装置において、前記補正係数演算部は、前記輝度の高い領域での度数と予め設定した第1の閾値との第1の差分と、前記輝度の低い領域での度数と予め設定した第2の閾値との第2の差分とに基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出することが好ましい。   In the image processing apparatus according to the aspect of the invention, the correction coefficient calculator may include a first difference between the frequency in the high luminance region and a preset first threshold, and the frequency in the low luminance region. It is preferable to calculate a correction coefficient indicating a degree of brightness correction for the color captured image based on a second difference from a preset second threshold.

本発明は、上記画像処理装置において、前記補正係数演算部は、前記第1および第2の閾値を設定するレジスタを有することが好ましい。   In the image processing apparatus according to the aspect of the invention, it is preferable that the correction coefficient calculation unit includes a register that sets the first and second threshold values.

本発明は、上記画像処理装置において、前記明るさ補正部は、前記補正係数に基づいて、該輝度信号および第1および第2の差信号の各々の信号レベルを階調補正する階調補正部を有することが好ましい。   In the image processing apparatus according to the aspect of the invention, the brightness correction unit may perform tone correction on the signal level of each of the luminance signal and the first and second difference signals based on the correction coefficient. It is preferable to have.

本発明は、上記画像処理装置において、前記階調補正部は、前記輝度値とゲインとの対応関係を定義する変換関数を格納した関数格納部と、該輝度値から該変換関数に基づいてゲインを導出するゲイン導出部と、該算出されたゲインと前記補正係数との乗算により補正ゲインを算出する乗算部とを有し、該補正ゲインを、該輝度信号、第1および第2の差信号の各々の信号レベルに掛けることにより、これらの信号の階調補正を行うことが好ましい。   According to the present invention, in the image processing apparatus, the gradation correction unit includes a function storage unit that stores a conversion function that defines a correspondence relationship between the luminance value and the gain, and a gain based on the conversion function from the luminance value. And a multiplier for calculating a correction gain by multiplying the calculated gain by the correction coefficient, the correction gain being used as the luminance signal and the first and second difference signals. It is preferable to perform gradation correction of these signals by multiplying each signal level.

本発明は、上記画像処理装置において、前記変換関数は、前記カラー撮像画像における暗部を構成する画素の輝度値を含む、一定の輝度範囲内の画素の画素値に対するゲインが、該一定輝度範囲以外の画素の輝度値に対するゲインより大きくなるよう定義されていることが好ましい。   In the image processing apparatus according to the aspect of the invention, the conversion function may include a gain for a pixel value of a pixel within a certain luminance range including a luminance value of a pixel constituting a dark portion in the color captured image. It is preferable that it is defined so as to be larger than the gain for the luminance value of the pixel.

本発明は、上記画像処理装置において、前記ディジタル画像信号は、複数の画素が配列され、それぞれ対応する色のカラーフィルタを有する固体撮像素子による撮像により得られたカラー撮像画像のアナログ画像信号をAD変換して得られたものであり、前記信号生成部は、該ディジタル画像信号に基づいて、各画素に対する、該画素の有するカラーフィルタの色以外の色の画素データを作成する補間処理を行う補間処理部を有し、該補間処理部から出力される各カラーフィルタの色に対応する画像信号を、前記ディジタル画像信号として前記信号生成部に出力するよう構成されていることが好ましい。   According to the present invention, in the image processing apparatus, the digital image signal is an analog image signal of a color captured image obtained by imaging with a solid-state imaging device in which a plurality of pixels are arranged and each has a corresponding color filter. The signal generation unit performs an interpolation process for generating pixel data of a color other than the color of the color filter of the pixel based on the digital image signal. It is preferable that a processing unit is included and an image signal corresponding to the color of each color filter output from the interpolation processing unit is output to the signal generation unit as the digital image signal.

本発明は、上記画像処理装置において、前記信号生成部は、前記補間処理部の前段に設けられ、前記ディジタル画像信号に対するガンマ補正処理を施すガンマ補正部を有することが好ましい。   In the image processing apparatus according to the aspect of the invention, it is preferable that the signal generation unit includes a gamma correction unit that is provided before the interpolation processing unit and performs gamma correction processing on the digital image signal.

本発明は、上記画像処理装置において、前記信号生成部は、前記ガンマ補正部の前段に設けられ、白色の撮像画像における、前記ディジタル画像信号を、該ディジタル画像信号に含まれる各カラーフィルタの色に対応する画像信号のレベルが等しくなるよう補正するホワイトバランス処理部を有することが好ましい。   According to the present invention, in the image processing apparatus, the signal generation unit is provided in a preceding stage of the gamma correction unit, and the digital image signal in a white captured image is converted into the color of each color filter included in the digital image signal. It is preferable to have a white balance processing unit that corrects the level of the image signal corresponding to.

本発明に係るディジタルスチルカメラは、被写体の撮像を行う固体撮像素子を備えたディジタルスチルカメラであって、該固体撮像素子の出力信号をサンプルホールドして、カラー撮像画像の信号成分を出力するサンプルホールド部と、該信号成分をAD変換してディジタル画像信号を出力するADコンバータと、該ディジタル画像信号を処理する画像処理装置とを有し、該画像処理装置は、上述した本発明に係る画像処理装置であり、そのことにより上記目的が達成される。   A digital still camera according to the present invention is a digital still camera including a solid-state image pickup device that picks up an image of a subject, and samples and holds an output signal of the solid-state image pickup device to output a signal component of a color picked-up image A holding unit; an AD converter that AD-converts the signal component and outputs a digital image signal; and an image processing device that processes the digital image signal. The image processing device includes the image according to the present invention described above. A processing device, whereby the above object is achieved.

本発明は、上記ディジタルスチルカメラにおいて、前記固体撮像素子は、CCD型イメージセンサであることが好ましい。   In the digital still camera according to the aspect of the invention, it is preferable that the solid-state imaging device is a CCD image sensor.

本発明は、上記ディジタルスチルカメラにおいて、前記固体撮像素子は、CMOS型イメージセンサであることが好ましい。   According to the present invention, in the digital still camera, the solid-state imaging device is preferably a CMOS image sensor.

次に作用について説明する。   Next, the operation will be described.

本発明においては、撮像により得られたカラー撮像画像のディジタル画像信号から、該カラー撮像画像の輝度を示す輝度信号、該輝度信号と該カラー撮像画像の青色成分との差分を示す第1の差信号、および該輝度信号と該カラー撮像画像の赤色成分との差分を示す第2の差信号の各信号を生成する信号生成部を備え、該カラー撮像画像における暗部が明るくなるよう、該輝度信号および第1および第2の差信号の各々の信号レベルを補正するので、撮像画像の明るさ補正を、赤(R)、緑(G)、青(B)の各画素の画素データの混合比率が微妙に変わって色相が変化してしまうといった画質劣化を招くことなく行うことができる。   In the present invention, from a digital image signal of a color captured image obtained by imaging, a luminance signal indicating the luminance of the color captured image, and a first difference indicating a difference between the luminance signal and the blue component of the color captured image. A signal generation unit that generates a signal and a second difference signal indicating a difference between the luminance signal and a red component of the color captured image, and the luminance signal is set so that a dark portion in the color captured image is brightened. Since the signal level of each of the first and second difference signals is corrected, the brightness correction of the captured image is performed with the mixture ratio of the pixel data of each pixel of red (R), green (G), and blue (B). Can be performed without causing image quality degradation such as a slight change in hue and a change in hue.

また、本発明においては、予め設定された複数の輝度区間の各々に含まれる画素の度数を表すヒストグラムの形状に基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出し、輝度信号、第1および第2の差信号の各々の信号レベルに掛けるゲインを、該補正係数により調整するようにしたので、撮像画像の逆光具合に応じて、補正係数により自動で連続的にゲインを抑圧できる。   In the present invention, based on the shape of a histogram representing the frequency of pixels included in each of a plurality of preset luminance intervals, a correction coefficient indicating the degree of brightness correction for the color captured image is calculated, Since the gain applied to the signal level of each of the luminance signal and the first and second difference signals is adjusted by the correction coefficient, it is automatically and continuously gained by the correction coefficient according to the backlight condition of the captured image. Can be suppressed.

さらに、本発明においては、ガンマ補正と逆光による階調補正を別々の回路にて調整可能となり、各々独立した設定ができる。   Furthermore, in the present invention, gamma correction and gradation correction by backlight can be adjusted by separate circuits, and each can be set independently.

また、本発明においては、前記ヒストグラムの形状が、輝度の高い領域と輝度の低い領域とで、これらの間の中間的な輝度の領域に比べて、度数が高くなる形状であるときに、前記カラー撮像画像に対する明るさ補正が必要であると判定するので、明るさ補正の要否判定をヒストグラムの形状に基づいて簡単に行うことができる。   Further, in the present invention, when the shape of the histogram is a shape having a higher frequency in a high luminance region and a low luminance region than in an intermediate luminance region therebetween, Since it is determined that the brightness correction for the color captured image is necessary, it is possible to easily determine whether the brightness correction is necessary based on the shape of the histogram.

以上のように、本発明によれば、撮像により得られたカラー撮像画像のディジタル画像信号を処理する画像処理装置において、該ディジタル画像信号から、該カラー撮像画像の輝度を示す輝度信号、該輝度信号と該カラー撮像画像の青色成分との差分を示す第1の差信号、および該輝度信号と該カラー撮像画像の赤色成分との差分を示す第2の差信号の各信号を生成する信号生成部と、該カラー撮像画像における暗部が明るくなるよう、該輝度信号および第1および第2の差信号の各々の信号レベルを補正する明るさ補正部とを備えたので、撮像画像の明るさ補正を、R、G、B各画素の画素データの混合比率が微妙に変わって色相が変化してしまうといった画質劣化を招くことなく行うことができる効果がある。   As described above, according to the present invention, in an image processing apparatus that processes a digital image signal of a color captured image obtained by imaging, from the digital image signal, a luminance signal indicating the luminance of the color captured image, the luminance Signal generation for generating a first difference signal indicating a difference between a signal and a blue component of the color captured image, and a second difference signal indicating a difference between the luminance signal and a red component of the color captured image And a brightness correction unit that corrects the signal level of each of the luminance signal and the first and second difference signals so that a dark part in the color captured image becomes brighter. There is an effect that can be performed without causing deterioration in image quality such that the mixing ratio of the pixel data of the R, G, and B pixels slightly changes and the hue changes.

また、本発明によれば、予め設定された複数の輝度区間の各々に含まれる画素の度数を表すヒストグラムの形状に基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出し、輝度信号、第1および第2の差信号の各々の信号レベルに掛けるゲインを、該補正係数により調整するようにしたので、撮像画像の逆光具合に応じて、補正係数により自動で連続的にゲインを抑圧できるという効果がある。   According to the present invention, the correction coefficient indicating the degree of brightness correction for the color captured image is calculated based on the shape of the histogram representing the frequency of the pixels included in each of the plurality of preset luminance intervals. Since the gain applied to the signal level of each of the luminance signal and the first and second difference signals is adjusted by the correction coefficient, the correction coefficient automatically and continuously according to the backlight condition of the captured image. There is an effect that the gain can be suppressed.

図1は、本発明の実施形態1による階調補正機能を備えた画像処理装置を説明する概略構成図であり、該画像処理装置を備えたディジタルスチルカメラを示している。FIG. 1 is a schematic configuration diagram illustrating an image processing apparatus having a gradation correction function according to Embodiment 1 of the present invention, and shows a digital still camera including the image processing apparatus. 図2は、従来の階調補正機能を備えた画像処理装置を示す概略構成図であり、該画像処理装置を備えたディジタルスチルカメラを示している。FIG. 2 is a schematic configuration diagram showing an image processing apparatus having a conventional gradation correction function, and shows a digital still camera provided with the image processing apparatus. 図3は、従来の画像処理装置における逆光補正を説明する図であり、逆光時の撮影画像を示している。FIG. 3 is a diagram for explaining backlight correction in a conventional image processing apparatus, and shows a photographed image at the time of backlight. 図4は、従来の画像処理装置における逆光補正を説明する図であり、RGB値から生成した逆光時の画素値の度数分布を示すヒストグラムである。FIG. 4 is a diagram for explaining backlight correction in a conventional image processing apparatus, and is a histogram showing the frequency distribution of pixel values during backlight generated from RGB values. 図5は、従来の画像処理装置における逆光補正を説明する図であり、RGB値に対する通常のガンマ補正を行う場合に用いるガンマ補正曲線と、該ガンマ補正の際に明るさ補正を行う場合に用いるガンマ補正曲線とを対比して示している。FIG. 5 is a diagram for explaining backlight correction in a conventional image processing apparatus, and is used for performing a gamma correction curve used when normal gamma correction is performed on RGB values, and when performing brightness correction during the gamma correction. A comparison with a gamma correction curve is shown. 図6は、本発明の実施形態1による画像処理装置における階調補正を説明する図であり、輝度値から生成した逆光時のヒストグラムを示している。FIG. 6 is a diagram for explaining gradation correction in the image processing apparatus according to the first embodiment of the present invention, and shows a histogram at the time of backlight generated from the luminance value. 図7は、本発明の実施形態1による画像処理装置における階調補正を説明する図であり、該階調補正時に用いる輝度値をゲインに変換する変換曲線(ゲインカーブ)の一例を示している。FIG. 7 is a diagram for explaining gradation correction in the image processing apparatus according to the first embodiment of the present invention, and shows an example of a conversion curve (gain curve) for converting a luminance value used in the gradation correction into a gain. . 図8は、本発明の実施形態1による画像処理装置を説明する図であり、該画像処理装置を構成するYUV階調補正部(図8(a))および階調補正係数演算部(図8(b))の回路構成を示している。FIG. 8 is a diagram for explaining the image processing apparatus according to the first embodiment of the present invention. A YUV gradation correction unit (FIG. 8A) and a gradation correction coefficient calculation unit (FIG. 8) constituting the image processing apparatus. The circuit configuration of (b)) is shown.

本発明の対象となる、撮像画像の暗部の補正を行う画像処理システムは、例えばディジタルスチルカメラなどに用いられ、一連の複数の画像信号処理を組み合わせて所望のデータ信号処理を実現するものである。   An image processing system that corrects a dark portion of a captured image, which is an object of the present invention, is used for a digital still camera, for example, and realizes desired data signal processing by combining a series of image signal processing. .

以下、本発明の実施形態について図面を参照しながら説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(実施形態1)
図1は本発明の実施形態1に係る画像処理装置の要部構成を説明する図であり、該画像処理装置を備えたディジタルカメラを示している。
(Embodiment 1)
FIG. 1 is a diagram for explaining a main configuration of an image processing apparatus according to Embodiment 1 of the present invention, and shows a digital camera equipped with the image processing apparatus.

図1に示すディジタルスチルカメラ100は、従来のディジタルスチルカメラ200と同様、例えばイメージセンサーである固体撮像素子101と、該固体撮像素子101から画素データとして出力された画像データから信号成分を取り出してサンプルホールドするサンプルホールド部102と、該サンプルホールド部102でサンプルホールドされた各画素データの信号成分をディジタルデータに変換するADコンバータ103と、該ADコンバータ103から出力されるディジタルデータに対する画像処理を行う、逆光補正処理機能を持つ画像処理装置100aとを有している。   A digital still camera 100 shown in FIG. 1 takes out signal components from, for example, a solid-state image pickup device 101 that is an image sensor and image data output as pixel data from the solid-state image pickup device 101, as with the conventional digital still camera 200. A sample-and-hold unit 102 for sample-holding, an AD converter 103 for converting the signal component of each pixel data sampled and held by the sample-and-hold unit 102 into digital data, and image processing for the digital data output from the AD converter 103 And an image processing apparatus 100a having a backlight correction processing function.

なお、イメージセンサーにはCCD型イメージセンサやCMOS型イメージセンサがあるが、ここではCCDモジュールを用いており、このCCDモジュールは図2に示す従来のディジタルスチルカメラのものと同一のものである。   The image sensor includes a CCD type image sensor and a CMOS type image sensor. Here, a CCD module is used, and this CCD module is the same as that of the conventional digital still camera shown in FIG.

画像処理装置100aは、従来の画像処理装置200aと同様に、ADコンバータでディジタルデータに変換された各画素データに対する黒レベルを規定値に固定するクランプ処理部111と、クランプ処理部111からのR画素およびB画素の画素データに対して所定の値を乗算して、白色の調整がなされるようゲインを調整するホワイトバランス処理部112と、ホワイトバランス処理部112から出力されるRGB画素データに対する明るさ補正を行って、ブラウン管や液晶パネルなど特定のモニタ装置として用いられる各表示装置毎の階調表示特性を調整するガンマ(γ)補正部113とを有している。   Similar to the conventional image processing apparatus 200a, the image processing apparatus 100a includes a clamp processing unit 111 that fixes a black level for each pixel data converted into digital data by an AD converter to a predetermined value, and an R from the clamp processing unit 111. The white balance processing unit 112 that multiplies pixel data of the pixels and B pixels by a predetermined value to adjust the gain so that white adjustment is performed, and the brightness for the RGB pixel data output from the white balance processing unit 112 And a gamma (γ) correction unit 113 that adjusts the gradation display characteristics of each display device used as a specific monitor device such as a cathode ray tube or a liquid crystal panel.

また、画像処理装置100aは、後段の縮小処理(間引き処理など)によるエイリアシングが抑制されるよう、ガンマ補正部113からの画像データの高周波成分を減衰するローパスフィルタ部114と、各画素に対して、当該画素のカラーフィルタの色以外の色成分を補間によって求める補間処理部115と、補間処理部115からのRGB各色に対応する画像データ(RGB画像データ)を間引く縮小処理を行う縮小処理部116と、縮小処理部216から出力されたRGB画像データから、輝度信号データ(Y)、輝度信号と青色成分との差信号データ(U)および輝度信号と赤色成分の差信号データ(V)とを生成するYUV生成部121とを有している。   Further, the image processing apparatus 100a applies a low-pass filter unit 114 that attenuates a high-frequency component of image data from the gamma correction unit 113 and each pixel so that aliasing due to subsequent reduction processing (such as thinning-out processing) is suppressed. An interpolation processing unit 115 that obtains a color component other than the color filter color of the pixel by interpolation, and a reduction processing unit 116 that performs a reduction process of thinning out image data (RGB image data) corresponding to each color of RGB from the interpolation processing unit 115. And luminance signal data (Y), difference signal data (U) between the luminance signal and the blue component, and difference signal data (V) between the luminance signal and the red component from the RGB image data output from the reduction processing unit 216. And a YUV generation unit 121 for generation.

そして、この実施形態1の画像処理装置100aは、YUV生成部121から出力される信号データに対して明るさ補正を行う明るさ補正部100bを有している。   The image processing apparatus 100 a according to the first embodiment includes a brightness correction unit 100 b that performs brightness correction on the signal data output from the YUV generation unit 121.

この明るさ補正部100bは、生成された輝度信号データ(Y)を用いて輝度ヒストグラムを生成するヒストグラム生成部122と、該輝度ヒストグラムに基づいて補正係数Cを算出する階調補正係数演算部140と、該補正係数Cを用いて輝度の低い範囲の画素に対して明るさ補正を行うYUV階調補正部130とを有している。   The brightness correction unit 100b includes a histogram generation unit 122 that generates a luminance histogram using the generated luminance signal data (Y), and a gradation correction coefficient calculation unit 140 that calculates a correction coefficient C based on the luminance histogram. And a YUV gradation correction unit 130 that performs brightness correction on pixels in a low luminance range using the correction coefficient C.

ここで、YUV階調補正部130は、図8(a)に示すように、YUV生成部121から出力される輝度信号データ(輝度値)とゲインとの対応関係を定義する変換関数を格納した関数格納部131aと、該輝度値を該変換関数に基づいてゲインGに変換する変換部(ゲイン導出部)131と、該得られたゲインGと補正係数Cとの乗算により補正ゲインkを算出するゲイン補正部(乗算部)132と、該補正ゲインkを、明るさ調整前の輝度信号データ(Y0)、第1の差信号データ(U0)および第2の差信号データ(V0)に掛けて、明るさ調整された輝度信号データ(Y1)、第1の差信号データ(U1)および第2の差信号データ(V1)を算出する乗算器133a〜133cとを有している。   Here, as shown in FIG. 8A, the YUV tone correction unit 130 stores a conversion function that defines the correspondence between the luminance signal data (luminance value) output from the YUV generation unit 121 and the gain. A function storage unit 131a, a conversion unit (gain derivation unit) 131 that converts the luminance value into a gain G based on the conversion function, and a correction gain k is calculated by multiplying the obtained gain G and correction coefficient C. The gain correction unit (multiplication unit) 132 that performs the correction and the correction gain k are multiplied by the luminance signal data (Y0), the first difference signal data (U0), and the second difference signal data (V0) before brightness adjustment. Multipliers 133a to 133c for calculating brightness signal data (Y1), first difference signal data (U1), and second difference signal data (V1) whose brightness has been adjusted.

ここで上記変換関数は、図7に示すように、前記カラー撮像画像における暗部を構成する画素の輝度値を含む、一定の輝度範囲X内の画素の画素値に対するゲインが、該一定輝度範囲以外の画素の輝度値に対するゲインより大きくなるよう定義されている。   Here, as shown in FIG. 7, the conversion function has a gain for a pixel value of a pixel in a certain luminance range X including a luminance value of a pixel constituting a dark portion in the color captured image, except for the certain luminance range. It is defined to be larger than the gain for the luminance value of the pixel.

また、階調補正係数演算部140は、図8(b)に示すように、上記輝度ヒストグラムを示す情報Hに基づいて前記カラー撮像画像に対する明るさ補正の要否を判定する補正要否判定部141と、補正要否判定部141での判定結果と該輝度ヒストグラムを示す情報Hとに基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数Cを算出する係数作成部(補正係数演算部)142とを有している。   Further, as shown in FIG. 8B, the gradation correction coefficient calculation unit 140 determines whether or not brightness correction is necessary for the color captured image based on the information H indicating the luminance histogram. 141, and a coefficient creation unit (correction coefficient) that calculates a correction coefficient C indicating the degree of brightness correction for the color captured image based on the determination result in the correction necessity determination unit 141 and the information H indicating the luminance histogram. Calculation unit) 142.

ここで、前記補正要否判定部141は、前記ヒストグラムの形状が、図6に示すように、輝度の高い領域R4と輝度の低い領域R2とで、これらの間の中間的な輝度の領域R3に比べて、度数が高くなる形状であるときに、前記カラー撮像画像に対する明るさ補正が必要であると判定するよう構成されている。また、さらなる判定条件として、前記補正要否判定部141が前記カラー撮像画像に対する明るさ補正が必要であると判定するときは、前記輝度の低い領域R2での度数が、予め設定した閾値(HIST_DIF_L)より大きい度数であるときという条件を加えている。また、ここでは、前記係数作成部142は、前記輝度の高い領域R4での度数と、予め設定した閾値(HIST_DIF_H)との差分ΔHが大きいほど、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数として、より明るさを増大させる補正係数を算出するものとしている。   Here, as shown in FIG. 6, the correction necessity determination unit 141 includes a region R4 having a luminance intermediate between a high luminance region R4 and a low luminance region R2, as shown in FIG. In contrast, when the shape has a higher frequency, it is determined that brightness correction is required for the color captured image. As a further determination condition, when the correction necessity determination unit 141 determines that brightness correction is necessary for the color captured image, the frequency in the low-luminance region R2 is set to a preset threshold value (HIST_DIF_L ) The condition that the frequency is larger than that is added. Here, the coefficient creating unit 142 indicates the degree of brightness correction for the color captured image as the difference ΔH between the frequency in the high-luminance region R4 and a preset threshold value (HIST_DIF_H) is larger. As the correction coefficient, a correction coefficient that further increases brightness is calculated.

なお、前記係数作成部142は、前記輝度の高い領域R4での度数(HIST_H)と予め設定した第1の閾値(HIST_DIF_H)との第1の差分ΔHと、前記輝度の低い領域R2での度数(HIST_L)と予め設定した第2の閾値(HIST_DIF_L)との第2の差分ΔLとに基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出するものであってもよい。例えば、前記係数作成部142は、上記第1および第2の差分の積算値が大きいほど、より明るくなるよう明るさ補正が行われる補正係数を発生するようにしてもよい。   The coefficient creating unit 142 uses the first difference ΔH between the frequency (HIST_H) in the high-luminance region R4 and the first threshold (HIST_DIF_H) set in advance, and the frequency in the low-luminance region R2. Based on the second difference ΔL between (HIST_L) and a preset second threshold (HIST_DIF_L), a correction coefficient indicating the degree of brightness correction for the color captured image may be calculated. For example, the coefficient creating unit 142 may generate a correction coefficient that performs brightness correction so that the larger the integrated value of the first and second differences is, the brighter it is.

この場合、前記係数作成部142は、前記第1および第2の閾値を設定するレジスタを有するものであることが望ましい。   In this case, it is desirable that the coefficient creating unit 142 includes a register for setting the first and second threshold values.

次に動作について説明する。   Next, the operation will be described.

本実施形態1のディジタルカメラ100では、イメージセンサーであるCCDモジュール101による撮像により得られた画像データがサンプルホールド部102に入力されると、該サンプルホールド部102では、該画像データから信号成分が取り出されてADコンバータに出力され、該ADコンバータ103では、該信号成分がディジタルデータに変換される。   In the digital camera 100 according to the first embodiment, when image data obtained by imaging by the CCD module 101 that is an image sensor is input to the sample hold unit 102, the sample hold unit 102 generates a signal component from the image data. The signal is taken out and output to an AD converter, and the AD converter 103 converts the signal component into digital data.

そして、画像処理装置100aでは、クランプ処理部111により、ADコンバータ103からのディジタルデータの黒レベルが規定値に固定され、ホワイトバランス処理部112により、クランプ処理部111からのR画素およびB画素の画素データに対して、白色を調整するために所定の値を乗算してそのゲインの調整が行われる。これらのクランプ処理部111およびホワイトバランス処理部112の動作は従来の画像処理装置200aにおけるものと同一である。   In the image processing apparatus 100a, the black level of the digital data from the AD converter 103 is fixed to a specified value by the clamp processing unit 111, and the R pixel and the B pixel from the clamp processing unit 111 are fixed by the white balance processing unit 112. The pixel data is multiplied by a predetermined value to adjust the gain in order to adjust the white color. The operations of the clamp processing unit 111 and the white balance processing unit 112 are the same as those in the conventional image processing apparatus 200a.

そして、この実施形態1では、ガンマ(γ)補正部113では、ホワイトバランス処理部212からの画像データに対してガンマ補正処理が施される。このガンマ補正処理は、ブラウン管や液晶パネルなど特定のモニタ装置として用いられる各表示装置毎の階調表示特性を調整するために行われる。ガンマ補正が施された画像データはローパスフィルタ部114を通過することにより、その高周波成分が減衰させられる。この高周波成分の減衰は、後段の縮小処理(間引き処理など)によるエイリアシングを防ぐために行われる。   In the first embodiment, the gamma (γ) correction unit 113 performs gamma correction processing on the image data from the white balance processing unit 212. This gamma correction processing is performed to adjust the gradation display characteristics of each display device used as a specific monitor device such as a cathode ray tube or a liquid crystal panel. The image data on which the gamma correction has been performed passes through the low-pass filter unit 114, so that the high-frequency component is attenuated. The attenuation of the high frequency component is performed in order to prevent aliasing due to a subsequent reduction process (such as a thinning process).

また、補間処理部115では、ローパスフィルタ114からの画像データに対して、各画素に対して、その画素のカラーフィルタの色以外の色成分が補間によって求められる。つまり、緑色フィルタが設けられた画素(G画素)では、赤色フィルタが設けられた画素(G画素)および青色フィルタが設けられた画素(B画素)の画像データ、つまり赤色および青色の画像情報は得られないため、補間処理部215では、このG画素での赤色および青色の画素値情報が周辺のR画素およびB画素の画素値から求められる。   Further, the interpolation processing unit 115 obtains, for each pixel, color components other than the color of the color filter of the pixel of the image data from the low-pass filter 114 by interpolation. That is, in the pixel (G pixel) provided with the green filter, the image data of the pixel (G pixel) provided with the red filter and the pixel (B pixel) provided with the blue filter, that is, red and blue image information Since it cannot be obtained, the interpolation processing unit 215 obtains the red and blue pixel value information at the G pixel from the pixel values of the surrounding R and B pixels.

さらに、縮小処理部116では、補間処理部115からのRGB画像データに対する間引き処理により画像サイズが縮小されたRGB画像データが作成される。   Further, the reduction processing unit 116 creates RGB image data whose image size is reduced by thinning out the RGB image data from the interpolation processing unit 115.

YUV生成部121では、縮小処理部116から出力されるRGB画像データからYUV画像データが生成される。このYUV画像データは、輝度信号データ(Y)、輝度信号と青色成分の差信号データ(U)、および輝度信号と赤色成分の差信号データ(V)を含んでいる。   The YUV generation unit 121 generates YUV image data from the RGB image data output from the reduction processing unit 116. The YUV image data includes luminance signal data (Y), difference signal data (U) between the luminance signal and the blue component, and difference signal data (V) between the luminance signal and the red component.

このようにイメージセンサーであるCCDモジュールから得られた画像データは、図1に示すようなさまざまな回路によりデータ処理が施され、明るさ補正部100bの前段のYUV生成部121では、輝度信号データ(Y)と輝度信号と青色成分の差(U)および輝度信号と赤色成分の差(V)が生成され、これらの信号が明るさ補正部100bに入力される。   Thus, the image data obtained from the CCD module as the image sensor is subjected to data processing by various circuits as shown in FIG. 1, and the YUV generation unit 121 at the front stage of the brightness correction unit 100 b performs luminance signal data. A difference (U) between the luminance signal and the blue component and a difference (V) between the luminance signal and the red component are generated, and these signals are input to the brightness correction unit 100b.

次に、明るさ補正部100bにおけるYUV階調補正部130にて行う明るさの補正動作について説明する。   Next, the brightness correction operation performed by the YUV tone correction unit 130 in the brightness correction unit 100b will be described.

YUV階調補正部100bでは、YUV生成部121からの輝度信号データ(Y)に基づいてヒストグラム生成部122により、どの程度の輝度の画素がどの程度存在するかを示す輝度ヒストグラム(図6参照)が生成され、次に、階調補正係数算出部140にて、明るさ補正に必要な補正係数Cが算出され、さらに、YUV階調補正部130により、Y、U、Vの各信号データに対して算出した補正係数Cにより明るさ調整が行われる。   In the YUV tone correction unit 100b, the histogram generation unit 122 based on the luminance signal data (Y) from the YUV generation unit 121 indicates a luminance histogram indicating how many pixels exist (see FIG. 6). Next, the correction coefficient C necessary for the brightness correction is calculated by the gradation correction coefficient calculation unit 140, and further, the YUV gradation correction unit 130 converts each of the Y, U, and V signal data. The brightness adjustment is performed by the correction coefficient C calculated for the above.

以下、ヒストグラム生成部122にて生成した輝度ヒストグラムに基づいて補正ゲインを算出する動作について説明する。   Hereinafter, an operation for calculating the correction gain based on the luminance histogram generated by the histogram generation unit 122 will be described.

逆光時の撮像画像(逆光画像)のヒストグラムを生成した場合、ヒストグラムには、明るすぎる部分と暗すぎる部分とが撮像画像全体の大きな領域を占め、明るさが中間である領域の面積が狭いという特徴がある。   When a histogram of a captured image (backlight image) at the time of backlighting is generated, it is said that a portion that is too bright and a portion that is too dark occupy a large area of the entire captured image, and that the area of brightness is intermediate There are features.

このため、逆光画像の輝度ヒストグラムでは、図6に示すように、輝度の高い範囲R4と輝度の低い範囲R2とに度数の高い山があり、その間に比較的度数の低い領域R3がある形になる。なお、範囲R1は、範囲R2より輝度の低い領域である。   For this reason, in the luminance histogram of the backlight image, as shown in FIG. 6, there is a high frequency peak in the high luminance range R4 and a low luminance range R2, and there is a relatively low frequency region R3 between them. Become. The range R1 is a region having a lower luminance than the range R2.

まず、階調補正係数算出部140では、ヒストグラムの情報に基づいて、明るさ補正を行うか否かの判定が補正要否判定部141により行われ、さらに、係数作成部142では、上述したように、補正要否判定結果とヒストグラムの形状とに基づいて補正係数Cが算出される。   First, in the gradation correction coefficient calculation unit 140, the determination as to whether or not to perform brightness correction is performed by the correction necessity determination unit 141 based on the information of the histogram, and the coefficient generation unit 142 further performs the above-described determination. In addition, the correction coefficient C is calculated based on the correction necessity determination result and the shape of the histogram.

そして、YUV階調補正部130では、関数情報格納部131aに格納されている関数情報、つまり、図7に示すような輝度をゲインに変換するゲインカーブ(変換関数)Lgに従って、変換部131にて、各画素の輝度値よりその画素に対応したゲインGを算出する。このゲインカーブLgは、輝度の低い範囲R2付近に対してゲインGが大きくなるように設定されており、これにより輝度の低い画素の輝度値にのみゲインGを掛けることが可能となり、その他の部分に画素に関してはその輝度値にゲインが掛からない。   Then, the YUV gradation correction unit 130 causes the conversion unit 131 to follow the function information stored in the function information storage unit 131a, that is, a gain curve (conversion function) Lg for converting luminance into gain as shown in FIG. Thus, the gain G corresponding to the pixel is calculated from the luminance value of each pixel. The gain curve Lg is set so that the gain G becomes larger in the vicinity of the low-luminance range R2, so that the gain G can be multiplied only by the luminance value of the low-luminance pixel. In addition, no gain is applied to the luminance value of the pixel.

また、変換部131にて得られたゲインGは、ゲイン補正部132にて、係数作成部142で作成された補正係数Cと掛け合わされて補正ゲインkが生成される。   The gain G obtained by the conversion unit 131 is multiplied by the correction coefficient C created by the coefficient creation unit 142 by the gain correction unit 132 to generate a correction gain k.

以下、上記ヒストグラムから補正ゲインを算出する手法についてさらに説明する。   Hereinafter, a method for calculating the correction gain from the histogram will be further described.

本発明では、明るさ補正は、逆光時の明るさ補正であり、ヒストグラム生成部122によって生成された逆光時の輝度ヒストグラムは、図6に示すような形状になる。   In the present invention, brightness correction is brightness correction during backlighting, and the luminance histogram during backlighting generated by the histogram generator 122 has a shape as shown in FIG.

従って、本発明では、全ての輝度領域の頻度を検出するのではなく、輝度の高い範囲R4と低い範囲R2のみを設定し、この2つの範囲の頻度を検出し、これらの輝度範囲に対する輝度レベルの頻度によりヒストグラムを生成する。   Therefore, in the present invention, the frequency of all luminance regions is not detected, but only the high range R4 and the low range R2 are set, the frequencies of these two ranges are detected, and the luminance levels for these luminance ranges are set. A histogram is generated according to the frequency of.

このヒストグラムを用い、階調補正係数演算部140では、次のような手法により明るさ補正のための補正係数を算出する。   Using this histogram, the gradation correction coefficient calculator 140 calculates a correction coefficient for brightness correction by the following method.

すなわち、階調補正係数演算部140の係数作成部142では、図6に示すように、前述した着目すべき輝度の高い範囲R4、輝度の低い範囲R2にそれぞれ、度数に関するHしきい値(HIST_DIF_H)、Lしきい値(HIST_DIF_L)を設定し、各領域の度数がそのしきい値を超えた場合のみ明るさ補正を行い、さらにそのしきい値と、輝度度数(HIST_L、HIST_H)の差(ΔL、ΔH)が大きくなればなるほど、(つまり、「HIST_L − HIST_DIF_L」、「HIST_H − HIST_DIF_H」の値が大きくなるほど)、輝度の低い範囲R2がより明るくなるような補正係数を作成する。   That is, in the coefficient creating unit 142 of the gradation correction coefficient calculating unit 140, as shown in FIG. 6, the H threshold value (HIST_DIF_H) relating to the frequency is set in the above-described high luminance range R4 and low luminance range R2, respectively. ), L threshold value (HIST_DIF_L) is set, brightness correction is performed only when the frequency of each area exceeds the threshold value, and the difference between the threshold value and luminance frequency (HIST_L, HIST_H) ( A correction coefficient is created so that the lower the luminance range R2, the higher the value of [Delta] L, [Delta] H) (that is, the greater the values of "HIST_L-HIST_DIF_L" and "HIST_H-HIST_DIF_H").

たとえば、
HIST_SUP = {(HIST_L − HIST_DIF_L) x K_L} x {(HIST_H − HIST_DIF_H) x K_H}
の値に従って増減するような補正係数Cを算出し、明るさの補正を実施する。
For example,
HIST_SUP = {(HIST_L−HIST_DIF_L) × K_L} x {(HIST_H−HIST_DIF_H) × K_H}
A correction coefficient C that increases or decreases according to the value is calculated, and the brightness is corrected.

ここで、K_Lは輝度の低い範囲R2に対する感度調整係数、K_Hは輝度の高い範囲R4に対する感度調整係数である。   Here, K_L is a sensitivity adjustment coefficient for the low brightness range R2, and K_H is a sensitivity adjustment coefficient for the high brightness range R4.

HIST_SUPの値が大きいほど補正係数Cが大きくなることにより、撮像画像は明るくなるよう補正され、小さいほど明るさ補正に抑圧が掛かり、撮像画像に対する明るさの補正がされなくなる。前述したゲインカーブLgから算出した各画素のゲインGをGAIN0とした場合(図7参照)、例えば次のような演算にて各画素の明るさの補正ゲインkを算出する。   As the value of HIST_SUP is increased, the correction coefficient C is increased, so that the captured image is corrected to be brighter. As the value is decreased, the brightness correction is suppressed, and the brightness of the captured image is not corrected. When the gain G of each pixel calculated from the above-described gain curve Lg is GAIN0 (see FIG. 7), for example, the brightness correction gain k of each pixel is calculated by the following calculation.

補正ゲインk = (GAIN0 − 1) x HIST_SUP + 1
この補正ゲインkを用いて、暗部の明るさ補正を行う。
Correction gain k = (GAIN0−1) × HIST_SUP + 1
Using this correction gain k, the brightness of the dark part is corrected.

この補正ゲインを用いることで連続的に明るさの補正を行うことができる。   By using this correction gain, the brightness can be corrected continuously.

次に、上述したような方法により算出した補正ゲインkを用いて、輝度の低い範囲R2の画素に対して明るさ補正を実施する。   Next, brightness correction is performed on the pixels in the low-luminance range R2 using the correction gain k calculated by the method described above.

範囲R2の画素の輝度信号データ(Y0)、輝度信号と青色成分の差(U0)および輝度信号と赤色成分の差(V0)と前述した補正ゲインkとの演算(乗算)を、各演算器133a〜133cで実施することにより、明るさ補正後のY1、U1、V1を生成し、輝度の低い領域を明るく補正することが可能となる。   The calculation (multiplication) of the luminance signal data (Y0), the difference between the luminance signal and the blue component (U0), the difference between the luminance signal and the red component (V0), and the correction gain k described above is performed for each calculator. By performing the processing at 133a to 133c, it is possible to generate Y1, U1, and V1 after brightness correction, and to brightly correct a low luminance area.

このようにすることにより明るさ補正の前後で、R画像データ、G画像データ、B画像データの混合比率は変わらないため、色の再現性を保持することができ、色相が異なることがなく、明るさのみを補正することができる。   By doing so, the mixing ratio of the R image data, the G image data, and the B image data does not change before and after the brightness correction, so that the color reproducibility can be maintained and the hue is not different. Only the brightness can be corrected.

上記のようにY値、U値、V値に対して補正ゲインを掛けることで色相が異なることがない理由について簡単に説明する。   The reason why the hue does not differ by multiplying the Y value, U value, and V value by the correction gain as described above will be briefly described.

補正ゲインをk、明るさ補正前の輝度値Y、色差値U、色差値Vを、Y0、U0、V0とし、明るさ補正後の輝度値Y、色差値U、色差値VをY1、U1、V1とした場合、明るさ補正前後の関係は次のように表される。   The correction gain is k, the brightness value Y before brightness correction, the color difference value U, and the color difference value V are Y0, U0, and V0, and the brightness value Y, color difference value U, and color difference value V after brightness correction are Y1, U1. , V1, the relationship before and after brightness correction is expressed as follows.

Y1 = kY0、U1 = kU0、V1=kV0として、明るさ補正後の輝度値Y1、および色差値U1、V1を、R、G、Bへ変換した場合の関係は次式のように展開される。   When Y1 = kY0, U1 = kU0, and V1 = kV0, the brightness value Y1 after brightness correction and the color difference values U1 and V1 are converted into R, G, and B, the relationship is developed as follows: .

R = 1.000Y1 + 1.402V1
= k(1.000Y0 + 1.402V0)
G = 1.000Y1 − 0.344U1 − 0.714V1
= k(1.000Y0 − 0.344U0 − 0.714V0)
B = 1.000Y1 + 1.772U1
= k(1.000Y0 + 1.772U0)
この式から分かるように、Y、U、Vの各データに輝度により変化するゲインkをかけてもR、G、Bの混合比率は変わらないため、色相が変わらないことになる。
R = 1.000Y1 + 1.402V1
= K (1.000Y0 + 1.402V0)
G = 1.000Y1-0.344U1-0.714V1
= K (1.000Y0-0.344U0-0.714V0)
B = 1.000Y1 + 1.772U1
= K (1.000Y0 + 1.772U0)
As can be seen from this equation, even when a gain k that varies depending on the luminance is applied to each of the Y, U, and V data, the mixing ratio of R, G, and B does not change, so the hue does not change.

このように本実施形態1では、以下のような効果が得られる。   Thus, in the first embodiment, the following effects can be obtained.

従来の技術では、逆光画像において暗く撮影された被写体の明るさを適正な明るさに補正する場合には、ガンマ補正部にて明るさを補正することが一般的であった。しかしながらガンマ補正時に逆光による明るさも同時に補正した場合、色の再現性が微妙に変化してしまい、たとえば被写体の肌の色が青みがかったりしたりするなど、色相が異なってしまう場合があった。   In the prior art, when correcting the brightness of a subject photographed dark in a backlight image to an appropriate brightness, the brightness is generally corrected by a gamma correction unit. However, if the brightness due to backlighting is also corrected at the time of gamma correction, the color reproducibility changes slightly, and the hue may be different, for example, the subject's skin color is bluish.

これに対し、本発明の実施形態では、逆行補正時の明るさの調整をガンマ補正時にR、G、Bの各色の画像データに対して行うのではなく、YUV生成部にて輝度信号データ(Y)と輝度信号と青色成分の差(U)および輝度信号と赤色成分の差(V)を生成した後、輝度信号データ(Y)に対して輝度ヒストグラムを生成する。さらにこの輝度ヒストグラムの形状から逆光補正が必要かを判断し、補正が必要な場合にはヒストグラムの度数に応じた明るさ調整のための補正ゲインkを算出し、信号データ(Y、U、V)に対して算出した補正ゲインに対応した明るさ調整を行う。   On the other hand, in the embodiment of the present invention, brightness adjustment is not performed on the image data of each color of R, G, and B at the time of gamma correction but brightness signal data ( Y), a difference between the luminance signal and the blue component (U) and a difference between the luminance signal and the red component (V) are generated, and then a luminance histogram is generated for the luminance signal data (Y). Further, it is determined whether the backlight correction is necessary from the shape of the luminance histogram. If the correction is necessary, a correction gain k for brightness adjustment according to the frequency of the histogram is calculated, and the signal data (Y, U, V ) To adjust the brightness corresponding to the correction gain calculated.

このような構成をとることにより、撮像画像の明るさ補正時に、R、G、Bの信号レベルの混合比率が微妙に変化することがなくなり、色相を変化させることもなくなる。また逆光具合に応じて、補正係数Cにより自動で連続的にゲインを抑圧でき、このため明暗の点滅は発生しない。この場合、ゲインの調整は、補正係数Cをゲインに掛け合わせるだけであるので、補正ゲインは簡単な回路構成で求めることができる。   By adopting such a configuration, when the brightness of the captured image is corrected, the mixing ratio of the signal levels of R, G, and B does not change subtly, and the hue does not change. Further, the gain can be automatically and continuously suppressed by the correction coefficient C in accordance with the backlight condition, and therefore, blinking of light and dark does not occur. In this case, the gain is adjusted by simply multiplying the correction coefficient C by the gain, so that the correction gain can be obtained with a simple circuit configuration.

さらに、ガンマ補正と逆光による階調補正を別々の回路にて調整可能となり、各々独立した設定ができる。   Furthermore, gamma correction and gradation correction by backlight can be adjusted by separate circuits, and each can be set independently.

また、本実施形態では、ヒストグラムの形状が、輝度の高い領域と輝度の低い領域とで、これらの間の中間的な輝度の領域に比べて、度数が高くなる形状であるときに、前記カラー撮像画像に対する明るさ補正が必要であると判定するので、明るさ補正の要否判定をヒストグラムの形状に基づいて簡単に行うことができる。   Further, in the present embodiment, when the histogram has a shape in which the frequency is higher in the high luminance region and the low luminance region than in the intermediate luminance region therebetween, the color Since it is determined that brightness correction is necessary for the captured image, it is possible to easily determine whether brightness correction is necessary based on the shape of the histogram.

以上のように、本発明の好ましい実施形態を用いて本発明を例示してきたが、本発明は、この実施形態に限定して解釈されるべきものではない。本発明は、特許請求の範囲によってのみその範囲が解釈されるべきであることが理解される。当業者は、本発明の具体的な好ましい実施形態の記載から、本発明の記載および技術常識に基づいて等価な範囲を実施することができることが理解される。本明細書において引用した特許、特許出願および文献は、その内容自体が具体的に本明細書に記載されているのと同様にその内容が本明細書に対する参考として援用されるべきであることが理解される。   As mentioned above, although this invention has been illustrated using preferable embodiment of this invention, this invention should not be limited and limited to this embodiment. It is understood that the scope of the present invention should be construed only by the claims. It is understood that those skilled in the art can implement an equivalent range based on the description of the present invention and the common general technical knowledge from the description of specific preferred embodiments of the present invention. Patents, patent applications, and documents cited herein should be incorporated by reference in their entirety, as if the contents themselves were specifically described herein. Understood.

本発明は、逆光撮影時などの画像の暗部の明るさ補正を行う画像処理装置、およびこのような画像処理装置を備えたディジタルスチルカメラの分野において、明るさ補正を、R、G、B各画素の画素データの混合比率が微妙に変わって色相が変化してしまうといった画質劣化を招くことなく行うことができ、しかも、暗部の各画素に対して連続的な明るさ補正を行うことができるものであり、CCDイメージセンサやCMOSイメージセンサなどの固体撮像素子を搭載したデジタルカメラで有用なものである。   In the field of an image processing apparatus that performs brightness correction of a dark part of an image at the time of backlight photographing and the like and a digital still camera including such an image processing apparatus, brightness correction is performed for each of R, G, and B. This can be performed without causing deterioration in image quality, such as a slight change in the pixel data mixing ratio and a change in hue, and continuous brightness correction can be performed for each pixel in the dark area. It is useful for a digital camera equipped with a solid-state image sensor such as a CCD image sensor or a CMOS image sensor.

100 ディジタルスチルカメラ
100a 画像処理装置
100b 明るさ補正部
101 固体撮像素子
102 サンプルホールド部
103 ADコンバータ
111 クランプ処理部
112 ホワイトバランス処理部
113 ガンマ(γ)補正部
114 ローパスフィルタ部
115 補間処理部
116 縮小処理部
121 YUV生成部
122 ヒストグラム生成部
130 YUV階調補正部
140 階調補正係数演算部
131 変換部(ゲイン導出部)
131a 関数格納部
132 ゲイン補正部(乗算部)
133a〜133c 乗算器
140 階調補正係数演算部
141 補正要否判定部
142 係数作成部(補正係数演算部)
DESCRIPTION OF SYMBOLS 100 Digital still camera 100a Image processing apparatus 100b Brightness correction part 101 Solid-state image sensor 102 Sample hold part 103 AD converter 111 Clamp process part 112 White balance process part 113 Gamma ((gamma)) correction part 114 Low pass filter part 115 Interpolation process part 116 Reduction | decrease Processing unit 121 YUV generation unit 122 Histogram generation unit 130 YUV tone correction unit 140 Tone correction coefficient calculation unit 131 Conversion unit (gain derivation unit)
131a Function storage unit 132 Gain correction unit (multiplication unit)
133a to 133c Multiplier 140 Gradation correction coefficient calculation unit 141 Correction necessity determination unit 142 Coefficient creation unit (correction coefficient calculation unit)

Claims (18)

撮像により得られたカラー撮像画像のディジタル画像信号を処理する画像処理装置であって、
該ディジタル画像信号から、該カラー撮像画像の輝度を示す輝度信号、該輝度信号と該カラー撮像画像の青色成分との差分を示す第1の差信号、および該輝度信号と該カラー撮像画像の赤色成分との差分を示す第2の差信号の各信号を生成する信号生成部と、
該カラー撮像画像における暗部が明るくなるよう、該輝度信号および第1および第2の差信号の各々の信号レベルを補正する明るさ補正部とを備えた画像処理装置。
An image processing apparatus that processes a digital image signal of a color image obtained by imaging,
From the digital image signal, a luminance signal indicating the luminance of the color captured image, a first difference signal indicating a difference between the luminance signal and the blue component of the color captured image, and a red color of the luminance signal and the color captured image A signal generation unit that generates each signal of the second difference signal indicating a difference from the component;
An image processing apparatus comprising: a brightness correction unit that corrects the signal level of each of the luminance signal and the first and second difference signals so that a dark part in the color captured image becomes bright.
請求項1に記載の画像処理装置において、
前記明るさ補正部は、
前記カラー撮像画像を構成する各画素の輝度信号の信号レベルである輝度値に基づいて、該カラー撮像画像にどの程度の輝度の画素がどの程度含まれているかを示す明るさ情報を作成する明るさ情報作成部と、
該明るさ情報に基づいて該カラー撮像画像に対する明るさ補正が必要か否かを判定する補正要否判定部とを有し、
該補正要否判定部での判定結果に応じて、該輝度信号および第1および第2の差信号の各々の信号レベルを補正する画像処理装置。
The image processing apparatus according to claim 1.
The brightness correction unit
Brightness that creates brightness information indicating how much pixels are included in the color captured image based on a brightness value that is a signal level of a brightness signal of each pixel constituting the color captured image An information creation unit;
A correction necessity determination unit that determines whether or not brightness correction is necessary for the color captured image based on the brightness information;
An image processing apparatus that corrects the signal level of each of the luminance signal and the first and second difference signals in accordance with a determination result in the correction necessity determination unit.
請求項2に記載の画像処理装置において、
前記明るさ情報作成部は、
予め設定された複数の輝度区間の各々に含まれる画素の度数を表すヒストグラムを生成するヒストグラム生成部であり、
前記補正要否判定部は、
該ヒストグラムの形状から前記カラー撮像画像に対する明るさ補正の要否を判定するよう構成されている画像処理装置。
The image processing apparatus according to claim 2,
The brightness information creation unit
A histogram generation unit that generates a histogram indicating the frequency of pixels included in each of a plurality of preset luminance intervals;
The correction necessity determination unit
An image processing apparatus configured to determine whether or not brightness correction is necessary for the color captured image from the shape of the histogram.
請求項3に記載の画像処理装置において、
前記明るさ補正部は、
前記ヒストグラムの形状に基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出する補正係数演算部を有する画像処理装置。
The image processing apparatus according to claim 3.
The brightness correction unit
An image processing apparatus comprising: a correction coefficient calculation unit that calculates a correction coefficient indicating a degree of brightness correction for the color captured image based on the shape of the histogram.
請求項4に記載の画像処理装置において、
前記補正要否判定部は、
前記ヒストグラムの形状が、輝度の高い領域と輝度の低い領域とで、これらの間の中間的な輝度の領域に比べて、度数が高くなる形状であるときに、前記カラー撮像画像に対する明るさ補正が必要であると判定する画像処理装置。
The image processing apparatus according to claim 4.
The correction necessity determination unit
Brightness correction for the color-captured image when the histogram has a shape in which the frequency is higher in the high luminance region and the low luminance region than in the intermediate luminance region between them. An image processing apparatus that determines that is necessary.
請求項5に記載の画像処理装置において、
前記補正要否判定部が前記カラー撮像画像に対する明るさ補正が必要であると判定するときは、前記輝度の低い領域での度数は、予め設定した閾値より大きい度数であるときである画像処理装置。
The image processing apparatus according to claim 5.
When the correction necessity determination unit determines that brightness correction is required for the color captured image, the frequency in the low luminance region is a frequency greater than a preset threshold. .
請求項5に記載の画像処理装置において、
前記補正係数演算部は、
前記輝度の高い領域での度数と、予め設定した閾値との差分が大きいほど、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数として、より明るさを増大させる補正係数を算出する画像処理装置。
The image processing apparatus according to claim 5.
The correction coefficient calculator is
Image processing for calculating a correction coefficient for increasing brightness as a correction coefficient indicating the degree of brightness correction for the color captured image as the difference between the frequency in the high-luminance region and a preset threshold value increases. apparatus.
請求項5に記載の画像処理装置において、
前記補正係数演算部は、
前記輝度の高い領域での度数と予め設定した第1の閾値との第1の差分と、前記輝度の低い領域での度数と予め設定した第2の閾値との第2の差分とに基づいて、前記カラー撮像画像に対する明るさ補正の程度を示す補正係数を算出する画像処理装置。
The image processing apparatus according to claim 5.
The correction coefficient calculator is
Based on a first difference between the frequency in the high brightness area and a preset first threshold value, and a second difference between the frequency in the low brightness area and a preset second threshold value An image processing apparatus that calculates a correction coefficient indicating a degree of brightness correction for the color captured image.
請求項8に記載の画像処理装置において、
前記補正係数演算部は、
前記第1および第2の閾値を設定するレジスタを有する画像処理装置。
The image processing apparatus according to claim 8.
The correction coefficient calculator is
An image processing apparatus having a register for setting the first and second threshold values.
請求項4に記載の画像処理装置において、
前記明るさ補正部は、
前記補正係数に基づいて、該輝度信号および第1および第2の差信号の各々の信号レベルを階調補正する階調補正部を有する画像処理装置。
The image processing apparatus according to claim 4.
The brightness correction unit
An image processing apparatus having a gradation correction unit that performs gradation correction on the signal level of each of the luminance signal and the first and second difference signals based on the correction coefficient.
請求項10に記載の画像処理装置において、
前記階調補正部は、
前記輝度値とゲインとの対応関係を定義する変換関数を格納した関数格納部と、
該輝度値から該変換関数に基づいてゲインを導出するゲイン導出部と、
該算出されたゲインと前記補正係数との乗算により補正ゲインを算出する乗算部とを有し、
該補正ゲインを、該輝度信号、第1および第2の差信号の各々の信号レベルに掛けることにより、これらの信号の階調補正を行う画像処理装置。
The image processing apparatus according to claim 10.
The gradation correction unit
A function storage unit that stores a conversion function that defines the correspondence between the luminance value and the gain;
A gain deriving unit for deriving a gain from the luminance value based on the conversion function;
A multiplier that calculates a correction gain by multiplying the calculated gain and the correction coefficient;
An image processing apparatus that performs gradation correction of these signals by multiplying the signal level of each of the luminance signal and the first and second difference signals by the correction gain.
請求項11に記載の画像処理装置において、
前記変換関数は、前記カラー撮像画像における暗部を構成する画素の輝度値を含む、一定の輝度範囲内の画素の画素値に対するゲインが、該一定輝度範囲以外の画素の輝度値に対するゲインより大きくなるよう定義されている画像処理装置。
The image processing apparatus according to claim 11.
In the conversion function, the gain for the pixel value of a pixel within a certain luminance range including the luminance value of the pixel constituting the dark portion in the color captured image is larger than the gain for the luminance value of a pixel outside the certain luminance range. An image processing apparatus defined as follows.
請求項1に記載の画像処理装置において、
前記ディジタル画像信号は、複数の画素が配列され、それぞれ対応する色のカラーフィルタを有する固体撮像素子による撮像により得られたカラー撮像画像のアナログ画像信号をAD変換して得られたものであり、
前記信号生成部は、
該ディジタル画像信号に基づいて、各画素に対する、該画素の有するカラーフィルタの色以外の色の画素データを作成する補間処理を行う補間処理部を有し、該補間処理部から出力される各カラーフィルタの色に対応する画像信号を、前記ディジタル画像信号として前記信号生成部に出力するよう構成されている画像処理装置。
The image processing apparatus according to claim 1.
The digital image signal is obtained by AD conversion of an analog image signal of a color image obtained by imaging with a solid-state imaging device having a plurality of pixels arranged and corresponding color filters,
The signal generator is
Each color output from the interpolation processing unit has an interpolation processing unit for performing interpolation processing for creating pixel data of a color other than the color filter color of the pixel based on the digital image signal An image processing apparatus configured to output an image signal corresponding to a color of a filter to the signal generation unit as the digital image signal.
請求項13に記載の画像処理装置において、
前記信号生成部は、前記補間処理部の前段に設けられ、前記ディジタル画像信号に対するガンマ補正処理を施すガンマ補正部を有する画像処理装置。
The image processing apparatus according to claim 13.
The image processing apparatus includes a gamma correction unit that is provided before the interpolation processing unit and that performs gamma correction processing on the digital image signal.
請求項14に記載の画像処理装置において、
前記信号生成部は、前記ガンマ補正部の前段に設けられ、白色の撮像画像における、前記ディジタル画像信号を、該ディジタル画像信号に含まれる各カラーフィルタの色に対応する画像信号のレベルが等しくなるよう補正するホワイトバランス処理部を有する画像処理装置。
The image processing apparatus according to claim 14.
The signal generation unit is provided before the gamma correction unit, and the level of the image signal corresponding to the color of each color filter included in the digital image signal in the white captured image is equal to the digital image signal. An image processing apparatus having a white balance processing unit that corrects the image.
被写体の撮像を行う固体撮像素子を備えたディジタルスチルカメラであって、
該固体撮像素子の出力信号をサンプルホールドして、カラー撮像画像の信号成分を出力するサンプルホールド部と、
該信号成分をAD変換してディジタル画像信号を出力するADコンバータと、
該ディジタル画像信号を処理する請求項1記載の画像処理装置とを有するディジタルカメラ。
A digital still camera equipped with a solid-state imaging device for imaging a subject,
Sample and hold the output signal of the solid-state image sensor, and output a signal component of a color captured image; and
An AD converter that AD converts the signal component and outputs a digital image signal;
2. A digital camera having the image processing apparatus according to claim 1, which processes the digital image signal.
請求項16に記載のディジタルスチルカメラにおいて、
前記固体撮像素子は、CCD型イメージセンサであるディジタルスチルカメラ。
The digital still camera according to claim 16, wherein
The solid-state imaging device is a digital still camera which is a CCD image sensor.
請求項16に記載のディジタルスチルカメラにおいて、
前記固体撮像素子は、CMOS型イメージセンサであるディジタルスチルカメラ。
The digital still camera according to claim 16, wherein
The solid-state imaging device is a digital still camera which is a CMOS image sensor.
JP2009034598A 2009-02-17 2009-02-17 Image processing apparatus and digital still camera Withdrawn JP2010193112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009034598A JP2010193112A (en) 2009-02-17 2009-02-17 Image processing apparatus and digital still camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009034598A JP2010193112A (en) 2009-02-17 2009-02-17 Image processing apparatus and digital still camera

Publications (1)

Publication Number Publication Date
JP2010193112A true JP2010193112A (en) 2010-09-02

Family

ID=42818687

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009034598A Withdrawn JP2010193112A (en) 2009-02-17 2009-02-17 Image processing apparatus and digital still camera

Country Status (1)

Country Link
JP (1) JP2010193112A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560673B2 (en) 2018-06-20 2020-02-11 Samsung Electronics Co., Ltd. Method and apparatus for recovering image
CN116614611A (en) * 2023-05-15 2023-08-18 北京经纬恒润科技股份有限公司 Image high-resolution support method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560673B2 (en) 2018-06-20 2020-02-11 Samsung Electronics Co., Ltd. Method and apparatus for recovering image
CN116614611A (en) * 2023-05-15 2023-08-18 北京经纬恒润科技股份有限公司 Image high-resolution support method and device and electronic equipment

Similar Documents

Publication Publication Date Title
KR101099401B1 (en) Image processing apparatus and computer-readable medium
US8310562B2 (en) Imaging control apparatus, imaging apparatus and imaging control method for compressing the dynamic range of image data
JP4487640B2 (en) Imaging device
US7102669B2 (en) Digital color image pre-processing
CN101322416B (en) Image signal processing device and image signal processing method
US10560670B2 (en) Imaging apparatus and imaging control method
US20100177203A1 (en) Apparatus and method for local contrast enhanced tone mapping
CN102170530B (en) Signal processing device and method, solid image capture device and electronic information device
US7889272B2 (en) Imaging apparatus, high frequency component detection circuit, high frequency component detection method and computer program product
JP2002010108A (en) Device and method for processing image signal
US20090245632A1 (en) Method and apparatus for image signal color correction with reduced noise
JP5701640B2 (en) Image processing device
CN105993170A (en) Image processing device, image capturing device, image processing method, and image processing program
US9019406B2 (en) Imaging apparatus and image processing program for correcting dark area gradation
JP6243629B2 (en) Image processing apparatus and method, and imaging apparatus
JP2017102393A (en) Imaging device
JP2010193112A (en) Image processing apparatus and digital still camera
JP2018022951A (en) Image processing apparatus and black-and-white image processing apparatus
JP4028395B2 (en) Digital camera
JP2004215063A (en) Photographing device and outline correction method
JP2006333113A (en) Imaging device
US7512266B2 (en) Method and device for luminance correction
JP3540567B2 (en) Electronic imaging device
JP4833669B2 (en) Imaging apparatus and signal processing method thereof
JP2009206801A (en) Imaging system and adjustment method thereof

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120501