JP4868040B2 - Image processing apparatus, electronic camera, and image processing program - Google Patents
Image processing apparatus, electronic camera, and image processing program Download PDFInfo
- Publication number
- JP4868040B2 JP4868040B2 JP2009190889A JP2009190889A JP4868040B2 JP 4868040 B2 JP4868040 B2 JP 4868040B2 JP 2009190889 A JP2009190889 A JP 2009190889A JP 2009190889 A JP2009190889 A JP 2009190889A JP 4868040 B2 JP4868040 B2 JP 4868040B2
- Authority
- JP
- Japan
- Prior art keywords
- image data
- gradation
- image
- image processing
- correction
- 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.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims description 84
- 238000006243 chemical reaction Methods 0.000 claims description 54
- 238000012937 correction Methods 0.000 claims description 33
- 238000003384 imaging method Methods 0.000 claims description 13
- 238000000034 method Methods 0.000 description 40
- 230000008569 process Effects 0.000 description 35
- 238000007906 compression Methods 0.000 description 29
- 230000006835 compression Effects 0.000 description 20
- 230000014509 gene expression Effects 0.000 description 13
- 230000008859 change Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000006837 decompression Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000009792 diffusion process Methods 0.000 description 2
- 210000003127 knee Anatomy 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000004907 flux Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 230000011514 reflex Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Description
本発明は、画像処理装置、電子カメラ、および画像処理プログラムに関する。 The present invention relates to an image processing device, an electronic camera, and an image processing program.
従来、輝度差の大きな被写体を撮影することにより、画像データの暗部階調が暗く潰れるという現象が知られている。そこで、特許文献1の発明では、暗部階調のゲインを上げることで階調を圧縮し、暗部階調の黒つぶれを改善している。
2. Description of the Related Art Conventionally, a phenomenon is known in which a dark portion gradation of image data is darkened by photographing a subject having a large luminance difference. Therefore, in the invention of
ところで、上述した暗部階調の圧縮の前には、一般的な階調変換処理が行われている。この階調変換処理においては、出力先のガンマに基づく入出力特性に加えて、いわゆるS字型の入出力特性を有する階調カーブが用いられている。S字型の入出力特性は、暗部の黒色表現を引き締め、コントラストを向上させることにより、画像の見栄えを良くする効果がある。 By the way, a general gradation conversion process is performed before the above-described compression of the dark area gradation. In this gradation conversion processing, a gradation curve having a so-called S-shaped input / output characteristic in addition to the input / output characteristic based on the output destination gamma is used. The S-shaped input / output characteristic has the effect of improving the appearance of the image by tightening the black expression in the dark portion and improving the contrast.
しかし、このようなS字型の入出力特性に起因して、暗部と中間調とでRGBの比率が変化する。そのため、暗部における色相、彩度、コントラストが中間調における色相、彩度、コントラストと異なる画像となってしまう場合がある。通常は、画像が暗いため、このような問題はそれほど目立つものではないが、上述した暗部階調の圧縮を行うと、暗部が通常の明るさとなるため、色相、彩度、コントラストが変化してしまう問題が顕在化する。 However, due to such S-shaped input / output characteristics, the RGB ratio changes between the dark portion and the halftone. Therefore, the hue, saturation, and contrast in the dark part may be different from the hue, saturation, and contrast in the halftone. Normally, this problem is not so noticeable because the image is dark, but when the above-described compression of the dark area gradation is performed, the dark area becomes normal brightness, so the hue, saturation, and contrast change. The problem that becomes.
本発明は、上記問題に鑑みてなされたものであり、階調圧縮時に色相回転、彩度変化、コントラスト変化が発生するのを抑えることを目的とする。 The present invention has been made in view of the above problem, and an object thereof is to suppress occurrence of hue rotation, saturation change, and contrast change during gradation compression.
本発明の電子カメラは、被写体像を撮像して画像データを生成する撮像部と、前記撮像部から前記画像データを取得する取得部と、前記画像データの暗部階調の明度を向上する補正のための演算を行う演算部と、前記補正を行う前に、前記画像データに対して、y=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施す第1画像処理部と、前記取得部により取得した前記画像データに基づくR画像データ、G画像データ、B画像データのそれぞれについて、前記演算部による演算結果に基づいて、前記第1画像処理部により画像処理が施された画像データの暗部階調の明度を向上する補正を行う補正部と、前記補正を行った後に、前記補正部により補正が行われた画像データに対して、前記第1画像処理部における前記階調カーブとは異なる階調カーブによって定義されるS字型の入出力特性にしたがった階調変換処理を施す第2画像処理部とを備える。 An electronic camera according to the present invention includes an imaging unit that captures an image of a subject to generate image data, an acquisition unit that acquires the image data from the imaging unit, and correction that improves the brightness of the dark portion gradation of the image data. And a gradation curve composed only of a power component represented by y = x n (where x is an input and y is an output) with respect to the image data before performing the correction. A first image processing unit that performs image processing including gradation conversion processing according to the input / output characteristics defined by the image data, and R image data, G image data, and B image data based on the image data acquired by the acquisition unit for each, based on the calculation result by the arithmetic unit, and a correcting unit performing the correction to improve the lightness of the dark area gradation of the image data subjected to image processing by the first image processing section, after the correction Wherein the image data correction is performed by the correction unit, the gradation conversion processing according to the input and output characteristics of the S-shaped as defined by a different tone curve and the gradation curve in the first image processing unit A second image processing unit.
本発明の画像処理装置は、画像データを取得する取得部と、前記画像データの暗部階調の明度を向上する補正のための演算を行う演算部と、前記補正を行う前に、前記画像データに対して、少なくとも中間調以下はy=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施す第1画像処理部と、前記取得部により取得した前記画像データに基づくR画像データ、G画像データ、B画像データのそれぞれについて、前記演算部による演算結果に基づいて、前記第1画像処理部により画像処理が施された画像データの暗部階調の明度を向上する補正を行う補正部と、前記補正を行った後に、前記補正部により補正が行われた画像データに対して、前記第1画像処理部における前記階調カーブとは異なる階調カーブによって定義されるS字型の入出力特性にしたがった階調変換処理を施す第2画像処理部とを備える。 An image processing apparatus according to the present invention includes an acquisition unit that acquires image data, a calculation unit that performs a calculation for improving the brightness of a dark portion gradation of the image data, and the image data before performing the correction. On the other hand, gradation conversion processing according to input / output characteristics defined by a gradation curve consisting of only a power component represented by y = x n (where x is an input and y is an output) at least halftones For each of R image data, G image data, and B image data based on the image data acquired by the acquisition unit and a first image processing unit that performs image processing including: after a correction unit that performs correction of improving lightness of the dark area gradation of the image data subjected to image processing, that the correction was carried out by the first image processing section, the image data by the correction unit corrects been performed Against it, and a second image processing unit for performing the gradation conversion processing according to the input and output characteristics of the S-shaped as defined by a different tone curve from the tone curve in the first image processing unit.
また、上記発明に関する構成を、処理対象の画像データに対する画像処理をコンピュータで実現するための画像処理プログラムに変換して表現したものも本発明の具体的態様として有効である。 In addition, a configuration obtained by converting the configuration related to the above invention into an image processing program for realizing image processing on image data to be processed by a computer is also effective as a specific aspect of the present invention.
本発明によれば、階調圧縮時に色相回転、彩度変化、コントラスト変化が発生するのを抑えることができる。 According to the present invention, it is possible to suppress occurrence of hue rotation, saturation change, and contrast change during gradation compression.
<第1実施形態>
以下、図面を用いて本発明の第1実施形態について説明する。以下の第1実施形態では、本発明の電子カメラの一例として、一眼レフタイプの電子カメラを用いて説明する。
<First Embodiment>
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. In the following first embodiment, a single lens reflex type electronic camera will be described as an example of the electronic camera of the present invention.
図1は、第1実施形態の電子カメラ1の構成を示す図である。図1に示すように、電子カメラ1は、撮影レンズ2、絞り3、クイックリターンミラー4、サブミラー5、拡散スクリーン6、コンデンサレンズ7、ペンタプリズム8、ビームスプリッタ9、接眼レンズ10、結像レンズ11、測光センサ12、シャッタ13、撮像素子14、焦点検出部15の各部を備える。
FIG. 1 is a diagram illustrating a configuration of an
撮像素子14は、例えばCCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)などの半導体デバイスである。焦点検出部15は、例えば、位相差方式の焦点検出を行い、撮影レンズ2の焦点状態を検出する。
The
また、電子カメラ1は、撮像により生成された画像などを表示する液晶モニタなどのモニタ16、各部を制御する制御部17をさらに備える。制御部17は、内部に不図示のメモリを備え、各部を制御するためのプログラムを予め記録する。
The
非撮影時、すなわち撮影を行わない場合には、クイックリターンミラー4は、図1に示すように、45°の角度に配置される。そして、撮影レンズ2および絞り3を通過した光束は、クイックリターンミラー4で反射され、拡散スクリーン6、コンデンサレンズ7、ペンタプリズム8、ビームスプリッタ9を介して接眼レンズ10に導かれる。ユーザは、接眼レンズ10を介して被写体の像を目視することにより構図確認を行う。一方、ビームスプリッタ9により、上方に分割された光束は、結像レンズ11を介して測光センサ12の撮像面上に再結像される。また、クイックリターンミラー4を透過した光束は、サブミラー5を介して焦点検出部15に導かれる。
When not photographing, that is, when photographing is not performed, the
一方、撮影時には、クイックリターンミラー4が、破線で示す位置に退避してシャッタ13が開放し、撮影レンズ2からの光束は撮像素子14に導かれる。
On the other hand, at the time of photographing, the
図2は、第1実施形態の電子カメラ1の機能ブロック図である。図2に示すように、電子カメラ1は、図1の構成に加えて、タイミングジェネレータ20、信号処理部21、A/D変換部22、バッファメモリ23、バス24、カードインターフェース25、圧縮伸長部26、画像表示部27の各部を備える。タイミングジェネレータ20は、撮像素子14に出力パルスを供給する。また、撮像素子14で生成される画像データは、信号処理部21(撮像感度に対応するゲイン調整部を含む)およびA/D変換部22を介して、バッファメモリ23に一時記憶される。バッファメモリ23は、バス24に接続される。このバス24には、カードインターフェース25、図1で説明した制御部17、圧縮伸張部26、および画像表示部27が接続される。カードインターフェース25は、着脱自在なメモリカード28と接続し、メモリカード28に画像データを記録する。また、制御部17には、電子カメラ1のスイッチ群29(不図示のレリーズ釦などを含む)、タイミングジェネレータ20、および測光センサ12が接続される。さらに、画像表示部27は、電子カメラ1の背面に設けられたモニタ16に画像などを表示する。
FIG. 2 is a functional block diagram of the
以上説明した構成の電子カメラ1における撮影時の動作について、図3に示すフローチャートを用いて説明する。
An operation at the time of shooting in the
ステップS1において、制御部17は、ユーザによりスイッチ群29を介して撮影開始が指示されたか否かを判定する。そして、制御部17は、撮影開始が指示されたと判定するとステップS2に進む。
In step S <b> 1, the
ステップS2において、制御部17は、各部を制御し、撮像素子14により被写体像を撮像し、画像データを生成する。撮像素子14により生成された画像データは、信号処理部21およびA/D変換部22を介して、バッファメモリ23に一時記憶される。
In step S <b> 2, the
ステップS3において、制御部17は、バッファメモリ23から画像データを読み出し、通常の画像処理を行う。通常の画像処理とは、ホワイトバランス調整、補間処理、色調補正処理などである。各処理の具体的な方法は公知技術と同様であるため説明を省略する。
In step S3, the
ステップS4において、制御部17は、ステップS3で画像処理を施した画像データに色空間変換処理を行う。色空間変換処理は、以下の式1から式3により行われる。
In step S4, the
Rm[x,y]=mx11・Ri[x,y]+mx12・Gi[x,y]+mx13・Bi[x,y]・・・(式1)
Gm[x,y]=mx21・Ri[x,y]+mx22・Gi[x,y]+mx23・Bi[x,y]・・・(式2)
Bm[x,y]=mx31・Ri[x,y]+mx32・Gi[x,y]+mx33・Bi[x,y]・・・(式3)
なお、式1から式3中のRi[x,y],Gi[x,y],Bi[x,y]は、それぞれRGB画像の画像データを示し、mx11〜mx33は、それぞれ所定の係数である。
Rm [x, y] = mx11 · Ri [x, y] + mx12 · Gi [x, y] + mx13 · Bi [x, y] (Formula 1)
Gm [x, y] = mx21 · Ri [x, y] + mx22 · Gi [x, y] + mx23 · Bi [x, y] (Formula 2)
Bm [x, y] = mx31 · Ri [x, y] + mx32 · Gi [x, y] + mx33 · Bi [x, y] (Formula 3)
Note that Ri [x, y], Gi [x, y], and Bi [x, y] in
ステップS5において、制御部17は、ステップS4で色空間変換処理を施した画像データに第1階調変換処理を行う。第1階調変換処理は、以下の式4から式6により行われる。
In step S5, the
Rg[x,y]=Gm1[Rm[x,y]] ・・・(式4)
Gg[x,y]=Gm1[Gm[x,y]] ・・・(式5)
Bg[x,y]=Gm1[Bm[x,y]] ・・・(式6)
なお、式4から式6中のGm1は、例えば、図4に示す階調カーブに相当する。階調カーブGm1は、図4に示すように、ほぼ1/2.2乗の階調カーブである。また、図4中の階調カーブGhは、従来の階調変換処理で、一般的に用いられていた階調カーブ(出力先のガンマに基づく入出力特性に加えて、S字型の入出力特性を有する階調カーブ)の一例である。
Rg [x, y] = Gm1 [Rm [x, y]] (Formula 4)
Gg [x, y] = Gm1 [Gm [x, y]] (Formula 5)
Bg [x, y] = Gm1 [Bm [x, y]] (Formula 6)
Note that Gm1 in
ステップS6において、制御部17は、ステップS5で第1階調変換処理を施した画像データに階調圧縮処理を施す。
In step S6, the
制御部17は、まず、ステップS5で第1階調変換処理を施した画像データに対してローパス演算を行う。ローパス演算は、以下の式7から式8により行われる。
First, the
Y[x,y]=kr・Rg[x,y]+kg・Gg[x,y]+kb・Bg[x,y]・・・(式7) Y [x, y] = kr · Rg [x, y] + kg · Gg [x, y] + kb · Bg [x, y] (Equation 7)
なお、式7中のkr,kg,kbは、所定の係数である。式7により、sRGB画像からYCbCr画像のうち、Y画像が求められる。また、式8中のLpwは、注目画素周りのローパスフィルタであり、このローパスフィルタは、図5に示す特性を有する。そして、式8により、Y画像からローパス画像であるLY画像の画像データが生成される。なお、ローパス画像は、ボケ画像の一例であり、他のローパスフィルタを用いてローパス画像を生成しても良いし、ローパス処理以外の手法を用いてボケ画像を生成しても良い。 In Equation 7, kr, kg, and kb are predetermined coefficients. From the sRGB image, the Y image among the YCbCr images is obtained by Expression 7. Further, Lpw in Expression 8 is a low-pass filter around the target pixel, and this low-pass filter has the characteristics shown in FIG. Then, according to Expression 8, image data of an LY image that is a low-pass image is generated from the Y image. The low-pass image is an example of a blurred image, and the low-pass image may be generated using another low-pass filter, or the blurred image may be generated using a method other than the low-pass processing.
次に、制御部17は、階調圧縮処理を施す。階調圧縮処理は、以下の式9から式11により行われる。
Next, the
Rc[x,y]=Rg[x,y]・fg(LY[x,y])・・・(式9)
Gc[x,y]=Gg[x,y]・fg(LY[x,y])・・・(式10)
Bc[x,y]=Bg[x,y]・fg(LY[x,y])・・・(式11)
なお、式9から式11中のfgは階調圧縮のパラメータである。図6は、階調圧縮のパラメータfgを示す図である。パラメータfgは、図6に示すように、LY画像の画像データに応じたゲインを有する。そして、LY画像の画像データが小さいほど(処理画素を含む近傍範囲が暗いほど)、パラメータfgは大きくなる。逆に、LY画像の画像データが大きいほど(処理画素を含む近傍範囲が明るいほど)、パラメータfgは1に近づく。
Rc [x, y] = Rg [x, y] · fg (LY [x, y]) (Equation 9)
Gc [x, y] = Gg [x, y] · fg (LY [x, y]) (Equation 10)
Bc [x, y] = Bg [x, y] · fg (LY [x, y]) (Equation 11)
Note that fg in Equation 9 to
ステップS7において、制御部17は、ステップS6で階調圧縮処理を施した画像データに第2階調変換処理を行う。第2階調変換処理は、以下の式12から式14により行われる。
In step S7, the
Ro[x,y]=Gm2[Rc[x,y]] ・・・(式12)
Go[x,y]=Gm2[Gc[x,y]] ・・・(式13)
Bo[x,y]=Gm2[Bc[x,y]] ・・・(式14)
なお、式12から式14中のGm2は、例えば、図7に示す階調カーブに相当する。階調カーブGm2は、図7に示すように、S字型の階調カーブである。このような階調カーブを用いて階調変換処理を行うことにより、最終的な画像の見栄えを向上させることができる。また、図7中の階調カーブGhは、従来の階調変換処理で、一般的に用いられていた階調カーブ(出力先のガンマに基づく入出力特性に加えて、S字型の入出力特性を有する階調カーブ)の一例である。
Ro [x, y] = Gm2 [Rc [x, y]] (12)
Go [x, y] = Gm2 [Gc [x, y]] (Equation 13)
Bo [x, y] = Gm2 [Bc [x, y]] (Formula 14)
Note that Gm2 in
ステップS8において、制御部17は、ステップS7で第2階調変換処理を施した画像データを、カードインターフェース25を介してメモリカード28に記録し、一連の処理を終了する。なお、画像データをメモリカード28に記録する前に、圧縮伸長部26を介して、必要に応じて画像圧縮処理(JPEG圧縮処理など)を施しても良い。
In step S8, the
以上説明したように、第1実施形態によれば、画像データに対して、y=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施し、次に、1回目の画像処理が施された画像データの暗部階調の明度を向上する補正し、最後に、補正が行われた画像データに対して、1回目の階調変換処理における記階調カーブとは異なる階調カーブによって定義される入出力特性にしたがった2回目の階調変換処理を施す。従来、いわゆるS字型の階調カーブなどを用いた階調変換処理後に暗部階調の明度を向上する補正を行っていた場合には、S字の階調カーブに起因して、局所的に色相回転、彩度変化、コントラスト変化が発生するという問題があったが、第1実施形態によれば、階調圧縮時にこのような色相回転、彩度変化、コントラスト変化が発生するのを抑えることができる。 As described above, according to the first embodiment, the image data is defined by a gradation curve composed of only a power component represented by y = x n (where x is an input and y is an output). The image processing including gradation conversion processing according to the input / output characteristics is performed, and then the correction is performed to improve the lightness of the dark portion gradation of the image data subjected to the first image processing, and finally the correction is performed. The second tone conversion process is performed on the broken image data according to the input / output characteristics defined by the tone curve different from the tone curve in the first tone conversion process. Conventionally, when correction for improving the brightness of the dark portion gradation is performed after the gradation conversion processing using a so-called S-shaped gradation curve or the like, locally due to the S-shaped gradation curve, Although there has been a problem that hue rotation, saturation change, and contrast change occur, according to the first embodiment, it is possible to suppress such hue rotation, saturation change, and contrast change during gradation compression. Can do.
<第2実施形態>
以下、図面を用いて本発明の第2実施形態について説明する。第2実施形態は、第1実施形態の変形例である。そのため、以下では、第1実施形態と異なる部分についてのみ説明する。また、第1実施形態と同様の部分については、第1実施形態と同様の符号を用いて説明する。
<Second Embodiment>
The second embodiment of the present invention will be described below with reference to the drawings. The second embodiment is a modification of the first embodiment. Therefore, below, only a different part from 1st Embodiment is demonstrated. The same parts as those in the first embodiment will be described using the same reference numerals as those in the first embodiment.
第2実施形態は、階調圧縮処理を行う前にRGB画像をYCbCr画像に変換し、YCbCr画像に対して階調圧縮処理を行う実施例である。 The second embodiment is an example in which an RGB image is converted into a YCbCr image before gradation compression processing, and gradation compression processing is performed on the YCbCr image.
YCbCr画像に対して階調圧縮処理を行う場合の撮影時の動作について、図8に示すフローチャートを用いて説明する。 The operation at the time of photographing when the gradation compression process is performed on the YCbCr image will be described with reference to the flowchart shown in FIG.
ステップS11からステップS15において、制御部17は、第1実施形態の図3のステップS1からステップS5と同様の処理を行う。
In step S11 to step S15, the
ステップS16において、制御部17は、ステップS15で第1階調変換処理を施した画像データのYCbCrへの色空間変換処理を行う。YCbCrへの色空間変換処理は、以下の式15から式17により行われる。
In step S <b> 16, the
Y[x,y]=my11・Rg[x,y]+my12・Gg[x,y]+my13・Bg[x,y]・・・(式15)
Cb[x,y]=my21・Rg[x,y]+my22・Gg[x,y]+my23・Bg[x,y]・・・(式16)
Cr[x,y]=my31・Rg[x,y]+my32・Gg[x,y]+my33・Bg[x,y]・・・(式17)
なお、式15から式17中のmy11〜my33は、それぞれ所定の係数である。式15から式17により、sRGB画像がYCbCr画像に変換される。
Y [x, y] = my11 · Rg [x, y] + my12 · Gg [x, y] + my13 · Bg [x, y] (Formula 15)
Cb [x, y] = my21 · Rg [x, y] + my22 · Gg [x, y] + my23 · Bg [x, y] (Formula 16)
Cr [x, y] = my31 · Rg [x, y] + my32 · Gg [x, y] + my33 · Bg [x, y] (Expression 17)
Note that my11 to my33 in
ステップS17において、制御部17は、ステップS16で色空間変換処理を行った画像データに階調圧縮処理を施す。
In step S17, the
制御部17は、まず、ステップS16で色空間変換処理を行った画像データに対してローパス演算を行う。ローパス演算は、以下の式18により行われる。
First, the
なお、式18により、YCbCr画像のうち、Y画像からローパス画像であるLY画像の画像データが生成される。また、式18中のLpwは、第1実施形態の図3のステップS6で説明したものと同様のローパスフィルタである。なお、ローパス画像は、ボケ画像の一例であり、他のローパスフィルタを用いてローパス画像を生成しても良いし、ローパス処理以外の手法を用いてボケ画像を生成しても良い。 Note that, according to Expression 18, image data of a LY image that is a low-pass image is generated from a Y image among YCbCr images. Lpw in Expression 18 is a low-pass filter similar to that described in step S6 of FIG. 3 of the first embodiment. The low-pass image is an example of a blurred image, and the low-pass image may be generated using another low-pass filter, or the blurred image may be generated using a method other than the low-pass processing.
次に、制御部17は、階調圧縮処理を施す。階調圧縮処理は、以下の式19から式21により行われる。
Next, the
Yc[x,y]=Y[x,y]・fg(LY[x,y])・・・(式19)
Cbo[x,y]=Cb[x,y]・fg(LY[x,y])・・・(式20)
Cro[x,y]=Cr[x,y]・fg(LY[x,y])・・・(式21)
なお、式19から式21中のfgは、第1実施形態の図3のステップS6で説明したものと同様の階調圧縮のパラメータである。
Yc [x, y] = Y [x, y] · fg (LY [x, y]) (Equation 19)
Cbo [x, y] = Cb [x, y] · fg (LY [x, y]) (Equation 20)
Cro [x, y] = Cr [x, y] · fg (LY [x, y]) (Formula 21)
Note that fg in
ステップS18において、制御部17は、ステップS17で階調圧縮処理を施した画像データのうち、輝度を示すY画像の画像データに第2階調変換処理を行う。第2階調変換処理は、以下の式22により行われる。
In step S18, the
Yo[x,y]=Gm2[Yc[x,y]] ・・・(式22)
なお、式22中のGm2は、第1実施形態の図3のステップS7で説明したものと同様の階調カーブに相当する。
Yo [x, y] = Gm2 [Yc [x, y]] (Equation 22)
Note that Gm2 in
ステップS19において、制御部17は、ステップS18で第2階調変換処理を施した画像データを、カードインターフェース25を介してメモリカード28に記録し、一連の処理を終了する。なお、画像データをメモリカード28に記録する前に、圧縮伸長部26を介して、必要に応じて画像圧縮処理(JPEG圧縮処理など)を施しても良い。
In step S19, the
以上説明したように、第2実施形態によれば、輝度画像データであるY画像データのみについて、2回目の階調変換処理を施す。したがって、第1実施形態よりも演算負荷を軽減しつつ、第1実施形態と同様の効果を得ることができる。 As described above, according to the second embodiment, the second gradation conversion process is performed only on the Y image data that is the luminance image data. Therefore, the same effect as that of the first embodiment can be obtained while reducing the calculation load as compared with the first embodiment.
なお、第1実施形態および第2実施形態では、階調変換処理において、図4に示した階調カーブGm1を用いて階調変換処理を行う例を示した(図3ステップS5および図7ステップS15)。しかし、本発明はこの例に限定されない。y=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブであれば、図4に示した階調カーブGm1以外の階調カーブを用いても本発明と同様の効果を得ることができる。図4では、sRGB色空間におけるモニタガンマに基づく、ほぼ1/2.2乗の階調カーブである階調カーブGm1を例示したが、例えば、1/2乗の階調カーブであっても良い。 In the first embodiment and the second embodiment, an example is shown in which the gradation conversion processing is performed using the gradation curve Gm1 shown in FIG. 4 in the gradation conversion processing (steps S5 and FIG. 7 in FIG. 3). S15). However, the present invention is not limited to this example. If the tone curve is composed only of a power component expressed by y = x n (where x is an input and y is an output), the tone curve other than the tone curve Gm1 shown in FIG. The same effect as the invention can be obtained. Although FIG. 4 illustrates the gradation curve Gm1 that is a gradation curve of approximately 1 / 2.2 based on the monitor gamma in the sRGB color space, for example, a gradation curve of 1/2 power may be used. .
<第3実施形態>
以下、図面を用いて本発明の第3実施形態について説明する。第3実施形態は、第1実施形態の変形例である。そのため、以下では、第1実施形態と異なる部分についてのみ説明する。また、第1実施形態と同様の部分については、第1実施形態と同様の符号を用いて説明する。
<Third Embodiment>
The third embodiment of the present invention will be described below with reference to the drawings. The third embodiment is a modification of the first embodiment. Therefore, below, only a different part from 1st Embodiment is demonstrated. The same parts as those in the first embodiment will be described using the same reference numerals as those in the first embodiment.
第3実施形態では、第1実施形態で説明した階調カーブGm1に代えて、図9に示す階調カーブGm3を用い、第1実施形態で説明した階調カーブGm2に代えて、図10に示す階調カーブGm4を用いる。 In the third embodiment, instead of the gradation curve Gm1 described in the first embodiment, the gradation curve Gm3 shown in FIG. 9 is used, and instead of the gradation curve Gm2 described in the first embodiment, FIG. The gradation curve Gm4 shown is used.
すなわち、図3ステップS5で説明した第1階調変換処理において、制御部17は、図9に示す階調カーブGm3を用いて階調変換処理を行う。階調カーブGm3は、図9に示すように、暗部から中間調のみが、ほぼ1/2.2乗で、明部(ハイライト側)には階調カーブGm1と比較して、同じレベルの入力に対して低い出力レベルを実現する特性(ニー特性)を有する階調カーブである。これは、第1階調変換処理に起因する暗部階調の明度向上を、暗部から中間調のみにおいて行うためである。この結果、明部においては、第1階調変換処理に起因して唐突な白飛びが発生するのを抑えることにより、変化を小さくすることができる。なお、図9に示す階調カーブGm3において、ほぼ1/2.2乗の特性を有するのは、例えば、暗部の5%から20%程度である。
That is, in the first gradation conversion process described in step S5 of FIG. 3, the
また、図3ステップS7で説明した第2階調変換処理において、制御部17は、図10に示す階調カーブGm4を用いて階調変換処理を行う。階調カーブGm4は、図10に示すように、明部(ハイライト側)におけるニー特性を、階調カーブGm2よりも弱めた特性を有する。
以上説明したように、第3実施形態によれば、画像データに対して、少なくとも中間調以下はy=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施し、次に、1回目の画像処理が施された画像データの暗部階調の明度を向上する補正し、最後に、補正が行われた画像データに対して、1回目の階調変換処理における記階調カーブとは異なる階調カーブによって定義される入出力特性にしたがった2回目の階調変換処理を施す。したがって、第1実施形態と同様の効果を得ることができる。
In the second gradation conversion process described in step S7 of FIG. 3, the
As described above, according to the third embodiment, for image data, at least a halftone or less is a floor composed of only a power component represented by y = x n (where x is an input and y is an output). Apply image processing including gradation conversion processing according to the input / output characteristics defined by the tone curve, then correct to improve the lightness of the dark portion gradation of the image data subjected to the first image processing, and finally In addition, a second gradation conversion process is performed on the corrected image data in accordance with input / output characteristics defined by a gradation curve different from the gradation curve in the first gradation conversion process. . Therefore, the same effect as that of the first embodiment can be obtained.
なお、第3実施形態では、階調変換処理において、図9に示した階調カーブGm3を用いて階調変換処理を行う例を示した。しかし、本発明はこの例に限定されない。少なくとも中間調以下はy=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブであれば、図9に示した階調カーブGm3以外の階調カーブを用いても本発明と同様の効果を得ることができる。例えば、少なくとも中間調以下が1/2乗の階調カーブであっても良い。 In the third embodiment, an example in which the gradation conversion process is performed using the gradation curve Gm3 illustrated in FIG. 9 in the gradation conversion process has been described. However, the present invention is not limited to this example. A gradation curve other than the gradation curve Gm3 shown in FIG. 9 is used as long as it is a gradation curve consisting only of a power component expressed by y = x n (where x is an input and y is an output) at least halftones. Even if is used, the same effect as the present invention can be obtained. For example, the gradation curve may be a half power of at least halftone.
また、上述した各実施形態では、本発明の技術を電子カメラ1において実現する例について説明した。しかしながら、本発明はこれに限定されるものではない。例えば、コンパクトタイプの電子カメラや動画撮影を行うムービーカメラなどにも本発明を同様に適用することができる。
Further, in each of the above-described embodiments, the example in which the technique of the present invention is realized in the
また、コンピュータと画像処理プログラムとにより、上記各実施形態で説明した画像処理装置をソフトウェア的に実現しても良い。この場合、図3のフローチャートで説明したステップS3以降の処理の一部または全部をコンピュータで実現する構成とすれば良い。または、図8のフローチャートで説明したステップS13以降の処理の一部または全部をコンピュータで実現する構成とすれば良い。コンピュータで実現するためには、画像データとともに、階調圧縮モードであるか否かの情報などをコンピュータに供給すれば良い。このような情報は画像データのEXIF情報などを利用して供給することができる。さらに、第3実施形態で説明した処理についても同様である。このような構成とすることにより、本実施形態と同様の処理を実施することが可能になる。 Further, the image processing apparatus described in each of the above embodiments may be realized by software using a computer and an image processing program. In this case, what is necessary is just to make it the structure which implement | achieves part or all of the process after step S3 demonstrated with the flowchart of FIG. 3 with a computer. Or what is necessary is just to set it as the structure which implement | achieves a part or all of the process after step S13 demonstrated with the flowchart of FIG. 8 with a computer. In order to be realized by a computer, information such as whether or not the image is in the gradation compression mode may be supplied to the computer together with the image data. Such information can be supplied using the EXIF information of the image data. The same applies to the processing described in the third embodiment. By adopting such a configuration, it is possible to perform the same processing as in the present embodiment.
なお、本発明は、その精神または主要な特徴から逸脱することなく、他のいろいろな形で実施することができる。そのため、前述の実施例はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明の範囲は、特許請求の範囲によって示すものであって、明細書本文には、なんら拘束されない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、すべて本発明の範囲内のものである。 The present invention can be implemented in various other forms without departing from the spirit or main features thereof. For this reason, the above-described embodiments are merely examples in all respects and should not be interpreted in a limited manner. The scope of the present invention is indicated by the scope of claims, and is not restricted by the text of the specification. Further, all modifications and changes belonging to the equivalent scope of the claims are within the scope of the present invention.
1…電子カメラ,2…撮影レンズ,14…撮像素子,17…制御部
DESCRIPTION OF
Claims (3)
前記撮像部から前記画像データを取得する取得部と、
前記画像データの暗部階調の明度を向上する補正のための演算を行う演算部と、
前記補正を行う前に、前記画像データに対して、y=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施す第1画像処理部と、
前記取得部により取得した前記画像データに基づくR画像データ、G画像データ、B画像データのそれぞれについて、前記演算部による演算結果に基づいて、前記第1画像処理部により画像処理が施された画像データの暗部階調の明度を向上する補正を行う補正部と、
前記補正を行った後に、前記補正部により補正が行われた画像データに対して、前記第1画像処理部における前記階調カーブとは異なる階調カーブによって定義されるS字型の入出力特性にしたがった階調変換処理を施す第2画像処理部と
を備えたことを特徴とする電子カメラ。 An imaging unit that captures a subject image and generates image data;
An acquisition unit for acquiring the image data from the imaging unit ;
A calculation unit that performs calculation for correction to improve the brightness of the dark portion gradation of the image data;
Before performing the correction, the image data is subjected to input / output characteristics defined by a gradation curve composed of only a power component represented by y = x n (where x is an input and y is an output). A first image processing unit that performs image processing including gradation conversion processing;
An image obtained by performing image processing on the R image data, G image data, and B image data based on the image data acquired by the acquisition unit based on a calculation result by the calculation unit by the first image processing unit. A correction unit for performing correction to improve the brightness of the dark portion gradation of the data;
An S-shaped input / output characteristic defined by a gradation curve different from the gradation curve in the first image processing unit for the image data corrected by the correction unit after performing the correction. An electronic camera comprising: a second image processing unit that performs gradation conversion processing according to the above.
前記画像データの暗部階調の明度を向上する補正のための演算を行う演算部と、
前記補正を行う前に、前記画像データに対して、少なくとも中間調以下はy=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施す第1画像処理部と、
前記取得部により取得した前記画像データに基づくR画像データ、G画像データ、B画像データのそれぞれについて、前記演算部による演算結果に基づいて、前記第1画像処理部により画像処理が施された画像データの暗部階調の明度を向上する補正を行う補正部と、
前記補正を行った後に、前記補正部により補正が行われた画像データに対して、前記第1画像処理部における前記階調カーブとは異なる階調カーブによって定義されるS字型の入出力特性にしたがった階調変換処理を施す第2画像処理部と
を備えたことを特徴とする画像処理装置。 An acquisition unit for acquiring image data;
A calculation unit that performs calculation for correction to improve the brightness of the dark portion gradation of the image data;
Before performing the correction, the image data is defined by a gradation curve consisting of only a power component represented by y = x n (where x is an input and y is an output) at least halftones. A first image processing unit that performs image processing including gradation conversion processing according to input / output characteristics;
An image obtained by performing image processing on the R image data, G image data, and B image data based on the image data acquired by the acquisition unit based on a calculation result by the calculation unit by the first image processing unit. A correction unit for performing correction to improve the brightness of the dark portion gradation of the data;
An S-shaped input / output characteristic defined by a gradation curve different from the gradation curve in the first image processing unit for the image data corrected by the correction unit after performing the correction. An image processing apparatus comprising: a second image processing unit that performs gradation conversion processing according to the above.
前記画像データを取得する取得ステップと、
前記画像データの暗部階調の明度を向上する補正のための演算を行う演算ステップと、
前記補正を行う前に、前記画像データに対して、y=xn(ただし、xは入力、yは出力)で表されるべき乗成分のみから成る階調カーブによって定義される入出力特性にしたがった階調変換処理を含む画像処理を施す第1画像処理ステップと、
前記取得ステップにおいて取得した前記画像データに基づくR画像データ、G画像データ、B画像データのそれぞれについて、前記演算ステップにおける演算結果に基づいて、前記第1画像処理ステップにおいて画像処理が施された画像データの暗部階調の明度を向上する補正を行う補正ステップと、
前記補正を行った後に、前記補正ステップにおいて補正が行われた画像データに対して、前記第1画像処理ステップにおける前記階調カーブとは異なる階調カーブによって定義されるS字型の入出力特性にしたがった階調変換処理を施す第2画像処理ステップと
をコンピュータで実現することを特徴とする画像処理プログラム。 An image processing program for realizing image processing on image data to be processed by a computer,
An acquisition step of acquiring the image data;
A calculation step for performing calculation for correction to improve the brightness of the dark portion gradation of the image data;
Before performing the correction, the image data is subjected to input / output characteristics defined by a gradation curve composed of only a power component represented by y = x n (where x is an input and y is an output). A first image processing step for performing image processing including gradation conversion processing;
For each of R image data, G image data, and B image data based on the image data acquired in the acquisition step, an image that has been subjected to image processing in the first image processing step based on a calculation result in the calculation step A correction step for performing correction to improve the brightness of the dark portion gradation of the data;
An S-shaped input / output characteristic defined by a gradation curve different from the gradation curve in the first image processing step for the image data corrected in the correction step after the correction is performed. And a second image processing step for performing gradation conversion processing according to the above.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009190889A JP4868040B2 (en) | 2009-08-20 | 2009-08-20 | Image processing apparatus, electronic camera, and image processing program |
US12/835,937 US8665351B2 (en) | 2009-07-23 | 2010-07-14 | Image processing device, electronic camera, and storage medium storing image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009190889A JP4868040B2 (en) | 2009-08-20 | 2009-08-20 | Image processing apparatus, electronic camera, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011044849A JP2011044849A (en) | 2011-03-03 |
JP4868040B2 true JP4868040B2 (en) | 2012-02-01 |
Family
ID=43831960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009190889A Expired - Fee Related JP4868040B2 (en) | 2009-07-23 | 2009-08-20 | Image processing apparatus, electronic camera, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4868040B2 (en) |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2663189B2 (en) * | 1990-01-29 | 1997-10-15 | 富士写真フイルム株式会社 | Image dynamic range compression processing method |
JP3888456B2 (en) * | 2002-09-10 | 2007-03-07 | ソニー株式会社 | Digital still camera |
JP2005252711A (en) * | 2004-03-04 | 2005-09-15 | Fuji Photo Film Co Ltd | Photographing system using digital still camera and photographing control method |
JP4622629B2 (en) * | 2005-03-31 | 2011-02-02 | 株式会社ニコン | Imaging device |
JP4240023B2 (en) * | 2005-08-31 | 2009-03-18 | ソニー株式会社 | Imaging apparatus, imaging method and imaging program, and image processing apparatus, image processing method and image processing program |
JP2008258828A (en) * | 2007-04-03 | 2008-10-23 | Nikon Corp | Imaging apparatus |
JP5076650B2 (en) * | 2007-06-01 | 2012-11-21 | 株式会社ニコン | Imaging apparatus and image processing program |
JP4973372B2 (en) * | 2007-08-06 | 2012-07-11 | 株式会社ニコン | Image processing apparatus, imaging apparatus, and image processing program |
JP5076716B2 (en) * | 2007-08-06 | 2012-11-21 | 株式会社ニコン | Imaging device |
-
2009
- 2009-08-20 JP JP2009190889A patent/JP4868040B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011044849A (en) | 2011-03-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101099401B1 (en) | Image processing apparatus and computer-readable medium | |
JP2001103366A (en) | Camera | |
JP5076650B2 (en) | Imaging apparatus and image processing program | |
JP2011228807A (en) | Image processing program, image processing apparatus, and image processing method | |
JP5589660B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
US8570407B2 (en) | Imaging apparatus, image processing program, image processing apparatus, and image processing method | |
US8102446B2 (en) | Image capturing system and image processing method for applying grayscale conversion to a video signal, and computer-readable recording medium having recorded thereon an image processing program for applying grayscale conversion to a video signal | |
JP2012095223A (en) | Imaging device, imaging method, and program | |
JP5284183B2 (en) | Image processing apparatus and method | |
JP4883057B2 (en) | Image processing program, image processing apparatus, and image processing method | |
JP4868040B2 (en) | Image processing apparatus, electronic camera, and image processing program | |
JP4941424B2 (en) | Imaging apparatus and image processing program | |
JP5561389B2 (en) | Image processing program, image processing apparatus, electronic camera, and image processing method | |
US8665351B2 (en) | Image processing device, electronic camera, and storage medium storing image processing program | |
JP5535443B2 (en) | Image processing device | |
JP4978669B2 (en) | Image processing apparatus, electronic camera, and image processing program | |
JP5217783B2 (en) | Imaging device | |
JP5307572B2 (en) | Imaging system, video signal processing program, and imaging method | |
US20120154617A1 (en) | Image capturing device | |
JP6247513B2 (en) | Imaging apparatus, control method, and program | |
CN116805990A (en) | Image processing apparatus, image capturing apparatus, image processing method, and storage medium | |
JP2012105354A (en) | Image processing apparatus, electronic camera, and image processing program | |
US8106977B2 (en) | Image capturing system and image processing method for applying grayscale conversion to a video signal, and computer-readable recording medium having recorded thereon an image processing program for applying grayscale conversion to a video signal | |
JP2010193112A (en) | Image processing apparatus and digital still camera | |
JP2010055187A (en) | Image processor, electronic camera, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110714 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110719 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110920 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20111018 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20111031 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4868040 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141125 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141125 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |