Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5335452B2 - IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM - Google Patents
[go: Go Back, main page]

JP5335452B2 - IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM - Google Patents

IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM Download PDF

Info

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
Application number
JP2009015548A
Other languages
Japanese (ja)
Other versions
JP2010177779A (en
Inventor
宣和 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009015548A priority Critical patent/JP5335452B2/en
Publication of JP2010177779A publication Critical patent/JP2010177779A/en
Application granted granted Critical
Publication of JP5335452B2 publication Critical patent/JP5335452B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus, a control method and a program which enable a dark subject to be photographed in a light state and suppress the phenomenon that the sky in the background is photographed to be whitish. <P>SOLUTION: The imaging apparatus includes an imaging element 14, an image processing circuit 20, an exposure control circuit 40, a system control unit 50, a longitudinal position detection sensor 75, etc. The system control unit 50 detects luminance of a face area of image data obtained by imaging the subject by the imaging element 14 and luminance of a sky area positioned at an upper position in the image data. Further, the system control unit 50 calculates a face correction value by adding a value corresponding to the difference between the luminance of the sky area and a permissible luminance upper-limit value of the sky area to a difference between the luminance of the face area and a luminance target value of the face area, and controls exposure based upon a value corresponding to the face correction value. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

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 Patent Document 1, even when the brightness of the entire image data is appropriate, if the face is under (blackish (dark)), the entire image data is brightened, and the face is over (white) Control is performed to darken the entire image data. In this way, shooting can be performed so that the luminance of the main subject is appropriate in various shooting scenes.

しかしながら、上記の方法では、被写体を撮影して得られた画像データから検出した顔の輝度が適正になるように露出を制御するため、顔の輝度は適正になっても、背景の露出がオーバーまたはアンダーになってしまうことがある。そのような場合、画像全体として見た場合には失敗画像となってしまうといった問題があった。   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.

特開2003−107555号公報JP 2003-107555 A 特開2008−70562号公報JP 2008-70562 A

しかしながら、特許文献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.

本発明の実施の形態に係る撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device which concerns on embodiment of this invention. 撮像装置の全体的な動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of an imaging device. 図2の静止画記録モード処理の詳細を示すフローチャートである。3 is a flowchart showing details of still image recording mode processing of FIG. 2. 図3の測光処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the photometry process of FIG. 図3の測光処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the photometry process of FIG. 図3の撮影処理の詳細を示すフローチャートである。FIG. 4 is a flowchart illustrating details of imaging processing in FIG. 3. FIG. 図4aの逆光補正値DeltaBvC算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the backlight correction value DeltaBvC calculation process of FIG. 4a. 図4aの逆光補正値DeltaBvC算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the backlight correction value DeltaBvC calculation process of FIG. 4a. 図4aの空補正値DeltaBvS算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the empty correction value DeltaBvS calculation process of FIG. 4a. 図4aの空補正値DeltaBvS算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the empty correction value DeltaBvS calculation process of FIG. 4a. 図4aの全体輝度補正値DeltaBvAll算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the whole brightness | luminance correction value DeltaBvAll calculation process of FIG. 4a. 図4aの顔補正値DeltaBvFace算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the face correction value DeltaBvFace calculation process of FIG. 4a. (a)、(b)、(c)、(d)は、全体輝度補正値と顔補正値の関係を示す図である。(A), (b), (c), (d) is a figure which shows the relationship between a whole luminance correction value and a face correction value. (a)、(b)は、領域定義の一例を示す図である。(A), (b) is a figure which shows an example of an area | region definition. (a)、(b)は、測光重み定義の一例を示す図である。(A), (b) is a figure which shows an example of a photometric weight definition.

以下、本発明の実施の形態を図面に基づいて説明する。   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 imaging apparatus 100 is configured as a digital camera, and includes a photographic lens 10, a shutter 12, an imaging element 14, an image processing circuit 20, a system control unit 50, a vertical position detection sensor 75, and the like, and a recording medium. 200 is built-in. In the following configuration of the imaging apparatus 100, descriptions of parts that are not directly related to the present invention are simplified or omitted.

撮像素子14は、撮影対象(被写体)の撮影に伴い撮影レンズ10及び絞り機能を備えるシャッタ12を介して結像された被写体の光学像を電気信号に変換する。レンズバリア102は、撮像部(撮影レンズ10、撮像素子14を含む)を覆うことで撮像部の汚れや破損を防止する。A/D変換器16は、撮像素子14から出力されるアナログ信号をデジタル信号に変換する。タイミング発生回路18は、メモリ制御回路22及びシステム制御部50により制御され、撮像素子14、 A/D変換器16、 D/A変換器26にクロック信号と制御信号を供給する。   The imaging device 14 converts an optical image of a subject imaged through a photographing lens 10 and a shutter 12 having a diaphragm function into an electric signal when photographing a photographing target (subject). The lens barrier 102 prevents the imaging unit from being dirty or damaged by covering the imaging unit (including the imaging lens 10 and the imaging element 14). The A / D converter 16 converts the analog signal output from the image sensor 14 into a digital signal. The timing generation circuit 18 is controlled by the memory control circuit 22 and the system control unit 50, and supplies a clock signal and a control signal to the image sensor 14, A / D converter 16, and D / A converter 26.

画像処理回路20は、 A/D変換器16或いはメモリ制御回路22から出力される画像データに対して所定の画素補間処理や色変換処理を行う。また、画像処理回路20は、撮像した画像データを用いて所定の演算処理を行い、TTL(スルー・ザ・レンズ)方式のAF(オートフォーカス)処理、AE(自動露出)処理、EF(フラッシュプリ発光)処理を行う。この場合、画像処理回路20の演算結果に基づいてシステム制御部50が露光制御回路40、測距制御回路42に対して制御を行う。   The image processing circuit 20 performs predetermined pixel interpolation processing and color conversion processing on the image data output from the A / D converter 16 or the memory control circuit 22. The image processing circuit 20 performs predetermined arithmetic processing using the captured image data, and performs TTL (through-the-lens) AF (autofocus) processing, AE (automatic exposure) processing, and EF (flash pre-processing). (Emission) processing. In this case, the system control unit 50 controls the exposure control circuit 40 and the distance measurement control circuit 42 based on the calculation result of the image processing circuit 20.

また、画像処理回路20は、撮像した画像データを用いて所定の演算処理を行い、その演算結果に基づいてTTL方式のAWB(オートホワイトバランス)処理も行う。更に、画像処理回路20は、顔検出回路(検出手段)を備えており、A/D変換器16或いはメモリ制御回路22から出力される画像データから人物の顔領域の検出を行い、検出された顔領域に係る情報をシステム制御部50に通知する。   Further, the image processing circuit 20 performs predetermined calculation processing using the captured image data, and also performs TTL AWB (auto white balance) processing based on the calculation result. Further, the image processing circuit 20 includes a face detection circuit (detection means), detects a human face area from the image data output from the A / D converter 16 or the memory control circuit 22, and is detected. Information related to the face area is notified to the system control unit 50.

メモリ制御回路22は、A/D変換器16、タイミング発生回路18、画像処理回路20、画像表示メモリ24、D/A変換器26、メモリ30、圧縮・伸張回路32を制御する。A/D変換器16から出力される画像データは、画像処理回路20及びメモリ制御回路22を介して或いは直接メモリ制御回路22を介して、画像表示メモリ24或いはメモリ30に書き込まれる。   The memory control circuit 22 controls the A / D converter 16, the timing generation circuit 18, the image processing circuit 20, the image display memory 24, the D / A converter 26, the memory 30, and the compression / decompression circuit 32. The image data output from the A / D converter 16 is written into the image display memory 24 or the memory 30 via the image processing circuit 20 and the memory control circuit 22 or directly via the memory control circuit 22.

画像表示部28は、TFT LCD等から構成され、画像表示メモリ24に書き込まれD/A変換器26を介して出力された表示用の画像データを表示する。また、画像表示部28は、撮像部から出力される画像データに対応した画像を表示するスルー表示が可能である。撮像した画像を画像表示部28により逐次表示すれば、電子ファインダ機能を実現することが可能である。また、画像表示部28は、システム制御部50の指示により任意に表示をON/OFFすることが可能である。   The image display unit 28 is composed of a TFT LCD or the like, and displays display image data written in the image display memory 24 and output via the D / A converter 26. Further, the image display unit 28 can perform through display for displaying an image corresponding to the image data output from the imaging unit. If the captured images are sequentially displayed by the image display unit 28, the electronic viewfinder function can be realized. The image display unit 28 can arbitrarily turn on / off the display according to an instruction from the system control unit 50.

メモリ30は、撮影対象を撮影した静止画や動画を格納するものであり、所定枚数の静止画や所定時間の動画を格納するのに十分な記憶量を備えている。これにより、複数枚の静止画を連続して撮影する連写撮影やパノラマ撮影の場合にも、高速かつ大量の画像書き込みをメモリ30に対して行うことが可能となる。また、メモリ30は、システム制御部50の作業領域としても使用することが可能である。   The memory 30 stores a still image or a moving image obtained by shooting a shooting target, and has a storage capacity sufficient to store a predetermined number of still images or a moving image for a predetermined time. Thereby, even in the case of continuous shooting or panoramic shooting in which a plurality of still images are continuously shot, a large amount of image writing can be performed on the memory 30 at high speed. The memory 30 can also be used as a work area for the system control unit 50.

圧縮・伸張回路32は、メモリ30に格納された画像データを読み込んで、適応離散コサイン変換(ADCT)、ウェーブレット変換等により圧縮処理或いは伸張処理を行い、処理を終えた画像データをメモリ30に書き込む。暗号/復号回路34は、撮影に伴いメモリ30の所定領域に記憶された画像データに対して必要に応じて暗号化処理を行うと共に、暗号化処理を行ってメモリ30の所定領域に記憶された画像データを再生表示する際に復号化処理を行う。   The compression / decompression circuit 32 reads the image data stored in the memory 30, performs compression processing or expansion processing by adaptive discrete cosine transform (ADCT), wavelet transform, etc., and writes the processed image data to the memory 30. . The encryption / decryption circuit 34 performs an encryption process on the image data stored in the predetermined area of the memory 30 as necessary, and stores the encrypted image data in the predetermined area of the memory 30. Decoding processing is performed when image data is reproduced and displayed.

露光制御回路40は、シャッタ12を制御すると共に、フラッシュ48と連携することによりフラッシュ調光機能も有する。測距制御回路42は、撮影レンズ10のフォーカシングを制御する。ズーム制御回路44は、撮影レンズ10のズーミングを制御する。レンズバリア制御回路46は、レンズバリア102の動作を制御する。フラッシュ48は、AF補助光の投光機能、フラッシュ調光機能も有する。露光制御回路40、測距制御回路42はTTL方式を用いて制御される。   The exposure control circuit 40 controls the shutter 12 and also has a flash light control function in cooperation with the flash 48. The distance measurement control circuit 42 controls the focusing of the photographic lens 10. The zoom control circuit 44 controls zooming of the taking lens 10. The lens barrier control circuit 46 controls the operation of the lens barrier 102. The flash 48 also has an AF auxiliary light projecting function and a flash light control function. The exposure control circuit 40 and the distance measurement control circuit 42 are controlled using the TTL method.

システム制御部50(算出手段、制御手段)は、撮像装置100全体の制御を司る。また、システム制御部50は、撮像された画像データを画像処理回路20により演算した演算結果に基づき、露光制御回路40、測距制御回路42に対して制御を行う。また、システム制御部50は、本発明のプログラムに基づき後述の各フローチャートに示す処理を実行する。   A system control unit 50 (calculation unit, control unit) controls the entire imaging apparatus 100. Further, the system control unit 50 controls the exposure control circuit 40 and the distance measurement control circuit 42 based on the calculation result obtained by calculating the captured image data by the image processing circuit 20. Further, the system control unit 50 executes processing shown in each flowchart described later based on the program of the present invention.

システムメモリ52は、システム制御部50の動作用の定数、変数、本発明のプログラム等を記憶する。不揮発性メモリ56は、例えばEEPROM、フラッシュメモリ等から構成されており、データを記憶する。   The system memory 52 stores constants and variables for operation of the system control unit 50, the program of the present invention, and the like. The nonvolatile memory 56 is composed of, for example, an EEPROM, a flash memory, etc., and stores data.

表示部54は、LCD、LED、発音素子等から構成され、システム制御部50でのプログラムの実行に応じて、文字、画像、音声等を用いて動作状態やメッセージ等を報知する。また、表示部54は、その一部の機能が光学ファインダ104内に設けられている。表示部54の表示内容は省略する。電源スイッチ(メインスイッチ)60は、撮像装置100の電源のON/OFFの切り替え、撮像装置100に接続された各種付属装置の電源のON/OFFの切り替えを行う際に操作する。   The display unit 54 includes an LCD, an LED, a sound generation element, and the like, and notifies an operation state, a message, and the like using characters, images, sounds, and the like according to execution of a program by the system control unit 50. Further, the display unit 54 is provided with a part of its function in the optical viewfinder 104. The display content of the display unit 54 is omitted. The power switch (main switch) 60 is operated when the power of the imaging apparatus 100 is switched ON / OFF and the power of various accessories connected to the imaging apparatus 100 is switched ON / OFF.

第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 image sensor 14 as image data in the memory 30 via the A / D converter 16 and the memory control circuit 22. The development process is a process using computations in the image processing circuit 20 and the memory control circuit 22. The recording process is a process of reading image data from the memory 30, compressing the image data by the compression / decompression circuit 32, and writing the image data to the recording medium 200.

操作部70は、各種ボタン(メニューボタン、セットボタン、AF枠設定用の操作部材等)、各種スイッチ(圧縮モードスイッチ、レックレビュースイッチ等)、タッチパネル等から構成されている。各種ボタンと各種スイッチの詳細は省略する。モード切替スイッチ72は、各種機能モード(自動撮影モード、撮影モード、パノラマ撮影モード、静止画記録モード、動画記録モード、再生モード、PC接続モード等)の切り替え設定を行う際に操作する。   The operation unit 70 includes various buttons (menu button, set button, AF frame setting operation member, etc.), various switches (compression mode switch, REC review switch, etc.), a touch panel, and the like. Details of various buttons and switches are omitted. The mode changeover switch 72 is operated when switching setting of various function modes (automatic photographing mode, photographing mode, panoramic photographing mode, still image recording mode, moving image recording mode, reproduction mode, PC connection mode, etc.).

縦位置検知センサ75(検知手段)は、撮像装置100の姿勢が縦位置(例えば通常は横にした状態で使用するデジタルカメラを縦にした状態の姿勢)であるか、横位置(デジタルカメラを横にした状態の姿勢)であるかを検知する。システム制御部50は、縦位置検知センサ75の検知結果に基づき、撮像素子14により被写体を撮像して得られた画像データにおける上部の領域である背景の空領域を決定する。また、システム制御部50は、画像データの輝度分布に基づき、画像データにおける上部の領域である背景の空領域を決定する。   The vertical position detection sensor 75 (detection means) is configured such that the posture of the imaging apparatus 100 is a vertical position (for example, a posture in which a digital camera that is normally used in a horizontal state is in a vertical state) or a horizontal position (a digital camera is It is detected whether the posture is in the horizontal position). Based on the detection result of the vertical position detection sensor 75, the system control unit 50 determines a background sky area, which is an upper area in image data obtained by imaging the subject with the imaging element 14. Further, the system control unit 50 determines a background sky area, which is an upper area in the image data, based on the luminance distribution of the image data.

電源制御回路80は、電池検出回路、DC−DCコンバータ、通電するブロックを切り替えるスイッチ回路等から構成されている。電源制御回路80は、電池の装着の有無、電池の種類、電池残量の検出を行い、検出結果及びシステム制御部50の指示に基づいてDC−DCコンバータを制御し、必要な電圧を必要な期間、記録媒体200を含む各部へ供給する。電源86は、一次電池(アルカリ電池、リチウム電池等)、二次電池(NiCd電池、NiMH電池、Li-ion電池等)、ACアダプタ等から構成され、コネクタ84、82を介して電源制御回路80に接続される。   The power supply control circuit 80 includes a battery detection circuit, a DC-DC converter, a switch circuit that switches blocks to be energized, and the like. The power supply control circuit 80 detects the presence / absence of a battery, the type of battery, and the remaining battery level, controls the DC-DC converter based on the detection result and the instruction of the system control unit 50, and requires the necessary voltage. It supplies to each part including the recording medium 200 for a period. The power source 86 includes a primary battery (alkaline battery, lithium battery, etc.), a secondary battery (NiCd battery, NiMH battery, Li-ion battery, etc.), an AC adapter, etc., and a power control circuit 80 via connectors 84, 82. Connected to.

インタフェース部90は、記録媒体200とのインタフェースを司る。光学ファインダ104は、画像表示部28による電子ファインダ機能を使用すること無しに該光学ファインダ104のみを用いて撮影を行うことが可能に構成されている。光学ファインダ104内には、表示部54の一部の機能(合焦表示、手振れ警告表示、フラッシュ充電表示、シャッタ速度表示、絞り値表示、露出補正表示等)が設けられている。   The interface unit 90 manages an interface with the recording medium 200. The optical viewfinder 104 is configured to be able to take an image using only the optical viewfinder 104 without using the electronic viewfinder function of the image display unit 28. In the optical viewfinder 104, some functions (focus display, camera shake warning display, flash charge display, shutter speed display, aperture value display, exposure correction display, etc.) of the display unit 54 are provided.

記録媒体200は、メモリカード或いはハードディスク等から構成され、半導体メモリや磁気ディスク等から構成される記録部202、撮像装置100とのインタフェースを司るインタフェース部204、コネクタ206を備えている。記録媒体200は、コネクタ206、92を介してインタフェース部90に接続される。本実施の形態では、記録媒体200は撮像装置100に内蔵されている。   The recording medium 200 includes a memory card or a hard disk, and includes a recording unit 202 including a semiconductor memory or a magnetic disk, an interface unit 204 that manages an interface with the imaging apparatus 100, and a connector 206. The recording medium 200 is connected to the interface unit 90 via connectors 206 and 92. In the present embodiment, the recording medium 200 is built in the imaging device 100.

次に、上記の構成を備える本実施の形態の撮像装置の動作について図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 power switch 60 of the imaging apparatus to turn on the power, the system control unit 50 of the imaging apparatus initializes a flag and a control variable (step S201). Next, the system control unit 50 starts management processing relating to the file recorded on the recording medium 200 (step S201). Next, the system control unit 50 determines whether the mode set by the photographer using the mode changeover switch 72 is the still image recording mode, the moving image recording mode, or the playback mode (step S203, step S205, Step S207).

モード切替スイッチ72が静止画記録モードに設定されていた場合、システム制御部50は、静止画記録モード処理を実行する(ステップS204)。静止画記録モード処理の詳細は図3を用いて後述する。モード切替スイッチ72が動画記録モードに設定されていた場合、システム制御部50は、動画記録モード処理を実行する(ステップS206)。モード切替スイッチ72が再生モードに設定されていた場合、システム制御部50は、再生モード処理を実行する(ステップS208)。   When the mode switch 72 is set to the still image recording mode, the system control unit 50 executes still image recording mode processing (step S204). Details of the still image recording mode process will be described later with reference to FIG. If the mode switch 72 is set to the moving image recording mode, the system control unit 50 executes the moving image recording mode process (step S206). If the mode switch 72 is set to the playback mode, the system control unit 50 executes the playback mode process (step S208).

モード切替スイッチ72が上記モード以外のその他のモードに設定されていた場合、システム制御部50は、設定されたモードに応じた処理を実行する(ステップS209)。   When the mode changeover switch 72 is set to another mode other than the above mode, the system control unit 50 executes processing according to the set mode (step S209).

システム制御部50は、モード切替スイッチ72により設定されたモードに対応した処理(ステップS204、ステップS206、ステップS208、ステップS209の何れか)を実行した後、電源スイッチ60の設定位置を判定する(ステップS210)。電源スイッチ60がONに設定されていた場合、ステップS203に処理を戻す。一方、電源スイッチ60がOFFに設定されていた場合、システム制御部50は、終了処理を行い、撮像装置の電源をOFF状態へ移行させる(ステップS211)。   The system control unit 50 performs processing corresponding to the mode set by the mode changeover switch 72 (any of step S204, step S206, step S208, and step S209), and then determines the setting position of the power switch 60 ( Step S210). If the power switch 60 is set to ON, the process returns to step S203. On the other hand, when the power switch 60 is set to OFF, the system control unit 50 performs an end process and shifts the power of the imaging apparatus to the OFF state (step S211).

図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 mode changeover switch 72 or when the power switch 60 is turned OFF. .

図3において、撮像装置のシステム制御部50は、静止画記録モード処理を開始すると、撮影モードを確定する(ステップS301)。操作部70が操作され撮影モードを設定する入力があった場合には、その設定に従った撮影モードに確定し、入力がない場合には前回の静止画記録モード処理の終了時における撮影モードに確定する。   In FIG. 3, the system control unit 50 of the imaging apparatus determines the shooting mode when the still image recording mode process is started (step S <b> 301). When the operation unit 70 is operated and there is an input for setting the shooting mode, the shooting mode is determined according to the setting, and when there is no input, the shooting mode at the end of the previous still image recording mode process is determined. Determine.

次に、システム制御部50は、上記のステップS301で撮影モードが確定すると、撮像部から出力される画像データに対応した画像を画像表示部28に表示するスルー表示を行う(ステップS302)。次に、システム制御部50は、電源制御部80を用いて電源86(電池)の残容量を確認すると共に、インタフェース部90を介して記録媒体200の有無と残容量を確認し、撮像装置100の動作に問題があるか否かを判定する(ステップS303)。   Next, when the shooting mode is determined in step S301 described above, the system control unit 50 performs a through display in which an image corresponding to the image data output from the imaging unit is displayed on the image display unit 28 (step S302). Next, the system control unit 50 confirms the remaining capacity of the power source 86 (battery) using the power source control unit 80, confirms the presence / absence of the recording medium 200 and the remaining capacity via the interface unit 90, and the imaging apparatus 100. It is determined whether or not there is a problem with the operation (step S303).

撮像装置100の動作に問題がある場合は、システム制御部50は、画像表示部28を用いて画像や音声により所定の警告表示を行い(ステップS304)、処理をステップS301に戻す。撮像装置100の動作に問題が無い場合は、システム制御部50は、必要に応じてフォーカスに関連する設定を更新する(ステップS305)。ここでは、操作部70のメニューボタンを押すことで画像表示部28に表示されるメニュー画面から、画像データから検出した顔位置に応じてAFエリアを設定する「顔優先」の適用の有無について、撮影者が任意に設定することができる。   If there is a problem with the operation of the imaging apparatus 100, the system control unit 50 performs a predetermined warning display with an image or sound using the image display unit 28 (step S304), and returns the process to step S301. If there is no problem in the operation of the imaging apparatus 100, the system control unit 50 updates settings related to the focus as necessary (step S305). Here, whether or not “face priority” for setting the AF area according to the face position detected from the image data from the menu screen displayed on the image display unit 28 by pressing the menu button of the operation unit 70 is applied. The photographer can arbitrarily set it.

次に、システム制御部50は、AF枠設定が「顔優先」であるか否かを判断する(ステップS306)。AF枠設定が「顔優先」でない場合は、直接、ステップS308に進む。AF枠設定が「顔優先」である場合は、システム制御部50は、画像処理回路20から通知された画像処理回路20内の顔検出回路の顔検出結果に基づいて、上記スルー表示される画像に重畳表示する顔枠の更新処理を行う(ステップS307)。その後、ステップS308に進む。   Next, the system control unit 50 determines whether or not the AF frame setting is “face priority” (step S306). If the AF frame setting is not “face priority”, the process proceeds directly to step S308. When the AF frame setting is “face priority”, the system control unit 50 displays the through image based on the face detection result of the face detection circuit in the image processing circuit 20 notified from the image processing circuit 20. Update processing of the face frame to be superimposed on is performed (step S307). Thereafter, the process proceeds to step S308.

次に、システム制御部50は、第1シャッタスイッチSW1・62の第1シャッタスイッチ信号SW1がONしているか否かを判定する(ステップS308)。第1シャッタスイッチ信号SW1がOFFの場合は、ステップS305に戻り、ステップS305、ステップS306を繰り返す。一方、第1シャッタスイッチ信号SW1がONの場合は、ステップS309に進む。   Next, the system control unit 50 determines whether or not the first shutter switch signal SW1 of the first shutter switches SW1 and 62 is ON (step S308). If the first shutter switch signal SW1 is OFF, the process returns to step S305, and steps S305 and S306 are repeated. On the other hand, if the first shutter switch signal SW1 is ON, the process proceeds to step S309.

次に、システム制御部50は、撮影対象(被写体)の輝度を測定する測光処理を行うことで、絞り値、シャッタ時間(シャッタ速度)及び感度を含む露出条件を決定する(ステップS309)。測光処理の詳細は図4を用いて後述する。尚、測光処理において、必要であればフラッシュ48の設定も行われる。システム制御部50は、測光処理を行った測光結果に基づいて、全体輝度補正値、顔補正値、最終露出補正値を算出する。詳細は後述する。次に、システム制御部50は、測距処理を行うことで撮影レンズ10の焦点を被写体に合わせる(ステップS310)。   Next, the system control unit 50 determines exposure conditions including an aperture value, a shutter time (shutter speed), and sensitivity by performing a photometric process for measuring the luminance of the photographing target (subject) (step S309). Details of the photometric processing will be described later with reference to FIG. In the photometric process, the flash 48 is set if necessary. The system control unit 50 calculates an overall luminance correction value, a face correction value, and a final exposure correction value based on the photometric result obtained by performing the photometric processing. Details will be described later. Next, the system control unit 50 adjusts the focus of the photographing lens 10 to the subject by performing a distance measurement process (step S310).

次に、システム制御部50は、第1シャッタスイッチSW1信号2と第2シャッタスイッチSW2信号のON/OFF状態を判定する(ステップS311、ステップS312)。第1シャッタスイッチ信号SW1がONした状態で第2シャッタスイッチ信号SW2がONになると、ステップS313に進む。   Next, the system control unit 50 determines ON / OFF states of the first shutter switch SW1 signal 2 and the second shutter switch SW2 signal (steps S311 and S312). If the second shutter switch signal SW2 is turned on while the first shutter switch signal SW1 is turned on, the process proceeds to step S313.

第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 system control unit 50 sets the display state of the image display unit 28 from the through display state to the fixed color display state (step S313). Next, the system control unit 50 executes photographing processing (including exposure processing and development processing) (step S314).

尚、露光処理では、A/D変換器16、画像処理回路20、メモリ制御回路22を介して、或いはA/D変換器16から直接メモリ制御回路22を介して、撮像した画像データをメモリ30に書き込む。また、現像処理では、システム制御部50が、必要に応じてメモリ30に書き込まれた画像データを読み出して各種処理を行う。撮影処理の詳細は図5を用いて後述する。   In the exposure process, captured image data is stored in the memory 30 via the A / D converter 16, the image processing circuit 20, the memory control circuit 22, or directly from the A / D converter 16 via the memory control circuit 22. Write to. In the development process, the system control unit 50 reads the image data written in the memory 30 as necessary and performs various processes. Details of the photographing process will be described later with reference to FIG.

次に、システム制御部50は、画像表示部28に対し撮影処理で得られた画像データに対応した撮影画像のレックレビュー表示を行う(ステップS315)。レックレビューとは、撮影画像の確認のために、被写体の撮影後に記録媒体200に画像データを記録する前に、予め決められた時間(レビュー時間)だけ撮影画像を画像表示部28に表示する処理である。システム制御部50は、レックレビュー表示を行った後、撮影処理で得られた画像データを画像ファイルとして記録媒体200に対して書き込む記録処理を実行する(ステップS316)。   Next, the system control unit 50 performs a REC review display of the captured image corresponding to the image data obtained by the imaging process on the image display unit 28 (step S315). The REC review is a process for displaying a photographed image on the image display unit 28 for a predetermined time (review time) before recording image data on the recording medium 200 after photographing a subject for confirmation of the photographed image. It is. After performing the REC review display, the system control unit 50 executes a recording process in which the image data obtained by the imaging process is written to the recording medium 200 as an image file (step S316).

次に、システム制御部50は、第2シャッタスイッチ信号SW2のON/OFF状態を判定する(ステップS317)。第2シャッタスイッチ信号SW2がONの場合は、ステップS317の判定を繰り返し、第2シャッタスイッチ信号SW2がOFFになるのを待つ。この間、上記レックレビュー表示を継続させる。   Next, the system control unit 50 determines the ON / OFF state of the second shutter switch signal SW2 (step S317). If the second shutter switch signal SW2 is ON, the determination in step S317 is repeated, and the process waits for the second shutter switch signal SW2 to be OFF. During this time, the REC review display is continued.

即ち、ステップS316の記録処理が終了した際に、第2シャッタスイッチ信号SW2がOFFになるまで画像表示部28におけるレックレビュー表示を継続させる。このように構成することにより、撮影者は、シャッタボタン(不図示)の全押し状態を継続することで、レックレビューを用いた撮影画像の確認を入念に行うことが可能となる。   That is, when the recording process in step S316 is completed, the REC review display on the image display unit 28 is continued until the second shutter switch signal SW2 is turned OFF. With this configuration, the photographer can carefully check the captured image using the REC review by continuing to fully press the shutter button (not shown).

撮影者がシャッタボタンを全押し状態にして撮影を行った後、シャッタボタンから手を放すなどして全押し状態が解除されると、処理はステップ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 system control unit 50 determines whether or not a predetermined review time has elapsed (step S318). If the review time has elapsed, the process proceeds to step S319.

次に、システム制御部50は、画像表示部28の表示状態をレックレビュー表示からスルー表示状態に戻す(ステップS319)。この処理により、撮影者がレックレビュー表示により撮影画像を確認した後、画像表示部28の表示状態は次の撮影のために撮像部から出力される画像データに対応した画像を逐次表示するスルー表示状態に自動的に切り替わることになる。   Next, the system control unit 50 returns the display state of the image display unit 28 from the rec review display to the through display state (step S319). Through this process, after the photographer confirms the photographed image by the REC review display, the display state of the image display unit 28 is a through display that sequentially displays images corresponding to the image data output from the imaging unit for the next photographing. It will automatically switch to the state.

次に、システム制御部50は、第1シャッタスイッチ信号SW1のON/OFF状態を判定する(ステップS320)。第1シャッタスイッチ信号SW1がONの場合はステップS311へ処理を戻し、第1シャッタスイッチ信号SW1がOFFの場合はステップS305へ処理を戻す。   Next, the system control unit 50 determines the ON / OFF state of the first shutter switch signal SW1 (step S320). If the first shutter switch signal SW1 is ON, the process returns to step S311. If the first shutter switch signal SW1 is OFF, the process returns to step S305.

即ち、シャッタボタンの半押し状態が継続している(第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 system control unit 50 prepares for the next shooting (step S311). On the other hand, when the shutter button is released (the first shutter switch signal SW1 is OFF), the system control unit 50 finishes a series of shooting operations and returns to the shooting standby state (step S305).

図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 system control unit 50 of the imaging apparatus performs the following calculation based on image data obtained by imaging the subject read from the imaging element 14. On the exposure surface of the image sensor 14, a photometric area (photometric means) occupying 90% of the size of the exposure surface is set with the same central portion, and an image data area corresponding to the photometric area is set. Luminance is required. This photometric area only needs to be set to a size that requires the brightness of the entire exposure surface, and is generally set to occupy a size of about 70 to 100% of the exposure surface.

この測光領域(全体領域)を水平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 system control unit 50 performs the following calculation using the block luminance Y (h, v) obtained in step S401. That is, the backlight correction value DeltaBvC is calculated (step S402). Also, an empty correction value DeltaBvS is calculated (step S403). Also, the brightness correction value BvL is calculated (step S404). Details of the backlight correction value DeltaBvC calculation process will be described later with reference to FIGS. 6A and 6B, and details of the sky correction value DeltaBvS calculation process will be described later with reference to FIGS. 7A and 7B.

この場合、システム制御部50は、輝度補正値BvLについては被写体の輝度に応じて輝度補正値BvLを設定する(ステップS404)。尚、逆光補正値とは、被写体を逆光で撮影する場合を想定した際の、逆光による影響を抑制するための輝度補正値である。また、空補正値とは、背景として空がある被写体を撮影する場合を想定した際の、空による影響を抑制するための輝度補正値である。   In this case, the system control unit 50 sets the brightness correction value BvL according to the brightness of the subject for the brightness correction value BvL (step S404). The backlight correction value is a luminance correction value for suppressing the influence of backlight when it is assumed that the subject is photographed with backlight. The sky correction value is a luminance correction value for suppressing the influence of the sky when it is assumed that an object with the sky as a background is captured.

次に、システム制御部50は、上記の逆光補正値DeltaBvC、空補正値DeltaBvS、輝度補正値BvLに基づき、以下の算出を行う。即ち、撮像素子14の測光領域全体としての輝度を適正値にする場合を想定した際の輝度補正値である全体輝度補正値DeltaBvAllを算出する(ステップS405)。全体輝度補正値(全体用露出補正値)DeltaBvAll算出処理の詳細は図8を用いて後述する。   Next, the system control unit 50 performs the following calculation based on the backlight correction value DeltaBvC, the sky correction value DeltaBvS, and the luminance correction value BvL. That is, the overall brightness correction value DeltaBvAll, which is a brightness correction value when assuming that the brightness of the entire photometric area of the image sensor 14 is an appropriate value, is calculated (step S405). Details of the overall brightness correction value (total exposure correction value) DeltaBvAll calculation process will be described later with reference to FIG.

次に、システム制御部50は、画像処理回路20から通知された画像処理回路20内の顔検出回路の顔検出結果(顔検出情報)を参照し、被写体を撮像して得た画像データから顔が検出されているか否かを判断する(ステップS406)。被写体を撮像して得た画像データから顔が検出されていない場合は、システム制御部50は、全体輝度補正値DeltaBvAllを最終露出補正値LastHoseiDeltaBvとし(ステップS407)、測光処理を終了する。   Next, the system control unit 50 refers to the face detection result (face detection information) of the face detection circuit in the image processing circuit 20 notified from the image processing circuit 20, and detects the face from the image data obtained by imaging the subject. Is detected (step S406). If no face is detected from the image data obtained by imaging the subject, the system control unit 50 sets the overall brightness correction value DeltaBvAll as the final exposure correction value LastHoseiDeltaBv (step S407), and ends the photometric process.

他方、被写体を撮像して得た画像データから顔が検出された場合は、システム制御部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 system control unit 50 uses the block luminance Y (h, v) and the face detection information notified from the image processing circuit 20, A face correction value DeltaBvFace is calculated (step S408). Details of the face correction value (main subject exposure correction value) DeltaBvFace calculation process will be described later with reference to FIG.

顔が検出された場合、露出制御後に、顔補正値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 system control unit 50 obtains a difference Delta1 obtained by subtracting the overall brightness correction value DeltaBvAll from the face correction value DeltaBvFace (step S409). When the difference Delta1 is smaller than the threshold MIN_DELTA (YES in step S410), the system control unit 50 sets the threshold MIN_DELTA to Delta1 (step S411). If the difference Delta1 is greater than the threshold MAX_DELTA (YES in step S412), the system control unit 50 sets the threshold MAX_DELTA to Delta1 (step S413). Note that MIN_DELTA and MAX_DELTA are design parameters and satisfy MIN_DELTA <MAX_DELTA.

次に、システム制御部50は、被写体を撮像して得た画像データから検出された顔の大きさに応じて混合比MixRatio1を求める(ステップS414)。この場合、0≦MixRatio1 ≦1 とし、被写体の画像データから検出された顔が大きいほど混合比MixRatio1が大きくなるように設定する。次に、システム制御部50は、求めた差分Delta1、混合比MixRatio1、全体輝度補正値DeltaBvAllを用いて顔補正値DeltaBvFaceを更新する(ステップS415)。   Next, the system control unit 50 obtains the mixing ratio MixRatio1 according to the size of the face detected from the image data obtained by imaging the subject (step S414). In this case, 0 ≦ MixRatio1 ≦ 1 is set so that the mixing ratio MixRatio1 increases as the face detected from the image data of the subject increases. Next, the system control unit 50 updates the face correction value DeltaBvFace using the obtained difference Delta1, mixing ratio MixRatio1, and overall brightness correction value DeltaBvAll (step S415).

上記のステップ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 system control unit 50 determines whether or not the overall luminance correction value DeltaBvAll is larger than the face correction value DeltaBvFace updated in step S415 (step S416). If the overall brightness correction value DeltaBvAll is not larger than the face correction value DeltaBvFace, the system control unit 50 sets the face correction value DeltaBvFace as the final exposure correction value LastHoseiDeltaBv (step S420). Thereby, the photometry process is completed.

上記の各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 system control unit 50 makes the following determination. That is, it is determined whether or not 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 (step S417).

顔補正値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 system control unit 50 performs the following processing. That is, the overall brightness correction value DeltaBvAll is set as the final exposure correction value LastHoseiDeltaBv (step S418). Thereby, the photometry process is completed. However, MIN_DELTABV_FACE <0.

この場合は、全体輝度補正値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 system control unit 50 performs the following process. That is, DeltaBvFace-MIN_DELTABV_FACE is set as the final exposure correction value LastHoseiDeltaBv (step S419). Thereby, the photometry process is completed.

この場合は、全体輝度補正値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 system control unit 50 of the imaging device acquires the shooting start date and time from a system timer (not shown) when shooting of the imaging device is started, and stores it in the system memory 52 (step S501). Next, the system control unit 50 obtains the exposure amount Ev when the image data used for the photometric processing is captured from the aperture value and the exposure time when the image data used for the photometric processing (step S309) is captured. . Then, this exposure amount Ev is corrected to compensate for the final exposure correction value LastHoseiDeltaBv obtained in the photometric process (step S309), and the final exposure amount LastEv is obtained.

システム制御部50は、測光処理(ステップS309)で求めた測光データ(最終露出量LastEv)に従い、絞り機能を有するシャッタ12を絞り値に応じて開放する(ステップS502)。こうして、露光が開始される(ステップS503)。   The system control unit 50 opens the shutter 12 having the aperture function according to the aperture value according to the photometric data (final exposure amount LastEv) obtained in the photometric processing (step S309) (step S502). Thus, exposure is started (step S503).

次に、システム制御部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 system control unit 50 waits for the end of exposure of the image sensor 14 according to the photometric data (final exposure amount LastEv) obtained in the photometric process (step S309) (step S504). When the exposure end time is reached, the system control unit 50 closes the shutter 12 (step S505). Next, the system control unit 50 reads image data (charge signal) from the image sensor 14, and passes through the A / D converter 16, the image processing circuit 20, the memory control circuit 22, or from the A / D converter 16. The data is directly written into the memory 30 via the memory control circuit 22 (step S506). Steps S501 to S506 described above correspond to the exposure process.

次に、システム制御部50は、必要に応じて、メモリ30に書き込まれた画像データを読み出して画像処理回路20により画像処理を順次施す(ステップS507)。この画像処理には、例えば、ホワイトバランス処理や、圧縮・伸張回路32を用いた圧縮処理等が含まれる。また、画像データのうち暗い部分をゲインアップする暗部補正処理もステップS507で行う。システム制御部50は、画像処理を施した画像データをメモリ30に書き込む。   Next, the system control unit 50 reads out the image data written in the memory 30 as necessary, and sequentially performs image processing by the image processing circuit 20 (step S507). This image processing includes, for example, white balance processing, compression processing using the compression / expansion circuit 32, and the like. A dark part correction process for gaining up a dark part of the image data is also performed in step S507. The system control unit 50 writes the image data subjected to image processing in the memory 30.

次に、システム制御部50は、メモリ30から画像データを読み出し、画像データを圧縮・伸張回路32を用いて伸張し、画像表示部28の表示用にリサイズする。そして、システム制御部50は、リサイズされた画像データを画像表示部28に表示するべくD/A変換器26に転送する(ステップS508)。上記一連の処理を完了すると、撮影処理を終了する。   Next, the system control unit 50 reads the image data from the memory 30, expands the image data using the compression / expansion circuit 32, and resizes the image data for display on the image display unit 28. Then, the system control unit 50 transfers the resized image data to the D / A converter 26 so as to be displayed on the image display unit 28 (step S508). When the series of processes is completed, the shooting process is terminated.

図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 system control unit 50 of the imaging apparatus refers to the face detection result of the face detection circuit in the image processing circuit 20 notified from the image processing circuit 20, and image data obtained by imaging the subject. Whether or not a face is detected is determined (step S601). When the face is detected from the image data obtained by imaging the subject, the system control unit 50 corresponds to the detected face area in the block luminance Y (h, v) obtained in step S401 in FIG. 4a. The average luminance value YLFace of the area to be calculated is obtained (step S602).

次に、システム制御部50は、閾値MaxYLをYLFace * MAX_YLLIMITに設定すると共に、閾値MinYLをYLFace / MIN_YLLIMITに設定し(ステップS603)、ステップS622に進む。尚、MAX_YLLIMIT、MIN_YLLMITは設計パラメータであり、例えばMAX_YLLIMIT = MIN_YLLIMIT = 2とする。   Next, the system control unit 50 sets the threshold MaxYL to YLFace * MAX_YLLIMIT, sets the threshold MinYL to YLFace / MIN_YLLIMIT (step S603), and proceeds to step S622. MAX_YLLIMIT and MIN_YLLMIT are design parameters. For example, MAX_YLLIMIT = MIN_YLLIMIT = 2.

他方、被写体を撮像して得た画像データから顔が検出されていない場合は、システム制御部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 system control unit 50 averages the luminance of the region A out of the block luminance Y (h, v) obtained in step S401 of FIG. 4a. A value YLA is obtained (step S604). The area A is an area near the center of the photometric area (the central area of the image data). When HMAX = VMAX = 8, for example, a block of 2 × 2 in the center may be used as shown in FIG. As shown in FIG. 11A, the region B may be set so as to surround the region A, the region C may be set so as to surround the region B, and the region D may be set so as to surround the region C.

次に、システム制御部50は、閾値MaxYLをYLA* MAX_YLLIMITに設定すると共に、閾値MinYLをYLA / MIN_YLLIMITに設定し(ステップS605)、ステップS622に進む。   Next, the system control unit 50 sets the threshold MaxYL to YLA * MAX_YLLIMIT, sets the threshold MinYL to YLA / MIN_YLLIMIT (step S605), and proceeds to step S622.

システム制御部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 system control unit 50 sets the gains B_Gain, C_Gain, and D_Gain for the regions B, C, and D to BGAIN, CGAIN, and DGAIN, respectively (step S622), and proceeds to step S606. Here, BGAIN, CGAIN, and DGAIN are design parameters. For example, BGAIN = 0.75, CGAIN = 0.67, and DGAIN = 0.5. A smaller gain is set in a region closer to the periphery of the image data.

システム制御部50は、ステップS622の処理後、HMAX×VMAXの各ブロックの測光重みを求めるべく、まず変数h、vを0に初期化する(ステップS606)。次に、システム制御部50は、変数vがVMAXより小さいか否かを判断する(ステップS607)。変数vがVMAXより小さい場合はステップS608に進み、そうでない場合はステップS621に進む。   After the process of step S622, the system control unit 50 first initializes variables h and v to 0 in order to obtain the photometric weight of each block of HMAX × VMAX (step S606). Next, the system control unit 50 determines whether or not the variable v is smaller than VMAX (step S607). If the variable v is smaller than VMAX, the process proceeds to step S608; otherwise, the process proceeds to step S621.

システム制御部50は、変数hがHMAXより小さいか否かを判断する(ステップS608)。変数hがHMAXより小さい場合はステップS609に進み、そうでない場合はステップS620に進む。システム制御部50は、ブロック輝度Y(h, v)がステップS603或いはステップS605にて設定した閾値MaxYLより大きいか否かを判断する(ステップS609)。ブロック輝度Y(h, v)が閾値MaxYLより大きい場合はステップS612に進み、そうでない場合はステップS610に進む。   The system control unit 50 determines whether the variable h is smaller than HMAX (step S608). If the variable h is smaller than HMAX, the process proceeds to step S609; otherwise, the process proceeds to step S620. The system control unit 50 determines whether or not the block luminance Y (h, v) is larger than the threshold value MaxYL set in step S603 or step S605 (step S609). If the block luminance Y (h, v) is larger than the threshold MaxYL, the process proceeds to step S612, and if not, the process proceeds to step S610.

システム制御部50は、同様に、ブロック輝度Y(h, v)がステップS603或いはステップS605にて設定した閾値MinYLより小さいか否かを判断する(ステップS610)。ブロック輝度Y(h, v)が閾値MinYLより小さい場合はステップS612に進み、そうでない場合はステップS611に進む。   Similarly, the system control unit 50 determines whether or not the block luminance Y (h, v) is smaller than the threshold MinYL set in step S603 or step S605 (step S610). If the block luminance Y (h, v) is smaller than the threshold value MinYL, the process proceeds to step S612. Otherwise, the process proceeds to step S611.

ブロック輝度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 system control unit 50 uses a predetermined default photometric weight as the backlight correction photometric weight Wc (h, v) of the block (h, v). W (h, v) is set (step S611). The default photometric weight W (h, v) assigned to each block (h, v) is set to a larger value as it is closer to the center of the photometric area, as shown in FIG. Yes.

ステップ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 system control unit 50 makes the following determination. That is, it is determined whether or not the block luminance Y (h, v) belongs to the region B (step S612).

ブロック輝度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 system control unit 50 performs the following process. That is, a predetermined photometric weight W (h, v) of the block luminance Y (h, v) is multiplied by the gain B_Gain for the region B, and this is multiplied by the photometric weight Wc for backlight correction of the block luminance Y (h, v). (H, v) is set (step S613).

ブロック輝度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 system control unit 50 determines whether or not the block luminance Y (h, v) belongs to the region C (step S614). When the block luminance Y (h, v) belongs to the region C, the system control unit 50 performs the following process. That is, a predetermined photometric weight W (h, v) of the block luminance Y (h, v) is multiplied by the gain C_Gain for the region C, and this is multiplied by the photometric weight Wc for backlight correction of the block luminance Y (h, v). (H, v) is set (step S615).

ブロック輝度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 system control unit 50 determines whether or not the block luminance Y (h, v) belongs to the region D (step S616). ). When the block luminance Y (h, v) belongs to the region D, the system control unit 50 performs the following process. That is, a predetermined photometric weight W (h, v) of the block luminance Y (h, v) is multiplied by the gain D_Gain for the region D, and this is multiplied by the photometric weight Wc for backlight correction of the block luminance Y (h, v). (H, v) is set (step S617).

ここで、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 system control unit 50 performs the following settings. That is, a predetermined default photometric weight W (h, v) is set as the backlight correction photometric weight Wc (h, v) for the block luminance Y (h, v) (step S618).

システム制御部50は、ステップS613、ステップS615、ステップS617またはステップS618でブロック輝度Y(h, v)の逆光補正用測光重みWc(h, v)を求めた後、変数hをインクリメントする(ステップS619)。その後、次のブロックの重み計算を行うべくステップS608に戻る。   The system control unit 50 obtains the backlight correction photometric weight Wc (h, v) of the block luminance Y (h, v) in step S613, step S615, step S617, or step S618, and then increments the variable h (step S619). Thereafter, the process returns to step S608 to calculate the weight of the next block.

ステップS608で変数hがHMAXより小さくない場合は、システム制御部50は、変数vをインクリメントし(ステップS620)、次のブロックの重み計算をすべくステップS607に戻る。   If the variable h is not smaller than HMAX in step S608, the system control unit 50 increments the variable v (step S620), and returns to step S607 to calculate the weight of the next block.

ステップ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 system control unit 50 calculates the backlight correction value DeltaBvC from the block luminance Y (h, v) and the backlight correction weight Wc (h, v) based on the following equation. Calculate (step S621). Thereby, the backlight correction value DeltaBvC calculation process (step S402) is terminated.

Figure 0005335452
Figure 0005335452

ここで、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 system control unit 50 of the imaging apparatus first determines the upward direction (sky direction) of the imaging apparatus. That is, since the system control unit 50 determines the upward direction (sky direction) of the imaging apparatus, is the vertical position detection sensor 75 that detects whether the attitude of the imaging apparatus is the vertical position or the horizontal position being operated? It is confirmed whether or not (step S701).

縦位置検知センサ75の例としては、複数の圧電素子に囲まれた空間内に鉄球が配置され、鉄球の重みによって電気信号を出力している圧電素子を検出することで、撮像装置の上方向を決定する構成のものが考えられる。ここで、縦位置検知センサ75が動作していない状況とは、例えば、想定していない方向に撮像装置が傾けられた(例えば、レンズの光軸を上に向けた)結果、どの圧電素子にも鉄球が接触しない状況のことを指す。あるいは、複数の圧電素子にまたがるような位置に鉄球が転がり、撮像装置の姿勢が少し傾いただけで鉄球の重みが加わる圧電素子が切り替わってしまい、上方向の検知結果が安定しない状況を指す。   As an example of the vertical position detection sensor 75, an iron ball is arranged in a space surrounded by a plurality of piezoelectric elements, and a piezoelectric element that outputs an electrical signal is detected by the weight of the iron ball, thereby detecting the position of the imaging device. A configuration that determines the upward direction is conceivable. Here, the situation where the vertical position detection sensor 75 is not operating refers to, for example, which piezoelectric element is a result of the imaging device being tilted in an unexpected direction (for example, the optical axis of the lens is directed upward). Also refers to the situation where the iron ball is not in contact. Alternatively, the iron ball rolls to a position over a plurality of piezoelectric elements, and the orientation of the imaging device is slightly tilted, and the piezoelectric element to which the weight of the iron ball is applied is switched, and the upward detection result is not stable. .

縦位置検知センサ75が動作している場合、システム制御部50は、縦位置検知センサ75の出力に応じて撮像装置の上方向を決定する(ステップS702)。他方、縦位置検知センサ75が動作していない場合(または撮像装置が縦位置検知センサ75が無い場合)、システム制御部50は、図4aのステップS401で求めたブロック輝度Y(h, v)の分布から撮像装置の上方向を決定する(ステップS703)。即ち、例えば高輝度のブロックが多い方を上方向と定めればよい。   When the vertical position detection sensor 75 is operating, the system control unit 50 determines the upward direction of the imaging device according to the output of the vertical position detection sensor 75 (step S702). On the other hand, when the vertical position detection sensor 75 is not operating (or when the imaging device does not have the vertical position detection sensor 75), the system control unit 50 determines the block luminance Y (h, v) obtained in step S401 of FIG. 4a. The upward direction of the imaging device is determined from the distribution of the image (step S703). That is, for example, the direction with more high-luminance blocks may be determined as the upward direction.

システム制御部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 system control unit 50 shifts the default metering weight W (h, v) shown in FIG. 12A to the lower block luminance (h, v) and assigns it to the default sky-correcting metering. The weight Wa (h, v) is set (step S704). The downward direction is a direction opposite to the upward direction of the imaging apparatus determined in step S702 or step S703. When HMAX = VMAX = 8, the default photometric weight W (h, v) is as shown in FIG. 12A, and the default sky correction photometric weight Wa (h, v) is as shown in FIG. 12B. . When W (h, v) is shifted downward by one line in FIG. 12A, Wa (h, v) in FIG. 12B is obtained.

なお、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 system control unit 50 refers to the face detection result of the face detection circuit in the image processing circuit 20 notified from the image processing circuit 20, and whether the face is detected from the image data obtained by imaging the subject. It is determined whether or not (step S705). When the face is detected from the image data obtained by imaging the subject, the system control unit 50 corresponds to the detected face area in the block luminance Y (h, v) obtained in step S401 in FIG. 4a. The average luminance value YLFace of the area to be calculated is obtained (step S706).

次に、システム制御部50は、クリップ処理で用いる閾値MaxYLをYLFace * MAX_YLLIMITに設定すると共に、閾値MinYLをYLFace / MIN_YLLIMITに設定する(ステップS707)。ここで、MAX_YLLIMIT、MIN_YLLIMITは設計パラメータであり、例えばMAX_YLLIMIT = MIN_YLLIMIT = 2とする。   Next, the system control unit 50 sets the threshold value MaxYL used in clip processing to YLFace * MAX_YLLIMIT, and sets the threshold value MinYL to YLFace / MIN_YLLIMIT (step S707). Here, MAX_YLLIMIT and MIN_YLLIMIT are design parameters. For example, MAX_YLLIMIT = MIN_YLLIMIT = 2.

次に、システム制御部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 system control unit 50 sets the gains for the regions Bs, Cs, and Ds to BSGAIN_FACE, CSGAIN_FACE, and DSGAIN_FACE, respectively (step S708), and proceeds to step S712. Here, BSGAIN_FACE, CSGAIN_FACE, and DSGAIN_FACE are design parameters. For example, BSGAIN_FACE = 0.75, CSGAIN_FACE = 0.67, and DSGAIN_FACE = 0.5.

また、領域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 system control unit 50 determines the area of the block luminance Y (h, v) obtained in step S401 of FIG. 4a. A luminance average value YLA of A is obtained (step S709). Next, the system control unit 50 sets the threshold value MaxYL to YLA * MAX_YLLIMIT, and sets the threshold value MinYL to YLA / MIN_YLLIMIT (step S710).

次に、システム制御部50は、領域Bs、Cs、Ds用のゲインをそれぞれBSGAIN、CSGAIN、DSGAINに設定し(ステップS711)、ステップS712に進む。ここで、BSGAIN、CSGAIN、DSGAINは設計パラメータであり、例えばBSGAIN = 1.0、CSGAIN = 1.0、DSGAIN = 0.75とする。   Next, the system control unit 50 sets the gains for the regions Bs, Cs, and Ds to BSGAIN, CSGAIN, and DSGAIN, respectively (step S711), and proceeds to step S712. Here, BSGAIN, CSGAIN, and DSGAIN are design parameters. For example, BSGAIN = 1.0, CSGAIN = 1.0, and DSGAIN = 0.75.

ステップ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 system control unit 50 first initializes the variables h and v to 0 in order to obtain the photometric weight of each block of HMAX × VMAX (step S712). Next, the system control unit 50 determines whether or not the variable v is smaller than VMAX (step S713). If the variable v is smaller than VMAX, the process proceeds to step S714. Otherwise, the process proceeds to step S725.

システム制御部50は、変数hがHMAXより小さいか否かを判断し(ステップS714)、変数hがHMAXより小さい場合はステップS715に進み、そうでない場合はステップS724に進む。システム制御部50は、ブロック輝度Y(h, v)がステップS707或いはステップS710にて設定した閾値MaxYLより大きいか否かを判断する(ステップS715)。ブロック輝度Y(h, v)が閾値MaxYLより大きい場合はステップS717に進み、そうでない場合はステップS716に進む。   The system control unit 50 determines whether or not the variable h is smaller than HMAX (step S714). If the variable h is smaller than HMAX, the process proceeds to step S715. Otherwise, the process proceeds to step S724. The system control unit 50 determines whether or not the block luminance Y (h, v) is larger than the threshold value MaxYL set in step S707 or step S710 (step S715). If the block luminance Y (h, v) is larger than the threshold value MaxYL, the process proceeds to step S717, and if not, the process proceeds to step S716.

システム制御部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 system control unit 50 determines whether or not the block luminance Y (h, v) is smaller than the threshold MinYL set in step S707 or step S710 (step S716). If the block luminance Y (h, v) is smaller than the threshold MinYL, the process proceeds to step S717, and if not, the process proceeds to step S726. When the block luminance Y (h, v) is not smaller than the threshold value MinYL, the system control unit 50 uses the default photometric weight Wa (h, h, v) as the sky correction photometric weight Ws (h, v) of the block (h, v). v) is set (step S726).

ブロック輝度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 system control unit 50 Make a decision. That is, it is determined whether or not the block luminance Y (h, v) belongs to the region Bs (step S717).

ブロック輝度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 system control unit 50 uses the sky correction photometric weight Wa (h, v) of the block luminance Y (h, v) set in step S704 for the region Bs. Is multiplied by the gain Bs_Gain (step S718). This is the photometric weight Ws (h, v) for sky correction of the block luminance Y (h, v).

ブロック輝度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 system control unit 50 determines whether or not the block luminance Y (h, v) belongs to the region Cs (step S719). When the block luminance Y (h, v) belongs to the area Cs, the system control unit 50 uses the area Cs for the sky correction photometric weight Wa (h, v) of the block luminance Y (h, v) set in step S704. Is multiplied by the gain Cs_Gain (step S720). This is the photometric weight Ws (h, v) for sky correction of the block luminance Y (h, v).

ブロック輝度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 system control unit 50 determines whether or not the block luminance Y (h, v) belongs to the region Ds (step S721). When the block luminance Y (h, v) belongs to the area Ds, the system control unit 50 uses the sky correction photometric weight Wa (h, v) of the block luminance Y (h, v) set in step S704 for the area Ds. Is multiplied by the gain Ds_Gain (step S722). This is the photometric weight Ws (h, v) for sky correction of the block luminance Y (h, v).

ブロック輝度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 system control unit 50 increments the variable h (step S723) and calculates the weight of the next block. The process returns to step S714.

変数hがHMAXより小さくない場合(ステップS714でNO)、システム制御部50は、変数vをインクリメントし(ステップS724)、次のブロックの重み計算を行うべくステップS713に戻る。   If the variable h is not smaller than HMAX (NO in step S714), the system control unit 50 increments the variable v (step S724) and returns to step S713 to calculate the weight of the next block.

変数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 system control unit 50 calculates the sky correction value DeltaBvS based on the following equation from the block luminance Y (h, v) and the sky correction weight Ws (h, v). Is calculated (step S725). Thereby, the sky correction value DeltaBvS calculation process (step S403) is terminated.

Figure 0005335452
Figure 0005335452

ここで、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 system control unit 50 of the imaging apparatus calculates the average luminance value Yup in the upper part of the photometric area from the block luminance Y (h, v) obtained in step S401 in FIG. 4A (step S801). Similarly, the system control unit 50 calculates the average luminance value Ydown below the photometric area from the block luminance Y (h, v) (step S802). For the upward direction of the photometric area, the direction determined in step S702 or S703 in FIG. 7A is used. In the case of HMAX = VMAX = 8, for example, the luminance average values of one line at the upper and lower ends may be Yup and Ydown, respectively.

次に、システム制御部50は、上下端1ラインの輝度平均値の比率であるYup/Ydownの値から、混合比α1(0≦α1≦1)を求める(ステップS803)。Yup/Ydownが大きくなるほど混合比α1が小さくなるように設定する。次に、システム制御部50は、Yupの値から混合比α2(0≦α2≦1)を求める(ステップS804)。Yupが大きくなるほど混合比α2が小さくなるように設定する。   Next, the system control unit 50 obtains the mixture ratio α1 (0 ≦ α1 ≦ 1) from the value of Yup / Ydown, which is the ratio of the luminance average values of the upper and lower end 1 lines (step S803). It is set so that the mixing ratio α1 decreases as Yup / Ydown increases. Next, the system control unit 50 obtains the mixing ratio α2 (0 ≦ α2 ≦ 1) from the value of Yup (step S804). It is set so that the mixing ratio α2 decreases as Yup increases.

次に、システム制御部50は、混合比α1と混合比α2を比較する(ステップS805)。比較結果がα1<α2である場合は、システム制御部50は、混合比α1を最終混合比αとする(ステップS806)。比較結果がα1<α2でない場合は、システム制御部50は、混合比α2を最終混合比αとする(ステップS807)。   Next, the system control unit 50 compares the mixing ratio α1 and the mixing ratio α2 (step S805). When the comparison result is α1 <α2, the system control unit 50 sets the mixing ratio α1 as the final mixing ratio α (step S806). If the comparison result is not α1 <α2, the system control unit 50 sets the mixing ratio α2 as the final mixing ratio α (step S807).

次に、システム制御部50は、下記の式に基づいて全体輝度補正値DeltaBvAllを求める(ステップS808)。即ち、逆光補正値DeltaBvC、空補正値DeltaBvS、輝度補正値BvLに基づいて全体輝度補正値DeltaBvAllを求める。これにより、全体輝度補正値DeltaBvAll算出処理(ステップS405)を終了する。   Next, the system control unit 50 obtains the overall brightness correction value DeltaBvAll based on the following equation (step S808). That is, the overall brightness correction value DeltaBvAll is obtained based on the backlight correction value DeltaBvC, the sky correction value DeltaBvS, and the brightness correction value BvL. Thereby, the overall luminance correction value DeltaBvAll calculation process (step S405) is terminated.

Figure 0005335452
Figure 0005335452

背景の空の輝度が大きいほど(被写体下部の輝度に対する空の輝度の割合が大きいほど)、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 system control unit 50 of the imaging apparatus obtains DeltaBvSLimit based on the following equation (step S901).

Figure 0005335452
Figure 0005335452

ここで、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 system control unit 50 obtains DeltaBvFace0 based on the following equation (step S902).

Figure 0005335452
Figure 0005335452

ここで、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 system control unit 50 compares the DeltaBvSLimit obtained in step S901 with the DeltaBvFace0 obtained in step S902 (step S903). When the comparison result is DeltaBvFace0 <DeltaBvSLimit, the system control unit 50 sets the variable Delta2 as a difference obtained by subtracting DeltaBvFace0 from DeltaBvSLimit (step S904). Next, the system control unit 50 determines whether Delta2> MAX_DELTA is satisfied (step S905).

比較結果が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 system control unit 50 substitutes MAX_DELTA for Delta2 (step S906), and proceeds to step S907. If the comparison result is not Delta2> MAX_DELTA, the process proceeds to step S907 as it is. The system control unit 50 sets a mixing ratio MixRatio (0 ≦ MixRatio ≦ 1) according to the size of the face (step S907). Here, the mixing ratio MixRatio is set such that the larger the face, the smaller the MixRatio. Note that MAX_DELTA is a design parameter, for example, MAX_DELTA = 1.

次に、システム制御部50は、ステップS907で設定した混合比MixRatioをDelta2に乗じる(ステップS908)。更に、システム制御部50は、混合比MixRatioをDelta2に乗じた結果にDeltaBvFace0を加えることで、顔補正値DeltaBvFaceとする(ステップS909)。これにより、顔補正値DeltaBvFace算出処理(ステップS408)を終了する。   Next, the system control unit 50 multiplies Delta2 by the mixing ratio MixRatio set in step S907 (step S908). Further, the system control unit 50 adds the DeltaBvFace0 to the result obtained by multiplying the Delta2 by the mixing ratio MixRatio to obtain the face correction value DeltaBvFace (step S909). Thereby, the face correction value DeltaBvFace calculation process (step S408) is terminated.

ステップ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 system control unit 50 sets DeltaBvFace0 as the face correction value DeltaBvFace (step S910). Thereby, the face correction value DeltaBvFace calculation process (step S408) is terminated.

ステップ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 image processing circuit 20 is the main subject area has been described as an example, but the present invention is not limited to this. A configuration in which the operation unit 70 includes a configuration (for example, a touch panel) (designation unit) that can designate the main subject region, and the main subject region is detected around the position designated by the photographer using the operation unit 70. It is good. For example, an area estimated to be occupied by the same subject may be determined from brightness, color difference, contrast, or motion information based on the position specified by the photographer and detected as the main subject area. .

また、上記実施の形態では、撮影者により指定された領域に基づきパターンマッチングなどを用いて主被写体領域を決定し、決定された主被写体領域を用いることも可能である。例えば、操作部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 operation unit 70.

また、所謂電子ズーム機能を用いて画像データの一部の領域を切り出した場合には、この切り出した領域全体を上述した測光領域全体であるとみなしても構わない。この場合、切り出した領域内のブロック輝度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 Image sensor 20 Image processing circuit 40 Exposure control circuit 50 System control unit 75 Vertical position detection sensor

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または2に記載の撮像装置。   The imaging apparatus according to claim 1, further comprising a determining unit that determines the sky region that is an upper region of the image data based on a luminance distribution of the image data. 前記検出手段は、前記主被写体領域として人物の顔領域を検出することを特徴とする請求項1乃至4の何れかに記載の撮像装置。   The imaging apparatus according to claim 1, wherein the detection unit detects a human face area as the main subject area. 前記主被写体領域の位置を指定することが可能な指定手段、を更に備え、
前記検出手段は、前記指定手段にて指定された位置を用いて、前記主被写体領域を検出することを特徴とする請求項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. .
前記算出手段は、前記空領域の輝度が前記画像データの下部に位置する領域の輝度に比べて大きくなるほど、または、前記空領域の輝度が大きくなるほど、前記逆光補正値の混合比が小さくなるように前記逆光補正値と前記空補正値を混合して前記全体用露出補正値を算出することを特徴とする請求項8に記載の撮像装置。 The calculation means is configured so that the mixture ratio of the backlight correction value decreases as the luminance of the sky region increases compared to the luminance of the region located below the image data or as the luminance of the sky region increases. 9. The imaging apparatus according to claim 8, wherein the overall exposure correction value is calculated by mixing the backlight correction value and the sky correction value. 撮像素子により被写体を撮像して得られた画像データから主被写体領域を検出する検出手段と、  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;
前記空領域の輝度と前記空領域の許容輝度上限値の差分、及び、前記主被写体領域の輝度に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御手段と、を備えることを特徴とする撮像装置。  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 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;
前記空領域の輝度と前記空領域の許容輝度上限値の差分、及び、前記主被写体領域の輝度に基づいて、前記撮像素子により撮像を行う際の露出を制御する制御ステップと、を備えることを特徴とする撮像装置の制御方法。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.
請求項11に記載の撮像装置の制御方法をコンピュータに実行させるためのコンピュータで読み取り可能なプログラムコードを有するプログラム。   The program which has a computer-readable program code for making a computer perform the control method of the imaging device of Claim 11. 請求項12に記載の撮像装置の制御方法をコンピュータに実行させるためのコンピュータで読み取り可能なプログラムコードを有するプログラム。A program having computer-readable program code for causing a computer to execute the method for controlling an imaging apparatus according to claim 12.
JP2009015548A 2009-01-27 2009-01-27 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM Expired - Fee Related JP5335452B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4789365B2 (en) * 2001-08-02 2011-10-12 キヤノン株式会社 Imaging apparatus and exposure control method thereof

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