JP2013127804A - Image processing program, image processing device and image processing method - Google Patents
Image processing program, image processing device and image processing method Download PDFInfo
- Publication number
- JP2013127804A JP2013127804A JP2013015591A JP2013015591A JP2013127804A JP 2013127804 A JP2013127804 A JP 2013127804A JP 2013015591 A JP2013015591 A JP 2013015591A JP 2013015591 A JP2013015591 A JP 2013015591A JP 2013127804 A JP2013127804 A JP 2013127804A
- Authority
- JP
- Japan
- Prior art keywords
- gradation
- image data
- image
- correction
- curve
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims description 4
- 238000006243 chemical reaction Methods 0.000 claims abstract description 48
- 230000003313 weakening effect Effects 0.000 claims abstract description 10
- 238000000034 method Methods 0.000 claims description 27
- 230000003247 decreasing effect Effects 0.000 claims 3
- 230000007423 decrease Effects 0.000 claims 1
- 238000003384 imaging method Methods 0.000 description 10
- 238000007906 compression Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000002708 enhancing effect Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 230000006837 decompression Effects 0.000 description 3
- 238000009792 diffusion process Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 208000003443 Unconsciousness Diseases 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000004907 flux 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
- 229920006395 saturated elastomer Polymers 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Abstract
Description
本発明は、処理対象の画像データに画像処理を施す画像処理プログラム、画像処理装置、および画像処理方法に関する。 The present invention relates to an image processing program for performing image processing on image data to be processed, an image processing apparatus, and an image processing method.
電子カメラなどの撮像装置により生成した画像データを、CRTモニタやプリンタなどの出力機器に出力する場合、見ばえを良くするために、出力機器に対応した階調カーブを用いた階調変換処理が行われている。このような階調変換処理を行わないと、出力機器のフレアや、黒浮き、外光反射などにより見ばえがわるくなる。階調変換処理には、出力機器に対応した階調カーブに加えて、いわゆるS字型の階調カーブが用いられている。このS字型階調カーブによりコントラストを調整することで、出力機器においてメリハリのある出力画像が得られる(例えば、特許文献1参照)。 To output image data generated by an imaging device such as an electronic camera to an output device such as a CRT monitor or a printer, a gradation conversion process using a gradation curve corresponding to the output device in order to improve the appearance. Has been done. If such gradation conversion processing is not performed, it will be difficult to see due to flare of the output device, black float, external light reflection and the like. In the gradation conversion process, a so-called S-shaped gradation curve is used in addition to the gradation curve corresponding to the output device. By adjusting the contrast with this S-shaped gradation curve, a sharp output image can be obtained in the output device (see, for example, Patent Document 1).
また、見ばえをよくするために、メリハリを強める輪郭強調処理も行われている。輪郭強調処理には、高周波成分を元の画像データに加算することにより、輪郭を強調する方法や、いわゆる輪郭強調フィルタを用いて輪郭を強調する方法などがある(例えば、特許文献2参照)。 In addition, in order to improve the appearance, contour enhancement processing that enhances sharpness is also performed. The contour enhancement processing includes a method of enhancing a contour by adding a high-frequency component to original image data, a method of enhancing a contour using a so-called contour enhancement filter, and the like (for example, see Patent Document 2).
上述した特許文献1の階調変換処理では、コントラストを強調することが可能である一方、明部階調のコントラストが低下する場合や、暗部階調が暗く潰れてしまう場合があった。また、R,G,B値のそれぞれに対してS字型のカーブを用いた階調変換処理を行うと、明部階調、中間部階調、暗部階調のそれぞれの色相や彩度が変化してしまうという問題があった。
In the above-described tone conversion process of
さらに、上述した特許文献2の輪郭強調処理では、大きな半径で輪郭強調処理を行うと、彩度の変化が目立ったり、明部階調が白とびしやすくなったりするという問題があった。
Furthermore, in the above-described contour emphasis processing of
本発明は、上記問題に鑑みてなされたものであり、見た目のコントラストを維持するとともに、色相および彩度の変化を抑えつつ、明部階調および暗部階調を改善することが可能な画像処理を行うことを目的とする。 The present invention has been made in view of the above problems, and is capable of improving bright part gradation and dark part gradation while maintaining the apparent contrast and suppressing changes in hue and saturation. The purpose is to do.
本発明の画像処理プログラムは、処理対象の画像データに対する画像処理をコンピュータで実現するための画像処理プログラムであって、前記画像データを取得する取得ステップと、階調の中間部において、前記コントラストを弱める特性を加味した特性を有する階調カーブによって定義される入出力特性にしたがって、前記画像データに対する階調変換処理を行う階調変換処理ステップと、前記階調変換処理が施された前記画像データに対して、画像の局所におけるコントラストを示す局所的コントラストを強調する補正を、処理対象の画素の輝度情報に応じて強調度合が変化するゲインカーブを用いて行う補正ステップとを有し、前記補正ステップでは、注目画素が周囲の画素よりも明るいほど前記注目画素のゲインを上げて明るさを強調し、かつ、前記注目画素が周囲の画素よりも暗いほど前記注目画素のゲインを下げて暗さを強調するともに、前記注目画素が周囲の画素よりも暗い場合には、前記注目画素が周囲の画素よりも明るい場合に比べて、前記強調度合を大きくする前記ゲインカーブを用いて前記補正を行うことを特徴とする。 An image processing program according to the present invention is an image processing program for realizing image processing on image data to be processed by a computer, wherein the contrast is obtained in an acquisition step of acquiring the image data and an intermediate portion of gradation. A gradation conversion processing step for performing gradation conversion processing on the image data in accordance with input / output characteristics defined by a gradation curve having characteristics that take into account weakening characteristics; and the image data subjected to the gradation conversion processing A correction step for performing correction for enhancing local contrast indicating local contrast of an image using a gain curve whose degree of enhancement changes according to luminance information of a pixel to be processed, and In the step, as the target pixel is brighter than the surrounding pixels, the gain of the target pixel is increased to increase the brightness. In addition, as the pixel of interest is darker than the surrounding pixels, the gain of the pixel of interest is lowered to enhance the darkness, and when the pixel of interest is darker than the surrounding pixels, the pixel of interest is The correction is performed using the gain curve that increases the degree of enhancement as compared with a case where the pixel is brighter than a pixel.
なお、前記補正ステップでは、前記画像データに基づいて、ボケ画像の画像データを作成し、前記画像データにおける輝度値と、前記ボケ画像の画像データにおける輝度値との差を示す値に基づいて、前記補正を行っても良い。 In the correction step, image data of a blurred image is created based on the image data, and based on a value indicating a difference between a luminance value in the image data and a luminance value in the image data of the blurred image, The correction may be performed.
また、前記補正ステップでは、前記画像データに基づいて、ボケ画像の画像データを作成し、前記画像データにおける輝度値と、前記ボケ画像の画像データにおける輝度値との差を示す値が大きくなるほど、前記強調度合を小さくする前記ゲインカーブを用いて前記補正を行っても良い。 Further, in the correction step, image data of a blurred image is created based on the image data, and as a value indicating a difference between a luminance value in the image data and a luminance value in the image data of the blurred image increases, The correction may be performed using the gain curve that reduces the degree of enhancement.
また、前記補正ステップでは、前記画像データに基づいて、ボケ画像の画像データを作成し、前記画像データにおける輝度値と、前記ボケ画像の画像データにおける輝度値との差を示す値が小さくなるほど、前記強調度合を大きくする前記ゲインカーブを用いて前記補正を行っても良い。 In the correction step, image data of a blurred image is created based on the image data, and the smaller the value indicating the difference between the luminance value in the image data and the luminance value in the image data of the blurred image is, The correction may be performed using the gain curve that increases the degree of enhancement.
また、前記階調変換処理ステップでは、階調の中間部において、前記コントラストを弱める特性を加味した特性を有する複数の階調カーブであって、それぞれの階調カーブに加味される前記コントラストを弱める特性が異なる複数の階調カーブから選択された階調カーブによって定義される入出力特性にしたがって、前記画像データに対する階調変換処理を行い、前記補正ステップでは、前記階調変換処理ステップにおいて選択された前記階調カーブの入出力特性に応じて強調度合が変化するゲインカーブを用いて前記補正を行っても良い。 Further, in the gradation conversion processing step, a plurality of gradation curves having characteristics that take into account the characteristic of weakening the contrast in an intermediate portion of gradation, and the contrast added to each gradation curve is weakened The image data is subjected to gradation conversion processing according to input / output characteristics defined by a gradation curve selected from a plurality of gradation curves having different characteristics, and the correction step is selected in the gradation conversion processing step. The correction may be performed using a gain curve whose degree of enhancement changes according to the input / output characteristics of the gradation curve.
また、前記階調カーブは、S字型特性を含んでも良い。 The gradation curve may include an S-shaped characteristic.
また、前記階調カーブは、外部出力機器に対応した特性を含んでも良い。 The gradation curve may include characteristics corresponding to an external output device.
また、上記発明に関する構成を、処理対象の画像データに対する画像処理を行う画像処理装置および画像処理方法に変換して表現したものも本発明の具体的態様として有効である。 In addition, a configuration obtained by converting the configuration related to the above invention into an image processing apparatus and an image processing method for performing image processing on image data to be processed is also effective as a specific aspect of the present invention.
本発明によれば、上記問題に鑑みてなされたものであり、見た目のコントラストを維持するとともに、色相および彩度の変化を抑えつつ、明部階調および暗部階調を改善することが可能な画像処理を行うことができる。 According to the present invention, it has been made in view of the above problems, and it is possible to improve the bright gradation and the dark gradation while maintaining the apparent contrast and suppressing the change in hue and saturation. Image processing can be performed.
<第1実施形態>
以下、図面を用いて本発明の第1実施形態について説明する。第1実施形態では、本発明の画像処理プログラムを適用した一眼レフタイプの電子カメラを例に挙げて説明する。
<First Embodiment>
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. In the first embodiment, a single-lens reflex type electronic camera to which the image processing program of the present invention is applied will be described as an example.
図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
測光センサ12は、例えば、5分割の測光センサである。撮像素子14は、例えばCCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)などの半導体デバイスである。焦点検出部15は、例えば、位相差方式の焦点検出を行い、撮影レンズ2の焦点状態を検出する。また、電子カメラ1は、測光センサ12により検出される輝度に基づいて、コントラスト方式の焦点検出を行い、撮影レンズ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 quick return mirror 4 is disposed at an angle of 45 ° as shown in FIG. The light beam that has passed through the photographing
一方、撮影時には、クイックリターンミラー4が、破線で示す位置に退避してシャッタ13が開放し、撮影レンズ2からの光束は撮像素子14に導かれる。
On the other hand, at the time of photographing, the quick return mirror 4 is retracted to the position indicated by the broken line, the shutter 13 is opened, and the light flux from the photographing
図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に示すフローチャートを用いて説明する。
The operation at the time of photographing of 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は、階調カーブG1を選択する。階調カーブG1は、後述するステップS5で行われる階調変換処理に用いられるものであり、CRTなどの出力機器に対応した階調カーブに公知のS字型特性を持たせた階調カーブである。制御部17は、内部の不図示のメモリに、図4および図5に示す2種類の階調カーブ(G1,G2)を予め記録している。
In step S4, the
ステップS5において、制御部17は、ステップS4で選択した階調カーブG1にしたがって、ステップS3で画像処理を施した画像データに対して階調変換処理を行う。階調変換処理の詳細は公知技術と同様であるため説明を省略する。
In step S5, the
ステップS6において、制御部17は、階調カーブG2を選択する。階調カーブG2は、図5に示すように、1:1の入出力(図5点線参照)と比較して、階調の中間部において、コントラストを弱める特性を有する。
In step S6, the
ステップS7において、制御部17は、ステップS6で選択した階調カーブG2にしたがって、ステップS5で1回目の階調変換処理を施した画像データに対して2回目の階調変換処理を行う。階調変換処理の詳細は公知技術と同様であるため説明を省略する。なお、上述した階調カーブG2にしたがって階調変換処理を行うことにより、階調の中間部において階調が軟調化される。
In step S7, the
ステップS8において、制御部17は、ステップS7で2回目の階調変換処理を施した画像データに対して局所的コントラスト強調処理を行う。局所的コントラストとは、画像の局所領域におけるコントラストのことである。
In step S8, the
各画素R[x,y],G[x,y],B[x,y]における局所的コントラスト強調演算は以下の式1から式6により行う。
The local contrast enhancement calculation in each pixel R [x, y], G [x, y], B [x, y] is performed by the following
式1中のYは、注目画素の輝度値を示す。また、式1中のkr,kg,kbは所定の係数である。また、式2中のLpwは、注目画素周りのローパスフィルタであり、このローパスフィルタは、図6に示す特性を有する。このローパスフィルタは、半値幅(図6中d)が画像の短辺の1/100以上の広い幅のローパスフィルタである。したがって、式2のYlpは、輝度値Yにローパス処理を施したローパス値に相当するので、Ylpの集合は、輝度画像のボケ画像を示す。また、式3のgainは、強調演算時のゲインであり、式3中のGLUTは、強調演算時に用いるゲインカーブである。
Y in
ゲインカーブGLUTは、図7に示すように、(Y[x,y]−Ylp[x,y])の値に応じて、強調演算時の強調度合が異なるゲインカーブである。そして、(Y[x,y]−Ylp[x,y])の値が正の値である場合(注目画素が周囲の画素より明るい場合)には、ゲインを上げて明るさをより強調する。一方、(Y[x,y]−Ylp[x,y])の値が負の値である場合(注目画素が周囲の画素より暗い場合)には、ゲインを下げて暗さをより強調する。すなわち、ゲインカーブGLUTは、注目画素が周囲の画素より明るい場合には、式3によって明るさをより強調し、注目画素が周囲の画素より暗い場合には、式3によって暗さを強調するような特性を有する。
As shown in FIG. 7, the gain curve GLUT is a gain curve having a different degree of emphasis during the emphasis calculation according to the value of (Y [x, y] −Ylp [x, y]). When the value of (Y [x, y] −Ylp [x, y]) is a positive value (when the target pixel is brighter than the surrounding pixels), the gain is increased to enhance the brightness. . On the other hand, when the value of (Y [x, y] −Ylp [x, y]) is a negative value (when the target pixel is darker than the surrounding pixels), the gain is lowered to enhance the darkness. . That is, the gain curve GLUT emphasizes the brightness by
なお、図7に示したゲインカーブGLUTは、一例であり、本発明はこの例に限定されない。直線ゲインである図7中のG0と比較して、注目画素が周囲の画素より明るい場合における強調度合が小さければ、どのような形状であっても良い。例えば、曲線ではなく直線であっても良い。また、注目画素が周囲の画素より暗い場合については、どのような形状であっても良い。例えば、図7の例とは逆に、直線ゲインである図7中のG0と比較して、注目画素が周囲の画素より暗い場合における強調度合が小さくても良い。 Note that the gain curve GLUT shown in FIG. 7 is an example, and the present invention is not limited to this example. Any shape may be used as long as the degree of enhancement is small when the target pixel is brighter than the surrounding pixels as compared with G0 in FIG. 7 which is a linear gain. For example, a straight line may be used instead of a curved line. Further, when the target pixel is darker than the surrounding pixels, it may have any shape. For example, contrary to the example of FIG. 7, the degree of enhancement when the pixel of interest is darker than the surrounding pixels may be smaller than G0 in FIG. 7, which is a linear gain.
また、ゲインカーブGLUTは、(Y[x,y]−Ylp[x,y])の値が正の値である場合には、(Y[x,y]−Ylp[x,y])の値が負の値である場合に比べて、強調度合が小さくなるように定められる。一般に、明部における階調が飽和すると、白飛びが発生する。そこで、明部においては、上述したように、強調度合を小さくすることにより、白飛びが目立ってしまうのを防ぐことができる。 Further, the gain curve GLUT has a value of (Y [x, y] −Ylp [x, y]) when the value of (Y [x, y] −Ylp [x, y]) is a positive value. The degree of emphasis is determined to be smaller than when the value is a negative value. In general, when the gradation in the bright part is saturated, whiteout occurs. Therefore, in the bright portion, as described above, it is possible to prevent whiteout from being noticeable by reducing the degree of enhancement.
ステップS7で説明したように、階調カーブG2にしたがって階調変換処理を行うことにより、階調が軟調化されるので、ゲインカーブGLUTを適切に設定することにより、局所的コントラストを調整して、見た目のコントラストを維持することができる。ゲインカーブGLUTは、固定のゲインカーブであっても良いし、変動するゲインカーブであっても良い。 As described in step S7, the gradation is softened by performing the gradation conversion processing according to the gradation curve G2, so that the local contrast is adjusted by appropriately setting the gain curve GLUT. The visual contrast can be maintained. The gain curve GLUT may be a fixed gain curve or a variable gain curve.
例えば、制御部17は、ゲインカーブGLUTを、撮影モード(例えば、「ポートレートモード」、「風景モード」など)に応じて決定する構成としても良い。例えば、ポートレートモードにおいては、明部階調の白飛びや暗部階調の黒つぶれが好まれないことが多い。そのため、制御部17は、ポートレートモードにおいては、明部および暗部の両方において強調度合の小さいゲインカーブGLUTを決定する。また、風景モードにおいては、メリハリのある画像が好まれることが多い。そのため、制御部17は、風景モードにおいては、明部および暗部の両方において強調度合の大きいゲインカーブGLUTを決定する。
For example, the
さらに、制御部17は、ゲインカーブGLUTを、画像のコントラストの強弱に応じて決定する構成としても良いし、画像の調整モードに応じて決定する構成としても良い。また、シーン解析や顔認識による画像判断結果に応じて、ゲインカーブGLUTを決定する構成としても良い。このようにゲインカーブGLUTの決定を適宜行うことにより、画像に最適化した階調変換処理および局所的コントラスト強調処理を行うことができる。
Furthermore, the
また、制御部17は、ゲインカーブGLUTの決定を、スイッチ群29を介したユーザ操作に基づいて行っても良い。例えば、制御部17は、画像表示部27に、図8に示すような、画像処理時の特性を指定する指定画面を表示する。ユーザは、スイッチ群29を介してスライドバーを移動させて画像処理時の特性を指定する。図8の例では、「硬質な」または「自然な」という言葉を用いているが、これは一例であり、上述したゲインカーブGLUTに応じた画像処理時の特性を示す言葉であればどのようなものであっても良い。そして、制御部17は、ユーザにより指定された画像処理時の特性に応じて、ゲインカーブGLUTを決定する。例えば、図8の例では、ユーザに指定された特性が「自然な」に近いほど、全体的な強調度合の小さいゲインカーブGLUTを決定し、ユーザに指定された特性が「硬質な」に近いほど、全体的な強調度合の大きいゲインカーブGLUTを決定する。なお、ユーザに画像処理時の特性を指定させる場合には、図8に例示したように、プレビュー画面を設け、指定した特性に応じた画像処理の結果をユーザが確認可能な構成としても良い。
The
また、制御部17は、ステップS6で説明した階調カーブG2と、ゲインカーブGLUTとを関連づけて決定しても良い。例えば、図9に示すように、S字型特性の異なる複数の階調カーブG2a〜G2cを用意しておき、ステップS6において、いずれかの階調カーブを選択可能とする。そして、選択された階調カーブの特性に応じて、ゲインカーブGLUTを決定しても良い。すなわち、ステップS7における階調変換処理による軟調化の度合に応じて、ステップS8における局所的コントラスト強調処理の度合を決定しても良い。
Further, the
なお、制御部17は、ステップS6で説明した階調カーブG2およびステップS8で説明したゲインカーブGLUTのそれぞれについて、予め記録した複数のカーブからいずれかのカーブを選択して使用しても良いし、階調カーブおよびゲインカーブを適宜調整して使用しても良い。
The
ステップS9において、制御部17は、ステップS8で局所的コントラスト強調処理を施した画像データを、カードインターフェース25を介してメモリカード28に記録し、一連の処理を終了する。なお、画像データをメモリカード28に記録する前に、圧縮伸長部26を介して、必要に応じて画像圧縮処理(JPEG圧縮処理など)を施しても良い。
以上説明したように、第1実施形態によれば、階調の中間部において、コントラストを弱める特性を加味した特性を有する入出力特性にしたがって、画像データに対する階調変換処理を行い、階調変換処理が施された画像データに対して、画像の局所におけるコントラストを示す局所的コントラストを強調する補正を、処理対象の画素の輝度情報に応じて強調度合が変化するゲインカーブを用いて行う。したがって、コントラストを維持するとともに、色相および彩度の変化を抑えつつ、明部階調および暗部階調を改善することができる。
In step S9, the
As described above, according to the first embodiment, gradation conversion processing is performed on image data according to input / output characteristics having characteristics that reduce contrast in the middle of gradation, and gradation conversion is performed. For the processed image data, correction for enhancing the local contrast indicating the local contrast of the image is performed using a gain curve whose degree of enhancement changes according to the luminance information of the pixel to be processed. Therefore, it is possible to improve the bright part gradation and the dark part gradation while maintaining contrast and suppressing changes in hue and saturation.
また、第1実施形態で説明した局所的コントラスト強調処理は、従来から広く用いられている輪郭強調処理のアルゴリズムを改良することにより容易に実現することができる。 In addition, the local contrast enhancement processing described in the first embodiment can be easily realized by improving an algorithm of contour enhancement processing that has been widely used conventionally.
また、第1実施形態によれば、図6に例示した、半値幅(図6中d)が画像の短辺の1/100以上の広い幅のローパスフィルタを用いて局所的コントラストを強調する補正を行うので、中周波成分に基づいて補正を行うことができる。この補正は、通常1画素毎に行われるエッジ強調など、超高周波成分に基づく補正とは異なり、局所的コントラストを補正して、コントラストを維持しつつ、明部階調および暗部階調を改善することができるこのような効果を得ることができるのは、人間の視覚では、コントラストを知覚するのが局所的であるためである。 Further, according to the first embodiment, the correction for emphasizing the local contrast using the low-pass filter having the wide width at half maximum (d in FIG. 6) of 1/100 or more of the short side of the image illustrated in FIG. Thus, correction can be performed based on the medium frequency component. This correction is different from the correction based on the super-high frequency component such as edge enhancement usually performed for each pixel, and corrects the local contrast to improve the bright part gradation and the dark part gradation while maintaining the contrast. This effect can be obtained because in human vision it is local to perceive contrast.
<第2実施形態>
以下、図面を用いて本発明の第2実施形態について説明する。第2実施形態は、第1実施形態の変形例であるため、第1実施形態と異なる部分についてのみ説明する。
Second Embodiment
The second embodiment of the present invention will be described below with reference to the drawings. Since the second embodiment is a modification of the first embodiment, only portions different from the first embodiment will be described.
第2実施形態の電子カメラの構成は、第1実施形態の電子カメラ1と同様である。したがって、以下では第1実施形態と同様の符号を用いて説明する。
The configuration of the electronic camera of the second embodiment is the same as that of the
図10のフローチャートは、第2実施形態の電子カメラ1の撮影時の動作を示す。
The flowchart of FIG. 10 shows the operation at the time of photographing of the
ステップS21からステップS23において、制御部17は、図3のフローチャートのステップS1からステップS3と同様の処理を行う。
In step S21 to step S23, the
そして、ステップS24において、制御部17は、階調カーブG3を選択する。階調カーブG3は、図11に示すように、図3のフローチャートを用いて説明した階調カーブG1の特性と階調カーブG2の特性とをあわせ持つ階調カーブである。
In step S24, the
ステップS25において、制御部17は、ステップS24で選択した階調カーブG3にしたがって、ステップS23で画像処理を施した画像データに対して階調変換処理を行う。すなわち、制御部17は、通常の特性(G1に相当)にコントラストを弱める特性(G2に相当)を加味した1つの階調カーブを用いて、1回のみ階調変換処理を行う。
In step S25, the
ステップS26からステップS27において、制御部17は、図3のフローチャートのステップS8からステップS9と同様の処理を行う。このような構成とすることにより、第1実施形態と同様の効果を得ることができる。
In step S26 to step S27, the
なお、上述した各実施形態では、本発明の技術を電子カメラ1において実現する例について説明した。しかしながら、本発明はこれに限定されるものではない。例えば、コンパクトタイプの電子カメラや動画撮影を行うムービーカメラなどにも本発明を同様に適用することができる。
In each of the above-described embodiments, the example in which the technique of the present invention is realized in the
また、コンピュータと画像処理プログラムとにより、上述した各実施形態で説明した画像処理装置をソフトウェア的に実現しても良い。この場合、図3のフローチャートで説明したステップS4以降の処理の一部または全部をコンピュータで実現する構成とすれば良い。または、図10のフローチャートで説明したステップS24以降の処理の一部または全部をコンピュータで実現する構成とすれば良い。なお、このような画像処理プログラムは、媒体に記録されたものでも良いし、インターネットなどを介して、サーバーなどからダウンロード可能なものであっても良い。 Further, the image processing apparatus described in each of the above-described 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 S4 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 S24 demonstrated with the flowchart of FIG. 10 with a computer. Note that such an image processing program may be recorded on a medium, or may be downloaded from a server or the like via the Internet or the like.
また、処理対象の画像が、上述した各実施形態において説明した階調カーブG1を用いた階調変換処理後の画像である場合にも本発明を同様に適用することができる。この場合、図3のフローチャートで説明したステップS6以降の処理の一部または全部をコンピュータで実現する構成とすれば良い。または、図10のフローチャートで説明したステップS24以降の処理の一部または全部をコンピュータで実現する構成とすれば良い。 In addition, the present invention can be similarly applied when the image to be processed is an image after the gradation conversion process using the gradation curve G1 described in each of the above-described embodiments. In this case, what is necessary is just to make it the structure which implement | achieves part or all of the process after step S6 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 S24 demonstrated with the flowchart of FIG. 10 with a computer.
なお、本発明は、その精神または主要な特徴から逸脱することなく、他のいろいろな形で実施することができる。そのため、前述の実施例はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明の範囲は、特許請求の範囲によって示すものであって、明細書本文には、なんら拘束されない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、すべて本発明の範囲内のものである。 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 (10)
前記画像データを取得する取得ステップと、
階調の中間部において、前記コントラストを弱める特性を加味した特性を有する階調カーブによって定義される入出力特性にしたがって、前記画像データに対する階調変換処理を行う階調変換処理ステップと、
前記階調変換処理が施された前記画像データに対して、画像の局所におけるコントラストを示す局所的コントラストを強調する補正を、処理対象の画素の輝度情報に応じて強調度合が変化するゲインカーブを用いて行う補正ステップとを有し、
前記補正ステップでは、注目画素が周囲の画素よりも明るいほど前記注目画素のゲインを上げて明るさを強調し、かつ、前記注目画素が周囲の画素よりも暗いほど前記注目画素のゲインを下げて暗さを強調するともに、前記注目画素が周囲の画素よりも暗い場合には、前記注目画素が周囲の画素よりも明るい場合に比べて、前記強調度合を大きくする前記ゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理プログラム。 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 gradation conversion processing step for performing gradation conversion processing on the image data in accordance with an input / output characteristic defined by a gradation curve having a characteristic that takes into account the characteristic of weakening the contrast in an intermediate part of the gradation;
For the image data that has been subjected to the gradation conversion processing, a correction that enhances local contrast indicating the local contrast of the image is performed, and a gain curve whose emphasis degree changes according to luminance information of the pixel to be processed And a correction step performed using
In the correction step, the brightness of the target pixel is increased by increasing the gain of the target pixel as the target pixel is brighter than the surrounding pixels, and the gain of the target pixel is decreased as the target pixel is darker than the surrounding pixels. While correcting darkness, when the target pixel is darker than the surrounding pixels, the correction is performed using the gain curve that increases the degree of enhancement compared to the case where the target pixel is brighter than the surrounding pixels. An image processing program characterized by
前記補正ステップでは、前記画像データに基づいて、ボケ画像の画像データを作成し、前記画像データにおける輝度値と、前記ボケ画像の画像データにおける輝度値との差を示す値に基づいて、前記補正を行う
ことを特徴とする画像処理プログラム。 In the image processing program according to claim 1,
In the correction step, image data of a blurred image is created based on the image data, and the correction is performed based on a value indicating a difference between a luminance value in the image data and a luminance value in the image data of the blurred image. An image processing program characterized by
前記補正ステップでは、前記画像データに基づいて、ボケ画像の画像データを作成し、前記画像データにおける輝度値と、前記ボケ画像の画像データにおける輝度値との差を示す値が大きくなるほど、前記強調度合を小さくする前記ゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理プログラム。 The image processing program according to claim 1 or 2,
In the correction step, image data of a blurred image is created based on the image data, and the emphasis is increased as a value indicating a difference between a luminance value in the image data and a luminance value in the image data of the blurred image is increased. An image processing program that performs the correction using the gain curve that reduces the degree.
前記補正ステップでは、前記画像データに基づいて、ボケ画像の画像データを作成し、前記画像データにおける輝度値と、前記ボケ画像の画像データにおける輝度値との差を示す値が小さくなるほど、前記強調度合を大きくする前記ゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理プログラム。 In the image processing program according to any one of claims 1 to 3,
In the correction step, image data of a blurred image is created based on the image data, and the emphasis is increased as a value indicating a difference between a luminance value in the image data and a luminance value in the image data of the blurred image is decreased. An image processing program that performs the correction using the gain curve that increases the degree.
前記階調変換処理ステップでは、階調の中間部において、前記コントラストを弱める特性を加味した特性を有する複数の階調カーブであって、それぞれの階調カーブに加味される前記コントラストを弱める特性が異なる複数の階調カーブから選択された階調カーブによって定義される入出力特性にしたがって、前記画像データに対する階調変換処理を行い、
前記補正ステップでは、前記階調変換処理ステップにおいて選択された前記階調カーブの入出力特性に応じて強調度合が変化するゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理プログラム。 In the image processing program according to any one of claims 1 to 4,
In the gradation conversion processing step, there are a plurality of gradation curves having a characteristic that takes into account the characteristic of weakening the contrast in an intermediate part of the gradation, and a characteristic that weakens the contrast added to each gradation curve. In accordance with input / output characteristics defined by a gradation curve selected from a plurality of different gradation curves, gradation conversion processing is performed on the image data,
In the correction step, the correction is performed using a gain curve whose degree of enhancement changes according to the input / output characteristics of the gradation curve selected in the gradation conversion processing step.
前記階調カーブは、S字型特性を含む
ことを特徴とする画像処理プログラム。 In the image processing program according to any one of claims 1 to 5,
The gradation curve includes an S-shaped characteristic.
前記階調カーブは、外部出力機器に対応した特性を含む
ことを特徴とする画像処理プログラム。 The image processing program according to any one of claims 1 to 6,
The gradation processing curve includes characteristics corresponding to an external output device.
階調の中間部において、前記コントラストを弱める特性を加味した特性を有する入出力特性にしたがって、前記画像データに対する階調変換処理を行う階調変換処理部と、
前記階調変換処理が施された前記画像データに対して、画像の局所におけるコントラストを示す局所的コントラストを強調する補正を、処理対象の画素の輝度情報に応じて強調度合が変化するゲインカーブを用いて行う補正部とを備え、
前記補正部は、注目画素が周囲の画素よりも明るいほど前記注目画素のゲインを上げて明るさを強調し、かつ、前記注目画素が周囲の画素よりも暗いほど前記注目画素のゲインを下げて暗さを強調するとともに、前記注目画素が周囲の画素よりも暗い場合には、前記注目画素が周囲の画素よりも明るい場合に比べて、前記強調度合を大きくする前記ゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理装置。 An acquisition unit for acquiring image data to be processed;
A gradation conversion processing unit that performs gradation conversion processing on the image data in accordance with an input / output characteristic having characteristics that take into account the characteristic of weakening the contrast in an intermediate part of gradation;
For the image data that has been subjected to the gradation conversion processing, a correction that enhances local contrast indicating the local contrast of the image is performed, and a gain curve whose emphasis degree changes according to luminance information of the pixel to be processed And a correction unit to be used,
The correction unit enhances the brightness by increasing the gain of the target pixel as the target pixel is brighter than the surrounding pixels, and decreases the gain of the target pixel as the target pixel is darker than the surrounding pixels. The correction is performed using the gain curve that enhances darkness and increases the degree of enhancement when the pixel of interest is darker than the surrounding pixels than when the pixel of interest is brighter than the surrounding pixels. An image processing apparatus characterized by
前記階調変換処理部は、階調の中間部において、前記コントラストを弱める特性を加味した特性を有する複数の階調カーブであって、それぞれの階調カーブに加味される前記コントラストを弱める特性が異なる複数の階調カーブを有し、前記複数の階調カーブから選択された階調カーブによって定義される入出力特性にしたがって、前記画像データに対する階調変換処理を行い、
前記補正部は、前記階調変換処理部により選択された前記階調カーブの入出力特性に応じて強調度合が変化するゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 8.
The gradation conversion processing unit is a plurality of gradation curves having characteristics that take into account the characteristic of weakening the contrast in an intermediate part of gradations, and has a characteristic of weakening the contrast added to each gradation curve. Having a plurality of different gradation curves, and performing gradation conversion processing on the image data in accordance with input / output characteristics defined by the gradation curves selected from the plurality of gradation curves;
The image processing apparatus according to claim 1, wherein the correction unit performs the correction using a gain curve whose degree of enhancement changes according to input / output characteristics of the gradation curve selected by the gradation conversion processing unit.
階調の中間部において、前記コントラストを弱める特性を加味した特性を有する入出力特性にしたがって、前記画像データに対する階調変換処理を行う階調変換処理工程と、
前記階調変換処理が施された前記画像データに対して、画像の局所におけるコントラストを示す局所的コントラストを強調する補正を、処理対象の画素の輝度情報に応じて強調度合が変化するゲインカーブを用いて行う補正工程とを有し、
前記補正工程では、注目画素が周囲の画素よりも明るいほど前記注目画素のゲインを上げて明るさを強調し、かつ、前記注目画素が周囲の画素よりも暗いほど前記注目画素のゲインを下げて暗さを強調するとともに、前記注目画素が周囲の画素よりも暗い場合には、前記注目画素が周囲の画素よりも明るい場合に比べて、前記強調度合を大きくする前記ゲインカーブを用いて前記補正を行う
ことを特徴とする画像処理方法。 An acquisition step of acquiring image data to be processed;
A gradation conversion processing step for performing gradation conversion processing on the image data in accordance with input / output characteristics having characteristics that take into account the characteristics of weakening the contrast in an intermediate portion of gradation;
For the image data that has been subjected to the gradation conversion processing, a correction that enhances local contrast indicating the local contrast of the image is performed, and a gain curve whose emphasis degree changes according to luminance information of the pixel to be processed And a correction process performed using
In the correction step, as the target pixel is brighter than surrounding pixels, the gain of the target pixel is increased to enhance the brightness, and as the target pixel is darker than the surrounding pixels, the gain of the target pixel is decreased. The correction is performed using the gain curve that enhances darkness and increases the degree of enhancement when the pixel of interest is darker than the surrounding pixels than when the pixel of interest is brighter than the surrounding pixels. An image processing method characterized by:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013015591A JP5561389B2 (en) | 2013-01-30 | 2013-01-30 | Image processing program, image processing apparatus, electronic camera, and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013015591A JP5561389B2 (en) | 2013-01-30 | 2013-01-30 | Image processing program, image processing apparatus, electronic camera, and image processing method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010094311A Division JP2011228807A (en) | 2010-04-15 | 2010-04-15 | Image processing program, image processing apparatus, and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013127804A true JP2013127804A (en) | 2013-06-27 |
JP5561389B2 JP5561389B2 (en) | 2014-07-30 |
Family
ID=48778255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013015591A Active JP5561389B2 (en) | 2013-01-30 | 2013-01-30 | Image processing program, image processing apparatus, electronic camera, and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5561389B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9460498B2 (en) | 2014-02-26 | 2016-10-04 | Panasonic Intellectual Property Management Co., Ltd. | Image processing method and image processing device |
US9749506B2 (en) | 2014-02-05 | 2017-08-29 | Panasonic Intellectual Property Management Co., Ltd. | Image processing method and image processing device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008263475A (en) * | 2007-04-13 | 2008-10-30 | Sony Corp | Image processing device, method, and program |
JP2010028363A (en) * | 2008-07-17 | 2010-02-04 | Nikon Corp | Imaging apparatus and image processing program |
JP2010034848A (en) * | 2008-07-29 | 2010-02-12 | Nikon Corp | Image processing program, image processing device and image processing method |
-
2013
- 2013-01-30 JP JP2013015591A patent/JP5561389B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008263475A (en) * | 2007-04-13 | 2008-10-30 | Sony Corp | Image processing device, method, and program |
JP2010028363A (en) * | 2008-07-17 | 2010-02-04 | Nikon Corp | Imaging apparatus and image processing program |
JP2010034848A (en) * | 2008-07-29 | 2010-02-12 | Nikon Corp | Image processing program, image processing device and image processing method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9749506B2 (en) | 2014-02-05 | 2017-08-29 | Panasonic Intellectual Property Management Co., Ltd. | Image processing method and image processing device |
US9460498B2 (en) | 2014-02-26 | 2016-10-04 | Panasonic Intellectual Property Management Co., Ltd. | Image processing method and image processing device |
Also Published As
Publication number | Publication date |
---|---|
JP5561389B2 (en) | 2014-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5460173B2 (en) | Image processing method, image processing apparatus, image processing program, and imaging apparatus | |
JP2000228747A (en) | Picture processor | |
JP2011228807A (en) | Image processing program, image processing apparatus, and image processing method | |
JP6935272B2 (en) | Devices, methods, and programs for creating high dynamic range images | |
JP5076650B2 (en) | Imaging apparatus and image processing program | |
JP2022179514A (en) | Control apparatus, imaging apparatus, control method, and program | |
JP2009088935A (en) | Image recording apparatus, image correcting apparatus, and image pickup apparatus | |
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 | |
JP5561389B2 (en) | Image processing program, image processing apparatus, electronic camera, and image processing method | |
JP4883057B2 (en) | Image processing program, image processing apparatus, and image processing method | |
JP6786273B2 (en) | Image processing equipment, image processing methods, and programs | |
JP4857856B2 (en) | Electronic camera having saturation adjustment function and image processing program | |
JP4941424B2 (en) | Imaging apparatus and image processing program | |
JP5282533B2 (en) | Image processing apparatus, imaging apparatus, and program | |
JP2011135379A (en) | Imaging apparatus, imaging method and program | |
JP2010283527A (en) | Image processor and method of the same | |
JP5217783B2 (en) | Imaging device | |
JP2018181070A (en) | Image processing device and image processing method | |
JP2009088933A (en) | Image recording apparatus, image correcting apparatus and image pickup apparatus | |
JP2000261719A (en) | Image processing method, its system and recording medium | |
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 | |
JP5772096B2 (en) | Imaging device | |
JP2007027865A (en) | Imaging apparatus, image processing apparatus, imaging processing method, and imaging processing program | |
JP2009272798A (en) | Imaging apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131029 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131105 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140106 |
|
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: 20140513 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140526 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5561389 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |