JP5335452B2 - IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM - Google Patents
IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM Download PDFInfo
- Publication number
- JP5335452B2 JP5335452B2 JP2009015548A JP2009015548A JP5335452B2 JP 5335452 B2 JP5335452 B2 JP 5335452B2 JP 2009015548 A JP2009015548 A JP 2009015548A JP 2009015548 A JP2009015548 A JP 2009015548A JP 5335452 B2 JP5335452 B2 JP 5335452B2
- Authority
- JP
- Japan
- Prior art keywords
- luminance
- correction value
- brightness
- image data
- sky
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Exposure Control For Cameras (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、被写体を撮影して得られた画像データから被写体領域を検出する機能を備える撮像装置、撮像装置の制御方法及びプログラムに関する。 The present invention relates to an imaging apparatus having a function of detecting a subject area from image data obtained by photographing an object, a control side Ho及 beauty programs of the imaging apparatus.
従来、被写体を撮影して得られた画像データに基づいて自動的に露出を決定する自動露出制御機能を備えた撮像装置(デジタルカメラ)がある。撮像装置で自動露出制御のために行われる測光方式としては、例えば、画像データ全体の輝度を平均化して行う測光や、画像データを複数のブロックに分割し、各ブロックに重み付けをして測光を行う多分割測光がある。他にも、画像データの中央部に重点を置いて測光を行う中央重点測光や、画像データの中央部の任意の範囲のみ測光するスポット測光、等がある。 2. Description of the Related Art Conventionally, there is an imaging device (digital camera) having an automatic exposure control function that automatically determines exposure based on image data obtained by photographing a subject. As a photometric method performed for automatic exposure control in the imaging device, for example, photometry performed by averaging the luminance of the entire image data, or by dividing the image data into a plurality of blocks and weighting each block for photometry. There is multi-segment photometry. In addition, there are center-weighted metering in which metering is performed with emphasis on the center of image data, spot metering for metering only an arbitrary range in the center of image data, and the like.
また、被写体における主な撮影対象である主被写体の輝度が適正になるようにするために、画像表示部の画面を用いて主被写体が存在する主被写体領域を撮影者に指示させ、指示された主被写体領域の輝度に合わせて露出を調節する撮像装置がある。 In addition, in order to ensure that the luminance of the main subject that is the main shooting target in the subject is appropriate, the photographer is instructed to specify the main subject area where the main subject exists using the screen of the image display unit. There is an imaging device that adjusts the exposure according to the luminance of the main subject area.
更に、被写体を撮影して得られた画像データの中から形状解析等の手法により主被写体として例えば顔を自動的に検出し、検出された顔が適正な露出になるように自動露出制御を行う撮像装置が提案されている(例えば、特許文献1参照)。特許文献1記載の撮像装置では、画像データ全体の輝度が適正でも、顔がアンダー(黒っぽい(暗い)状態)である場合は画像データ全体を明るくし、顔がオーバー(白っぽい状態)である場合は画像データ全体を暗くする制御を行っている。このように、様々な撮影シーンにおいて主被写体の輝度が適正になるように撮影を行うことができる。
Further, for example, a face is automatically detected from the image data obtained by photographing the subject as a main subject by a technique such as shape analysis, and automatic exposure control is performed so that the detected face is exposed appropriately. An imaging device has been proposed (see, for example, Patent Document 1). In the imaging apparatus described in
しかしながら、上記の方法では、被写体を撮影して得られた画像データから検出した顔の輝度が適正になるように露出を制御するため、顔の輝度は適正になっても、背景の露出がオーバーまたはアンダーになってしまうことがある。そのような場合、画像全体として見た場合には失敗画像となってしまうといった問題があった。 However, in the above method, since the exposure is controlled so that the brightness of the face detected from the image data obtained by photographing the subject is appropriate, the background is overexposed even if the face brightness is appropriate. Or it may be under. In such a case, there has been a problem that when the entire image is viewed, it becomes a failed image.
従来は、上記のような失敗画像に対し画像処理を行うことで明るさを調節することも行われている。しかし、一般的に、露出オーバーの場合の方が露出アンダーの場合よりも画像処理後の画像のコントラストが低下するため、ぼやけた印象の画像になってしまうことが多い。 Conventionally, the brightness is also adjusted by performing image processing on the failed image as described above. However, in general, in the case of overexposure, the contrast of the image after image processing is lower than that in the case of underexposure, so that an image with a blurred impression is often obtained.
そこで、上記のような露出オーバーを抑制するための撮像装置が提案されている(例えば、特許文献2参照)。特許文献2記載の撮像装置では、主被写体の検出結果に基づいて自動露出制御を行う場合に、画像データ全体の輝度と画像データ中の主被写体領域の輝度を比較し、輝度の高い方が適正値となるよう露出制御することで、一方が露出オーバーになるのを抑制する。 Therefore, an imaging apparatus for suppressing the overexposure as described above has been proposed (see, for example, Patent Document 2). In the imaging apparatus described in Patent Document 2, when automatic exposure control is performed based on the detection result of the main subject, the luminance of the entire image data is compared with the luminance of the main subject region in the image data, and the higher luminance is more appropriate. By controlling the exposure so that it becomes a value, it is possible to prevent one from being overexposed.
しかしながら、特許文献2記載の撮像装置において、画像データ全体の輝度と主被写体領域の輝度が極端に異なる場合は、全体の測光値と被写体の測光値に基づいて露出制御を行っても露出制御が不十分な場合があった。 However, in the imaging apparatus described in Patent Document 2, when the brightness of the entire image data and the brightness of the main subject region are extremely different, exposure control is performed even if exposure control is performed based on the entire photometric value and the subject photometric value. In some cases, it was insufficient.
例えば、人物と空が写りこんだ撮影シーンにおいて、露出を全体の測光値に合わせた場合は人物が暗くなりすぎたり、逆に露出を人物の測光値に合わせた場合は空が白とびしたりする(空が白っぽく写る現象)問題があった。 For example, in a shooting scene in which a person and the sky are reflected, if the exposure is adjusted to the overall photometric value, the person will be too dark, or conversely if the exposure is adjusted to the photometric value of the person, the sky will be overexposed. There was a problem (a phenomenon in which the sky appears whitish).
撮影を行う際の照明が人工的な照明であれば、その照明の輝度が白とびしたとしても構図として何ら問題はない場合が多いが、背景の空は人物等の被写体と共に撮影対象として意図的に画角に含められていることが多い。そのため、人物と空のいずれか一方を適正な輝度とすることで、もう一方の輝度が破綻してしまうことは、好ましい構図の画像であるといえないことが多かった。 If the lighting used for shooting is artificial, there is often no problem with the composition even if the brightness of the lighting is overexposure. Are often included in the angle of view. For this reason, when one of the person and the sky is set to an appropriate luminance and the other luminance fails, it cannot often be said that the image has a preferable composition.
本発明の目的は、暗い被写体を明るく撮影することを可能とすると共に、背景の空が白っぽく写る現象を抑制することを可能とした撮像装置、撮像装置の制御方法及びプログラムを提供することにある。 An object of the present invention, along with making it possible to brightly shoot dark subject, possible to suppress the phenomenon that the empty background objects appear whitish and an imaging device, to provide a control side Ho及 beauty programs of the imaging apparatus It is in.
上記目的を達成するために、本発明の撮像装置は、撮像素子により被写体を撮像して得られた画像データから主被写体領域を検出する検出手段と、前記画像データの前記主被写体領域の輝度と、前記画像データの上部に位置する空領域の輝度を検出する測光手段と、前記空領域の輝度と前記空領域の許容輝度上限値の差分に応じた値を、前記主被写体領域の輝度と前記主被写体領域の輝度目標値の差分に加えることにより、主被写体用露出補正値を算出する算出手段と、前記主被写体用露出補正値に応じた値に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御手段と、を備えることを特徴とする。 In order to achieve the above object, an imaging apparatus according to the present invention includes a detecting unit that detects a main subject region from image data obtained by imaging a subject with an image sensor, and a luminance of the main subject region of the image data. , Photometric means for detecting the brightness of the sky area located above the image data, and a value corresponding to the difference between the brightness of the sky area and the allowable brightness upper limit value of the sky area, the brightness of the main subject area and the In addition to calculating the main subject exposure correction value by adding to the difference in the luminance target value of the main subject area, and when imaging with the imaging element based on the value according to the main subject exposure correction value And a control means for controlling the exposure.
本発明によれば、暗い被写体を明るく撮影することが可能となると共に、背景の空が白っぽく写る現象を抑制することが可能となる。 According to the present invention, it becomes possible to brightly shoot darker subject, it is possible to suppress the phenomenon of air objects appear whitish background.
以下、本発明の実施の形態を図面に基づいて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本発明の実施の形態に係る撮像装置の構成を示すブロック図である。 FIG. 1 is a block diagram showing a configuration of an imaging apparatus according to an embodiment of the present invention.
図1において、撮像装置100は、デジタルカメラとして構成されており、撮影レンズ10、シャッタ12、撮像素子14、画像処理回路20、システム制御部50、縦位置検知センサ75等を備えると共に、記録媒体200を内蔵している。尚、撮像装置100の以下の構成における本発明に直接関係しない箇所については説明を簡略化または省略する。
In FIG. 1, an
撮像素子14は、撮影対象(被写体)の撮影に伴い撮影レンズ10及び絞り機能を備えるシャッタ12を介して結像された被写体の光学像を電気信号に変換する。レンズバリア102は、撮像部(撮影レンズ10、撮像素子14を含む)を覆うことで撮像部の汚れや破損を防止する。A/D変換器16は、撮像素子14から出力されるアナログ信号をデジタル信号に変換する。タイミング発生回路18は、メモリ制御回路22及びシステム制御部50により制御され、撮像素子14、 A/D変換器16、 D/A変換器26にクロック信号と制御信号を供給する。
The
画像処理回路20は、 A/D変換器16或いはメモリ制御回路22から出力される画像データに対して所定の画素補間処理や色変換処理を行う。また、画像処理回路20は、撮像した画像データを用いて所定の演算処理を行い、TTL(スルー・ザ・レンズ)方式のAF(オートフォーカス)処理、AE(自動露出)処理、EF(フラッシュプリ発光)処理を行う。この場合、画像処理回路20の演算結果に基づいてシステム制御部50が露光制御回路40、測距制御回路42に対して制御を行う。
The
また、画像処理回路20は、撮像した画像データを用いて所定の演算処理を行い、その演算結果に基づいてTTL方式のAWB(オートホワイトバランス)処理も行う。更に、画像処理回路20は、顔検出回路(検出手段)を備えており、A/D変換器16或いはメモリ制御回路22から出力される画像データから人物の顔領域の検出を行い、検出された顔領域に係る情報をシステム制御部50に通知する。
Further, the
メモリ制御回路22は、A/D変換器16、タイミング発生回路18、画像処理回路20、画像表示メモリ24、D/A変換器26、メモリ30、圧縮・伸張回路32を制御する。A/D変換器16から出力される画像データは、画像処理回路20及びメモリ制御回路22を介して或いは直接メモリ制御回路22を介して、画像表示メモリ24或いはメモリ30に書き込まれる。
The
画像表示部28は、TFT LCD等から構成され、画像表示メモリ24に書き込まれD/A変換器26を介して出力された表示用の画像データを表示する。また、画像表示部28は、撮像部から出力される画像データに対応した画像を表示するスルー表示が可能である。撮像した画像を画像表示部28により逐次表示すれば、電子ファインダ機能を実現することが可能である。また、画像表示部28は、システム制御部50の指示により任意に表示をON/OFFすることが可能である。
The
メモリ30は、撮影対象を撮影した静止画や動画を格納するものであり、所定枚数の静止画や所定時間の動画を格納するのに十分な記憶量を備えている。これにより、複数枚の静止画を連続して撮影する連写撮影やパノラマ撮影の場合にも、高速かつ大量の画像書き込みをメモリ30に対して行うことが可能となる。また、メモリ30は、システム制御部50の作業領域としても使用することが可能である。
The
圧縮・伸張回路32は、メモリ30に格納された画像データを読み込んで、適応離散コサイン変換(ADCT)、ウェーブレット変換等により圧縮処理或いは伸張処理を行い、処理を終えた画像データをメモリ30に書き込む。暗号/復号回路34は、撮影に伴いメモリ30の所定領域に記憶された画像データに対して必要に応じて暗号化処理を行うと共に、暗号化処理を行ってメモリ30の所定領域に記憶された画像データを再生表示する際に復号化処理を行う。
The compression /
露光制御回路40は、シャッタ12を制御すると共に、フラッシュ48と連携することによりフラッシュ調光機能も有する。測距制御回路42は、撮影レンズ10のフォーカシングを制御する。ズーム制御回路44は、撮影レンズ10のズーミングを制御する。レンズバリア制御回路46は、レンズバリア102の動作を制御する。フラッシュ48は、AF補助光の投光機能、フラッシュ調光機能も有する。露光制御回路40、測距制御回路42はTTL方式を用いて制御される。
The
システム制御部50(算出手段、制御手段)は、撮像装置100全体の制御を司る。また、システム制御部50は、撮像された画像データを画像処理回路20により演算した演算結果に基づき、露光制御回路40、測距制御回路42に対して制御を行う。また、システム制御部50は、本発明のプログラムに基づき後述の各フローチャートに示す処理を実行する。
A system control unit 50 (calculation unit, control unit) controls the
システムメモリ52は、システム制御部50の動作用の定数、変数、本発明のプログラム等を記憶する。不揮発性メモリ56は、例えばEEPROM、フラッシュメモリ等から構成されており、データを記憶する。
The
表示部54は、LCD、LED、発音素子等から構成され、システム制御部50でのプログラムの実行に応じて、文字、画像、音声等を用いて動作状態やメッセージ等を報知する。また、表示部54は、その一部の機能が光学ファインダ104内に設けられている。表示部54の表示内容は省略する。電源スイッチ(メインスイッチ)60は、撮像装置100の電源のON/OFFの切り替え、撮像装置100に接続された各種付属装置の電源のON/OFFの切り替えを行う際に操作する。
The
第1シャッタスイッチSW1・62は、シャッタボタン(不図示)の操作途中で第1シャッタスイッチ信号SW1がONとなり、AF処理、AE処理、AWB処理、EF処理等の動作開始を指示する際に操作する。第2シャッタスイッチSW2・64は、シャッタボタンの操作完了で第2シャッタスイッチ信号SW2がONとなり、一連の処理(露光処理、現像処理、記録処理)の動作開始を指示する際に操作する。 The first shutter switches SW1 and 62 are operated when the first shutter switch signal SW1 is turned ON during the operation of a shutter button (not shown) and an operation start such as AF processing, AE processing, AWB processing, and EF processing is instructed. To do. The second shutter switch SW2, 64 is operated when the second shutter switch signal SW2 is turned ON upon completion of the operation of the shutter button, and an operation start of a series of processing (exposure processing, development processing, recording processing) is instructed.
ここで、露光処理は、撮像素子14から読み出した信号をA/D変換器16、メモリ制御回路22を介してメモリ30に画像データとして書き込む処理である。現像処理は、画像処理回路20とメモリ制御回路22での演算を用いた処理である。記録処理は、メモリ30から画像データを読み出し、圧縮・伸張回路32で圧縮を行い、記録媒体200に画像データを書き込む処理である。
Here, the exposure process is a process of writing a signal read from the
操作部70は、各種ボタン(メニューボタン、セットボタン、AF枠設定用の操作部材等)、各種スイッチ(圧縮モードスイッチ、レックレビュースイッチ等)、タッチパネル等から構成されている。各種ボタンと各種スイッチの詳細は省略する。モード切替スイッチ72は、各種機能モード(自動撮影モード、撮影モード、パノラマ撮影モード、静止画記録モード、動画記録モード、再生モード、PC接続モード等)の切り替え設定を行う際に操作する。
The
縦位置検知センサ75(検知手段)は、撮像装置100の姿勢が縦位置(例えば通常は横にした状態で使用するデジタルカメラを縦にした状態の姿勢)であるか、横位置(デジタルカメラを横にした状態の姿勢)であるかを検知する。システム制御部50は、縦位置検知センサ75の検知結果に基づき、撮像素子14により被写体を撮像して得られた画像データにおける上部の領域である背景の空領域を決定する。また、システム制御部50は、画像データの輝度分布に基づき、画像データにおける上部の領域である背景の空領域を決定する。
The vertical position detection sensor 75 (detection means) is configured such that the posture of the
電源制御回路80は、電池検出回路、DC−DCコンバータ、通電するブロックを切り替えるスイッチ回路等から構成されている。電源制御回路80は、電池の装着の有無、電池の種類、電池残量の検出を行い、検出結果及びシステム制御部50の指示に基づいてDC−DCコンバータを制御し、必要な電圧を必要な期間、記録媒体200を含む各部へ供給する。電源86は、一次電池(アルカリ電池、リチウム電池等)、二次電池(NiCd電池、NiMH電池、Li-ion電池等)、ACアダプタ等から構成され、コネクタ84、82を介して電源制御回路80に接続される。
The power
インタフェース部90は、記録媒体200とのインタフェースを司る。光学ファインダ104は、画像表示部28による電子ファインダ機能を使用すること無しに該光学ファインダ104のみを用いて撮影を行うことが可能に構成されている。光学ファインダ104内には、表示部54の一部の機能(合焦表示、手振れ警告表示、フラッシュ充電表示、シャッタ速度表示、絞り値表示、露出補正表示等)が設けられている。
The
記録媒体200は、メモリカード或いはハードディスク等から構成され、半導体メモリや磁気ディスク等から構成される記録部202、撮像装置100とのインタフェースを司るインタフェース部204、コネクタ206を備えている。記録媒体200は、コネクタ206、92を介してインタフェース部90に接続される。本実施の形態では、記録媒体200は撮像装置100に内蔵されている。
The
次に、上記の構成を備える本実施の形態の撮像装置の動作について図2〜図12を参照しながら説明する。 Next, the operation of the imaging apparatus according to the present embodiment having the above configuration will be described with reference to FIGS.
図2は、撮像装置の全体的な動作を示すフローチャートである。 FIG. 2 is a flowchart showing the overall operation of the imaging apparatus.
図2において、撮影者により撮像装置の電源スイッチ60が操作され電源がONに切り替わると、撮像装置のシステム制御部50は、フラグと制御変数を初期化する(ステップS201)。次に、システム制御部50は、記録媒体200に記録されているファイルに関する管理処理を開始する(ステップS201)。次に、システム制御部50は、撮影者がモード切替スイッチ72により設定したモードが、静止画記録モードであるか動画記録モードであるか再生モードであるかを判定する(ステップS203、ステップS205、ステップS207)。
In FIG. 2, when the photographer operates the
モード切替スイッチ72が静止画記録モードに設定されていた場合、システム制御部50は、静止画記録モード処理を実行する(ステップS204)。静止画記録モード処理の詳細は図3を用いて後述する。モード切替スイッチ72が動画記録モードに設定されていた場合、システム制御部50は、動画記録モード処理を実行する(ステップS206)。モード切替スイッチ72が再生モードに設定されていた場合、システム制御部50は、再生モード処理を実行する(ステップS208)。
When the
モード切替スイッチ72が上記モード以外のその他のモードに設定されていた場合、システム制御部50は、設定されたモードに応じた処理を実行する(ステップS209)。
When the
システム制御部50は、モード切替スイッチ72により設定されたモードに対応した処理(ステップS204、ステップS206、ステップS208、ステップS209の何れか)を実行した後、電源スイッチ60の設定位置を判定する(ステップS210)。電源スイッチ60がONに設定されていた場合、ステップS203に処理を戻す。一方、電源スイッチ60がOFFに設定されていた場合、システム制御部50は、終了処理を行い、撮像装置の電源をOFF状態へ移行させる(ステップS211)。
The
図3は、図2の静止画記録モード処理(ステップS204)の詳細を示すフローチャートである。尚、静止画記録モード処理は、撮影者がモード切替スイッチ72により静止画記録モードを他のモードに切り替えた場合や電源スイッチ60をOFFに切り替えた場合に、割り込み処理等により終了するものとする。
FIG. 3 is a flowchart showing details of the still image recording mode process (step S204) of FIG. Note that the still image recording mode process is terminated by an interrupt process or the like when the photographer switches the still image recording mode to another mode by the
図3において、撮像装置のシステム制御部50は、静止画記録モード処理を開始すると、撮影モードを確定する(ステップS301)。操作部70が操作され撮影モードを設定する入力があった場合には、その設定に従った撮影モードに確定し、入力がない場合には前回の静止画記録モード処理の終了時における撮影モードに確定する。
In FIG. 3, the
次に、システム制御部50は、上記のステップS301で撮影モードが確定すると、撮像部から出力される画像データに対応した画像を画像表示部28に表示するスルー表示を行う(ステップS302)。次に、システム制御部50は、電源制御部80を用いて電源86(電池)の残容量を確認すると共に、インタフェース部90を介して記録媒体200の有無と残容量を確認し、撮像装置100の動作に問題があるか否かを判定する(ステップS303)。
Next, when the shooting mode is determined in step S301 described above, the
撮像装置100の動作に問題がある場合は、システム制御部50は、画像表示部28を用いて画像や音声により所定の警告表示を行い(ステップS304)、処理をステップS301に戻す。撮像装置100の動作に問題が無い場合は、システム制御部50は、必要に応じてフォーカスに関連する設定を更新する(ステップS305)。ここでは、操作部70のメニューボタンを押すことで画像表示部28に表示されるメニュー画面から、画像データから検出した顔位置に応じてAFエリアを設定する「顔優先」の適用の有無について、撮影者が任意に設定することができる。
If there is a problem with the operation of the
次に、システム制御部50は、AF枠設定が「顔優先」であるか否かを判断する(ステップS306)。AF枠設定が「顔優先」でない場合は、直接、ステップS308に進む。AF枠設定が「顔優先」である場合は、システム制御部50は、画像処理回路20から通知された画像処理回路20内の顔検出回路の顔検出結果に基づいて、上記スルー表示される画像に重畳表示する顔枠の更新処理を行う(ステップS307)。その後、ステップS308に進む。
Next, the
次に、システム制御部50は、第1シャッタスイッチSW1・62の第1シャッタスイッチ信号SW1がONしているか否かを判定する(ステップS308)。第1シャッタスイッチ信号SW1がOFFの場合は、ステップS305に戻り、ステップS305、ステップS306を繰り返す。一方、第1シャッタスイッチ信号SW1がONの場合は、ステップS309に進む。
Next, the
次に、システム制御部50は、撮影対象(被写体)の輝度を測定する測光処理を行うことで、絞り値、シャッタ時間(シャッタ速度)及び感度を含む露出条件を決定する(ステップS309)。測光処理の詳細は図4を用いて後述する。尚、測光処理において、必要であればフラッシュ48の設定も行われる。システム制御部50は、測光処理を行った測光結果に基づいて、全体輝度補正値、顔補正値、最終露出補正値を算出する。詳細は後述する。次に、システム制御部50は、測距処理を行うことで撮影レンズ10の焦点を被写体に合わせる(ステップS310)。
Next, the
次に、システム制御部50は、第1シャッタスイッチSW1信号2と第2シャッタスイッチSW2信号のON/OFF状態を判定する(ステップS311、ステップS312)。第1シャッタスイッチ信号SW1がONした状態で第2シャッタスイッチ信号SW2がONになると、ステップS313に進む。
Next, the
第1シャッタスイッチ信号SW1がOFFになると(第2シャッタスイッチ信号SW2がONせずに(OFF)、更に第1シャッタスイッチ信号SW1も解除(OFF)された場合)、ステップS305へ戻る。また、第1シャッタスイッチ信号SW1がON、第2シャッタスイッチ信号SW2がOFFの間は、ステップS311、ステップS312の処理を繰り返す。 When the first shutter switch signal SW1 is turned off (when the second shutter switch signal SW2 is not turned on (OFF) and the first shutter switch signal SW1 is also released (OFF)), the process returns to step S305. Further, while the first shutter switch signal SW1 is ON and the second shutter switch signal SW2 is OFF, the processes of Step S311 and Step S312 are repeated.
撮影者により第2シャッタスイッチSW2・64が押されると、システム制御部50は、画像表示部28の表示状態をスルー表示状態から固定色表示状態に設定する(ステップS313)。次に、システム制御部50は、撮影処理(露光処理と現像処理を含む)を実行する(ステップS314)。
When the second shutter switch SW2, 64 is pressed by the photographer, the
尚、露光処理では、A/D変換器16、画像処理回路20、メモリ制御回路22を介して、或いはA/D変換器16から直接メモリ制御回路22を介して、撮像した画像データをメモリ30に書き込む。また、現像処理では、システム制御部50が、必要に応じてメモリ30に書き込まれた画像データを読み出して各種処理を行う。撮影処理の詳細は図5を用いて後述する。
In the exposure process, captured image data is stored in the
次に、システム制御部50は、画像表示部28に対し撮影処理で得られた画像データに対応した撮影画像のレックレビュー表示を行う(ステップS315)。レックレビューとは、撮影画像の確認のために、被写体の撮影後に記録媒体200に画像データを記録する前に、予め決められた時間(レビュー時間)だけ撮影画像を画像表示部28に表示する処理である。システム制御部50は、レックレビュー表示を行った後、撮影処理で得られた画像データを画像ファイルとして記録媒体200に対して書き込む記録処理を実行する(ステップS316)。
Next, the
次に、システム制御部50は、第2シャッタスイッチ信号SW2のON/OFF状態を判定する(ステップS317)。第2シャッタスイッチ信号SW2がONの場合は、ステップS317の判定を繰り返し、第2シャッタスイッチ信号SW2がOFFになるのを待つ。この間、上記レックレビュー表示を継続させる。
Next, the
即ち、ステップS316の記録処理が終了した際に、第2シャッタスイッチ信号SW2がOFFになるまで画像表示部28におけるレックレビュー表示を継続させる。このように構成することにより、撮影者は、シャッタボタン(不図示)の全押し状態を継続することで、レックレビューを用いた撮影画像の確認を入念に行うことが可能となる。
That is, when the recording process in step S316 is completed, the REC review display on the
撮影者がシャッタボタンを全押し状態にして撮影を行った後、シャッタボタンから手を放すなどして全押し状態が解除されると、処理はステップS317からステップS318に進む。システム制御部50は、予め定められたレビュー時間が経過したか否かを判断する(ステップS318)。レビュー時間が経過していればステップS319に進む。
After the photographer has taken a picture with the shutter button fully depressed, the process proceeds from step S317 to step S318 when the full push state is released by releasing the shutter button. The
次に、システム制御部50は、画像表示部28の表示状態をレックレビュー表示からスルー表示状態に戻す(ステップS319)。この処理により、撮影者がレックレビュー表示により撮影画像を確認した後、画像表示部28の表示状態は次の撮影のために撮像部から出力される画像データに対応した画像を逐次表示するスルー表示状態に自動的に切り替わることになる。
Next, the
次に、システム制御部50は、第1シャッタスイッチ信号SW1のON/OFF状態を判定する(ステップS320)。第1シャッタスイッチ信号SW1がONの場合はステップS311へ処理を戻し、第1シャッタスイッチ信号SW1がOFFの場合はステップS305へ処理を戻す。
Next, the
即ち、シャッタボタンの半押し状態が継続している(第1シャッタスイッチ信号SW1がON)場合は、システム制御部50は次の撮影に備える(ステップS311)。一方、シャッタボタンが放された状態(第1シャッタスイッチ信号SW1がOFF)の場合は、システム制御部50は、一連の撮影動作を終えて撮影待機状態に戻る(ステップS305)。
That is, if the shutter button is half-pressed (the first shutter switch signal SW1 is ON), the
図4a、図4bは、図3の測光処理(ステップS309)の詳細を示すフローチャートである。 4a and 4b are flowcharts showing details of the photometric process (step S309) in FIG.
図4a、図4bにおいて、撮像装置のシステム制御部50は、撮像素子14から読み出された被写体を撮像して得た画像データに基づいて次の算出を行う。撮像素子14の露光面には、中心部を同じくして、この露光面の90%の大きさを占める測光領域(測光手段)が設定されており、この測光領域に対応する画像データの領域の輝度が求められる。この測光領域は、おおよそ露光面全体の輝度が求められる大きさに設定されていればよく、一般的に露光面の70〜100%程度の大きさを占めるように設定されている。
4A and 4B, the
この測光領域(全体領域)を水平HMAX、垂直VMAXに分割したHMAX×VMAXの領域内のそれぞれにおいて平均輝度Y(h, v)(h=0,1,…,HMAX-1 v=0,1,…,VMAX-1)を算出する(ステップS401)。以下、領域毎の平均輝度Y(h, v)をブロック輝度と表記する。HMAX、VMAXは設計パラメータであり、例えばHMAX=8、VMAX=8とする。すなわち、画像データには、HMAX×VMAXの複数ブロックからなる測光領域が設定されていることになる。 The average brightness Y (h, v) (h = 0,1, ..., HMAX-1 v = 0,1 in each of the HMAX × VMAX areas obtained by dividing this photometric area (entire area) into horizontal HMAX and vertical VMAX ,..., VMAX-1) are calculated (step S401). Hereinafter, the average luminance Y (h, v) for each region is referred to as block luminance. HMAX and VMAX are design parameters. For example, HMAX = 8 and VMAX = 8. That is, a photometric area composed of a plurality of blocks of HMAX × VMAX is set in the image data.
次に、システム制御部50は、ステップS401で求めたブロック輝度Y(h, v)を用いて以下の算出を行う。即ち、逆光補正値DeltaBvCを算出する(ステップS402)。また、空補正値DeltaBvSを算出する(ステップS403)。また、輝度補正値BvLを算出する(ステップS404)。逆光補正値DeltaBvC算出処理の詳細は図6a、図6b、空補正値DeltaBvS算出処理の詳細は図7a、図7bを用いて後述する。
Next, the
この場合、システム制御部50は、輝度補正値BvLについては被写体の輝度に応じて輝度補正値BvLを設定する(ステップS404)。尚、逆光補正値とは、被写体を逆光で撮影する場合を想定した際の、逆光による影響を抑制するための輝度補正値である。また、空補正値とは、背景として空がある被写体を撮影する場合を想定した際の、空による影響を抑制するための輝度補正値である。
In this case, the
次に、システム制御部50は、上記の逆光補正値DeltaBvC、空補正値DeltaBvS、輝度補正値BvLに基づき、以下の算出を行う。即ち、撮像素子14の測光領域全体としての輝度を適正値にする場合を想定した際の輝度補正値である全体輝度補正値DeltaBvAllを算出する(ステップS405)。全体輝度補正値(全体用露出補正値)DeltaBvAll算出処理の詳細は図8を用いて後述する。
Next, the
次に、システム制御部50は、画像処理回路20から通知された画像処理回路20内の顔検出回路の顔検出結果(顔検出情報)を参照し、被写体を撮像して得た画像データから顔が検出されているか否かを判断する(ステップS406)。被写体を撮像して得た画像データから顔が検出されていない場合は、システム制御部50は、全体輝度補正値DeltaBvAllを最終露出補正値LastHoseiDeltaBvとし(ステップS407)、測光処理を終了する。
Next, the
他方、被写体を撮像して得た画像データから顔が検出された場合は、システム制御部50は、ブロック輝度Y(h, v)と画像処理回路20から通知された顔検出情報を用いて、顔補正値DeltaBvFaceを算出する(ステップS408)。顔補正値(主被写体用露出補正値)DeltaBvFace算出処理の詳細は図9を用いて後述する。
On the other hand, when a face is detected from the image data obtained by imaging the subject, the
顔が検出された場合、露出制御後に、顔補正値DeltaBvFaceが所定の範囲に収まるように最終露出補正値LastHoseiDeltaBvを算出する。前記所定の範囲は、画像データの低輝度部分をゲインアップする際のゲインアップ量に基づいて決定する。また、顔が検出された場合、画像データの主被写体領域(顔領域)の大きさに基づいて最終露出補正値LastHoseiDeltaBvを算出する。 When a face is detected, the final exposure correction value LastHoseiDeltaBv is calculated so that the face correction value DeltaBvFace falls within a predetermined range after exposure control. The predetermined range is determined based on a gain-up amount when gain-up is performed on a low-luminance portion of image data. If a face is detected, the final exposure correction value LastHoseiDeltaBv is calculated based on the size of the main subject area (face area) of the image data.
次に、システム制御部50は、顔補正値DeltaBvFaceから全体輝度補正値DeltaBvAllを引いた差分Delta1を求める(ステップS409)。差分Delta1が閾値MIN_DELTAより小さい場合は(ステップS410でYES)、システム制御部50は、閾値MIN_DELTAをDelta1とする(ステップS411)。また、差分Delta1が閾値MAX_DELTAより大きい場合は(ステップS412でYES)、システム制御部50は、閾値MAX_DELTAをDelta1とする(ステップS413)。尚、MIN_DELTA、MAX_DELTAは設計パラメータであり、MIN_DELTA < MAX_DELTAを満たすものとする。
Next, the
次に、システム制御部50は、被写体を撮像して得た画像データから検出された顔の大きさに応じて混合比MixRatio1を求める(ステップS414)。この場合、0≦MixRatio1 ≦1 とし、被写体の画像データから検出された顔が大きいほど混合比MixRatio1が大きくなるように設定する。次に、システム制御部50は、求めた差分Delta1、混合比MixRatio1、全体輝度補正値DeltaBvAllを用いて顔補正値DeltaBvFaceを更新する(ステップS415)。
Next, the
上記のステップS409〜ステップS415の処理により、顔補正値DeltaBvFaceが「DeltaBvAll + MIN_DELTA」から「DeltaBvAll + MAX_DELTA」の範囲に収まるようにする。これと共に、被写体の画像データから検出された顔が大きいほど顔の影響が大きくなるよう顔補正値を更新している。 The face correction value DeltaBvFace is adjusted to fall within the range of “DeltaBvAll + MIN_DELTA” to “DeltaBvAll + MAX_DELTA” by the processing in steps S409 to S415 described above. Along with this, the face correction value is updated so that the larger the face detected from the image data of the subject, the greater the influence of the face.
次に、システム制御部50は、全体輝度補正値DeltaBvAllが上記のステップS415で更新した顔補正値DeltaBvFaceよりも大きいか否かを判断する(ステップS416)。全体輝度補正値DeltaBvAllが顔補正値DeltaBvFaceよりも大きくない場合は、システム制御部50は、顔補正値DeltaBvFaceを最終露出補正値LastHoseiDeltaBvとする(ステップS420)。これにより、測光処理を終了する。
Next, the
上記の各DeltaBvは、実際の輝度が目標値からどれだけ乖離しているかを示しており、実際の輝度が目標値より大きい場合に大きい(正の)値になり、実際の輝度が目標値より小さい場合に小さい(負の)値になる。顔補正値DeltaBvFaceは、顔領域の輝度について、実際の輝度と目標値のずれを表している。全体輝度補正値DeltaBvAllは、測光領域全体輝度について、実際の輝度と目標値のずれを表している。最終的な露出制御は、現在の露出を最終露出補正値LastHoseiDeltaBv分ずらすように行われる。 Each DeltaBv above indicates how much the actual brightness deviates from the target value. When the actual brightness is greater than the target value, the value becomes larger (positive), and the actual brightness is less than the target value. Small (negative) value when small. The face correction value DeltaBvFace represents the difference between the actual brightness and the target value with respect to the brightness of the face area. The overall brightness correction value DeltaBvAll represents the deviation between the actual brightness and the target value for the overall brightness of the photometric area. Final exposure control is performed such that the current exposure is shifted by the final exposure correction value LastHoseiDeltaBv.
ステップS416を経てステップS420に処理が進んだ場合(顔補正値DeltaBvFaceが全体輝度補正値DeltaBvAllよりも大きい場合)は、顔の目標値に合わせて露出制御が行われる。詳細は後述する。顔領域は目標値に近づき、背景(測光領域全体)は目標より暗い露出になる。これは、顔領域を主被写体領域として優先しているためであり、顔が目標より明るくなることを優先的に防いでいる。この様子を図10(a)及び図10(b)に示す。 When the process proceeds to step S420 via step S416 (when the face correction value DeltaBvFace is larger than the overall luminance correction value DeltaBvAll), exposure control is performed in accordance with the face target value. Details will be described later. The face area approaches the target value, and the background (entire photometric area) is darker than the target. This is because priority is given to the face area as the main subject area, which preferentially prevents the face from becoming brighter than the target. This is shown in FIGS. 10 (a) and 10 (b).
図10(a)、図10(b)、図10(c)、図10(d)は、顔補正値DeltaBvFaceと全体輝度補正値DeltaBvAllの現在の関係、及び、最終露出補正値LastHoseiDeltaBvに基づき露出制御を行った後の関係を示している。 10A, 10B, 10C, and 10D show the exposure based on the current relationship between the face correction value DeltaBvFace and the overall luminance correction value DeltaBvAll, and the final exposure correction value LastHoseiDeltaBv. The relationship after control is shown.
図10(a)及び図10(b)では、縦軸にDeltaBvをとっており、○が顔補正値DeltaBvFace、△が全体輝度補正値DeltaBvAllである。図10(a)及び図10(b)は、どちらもDeltaBvAll < DeltaBvFaceの場合であり、露出制御後に顔補正値DeltabvFaceが0になる(LastHoseiDeltaBv = DeltaBvFace)。即ち、顔領域の輝度に合わせて露出制御を行う様子を示している。 In FIGS. 10A and 10B, the vertical axis represents DeltaBv, and ◯ is the face correction value DeltaBvFace, and Δ is the overall luminance correction value DeltaBvAll. FIGS. 10A and 10B both show the case of DeltaBvAll <DeltaBvFace, and the face correction value DeltabvFace becomes 0 after the exposure control (LastHoseiDeltaBv = DeltaBvFace). That is, it shows how exposure control is performed in accordance with the brightness of the face area.
全体輝度補正値DeltaBvAllが顔補正値DeltaBvFaceよりも大きい場合(ステップS416でYES)、システム制御部50は次の判断を行う。即ち、顔補正値DeltaBvFaceから全体輝度補正値DeltaBvAllを引いた差分が閾値MIN_DELTABV_FACEより大きいか否かを判断する(ステップS417)。
If the overall brightness correction value DeltaBvAll is greater than the face correction value DeltaBvFace (YES in step S416), the
顔補正値DeltaBvFaceから全体輝度補正値DeltaBvAllを引いた差分が閾値MIN_DELTABV_FACEより大きい場合は、システム制御部50は次の処理を行う。即ち、全体輝度補正値DeltaBvAllを最終露出補正値LastHoseiDeltaBvとする(ステップS418)。これにより、測光処理を終了する。但し、MIN_DELTABV_FACE < 0 とする。
When the difference obtained by subtracting the overall brightness correction value DeltaBvAll from the face correction value DeltaBvFace is larger than the threshold value MIN_DELTABV_FACE, the
この場合は、全体輝度補正値DeltaBvAllに基づき露出を測光領域全体に合わせたとしても、顔領域の輝度の目標値との差分を閾値MIN_DELTABV_FACE以内に抑えることができる。そのため、最終露出を測光領域全体輝度の目標値に合わせるよう制御する。この様子を図10(c)に示す。 In this case, even if the exposure is adjusted to the entire photometric area based on the overall brightness correction value DeltaBvAll, the difference from the target brightness value of the face area can be suppressed within the threshold MIN_DELTABV_FACE. Therefore, the final exposure is controlled so as to match the target value of the entire photometric area luminance. This state is shown in FIG.
図10(c)は、DeltaBvFace -DeltaBvAll > MIN_DELTABV_FACEとなっており、露出制御後に全体輝度補正値DeltaBvAllが0になる(LastHoseiDeltaBv = DeltaBvAll)。即ち、測光領域全体の輝度に合わせて露出制御を行う様子を示している。測光領域全体輝度に露出を合わせても、顔領域の輝度が閾値MIN_DELTABV_FACEより小さくならないことがわかる。 FIG. 10C shows DeltaBvFace-DeltaBvAll> MIN_DELTABV_FACE, and the overall brightness correction value DeltaBvAll becomes 0 after the exposure control (LastHoseiDeltaBv = DeltaBvAll). That is, the exposure control is performed in accordance with the brightness of the entire photometric area. It can be seen that the brightness of the face area does not become smaller than the threshold MIN_DELTABV_FACE even if the exposure is adjusted to the brightness of the entire photometric area.
顔補正値DeltaBvFaceから全体輝度補正値DeltaBvAllを引いた差分が閾値MIN_DELTABV_FACEより大きくない場合(ステップS417でNO)、システム制御部50は次の処理を行う。即ち、DeltaBvFace-MIN_DELTABV_FACEを最終露出補正値LastHoseiDeltaBvとする(ステップS419)。これにより、測光処理を終了する。
If the difference obtained by subtracting the overall brightness correction value DeltaBvAll from the face correction value DeltaBvFace is not larger than the threshold value MIN_DELTABV_FACE (NO in step S417), the
この場合は、全体輝度補正値DeltaBvAllに基づき露出を測光領域全体に合わせてしまうと、顔領域の輝度が閾値MIN_DELTABV_FACEより小さくなってしまう。そのため、顔領域の輝度の目標値との差分がMIN_DELTABV_FACEになるように最終露出補正値LastHoseiDeltaBvを決定している。この様子を図10(d)に示す。 In this case, if the exposure is matched to the entire photometric area based on the overall brightness correction value DeltaBvAll, the brightness of the face area becomes smaller than the threshold value MIN_DELTABV_FACE. Therefore, the final exposure correction value LastHoseiDeltaBv is determined so that the difference from the target brightness value of the face area is MIN_DELTABV_FACE. This state is shown in FIG.
図10(d)では、DeltaBvFace -DeltaBvAll < MIN_DELTABV_FACEとなっている。露出制御後に背景(測光領域全体)の輝度は目標値よりも大きくなるが、顔領域の輝度が閾値MIN_DELTABV_FACEになり、顔領域の輝度の目標値との差分が一定の範囲内に収まっていることが分かる。 In FIG. 10D, DeltaBvFace-DeltaBvAll <MIN_DELTABV_FACE. The brightness of the background (entire photometry area) is higher than the target value after exposure control, but the brightness of the face area is the threshold MIN_DELTABV_FACE, and the difference from the target brightness value of the face area is within a certain range. I understand.
尚、閾値MIN_DELTABV_FACEは、後述の画像処理(図5のステップS507)で行う暗部補正処理のゲインアップ量に応じて決定してもよい。暗部補正処理は、画像データの暗い部分(低輝度部分)をゲインアップする処理であり、顔領域が暗い場合に顔を明るくすることができる。 Note that the threshold value MIN_DELTABV_FACE may be determined according to the gain increase amount of the dark portion correction processing performed in the image processing described later (step S507 in FIG. 5). The dark part correction process is a process for gaining up a dark part (low luminance part) of the image data, and can brighten the face when the face region is dark.
そのため、測光処理(図3のステップS309(図4a、図4b))の時点では、顔領域が目標より暗部補正処理におけるゲインアップ分暗くても問題なく、閾値MIN_DELTABV_FACEをより小さく設定することができる。閾値MIN_DELTABV_FACEを小さく設定することで、全体輝度補正値DeltaBvAllが大きい場合にも測光領域全体輝度を目標に近づけることが可能となる。 Therefore, at the time of the photometric process (step S309 in FIG. 3 (FIGS. 4a and 4b)), it is possible to set the threshold MIN_DELTABV_FACE to be smaller without causing any problem even if the face region is darker than the target by the gain increase in the dark part correction process. . By setting the threshold value MIN_DELTABV_FACE small, it is possible to bring the entire photometric area luminance closer to the target even when the total luminance correction value DeltaBvAll is large.
図5は、図3の撮影処理(ステップS314)の詳細を示すフローチャートである。 FIG. 5 is a flowchart showing details of the photographing process (step S314) of FIG.
図5において、撮像装置のシステム制御部50は、撮像装置の撮影が開始された時にその撮影開始日時をシステムタイマ(不図示)より取得し、システムメモリ52に記憶する(ステップS501)。次に、システム制御部50は、測光処理(ステップS309)に用いた画像データを撮影したときの絞り値と露光時間から、この測光処理に用いた画像データを撮影したときの露出量Evを求める。そして、この露出量Evに対して、測光処理(ステップS309)で求めた最終露出補正値LastHoseiDeltaBvを補償するだけの修正を加え、最終露出量LastEvを求める。
In FIG. 5, the
システム制御部50は、測光処理(ステップS309)で求めた測光データ(最終露出量LastEv)に従い、絞り機能を有するシャッタ12を絞り値に応じて開放する(ステップS502)。こうして、露光が開始される(ステップS503)。
The
次に、システム制御部50は、測光処理(ステップS309)で求めた測光データ(最終露出量LastEv)に従って撮像素子14の露光終了を待つ(ステップS504)。露光終了時刻に達すると、システム制御部50は、シャッタ12を閉じる(ステップS505)。次に、システム制御部50は、撮像素子14から画像データ(電荷信号)を読み出し、A/D変換器16、画像処理回路20、メモリ制御回路22を介して、或いはA/D変換器16から直接メモリ制御回路22を介してメモリ30に書き込む(ステップS506)。上記のステップS501〜ステップS506が露光処理に対応する。
Next, the
次に、システム制御部50は、必要に応じて、メモリ30に書き込まれた画像データを読み出して画像処理回路20により画像処理を順次施す(ステップS507)。この画像処理には、例えば、ホワイトバランス処理や、圧縮・伸張回路32を用いた圧縮処理等が含まれる。また、画像データのうち暗い部分をゲインアップする暗部補正処理もステップS507で行う。システム制御部50は、画像処理を施した画像データをメモリ30に書き込む。
Next, the
次に、システム制御部50は、メモリ30から画像データを読み出し、画像データを圧縮・伸張回路32を用いて伸張し、画像表示部28の表示用にリサイズする。そして、システム制御部50は、リサイズされた画像データを画像表示部28に表示するべくD/A変換器26に転送する(ステップS508)。上記一連の処理を完了すると、撮影処理を終了する。
Next, the
図6a、図6bは、図4aの逆光補正値DeltaBvC算出処理の詳細を示すフローチャートである。 6a and 6b are flowcharts showing details of the backlight correction value DeltaBvC calculation process of FIG. 4a.
図6a、図6bにおいて、撮像装置のシステム制御部50は、画像処理回路20から通知された画像処理回路20内の顔検出回路の顔検出結果を参照し、被写体を撮像して得た画像データから顔が検出されているか否かを判断する(ステップS601)。被写体を撮像して得た画像データから顔が検出されている場合は、システム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)のうち検出された顔領域に相当するエリアの輝度平均値YLFaceを求める(ステップS602)。
6A and 6B, the
次に、システム制御部50は、閾値MaxYLをYLFace * MAX_YLLIMITに設定すると共に、閾値MinYLをYLFace / MIN_YLLIMITに設定し(ステップS603)、ステップS622に進む。尚、MAX_YLLIMIT、MIN_YLLMITは設計パラメータであり、例えばMAX_YLLIMIT = MIN_YLLIMIT = 2とする。
Next, the
他方、被写体を撮像して得た画像データから顔が検出されていない場合は、システム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)のうち領域Aの輝度平均値YLAを求める(ステップS604)。領域Aは、測光領域の中央付近の領域(画像データの中央領域)とし、HMAX=VMAX=8の場合、例えば図11(a)に示すように中央2×2のブロックとすればよい。図11(a)に示すように、領域Bは領域Aを囲むように設定し、領域Cは領域Bを囲むように設定し、領域Dは領域Cを囲むように設定すればよい。
On the other hand, if no face is detected from the image data obtained by imaging the subject, the
次に、システム制御部50は、閾値MaxYLをYLA* MAX_YLLIMITに設定すると共に、閾値MinYLをYLA / MIN_YLLIMITに設定し(ステップS605)、ステップS622に進む。
Next, the
システム制御部50は、領域B、C、D用のゲインB_Gain、C_Gain、D_GainをそれぞれBGAIN、CGAIN、DGAINに設定し(ステップS622)、ステップS606に進む。ここで、BGAIN、CGAIN、DGAINは設計パラメータであり、例えばBGAIN = 0.75、CGAIN = 0.67、DGAIN = 0.5とする。画像データの周辺部に近い領域ほど、小さなゲインが設定される。
The
システム制御部50は、ステップS622の処理後、HMAX×VMAXの各ブロックの測光重みを求めるべく、まず変数h、vを0に初期化する(ステップS606)。次に、システム制御部50は、変数vがVMAXより小さいか否かを判断する(ステップS607)。変数vがVMAXより小さい場合はステップS608に進み、そうでない場合はステップS621に進む。
After the process of step S622, the
システム制御部50は、変数hがHMAXより小さいか否かを判断する(ステップS608)。変数hがHMAXより小さい場合はステップS609に進み、そうでない場合はステップS620に進む。システム制御部50は、ブロック輝度Y(h, v)がステップS603或いはステップS605にて設定した閾値MaxYLより大きいか否かを判断する(ステップS609)。ブロック輝度Y(h, v)が閾値MaxYLより大きい場合はステップS612に進み、そうでない場合はステップS610に進む。
The
システム制御部50は、同様に、ブロック輝度Y(h, v)がステップS603或いはステップS605にて設定した閾値MinYLより小さいか否かを判断する(ステップS610)。ブロック輝度Y(h, v)が閾値MinYLより小さい場合はステップS612に進み、そうでない場合はステップS611に進む。
Similarly, the
ブロック輝度Y(h, v)が閾値MinYLより小さくない場合、システム制御部50は、ブロック(h, v)の逆光補正用測光重みWc(h, v)として、予め定められたデフォルトの測光重みW(h, v)を設定する(ステップS611)。この、それぞれのブロック(h, v)に割り当てられたデフォルトの測光重みW(h, v)は、図12(a)に示すように、測光領域の中心部に近いほど大きな値に設定されている。
When the block luminance Y (h, v) is not smaller than the threshold value MinYL, the
ステップS609でブロック輝度Y(h, v)が閾値MaxYLより大きい場合、或いはステップS610でブロック輝度Y(h, v)が閾値MinYLより小さい場合は、システム制御部50は次の判断を行う。即ち、ブロック輝度Y(h, v)が領域Bに属するか否かを判断する(ステップS612)。
If the block luminance Y (h, v) is larger than the threshold MaxYL in step S609 or if the block luminance Y (h, v) is smaller than the threshold MinYL in step S610, the
ブロック輝度Y(h, v)が領域Bに属する場合は、システム制御部50は次の処理を行う。即ち、ブロック輝度Y(h, v)の予め定められた測光重みW(h, v)に領域B用のゲインB_Gainを乗じ、これをブロック輝度Y(h, v)の逆光補正用測光重みWc(h, v)とする(ステップS613)。
When the block luminance Y (h, v) belongs to the region B, the
ブロック輝度Y(h, v)が領域Bに属さない場合は、システム制御部50は、ブロック輝度Y(h, v)が領域Cに属するか否かを判断する(ステップS614)。ブロック輝度Y(h, v)が領域Cに属する場合は、システム制御部50は次の処理を行う。即ち、ブロック輝度Y(h, v)の予め定められた測光重みW(h, v)に領域C用のゲインC_Gainを乗じ、これをブロック輝度Y(h, v)の逆光補正用測光重みWc(h, v)とする(ステップS615)。
If the block luminance Y (h, v) does not belong to the region B, the
ブロック輝度Y(h, v)が領域Cにも属さない場合は(ステップS614)、システム制御部50は、ブロック輝度Y(h, v)が領域Dに属するか否かを判断する(ステップS616)。ブロック輝度Y(h, v)が領域Dに属する場合は、システム制御部50は次の処理を行う。即ち、ブロック輝度Y(h, v)の予め定められた測光重みW(h, v)に領域D用のゲインD_Gainを乗じ、これをブロック輝度Y(h, v)の逆光補正用測光重みWc(h, v)とする(ステップS617)。
When the block luminance Y (h, v) does not belong to the region C (step S614), the
ここで、B_Gain、C_Gain、および、D_Gainは、0 < D_Gain < C_Gain < B_Gain < 1の関係を満たすように設定されている。すなわち、ブロック輝度Y(h, v)が閾値MaxYLより大きいか、あるいは、閾値MinYLより小さい場合には、領域Aから離れたブロックほど、逆光補正用測光重みWc(h, v)がデフォルトの測光重みW(h, v)に比較して小さな値に設定される。 Here, B_Gain, C_Gain, and D_Gain are set to satisfy the relationship of 0 <D_Gain <C_Gain <B_Gain <1. That is, when the block luminance Y (h, v) is larger than the threshold value MaxYL or smaller than the threshold value MinYL, the light metering weight Wc (h, v) for backlight compensation is the default metering as the block is farther from the area A. It is set to a smaller value than the weight W (h, v).
ブロック輝度Y(h, v)が領域Dにも属さない(領域Aに属する)場合は、システム制御部50は、以下の設定を行う。即ち、ブロック輝度Y(h, v)の逆光補正用測光重みWc(h, v)として、予め定められたデフォルトの測光重みW(h, v)を設定する(ステップS618)。
When the block luminance Y (h, v) does not belong to the area D (belongs to the area A), the
システム制御部50は、ステップS613、ステップS615、ステップS617またはステップS618でブロック輝度Y(h, v)の逆光補正用測光重みWc(h, v)を求めた後、変数hをインクリメントする(ステップS619)。その後、次のブロックの重み計算を行うべくステップS608に戻る。
The
ステップS608で変数hがHMAXより小さくない場合は、システム制御部50は、変数vをインクリメントし(ステップS620)、次のブロックの重み計算をすべくステップS607に戻る。
If the variable h is not smaller than HMAX in step S608, the
ステップS607で変数vがVMAXより小さくない場合は、システム制御部50は、ブロック輝度Y(h, v)及び逆光補正用重みWc(h, v)から、下記の式に基づき逆光補正値DeltaBvCを算出する(ステップS621)。これにより、逆光補正値DeltaBvC算出処理(ステップS402)を終了する。
If the variable v is not smaller than VMAX in step S607, the
ここで、Yrefは輝度ターゲット(輝度目標値)であり、DeltaBvCは逆光補正用重みを用いた重み付き輝度平均が輝度ターゲットから何段ずれているかを表している。本実施の形態では、顔領域の輝度或いは領域A(測光領域中央付近の領域:中央領域)の輝度と大きく輝度が異なるブロック(輝度差が大きい領域)の測光重みを小さくし、重み付き平均測光を行うことで、逆光補正値を算出する。これにより、逆光条件下でも明るい背景による影響を抑え、顔領域や領域Aといった主被写体領域に重点をおいた測光を行うことが可能となる。 Here, Yref is a luminance target (luminance target value), and DeltaBvC represents how many degrees the weighted luminance average using the backlight correction weight deviates from the luminance target. In the present embodiment, the weighting average metering is performed by reducing the metering weight of a block (a region having a large luminance difference) that is greatly different from the brightness of the face region or the region A (region near the center of the metering region: center region). To calculate a backlight correction value. As a result, the influence of a bright background can be suppressed even under backlight conditions, and photometry can be performed with emphasis on the main subject area such as the face area or area A.
図7a、図7bは、図4aの空補正値DeltaBvS算出処理(ステップS403)の詳細を示すフローチャートである。 7a and 7b are flowcharts showing details of the empty correction value DeltaBvS calculation process (step S403) in FIG. 4a.
図7a、図7bにおいて、撮像装置のシステム制御部50は、まず、撮像装置の上方向(空方向)を決定する。即ち、システム制御部50は、撮像装置の上方向(空方向)を決定するため、撮像装置の姿勢が縦位置であるか横位置であるかを検知する縦位置検知センサ75が動作しているか否かを確認する(ステップS701)。
7A and 7B, the
縦位置検知センサ75の例としては、複数の圧電素子に囲まれた空間内に鉄球が配置され、鉄球の重みによって電気信号を出力している圧電素子を検出することで、撮像装置の上方向を決定する構成のものが考えられる。ここで、縦位置検知センサ75が動作していない状況とは、例えば、想定していない方向に撮像装置が傾けられた(例えば、レンズの光軸を上に向けた)結果、どの圧電素子にも鉄球が接触しない状況のことを指す。あるいは、複数の圧電素子にまたがるような位置に鉄球が転がり、撮像装置の姿勢が少し傾いただけで鉄球の重みが加わる圧電素子が切り替わってしまい、上方向の検知結果が安定しない状況を指す。
As an example of the vertical
縦位置検知センサ75が動作している場合、システム制御部50は、縦位置検知センサ75の出力に応じて撮像装置の上方向を決定する(ステップS702)。他方、縦位置検知センサ75が動作していない場合(または撮像装置が縦位置検知センサ75が無い場合)、システム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)の分布から撮像装置の上方向を決定する(ステップS703)。即ち、例えば高輝度のブロックが多い方を上方向と定めればよい。
When the vertical
システム制御部50は、図12(a)に示したデフォルトの測光重みW(h, v)を下方向のブロック輝度(h, v)にシフトして割り当てたものを、デフォルトの空補正用測光重みWa(h, v)とする(ステップS704)。下方向とは、ステップS702或いはステップS703において決定した撮像装置の上方向と逆の方向である。HMAX=VMAX=8の場合、デフォルトの測光重みW(h, v)は図12(a)に、デフォルトの空補正用測光重みWa(h, v)は図12(b)に示すようになる。図12(a)でW(h, v)を1ライン下方向にシフトすると、図12(b)のWa(h, v)となる。
The
なお、W(h, v)を1ライン下方向にシフトすることによって、最上段のラインに位置するブロック輝度(h, v)のデフォルトの空補正用測光重みWa(h, v)は、Wa(h, v) = 0に設定される。すなわち、測光重みW(h, v)で表される第1の重み付けに比べて、空補正用測光重みWa(h, v)で表される第2の重み付けは、空領域における重みが小さくなるように設定される。 By shifting W (h, v) downward by one line, the default sky correction photometric weight Wa (h, v) of the block luminance (h, v) located in the uppermost line is Wa. (H, v) = 0 is set. In other words, the second weight expressed by the sky correction photometric weight Wa (h, v) is smaller in the sky region than the first weight expressed by the photometric weight W (h, v). Is set as follows.
次に、システム制御部50は、画像処理回路20から通知された画像処理回路20内の顔検出回路の顔検出結果を参照し、被写体を撮像して得た画像データから顔が検出されているか否かを判断する(ステップS705)。被写体を撮像して得た画像データから顔が検出されている場合は、システム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)のうち検出された顔領域に相当するエリアの輝度平均値YLFaceを求める(ステップS706)。
Next, the
次に、システム制御部50は、クリップ処理で用いる閾値MaxYLをYLFace * MAX_YLLIMITに設定すると共に、閾値MinYLをYLFace / MIN_YLLIMITに設定する(ステップS707)。ここで、MAX_YLLIMIT、MIN_YLLIMITは設計パラメータであり、例えばMAX_YLLIMIT = MIN_YLLIMIT = 2とする。
Next, the
次に、システム制御部50は、領域Bs、Cs、Ds用のゲインをそれぞれBSGAIN_FACE、CSGAIN_FACE、DSGAIN_FACEに設定し(ステップS708)、ステップS712に進む。ここで、BSGAIN_FACE、CSGAIN_FACE、DSGAIN_FACEは設計パラメータであり、例えばBSGAIN_FACE = 0.75、CSGAIN_FACE = 0.67、DSGAIN_FACE = 0.5とする。
Next, the
また、領域Bs、領域Cs、領域Dsは、図4aのステップS402の逆光補正値DeltaBvC算出処理で用いた領域B、領域C、領域Dを下方向にシフトしたものである。HMAX=VMAX=8の場合、例えば図10(b)のようになる。この例では1ライン下方向にシフトしている。 In addition, the region Bs, the region Cs, and the region Ds are obtained by shifting the regions B, C, and D used in the backlight correction value DeltaBvC calculation process in step S402 of FIG. 4A downward. When HMAX = VMAX = 8, for example, as shown in FIG. In this example, the line is shifted downward by one line.
被写体を撮像して得た画像データから顔が検出されていない場合は(ステップS705でNO)、システム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)のうち領域Aの輝度平均値YLAを求める(ステップS709)。次に、システム制御部50は、閾値MaxYLをYLA* MAX_YLLIMITに設定すると共に、閾値MinYLをYLA / MIN_YLLIMITに設定する(ステップS710)。
If no face is detected from the image data obtained by imaging the subject (NO in step S705), the
次に、システム制御部50は、領域Bs、Cs、Ds用のゲインをそれぞれBSGAIN、CSGAIN、DSGAINに設定し(ステップS711)、ステップS712に進む。ここで、BSGAIN、CSGAIN、DSGAINは設計パラメータであり、例えばBSGAIN = 1.0、CSGAIN = 1.0、DSGAIN = 0.75とする。
Next, the
ステップS708或いはステップS711の処理後、システム制御部50は、HMAX×VMAXの各ブロックの測光重みを求めるべく、まず変数h、変数vを0に初期化する(ステップS712)。次に、システム制御部50は、変数vがVMAXより小さいか否かを判断し(ステップS713)、変数vがVMAXより小さい場合はステップS714に進み、そうでない場合はステップS725に進む。
After the processing in step S708 or step S711, the
システム制御部50は、変数hがHMAXより小さいか否かを判断し(ステップS714)、変数hがHMAXより小さい場合はステップS715に進み、そうでない場合はステップS724に進む。システム制御部50は、ブロック輝度Y(h, v)がステップS707或いはステップS710にて設定した閾値MaxYLより大きいか否かを判断する(ステップS715)。ブロック輝度Y(h, v)が閾値MaxYLより大きい場合はステップS717に進み、そうでない場合はステップS716に進む。
The
システム制御部50は、同様に、ブロック輝度Y(h, v)がステップS707或いはステップS710にて設定した閾値MinYLより小さいか否かを判断する(ステップS716)。ブロック輝度Y(h, v)が閾値MinYLより小さい場合はステップS717に進み、そうでない場合はステップS726に進む。ブロック輝度Y(h, v)が閾値MinYLより小さくない場合、システム制御部50は、ブロック(h, v)の空補正用測光重みWs(h, v)として、デフォルトの測光重みWa(h, v)を設定する(ステップS726)。
Similarly, the
ブロック輝度Y(h, v)が閾値MaxYLより大きい場合(ステップS715でYES)、或いはブロック輝度Y(h, v)が閾値MinYLより小さい場合(ステップS716でYES)、システム制御部50は次の判断を行う。即ち、ブロック輝度Y(h, v)が領域Bsに属するか否かを判断する(ステップS717)。
When the block luminance Y (h, v) is larger than the threshold MaxYL (YES in step S715), or when the block luminance Y (h, v) is smaller than the threshold MinYL (YES in step S716), the
ブロック輝度Y(h, v)が領域Bsに属する場合、システム制御部50は、ステップS704で設定したブロック輝度Y(h, v)の空補正用測光重みWa(h, v)に領域Bs用のゲインBs_Gainを乗じる(ステップS718)。これをブロック輝度Y(h, v)の空補正用測光重みWs(h, v)とする。
When the block luminance Y (h, v) belongs to the region Bs, the
ブロック輝度Y(h, v)が領域Bsに属さない場合、システム制御部50は、ブロック輝度Y(h, v)が領域Csに属するか否かを判断する(ステップS719)。ブロック輝度Y(h, v)が領域Csに属する場合、システム制御部50は、ステップS704で設定したブロック輝度Y(h, v)の空補正用測光重みWa(h, v)に領域Cs用のゲインCs_Gainを乗じる(ステップS720)。これをブロック輝度Y(h, v)の空補正用測光重みWs(h, v)とする。
If the block luminance Y (h, v) does not belong to the region Bs, the
ブロック輝度Y(h, v)が領域Csにも属さない場合、システム制御部50は、ブロック輝度Y(h, v)が領域Dsに属するか否かを判断する(ステップS721)。ブロック輝度Y(h, v)が領域Dsに属する場合、システム制御部50は、ステップS704で設定したブロック輝度Y(h, v)の空補正用測光重みWa(h, v)に領域Ds用のゲインDs_Gainを乗じる(ステップS722)。これをブロック輝度Y(h, v)の空補正用測光重みWs(h, v)とする。
When the block luminance Y (h, v) does not belong to the region Cs, the
ブロック輝度Y(h, v)が領域Dsにも属さない場合、ステップS726に進み、ブロック(h, v)の空補正用測光重みWs(h, v)として、デフォルトの測光重みWa(h, v)を設定する(ステップS726)。ブロック輝度Y(h, v)の空補正用測光重みWs(h, v)を求めた後、システム制御部50は、変数hをインクリメントし(ステップS723)、次のブロックの重み計算を行うべくステップS714に戻る。
If the block luminance Y (h, v) does not belong to the region Ds, the process proceeds to step S726, and the default photometric weight Wa (h, v) is set as the sky correction photometric weight Ws (h, v) of the block (h, v). v) is set (step S726). After obtaining the sky correction photometric weight Ws (h, v) of the block luminance Y (h, v), the
変数hがHMAXより小さくない場合(ステップS714でNO)、システム制御部50は、変数vをインクリメントし(ステップS724)、次のブロックの重み計算を行うべくステップS713に戻る。
If the variable h is not smaller than HMAX (NO in step S714), the
変数vがVMAXより小さくない場合(ステップS713でNO)、システム制御部50は、ブロック輝度Y(h, v)及び空補正用重みWs(h, v)から下記の式に基づき空補正値DeltaBvSを算出する(ステップS725)。これにより、空補正値DeltaBvS算出処理(ステップS403)を終了する。
When the variable v is not smaller than VMAX (NO in step S713), the
ここで、Yrefは輝度ターゲット(輝度目標値)であり、DeltaBvSは空補正用重みを用いた重み付き輝度平均が輝度ターゲットから何段ずれているかを表している。ステップS704において重みを下方向にシフトすることにより、測光領域の上部に空がある場合に空の影響を受けにくくすることができる。さらに、顔領域の輝度或いは領域Aの輝度と大きく輝度が異なるブロックの測光重みを下げることで、空による影響を抑えつつも、顔領域や領域Aといった主被写体領域に重点をおいた測光を行うことができる。 Here, Yref is a luminance target (luminance target value), and DeltaBvS represents how many degrees the weighted luminance average using the sky correction weight deviates from the luminance target. By shifting the weight downward in step S704, it is possible to reduce the influence of the sky when there is a sky above the photometric area. Further, by reducing the photometric weight of the face area or a block whose luminance is significantly different from that of the area A, photometry is performed with emphasis on the main subject area such as the face area and the area A while suppressing the influence of the sky. be able to.
図8は、図4aの全体輝度補正値DeltaBvAll算出処理(ステップS405)の詳細を示すフローチャートである。 FIG. 8 is a flowchart showing details of the overall luminance correction value DeltaBvAll calculation process (step S405) in FIG. 4a.
図8において、撮像装置のシステム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)から測光領域の上部の輝度平均値Yupを算出する(ステップS801)。システム制御部50は、同様に、ブロック輝度Y(h, v)から測光領域の下部の輝度平均値Ydownを算出する(ステップS802)。測光領域の上方向については図7aのステップS702或いはステップS703で決定した方向を用いる。HMAX = VMAX = 8の場合、例えば上下端1ラインの輝度平均値をそれぞれYup、Ydownとすればよい。
In FIG. 8, the
次に、システム制御部50は、上下端1ラインの輝度平均値の比率であるYup/Ydownの値から、混合比α1(0≦α1≦1)を求める(ステップS803)。Yup/Ydownが大きくなるほど混合比α1が小さくなるように設定する。次に、システム制御部50は、Yupの値から混合比α2(0≦α2≦1)を求める(ステップS804)。Yupが大きくなるほど混合比α2が小さくなるように設定する。
Next, the
次に、システム制御部50は、混合比α1と混合比α2を比較する(ステップS805)。比較結果がα1<α2である場合は、システム制御部50は、混合比α1を最終混合比αとする(ステップS806)。比較結果がα1<α2でない場合は、システム制御部50は、混合比α2を最終混合比αとする(ステップS807)。
Next, the
次に、システム制御部50は、下記の式に基づいて全体輝度補正値DeltaBvAllを求める(ステップS808)。即ち、逆光補正値DeltaBvC、空補正値DeltaBvS、輝度補正値BvLに基づいて全体輝度補正値DeltaBvAllを求める。これにより、全体輝度補正値DeltaBvAll算出処理(ステップS405)を終了する。
Next, the
背景の空の輝度が大きいほど(被写体下部の輝度に対する空の輝度の割合が大きいほど)、Yup/Ydown或いはYupは大きくなる。Yup/Ydown或いはYupが大きくなるほど、最終混合比αが小さくなるように設定している。そのため、空の輝度による影響が大きいと考えられる状況ほど、空の輝度の影響を抑制する空補正値DeltaBvSの効果が生じるようになる。 Yup / Ydown or Yup increases as the background sky brightness increases (the ratio of the sky brightness to the brightness of the lower part of the subject increases). The final mixing ratio α is set smaller as Yup / Ydown or Yup increases. For this reason, the effect of the sky correction value DeltaBvS that suppresses the influence of the sky brightness is generated in a situation where the influence of the sky brightness is considered to be large.
図9は、図4aの顔補正値DeltaBvFace算出処理(ステップS408)を示すフローチャートである。 FIG. 9 is a flowchart showing the face correction value DeltaBvFace calculation process (step S408) of FIG. 4a.
図9において、撮像装置のシステム制御部50は、下記の式に基づいてDeltaBvSLimitを求める(ステップS901)。
In FIG. 9, the
ここで、YLSは被写体を撮像して得た画像データにおける空領域の輝度平均値、YrefSKYは空領域の輝度として許容できる上限である予め設定された許容輝度上限値を示す。従って、DeltaBvSLimitは空領域の許容輝度上限値との輝度差を表す。HMAX = VMAX = 8の場合、空領域は例えば上1ラインに設定すればよい。上方向については図7aのステップS702或いはステップS703で求めたものを用いればよい。 Here, YLS represents an average luminance value of the sky region in the image data obtained by imaging the subject, and YrefSKY represents a preset allowable luminance upper limit value that is an upper limit allowable as the luminance of the sky region. Therefore, DeltaBvSLimit represents the luminance difference from the allowable luminance upper limit value of the sky region. When HMAX = VMAX = 8, the empty area may be set to the upper one line, for example. What is necessary is just to use what was calculated | required by step S702 or step S703 of FIG.
次に、システム制御部50は、下記の式に基づいてDeltaBvFace0を求める(ステップS902)。
Next, the
ここで、YLFaceは顔領域の輝度平均値、YrefFACEは顔領域の輝度ターゲットを示す。従って、DeltaBvFace0は顔領域の輝度ターゲットとの輝度差を示す。 Here, YLFace indicates the average luminance value of the face area, and YrefFACE indicates the luminance target of the face area. Therefore, DeltaBvFace0 indicates the luminance difference from the luminance target of the face area.
次に、システム制御部50は、ステップS901で求めたDeltaBvSLimitとステップS902で求めたDeltaBvFace0を比較する(ステップS903)。比較結果がDeltaBvFace0 < DeltaBvSLimitである場合、システム制御部50は、変数Delta2をDeltaBvSLimitからDeltaBvFace0を引いた差分とする(ステップS904)。次に、システム制御部50は、Delta2 > MAX_DELTAであるか否かを判断する(ステップS905)。
Next, the
比較結果がDelta2 > MAX_DELTAである場合、システム制御部50は、Delta2にMAX_DELTAを代入し(ステップS906)、ステップS907に進む。比較結果がDelta2 > MAX_DELTAでない場合、そのままステップS907に進む。システム制御部50は、顔の大きさに応じて混合比MixRatio (0 ≦MixRatio ≦1)を設定する(ステップS907)。ここでは、顔が大きいほどMixRatioが小さくなるよう混合比MixRatioを設定する。尚、MAX_DELTAは設計パラメータであり、例えばMAX_DELTA = 1とする。
When the comparison result is Delta2> MAX_DELTA, the
次に、システム制御部50は、ステップS907で設定した混合比MixRatioをDelta2に乗じる(ステップS908)。更に、システム制御部50は、混合比MixRatioをDelta2に乗じた結果にDeltaBvFace0を加えることで、顔補正値DeltaBvFaceとする(ステップS909)。これにより、顔補正値DeltaBvFace算出処理(ステップS408)を終了する。
Next, the
ステップS903の比較結果がDeltaBvFace0 < DeltaBvSLimitである場合は、顔に合わせるように(DeltaBvFace0が0になるように)露出制御を行うと、空領域の輝度が以下のようになる。即ち、空領域の輝度が許容輝度上限値を超えてしまう(DeltaBvFace > 0となる)。そのため、露出は顔そのものに合わせるのではなく、空領域の輝度を考慮した露出となるよう制御を行う。 When the comparison result in step S903 is DeltaBvFace0 <DeltaBvSLimit, when exposure control is performed to match the face (so that DeltaBvFace0 becomes 0), the brightness of the sky region is as follows. That is, the brightness of the sky region exceeds the allowable brightness upper limit (DeltaBvFace> 0). For this reason, the exposure is not adjusted to the face itself, but is controlled so as to take into account the brightness of the sky region.
DeltaBvFace0 < DeltaBvSLimitでない場合は(ステップS903でNO)、システム制御部50は、DeltaBvFace0を顔補正値DeltaBvFaceとする(ステップS910)。これにより、顔補正値DeltaBvFace算出処理(ステップS408)を終了する。
When DeltaBvFace0 <DeltaBvSLimit is not satisfied (NO in step S903), the
ステップS903の比較結果がDeltaBvFace0 < DeltaBvSLimitでない場合は、顔に合わせるように(DeltaBvFace0が0になるように)露出制御を行うと、空領域の輝度が以下のようになる。即ち、空領域の輝度が許容輝度上限値より小さくなる(DeltaBvSLimit < 0となる)。そのため、空が白とびしない(空が白っぽく写らない)程度に顔領域に露出を合わせることが可能となる。即ち、画像データの空領域の輝度と予め設定された許容輝度上限値とを比較し、比較結果に基づいて顔補正値を補正する。 If the comparison result in step S903 is not DeltaBvFace0 <DeltaBvSLimit, the exposure area is controlled to match the face (so that DeltaBvFace0 becomes 0). In other words, the brightness of the sky region is smaller than the allowable brightness upper limit (DeltaBvSLimit <0). Therefore, it is possible to adjust the exposure to the face area to such an extent that the sky does not fly out (the sky does not appear whitish). That is, the brightness of the sky area of the image data is compared with a preset allowable brightness upper limit value, and the face correction value is corrected based on the comparison result.
このように、空領域の輝度と空領域の許容輝度上限値までの差分を、顔領域の輝度と顔領域の輝度ターゲットまでの差分に加味して、顔補正値DeltaBvFaceを求めている。このようにすることにより、顔領域の輝度値を輝度ターゲットに近づけるだけでなく、背景の空が白っぽく写る現象を抑制することが可能となる。 As described above, the face correction value DeltaBvFace is obtained by adding the difference between the brightness of the sky area and the allowable brightness upper limit value of the sky area to the difference between the brightness of the face area and the brightness target of the face area. In this way, it is possible not only to bring the luminance value of the face area closer to the luminance target, but also to suppress the phenomenon of the background sky appearing whitish.
以上詳細に説明したように、本実施の形態によれば以下の作用及び効果を奏する。画角(撮影対象)に主被写体と空の両方が含まれるため主被写体領域と背景(空)領域の輝度差が大きい場合は、人工的な照明で主被写体領域と背景領域の輝度差が大きい場合と異なり、主被写体領域と背景領域の両方が適正輝度から大きく外れないよう制御する。これにより、暗い被写体を明るく撮影することが可能となると共に、背景の空の白とびを抑制することが可能となる。 As described above in detail, according to the present embodiment, the following operations and effects are achieved. If the luminance difference between the main subject area and the background (sky) area is large because the angle of view (shooting target) includes both the main subject and the sky, the luminance difference between the main subject area and the background area is large due to artificial lighting. Unlike the case, control is performed so that both the main subject area and the background area do not deviate significantly from the appropriate luminance. As a result, it becomes possible to shoot a dark subject brightly and to suppress overexposure of the background sky.
〔他の実施の形態〕
上記実施の形態では、画像処理回路20の顔検出回路で検出された顔領域を主被写体領域とした場合を例に挙げたが、これに限定されるものではない。操作部70が主被写体領域を指定可能な構成(例えばタッチパネルなど)(指定手段)を備えることで、撮影者により操作部70を用いて指定された位置を中心として、主被写体領域を検出する構成としてもよい。例えば、撮影者により指定された位置を基準として、輝度、色差、コントラスト、あるいは、動き情報などから、同一の被写体が占めると推定される領域を決定し、これを主被写体領域として検出すればよい。
[Other Embodiments]
In the above embodiment, the case where the face area detected by the face detection circuit of the
また、上記実施の形態では、撮影者により指定された領域に基づきパターンマッチングなどを用いて主被写体領域を決定し、決定された主被写体領域を用いることも可能である。例えば、操作部70が備えるタッチパネルにより指定された主被写体を動体追尾することにより主被写体の動きに追従することも可能である。
In the above embodiment, it is also possible to determine the main subject region using pattern matching based on the region designated by the photographer and use the determined main subject region. For example, it is possible to follow the movement of the main subject by tracking the moving subject on the main subject specified by the touch panel provided in the
また、所謂電子ズーム機能を用いて画像データの一部の領域を切り出した場合には、この切り出した領域全体を上述した測光領域全体であるとみなしても構わない。この場合、切り出した領域内のブロック輝度Y(h, v)のみを用いて上述した各補正値DeltaBvを求めればよい。 When a part of the image data is cut out using the so-called electronic zoom function, the whole cut out area may be regarded as the whole photometric area. In this case, each correction value DeltaBv described above may be obtained using only the block luminance Y (h, v) in the cut-out area.
また、本発明の目的は、以下の処理を実行することにより達成される。即ち、上述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出す処理である。 The object of the present invention is achieved by executing the following processing. That is, a storage medium that records a program code of software that realizes the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU, MPU, etc.) of the system or apparatus is stored in the storage medium. This is the process of reading the code.
この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施の形態の機能を実現することになり、そのプログラムコード及び該プログラムコードを記憶した記憶媒体は本発明を構成することになる。 In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code and the storage medium storing the program code constitute the present invention.
また、プログラムコードを供給するための記憶媒体としては、次のものを用いることができる。例えば、フロッピー(登録商標)ディスク、ハードディスク、光磁気ディスク、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW、磁気テープ、不揮発性のメモリカード、ROM等である。または、プログラムコードをネットワークを介してダウンロードしてもよい。 Moreover, the following can be used as a storage medium for supplying the program code. For example, floppy (registered trademark) disk, hard disk, magneto-optical disk, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW, magnetic tape, nonvolatile memory card, ROM or the like. Alternatively, the program code may be downloaded via a network.
また、コンピュータが読み出したプログラムコードを実行することにより、上記実施の形態の機能が実現される場合も本発明に含まれる。加えて、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理により前述した実施形態の機能が実現される場合も含まれる。 Further, the present invention includes a case where the function of the above-described embodiment is realized by executing the program code read by the computer. In addition, an OS (operating system) running on the computer performs part or all of the actual processing based on an instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Is also included.
更に、前述した実施形態の機能が以下の処理により実現される場合も本発明に含まれる。即ち、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行う場合である。 Furthermore, the present invention includes a case where the functions of the above-described embodiment are realized by the following processing. That is, the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instruction of the program code, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing.
14 撮像素子
20 画像処理回路
40 露光制御回路
50 システム制御部
75 縦位置検知センサ
14
Claims (14)
前記画像データの前記主被写体領域の輝度と、前記画像データの上部に位置する空領域の輝度を検出する測光手段と、
前記空領域の輝度と前記空領域の許容輝度上限値の差分に応じた値を、前記主被写体領域の輝度と前記主被写体領域の輝度目標値の差分に加えることにより、主被写体用露出補正値を算出する算出手段と、
前記主被写体用露出補正値に応じた値に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御手段と、を備えることを特徴とする撮像装置。 Detecting means for detecting a main subject region from image data obtained by imaging a subject with an imaging element;
Photometric means for detecting the brightness of the main subject area of the image data and the brightness of the sky area located above the image data;
By adding a value corresponding to the difference between the brightness of the sky area and the allowable upper limit of the brightness of the sky area to the difference between the brightness of the main subject area and the brightness target value of the main subject area, an exposure correction value for main subject Calculating means for calculating
An image pickup apparatus comprising: a control unit that controls exposure at the time of image pickup by the image pickup device based on a value corresponding to the exposure correction value for the main subject.
前記主被写体領域の輝度と前記主被写体領域の輝度目標値の差分に加えることにより、前記主被写体用露出補正値を算出するものであって、前記主被写体領域が大きいほど、前記混合比を小さくすることを特徴とする請求項1に記載の撮像装置。 The calculation means multiplies the difference between the brightness of the sky area and the allowable brightness upper limit value of the sky area by subtracting the difference between the brightness of the main subject area and the brightness target value of the main subject area and the mixture ratio. ,
The exposure correction value for the main subject is calculated by adding to the difference between the luminance of the main subject region and the target luminance value of the main subject region, and the larger the main subject region, the smaller the mixing ratio. The imaging apparatus according to claim 1, wherein:
前記検知手段により前記撮像装置の姿勢を検知した結果に基づいて前記画像データの上部の領域である前記空領域を決定する決定手段と、を更に備えることを特徴とする請求項1または2に記載の撮像装置。 Detecting means for detecting the posture of the imaging device;
3. The determination unit according to claim 1, further comprising: a determination unit that determines the sky region that is an upper region of the image data based on a result of detecting a posture of the imaging apparatus by the detection unit. Imaging device.
前記検出手段は、前記指定手段にて指定された位置を用いて、前記主被写体領域を検出することを特徴とする請求項1乃至4の何れかに記載の撮像装置。 A designation means capable of designating a position of the main subject area;
The imaging apparatus according to claim 1, wherein the detection unit detects the main subject region using the position specified by the specification unit.
前記算出手段は、前記画像データの複数領域の輝度から全体用露出補正値を算出し、前記主被写体用露出補正値と前記全体用露出補正値に基づいて、最終露出補正値を算出し、
前記制御手段は、前記最終露出補正値に基づいて、前記撮像素子により撮像を行う際の露出を制御することを特徴とする請求項1乃至6の何れかに記載の撮像装置。 The photometric means detects the luminance of a plurality of areas of the image data,
The calculation means calculates an overall exposure correction value from the brightness of a plurality of regions of the image data, calculates a final exposure correction value based on the main subject exposure correction value and the overall exposure correction value,
The imaging apparatus according to claim 1, wherein the control unit controls exposure when imaging is performed by the imaging element based on the final exposure correction value.
前記算出手段は、前記ブロック輝度のそれぞれに、第1の重み付けをして求めた逆光補正値と、前記ブロック輝度のそれぞれに、前記第1の重み付けに比べて前記空領域の重み付けが小さくなる第2の重み付けをして求めた空補正値を算出し、前記逆光補正値と前記空補正値を混合して前記全体用露出補正値を算出することを特徴とする請求項7に記載の撮像装置。 It said photometric means divides the realm of the image data into a plurality of blocks, detects the respective block luminance,
The calculation means includes a backlight correction value obtained by first weighting each of the block luminances, and a weight of the sky region that is smaller for each of the block luminances than the first weighting. The imaging apparatus according to claim 7, wherein a sky correction value obtained by weighting 2 is calculated, and the backlight correction value and the sky correction value are mixed to calculate the overall exposure correction value. .
前記画像データの前記主被写体領域の輝度と、前記画像データの上部に位置する空領域の輝度を検出する測光手段と、 Photometric means for detecting the brightness of the main subject area of the image data and the brightness of the sky area located above the image data;
前記空領域の輝度と前記空領域の許容輝度上限値の差分、及び、前記主被写体領域の輝度に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御手段と、を備えることを特徴とする撮像装置。 Control means for controlling exposure when imaging is performed by the imaging device based on the difference between the luminance of the sky region and the allowable luminance upper limit value of the sky region and the luminance of the main subject region. An imaging device that is characterized.
前記撮像素子により被写体を撮像して得られた画像データから主被写体領域を検出する検出ステップと、
前記画像データの前記主被写体領域の輝度と、前記画像データの上部に位置する空領域の輝度を検出する測光ステップと、
前記空領域の輝度と前記空領域の許容輝度上限値の差分に応じた値を、前記主被写体領域の輝度と前記主被写体領域の輝度目標値の差分に加えることにより、主被写体用露出補正値を算出する算出ステップと、
前記主被写体用露出補正値に応じた値に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御ステップと、を備えることを特徴とする撮像装置の制御方法。 In a method for controlling an imaging apparatus including an imaging element,
A detection step of detecting a main subject region from image data obtained by imaging the subject with the imaging element;
A photometric step of detecting the brightness of the main subject area of the image data and the brightness of the sky area located above the image data;
By adding a value corresponding to the difference between the brightness of the sky area and the allowable upper limit of the brightness of the sky area to the difference between the brightness of the main subject area and the brightness target value of the main subject area, an exposure correction value for main subject A calculating step for calculating
Control method for an imaging apparatus, characterized in that it and a control step of controlling exposure time of performing imaging by based on the value in accordance with the exposure correction value for the main subject, the image pickup device.
前記撮像素子により被写体を撮像して得られた画像データから主被写体領域を検出する検出ステップと、A detection step of detecting a main subject region from image data obtained by imaging the subject with the imaging element;
前記画像データの前記主被写体領域の輝度と、前記画像データの上部に位置する空領域の輝度を検出する測光ステップと、A photometric step of detecting the brightness of the main subject area of the image data and the brightness of the sky area located above the image data;
前記空領域の輝度と前記空領域の許容輝度上限値の差分、及び、前記主被写体領域の輝度に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御ステップと、を備えることを特徴とする撮像装置の制御方法。A control step of controlling exposure when imaging is performed by the imaging device based on the difference between the luminance of the sky region and the allowable luminance upper limit value of the sky region and the luminance of the main subject region. A control method for an imaging apparatus.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009015548A JP5335452B2 (en) | 2009-01-27 | 2009-01-27 | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009015548A JP5335452B2 (en) | 2009-01-27 | 2009-01-27 | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010177779A JP2010177779A (en) | 2010-08-12 |
| JP5335452B2 true JP5335452B2 (en) | 2013-11-06 |
Family
ID=42708335
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009015548A Expired - Fee Related JP5335452B2 (en) | 2009-01-27 | 2009-01-27 | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5335452B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111327814A (en) * | 2018-12-17 | 2020-06-23 | 华为技术有限公司 | Image processing method and electronic equipment |
| CN110569822A (en) * | 2019-09-16 | 2019-12-13 | 深圳市商汤科技有限公司 | Image processing method and device, electronic device and storage medium |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4789365B2 (en) * | 2001-08-02 | 2011-10-12 | キヤノン株式会社 | Imaging apparatus and exposure control method thereof |
-
2009
- 2009-01-27 JP JP2009015548A patent/JP5335452B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010177779A (en) | 2010-08-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4989385B2 (en) | Imaging apparatus, control method thereof, and program | |
| JP5366584B2 (en) | Imaging apparatus, image processing method, and program | |
| JP6460721B2 (en) | Image processing apparatus, image processing method, and program | |
| JP2005191687A (en) | Image processing apparatus and method and imaging apparatus | |
| JP5335452B2 (en) | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM | |
| US10666870B2 (en) | Image processing apparatus for generating correction information, image processing method for generating correction information, and recording medium | |
| US10341601B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
| JP5911241B2 (en) | Image processing apparatus, image processing method, and program | |
| JP6559014B2 (en) | Imaging apparatus, control method thereof, and program | |
| US20190007593A1 (en) | Image capturing apparatus, control method for the same, and storage medium | |
| JP5828663B2 (en) | Image processing apparatus and image processing apparatus control method | |
| JP5414412B2 (en) | Imaging apparatus and control method thereof | |
| JP6353585B2 (en) | Imaging apparatus, control method therefor, program, and storage medium | |
| JP2008118389A (en) | Imaging apparatus, image processing apparatus, and image processing method | |
| JP5828722B2 (en) | Imaging apparatus, control method therefor, program, and storage medium | |
| JP5137343B2 (en) | Imaging apparatus and imaging method | |
| JP4393299B2 (en) | Image processing apparatus and control method thereof | |
| JP2005221578A (en) | IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
| JP2005039544A (en) | Control device, imaging device, and program for controlling the same | |
| JP2017188854A (en) | Image processing apparatus, image processing apparatus control method, and program | |
| JP2024179197A (en) | Image capture device, image capture device control method, and storage medium | |
| JP2007173985A (en) | Imaging apparatus, imaging method, program, and storage medium | |
| JP2025146357A (en) | Signal processing device, signal processing method, and computer program | |
| JP6245802B2 (en) | Image processing apparatus, control method thereof, and control program | |
| JP2025071976A (en) | Image processing device, method for controlling image processing device, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120126 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130110 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130212 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130411 |
|
| 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: 20130702 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130731 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5335452 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |