JP5834542B2 - Imaging apparatus, image processing apparatus, program, and recording medium - Google Patents
Imaging apparatus, image processing apparatus, program, and recording medium Download PDFInfo
- Publication number
- JP5834542B2 JP5834542B2 JP2011145707A JP2011145707A JP5834542B2 JP 5834542 B2 JP5834542 B2 JP 5834542B2 JP 2011145707 A JP2011145707 A JP 2011145707A JP 2011145707 A JP2011145707 A JP 2011145707A JP 5834542 B2 JP5834542 B2 JP 5834542B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- imaging
- flare
- focus detection
- pixel value
- 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.)
- Active
Links
- 238000003384 imaging method Methods 0.000 title claims description 200
- 238000012545 processing Methods 0.000 title claims description 70
- 238000001514 detection method Methods 0.000 claims description 62
- 238000000034 method Methods 0.000 claims description 48
- 230000008569 process Effects 0.000 claims description 41
- 230000001629 suppression Effects 0.000 claims description 26
- 238000009499 grossing Methods 0.000 claims description 19
- 238000012937 correction Methods 0.000 claims description 18
- 241000287463 Phalacrocorax Species 0.000 claims 2
- 230000002093 peripheral effect Effects 0.000 claims 1
- 210000001747 pupil Anatomy 0.000 description 13
- 230000035945 sensitivity Effects 0.000 description 10
- 230000008859 change Effects 0.000 description 9
- 239000000203 mixture Substances 0.000 description 8
- 230000003595 spectral effect Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 230000004907 flux Effects 0.000 description 4
- 239000003086 colorant Substances 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 229920006395 saturated elastomer Polymers 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 210000003128 head Anatomy 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000000087 stabilizing effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Transforming Light Signals Into Electric Signals (AREA)
- Color Television Image Signal Generators (AREA)
Description
本発明は、撮像装置、画像処理装置、及びプログラム、並びに記録媒体に関する。 The present invention relates to an imaging device, an image processing device, a program, and a recording medium.
従来、複数の撮像用画素を2次元状に配列した受光面の一部に焦点検出用の複数の画素を配列した撮像素子が知られている(特許文献1)。複数の撮像用画素は、複数の色成分の各々に対応する分光特性を有し、また、焦点検出用画素は、複数の撮像用画素とは異なる分光特性を有する。複数の撮像用画素からは、画像を生成するための信号が読み出されて撮像用画素値が決められ、また焦点検出用の画素からは焦点検出のための信号が読み出されて焦点検出用画素値が決められる。画素補間をする時には、撮像用画素値のうち欠落色成分の画素値を補間するとともに、焦点検出用画素の位置に対応する撮像用画素値を補間する。 2. Description of the Related Art Conventionally, an imaging element in which a plurality of pixels for focus detection are arranged on a part of a light receiving surface in which a plurality of imaging pixels are arranged in a two-dimensional manner is known (Patent Document 1). The plurality of imaging pixels have spectral characteristics corresponding to each of the plurality of color components, and the focus detection pixels have spectral characteristics different from the plurality of imaging pixels. A signal for generating an image is read from a plurality of imaging pixels to determine an imaging pixel value, and a focus detection signal is read from a focus detection pixel for focus detection. Pixel values are determined. When performing pixel interpolation, the pixel value of the missing color component is interpolated among the imaging pixel values, and the imaging pixel value corresponding to the position of the focus detection pixel is interpolated.
特許文献1に記載の発明では、焦点検出画素の位置に対応する撮像用画素値を補間するために、焦点検出用画素の近傍にある撮像用画素の画素値を用いて焦点検出用画素の補間画素値を生成し、前記近傍の撮像用画素が焦点検出用画素と同じ分光特性を有した場合の画素値である評価画素値を算出し、前記焦点検出用画素の画素値と前記評価画素値とを用いて画像の高周波成分を算出し、前記補間画素値に前記高周波成分を付加して焦点検出用画素の位置に対応する撮像用画素値を算出している。
In the invention described in
しかしながら、受光部周辺の画素間で配線領域からの反射光でフレアが生じると、受光部周辺でマイクロレンズ間の入射光が隣接画素へ漏れ込むクロストークにより混色が発生する。このような現象が起きると、焦点検出用画素のみならず、その周辺の画素も影響を受け、前述した画素補間により混色を受けた焦点検出用画素、及びその周りの画素が見た目に違和感を与える補間残りとなって現れてしまう欠点があった。 However, when flare occurs due to the reflected light from the wiring area between the pixels around the light receiving portion, color mixing occurs due to crosstalk in which incident light between the microlenses leaks into adjacent pixels around the light receiving portion. When such a phenomenon occurs, not only the focus detection pixels but also the surrounding pixels are affected, and the focus detection pixels that have undergone color mixing by the above-described pixel interpolation and the surrounding pixels give an unnatural appearance. There was a drawback that it appeared as a residual interpolation.
本発明は、かかる点に鑑みてなされたものであり、フレアによる混色の影響が生じないように画素補間を行う撮像装置、画像処理装置、及びプログラム、並びに記録媒体を提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides an imaging apparatus, an image processing apparatus, a program, and a recording medium that perform pixel interpolation so that the influence of color mixture due to flare does not occur. .
本発明を例示する撮像装置の一態様は、画像用の信号を生成する撮像用画素と、焦点検出用の信号を生成する焦点検出用画素とを有する撮像素子と、撮像素子から得られる画像に基づいてフレアが生じているか否かを判定するフレア判定手段と、フレアが生じているとフレア判定手段が判定する場合、焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正し、補正した撮像用画素の画素値を平滑化するフレア抑制処理を行う抑制手段と、抑制手段により平滑化された撮像用画素の画素値のうちの焦点検出用画素の近傍の撮像用画素の画素値を用いて焦点検出用画素の補間画素値を生成する画素補間処理手段と、を備えたものである。 One embodiment of an imaging device that exemplifies the present invention includes an imaging element that has an imaging pixel that generates an image signal, a focus detection pixel that generates a focus detection signal, and an image obtained from the imaging element. Based on the flare determination means for determining whether or not flare has occurred, and when the flare determination means determines that flare has occurred, the pixel values of the imaging pixels around the focus detection pixel are corrected by a weighting factor. A suppression unit that performs a flare suppression process for smoothing the pixel value of the corrected imaging pixel, and a pixel of the imaging pixel in the vicinity of the focus detection pixel among the pixel values of the imaging pixel smoothed by the suppression unit Pixel interpolation processing means for generating an interpolation pixel value of the focus detection pixel using the value.
抑制手段としては、焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正する周囲撮像画素補正手段と、周囲撮像画素補正手段で補正した前記撮像用画素の画素値を平滑化する平滑化手段と、を備えてもよい。 As suppression means, the surrounding imaging pixel correction means for correcting the pixel value of the imaging pixels around the focus detection pixel by a weighting factor, and the pixel values of the imaging pixels corrected by the surrounding imaging pixel correction means are smoothed. Smoothing means.
周囲撮像画素補正手段としては、前記焦点検出用画素の近傍に位置する撮像用画素のうち、対象となる撮像用画素の画素値から前記対象となる撮像用画素の近傍に位置する撮像用画素の画素値と重み係数との加重和を減算することで、前記対象となる撮像用画素の画素値を補正してもよい。 As the surrounding image pickup pixel correcting means, among the image pickup pixels located in the vicinity of the focus detection pixel, the image pickup pixel located in the vicinity of the target image pickup pixel from the pixel value of the target image pickup pixel is selected. The pixel value of the target imaging pixel may be corrected by subtracting the weighted sum of the pixel value and the weight coefficient.
抑制手段としては、周囲撮像画素補正手段と平滑化手段とで行う処理を、撮像用画素値に対する重み係数を変えて複数回、例えば2回行うとともに、2回目以降の処理では重み計数を「0」にして平滑化手段の処理のみを行うようにするのが望ましい。 As the suppression means, the processing performed by the surrounding imaging pixel correction means and the smoothing means is performed a plurality of times, for example, twice by changing the weighting coefficient for the imaging pixel value, and the weight count is set to “0” in the second and subsequent processing. It is desirable to perform only the processing of the smoothing means.
平滑化手段としては、隣接するAF画素の画素値を用いてクリップ範囲を算出する手段と、一列に並ぶ焦点検出用画素列から遠い位置にある遠位撮像用画素の画素値と近い位置にある近位撮像用画素の画素値との差分から予測誤差を算出する手段と、予測誤差がクリップ範囲から越えているか否かを判定する手段と、クリップ範囲から外れている予測誤差を、前記クリップ範囲に含まれるようにクリッピングする手段と、前記近位撮像用画素の画素値に前記クリッピング後の予測誤差を加算する手段と、で構成するのが望ましい。 As the smoothing means, a means for calculating the clip range using the pixel values of the adjacent AF pixels and a position close to the pixel value of the distal imaging pixel located far from the focus detection pixel array arranged in a line. Means for calculating a prediction error from the difference from the pixel value of the proximal imaging pixel, means for determining whether or not the prediction error exceeds the clip range, and a prediction error that is out of the clip range. And means for adding the prediction error after clipping to the pixel value of the proximal imaging pixel.
また、本発明としては、コンピュータが読み取り可能なプログラム、並びにコンピュータが読み取り可能なプログラムを記録した記録媒体の発明としてもよい。 Further, the present invention may be an invention of a computer-readable program and a recording medium recording the computer-readable program.
本発明によれば、フレアが生じている場合、焦点検出用画素の周囲の撮像用画素に対してフレアによる混色の影響を抑制することができる。 According to the present invention, when flare occurs, it is possible to suppress the influence of color mixture due to flare on the imaging pixels around the focus detection pixels.
本発明を適用した電子カメラ10は、図4に示すように、CPU11を備えている。CPU11には、不揮発性メモリ12、及びワークメモリ13が接続されており、不揮発性メモリ12には、CPU11が種々の制御を行う際に参照される制御プログラムなどが格納されている。さらに、不揮発性メモリ12には、詳しくは後述する撮像素子に設けた焦点検出用画素(AF画素)の位置情報、予め求めておいた画像処理プログラムに用いる各種閾値や加算係数等のデータ、及び各種判定用テーブル等を記憶する。
An
CPU11は、不揮発性メモリ12に格納されている制御プログラムに従い、ワークメモリ13を一時記憶作業領域として利用して各部の制御を行い、電子カメラ10を構成する各部(回路)機能を作動させる。
The
撮影レンズ14から入射する被写体光は、CCDやCMOS等の撮像素子15の受光面に結像する。撮像素子駆動回路16は、CPU11からの制御信号に基づいて撮像素子15を駆動させる。撮像素子15は、ベイヤー配列型単板撮像素子になっており、前面には原色透過フィルタ17が取り付けられている。
Subject light incident from the photographing
原色透過フィルタ17は、撮像素子15の総画素数Nに対して、例えば、G(緑色)の解像度がN/2、R(赤色)及びB(青色)の解像度がN/4となる原色ベイヤー配列になっている。
The primary
撮像素子15の受光面に結像した被写体像は、アナログの画像信号に変換される。画像信号は、AFE(Analog Front End)回路を構成するCDS18、及びAMP19に順に出力し、AFE回路で所定のアナログ処理が施され、その後、A/D(Analog/Digital変換器)20においてデジタルの画像データに変換されて画像処理部21に送られる。
The subject image formed on the light receiving surface of the
画像処理部21は、分離回路、ホワイトバランス処理回路、画素補間(デモザイキング)回路、マトリクス処理回路、非線形変換(γ補正)処理回路、及び輪郭強調処理回路等を備え、デジタルの画像データに対して、ホワイトバランス、画素補間、マトリクス、非線形変換(γ補正)、及び輪郭強調等の処理を施す。分離回路は、詳しくは後述する撮像用画素から出力される信号と、焦点検出用画素から出力される信号とを分離する。画素補間回路は、1画素当たり1色のベイヤー配列データを、1画素当たり3色からなる通常のカラー画像データに変換する。
The
画像処理部21から出力される3色の画像データは、バス22を通じてSDRAM23に格納される。SDRAM23に格納した画像データは、CPU11の制御により読み出されて表示制御部24に送られる。表示制御部24は、入力された画像データを表示用の所定方式の信号(例えば、NTSC方式のカラー複合映像信号)に変換して表示部25にスルー画像として出力する。
The three-color image data output from the
また、シャッタレリーズに応答して取得した画像データは、SDRAM23から読み出した後に圧縮伸長処理部26に送られ、ここで圧縮処理が施されてからメディアコントローラ27を介して記録媒体であるメモリカード28に記録される。
The image data acquired in response to the shutter release is read from the
CPU11には、レリーズボタン29、電源スイッチ30、及びISO感度設定部32が接続されているとともに、撮像素子15の温度を検出する温度検出器31から温度情報が入力される。この情報は、画像処理部21に送られ、詳しくは後述するノイズを判定する時に利用される。
A
AE/AF検出部33は、焦点検出用画素の信号に基づいて瞳分割型位相差検出方式によりデフォーカス量、及びデフォーカスの方向を検出する。CPU11は、AE/AF検出部33で得られるデフォーカス量、及びデフォーカスの方向に基づいてドライバ34を制御して合焦モータ35を駆動してフォーカスレンズを光軸方向で進退させて焦点調整を行う。
The AE /
AE/AF検出部33は、撮像用画素の信号に基づいて算出した輝度値(Bv)と、撮影者がISO感度設定部32で設定したSv値とを用いて光値(Lv=Sv+Bv)を算出する。そして、AE/AF検出部33は、露出値(Ev=Av+Tv)が光値(Lv)になるように絞り値とシャッター速度とを決定する。そして、これに従って撮像素子15の電子シャッター、及び電子アイリスを制御して適正な露光量を得る。なお、絞り兼用のメカシャッタを設けて、メカシャッタで絞りを可変してもよい。
The AE /
撮像素子15は、その受光面上にある複数の撮像用画素の各々に、R(赤)、G(緑)、B(青)のいずれかの原色透過フィルタ17がベイヤー配列型に設けられ、その上にマイクロレンズアレイが設けられたCCDやCMOSの半導体イメージセンサ等を適宜選択して用いる。さらに、本実施形態の撮像素子15は、受光面上の一部の領域に、水平走査方向に1次元的に配置された複数の焦点検出用画素(AF画素)を有する。それらのAF画素には、原色透過フィルタ17が設置されていない。また、AF画素は、撮像レンズ1の光学系の瞳の左側又は右側を通過する光束を受光する2種類存在する。撮像素子15は、撮像用画素群、及びAF画素群からの画素信号を個別に読み出しすることができる。
The
各AF画素36は、図2に示すように、セル中心(マイクロレンズの中心)から一方に偏ったセンサ開口部36a,36bを持ち、その偏りの方向に沿って1次元状に並べられている。隣接するセンサ開口部36a,36bは、偏りが互いに逆方向であり、その偏りの距離は同一である。センサ開口部36aを有するAF画素36は、RGB原色ベイヤー配列中のG画素の代わりに置かれ、また、センサ開口部36bを有するAF画素36は、RGB原色ベイヤー配列中のB画素の代わりに置かれている。このようなセンサ開口部36a,36bをもつAF画素36によって瞳分割位相差AF方式を実現する。つまり、射出瞳を通る光束の中で撮影レンズ14の光軸に対して対称な位置にある2つの部分光束を、センサ開口部36aをもつAF画素36とセンサ開口部36bをもつAF画素36でそれぞれ受光すれば、これら2つの画素36から出力された信号の位相差によりデフォーカスの方向と、デフォーカスの量が分かる。これにより速やかなフォーカス合わせが可能になる。
As shown in FIG. 2, each
したがって、本実施形態におけるAF画素36の各々は、白色光の輝度に応じた左側又は右側の瞳分割された検出信号を出力する。図3は、撮像素子15によって撮像された画像データのうち、AF画素36が配置された領域を中心とした画像データの一部を示す。それぞれのセルが1つの画素を表す。各セルの先頭の記号R、G及びBは、各原色透過フィルタ17を有する撮像用画素を示す。一方、記号X及びYは、左側又は右側からの光束に感度を有するAF画素を示し、それらが交互に水平走査方向に1次元的に配列されている。これらの記号に続く2桁の番号は画素の位置を示す。
Accordingly, each of the
画素補間部は、AF画素36の画素値(AF画素値)を撮像用画素値に補間するAF画素補間部と、AF画素値を撮像用画素の画素値(撮像用画素値)に補間した後に、ベイヤー配列からRGBへの線形補間法による色補間を行う画素補間部とを備える。 The pixel interpolating unit interpolates the pixel value of the AF pixel 36 (AF pixel value) to the imaging pixel value, and after interpolating the AF pixel value to the pixel value of the imaging pixel (imaging pixel value). And a pixel interpolation unit for performing color interpolation by a linear interpolation method from the Bayer array to RGB.
AF画素補間部40は、図4に示すように、ノイズ判定部41、及びフレア判定部42を備え、これら判定に基づいて異なるAF画素補間処理を行う。ノイズ判定部41は、撮影時の撮影条件に基づいてノイズが多く発生する条件かを判定する。撮影条件は、撮像素子15の温度、ISO感度、及び撮影時のシャッター速度等になっている。撮像素子15の温度情報は、CPU11から得られる。また、温度情報とともに、撮影時に設定されているISO感度や撮影時のシャッター速度の情報もCPU11から得られる。
As shown in FIG. 4, the AF
ノイズ判定部41は、撮像素子15の温度、ISO感度、及びシャッター速度との情報に基づいてノイズが多いか少ないかを判定する。なお、撮像素子15を実装するメイン基板に温度検出器を設け、メイン基板の温度、又は撮像素子15の周囲の温度を、撮像素子15の温度の代わりに利用してもよい。さらに、ノイズ判定に利用する情報としては、撮像素子15の温度、ISO感度、及びシャッター速度との3つの情報に限らず、このうちのいずれか一つ、又は2つの情報としてもよい。
The noise determination unit 41 determines whether there is a lot of noise based on information on the temperature, ISO sensitivity, and shutter speed of the
ノイズが多いとノイズ判定部41が判定する場合には、AF画素値を用いず、その周囲の撮像用画素値を用いて、例えば単純平均補間を行う第1画素補間処理を行う。ノイズが少ないと判定する場合には、フレア判定部42でフレア判定を行い、フレアが発生しているか否かに応じて前記第1画素補間処理とは異なる第2、又は第3の画素補間処理を行う。
When the noise determination unit 41 determines that there is a lot of noise, a first pixel interpolation process that performs, for example, simple average interpolation is performed using the surrounding imaging pixel values without using the AF pixel values. When it is determined that there is little noise, the
フレア判定部42は、画像データの輝度ヒストグラムに基づいて輝度が高い領域(高輝度領域)を抽出した後に、抽出された高輝度領域に、例えばマゼンタ色が存在するか否かを判定し、マゼンタ色が存在する場合、マゼンタ色となる領域(マゼンタ領域)における輝度成分の平均エッジ量、及び分散値を算出し、「マゼンタ領域の総面積」、「マゼンタ領域の分散値/マゼンタ領域の総面積」、及び「マゼンタ領域の輝度成分の平均エッジ量」を各々閾値判定してフレアが発生しているか否かを判定する。
The
なお、フレア判定としては、ジャイロセンサ又は加速度センサ等の姿勢検出部を設け、姿勢検出部から得られる出力値に基づく演算により撮影レンズ14の水平に対対する仰角をCPU11が求め、仰角とともに被写体距離、被写体輝度、撮影モード等の情報をフレア判定部に送り、フレア判定部で、仰角、被写体距離、被写体輝度、撮影モード等の情報に基づいて、屋外であるか屋内であるかの区別と、昼夜の区別と、及びカメラを上に向けたときの撮影画角に被写体として空が入っているかの区別とを行って、フレアが発生するか否かの判定を行ってもよい。
For flare determination, a posture detection unit such as a gyro sensor or an acceleration sensor is provided, and the
AF画素補間部40は、フレアが生じていないと判定する場合には、AF画素値を用いて画素補間をする第2画素補間処理(画素補間手段)を実行する。第2画素補間処理は、AF画素値(ホワイト(W)成分)から周囲の撮像用画素値を元に加重和で予測することで、そのAF画素値を補間する。
If the AF
フレアが生じているとフレア判定部42が判定する場合には、第3画素補間処理を実行する。第3画素補間処理は、フレア抑制手段と画素補間処理手段とを順に行う。フレア抑制手段は、AF画素の周囲の撮像用画素値を重み係数により補正する周囲撮像画素補正手段と、周囲撮像画素補正手段で補正した撮像用画素値を平滑化する平滑化手段と、で構成されている。周囲撮像画素補正手段は、AF画素の近傍に位置する撮像用画素のうち、対象となる撮像用画素値から前記対象となる撮像用画素の近傍に位置する撮像用画素値と重み係数との加重和を減算することで、前記対象となる撮像用画素値を補正する。
When the
フレア抑制手段としては、周囲撮像画素補正手段と平滑化手段とで行う処理を、撮像用画素値に対する重み係数を変えて、例えば2回行うとともに、2回目の処理では重み計数を「0」にして平滑化手段での処理のみを行う。その後、第2画素補間処理(画素補間処理手段)を実行する。これにより、AF画素の周囲の撮像用画素に対してフレアにおける混色の影響を抑制することができる。よって、第2画素補間処理を行うに当たって、AF画素を撮像用画素として生成した画素値にも混色の影響が抑制される。 As the flare suppression means, the processing performed by the surrounding imaging pixel correction means and the smoothing means is performed twice, for example, by changing the weighting coefficient for the imaging pixel value, and the weight count is set to “0” in the second processing. Thus, only the processing by the smoothing means is performed. Thereafter, the second pixel interpolation processing (pixel interpolation processing means) is executed. Thereby, the influence of the color mixture in the flare can be suppressed on the imaging pixels around the AF pixel. Therefore, in performing the second pixel interpolation process, the influence of the color mixture is also suppressed on the pixel value generated by using the AF pixel as the imaging pixel.
次に、上記AF画素補間部40の作用について図5を参照しながら説明する。なお、本実施形態において、撮像用画素の各々に設置される原色透過フィルタ17がベイヤー配列のパターンであることから、図3に示す記号XのAF画素の位置には緑色(G)の撮像用画素値が補間され、記号YのAF画素の画素位置には青色(B)の撮像用画素値が補間される。以下の説明では、Y44の青色の撮像用画素値とX45の緑色の撮像用画素値とをそれぞれ補間する場合について説明する。他のAF画素における撮像用画素値を補間する手順も同様である。
Next, the operation of the AF
[ノイズ判定]
CPU11は、A/D20から送られてくる画像データをノイズ判定部41に送る。また、CPU11は、撮影時の撮像素子15の温度、ISO感度、及びシャッター速度の情報をノイズ判定部41に送る。あおして、CPU11は、ノイズ判定部41を制御して、ノイズ判定部41で画像データに対してノイズが多いか少ないかを判定する(S−1)。
[Noise judgment]
The
ノイズ判定部41の判定は、ノイズ判定用テーブルを参照して判定する。ノイズ判定用テーブルは、撮像素子15の温度範囲毎に複数用意されており、これらは不揮発性メモリ12に予め記憶されている。CPU11は、画像データを取得した時の撮像素子15の温度に対応するノイズ判定用テーブルをノイズ判定部41に送る。
The determination by the noise determination unit 41 is determined with reference to the noise determination table. A plurality of noise determination tables are prepared for each temperature range of the
ノイズ用判定テーブルとしては、例えば撮像素子15の温度が40℃未満の時には[表1]に記載のテーブルを、また40℃以上50℃未満の範囲の時には[表2]に記載のテーブルを選択する。各テーブルには、シャッター速度とISO感度とで決めるノイズの予測結果が予め行った実験に基づいて決められている。
As the noise determination table, for example, the table described in [Table 1] is selected when the temperature of the
ノイズが多いと判定する場合は、AF画素の画素値を用いず、その周囲の画素の画素値のみを用いて第1画素補間処理を行う(S−2)。 When it is determined that there is a lot of noise, the first pixel interpolation process is performed using only the pixel values of the surrounding pixels without using the pixel values of the AF pixels (S-2).
[第1画素補間処理]
第1画素補間処理としては、例えば単に周囲の画素から平均補間してAF画素に対応する撮像用画素値を求める。具体的には、図3において、B画素の代わりに置かれたAF画素Y42の画素値は[数1]に記載の式から、また、AF画素Y44の画素値は[数2]に記載の式から、さらに、AF画素Y46の画素値は[数3]に記載の式からそれぞれ求める。
[First pixel interpolation processing]
As the first pixel interpolation processing, for example, an image pickup pixel value corresponding to the AF pixel is obtained by simply performing average interpolation from surrounding pixels. Specifically, in FIG. 3, the pixel value of the AF pixel Y42 placed in place of the B pixel is expressed by the equation described in [Equation 1], and the pixel value of the AF pixel Y44 is expressed by [Equation 2]. Further, the pixel value of the AF pixel Y46 is obtained from the equation described in [Equation 3] from the equation.
[数1]
Y42=(B22+B62)/2
[数2]
Y44=(B24+B64)/2
[数3]
Y46=(B26+B66)/2
また、G画素の代わりに置かれたAF画素X43の画素値は[数4]に記載の式から、また、AF画素X45の画素値は、[数5]に記載の式からそれぞれ求める。
[Equation 1]
Y42 = (B22 + B62) / 2
[Equation 2]
Y44 = (B24 + B64) / 2
[Equation 3]
Y46 = (B26 + B66) / 2
Further, the pixel value of the AF pixel X43 placed in place of the G pixel is obtained from the equation described in [Equation 4], and the pixel value of the AF pixel X45 is obtained from the equation described in [Equation 5].
[数4]
X43=(G32+G34+G52+G54)/4
[数5]
X45=(G34+G36+G54+G56)/4
このように、ノイズが多い場合には、AF画素値を用いないで、その周辺の撮像用画素値のみからAF画素値を予測するため、予測するAF画素値がバラツキ、想定以上の補間をしてしまい、偽色とよばれる実際には存在しない色が発生することや、偽構造とよばれる存在しない構造が発生することを極力抑えることができる。なお、AF画素値を撮像用画素値に補間した画像データは、画像処理部21でベイヤー配列からRGBへの線形補間法による色補間が行われ、RGB毎の画像データとしてSDRAM23に格納される。
[Equation 4]
X43 = (G32 + G34 + G52 + G54) / 4
[Equation 5]
X45 = (G34 + G36 + G54 + G56) / 4
In this way, when there is a lot of noise, the AF pixel value is predicted only from the surrounding imaging pixel values without using the AF pixel value, and therefore, the predicted AF pixel value varies and interpolation more than expected is performed. Therefore, it is possible to suppress as much as possible the occurrence of a color that does not actually exist called false color and the occurrence of a non-existing structure called false structure. Note that the image data obtained by interpolating the AF pixel value to the imaging pixel value is subjected to color interpolation by the linear interpolation method from the Bayer array to RGB in the
[フレア判定]
CPU11は、ノイズが少ないとノイズ判定部41が判定した場合、フレア判定部42を制御して、フレア判定部42でフレアが生じているか否かを判定する(S−3)。AF画素補間部40は、フレア判定部42でフレアが発生しないと判定する場合、第2画素補間処理(S−4)を、また、フレアが発生すると判定する場合には、第3画素補間処理(S−5)を択一的に実行する。
[Flare determination]
When the noise determination unit 41 determines that there is little noise, the
[第2画素補間処理]
AF画素の周辺の撮像用画素値を用いて画素値の変化率である変動値が最小となる方向を求める。そして、変動の最も小さい方向にある撮像用画素値を用いてAF画素値を補間する。
[Second pixel interpolation processing]
Using the imaging pixel values around the AF pixel, the direction in which the variation value, which is the change rate of the pixel value, is minimized is obtained. Then, the AF pixel value is interpolated using the imaging pixel value in the direction of the smallest fluctuation.
(最小となる変動値の方向を算出)
AF画素補間部40は、X45及びY44のAF画素での撮像用画素値を補間するために、図6に示すように、X45及びY44の周辺の撮像用画素値を用いて4方向の画素値の変化率である方向変動H1〜H4の値を、[数6]〜[数9]に記載の式を用いてそれぞれ求める(S−6)。なお、本実施形態における4方向とは、水平走査方向、垂直走査方向、水平走査方向に対して45度及び135度方向である。
(Calculate the direction of the minimum fluctuation value)
As shown in FIG. 6, the AF
[数6]
水平走査方向の方向変動H1=
2×(|G34−G36|+|G54−G56|)+|R33−R35|+|R53−R55|+|B24−B26|+|B64−B66|
[数7]
垂直走査方向の方向変動H2=
2×(|G34−G54|+|G36−G56|)+|R33−R53|+|R35−R55|+|B24−B64|+|B26−B66|
[数8]
水平走査方向に対して45度の方向変動H3=
2×(|G27−G36|+|G54−G63|)+|R35−R53|+|R37−R55|+|B26−B62|+|B28−B64|
[数9]
水平走査方向に対して135度の方向変動H4=
2×(|G23−G34|+|G56−G67|)+|R33−R55|+|R35−R57|+|B22−B66|+|B24−B68|
(最小変動値の方向に応じた周辺の撮像用画素値を用いてAF画素値を補間)
AF画素補間部40は、ステップ(S−6)で求めた方向変動H1〜H4のうち最も小さい値の方向変動の方向を選択し、その方向にある撮像用画素値を用いて、AF画素X45の位置でのGの撮像用画素値GX45及びAF画素Y44の位置でのBの撮像用画素値BY44を[数10]〜[数13]のうちの選択した方向に対応する式を用いて求める(S−7)。これにより、変動の小さい方向にある撮像用画素値を用いることにより、より正確にX45及びY44等のAF画素の位置での撮像用画素値を補間することが可能となる。
[Equation 6]
Direction variation H1 in the horizontal scanning direction =
2 × (| G34-G36 | + | G54-G56 |) + | R33-R35 | + | R53-R55 | + | B24-B26 | + | B64-B66 |
[Equation 7]
Direction variation H2 in the vertical scanning direction =
2 × (| G34-G54 | + | G36-G56 |) + | R33-R53 | + | R35-R55 | + | B24-B64 | + | B26-B66 |
[Equation 8]
45 degree direction change with respect to the horizontal scanning direction H3 =
2 × (| G27-G36 | + | G54-G63 |) + | R35-R53 | + | R37-R55 | + | B26-B62 | + | B28-B64 |
[Equation 9]
Directional change H4 = 135 degrees with respect to the horizontal scanning direction =
2 × (| G23-G34 | + | G56-G67 |) + | R33-R55 | + | R35-R57 | + | B22-B66 | + | B24-B68 |
(AF pixel values are interpolated using surrounding imaging pixel values corresponding to the direction of the minimum variation value)
The AF
[数10]
方向変動H1が最小の場合
BY44=(B24+B64)/2
GX45=(G34+G36+G54+G56)/4
[数11]
方向変動H2が最小の場合
BY44=(B24+B64)/2
GX45=(G25+G65)/2
[数12]
方向変動H3が最小の場合
BY44=(B26+B62)/2
GX45=(G36+G54)/2
[数13]
方向変動H4が最小の場合
BY44=(B22+B66)/2
GX45=(G34+G56)/2
AF画素補間部40は、AF画素の配列方向である水平走査方向において、AF画素の画素値の方向変動H5を、例えば、AF画素のY44及びX45の白色光の画素値W44及びW45と、[数14]に記載の式とを用いて算出する。
[Equation 10]
When the direction change H1 is the minimum, B Y44 = (B24 + B64) / 2
G X45 = (G34 + G36 + G54 + G56) / 4
[Equation 11]
When the direction change H2 is the minimum B Y44 = (B24 + B64) / 2
G X45 = (G25 + G65) / 2
[Equation 12]
When direction change H3 is the minimum, B Y44 = (B26 + B62) / 2
G X45 = (G36 + G54) / 2
[Equation 13]
When the direction change H4 is the minimum, B Y44 = (B22 + B66) / 2
G X45 = (G34 + G56) / 2
The AF
[数14]
H5=|W44−W45|
AF画素補間部40は、その方向変動H5の値が閾値th1を超えるか否かを判定する(S−8)。方向変動H5が閾値th1を超える場合(YES側)、AF画素補間部40は、ステップ(S−7)で求めたBY44及びGX45の補間した値をY44及びX45における撮像用画素値とし、画像データを更新する。画像処理部21は、更新した画像データに対して3色に画素補間を施して3色の画像データを生成し、3色の画像データを、バス22を介してSDRAM23に記録する(S−9)。
[Formula 14]
H5 = | W44-W45 |
The AF
一方、方向変動H5が閾値th1以下の場合(NO側)、画像処理部21は、(S−10)へ移行する。なお、閾値th1は、例えば、12ビット画像を処理する場合、512程度の値にすれば良い。
On the other hand, when the direction variation H5 is equal to or less than the threshold th1 (NO side), the
AF画素補間部40は、ステップ(S−6)で求めた方向変動H2の値が閾値th2を超えるか否かを判定する(S−10)。方向変動H2が閾値th2を超える場合(YES側)、AF画素補間部40は、ステップ(S−7)で求めたBY44及びGX45の補間した値をY44及びX45における撮像用画素値とし、画像データを更新する。画像処理部21は、更新した画像データに対して3色の画素補間を施して3色の画像データを生成し、3色の画像データを、バス13を介してSDRAM23に格納する(S−9)。
The AF
一方、方向変動H2が閾値th2以下の場合(NO側)、画像処理部21は、(S−11)へ移行する。なお、閾値th2は、例えば、12ビット画像を処理する場合、64程度の値にすれば良い。
On the other hand, when the direction variation H2 is equal to or less than the threshold th2 (NO side), the
その後、AF画素補間部40は、右側からの光束に感度を有するY44等のAF画素における白色光の平均画素値<W44>等を、近傍にある色成分R、G及びBの撮像用画素値を用いて算出する(S−11)。具体的には、ステップ(S−6)において、例えば、画像処理部21が方向変動H2を最小であると判定した場合、Bの撮像用画素値は[数10]に記載の式にあるB24とB64とを用いる。一方、R及びGの画素値については、Bの撮像用画素B24とB64との位置におけるR及びGの画素値を、[数15]に記載の4つの式を用いて補間計算する。
Thereafter, the AF
[数15]
(1)RB24=(R13+R15+R33+R35)/4
(2)GB24=(G14+G23+G25+G34)/4
(3)RB64=(R53+R55+R73+R75)/4
(4)GB64=(G54+G63+G65+G74)/4
そして、AF画素補間部40は、撮像用画素B24及びB64の位置における白色光の画素値W24及びW64を、CPU11から転送されてきたR、G及びGの加重係数WR、WG及びWBを用いて、[数16]に記載の式の加重和によって算出する。なお、加重係数WR、WG及びWBの求め方については後述する。
[Equation 15]
(1) R B24 = (R13 + R15 + R33 + R35) / 4
(2) G B24 = (G14 + G23 + G25 + G34) / 4
(3) R B64 = (R53 + R55 + R73 + R75) / 4
(4) G B64 = (G54 + G63 + G65 + G74) / 4
Then, the AF
[数16]
W24=WR×RB24+WG×GB24+WB×B24
W64=WR×RB64+WG×GB64+WB×B64
そして、画像処理部21は、Y44における白色光の平均画素値<W44>=(W24+W64)/2を算出する。
[Equation 16]
W24 = WR × R B24 + WG × G B24 + WB × B24
W64 = WR × R B64 + WG × G B64 + WB × B64
Then, the
AF画素補間部40は、左側からの光束に感度を有するX45等のAF画素における白色光の平均画素値<W45>等を、ステップ(S−11)の場合と同様に、近傍にある色成分R、G及びBの撮像用画素値を用いて算出する(S−12)。ステップ(S−7)において、画像処理部21が方向変動H2を最小であると判定した場合、Gの撮像用画素値は、[数10]に記載の式にあるG25とG65とを用いる。一方、R及びBの画素値については、Gの撮像用画素G25とG65との位置におけるR及びBの画素値を[数17]に記載の4つの式を用いて補間計算する。
The AF
[数17]
(1)RG25=(R15+R35)/2
(2)BG25=(B24+B26)/2
(3)RG65=(R55+R75)/2
(4)BG65=(B64+G66)/2
そして、AF画素補間部40は、撮像用画素G25及びG65の位置における白色光の画素値W25及びW65を、[数18]に記載の式の加重和によって算出する。
[Equation 17]
(1) R G25 = (R15 + R35) / 2
(2) B G25 = (B24 + B26) / 2
(3) R G65 = (R55 + R75) / 2
(4) B G65 = (B64 + G66) / 2
Then, the AF
[数18]
W25=WR×RG25+WG×G25+WB×BG25
W65=WR×RG64+WG×G25+WB×BG65
そして、画像処理部21は、X45における白色光の平均画素値<W45>=(W25+W65)/2を算出する。
[Equation 18]
W25 = WR × R G25 + WG × G25 + WB × B G25
W65 = WR × R G64 + WG × G25 + WB × B G65
Then, the
AF画素補間部40は、撮像素子2の各AF画素における白色光の画素値の高周波成分を、(S−11)及び(S−12)において求めた白色光の平均画素値を用いて求める(S−13)。AF画素補間部40は、撮像素子2の各AF画素値から、各AF画素の画素位置における白色光の平均画素値を最初に求める。つまり、各AF画素値は、左側又は右側からの光束を瞳分割した値である。したがって、各AF画素の位置における白色光の画素値を得るためには、左側及び右側からの光束の画素値を互いに加算する必要がある。そこで、本実施形態のAF画素補間部40は、各AF画素値、及び隣接するAF画素値を用いて、例えば、AF画素Y44やX45の位置における白色光の平均画素値を[数19]に記載の式を用いて算出する。
The AF
[数19]
<W44>’=W44+(W43+W45)/2
<W45>’=W45+(W44+W46)/2
なお、ステップ(S−13)で説明した[数19]において、AF画素の配列方向に隣接するAF画素値を用いて、各AF画素の位置における白色光の画素値を算出するので、配列方向に強い変動がある場合には、高周波成分の計算が不正確になり、白色光の画素値の配列方向の解像力が失われるおそれがある。そこで、前述したステップ(S−8)では、配列方向に強い変動がある場合に、高周波成分の付加を中止するようにしている。
[Equation 19]
<W44>'= W44 + (W43 + W45) / 2
<W45>'= W45 + (W44 + W46) / 2
Note that in [Equation 19] described in step (S-13), the pixel value of white light at the position of each AF pixel is calculated using the AF pixel values adjacent in the AF pixel arrangement direction. If there is a strong fluctuation, the calculation of the high-frequency component becomes inaccurate, and the resolution of the white light pixel values in the arrangement direction may be lost. Therefore, in step (S-8) described above, when there is a strong variation in the arrangement direction, the addition of high frequency components is stopped.
その後、AF画素補間部40は、[数20]に記載の式から、Y44及びX45の位置における白色光の高周波成分HFY44及びHFX45を求める。
Thereafter, the AF
[数20]
HFY44=<W44>’−<W44>
HFX45=<W45>’−<W45>
AF画素補間部40は、ステップ(S−13)で求めた各AF画素の位置における白色光の画素値の高周波成分HFがその白色光の画素値に占める割合が、閾値th3(本実施形態では、例えば、10%程度)より小さいか否かを判定する(S−14)。閾値th3より高周波成分HFが小さい場合(YES側)、AF画素補間部40は、ステップS12で求めたBY44及びGX45の補間した値をY44及びX45における撮像用画素値とし、画像データを更新する。画像処理部21は、更新した画像データに対して3色の画素補間を施して3色の画像データを生成し、3色の画像データを、バス13介してSDRAM23に格納する(S−9)。
[Equation 20]
HFY44 = <W44>'-<W44>
HFX45 = <W45>'-<W45>
The AF
一方、高周波成分HFが閾値th3以上の場合(NO側)、AF画素補間部40は、ステップ(S−15)へ移行する。なお、閾値th3の値についての説明は、後の加重係数WR、WG、及びWBの説明とともに行う。
On the other hand, when the high frequency component HF is greater than or equal to the threshold th3 (NO side), the AF
AF画素補間部40は、Y44やX45の近傍における各色成分R、G又はBの撮像用画素値の色変動VR、VGr、VB及びVGbを算出する(S−15)。ここで、色変動VGr及びVGbは、R又はBの撮像用画素の位置におけるGの色変動を示す。AF画素補間部40は、[数21]に記載の2つの式に基づいて、色変動VRとVGrとを求める。
The AF
[数21]
(1)VR =|R33−R53|+|R35−R55|+|R37−R57|
(2)VGr=|(G32+G34)/2−(G52+G54)/2|+|(G34+G36)/2−(G54+G56)/2|+|(G36+G38)/2−(G56+G58)/2|
なお、本実施形態のAF画素補間部40は、Rの撮像用画素の位置R33、R35、R37、R53、R55及びR57におけるGの画素値の平均値を求めてからVGrの値を計算する。
[Equation 21]
(1) VR = | R33-R53 | + | R35-R55 | + | R37-R57 |
(2) VGr = | (G32 + G34) / 2− (G52 + G54) / 2 | + | (G34 + G36) / 2− (G54 + G56) / 2 | + | (G36 + G38) / 2− (G56 + G58) / 2 |
Note that the AF
一方、AF画素補間部40は、[数22]に記載の2つの式に基づいて、色変動VBとVGbとを求める。
On the other hand, the AF
[数22]
(1)VB =|B22−B62|+|B24−B64|+|B26−B66|
(2)VGb=|(G21+G23)/2−(G61+G63)/2|+|(G23+G25)/2−(G63+G63)/2|+|(G25+G27)/2−(G65+G67)/2|
なお、本実施形態のAF画素補間部40は、Bの撮像用画素の位置B22、B24、B26、B62、B64及びB66におけるGの画素値の平均値を求めてからVGbの値を計算する。
[Equation 22]
(1) VB = | B22−B62 | + | B24−B64 | + | B26−B66 |
(2) VGb = | (G21 + G23) / 2− (G61 + G63) / 2 | + | (G23 + G25) / 2− (G63 + G63) / 2 | + | (G25 + G27) / 2− (G65 + G67) / 2 |
It should be noted that the AF
AF画素補間部40は、ステップ(S−15)で算出した色変動VR、VGr、VB及びVGbを用いて、色成分G及びBの白色光に対する色変動率KWG及びKWBを算出する(S−16)。まず、AF画素補間部40は、色変動VR、VGr、VB及びVGbから[数23]に記載の3つの式から色変動VR2、VG2及びVB2を求める。
The AF
[数23]
(1)VR2=(VR+α)×(VGb+α)
(2)VB2=(VB+α)×(VGr+α)
(3)VG2=(VGb+α)×(VGr+α)
ここで、αは、色変動率の値を安定させるための適当な定数であり、例えば、12ビット画像を処理する場合には、α=256程度の値にすれば良い。
[Equation 23]
(1) VR2 = (VR + α) × (VGb + α)
(2) VB2 = (VB + α) × (VGr + α)
(3) VG2 = (VGb + α) × (VGr + α)
Here, α is an appropriate constant for stabilizing the value of the color variation rate. For example, when processing a 12-bit image, α may be set to about 256.
そして、画像処理部21は、色変動VR2、VG2及びVB2を用いて、[数24]に記載の式により白色光における色変動VWを算出する。
Then, the
[数24]
VW=VR2+VG2+VB2
よって、AF画素補間部40は、色変動率KWG及びKWBを[数25]から算出する。
[Equation 24]
VW = VR2 + VG2 + VB2
Therefore, the AF
[数25]
KWB=VG2/VW
KWB=VB2/VW
AF画素補間部40は、ステップ(S−13)において求めた各AF画素の位置における白色光の画素値の高周波成分HFと、ステップ(S−16)で算出した色変動率KWG及びKWBとを用いて、各AF画素の位置における色成分G及びBの画素値の高周波成分を[数26]に記載の式から算出する(S−17)。
[Equation 25]
K WB = VG2 / VW
K WB = VB2 / VW
The AF
[数26]
HFBY44=HFY44×KWB
HFGX45=HFX45×KWG
AF画素補間部40は、ステップ(S−17)で求めた各AF画素における各色成分の高周波成分を、ステップ(S−7)で補間して求めた撮像用画素値に付加する(S−18)。CPU11は、例えば、[数27]に記載の式に基づいて、Y44及びX45の撮像用画素値B’及びG’をそれぞれ算出する。
[Equation 26]
HFB Y44 = HF Y44 × K WB
HFG X45 = HF X45 × K WG
The AF
[数27]
B’Y44=BY44+HFY44
G’X45=GX45+HFX45
AF画素補間部40は、Y44やX45等のAF画素の位置において補間して求めたB’Y44及びG’X45等の画素値を、それぞれの位置における撮像用画素値として、画像データを更新する。画像処理部21は、更新した画像データに対して1画素当たり3色の画像データに変換してSDRAM23に格納する(S−9)。
[Equation 27]
B ′ Y44 = B Y44 + HF Y44
G ′ X45 = G X45 + HF X45
The AF
なお、AF画素の配列方向に変動はなくても、各色成分の撮像用画素の分光特性の加重和とAF画素の分光特性とのズレ等に起因して、白色光の画素値の高周波成分が若干の誤差を持つ。垂直走査方向(AF画素の配列方向に交わる方向)に画像の大きな変動がない場合には、高周波成分を付加しなくても補間値の精度は充分であり、高周波成分を付加することによってかえって誤差に起因する偽構造が生じる恐れがある。そこで、ステップ(S−10)では、そのような場合、高周波成分の付加を抑制する。また、算出された高周波成分が充分小さい場合には、それを付加しなくても補間値の精度は充分であり、高周波成分を付加することによってかえって誤差に起因する偽構造が生じるおそれがある。このため、(S−10)では、そのような場合に高周波成分の付加を抑制するようにしている。 Even if there is no change in the arrangement direction of the AF pixels, the high-frequency component of the pixel value of the white light is caused by the deviation between the weighted sum of the spectral characteristics of the imaging pixels of each color component and the spectral characteristics of the AF pixels. Has a slight error. When there is no large fluctuation of the image in the vertical scanning direction (direction intersecting the AF pixel arrangement direction), the accuracy of the interpolation value is sufficient without adding a high-frequency component. There is a risk that a false structure resulting from Therefore, in step (S-10), in such a case, addition of a high frequency component is suppressed. In addition, when the calculated high frequency component is sufficiently small, the accuracy of the interpolation value is sufficient even if it is not added, and there is a possibility that a false structure due to an error may be caused by adding the high frequency component. For this reason, in (S-10), addition of a high frequency component is suppressed in such a case.
次に、加重係数WR、WG及びWBの求め方について、閾値th3とともに説明する。そうした加算係数や閾値を求めるにあたり、製品に組み込まれる撮像素子2又はその撮像素子2と同じ性能を持つ撮像素子を用意する。その撮像素子2にほぼ一様な照度の照明を、波長帯域を様々に変えて照射し、それぞれの波長帯域についての撮像画像データを取得する。そして、各波長帯域の撮像画像データnについて、[数19]に記載の式のように瞳分割の異なるAF画素の画素値を加算することにより白色光の画素値Wnを算出する。同時に、AF画素の近傍にある各色成分の撮像用画素の画素値Rn、Gn、Bnについても抽出する。
Next, how to obtain the weighting factors WR, WG and WB will be described together with the threshold value th3. In obtaining such an addition coefficient and threshold value, an
そして、未知の加重係数WR、WG及びWBの関数として二乗誤差Eを[数28]のように定義する。 Then, the square error E is defined as [Equation 28] as a function of the unknown weighting factors WR, WG and WB.
[数28]
E=Σn(WR×Rn+WG×Gn+WB×Bn−Wn)2
そして、Eを最小とする加重係数WR、WG及びWBを求める(EをWR、WG又はWBでそれぞれ偏微分した値を0にする加重係数WR、WG及びWBを求める)。このようにして、加重係数WR、WG及びWBを求めることにより、AF画素の分光特性を各色成分R、G及びBの撮像用画素の分光特性の加重和によって表される加重係数が求められる。このように求めた加重係数WR、WG及びWBを不揮発性メモリ12に記録する。さらに、求めた加重係数WR、WG及びWBにもとづいて各撮像画像データnについて誤差率Knを[数29]に記載の式で求める。
[Equation 28]
E = Σn (WR × Rn + WG × Gn + WB × Bn−Wn) 2
Then, weighting coefficients WR, WG, and WB that minimize E are obtained (weighting coefficients WR, WG, and WB that obtain a value obtained by partially differentiating E from WR, WG, or WB are set to 0). In this way, by obtaining the weighting factors WR, WG, and WB, a weighting factor that represents the spectral characteristic of the AF pixel by the weighted sum of the spectral characteristics of the imaging pixels of the respective color components R, G, and B is obtained. The weighting factors WR, WG and WB thus obtained are recorded in the
[数29]
Kn=|WR×Rn+WG×Gn+WB×Bn−Wn|/Wn
そして、Knの最大値を求め、閾値th3として不揮発性メモリ12に記録する。
[Equation 29]
Kn = | WR × Rn + WG × Gn + WB × Bn−Wn | / Wn
Then, the maximum value of Kn is obtained and recorded in the
図7は、本実施形態の効果が発揮される画像構造の一例を表す。図7は凸構造(明るい線あるいは点)を含む縦5画素の画像構造を縦断した図であり、横軸は垂直走査方向(y座標)であり縦軸は光量または画素値である。そして、凸構造がちょうど水平走査方向に配列されたAF画素列上にある。 FIG. 7 shows an example of an image structure in which the effect of the present embodiment is exhibited. FIG. 7 is a vertical section of an image structure of five vertical pixels including a convex structure (bright lines or dots). The horizontal axis is the vertical scanning direction (y coordinate), and the vertical axis is the light quantity or pixel value. The convex structure is just on the AF pixel row arranged in the horizontal scanning direction.
図7の○印は、Gの撮像用画素で撮像された画素値である。ただし、AF画素の位置にはGの撮像用画素が存在しないので、その位置でのGの画素値は得られない。従って、丁度AF画素の位置に凸構造がある場合には、AF画素の近傍のGの撮像用画素の画素値からだけでは、図7の凸構造を再現できない。実際、(S−7)において、AF画素の近傍のGの撮像用画素の画素値を用いてAF画素の位置で補間して求めたGの画素値(図7の●印)は、凸構造を再現していない。 The circles in FIG. 7 are pixel values captured by the G imaging pixels. However, since there is no G imaging pixel at the position of the AF pixel, the G pixel value at that position cannot be obtained. Therefore, when there is a convex structure at the position of the AF pixel, the convex structure in FIG. 7 cannot be reproduced only from the pixel values of the G imaging pixels in the vicinity of the AF pixel. In fact, in (S-7), the G pixel value (marked with ● in FIG. 7) obtained by interpolation at the position of the AF pixel using the pixel value of the G imaging pixel in the vicinity of the AF pixel is a convex structure. Is not reproduced.
一方、AF画素の位置では、白色光の画素値が得られる。ただし、通常の画素は瞳の全領域を通過する光を受光するのに対し、AF画素は瞳の右側あるいは左側を通過する光のみを受光するので、瞳分割の異なる隣接するAF画素を加算することにより通常の(瞳の全領域を通過した光の)白色光の画素値が算出される([数19])。 On the other hand, the pixel value of white light is obtained at the position of the AF pixel. However, normal pixels receive light that passes through the entire pupil region, whereas AF pixels receive only light that passes through the right or left side of the pupil, so adjacent AF pixels with different pupil divisions are added. Thus, the pixel value of the normal white light (of the light that has passed through the entire pupil region) is calculated ([Equation 19]).
また、AF画素の近傍のGの撮像用画素の位置に、他の色成分R及びGを補間生成して、色成分R、G及びBの加重和を求めることにより、多くの場合には充分な精度で白色光の画素値を求めることができる([数16]及び[数18])。 In addition, it is sufficient in many cases by interpolating and generating other color components R and G at the position of the G imaging pixel in the vicinity of the AF pixel to obtain a weighted sum of the color components R, G, and B. The pixel value of white light can be obtained with high accuracy ([Equation 16] and [Equation 18]).
図7の□印は、そのようにして求めた白色光の画素値の分布である。多くの場合、白色光の画素値の高周波成分と、色成分Gの画素値の高周波成分とは比例するので、白色光の画素値から算出した高周波成分は、Gの画素値の凸構造成分の情報を持つ。よって、白色光の画素値の高周波成分に基づいてGの画素値の高周波成分を求め、その値を●印のデータに加えることにより、☆印のGの画素値が得られ、凸構造を再現する([数26])。 The squares in FIG. 7 are distributions of pixel values of white light obtained in this way. In many cases, since the high-frequency component of the white light pixel value is proportional to the high-frequency component of the color component G pixel value, the high-frequency component calculated from the white light pixel value is the convex structure component of the G pixel value. Have information. Therefore, the high-frequency component of the G pixel value is obtained based on the high-frequency component of the white light pixel value, and the value is added to the data of the ● mark to obtain the G pixel value of the ☆ mark and reproduce the convex structure ([Equation 26]).
[第3画素補間処理]
AF画素補間部40は、ノイズ判定部41での判定結果によりノイズが少なく、かつフレア判定部42でのフレアが発生し易いと判断する場合、第3画素補間処理を選択して実行する。
[Third pixel interpolation processing]
The AF
第3画素補間処理は、AF画素の周囲の撮像用画素値を重み係数により補正し、補正した撮像用画素値を平滑化する処理を、撮像用画素値に対する重み係数を変えて2回行った後、上述した第2画素補間処理を実行する処理である。以下、図3のAF画素X43及びAF画素Y44の2列に対する第3画素補間処理について説明する。 In the third pixel interpolation processing, the imaging pixel value around the AF pixel is corrected with the weighting factor, and the corrected imaging pixel value is smoothed twice by changing the weighting factor for the imaging pixel value. Thereafter, the second pixel interpolation process described above is executed. Hereinafter, the third pixel interpolation process for the two columns of the AF pixel X43 and the AF pixel Y44 in FIG. 3 will be described.
(AF画素列の周囲の撮像用画素値を重み係数により補正)
AF画素補間部40は、図8に示すように、AF画素列の周囲に配置された撮像用画素値が、閾値MAX_RAW以上となるか否かを判定し、その判定結果に基づいて、設定された重み係数を用いて補正する(S−21)。ここで、閾値MAX_RAWは、画素値が飽和しているか否かを判定するための閾値である。
(Correcting pixel values around the AF pixel row with weighting coefficients)
As shown in FIG. 8, the AF
AF画素補間部40は、撮像用画素値が閾値MAX_RAW以上となる場合には、撮像用画素値に対して補正は行わない。一方、AF画素補間部40は、撮像用画素値が、閾値MAX_RAW未満となる場合には、重み係数を用いた加重和の値を元の画素値から減算することで撮像用画素値を補正する。
The AF
AF画素補間部40は、R色成分の撮像用画素値を[数30]〜[数33]を用いて補正する。
The AF
[数30]
R13’=R13−(R3U_0×R33+R3U_1×G34+R3U_2×B24)
[数31]
R33’=R33−(R1U_0×R33+R1U_1×G34+R1U_2×B24)
[数32]
R53’=R53−(R1S_0×R53+R1S_1×G54+R1S_2×B64)
[数33]
R73’=R73−(R3S_0×R53+R3S_1×G54+R3S_2×B64)
ここで、R1U_0,R1U_1,R1U_2,R1S_0,R1S_1,R1S_2,R3U_0,R3U_1,R3U_2,R3S_0,R3S_1,R3S_2は、重み係数である。なお、重み係数中、文字Sは、AF画素よりも上方に位置することを示し、文字Uは、AF画素よりも下方に位置することを示している。
[Equation 30]
R13 ′ = R13− (R3U — 0 × R33 + R3U — 1 × G34 + R3U — 2 × B24)
[Equation 31]
R33 ′ = R33− (R1U — 0 × R33 + R1U_1 × G34 + R1U_2 × B24)
[Formula 32]
R53 ′ = R53− (R1S_0 × R53 + R1S_1 × G54 + R1S_2 × B64)
[Equation 33]
R73 ′ = R73− (R3S — 0 × R53 + R3S — 1 × G54 + R3S — 2 × B64)
Here, R1U_0, R1U_1, R1U_2, R1S_0, R1S_1, R1S_2, R3U_0, R3U_1, R3U_2, R3S_0, R3S_1, and R3S_2 are weighting coefficients. In the weighting factor, the character S indicates that it is positioned above the AF pixel, and the character U indicates that it is positioned below the AF pixel.
AF画素補間部40は、G色成分の撮像用画素値を[数34]〜[数39]]を用いて補正する。
The AF
[数34]
G14’=G14−(G3U_0×R33+G3U_1×G34+G3U_2×B24
[数35]
G23’=G23−(G2U_0×R33+G2U_1×G34+G2U_2×B24)
[数36]
G34’=G34−(G1U_0×R33+G1U_1×G34+G1U_2×B24)
[数37]
G54’=G54−(G1S_0×R53+G1S_1×G54+G1S_2×B64)
[数38]
G63’=G63−(G2S_0×R53+G2S_1×G54+G2S_2×B64)
[数39]
G74’=G74−(G3S_0×R53+G3S_1×G54+G3S_2×B64)
ここで、G1U_0,G1U_1,G1U_2,G1S_0,G1S_1,G1S_2,G2U_0,G2U_1,G2U_2,G2S_0,G2S_1,G2S_2,G3U_0,G3U_1,G3U_2,G3S_0,G3S_1,G3S_2は、重み係数である。
[Formula 34]
G14 ′ = G14− (G3U — 0 × R33 + G3U_1 × G34 + G3U_2 × B24
[Equation 35]
G23 ′ = G23− (G2U — 0 × R33 + G2U_1 × G34 + G2U_2 × B24)
[Equation 36]
G34 ′ = G34− (G1U — 0 × R33 + G1U_1 × G34 + G1U_2 × B24)
[Equation 37]
G54 ′ = G54− (G1S_0 × R53 + G1S_1 × G54 + G1S_2 × B64)
[Equation 38]
G63 ′ = G63− (G2S — 0 × R53 + G2S_1 × G54 + G2S_2 × B64)
[Equation 39]
G74 ′ = G74− (G3S_0 × R53 + G3S_1 × G54 + G3S_2 × B64)
Here, G1U_0, G1U_1, G1U_2, G1S_0, G1S_1, G1S_2, G2U_0, G2U_1, G2U_2, G2S_0, G2S_1, G2S_2, G3U_0, G3U_1, G3U_2, G3S_1, G3S_1, G3S_1, and G3S_1 are weights.
また、AF画素補間部40は、B色成分の撮像用画素の画素値を、[数40],[数41]を用いて補正する。
Also, the AF
[数40]
B24’=B24−(B2U_0×R33+B2U_1×G34+B2U_2×B24)
[数41]
B64’=B64−(B2S_0×R53+B2S_1×G54+B2S_2×B64)
ここで、B2U_0,B2U_1,B2U_2,B2S_0,B2S_1,B2S_2は重み係数である。
[Equation 40]
B24 ′ = B24− (B2U — 0 × R33 + B2U_1 × G34 + B2U_2 × B24)
[Equation 41]
B64 ′ = B64− (B2S_0 × R53 + B2S_1 × G54 + B2S_2 × B64)
Here, B2U_0, B2U_1, B2U_2, B2S_0, B2S_1, and B2S_2 are weighting coefficients.
(隣接するAF画素値を用いたクリップ量の算出)
AF画素補間部40は、隣接するAF画素X43,Y44(図2で説明したセンサ開口部36a,36bをもつAF画素)の画素値を読み出し、[数42]を用いてクリップ量th_LPFを求める(S−22)。
(Calculation of clip amount using adjacent AF pixel values)
The AF
[数42]
th_LPF=(X43+Y44)×K_TH_LPF
ここで、K_TH_LPFは係数であり、例えば「127」程度の大きな値が適用される。この係数K_TH_LPFは、その値が大きいほど平滑化処理の効果が高くなる。
[Formula 42]
th_LPF = (X43 + Y44) × K_TH_LPF
Here, K_TH_LPF is a coefficient, and a large value of about “127”, for example, is applied. As the coefficient K_TH_LPF is larger, the effect of the smoothing process is higher.
(色成分毎の予測誤差を算出)
AF画素補間部40は、[数43],[数44]を用いて、同一列に配置された同一の色成分となる撮像用画素のうち、AF画素から遠い位置にある撮像用画素(遠位撮像用画素)値と、AF画素から近い位置にある撮像用画素(近位撮像用画素)値との差分を予測誤差として算出する(S−23)。
(Calculate prediction error for each color component)
The AF
[数43]
deltaRU=R13’−R33’
deltaRS=R73’−R53’
[数44]
deltaGU=G14’−G34’
deltaGS=G74’−R54’
(予測誤差がクリップ範囲から越えているか否かを判定)
AF画素補間部40は、[数43]、[数44]により求めた予測誤差deltaRU,deltaRS、deltaGU及びdeltaGSの各値が、[数42]にて求めたクリップ量に基づいたクリップ範囲(−th_LPF〜th_LPF)に含まれている否かを判定する(S−24)。
[Equation 43]
deltaRU = R13′−R33 ′
deltaRS = R73′−R53 ′
[Equation 44]
deltaGU = G14'-G34 '
deltaGS = G74'-R54 '
(Determines whether the prediction error exceeds the clip range)
The AF
(クリップ処理)
AF画素補間部40は、予測誤差deltaRU,deltaRS、deltaGU及びdeltaGSのうち、クリップ範囲から外れている予測誤差に対して、クリップ処理を行う(S−25)。ここで、クリップ処理とは、クリップ範囲から外れている予測誤差の値をクリップ範囲に含まれるようにクリッピングすることである。
(Clip processing)
The AF
(近位撮像用画素値に予測誤差を加算)
AF画素補間部40は、[数45]により、予測誤差を各列の近位撮像用画素値に加算する(S−26)。ここで、予測誤差は、[数43],[数44]により求めた値、又は、クリッピングされた値である。
[数45]
R33”=R33’+deltaRU
R53”=R53’+deltaRS
G34”=G34’+deltaGU
G54”=G54’+deltaGS
これにより、AF画素列の周囲の撮像用画素の画素値である、遠位撮像用画素及び近位撮像用画素の画素値がそれぞれ補正され、さらに、予測誤差を用いて近位撮像用画素の画素値が補正される。
(Add prediction error to pixel value for proximal imaging)
The AF
[Equation 45]
R33 "= R33 '+ deltaRU
R53 "= R53 '+ deltaRS
G34 "= G34 '+ deltaGU
G54 "= G54 '+ deltaGS
Thereby, the pixel values of the distal imaging pixel and the proximal imaging pixel, which are the pixel values of the imaging pixels around the AF pixel column, are corrected, respectively, and further, the prediction error is used to correct the proximal imaging pixel. Pixel values are corrected.
(補正した撮像用画素値をSDRAMに記憶)
AF画素補間部40は、重み係数により補正された遠位撮像用画素と、予測誤差により補正された近位撮像用画素とを、SDRAM23に記憶する(S−27)。
(The corrected imaging pixel value is stored in SDRAM)
The AF
(2回目の処理)
1回目の処理が完了すると、2回目の処理が実行される。
(Second processing)
When the first process is completed, the second process is executed.
(AF画素列の周囲の撮像用画素値を重み係数により補正)
AF画素補間部40は、1回目の処理により補正された撮像用画素の画素値を用いて、これら撮影用が素の画素値が閾値MAX_RAW以上となるか否かを判定する。この判定結果に基づいて、設定された重み係数を用いて補正する(S−28)。ここで、閾値MAX_RAWは、画素値が飽和しているか否かを判定するための閾値であり、1回目の処理(S−21)と同一の値が用いられる。
(Correcting pixel values around the AF pixel row with weighting coefficients)
The AF
AF画素補間部40は、撮像用画素の画素値が閾値MAX_RAW以上となる場合に、撮像用画素値に対して補正は行わない。AF画素補間部40は、撮像用画素の画素値が閾値MAX_RAW未満となる場合に、上述した[数30]〜[数41]における全ての重み係数を「0」に変えて補正する。つまり、この処理を行った場合、AF画素列の周囲に配置された撮像用画素の画素値は、元の値のままである。
[隣接するAF画素値を用いたクリップ量の算出]
AF画素補間部40は、隣接するAF画素X43,Y44の画素値を読み出し、上述した[数42]を用いてクリップ量th_LPFを求める(S−29)。ここで、K_TH_LPFの値は1回目の処理と同一の値が用いられる。
The AF
[Calculation of clip amount using adjacent AF pixel values]
The AF
(色成分毎の予測誤差を算出)
AF画素補間部40は、上述した[数43]、[数44]を用いて、同一列に配置された同一の色成分となる撮像用画素のうち、AF画素から遠い位置にある撮像用画素(遠位撮像用画素)の画素値と、AF画素から近い位置にある撮像用画素(近位撮像用画素)の画素値との差分を予測誤差として算出する(S−30)。
(Calculate prediction error for each color component)
The AF
(予測誤差がクリップ範囲から越えているか否かを判定)
AF画素補間部40は、上述した[数43]、[数44]により求めた予測誤差deltaRU,deltaRS、deltaGU及びdeltaGSの各値が、[数42]にて求めたクリップ量に基づいたクリップ範囲(−th_LPF〜th_LPF)に含まれている否かを判定する(S−31)。
(Determines whether the prediction error exceeds the clip range)
The AF
(クリップ処理)
AF画素補間部40は、予測誤差deltaRU,deltaRS、deltaGU及びdeltaGSのうち、クリップ範囲から外れている予測誤差に対して、クリップ処理を行う(S−32)。
(Clip processing)
The AF
(近位撮像用画素値に予測誤差を加算)
AF画素補間部40は、上述した[数45]を用いて、各列の近位撮像用画素値に加算する(S−33)。これにより、2回目の処理においては、近位撮像用画素値が予測誤差を用いて、さらに補正される。
(Add prediction error to pixel value for proximal imaging)
The AF
(補正した撮像用画素値をSDRAMに記憶)
AF画素補間部40は、重み係数により補正された遠位撮像用画素と、予測誤差により補正された近位撮像用画素とを、SDRAM23に記憶する(S−34)。
(The corrected imaging pixel value is stored in SDRAM)
The AF
このように、第3画素補間処理においては、上述した補正処理が2回繰り返し実行される。この補正処理が2回繰り返し実行された後、第2画素補間処理が実行される。 As described above, in the third pixel interpolation process, the above-described correction process is repeatedly executed twice. After this correction process is repeatedly executed twice, the second pixel interpolation process is executed.
(第2画素補間処理)
AF画素補間部40は、SDRAM23に記憶した撮像用画素値を用いて、上述した第2画素補間処理を実行する(S−35)。これにより、AF画素に対応する撮像用画素値が算出される。つまり、AF画素値が補間される。
(Second pixel interpolation processing)
The AF
(補間したAF画素の画素値をSDRAMに記憶)
AF画素補間部40は、第2画素補間処理(S−35)により補間したAF画素値をSDRAM23に記憶する。
(The interpolated AF pixel value is stored in SDRAM)
The AF
前述した第3画素補間処理においては、補正処理を繰り返し2回実行することで、AF画素列の近傍の撮像用画素値に対する平滑化処理を効果的に行っている。この平滑化処理を効果的に行うことで、AF画素に隣接する撮像用画素に対して、発生するフレアによる混色の影響を低減させることができる。また、混色の影響を低減した撮像用画素の画素値を用いてAF画素に対する補間処理を行うので、AF画素においても、発生するフレアによる混色の影響が低減した画素値が得られる。つまり、フレアの影響を低減した画像を得ることができる。 In the third pixel interpolation process described above, the smoothing process is effectively performed on the imaging pixel values in the vicinity of the AF pixel column by repeatedly executing the correction process twice. By effectively performing the smoothing process, it is possible to reduce the influence of color mixing due to the flare that occurs on the imaging pixels adjacent to the AF pixel. In addition, since the interpolation processing for the AF pixel is performed using the pixel value of the imaging pixel in which the influence of the color mixture is reduced, a pixel value in which the influence of the color mixture due to the generated flare is reduced also in the AF pixel. That is, an image with reduced flare effects can be obtained.
以上説明したように、実施形態によれば、フレアが生じている場合、フレア判定した画像を構成する画素値のうちの焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正し、補正した撮像用画素の画素値を平滑化する処理を複数回行うため、焦点検出用画素の周囲の撮像用画素に対してフレアによる混色の影響を抑制することができる。これにより、その後に行う焦点検出用画素の補間画素値の生成でも前記混色の影響を抑制することができる。 As described above, according to the embodiment, when flare occurs, the pixel values of the imaging pixels around the focus detection pixel among the pixel values constituting the flare-determined image are corrected by the weighting factor. Since the process of smoothing the pixel value of the corrected imaging pixel is performed a plurality of times, the influence of color mixture due to flare can be suppressed on the imaging pixels around the focus detection pixel. As a result, the influence of the color mixture can be suppressed even in the subsequent generation of the interpolation pixel value of the focus detection pixel.
なお、上記実施形態では、AF画素の配列方向を水平走査方向としたが、本発明はこれに限定されず、AF画素は垂直走査方向又はその他の方向に配列されていても良い。 In the above embodiment, the arrangement direction of the AF pixels is the horizontal scanning direction. However, the present invention is not limited to this, and the AF pixels may be arranged in the vertical scanning direction or other directions.
また、上記各実施形態では、AF画素の各々は左側又は右側からの光束を瞳分割する焦点検出画素としたが、本発明はこれに限定されず、AF画素の各々は左側及び右側からの光束を瞳分割する画素を有する焦点検出画素でも良い。 In each of the above embodiments, each AF pixel is a focus detection pixel that divides the light beam from the left or right side into pupils, but the present invention is not limited to this, and each AF pixel has a light beam from the left and right sides. Focus detection pixels having pixels that divide the pupil may be used.
なお、上記実施形態では、フレアの抑制処理を2回行っているが、必ずしも2回まわしする必要はない。例えば、フレアの抑制処理を1回行なってフレアの周囲を補正し、フレア抑制処理を2回行なう場合に比べて、クリップ量を多めにするような構成としてもよい。 In the above embodiment, the flare suppression process is performed twice, but it is not always necessary to rotate the flare twice. For example, the flare suppression process may be performed once to correct the periphery of the flare, and the clip amount may be increased compared to the case where the flare suppression process is performed twice.
なお、本発明では、AF画素補間処理を含む画像処理装置における処理をコンピュータで実現するためのプログラムに対しても適用可能である。 Note that the present invention can also be applied to a program for realizing processing in an image processing apparatus including AF pixel interpolation processing by a computer.
上記各実施形態では、本発明を電子カメラ10として説明しているが、カメラ付き携帯電話やスマートフォン等の撮像装置としてもよい。
In each of the above embodiments, the present invention is described as the
さらに、本発明は、撮像装置に限らず、AF画素値を補間していないRAWデータ等の画像データを取り込んでフレアを判定してAF画素補間を行うプログラム、及びこれを記録した記録媒体の発明としてもよい。 Furthermore, the present invention is not limited to an image pickup apparatus, and a program for taking in image data such as RAW data not interpolating AF pixel values and determining flare and performing AF pixel interpolation, and a recording medium recording the same It is good.
10 電子カメラ
15 撮像素子
36 AF画素
40 AF画素補間部
42 フレア判定部
DESCRIPTION OF
Claims (12)
前記撮像素子から得られる画像に基づいてフレアが生じているか否かを判定するフレア判定手段と、
フレアが生じていると前記フレア判定手段が判定する場合、前記画像を構成する画素値のうちの前記焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正し、補正した撮像用画素の画素値を平滑化するフレア抑制処理を行う抑制手段と、
前記抑制手段により平滑化された撮像用画素の画素値のうちの焦点検出用画素の近傍の撮像用画素の画素値を用いて焦点検出用画素の補間画素値を生成する画素補間処理手段と、
を備えている撮像装置。 An imaging device having an imaging pixel that generates a signal for an image and a focus detection pixel that generates a signal for focus detection ;
Flare determination means for determining whether flare has occurred based on an image obtained from the image sensor;
When the flare determination means determines that a flare has occurred, the pixel value of the imaging pixels around the focus detection pixel among the pixel values constituting the image is corrected by a weighting factor, and the corrected imaging Suppression means for performing flare suppression processing for smoothing the pixel value of the pixel;
Pixel interpolation processing means for generating an interpolation pixel value of a focus detection pixel using a pixel value of an imaging pixel in the vicinity of the focus detection pixel among pixel values of the imaging pixel smoothed by the suppression means;
Have that imaging device provided with a.
前記抑制手段は、前記フレア抑制処理を複数回行う撮像装置。 The imaging device according to claim 1,
The suppressing means comprises a plurality of times rows cormorants imaging device the flare suppression processing.
前記抑制手段は、
前記焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正する周囲撮像画素補正手段と、
前記周囲撮像画素補正手段で補正した前記撮像用画素の画素値を平滑化する平滑化手段と、
を備えている撮像装置。 The imaging device according to claim 1 or 2,
The suppression means is
A surrounding imaging pixel correction unit that corrects a pixel value of an imaging pixel around the focus detection pixel by a weighting factor;
Smoothing means for smoothing the pixel values of the imaging pixels corrected by the surrounding imaging pixel correction means;
Have that imaging device provided with a.
前記周囲撮像画素補正手段は、前記焦点検出用画素の近傍に位置する撮像用画素のうち、対象となる撮像用画素の画素値から前記対象となる撮像用画素の近傍に位置する撮像用画素の画素値と重み係数との加重和を減算することで、前記対象となる撮像用画素の画素値を補正する撮像装置。 The imaging device according to claim 3.
The surrounding imaging pixel correction unit is configured to detect an imaging pixel positioned in the vicinity of the target imaging pixel from a pixel value of the target imaging pixel among imaging pixels positioned in the vicinity of the focus detection pixel. by subtracting the weighted sum of the pixel values and the weighting factors, correct the pixel value of the imaging pixel to be the target imaging device.
前記抑制手段は、
前記周囲撮像画素補正手段と前記平滑化手段とで行う処理を、撮像用画素値に対する重み係数を変えて2回行うとともに、2回目の処理では重み計数を「0」にして前記平滑化手段での処理のみを行う撮像装置。 In the imaging device according to claim 3 or 4,
The suppression means is
The processing performed by said smoothing means and said peripheral imaging pixel correction means performs 2 times by changing the weighting factor for an imaging pixel value, said smoothing means by the weighting count to "0" in the second treatment process only those rows cormorants imaging device in.
前記平滑化手段は、
隣接するAF画素の画素値を用いてクリップ範囲を算出する手段と、
一列に並ぶ焦点検出用画素列から遠い位置にある遠位撮像用画素の画素値と近い位置にある近位撮像用画素の画素値との差分から予測誤差を算出する手段と、
前記予測誤差がクリップ範囲から越えているか否かを判定する手段と、
前記クリップ範囲から外れている予測誤差を、前記クリップ範囲に含まれるようにクリッピングする手段と、
前記近位撮像用画素の画素値に前記クリッピング後の予測誤差を加算する手段と、
を備えている撮像装置。 In the imaging device according to any one of claims 3 to 5,
The smoothing means includes
Means for calculating a clip range using pixel values of adjacent AF pixels;
Means for calculating a prediction error from the difference between the pixel value of the proximal imaging pixel located at a position close to the pixel value of the distal imaging pixel located at a position far from the line of focus detection pixels arranged in a line;
Means for determining whether or not the prediction error exceeds a clip range;
Means for clipping a prediction error outside the clip range to be included in the clip range;
Means for adding the prediction error after clipping to the pixel value of the proximal imaging pixel;
Have that imaging device provided with a.
前記撮像素子からの信号によりフレアの発生を判定し、フレアが生じている場合、前記撮像用画素の画素値を補正し、前記撮像用画素の前記補正された画素値を用いて、焦点検出用画素における画像用の信号である補間画素値を生成する画素補間処理部と、 The occurrence of flare is determined based on the signal from the image sensor, and when flare occurs, the pixel value of the imaging pixel is corrected, and the corrected pixel value of the imaging pixel is used for focus detection. A pixel interpolation processing unit that generates an interpolated pixel value that is a signal for an image in a pixel;
を備えている撮像装置。 An imaging apparatus comprising:
フレアが生じていると前記フレア判定手段が判定する場合、前記画像を構成する画素値のうちの前記焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正し、補正した撮像用画素の画素値を平滑化するフレア抑制処理を行う抑制手段と、
前記抑制手段により平滑化された撮像用画素の画素値のうちの焦点検出用画素の近傍の撮像用画素の画素値を用いて焦点検出用画素の補間画素値を生成する画素補間処理手段と、
を備えている画像処理装置。 Flare determination means for determining whether or not flare is generated based on an image acquired from an image sensor having an imaging pixel that generates an image signal and a focus detection pixel that generates a focus detection signal ; ,
When the flare determination means determines that a flare has occurred, the pixel value of the imaging pixels around the focus detection pixel among the pixel values constituting the image is corrected by a weighting factor, and the corrected imaging Suppression means for performing flare suppression processing for smoothing the pixel value of the pixel;
Pixel interpolation processing means for generating an interpolation pixel value of a focus detection pixel using a pixel value of an imaging pixel in the vicinity of the focus detection pixel among pixel values of the imaging pixel smoothed by the suppression means;
It has that images processing device provided with a.
前記抑制手段は、前記フレア抑制処理を複数回行う画像処理装置。 The image processing apparatus according to claim 8 .
The suppressing means comprises a plurality of times rows planted image processing apparatus the flare suppression processing.
フレアが生じていると前記フレア判定ステップが判定する場合、前記画像を構成する画素値のうちの前記焦点検出用画素の周囲の撮像用画素の画素値を重み係数により補正し、補正した撮像用画素の画素値を平滑化するフレア抑制処理を行う抑制ステップと、
前記抑制ステップにより平滑化された撮像用画素の画素値のうちの焦点検出用画素の近傍の撮像用画素の画素値を用いて焦点検出用画素の補間画素値を生成する画素補間処理ステップと、
をコンピュータに実行させるためのプログラム。 A flare determination step for determining whether or not a flare is generated based on an image acquired from an image pickup element having an image pickup pixel that generates an image signal and a focus detection pixel that generates a focus detection signal ; ,
When the flare determination step determines that a flare has occurred, the pixel value of the imaging pixels around the focus detection pixel among the pixel values constituting the image is corrected by a weighting factor, and the corrected imaging A suppression step for performing flare suppression processing to smooth the pixel value of the pixel;
A pixel interpolation processing step of generating an interpolation pixel value of the focus detection pixel using a pixel value of the imaging pixel in the vicinity of the focus detection pixel among the pixel values of the imaging pixel smoothed by the suppression step;
A program that causes a computer to execute.
前記抑制ステップは、前記フレア抑制処理を複数回行う処理をコンピュータに実行させるためのプログラム。 The program according to claim 10 , wherein
The suppression step is a program for causing a computer to execute processing for performing the flare suppression processing a plurality of times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011145707A JP5834542B2 (en) | 2011-06-30 | 2011-06-30 | Imaging apparatus, image processing apparatus, program, and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011145707A JP5834542B2 (en) | 2011-06-30 | 2011-06-30 | Imaging apparatus, image processing apparatus, program, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013013007A JP2013013007A (en) | 2013-01-17 |
JP5834542B2 true JP5834542B2 (en) | 2015-12-24 |
Family
ID=47686490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011145707A Active JP5834542B2 (en) | 2011-06-30 | 2011-06-30 | Imaging apparatus, image processing apparatus, program, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5834542B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6087674B2 (en) * | 2013-02-27 | 2017-03-01 | キヤノン株式会社 | Imaging device |
JP2018093257A (en) | 2016-11-30 | 2018-06-14 | オリンパス株式会社 | Imaging apparatus |
WO2020003488A1 (en) * | 2018-06-29 | 2020-01-02 | 三菱電機株式会社 | Imaging device and line-variation-noise-reducing device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4935162B2 (en) * | 2006-04-11 | 2012-05-23 | 株式会社ニコン | Imaging apparatus, camera, and image processing method |
JP5163068B2 (en) * | 2007-11-16 | 2013-03-13 | 株式会社ニコン | Imaging device |
JP5219787B2 (en) * | 2008-12-24 | 2013-06-26 | キヤノン株式会社 | Imaging device |
JP2010178226A (en) * | 2009-01-30 | 2010-08-12 | Sony Corp | Imaging apparatus, chromatic aberration suppressing method, and chromatic aberration suppressing circuit, and program |
-
2011
- 2011-06-30 JP JP2011145707A patent/JP5834542B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013013007A (en) | 2013-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6040594B2 (en) | Imaging apparatus, image processing apparatus, and image processing program | |
JP5994778B2 (en) | Flare determination device, imaging device, and flare determination program | |
JP5200955B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
CN105049680B (en) | Carry out image processing equipment and image processing method that image restores processing | |
KR101263888B1 (en) | Image processing apparatus and image processing method as well as computer program | |
US10630920B2 (en) | Image processing apparatus | |
JP6227084B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
US20150281540A1 (en) | Image processing device, control method thereof, and program | |
CN110741632A (en) | Photographing device, photographing element, and image processing method | |
JP6630058B2 (en) | Imaging device, control method of imaging device, and program | |
JP5834542B2 (en) | Imaging apparatus, image processing apparatus, program, and recording medium | |
JP2014036262A (en) | Imaging device | |
JP5631769B2 (en) | Image processing device | |
JP5706705B2 (en) | Image processing apparatus, control method therefor, and imaging apparatus | |
JP4994158B2 (en) | Image correction device | |
JP2013125046A (en) | Imaging device and camera system | |
US20110292182A1 (en) | Camera module and image recording method | |
JP2013013006A (en) | Imaging apparatus, manufacturing method of the same, image processor, program and recording medium | |
JP2013247597A (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP6670844B2 (en) | Image processing apparatus, image processing method, and program | |
JP5412945B2 (en) | Imaging device, image processing apparatus, imaging apparatus, and image processing program | |
JP2014164236A (en) | Imaging device | |
JP6316140B2 (en) | Image processing apparatus, image processing method, and program | |
JP6727911B2 (en) | Image processing device, image processing method, and program | |
JP2024000839A (en) | Imaging device and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140627 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150206 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150310 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150511 |
|
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: 20151006 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151019 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5834542 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 |