JP4832320B2 - Imaging device - Google Patents

Imaging device Download PDF

Info

Publication number
JP4832320B2
JP4832320B2 JP2007012856A JP2007012856A JP4832320B2 JP 4832320 B2 JP4832320 B2 JP 4832320B2 JP 2007012856 A JP2007012856 A JP 2007012856A JP 2007012856 A JP2007012856 A JP 2007012856A JP 4832320 B2 JP4832320 B2 JP 4832320B2
Authority
JP
Japan
Prior art keywords
value
saturation
photometric
correction amount
exposure
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
JP2007012856A
Other languages
Japanese (ja)
Other versions
JP2008182351A (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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2007012856A priority Critical patent/JP4832320B2/en
Publication of JP2008182351A publication Critical patent/JP2008182351A/en
Application granted granted Critical
Publication of JP4832320B2 publication Critical patent/JP4832320B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Description

本発明は撮影装置に係り、被写体の測光結果から求められた露出値を画像の白飛び、色飽和を防止するように補正する撮像装置に関する。   The present invention relates to an imaging apparatus, and more particularly to an imaging apparatus that corrects an exposure value obtained from a photometric result of a subject so as to prevent an image from being overexposed and color saturation.

一般にカメラには、AE(Automatic Exposure:自動露出)機能が搭載されており、被写体の明るさに応じて適正な露出が自動的に得られるようにされている。そして、このAEの性能を向上させるべく、種々の提案がなされている。たとえば、特許文献1では、撮影領域を複数の領域に分割し、各領域で輝度を測定し、その測定結果から露出値を求める一方、各領域で測定された輝度の最大値を検出し、その最大値と露出値との差に応じて露出値を補正する方法が提案されている。
特開2001−45363号公報
Generally, a camera is equipped with an AE (Automatic Exposure) function so that an appropriate exposure can be automatically obtained according to the brightness of the subject. Various proposals have been made to improve the performance of the AE. For example, in Patent Document 1, the imaging region is divided into a plurality of regions, the luminance is measured in each region, and the exposure value is obtained from the measurement result, while the maximum value of the luminance measured in each region is detected, A method for correcting the exposure value according to the difference between the maximum value and the exposure value has been proposed.
JP 2001-45363 A

しかしながら、AE機能を有するカメラであっても、輝度差の激しいシーンを撮影すると、フィルムや撮像素子の露光限界を超えて、白飛びや色飽和を起こしてしまうという欠点があった。   However, even a camera having an AE function has a drawback in that when a scene with a large luminance difference is photographed, the exposure limit of the film or the image sensor is exceeded and whiteout or color saturation occurs.

本発明はこのような事情に鑑みてなされたもので、白飛びや色飽和の発生を低減できる撮影装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object thereof is to provide an imaging apparatus capable of reducing the occurrence of whiteout and color saturation.

請求項1に係る発明は、前記目的を達成するために、被写体の測光結果から求められた露出値に基づいて露出を決定する撮影装置において、被写体の測光結果から求められた露出値を仮の露出値αとし、仮の露出値αに所定の飽和限界値δを加算した値を飽和予想輝度値γとして算出する飽和予想輝度値演算手段と、撮影領域を複数の領域に分割し、分割領域ごとに輝度値を検出する輝度値検出手段と、前記輝度値検出手段で検出された輝度値が、前記飽和予想輝度値γを超えている分割領域の数を飽和予想領域数として検出する飽和予想領域数検出手段と、所定の関数又はテーブルを用いて前記飽和予想領域数に応じた補正量εを取得する補正量取得手段と、前記補正量取得手段で取得された補正量εで前記仮の露出値αを補正する露出値補正手段と、前記輝度値検出手段で分割領域ごとに検出される輝度値の中で最大の輝度値を最大輝度値として検出する最大輝度値検出手段と、前記最大輝度値検出手段で検出される最大輝度値と前記飽和予想輝度値γとの差ηを求め、求めた差ηが補正量εの最大値となるように前記関数又はテーブルを修正又は変更する修正手段と、を備えたことを特徴とする撮影装置を提供する。 According to a first aspect of the present invention, in order to achieve the above object, in the photographing apparatus for determining the exposure based on the exposure value obtained from the photometric result of the subject, the exposure value obtained from the photometric result of the subject is temporarily set. Saturated expected luminance value calculation means for calculating an exposure value α, a value obtained by adding a predetermined saturation limit value δ to the provisional exposure value α, as a saturation expected luminance value γ, and dividing the shooting region into a plurality of regions, A luminance value detecting means for detecting a luminance value for each, and a saturation prediction for detecting the number of divided areas in which the luminance value detected by the luminance value detecting means exceeds the saturation expected luminance value γ as the number of saturation expected areas A temporary amount detection unit; a correction amount acquisition unit that acquires a correction amount ε corresponding to the number of expected saturation regions using a predetermined function or table; and a correction amount ε acquired by the correction amount acquisition unit. Exposure value corrector for correcting exposure value α A maximum brightness value detecting means for detecting a maximum brightness value as a maximum brightness value among brightness values detected for each divided region by the brightness value detecting means, and a maximum detected by the maximum brightness value detecting means. Correction means for determining a difference η between a luminance value and the saturation expected luminance value γ, and correcting or changing the function or table so that the calculated difference η is a maximum value of the correction amount ε. An imaging device is provided.

本発明によれば、撮影領域を複数の領域に分割し、分割領域ごとに輝度値を検出し、検出された輝度値が飽和予想輝度値を超えている分割領域の数を飽和予想領域数として検出する。そして、検出された飽和予想領域数に応じて露出値を補正する。これにより、輝度差の激しいシーンであっても、白飛びの発生を抑えて撮影することができる。 According to the present invention , the shooting region is divided into a plurality of regions, the luminance value is detected for each divided region, and the number of divided regions in which the detected luminance value exceeds the saturation predicted luminance value is defined as the number of saturated predicted regions. To detect. Then, the exposure value is corrected according to the detected number of expected saturation areas. As a result, even in a scene with a large luminance difference, it is possible to shoot while suppressing the occurrence of whiteout.

また、本発明によれば、最大輝度値と飽和予想輝度値との差を求め、求めた差が補正量の最大値となるように関数又はテーブルが修正又は変更される。これにより、必要以上に露出値が補正されるのを防止でき、より効果的に白飛びの発生を防止することができる。 Further , according to the present invention , the difference between the maximum luminance value and the saturation expected luminance value is obtained, and the function or table is corrected or changed so that the obtained difference becomes the maximum value of the correction amount. Thereby, it is possible to prevent the exposure value from being corrected more than necessary, and to more effectively prevent the occurrence of whiteout.

請求項に係る発明は、前記目的を達成するために、前記輝度値検出手段で分割領域ごとに検出される輝度値に基づいて前記仮の露出値αを求めることを特徴とする請求項に記載の撮影装置を提供する。 The invention according to claim 2, claim 1, in order to achieve the object, and obtains the exposure value α of the temporary based on the luminance value detected for each divided region in the luminance value detecting means The imaging device described in 1. is provided.

本発明によれば、分割領域ごとに検出される輝度値に基づいて露出値が求められる。これにより、効率よく露出値及びその補正量を求めることができる。 According to the present invention , the exposure value is obtained based on the luminance value detected for each divided region. Thereby, the exposure value and its correction amount can be obtained efficiently.

請求項に係る発明は、前記目的を達成するために、被写体の測光結果から求められた露出値に基づいて露出を決定する撮影装置において、被写体の測光結果から求められた露出値を仮の露出値αとし、仮の露出値αに所定の飽和限界値δを加算した値を飽和予想輝度値γとして算出する飽和予想輝度値演算手段と、撮影領域を複数の領域に分割し、各分割領域についてR、G、Bごとに測光する測光手段と、前記測光手段で測光されたR、G、Bごとの測光値の少なくとも一つが、前記飽和予想輝度値γを超えている分割領域の数を飽和予想領域数として検出する飽和予想領域数検出手段と、所定の関数又はテーブルを用いて前記飽和予想領域数に応じた補正量εを取得する補正量取得手段と、前記補正量取得手段で取得された補正量εで前記仮の露出値αを補正する露出値補正手段と、前記測光手段で分割領域ごとに測光されたR、G、Bごとの測光値の中で最大の測光値を最大測光値として検出する最大測光値検出手段と、前記最大測光値検出手段で検出される最大測光値と前記飽和予想輝度値γとの差ηを求め、求めた差ηが補正量εの最大値となるように前記関数又はテーブルを修正又は変更する修正手段と、を備えたことを特徴とする撮影装置を提供する。 According to a third aspect of the present invention, in order to achieve the above object, in the photographing apparatus for determining the exposure based on the exposure value obtained from the subject photometric result, the exposure value obtained from the subject photometric result is temporarily set. Saturated expected brightness value calculation means for calculating the exposure value α, a value obtained by adding a predetermined saturation limit value δ to the provisional exposure value α, and a saturation expected brightness value γ, and dividing the photographing area into a plurality of areas The number of divided areas in which at least one of the photometric means for measuring the area for each of R, G, and B, and the photometric value for each of R, G, and B measured by the photometric means exceeds the saturation expected luminance value γ A predicted saturation region number detecting unit that detects the number of saturated predicted regions, a correction amount acquiring unit that acquires a correction amount ε corresponding to the predicted saturation region number using a predetermined function or table, and the correction amount acquiring unit. The obtained correction amount ε Of the exposure value correcting means for correcting the exposure value alpha, the maximum photometry value detecting said been photometry by the photometric means for each divided region R, G, the maximum photometry value in the photometric value of each B as the maximum photometry value The function or table is obtained so that a difference η between the detection means and the maximum photometric value detected by the maximum photometric value detection means and the saturation expected luminance value γ is obtained, and the obtained difference η becomes the maximum value of the correction amount ε. And a correcting means for correcting or changing the image.

本発明によれば、撮影領域を複数の領域に分割し、各分割領域についてR、G、Bごとに測光し、測光されたR、G、Bごとの測光値の少なくとも一つが飽和予想輝度値を超えている分割領域の数を飽和予想領域数として検出する。そして、検出された飽和予想領域数に応じて露出値を補正する。これにより、輝度差の激しいシーンであっても、白飛び、色飽和の発生を抑えて撮影することができる。 According to the present invention , an imaging region is divided into a plurality of regions, and each divided region is measured for each of R, G, and B, and at least one of the measured photometric values for each of R, G, and B is a saturation expected luminance value. The number of divided areas exceeding the threshold value is detected as the number of predicted saturation areas. Then, the exposure value is corrected according to the detected number of expected saturation areas. As a result, even a scene with a large luminance difference can be photographed while suppressing occurrence of whiteout and color saturation.

また、本発明によれば、最大測光値と飽和予想輝度値との差を求め、求めた差が補正量の最大値となるように関数又はテーブルが修正又は変更される。これにより、必要以上に露出値が補正されるのを防止でき、より効果的に白飛び、色飽和の発生を防止することができる。 Further , according to the present invention , the difference between the maximum photometric value and the saturation expected luminance value is obtained, and the function or table is corrected or changed so that the obtained difference becomes the maximum value of the correction amount. As a result, it is possible to prevent the exposure value from being corrected more than necessary, and to more effectively prevent whiteout and color saturation.

請求項に係る発明は、前記目的を達成するために、前記測光手段で分割領域ごとに測光されるR、G、Bごとの測光値に基づいて前記仮の露出値αを求めることを特徴とする請求項に記載の撮影装置を提供する。 The invention according to claim 4 is characterized in that, in order to achieve the object, the temporary exposure value α is obtained based on a photometric value for each of R, G, and B that is measured for each divided region by the photometric means. An imaging apparatus according to claim 3 is provided.

本発明によれば、分割領域ごとに測光されるR、G、Bごとの測光値に基づいて露出値が求められる。これにより、効率よく露出値及びその補正量を求めることができる。 According to the present invention , an exposure value is obtained based on a photometric value for each of R, G, and B that is measured for each divided region. Thereby, the exposure value and its correction amount can be obtained efficiently.

本発明に係る撮影装置によれば、白飛びや色飽和の発生を低減することができる。   With the photographing apparatus according to the present invention, it is possible to reduce the occurrence of whiteout and color saturation.

以下、添付図面を参照して本発明に係る撮影装置を実施するための最良の形態について説明する。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, the best mode for carrying out an imaging apparatus according to the invention will be described with reference to the accompanying drawings.

図1は、本発明が適用されたデジタルカメラの第1の実施の形態の電気的構成を示すブロック図である。   FIG. 1 is a block diagram showing an electrical configuration of a first embodiment of a digital camera to which the present invention is applied.

同図に示すように、本実施の形態のデジタルカメラ10は、撮影レンズ12、撮像素子14、アナログ信号処理部16、A/D変換器18、画像入力コントローラ20、デジタル信号処理部22、圧縮/伸張処理部24、表示制御部26、液晶モニタ28、記録制御部30、記憶メディア32、AF検出部34、AE/AWB検出部36、輝度算出部38、CPU40、ROM42、RAM44、フラッシュメモリ46、VRAM48、操作部50、比較・計数処理部52等を備えて構成される。   As shown in the figure, the digital camera 10 of the present embodiment includes a photographing lens 12, an image sensor 14, an analog signal processing unit 16, an A / D converter 18, an image input controller 20, a digital signal processing unit 22, and a compression. / Extension processing unit 24, display control unit 26, liquid crystal monitor 28, recording control unit 30, storage medium 32, AF detection unit 34, AE / AWB detection unit 36, luminance calculation unit 38, CPU 40, ROM 42, RAM 44, flash memory 46 , VRAM 48, operation unit 50, comparison / counting processing unit 52, and the like.

各部はCPU40に制御されて動作し、CPU40は、操作部50からの入力に基づき所定の制御プログラムを実行することにより、デジタルカメラ10の各部を制御する。   Each unit operates under the control of the CPU 40, and the CPU 40 controls each unit of the digital camera 10 by executing a predetermined control program based on an input from the operation unit 50.

ROM42には、このCPU40が実行する制御プログラムのほか、制御に必要な各種データ等が記録されている。CPU40は、このROM42に記録された制御プログラムをRAM44に読み出し、逐次実行することにより、デジタルカメラ10の各部を制御する。   In addition to the control program executed by the CPU 40, various data necessary for control are recorded in the ROM 42. The CPU 40 controls each unit of the digital camera 10 by reading the control program recorded in the ROM 42 into the RAM 44 and sequentially executing the program.

なお、このRAM44は、プログラムの実行処理領域として利用されるほか、画像データ等の一時記憶領域、各種作業領域として利用される。   The RAM 44 is used as a program execution processing area, a temporary storage area for image data, and various work areas.

また、フラッシュメモリ46は、ユーザ設定情報等の各種設定情報の記録領域として利用され、VRAM48は表示用の画像データ専用の記録領域として利用される。   The flash memory 46 is used as a recording area for various setting information such as user setting information, and the VRAM 48 is used as a recording area dedicated for display image data.

操作部50は、シャッタボタンやズームレバー、メニューボタン、実行ボタン、キャンセルボタン、モード切換ダイヤル、電源ボタン等のカメラの一般的な操作手段を含み、操作に応じた信号をCPU40に出力する。   The operation unit 50 includes general camera operation means such as a shutter button, zoom lever, menu button, execution button, cancel button, mode switching dial, and power button, and outputs a signal corresponding to the operation to the CPU 40.

撮影レンズ12は、ズーム機能を有するAFレンズで構成されており、フォーカスレンズ12F、ズームレンズ12Z、絞り12Iを含んで構成されている。   The photographing lens 12 is composed of an AF lens having a zoom function, and includes a focus lens 12F, a zoom lens 12Z, and a diaphragm 12I.

フォーカスレンズ12Fは、フォーカスモータ60Fに駆動されて、撮影レンズ12の光軸上を前後移動する。CPU40は、フォーカスモータドライバ62Fを介してフォーカスモータ60Fの駆動を制御することにより、フォーカスレンズ12Fの移動を制御し、撮影レンズ12のフォーカシングを行う。   The focus lens 12F is driven by the focus motor 60F and moves back and forth on the optical axis of the photographing lens 12. The CPU 40 controls the movement of the focus lens 12F by controlling the drive of the focus motor 60F via the focus motor driver 62F, and performs the focusing of the photographing lens 12.

ズームレンズ12Zは、ズームモータ60Zに駆動されて、撮影レンズ12の光軸上を前後移動する。CPU40は、ズームモータドライバ62Zを介してズームモータ60Zの駆動を制御することにより、ズームレンズ12Zの移動を制御し、撮影レンズ12のズーミングを行う。   The zoom lens 12Z is driven by the zoom motor 60Z and moves back and forth on the optical axis of the photographing lens 12. The CPU 40 controls the movement of the zoom lens 12Z by controlling the drive of the zoom motor 60Z via the zoom motor driver 62Z, and zooms the photographing lens 12.

絞り12Iは、たとえば虹彩絞りで構成され、アイリスモータ60Iに駆動されて動作する。CPU40は、アイリスモータドライバ62Iを介してアイリスモータ60Iの駆動を制御することにより、絞り12Iの動作を制御(開口量を制御)し、撮像素子14への露光量を調整する。   The diaphragm 12I is constituted by an iris diaphragm, for example, and is driven by an iris motor 60I to operate. The CPU 40 controls the operation of the aperture 12I (controls the aperture amount) and controls the exposure amount to the image sensor 14 by controlling the driving of the iris motor 60I via the iris motor driver 62I.

撮像素子14は、撮影レンズ12の後段に配置されており、撮影レンズ12を透過した被写体光を受光する。なお、本実施の形態のデジタルカメラ10では、撮像素子として、カラーCCDイメージセンサ(CCD)14を用いるものとする。CCD14は、周知のように多数の受光素子がマトリクス状に配列された受光面を備えている。撮影レンズ12を透過した被写体光は、このCCD14の受光面上に結像され、各受光素子によって電気信号に変換される。   The image sensor 14 is arranged at the rear stage of the photographing lens 12 and receives subject light transmitted through the photographing lens 12. In the digital camera 10 of the present embodiment, a color CCD image sensor (CCD) 14 is used as an image sensor. As is well known, the CCD 14 has a light receiving surface on which a large number of light receiving elements are arranged in a matrix. The subject light transmitted through the photographic lens 12 is imaged on the light receiving surface of the CCD 14 and converted into an electric signal by each light receiving element.

このCCD14は、CCDドライバ64から供給される垂直転送クロック及び水平転送クロックに同期して、各画素に蓄積された電荷を1ラインずつシリアルな画像信号として出力する。CPU40は、CCDドライバ64を制御して、CCD14の駆動を制御する。   The CCD 14 outputs the charges accumulated in each pixel as a serial image signal line by line in synchronization with the vertical transfer clock and horizontal transfer clock supplied from the CCD driver 64. The CPU 40 controls the CCD driver 64 to control the driving of the CCD 14.

なお、各画素の電荷蓄積時間(露出時間)は、CCDドライバ64から与えられる電子シャッタ駆動信号によって決められる。CPU40は、CCDドライバ64に対して電荷蓄積時間を指示する。   The charge accumulation time (exposure time) of each pixel is determined by an electronic shutter drive signal given from the CCD driver 64. The CPU 40 instructs the CCD driver 64 about the charge accumulation time.

また、画像信号の出力は、デジタルカメラ10が撮影モードにセットされると開始される。すなわち、デジタルカメラ10が撮影モードにセットされると、液晶モニタ28にスルー画像を表示するため、画像信号の出力が開始される。このスルー画像用の画像信号の出力は、本撮影の指示が行われると、一旦停止され、本撮影が終了すると、再度開始される。   The output of the image signal is started when the digital camera 10 is set to the shooting mode. That is, when the digital camera 10 is set to the photographing mode, output of an image signal is started to display a through image on the liquid crystal monitor 28. The output of the image signal for the through image is temporarily stopped when the instruction for the main photographing is given, and is started again when the main photographing is finished.

CCD14から出力される画像信号は、アナログ信号であり、このアナログの画像信号は、アナログ信号処理部16に取り込まれる。   The image signal output from the CCD 14 is an analog signal, and this analog image signal is taken into the analog signal processing unit 16.

アナログ信号処理部16は、相関二重サンプリング回路(CDS)、自動ゲインコントロール回路(AGC)を含んで構成される。CDSは、画像信号に含まれるノイズの除去を行い、AGCは、ノイズ除去された画像信号を所定のゲインで増幅する。このアナログ信号処理部16で所要の信号処理が施されたアナログの画像信号は、A/D変換器18に取り込まれる。   The analog signal processing unit 16 includes a correlated double sampling circuit (CDS) and an automatic gain control circuit (AGC). The CDS removes noise contained in the image signal, and the AGC amplifies the noise-removed image signal with a predetermined gain. The analog image signal subjected to the required signal processing by the analog signal processing unit 16 is taken into the A / D converter 18.

A/D変換器18は、取り込んだアナログの画像信号を所定ビットの階調幅を持ったデジタルの画像信号に変換する。この画像信号は、いわゆるRAWデータであり、画素ごとR、G、Bの濃度を示す階調値を有している。   The A / D converter 18 converts the captured analog image signal into a digital image signal having a gradation width of a predetermined bit. This image signal is so-called RAW data, and has a gradation value indicating the density of R, G, and B for each pixel.

画像入力コントローラ20は、所定容量のラインバッファを内蔵しており、A/D変換器18から出力された1コマ分の画像信号を蓄積する。この画像入力コントローラ20に蓄積された1コマ分の画像信号は、バス54を介してRAM44に格納される。   The image input controller 20 has a built-in line buffer having a predetermined capacity, and stores the image signal for one frame output from the A / D converter 18. The image signal for one frame accumulated in the image input controller 20 is stored in the RAM 44 via the bus 54.

バス54には、上記CPU40、ROM42、RAM44、フラッシュメモリ46、VRAM48、画像入力コントローラ20のほか、デジタル信号処理部22、圧縮/伸張処理部24、表示制御部26、記録制御部30、AF検出部34、AE/AWB検出部36、比較・係数処理部52等が接続されており、これらはバス54を介して互いに情報を送受信できるようにされている。   In addition to the CPU 40, ROM 42, RAM 44, flash memory 46, VRAM 48, and image input controller 20, the bus 54 includes a digital signal processing unit 22, compression / decompression processing unit 24, display control unit 26, recording control unit 30, and AF detection. A unit 34, an AE / AWB detection unit 36, a comparison / coefficient processing unit 52, and the like are connected to each other, and these can exchange information with each other via a bus 54.

RAM44に格納された1コマ分の画像信号は、点順次(画素の順番)にデジタル信号処理部22に取り込まれる。   The image signal for one frame stored in the RAM 44 is taken into the digital signal processing unit 22 in dot order (pixel order).

デジタル信号処理部22は、点順次に取り込んだR、G、Bの各色の画像信号に対して所定の信号処理を施し、輝度信号Yと色差信号Cr、Cbとからなる画像信号(Y/C信号)を生成する。   The digital signal processing unit 22 performs predetermined signal processing on the image signals of R, G, and B colors captured in a dot-sequential manner, and outputs an image signal (Y / C) composed of a luminance signal Y and color difference signals Cr and Cb. Signal).

図2は、このデジタル信号処理部22の概略構成を示すブロック図である。   FIG. 2 is a block diagram showing a schematic configuration of the digital signal processing unit 22.

同図に示すように、デジタル信号処理部22は、ホワイトバランスゲイン算出回路22a、オフセット補正回路22b、ゲイン補正回路22c、階調補正回路22d、RGB補間演算回路22e、RGB/YC変換回路22f、ノイズフィルタ22g、輪郭補正回路22h、色差マトリクス回路22i、光源種別判定回路22j等を含んで構成されている。   As shown in the figure, the digital signal processing unit 22 includes a white balance gain calculation circuit 22a, an offset correction circuit 22b, a gain correction circuit 22c, a gradation correction circuit 22d, an RGB interpolation calculation circuit 22e, an RGB / YC conversion circuit 22f, It includes a noise filter 22g, a contour correction circuit 22h, a color difference matrix circuit 22i, a light source type determination circuit 22j, and the like.

ホワイトバランスゲイン算出回路22aは、ホワイトバランス調整を行うために、後述するAE/AWB検出部36で算出された積算値を取り込み、ホワイトバランス調整用のゲイン値を算出する。   In order to perform white balance adjustment, the white balance gain calculation circuit 22a takes in an integrated value calculated by an AE / AWB detection unit 36, which will be described later, and calculates a gain value for white balance adjustment.

オフセット補正回路22bは、黒色の被写体を撮影した場合に黒色が表現されるように、RAM44から点順次に取り込まれたR、G、Bの各色の画像信号に対して所定のオフセット処理を施す。すなわち、R、G、Bの各色の画像信号に対してあらかじめ設定されたオフセット値を減算する。   The offset correction circuit 22b performs predetermined offset processing on the image signals of R, G, and B colors that are fetched dot-sequentially from the RAM 44 so that black is expressed when a black subject is photographed. That is, a preset offset value is subtracted from the image signals of R, G, and B colors.

ゲイン補正回路22cは、オフセット処理された画像信号を点順次に取り込み、ホワイトバランスゲイン算出回路22aで算出されたゲイン値を用いてホワイトバランス調整を行う。   The gain correction circuit 22c takes the image signal subjected to the offset process in a dot-sequential manner, and performs white balance adjustment using the gain value calculated by the white balance gain calculation circuit 22a.

階調補正回路22dは、ホワイトバランス調整された画像信号を点順次に取り込み、所定の階調変換処理を施す。すなわち、画像データをモニタに出力すると、モニタに入力された階調値とモニタが出力する階調値との間にズレが生じることから、このズレを補正するために、撮影により得られた画像信号に対して所定の階調変換処理(いわゆるガンマ補正)を施す。   The gradation correction circuit 22d takes in the image signal adjusted in white balance dot-sequentially and performs a predetermined gradation conversion process. That is, when the image data is output to the monitor, a deviation occurs between the gradation value input to the monitor and the gradation value output from the monitor. Therefore, in order to correct this deviation, an image obtained by photographing is obtained. A predetermined gradation conversion process (so-called gamma correction) is performed on the signal.

RGB補間演算回路22eは、階調変換処理されたR、G、Bの色信号を補間演算して、各画素位置におけるR、G、B3色の信号を求める。すなわち、単板式の撮像素子の場合、各画素からは、R、G、Bのいずれか一色の信号しか出力されないため、出力しない色を周囲の画素の色信号から補完演算により求める。たとえば、Rを出力する画素では、この画素位置におけるG、Bの色信号がどの程度になるかを周りの画素のG、B信号から補間演算により求める。   The RGB interpolation calculation circuit 22e interpolates R, G, and B color signals that have been subjected to gradation conversion processing to obtain R, G, and B3 color signals at each pixel position. That is, in the case of a single-plate image sensor, each pixel outputs only a signal of any one color of R, G, and B. Therefore, a color that is not output is obtained from the color signals of surrounding pixels by a complementary operation. For example, in a pixel that outputs R, the level of G and B color signals at this pixel position is determined by interpolation from the G and B signals of surrounding pixels.

なお、このようにRGB補完演算は、単板式の撮像素子に特有のものなので、撮像素子に三板式のものを用いた場合には不要となる。   Note that the RGB complementary calculation is unique to the single-plate image sensor, and thus is not necessary when a three-plate image sensor is used.

RGB/YC変換回路22fは、RGB補間演算後のR、G、B信号から輝度信号Yと色差信号Cr、Cbを生成する。   The RGB / YC conversion circuit 22f generates a luminance signal Y and color difference signals Cr and Cb from the R, G, and B signals after the RGB interpolation calculation.

ノイズフィルタ22gは、RGB/YC変換回路22fで生成された輝度信号Yと色差信号Cr、Cbに対してノイズ低減処理を施す。このノイズフィルタ22gでノイズ低減処理が施された輝度信号Yと色差信号Cr、Cbは、それぞれ輪郭補正回路22hと色差マトリクス回路22iに取り込まれる。   The noise filter 22g performs noise reduction processing on the luminance signal Y and the color difference signals Cr and Cb generated by the RGB / YC conversion circuit 22f. The luminance signal Y and the color difference signals Cr and Cb subjected to noise reduction processing by the noise filter 22g are taken into the contour correction circuit 22h and the color difference matrix circuit 22i, respectively.

色差マトリクス回路22iは、色差信号Cr、Cbに対して所定の色差マトリクス(C−MTX)を乗算することにより、色調補正を行う。すなわち、色差マトリクス回路22iには、光源対応の色差マトリクスが複数種類設けられており、光源種別判定回路22jが求めた光源種に応じて、使用する色差マトリクスを切り替え、この切り替え後の色差マトリクスを入力された色差信号Cr、Cbに乗算し、色差信号Cr、Cbを色調補正する。   The color difference matrix circuit 22i performs color tone correction by multiplying the color difference signals Cr and Cb by a predetermined color difference matrix (C-MTX). That is, the color difference matrix circuit 22i is provided with a plurality of types of color difference matrices corresponding to the light sources, and the color difference matrix to be used is switched according to the light source type obtained by the light source type determination circuit 22j. The inputted color difference signals Cr and Cb are multiplied to correct the color tone of the color difference signals Cr and Cb.

光源種別判定回路22jは、AE/AWB検出部36で算出された積算値を取り込み、光源種を判定して、色差マトリクス回路22iに色差マトリクス選択信号を出力する。   The light source type determination circuit 22j takes the integrated value calculated by the AE / AWB detection unit 36, determines the light source type, and outputs a color difference matrix selection signal to the color difference matrix circuit 22i.

輪郭補正回路22hは、輝度信号Yに対して所定の輪郭補正処理を行う。   The contour correction circuit 22h performs a predetermined contour correction process on the luminance signal Y.

以上のように、デジタル信号処理部22は、点順次に取り込んだR、G、Bの画像信号に所定の信号処理を施して、輝度信号Yと色差信号Cr、Cbとからなる画像信号(Y/C信号)を生成する。   As described above, the digital signal processing unit 22 performs predetermined signal processing on the R, G, and B image signals captured in a dot-sequential manner, and generates an image signal (Y that includes the luminance signal Y and the color difference signals Cr and Cb). / C signal).

AF検出部34は、CPU40の指令に従い、画像入力コントローラ20を介してRAM44に格納されたR、G、Bの画像信号を取り込み、AF(Automatic Focus)制御に必要な焦点評価値を算出する。このAF検出部34は、G信号の高周波成分のみを通過させるハイパスフィルタ、絶対値化処理部、画面に設定された所定のフォーカス領域内の信号を切り出すフォーカス領域抽出部、及び、フォーカス領域内の絶対値データを積算する積算部を含み、この積算部で積算されたフォーカス領域内の絶対値データを焦点評価値としてCPU40に出力する。CPU40は、AF制御時、このAF検出部34から出力される焦点評価値が極大となる位置をサーチし、その位置に撮影レンズ12のフォーカスレンズ12Fを移動させることにより、主要被写体への焦点合わせを行う。   The AF detection unit 34 takes in R, G, and B image signals stored in the RAM 44 via the image input controller 20 in accordance with a command from the CPU 40, and calculates a focus evaluation value necessary for AF (Automatic Focus) control. The AF detection unit 34 includes a high-pass filter that passes only a high-frequency component of the G signal, an absolute value processing unit, a focus region extraction unit that extracts a signal within a predetermined focus region set on the screen, An integration unit for integrating the absolute value data is included, and the absolute value data in the focus area integrated by the integration unit is output to the CPU 40 as a focus evaluation value. During the AF control, the CPU 40 searches for a position where the focus evaluation value output from the AF detection unit 34 is maximized, and moves the focus lens 12F of the photographing lens 12 to that position, thereby focusing on the main subject. I do.

AE/AWB検出部36は、CPU40の指令に従い、画像入力コントローラ20を介してRAM44に格納されたR、G、Bの画像信号を取り込み、AE制御及びAWB(Automatic White Balance)制御に必要な積算値を算出する。すなわち、このAE/AWB検出部36は、撮影領域(一画面)を複数の領域に分割し、分割領域ごとにR、G、Bごとの画像信号の積算値を算出する。   The AE / AWB detection unit 36 takes in R, G, and B image signals stored in the RAM 44 via the image input controller 20 in accordance with a command from the CPU 40, and performs integration necessary for AE control and AWB (Automatic White Balance) control. Calculate the value. That is, the AE / AWB detection unit 36 divides the imaging region (one screen) into a plurality of regions, and calculates an integrated value of image signals for each of R, G, and B for each divided region.

なお、本実施の形態のデジタルカメラでは、一画面を64(8×8)の領域に等分割し、分割領域ごとにR、G、Bごとの画像信号の積算値を算出するものとする。算出された各分割領域におけるR、G、Bごとの積算値の情報はRAM44に格納される。   In the digital camera according to the present embodiment, one screen is equally divided into 64 (8 × 8) regions, and the integrated value of image signals for each of R, G, and B is calculated for each divided region. The calculated integrated value information for each R, G, B in each divided area is stored in the RAM 44.

CPU40は、AWB制御時、AE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値をデジタル信号処理部22のホワイトバランスゲイン算出回路22a及び光源種別判定回路22jに加える。ホワイトバランスゲイン算出回路22aは、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値に基づいてホワイトバランス調整用のゲイン値を算出する。また、光源種別判定回路22jは、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値に基づいて光源種を検出する。   During the AWB control, the CPU 40 determines the integrated value of the image signals for each of R, G, and B in each divided area calculated by the AE / AWB detection unit 36, the white balance gain calculation circuit 22a of the digital signal processing unit 22, and the light source type determination. Add to circuit 22j. The white balance gain calculation circuit 22a calculates a gain value for white balance adjustment based on the integrated value of the image signals for each of R, G, and B in each divided area calculated by the AE / AWB detection unit. The light source type determination circuit 22j detects the light source type based on the integrated value of the image signals for each of R, G, and B in each divided region calculated by the AE / AWB detector 36.

また、CPU40は、AE制御時、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値を輝度算出部38に加える。輝度算出部38は、図3に示すように、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値と、その画像信号が得られたときの撮影条件(絞り値、シャッタ速度、撮影感度)の情報とに基づいて、各分割領域におけるR、G、Bごとの測光値r、g、bを算出する。そして、得られた各分割領域におけるR、G、Bごとの測光値r、g、bと、ホワイトバランス調整用のゲイン値WBr、WBg、WBbに基づいて、次式から各分割領域における輝度値yを算出する。   In addition, during the AE control, the CPU 40 adds the integrated value of the image signal for each of R, G, and B in each divided area calculated by the AE / AWB detection unit 36 to the luminance calculation unit 38. As shown in FIG. 3, the luminance calculation unit 38 obtains the integrated value of the image signal for each of R, G, and B in each divided area calculated by the AE / AWB detection unit 36 and when the image signal is obtained. The photometric values r, g, and b for each of R, G, and B in each divided region are calculated based on the information on the imaging conditions (aperture value, shutter speed, and imaging sensitivity). Then, based on the obtained photometric values r, g, b for each R, G, B in each divided area and the gain values WBr, WBg, WBb for white balance adjustment, the luminance value in each divided area from the following equation: y is calculated.

[数1]
y = log2(0.299*2WBr*r+ 0.587*2WBg*g + 0.114*2WBb*b)
算出された各分割領域における輝度値yの情報はRAM44に格納される。
[Equation 1]
y = log 2 (0.299 * 2 WBr * r + 0.587 * 2 WBg * g + 0.114 * 2 WBb * b )
Information on the calculated luminance value y in each divided area is stored in the RAM 44.

CPU40は、算出された各分割領域における輝度値yから仮の露出値(Ev値)αを求める。なお、仮の露出値αの算出方法は特に限定されず、公知の方法を用いて算出することができる。たとえば、画面全体の輝度値の平均を求めて、これを仮の露出値とする方式(いわゆる平均測光方式)や、平均測光方式において、輝度値の平均を求める際、画面中央付近の領域に重み付けする方式(いわゆる中央順点測光方式)、画像のごく狭い領域の輝度値の平均を求めて、これを仮の露出値とする方式(いわゆるスポット測光方式)、画面を複数の領域に分割し、パターン認識処理を行って、最も重要視される領域を予想し、その領域の輝度値の平均を求めて、これを仮の露出値とする方式(いわゆる分割測光方式)等、種々の方式を用いることができる。   The CPU 40 obtains a temporary exposure value (Ev value) α from the calculated luminance value y in each divided area. In addition, the calculation method of temporary exposure value (alpha) is not specifically limited, It can calculate using a well-known method. For example, in the method of calculating the average of the luminance values of the entire screen and using this as a temporary exposure value (so-called average metering method) or the average metering method, weighting the area near the center of the screen Method (so-called center forward point metering method), a method of calculating the average of brightness values in a very narrow area of an image, and using this as a temporary exposure value (so-called spot metering method), dividing the screen into a plurality of regions, Various methods are used such as a method (so-called divided photometry method) in which pattern recognition processing is performed to predict the most important region, the average of luminance values in the region is obtained, and this is used as a temporary exposure value. be able to.

本実施の形態のデジタルカメラでは、これらの測光方式をユーザが選択できるものとし、選択された測光方式の下で仮の露出値が算出される。   In the digital camera of the present embodiment, it is assumed that the user can select these photometry methods, and a temporary exposure value is calculated under the selected photometry method.

CPU40は、算出された仮の露出値αに対して必要に応じて露出補正を行い、最終的に得られた露出値(最終露出値)βに基づいて露出設定を行う。すなわち、最終露出値βから所定のプログラム線図に従って絞り値、シャッタ速度を決定する。   The CPU 40 performs exposure correction as necessary for the calculated temporary exposure value α, and performs exposure setting based on the finally obtained exposure value (final exposure value) β. That is, the aperture value and shutter speed are determined from the final exposure value β according to a predetermined program diagram.

また、CPU40は、算出された仮の露出値αから飽和予想輝度値γを算出して、比較・計数処理部52に出力する。   In addition, the CPU 40 calculates a predicted saturation luminance value γ from the calculated temporary exposure value α and outputs it to the comparison / count processing unit 52.

ここで、飽和予想輝度値γは、算出された仮の露出値αに所定の飽和限界値δを加算した値として求められる。   Here, the saturation expected luminance value γ is obtained as a value obtained by adding a predetermined saturation limit value δ to the calculated temporary exposure value α.

フィルムや撮像素子(CCD/CMOSイメージセンサ等)には、ラチチュード/ダイナミックレンジと呼ばれる階調が識別できる限界の幅がある。階調が識別できる限界を超えた輝度であれば、それは白飛びや黒潰れという結果になる。ハイライト側の限界は、適正露出に対して、一般にフィルムで3Ev、CCD/CMOS等の撮像素子で2Ev前後といわれている。   Films and image sensors (CCD / CMOS image sensors, etc.) have a limit width that can identify gradations called latitude / dynamic range. If the luminance exceeds the limit where the gradation can be identified, it results in overexposure or blackout. The limit on the highlight side is generally 3 Ev for a film and about 2 Ev for an image sensor such as a CCD / CMOS for proper exposure.

そこで、本実施の形態のデジタルカメラでは、飽和限界値δを2Evとして規定し、この飽和限界値δを仮の露出値αに加算した値を飽和予想輝度値γとして算出する。   Therefore, in the digital camera of the present embodiment, the saturation limit value δ is defined as 2Ev, and a value obtained by adding the saturation limit value δ to the temporary exposure value α is calculated as the saturation expected luminance value γ.

なお、この飽和限界値δの情報は、あらかじめROM42に格納されているものとし、CPU40は、ROM42から飽和限界値δの情報を読み出して、飽和予想輝度値γを算出する。そして、得られた飽和予想輝度値γを比較・計数処理部52に出力する。比較・計数処理部52は、得られた飽和予想輝度値γと、各分割領域における輝度値yの情報に基づいて仮の露出値αに施す補正量εを算出する。なお、この比較・計数処理部52における補正量εの算出方法については、後に詳述する。   The information on the saturation limit value δ is assumed to be stored in the ROM 42 in advance, and the CPU 40 reads the information on the saturation limit value δ from the ROM 42 and calculates the saturation expected luminance value γ. Then, the obtained saturation predicted luminance value γ is output to the comparison / count processing unit 52. The comparison / counting processing unit 52 calculates a correction amount ε to be applied to the temporary exposure value α based on the obtained predicted saturation luminance value γ and information on the luminance value y in each divided region. A method of calculating the correction amount ε in the comparison / counting processing unit 52 will be described in detail later.

圧縮/伸張処理部24は、CPU40からの圧縮指令に従い、入力された輝度信号Yと色差信号Cr、Cbとからなる画像信号(Y/C信号)に所定形式(たとえば、JPEG)の圧縮処理を施し、圧縮画像データを生成する。また、CPU40からの伸張指令に従い、入力された圧縮画像データに所定形式の伸張処理を施して、非圧縮の画像データを生成する。   In accordance with a compression command from the CPU 40, the compression / expansion processing unit 24 performs compression processing in a predetermined format (for example, JPEG) on an image signal (Y / C signal) composed of the input luminance signal Y and color difference signals Cr and Cb. To generate compressed image data. Further, in accordance with a decompression command from the CPU 40, the input compressed image data is subjected to a decompression process in a predetermined format to generate uncompressed image data.

表示制御部26は、CPU40からの指令に従い、液晶モニタ28への表示を制御する。すなわち、CPU40からの指令に従い、VRAM48から順次入力される画像信号を液晶モニタ28に表示するための映像信号(たとえば、NTSC信号やPAL信号、SCAM信号)に変換して液晶モニタ28に出力する。また、必要に応じて液晶モニタ28に表示する文字、図形、記号等の信号を画像信号に混合して、液晶モニタ28に所定の文字、図形、記号等を表示させる。   The display control unit 26 controls display on the liquid crystal monitor 28 in accordance with a command from the CPU 40. That is, in accordance with a command from the CPU 40, the image signals sequentially input from the VRAM 48 are converted into video signals (for example, NTSC signal, PAL signal, SCAM signal) for display on the liquid crystal monitor 28, and output to the liquid crystal monitor 28. Further, if necessary, signals such as characters, figures and symbols to be displayed on the liquid crystal monitor 28 are mixed with the image signal so that predetermined characters, figures and symbols are displayed on the liquid crystal monitor 28.

記録制御部30は、CPU40からの指令に従い、記憶メディア32に対してデータの読み/書きを制御する。なお、記憶メディア32は、メモリカードのようにカメラ本体に対して着脱自在なものでもよいし、また、カメラ本体に内蔵されたものでもよい。着脱自在とする場合は、カメラ本体にカードスロットを設け、このカードスロットに装填して使用する。   The recording control unit 30 controls reading / writing of data with respect to the storage medium 32 in accordance with a command from the CPU 40. The storage medium 32 may be detachable from the camera body such as a memory card, or may be built into the camera body. In the case of detachable, a card slot is provided in the camera body, and the card slot is used by being loaded.

比較・計数処理部52は、上記のように、CPU40で算出された飽和予想輝度値γと、輝度算出部38で算出された各分割領域における輝度値yの情報に基づいて仮の露出値αに施す補正量εを算出する。すなわち、図4に示すように、各分割領域における輝度値yと飽和予想輝度値γとを比較し、輝度値yが飽和予想輝度値γを超えている分割領域の数を飽和予想領域数Sとして計測し、求めた飽和予想領域数Sに応じた補正量εを算出する。この補正量εは、飽和予想領域数Sに応じて補正量εが規定される関数F(S)を利用して算出する。   As described above, the comparison / count processing unit 52 calculates the provisional exposure value α based on the saturation expected luminance value γ calculated by the CPU 40 and the luminance value y in each divided region calculated by the luminance calculation unit 38. A correction amount ε to be applied to is calculated. That is, as shown in FIG. 4, the luminance value y in each divided region is compared with the saturation predicted luminance value γ, and the number of divided regions in which the luminance value y exceeds the saturation predicted luminance value γ is determined as the number of saturated predicted regions S. And a correction amount ε corresponding to the obtained saturation expected area number S is calculated. This correction amount ε is calculated using a function F (S) in which the correction amount ε is defined according to the number S of expected saturation regions.

たとえば、図5に示すような被写体(撮影シーン)を撮影して、図6に示すような輝度値yが各分割領域で検出されたと仮定する。そして、各分割領域における輝度値yから求められた仮の露出値αが10.96Evと仮定する。   For example, it is assumed that a subject (photographing scene) as shown in FIG. 5 is photographed and a luminance value y as shown in FIG. 6 is detected in each divided region. Then, it is assumed that the temporary exposure value α obtained from the luminance value y in each divided region is 10.96 Ev.

本実施の形態のデジタルカメラでは、飽和限界値δは、2.0Evと規定されているので、飽和予想輝度値γは、γ=α+δ=10.96+2.0=12.96Evとなる。   In the digital camera of the present embodiment, the saturation limit value δ is defined as 2.0 Ev, so the saturation expected luminance value γ is γ = α + δ = 19.66 + 2.0 = 12.96 Ev.

比較・計数処理部52は、各分割領域における輝度値yと飽和予想輝度値γ=12.96とを比較し、輝度値yが飽和予想輝度値γを超えている分割領域の数を飽和予想領域数Sとして計測する。すなわち、輝度値yが12.96Evを超えている分割領域を検出し、その総数をカウントする。   The comparison / counting processing unit 52 compares the luminance value y in each divided area with the saturation predicted luminance value γ = 12.96, and calculates the number of divided areas where the luminance value y exceeds the saturation predicted luminance value γ. It is measured as the number of areas S. That is, the divided area where the luminance value y exceeds 12.96 Ev is detected, and the total number is counted.

ここでは、図6において、白抜き数字で表示されている領域が、飽和予想輝度値γを超えている領域なので、この領域の数を計測して、飽和予想領域数Sとする。図6に示す例の場合、飽和予想領域数Sは、S=25である。   Here, in FIG. 6, since the area indicated by the white numbers is an area that exceeds the saturation expected luminance value γ, the number of these areas is measured and set as the saturation expected area number S. In the case of the example shown in FIG. 6, the number S of expected saturation areas is S = 25.

このようにして求めた飽和予想領域数Sから、たとえば、図8に示すように、飽和予想領域数Sに応じて補正量εが規定される関数F(S)を利用して、補正量εを算出する。図8に示す関数F(S)では、飽和予想領域数Sが25のとき、補正量εが0.21Evとして算出される。   For example, as shown in FIG. 8, the correction amount ε is calculated using the function F (S) in which the correction amount ε is defined according to the predicted saturation region number S. Is calculated. In the function F (S) shown in FIG. 8, when the number of predicted saturation areas S is 25, the correction amount ε is calculated as 0.21 Ev.

算出された補正量εの情報は、CPU40に出力され、CPU40は得られた補正量εの情報に従って仮の露出値αを補正し、最終露出値βを取得する。すなわち、仮の露出値αに補正量εを加算し、最終露出値βを算出する(β=α+ε)。上記例の場合、仮の露出値αは、α=10.96Ev、補正量εは、ε=0.21Evなので、最終露出値βは、β=α+ε=10.96+0.21=11.17Evとなる。   Information on the calculated correction amount ε is output to the CPU 40, and the CPU 40 corrects the temporary exposure value α in accordance with the obtained information on the correction amount ε to obtain a final exposure value β. That is, the final exposure value β is calculated by adding the correction amount ε to the temporary exposure value α (β = α + ε). In the case of the above example, since the temporary exposure value α is α = 10.96Ev and the correction amount ε is ε = 0.21Ev, the final exposure value β is β = α + ε = 10.96 + 0.21 = 11.17Ev. Become.

CPU40は、求めた最終露出値βに基づいて露出を決定する。図7は、上記の露出の決定過程で求まる各数値の一覧表である。   The CPU 40 determines the exposure based on the obtained final exposure value β. FIG. 7 is a list of numerical values obtained in the above exposure determination process.

このように、輝度値yが飽和予想輝度値γを超えている分割領域の数(飽和予想領域数S)に応じて補正量εを求め、露出値(仮の露出値α)を補正することにより、白飛びの発生を抑止し、良好な品質の画像を得ることができる。   As described above, the correction amount ε is obtained according to the number of divided regions (the predicted saturation region number S) in which the luminance value y exceeds the saturated predicted luminance value γ, and the exposure value (temporary exposure value α) is corrected. Therefore, it is possible to suppress the occurrence of whiteout and obtain an image with good quality.

以上のように構成された本実施の形態のデジタルカメラ10の作用は次のとおりである。   The operation of the digital camera 10 of the present embodiment configured as described above is as follows.

操作部50において、デジタルカメラ10のモードを撮影モードに設定し、電源スイッチを押すと、デジタルカメラ10は撮影モードの状態で起動する。   In the operation unit 50, when the mode of the digital camera 10 is set to the shooting mode and the power switch is pressed, the digital camera 10 is activated in the state of the shooting mode.

デジタルカメラ10が、撮影モードの状態で起動すると、撮影レンズ12が、所定の撮影準備位置まで繰り出されるとともに、CCD14から画像信号の出力が開始され、液晶モニタ28にスルー画像が表示される。撮影者は、この液晶モニタ28に表示されるスルー画像を見て構図を決定し、操作部50において、シャッタボタンを半押しする。   When the digital camera 10 is activated in the state of the photographing mode, the photographing lens 12 is extended to a predetermined photographing preparation position, image signal output from the CCD 14 is started, and a through image is displayed on the liquid crystal monitor 28. The photographer determines the composition by looking at the through image displayed on the liquid crystal monitor 28 and presses the shutter button halfway on the operation unit 50.

シャッタボタンが半押しされると、CPU40にS1ON信号が入力される。CPU40は、このS1ON信号の入力に応動して、撮影準備処理、すなわちAE、AF、AWBの各処理を実行する。   When the shutter button is half-pressed, an S1 ON signal is input to the CPU 40. In response to the input of the S1 ON signal, the CPU 40 executes shooting preparation processing, that is, AE, AF, and AWB processing.

まず、CCD14から出力された画像信号がアナログ信号処理部16で所要の信号処理を施された後、A/D変換器18でデジタル信号に変換され、画像入力コントローラ20を介してRAM44に取り込まれる。そして、AF検出部34及びAE/AWB検出部36に加えられる。   First, the image signal output from the CCD 14 is subjected to necessary signal processing by the analog signal processing unit 16, then converted into a digital signal by the A / D converter 18, and taken into the RAM 44 via the image input controller 20. . Then, it is added to the AF detector 34 and the AE / AWB detector 36.

AF検出部34は、入力された画像信号からAF制御に必要な積算値を算出し、CPU40に出力する。CPU40は、このAF検出部34からの出力に基づき撮影レンズ12を制御し、主要被写体に焦点を合わせる。   The AF detection unit 34 calculates an integrated value necessary for AF control from the input image signal and outputs it to the CPU 40. The CPU 40 controls the photographing lens 12 based on the output from the AF detector 34 and focuses on the main subject.

一方、AE/AWB検出部36は、入力された画像信号からAE制御及びAWB制御に必要な積算値、すなわち、あらかじめ設定された分割領域ごとにR、G、Bごとの画像信号の積算値を算出する(本実施の形態のデジタルカメラでは、一画面を64(8×8)の領域した、各分割領域におけるR、G、Bごとの画像信号の積算値を算出する。)。算出された各分割領域におけるR、G、Bごとの画像信号の積算値の情報は、RAM44に格納される。   On the other hand, the AE / AWB detection unit 36 calculates an integrated value necessary for AE control and AWB control from the input image signal, that is, an integrated value of the image signal for each of R, G, and B for each preset divided region. (In the digital camera of the present embodiment, the integrated value of the image signal for each of R, G, and B in each divided region is calculated by dividing one screen into 64 (8 × 8) regions). Information on the calculated integrated value of the image signal for each of R, G, and B in each divided region is stored in the RAM 44.

CPU40は、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値をデジタル信号処理部22のホワイトバランスゲイン算出回路22a及び光源種別判定回路22jに加える。   The CPU 40 adds the integrated values of the image signals for R, G, and B in each divided area calculated by the AE / AWB detection unit 36 to the white balance gain calculation circuit 22a and the light source type determination circuit 22j of the digital signal processing unit 22. Add.

ホワイトバランスゲイン算出回路22aは、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値に基づいてホワイトバランス調整用のゲイン値を算出する。   The white balance gain calculation circuit 22a calculates a gain value for white balance adjustment based on the integrated value of the image signals for each of R, G, and B in each divided area calculated by the AE / AWB detection unit.

また、光源種別判定回路22jは、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値に基づいて光源種を検出する。   The light source type determination circuit 22j detects the light source type based on the integrated value of the image signals for each of R, G, and B in each divided region calculated by the AE / AWB detector 36.

また、CPU40は、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値を輝度算出部38に加える。   Further, the CPU 40 adds the integrated value of the image signals for each of R, G, and B in each divided area calculated by the AE / AWB detection unit 36 to the luminance calculation unit 38.

輝度算出部38は、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値と、その画像信号が得られたときの撮影条件(絞り値、シャッタ速度、撮影感度)の情報とに基づいて、各分割領域におけるR、G、Bごとの測光値r、g、bを算出する。そして、得られた各分割領域におけるR、G、Bごとの測光値r、g、bと、ホワイトバランス調整用のゲイン値WBr、WBg、WBbとに基づいて、各分割領域における輝度値yを算出する。   The luminance calculation unit 38 integrates the integrated value of the image signal for each of R, G, and B in each divided area calculated by the AE / AWB detection unit 36, and the shooting conditions (aperture value, The photometric values r, g, and b for each of R, G, and B in each divided region are calculated based on the information on the shutter speed and the photographing sensitivity. Then, based on the obtained photometric values r, g, and b for each of R, G, and B in each divided region and the white balance adjustment gain values WBr, WBg, and WBb, the luminance value y in each divided region is calculated. calculate.

算出された各分割領域における輝度値yはRAM44に格納される。   The calculated luminance value y in each divided area is stored in the RAM 44.

CPU40は、現在設定されている測光モードに従って、算出された各分割領域における輝度値yから仮の露出値αを算出する。そして、算出した仮の露出値αをRAM44に格納する。   The CPU 40 calculates a temporary exposure value α from the calculated luminance value y in each divided region according to the currently set photometry mode. Then, the calculated temporary exposure value α is stored in the RAM 44.

また、CPU40は、その算出された仮の露出値αから飽和予想輝度値γを算出する。すなわち、算出された仮の露出値αに飽和限界値δ(本実施の形態のデジタルカメラでは2Ev)を加算して、飽和予想輝度値γを算出する。そして、仮の露出値αに施す補正量εを求めるために、算出した飽和予想輝度値γと、輝度算出部38で算出された各分割領域における輝度値yの情報を比較・計数処理部52に加える。   Further, the CPU 40 calculates a saturation predicted luminance value γ from the calculated temporary exposure value α. That is, the saturation expected brightness value γ is calculated by adding the saturation limit value δ (2 Ev in the digital camera of the present embodiment) to the calculated temporary exposure value α. Then, in order to obtain the correction amount ε to be applied to the temporary exposure value α, the calculated saturation expected luminance value γ and the information of the luminance value y in each divided region calculated by the luminance calculating unit 38 are compared / counted processing unit 52. Add to.

比較・計数処理部52は、入力された各分割領域における輝度値yと飽和予想輝度値γとを比較し、輝度値yが飽和予想輝度値γを超えている分割領域の数(飽和予想領域数S)を計測する。そして、求めた飽和予想領域数Sに応じた補正量εを所定の関数F(S)(図8参照)に従って算出する。   The comparison / counting processing unit 52 compares the input luminance value y and the predicted saturation luminance value γ in each divided region, and determines the number of divided regions where the luminance value y exceeds the saturation predicted luminance value γ (saturation predicted region). The number S) is measured. Then, a correction amount ε corresponding to the calculated number S of expected saturation regions is calculated according to a predetermined function F (S) (see FIG. 8).

算出された補正量εの情報は、CPU40に出力され、CPU40は得られた補正量εの情報に従って仮の露出値αを補正し、最終露出値βを取得する。すなわち、仮の露出値αに補正量εを加算し、最終露出値βを算出する。   Information on the calculated correction amount ε is output to the CPU 40, and the CPU 40 corrects the temporary exposure value α in accordance with the obtained information on the correction amount ε to obtain a final exposure value β. That is, the final exposure value β is calculated by adding the correction amount ε to the temporary exposure value α.

なお、補正値εが0の場合は、補正は行わず、仮の露出値αをそのまま最終露出値βとする。   When the correction value ε is 0, no correction is performed and the temporary exposure value α is used as it is as the final exposure value β.

CPU40は、所定のプログラム線図に従って、算出された最終露出値βから本撮影時の露出(撮影感度、絞り値、シャッタ速度)を決定する。   The CPU 40 determines the exposure (shooting sensitivity, aperture value, shutter speed) at the actual shooting from the calculated final exposure value β according to a predetermined program diagram.

以上のように、操作部50において、シャッタボタンが半押しされると、AE、AF、AWBの各制御が行われ、撮影準備が行われる。   As described above, in the operation unit 50, when the shutter button is half-pressed, each control of AE, AF, and AWB is performed and preparation for photographing is performed.

撮影者は、液晶モニタ28の表示を見て画角、ピント状態等を確認し、撮影実行を指示する。すなわち、操作部50において、シャッタボタンを全押しする。   The photographer looks at the display on the liquid crystal monitor 28, confirms the angle of view, the focus state, and the like, and instructs the execution of photographing. That is, in the operation unit 50, the shutter button is fully pressed.

シャッタボタンが全押しされると、CPU40にS2ON信号が入力される。CPU40は、このS2ON信号に応動して、本撮影の処理を実行する。   When the shutter button is fully pressed, an S2 ON signal is input to the CPU 40. The CPU 40 executes the actual photographing process in response to the S2ON signal.

まず、上記AE制御の結果求めた絞り値、シャッタ速度でCCD14を露光し、記録用の画像を撮像する。   First, the CCD 14 is exposed at the aperture value and shutter speed obtained as a result of the AE control, and a recording image is taken.

CCD14から出力された記録用の画像信号は、アナログ信号処理部16で所要の信号処理が施された後、A/D変換器18でデジタル信号に変換され、画像入力コントローラ20を介してRAM44に格納される。そして、RAM44からデジタル信号処理部22に加えられる。   The recording image signal output from the CCD 14 is subjected to required signal processing by the analog signal processing unit 16, and then converted into a digital signal by the A / D converter 18, and is sent to the RAM 44 via the image input controller 20. Stored. Then, it is added from the RAM 44 to the digital signal processing unit 22.

デジタル信号処理部22は、入力された画像信号に対して所要の信号処理を施し、輝度信号Yと色差信号Cr、Cbからなる画像信号(Y/C信号)を生成する。   The digital signal processing unit 22 performs necessary signal processing on the input image signal to generate an image signal (Y / C signal) composed of a luminance signal Y and color difference signals Cr and Cb.

デジタル信号処理部22で生成された輝度信号Yと色差信号Cr、Cbは、一旦RAM44に格納されたのち、圧縮/伸張処理部24に加えられる。   The luminance signal Y and the color difference signals Cr and Cb generated by the digital signal processing unit 22 are temporarily stored in the RAM 44 and then added to the compression / decompression processing unit 24.

圧縮/伸張処理部24は、入力された画像信号に対して所定の圧縮処理を施し、圧縮画像データを生成する。   The compression / decompression processing unit 24 performs predetermined compression processing on the input image signal to generate compressed image data.

圧縮/伸張処理部24で生成された圧縮画像データは、RAM44に格納される。CPU40は、このRAM44に格納された圧縮画像データに対して所定の撮影情報(撮影時のシャッタ速度、絞り値、撮影感度、撮影モード等の撮影に関する諸情報)を付加した所定フォーマットの画像ファイル(たとえば、Exif形式の画像ファイル)を生成し、記録制御部30を介して生成した画像ファイルを記憶メディア32に記録する。   The compressed image data generated by the compression / decompression processing unit 24 is stored in the RAM 44. The CPU 40 has a predetermined format image file in which predetermined shooting information (information related to shooting such as shutter speed, aperture value, shooting sensitivity, shooting mode, etc. at the time of shooting) is added to the compressed image data stored in the RAM 44. For example, an Exif format image file) is generated, and the image file generated via the recording control unit 30 is recorded on the storage medium 32.

このようにして、記憶メディア32に記録された画像は、デジタルカメラのモードを再生モードに設定することにより、液晶モニタ28に再生表示することができる。すなわち、操作部50において、デジタルカメラ10のモードを再生モードにすると、記憶メディア32に最後に記録された画像ファイルの圧縮画像データが読み出され、圧縮/伸張処理部24に加えられる。そして、圧縮/伸張処理部24で非圧縮の画像信号とされた後、VRAM48に加えられ、VRAM48から表示制御部26を介して液晶モニタ28に出力される。これにより、記憶メディア32に記録されている画像が液晶モニタ28に再生表示される。操作部50において、画像のコマ送りの操作が行われると、次の画像が記憶メディア32から読み出され、所要の信号処理を施されて、液晶モニタ28に再生表示される。   In this way, the image recorded on the storage medium 32 can be reproduced and displayed on the liquid crystal monitor 28 by setting the mode of the digital camera to the reproduction mode. That is, when the operation unit 50 sets the mode of the digital camera 10 to the playback mode, the compressed image data of the image file recorded last on the storage medium 32 is read and added to the compression / decompression processing unit 24. Then, after the compression / decompression processing unit 24 generates an uncompressed image signal, it is added to the VRAM 48 and is output from the VRAM 48 to the liquid crystal monitor 28 via the display control unit 26. As a result, the image recorded in the storage medium 32 is reproduced and displayed on the liquid crystal monitor 28. When the operation unit 50 performs an image frame advance operation, the next image is read from the storage medium 32, subjected to necessary signal processing, and reproduced and displayed on the liquid crystal monitor 28.

以上説明したように、本実施の形態のデジタルカメラ10では、操作部50において、カメラのモードを撮影モードに設定し、シャッタボタンを半押しすると、AE、AF、AWB制御が行われ、シャッタボタンを全押しすると、本撮影が行われるが、AE制御により、露出を決定する際、飽和予想領域数Sを計測し、その飽和予想領域数Sに応じた補正量εを求めて、露出値(仮の露出値α)を補正して、最終的な露出値(最終露出値β)を取得しているので、輝度差の激しいシーンを撮影する場合であっても、白飛びの発生を効果的に抑制することができ、高品質な画像を撮影することができる。   As described above, in the digital camera 10 of the present embodiment, when the camera mode is set to the shooting mode and the shutter button is pressed halfway in the operation unit 50, AE, AF, AWB control is performed, and the shutter button When the button is fully pressed, the actual photographing is performed. When exposure is determined by AE control, the number of expected saturation areas S is measured, and a correction amount ε corresponding to the number of expected saturation areas S is obtained to obtain an exposure value ( Since the final exposure value (final exposure value β) is obtained by correcting the temporary exposure value α), whiteout is effective even when shooting a scene with a large luminance difference. Therefore, a high-quality image can be taken.

すなわち、本実施の形態のデジタルカメラ10では、図9に示すように、露出を決定する際、まず、64(8×8)分割された各分割領域において、個別に輝度値yが求められ(ステップS10)、その分割領域ごとの輝度値yから仮の露出値αが求められる(ステップS11)。そして、求めた仮の露出値αに飽和限界値δを加算して、飽和予想輝度値γが求められ(ステップS12)、求めた飽和予想輝度値γと各分割領域における輝度値yとが比較される(ステップS13)。そして、輝度値yが飽和予想輝度値γを超える分割領域の数が計測されて、飽和予想領域数Sが求められ(ステップS14)、求めた飽和予想領域数Sに応じて補正量εが求められる(ステップS15)。そして、求めた補正量εを仮の露出値αに加算して、最終露出値βが求められ(ステップS16)、求めた最終露出値βからプログラム線図に従って露出が決定される(ステップS17)。   That is, in the digital camera 10 of the present embodiment, as shown in FIG. 9, when determining the exposure, first, the luminance value y is individually obtained in each of the 64 (8 × 8) divided areas ( In step S10), a temporary exposure value α is obtained from the luminance value y for each divided area (step S11). Then, a saturation limit value δ is added to the obtained temporary exposure value α to obtain a saturation expected luminance value γ (step S12), and the obtained saturation expected luminance value γ is compared with the luminance value y in each divided region. (Step S13). Then, the number of divided regions where the luminance value y exceeds the saturation expected luminance value γ is measured to determine the saturation predicted region number S (step S14), and the correction amount ε is determined according to the calculated saturation predicted region number S. (Step S15). Then, the obtained correction amount ε is added to the temporary exposure value α to obtain the final exposure value β (step S16), and the exposure is determined from the obtained final exposure value β according to the program diagram (step S17). .

これにより、輝度差の激しいシーンを撮影する場合であっても、白飛びの発生を効果的に抑制することができ、高品質な画像を撮影することができる。   Thereby, even when shooting a scene with a large luminance difference, the occurrence of whiteout can be effectively suppressed, and a high-quality image can be shot.

なお、本実施の形態では、飽和予想領域数Sから補正量εを求めるに際して、所定の関数F(S)(図8参照)を使用して求めることとしているが、飽和予想領域数Sから補正量εを求める方法は、これに限定されるものではない。たとえば、飽和予想領域数Sに応じて補正量εが規定されたテーブルをあらかじめ用意し、このテーブルを参照して、飽和予想領域数Sから補正量εを求めるようにしてもよい。   In the present embodiment, when the correction amount ε is obtained from the number S of expected saturation regions, the correction amount ε is obtained using a predetermined function F (S) (see FIG. 8). The method for obtaining the quantity ε is not limited to this. For example, a table in which the correction amount ε is defined in accordance with the expected saturation region number S may be prepared in advance, and the correction amount ε may be obtained from the expected saturation region number S with reference to this table.

また、飽和予想領域数Sから補正量εを求める関数、テーブルは、被写体に応じて最適化することが好ましい。すなわち、たとえば、図5に示す被写体(撮影シーン)を撮影して、図6に示すような輝度値yが得られたと仮定する。この場合、輝度値yの最大値、すなわち最大輝度値yMAXは、分割領域(1,3)における13.35Evである。画像の白飛びを防止するためには、この最大輝度値yMAXが、撮影露出でのダイナミックレンジ(ラチチュード)に含まれれば十分である(それ以上補正すると、撮影画像を暗くする一方である。)。したがって、最大輝度値yMAX(=13.35Ev)から飽和予想輝度値γ(=12.96Ev)を引いた差分η(=0.39Ev)を求め、これを補正量の最大とすればよい。すなわち、差分ηが、補正量の最大値となるように関数F(S)、テーブルを修正又は変更すればよい。たとえば、図10に示すように、最大輝度値yMAX(=13.35Ev)と飽和予想輝度値γ(=12.96Ev)との差分η(=0.39Ev)が、補正量εの最大となるように、補正量εを求める関数F(S)を修正する。そして、修正後の関数F’(S)に基づいて補正量εを算出する。 In addition, it is preferable that the function and table for obtaining the correction amount ε from the number S of expected saturation areas are optimized according to the subject. That is, for example, it is assumed that a luminance value y as shown in FIG. 6 is obtained by photographing the subject (photographing scene) shown in FIG. In this case, the maximum value of the luminance value y, that is, the maximum luminance value y MAX is 13.35 Ev in the divided region (1, 3). In order to prevent overexposure of the image, it is sufficient that the maximum luminance value y MAX is included in the dynamic range (latitude) at the photographic exposure (when further correction is performed, the photographic image is darkened). ). Therefore, a difference η (= 0.39 Ev) obtained by subtracting the saturation predicted luminance value γ (= 12.96 Ev) from the maximum luminance value y MAX (= 13.35 Ev) may be obtained and set as the maximum correction amount. That is, the function F (S) and the table may be corrected or changed so that the difference η becomes the maximum value of the correction amount. For example, as shown in FIG. 10, the difference η (= 0.39 Ev) between the maximum luminance value y MAX (= 13.35 Ev) and the saturation predicted luminance value γ (= 12.96 Ev) is the maximum correction amount ε. Thus, the function F (S) for obtaining the correction amount ε is corrected. Then, the correction amount ε is calculated based on the corrected function F ′ (S).

これにより、より適切に露出値を補正することができ、過度に露出補正が施されて、画像が暗くなるのを有効に防止することができる。   As a result, the exposure value can be corrected more appropriately, and it is possible to effectively prevent the image from being darkened due to excessive exposure correction.

なお、最大輝度値yMAXと飽和予想輝度値γとの差分ηが、補正量εの最大となるように、補正量εを求める関数又はテーブルを修正又は変更すればよく、その修正方法又は変更方法は特に限定されるものではない。たとえば、差分ηごとに関数又はテーブルを用意しておき、算出された差分ηに応じて使用する関数又はテーブルを変更するようにしてもよい。また、図11(b)に示すように、算出された差分ηが最大値となるように、算出された差分ηに応じて関数又はテーブルを特定の割合で修正するようにしてもよい。さらに、図11(c)に示すように、算出された差分ηが最大値となるように、関数又はテーブルの上限を制限して、修正するようにしてもよい(差分η以上は一定値(差分ηと同値)になるように修正する)。 The function or table for obtaining the correction amount ε may be corrected or changed so that the difference η between the maximum luminance value y MAX and the saturation expected luminance value γ becomes the maximum of the correction amount ε. The method is not particularly limited. For example, a function or table may be prepared for each difference η, and the function or table to be used may be changed according to the calculated difference η. Further, as shown in FIG. 11B, the function or the table may be corrected at a specific ratio according to the calculated difference η so that the calculated difference η becomes the maximum value. Furthermore, as shown in FIG. 11C, the upper limit of the function or table may be limited and corrected so that the calculated difference η becomes the maximum value (the difference η or more may be a constant value ( It is corrected so that it becomes the same value as the difference η).

図12は、飽和予想領域数Sから補正量εを求める関数(テーブル)を最適化して、露出を設定する場合の手順を示すフローチャートである。   FIG. 12 is a flowchart showing a procedure for setting an exposure by optimizing a function (table) for obtaining the correction amount ε from the number S of predicted saturation regions.

同図に示すように、まず、64(8×8)分割された各分割領域において、個別に輝度値yを求め(ステップS20)、その分割領域ごとの輝度値yから仮の露出値αを求める(ステップS21)。そして、求めた仮の露出値αに飽和限界値δを加算して、飽和予想輝度値γを求め(ステップS22)、得られた飽和予想輝度値γと各分割領域における輝度値yとを比較して(ステップS23)、輝度値yが飽和予想輝度値γを超える分割領域の数(飽和予想領域数S)を求める(ステップS24)。その後、各分割領域の輝度値yの最大値、すなわち最大輝度値yMAXを求め(ステップS25)、求めた最大輝度値yMAXと飽和予想輝度値γとの差分ηを求める(ステップS26)。そして、求めた差分ηが、補正量εの最大値となるように、補正量εを求める関数F(S)を修正又は変更し(ステップS27)、その修正又は変更した関数F’(S)に従って飽和予想領域数Sに応じた補正量εを求める(ステップS28)。そして、求めた補正量εを仮の露出値αに加算して、最終露出値βを求め(ステップS29)、求めた最終露出値βからプログラム線図に従って露出を決定する(ステップS30)。 As shown in the figure, first, in each divided area divided into 64 (8 × 8), a luminance value y is obtained individually (step S20), and a temporary exposure value α is calculated from the luminance value y for each divided area. Obtained (step S21). Then, the saturation limit value δ is added to the calculated temporary exposure value α to obtain the saturation expected luminance value γ (step S22), and the obtained saturation expected luminance value γ is compared with the luminance value y in each divided region. (Step S23), the number of divided regions where the luminance value y exceeds the saturated predicted luminance value γ (saturated predicted region number S) is obtained (Step S24). Thereafter, the maximum value of the luminance value y of each divided region, that is, the maximum luminance value y MAX is obtained (step S25), and the difference η between the obtained maximum luminance value y MAX and the saturation predicted luminance value γ is obtained (step S26). Then, the function F (S) for obtaining the correction amount ε is modified or changed so that the obtained difference η becomes the maximum value of the correction amount ε (step S27), and the corrected or changed function F ′ (S). Accordingly, a correction amount ε corresponding to the number S of expected saturation regions is obtained (step S28). Then, the obtained correction amount ε is added to the temporary exposure value α to obtain the final exposure value β (step S29), and the exposure is determined from the obtained final exposure value β according to the program diagram (step S30).

これにより、適切に露出値を補正することができ、輝度差の激しいシーンを撮影する場合であっても、高品質な画像を撮影することができる。   As a result, the exposure value can be appropriately corrected, and a high-quality image can be taken even when a scene with a large luminance difference is taken.

次に、本発明が適用されたデジタルカメラの第2の実施の形態について説明する。   Next, a second embodiment of a digital camera to which the present invention is applied will be described.

上記第1の実施の形態のデジタルカメラでは、撮影領域を複数の領域に分割し、分割領域ごとに輝度値yを検出し、検出された輝度値yが、飽和予想輝度値γを超えている分割領域の数(飽和予想領域数S)を求め、求めた飽和予想領域数Sに応じて補正量εを求めていた。   In the digital camera according to the first embodiment, the photographing region is divided into a plurality of regions, and the luminance value y is detected for each divided region, and the detected luminance value y exceeds the saturation expected luminance value γ. The number of division areas (saturation expected area number S) was obtained, and the correction amount ε was obtained according to the obtained saturation expected area number S.

本実施の形態のデジタルカメラでは、撮影領域を複数の領域に分割し、各分割領域についてR、G、Bごとに測光値を求め、求めたR、G、Bごとの測光値の少なくとも一つが、飽和予想輝度値γ’を超えている分割領域の数(飽和予想領域数S’)を求め、求めた飽和領域数S’に応じて補正量εを求める。すなわち、R、G、Bの測光値r、g、bの一つでも飽和予想輝度値γ’を超えると、色飽和を起こし、色合いの悪い画像が撮影されるので、R、G、Bの測光値r、g、bの少なくとも一つが、飽和予想輝度値γ’を超えている分割領域の数(飽和予想領域数S’)を求め、求めた飽和領域数S’に応じて補正量εを求めるようにする。これにより、輝度差の激しいシーンを撮影する場合であっても、白飛びや色飽和の発生を効果的に抑制することができ、高品質な画像を撮影することができる。   In the digital camera according to the present embodiment, the photographing area is divided into a plurality of areas, a photometric value is obtained for each R, G, and B for each divided area, and at least one of the obtained R, G, and B photometric values is obtained. Then, the number of divided areas exceeding the saturation expected luminance value γ ′ (saturation expected area number S ′) is obtained, and the correction amount ε is obtained according to the obtained saturation area number S ′. That is, if even one of the R, G, B photometric values r, g, b exceeds the saturation expected luminance value γ ′, color saturation occurs and an image with poor hue is taken. The number of divided areas where at least one of the photometric values r, g, b exceeds the saturation expected luminance value γ ′ (saturation expected area number S ′) is obtained, and the correction amount ε is determined according to the obtained saturation area number S ′. To ask. Thereby, even when shooting a scene with a large luminance difference, the occurrence of whiteout and color saturation can be effectively suppressed, and a high-quality image can be shot.

なお、比較・計数処理部以外の構成は、上記第1の実施の形態のデジタルカメラと同じなので、ここでは、比較・計数処理部の構成についてのみ説明する。   Since the configuration other than the comparison / counting processing unit is the same as that of the digital camera of the first embodiment, only the configuration of the comparison / counting processing unit will be described here.

図13は、第2の実施の形態のデジタルカメラの比較・計数処理部52’の機能ブロック図である。   FIG. 13 is a functional block diagram of the comparison / count processing unit 52 ′ of the digital camera according to the second embodiment.

上記のように、本実施の形態のデジタルカメラでは、各分割領域におけるR、G、Bごとの測光値r、g、bと、飽和予想輝度値γ’とを比較し、R、G、Bの測光値r、g、bの少なくとも一つが、飽和予想輝度値γ’を超えている分割領域の数(飽和予想領域数S’)を求めるので、比較・計数処理部52’には、各分割領域におけるR、G、Bごとの測光値r、g、bと、飽和予想輝度値γ’とが入力される。比較・計数処理部52’は、入力された各分割領域におけるR、G、Bごとの測光値r、g、bと飽和予想輝度値γ’とを比較し、R、G、Bの測光値r、g、bの少なくとも一つが、飽和予想輝度値γ’を超えている分割領域の数を計測して、飽和予想領域数S’を求める。そして、補正量εを算出する関数f(S’)を用いて、求めた飽和予想領域数S’から補正量εを算出する。   As described above, in the digital camera according to the present embodiment, the R, G, and B photometric values r, g, and b in each divided region are compared with the saturation expected luminance value γ ′, and R, G, B The number of divided regions (saturated expected region number S ′) in which at least one of the photometric values r, g, and b exceeds the saturation expected luminance value γ ′ is calculated. The photometric values r, g, and b for each of R, G, and B in the divided area and the saturation predicted luminance value γ ′ are input. The comparison / counting processing unit 52 ′ compares the photometric values r, g, and b for each of the input divided areas with the predicted luminance value γ ′, and R, G, and B photometric values. The number of divided regions in which at least one of r, g, and b exceeds the saturation predicted luminance value γ ′ is measured to determine the saturation predicted region number S ′. Then, using the function f (S ′) for calculating the correction amount ε, the correction amount ε is calculated from the obtained saturation predicted region number S ′.

なお、本実施の形態のデジタルカメラにおいても飽和予想輝度値γ’は、仮の露出値αから算出する。すなわち、各分割領域における輝度値yから求めた仮の露出値αに所定の飽和限界値δ’を加算して、飽和予想輝度値γ’を求める。本実施の形態のデジタルカメラでは、飽和限界値δ’を2Evとする。   Note that, in the digital camera of the present embodiment as well, the saturation expected luminance value γ ′ is calculated from the temporary exposure value α. That is, a predetermined saturation limit value δ ′ is added to the temporary exposure value α obtained from the luminance value y in each divided region to obtain a saturation expected luminance value γ ′. In the digital camera of the present embodiment, the saturation limit value δ ′ is set to 2 Ev.

次に、第2の実施の形態のデジタルカメラにおける撮影処理の手順について説明する。   Next, a procedure of photographing processing in the digital camera according to the second embodiment will be described.

なお、露出設定以外の処理については、上記第1の実施の形態のデジタルカメラと同じなので、ここでは、露出設定の手順についてのみ説明する。   Since processing other than exposure setting is the same as that of the digital camera of the first embodiment, only the procedure for exposure setting will be described here.

上記のように、シャッタボタンが半押しされると、露出決定のため、CCD14から出力された画像信号がアナログ信号処理部16で所要の信号処理を施された後、A/D変換器18でデジタル信号に変換されて、画像入力コントローラ20からRAM44に取り込まれる。そして、AE/AWB検出部36に加えられる。   As described above, when the shutter button is half-pressed, the image signal output from the CCD 14 is subjected to necessary signal processing by the analog signal processing unit 16 and then the A / D converter 18 for determining the exposure. It is converted into a digital signal and taken into the RAM 44 from the image input controller 20. Then, it is added to the AE / AWB detection unit 36.

AE/AWB検出部36は、入力された画像信号から各分割領域についてR、G、Bごとの画像信号の積算値を算出する。算出された各分割領域におけるR、G、Bごとの画像信号の積算値の情報は、RAM44に格納される。   The AE / AWB detection unit 36 calculates the integrated value of the image signal for each of R, G, and B for each divided region from the input image signal. Information on the calculated integrated value of the image signal for each of R, G, and B in each divided region is stored in the RAM 44.

CPU40は、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値を輝度算出部38に加える。輝度算出部38は、このAE/AWB検出部36で算出された各分割領域におけるR、G、Bごとの画像信号の積算値と、その画像信号が得られたときの撮影条件(絞り値、シャッタ速度、撮影感度)の情報とに基づいて、各分割領域におけるR、G、Bごとの測光値r、g、bを算出する。そして、得られた各分割領域におけるR、G、Bごとの測光値r、g、bと、ホワイトバランス調整用のゲイン値WBr、WBg、WBbとに基づいて、各分割領域における輝度値yを算出する。算出された各分割領域における輝度値yはRAM44に格納される。   The CPU 40 adds the integrated value of the image signal for each of R, G, and B in each divided region calculated by the AE / AWB detection unit 36 to the luminance calculation unit 38. The luminance calculation unit 38 integrates the integrated value of the image signal for each of R, G, and B in each divided area calculated by the AE / AWB detection unit 36, and the shooting conditions (aperture value, The photometric values r, g, and b for each of R, G, and B in each divided region are calculated based on the information on the shutter speed and the photographing sensitivity. Then, based on the obtained photometric values r, g, and b for each of R, G, and B in each divided region and the white balance adjustment gain values WBr, WBg, and WBb, the luminance value y in each divided region is calculated. calculate. The calculated luminance value y in each divided area is stored in the RAM 44.

CPU40は、現在設定されている測光モードに従って、算出された各分割領域における輝度値yから仮の露出値αを算出する。そして、算出した仮の露出値αをRAM44に格納する。   The CPU 40 calculates a temporary exposure value α from the calculated luminance value y in each divided region according to the currently set photometry mode. Then, the calculated temporary exposure value α is stored in the RAM 44.

また、CPU40は、その算出された仮の露出値αから飽和予想輝度値γ’を算出する。すなわち、算出された仮の露出値αに飽和限界値δ’(=2Ev)を加算して、飽和予想輝度値γ’を算出する。そして、算出した飽和予想輝度値γ’と、各分割領域におけるR、G、Bごとの測光値r、g、bの情報を比較・計数処理部52’に加える。   Further, the CPU 40 calculates a saturation predicted luminance value γ ′ from the calculated temporary exposure value α. That is, the saturation expected brightness value γ ′ is calculated by adding the saturation limit value δ ′ (= 2Ev) to the calculated temporary exposure value α. Then, the calculated saturation expected luminance value γ ′ and the photometric values r, g, and b for each of R, G, and B in each divided region are added to the comparison / count processing unit 52 ′.

比較・計数処理部52’は、入力された各分割領域におけるR、G、Bごとの測光値r、g、bと飽和予想輝度値γ’とを比較する。そして、R、G、Bの測光値r、g、bの少なくとも一つが、飽和予想輝度値γ’を超えている分割領域の数を計測して、飽和予想領域数S’を求める。そして、そして、求めた飽和予想領域数Sに応じた補正量εを所定の関数f(S’)を用いて算出する。   The comparison / counting processing unit 52 'compares the photometric values r, g, and b for each of the input divided areas R, G, and B with the saturation predicted luminance value γ'. Then, the number of divided areas in which at least one of the R, G, B photometric values r, g, b exceeds the saturation expected luminance value γ ′ is measured to obtain the saturation expected area number S ′. Then, a correction amount ε corresponding to the calculated expected saturation number S is calculated using a predetermined function f (S ′).

算出された補正量εの情報は、CPU40に出力され、CPU40は得られた補正量εの情報に従って仮の露出値αを補正し、最終露出値βを取得する。すなわち、仮の露出値αに補正量εを加算し、最終露出値βを算出する。   Information on the calculated correction amount ε is output to the CPU 40, and the CPU 40 corrects the temporary exposure value α in accordance with the obtained information on the correction amount ε to obtain a final exposure value β. That is, the final exposure value β is calculated by adding the correction amount ε to the temporary exposure value α.

なお、補正値εが0の場合は、補正は行わず、仮の露出値αをそのまま最終露出値βとする。   When the correction value ε is 0, no correction is performed and the temporary exposure value α is used as it is as the final exposure value β.

CPU40は、所定のプログラム線図に従って、算出された最終露出値βから本撮影時の露出(撮影感度、絞り値、シャッタ速度)を決定する。   The CPU 40 determines the exposure (shooting sensitivity, aperture value, shutter speed) at the actual shooting from the calculated final exposure value β according to a predetermined program diagram.

図14は、上述した露出の決定の処理手順を示すフローチャートである。   FIG. 14 is a flowchart showing a procedure for determining the exposure described above.

同図に示すように、まず、64(8×8)分割された各分割領域において、R、G、Bごとに測光値r、g、bが求められる(ステップS40)。そして、求めた各分割領域におけるR、G、Bごとの測光値r、g、bから各分割領域における輝度値yが求められ(ステップS41)、求めた分割領域における輝度値yから仮の露出値αが求められる(ステップS42)。そして、求めた仮の露出値αに飽和限界値δ’を加算して、飽和予想輝度値γ’が求められ(ステップS43)、求めた飽和予想輝度値γ’と各分割領域におけるR、G、Bごとの測光値r、g、bとが比較される(ステップS44)。そして、R、G、Bごとの測光値r、g、bの少なくとも一つが飽和予想輝度値γ’を超える分割領域の数が計測されて、飽和予想領域数S’が求められ(ステップS45)、求めた飽和予想領域数S’に応じて補正量εが求められる(ステップS46)。そして、求めた補正量εを仮の露出値αに加算して、最終露出値βが求められ(ステップS47)、求めた最終露出値βからプログラム線図に従って露出が決定される(ステップS48)。   As shown in the figure, first, photometric values r, g, and b are obtained for each of R, G, and B in each of the divided areas divided into 64 (8 × 8) (step S40). Then, the luminance value y in each divided region is obtained from the photometric values r, g, and b for each of the obtained divided regions (step S41), and provisional exposure is performed from the obtained luminance value y in the divided region. The value α is obtained (step S42). Then, the saturation limit value δ ′ is added to the obtained temporary exposure value α to obtain the saturation expected luminance value γ ′ (step S43), and the obtained saturation expected luminance value γ ′ and R, G in each divided region are obtained. , B are compared with the photometric values r, g, and b (step S44). Then, the number of divided areas in which at least one of the photometric values r, g, and b for each of R, G, and B exceeds the saturation expected luminance value γ ′ is measured to obtain the saturation expected area number S ′ (step S45). Then, the correction amount ε is obtained according to the obtained saturation predicted region number S ′ (step S46). Then, the obtained correction amount ε is added to the temporary exposure value α to obtain the final exposure value β (step S47), and the exposure is determined from the obtained final exposure value β according to the program diagram (step S48). .

以下、具体例を示して説明する。たとえば、図15に示すような被写体(撮影シーン)を撮影して、各分割領域において、図16に示すようなR、G、Bごとの測光値r、g、bが得られたと仮定する。また、各分割領域におけるR、G、Bごとの測光結果から、各分割領域において、図17に示すような輝度値yが得られたと仮定し、各分割領域における輝度値yから求められた仮の露出値αが13.19Evになったと仮定する。   Hereinafter, a specific example will be described. For example, it is assumed that a subject (photographing scene) as shown in FIG. 15 is photographed, and photometric values r, g, and b for R, G, and B as shown in FIG. 16 are obtained in each divided region. Further, it is assumed that a luminance value y as shown in FIG. 17 is obtained in each divided region from the photometric results for each of R, G, and B in each divided region, and a temporary value obtained from the luminance value y in each divided region is obtained. Is assumed to be 13.19 Ev.

本実施の形態のデジタルカメラでは、飽和限界値δ’は、2.0Evと規定されているので、飽和予想輝度値γ’は、γ’=α+δ’=13.19+2.0=15.19Evとなる。   In the digital camera of the present embodiment, the saturation limit value δ ′ is defined as 2.0 Ev, so the saturation expected luminance value γ ′ is γ ′ = α + δ ′ = 13.19 + 2.0 = 15.19 Ev. Become.

比較・計数処理部52’は、各分割領域におけるR、G、Bごとの測光値r、g、bと飽和予想輝度値γ’=15.19とを比較し、R、G、Bごとの測光値r、g、bの少なくとも一つが飽和予想輝度値γ’を超えている分割領域の数(飽和予想領域数S’)計測する。すなわち、R、G、Bごとの測光値r、g、bの少なくとも一つが飽和予想輝度値γ’を超えている分割領域を検出し、その総数をカウントする。   The comparison / counting processing unit 52 ′ compares the photometric values r, g, and b for each of the divided regions with the predicted luminance value γ ′ = 15.19 for each of the R, G, and B, The number of divided areas in which at least one of the photometric values r, g, b exceeds the saturation expected luminance value γ ′ (saturation expected area number S ′) is measured. That is, a divided region in which at least one of the photometric values r, g, and b for each of R, G, and B exceeds the saturation expected luminance value γ ′ is detected, and the total number is counted.

ここでは、図16(a)〜(c)において、白抜き数字で表示されている領域が、飽和予想輝度値γを超えている領域なので、この領域の数を計測して、飽和予想領域数S’とする。図16に示す例の場合、飽和予想領域数S’は、S’=19である。   Here, in FIGS. 16A to 16C, the region displayed with white numbers is a region that exceeds the saturation expected luminance value γ, so the number of this region is measured, and the number of saturation predicted regions Let S ′. In the case of the example shown in FIG. 16, the number S ′ of saturation prediction regions is S ′ = 19.

このようにして求めた飽和予想領域数S’から、たとえば、図18に示すように、飽和予想領域数Sに応じて補正量εが規定される関数f(S)を利用して、補正量εを算出する。図8に示す関数f(S)では、飽和予想領域数S’が19のとき、補正量εが0.18Evとして算出される。   From the saturation predicted area number S ′ thus obtained, for example, as shown in FIG. 18, using the function f (S) in which the correction amount ε is defined according to the saturation expected area number S, the correction amount ε is calculated. In the function f (S) shown in FIG. 8, when the number of predicted saturation areas S ′ is 19, the correction amount ε is calculated as 0.18 Ev.

したがって、最終露出値βは、仮の露出値αに補正量εを加算して、β=α+εから13.19+0.18=13.37Evとして求まる。   Accordingly, the final exposure value β is obtained as 13.19 + 0.18 = 13.37 Ev from β = α + ε by adding the correction amount ε to the temporary exposure value α.

そして、このようにして求めた最終露出値βから所定のプログラム線図に従って露出を設定する。   Then, the exposure is set according to a predetermined program diagram from the final exposure value β thus obtained.

このように、本実施の形態のデジタルカメラでは、撮影領域を複数の領域に分割し、各分割領域についてR、G、Bごとに測光値r、g、bを求め、求めたR、G、Bごとの測光値r、g、bの少なくとも一つが、飽和予想輝度値γ’を超えている分割領域の数(飽和予想領域数S’)を求め、求めた飽和領域数S’に応じて補正量εを求めて、仮の露出値αを補正し、露出を決定する。   As described above, in the digital camera of the present embodiment, the imaging region is divided into a plurality of regions, and the photometric values r, g, and b are obtained for each of the divided regions for each of R, G, and B, and the obtained R, G, The number of divided regions (saturated expected region number S ′) in which at least one of the photometric values r, g, and b for each B exceeds the saturation predicted luminance value γ ′ is determined, and the number of saturated regions S ′ is determined. The correction amount ε is obtained, the temporary exposure value α is corrected, and the exposure is determined.

これにより、輝度差の激しいシーンを撮影する場合であっても、白飛びや色飽和の発生を効果的に抑制することができ、高品質な画像を撮影することができる。   Thereby, even when shooting a scene with a large luminance difference, the occurrence of whiteout and color saturation can be effectively suppressed, and a high-quality image can be shot.

なお、本実施の形態では、飽和予想領域数S’から補正量εを求めるに際して、所定の関数f(S’)を使用して求めることとしているが、上記第1の実施の形態のデジタルカメラと同様に飽和予想領域数S’から補正量εを求める方法は、これに限定されるものではない。たとえば、飽和予想領域数S’に応じて補正量εが規定されたあらかじめ用意し、このテーブルを参照して、飽和予想領域数S’から補正量εを求めるようにしてもよい。   In the present embodiment, when the correction amount ε is obtained from the saturation predicted region number S ′, it is obtained using a predetermined function f (S ′). However, the digital camera of the first embodiment is used. Similarly to the above, the method for obtaining the correction amount ε from the number of predicted saturation regions S ′ is not limited to this. For example, the correction amount ε may be prepared in advance in accordance with the number of predicted saturation regions S ′, and the correction amount ε may be obtained from the number of predicted saturation regions S ′ with reference to this table.

また、上記第1の実施の形態のデジタルカメラと同様に飽和予想領域数S’から補正量εを求める関数、テーブルは、被写体に応じて最適化することが好ましい。すなわち、たとえば、図15に示す被写体(撮影シーン)を撮影して、図16に示すようなR、G、Bごとの測光値r、g、bが各分割領域において得られたと仮定する。この場合、測光値r、g、bの最大値、すなわち最大測光値rgbMAXは、分割領域(3,6)におけるBの測光値15.51Evである。画像の白飛び、色飽和を防止するためには、この最大測光値rgbMAXが、撮影露出でのダイナミックレンジ(ラチチュード)に含まれれば十分である(それ以上補正すると、撮影画像を暗くする一方である。)。したがって、最大測光値rgbMAX(=15.51Ev)から飽和予想輝度値γ’(=15.19Ev)を引いた差分η(=0.32Ev)を求め、これを補正量の最大とすればよい。すなわち、差分ηが、補正量の最大値となるように関数f(S’)、テーブルを修正又は変更すればよい。たとえば、図19に示すように、最大測光値rgbMAX(=15.51Ev)と飽和予想輝度値γ’(=15.19Ev)との差分η(=0.32Ev)が、補正量εの最大となるように、補正量εを求める関数f(S’)を修正する。そして、修正後の関数f’(S’)に基づいて補正量εを算出する。 As in the digital camera of the first embodiment, the function and table for obtaining the correction amount ε from the number of predicted saturation areas S ′ are preferably optimized according to the subject. That is, for example, it is assumed that the subject (photographing scene) shown in FIG. 15 is photographed and the photometric values r, g, and b for R, G, and B as shown in FIG. 16 are obtained in each divided region. In this case, the maximum value of the photometric values r, g, and b, that is, the maximum photometric value rgb MAX is the B photometric value 15.51Ev in the divided region (3, 6). In order to prevent overexposure and color saturation of the image, it is sufficient that the maximum photometric value rgb MAX is included in the dynamic range (latitude) at the shooting exposure (if further correction is performed, the shot image is darkened). .) Therefore, a difference η (= 0.32Ev) obtained by subtracting the saturation expected luminance value γ ′ (= 15.19Ev) from the maximum photometric value rgb MAX (= 15.51Ev) may be obtained and set as the maximum correction amount. . That is, the function f (S ′) and the table may be corrected or changed so that the difference η becomes the maximum value of the correction amount. For example, as shown in FIG. 19, the difference η (= 0.32 Ev) between the maximum photometric value rgb MAX (= 15.51 Ev) and the saturation predicted luminance value γ ′ (= 15.19 Ev) is the maximum correction amount ε. The function f (S ′) for obtaining the correction amount ε is corrected so that Then, the correction amount ε is calculated based on the corrected function f ′ (S ′).

これにより、より適切に露出値を補正することができ、過度に露出補正が施されて、画像が暗くなるのを有効に防止することができる。   As a result, the exposure value can be corrected more appropriately, and it is possible to effectively prevent the image from being darkened due to excessive exposure correction.

なお、最大測光値rgbMAXと飽和予想輝度値γ’との差分ηが、補正量εの最大となるように、補正量εを求める関数又はテーブルを修正又は変更すればよく、その修正方法又は変更方法は特に限定されるものではない。たとえば、差分ηごとに関数又はテーブルを用意しておき、算出された差分ηに応じて使用する関数又はテーブルを変更するようにしてもよい。また、算出された差分ηが最大値となるように、算出された差分ηに応じて関数又はテーブルを特定の割合で修正するようにしてもよい(図11(b)参照)。さらに、算出された差分ηが最大値となるように、関数又はテーブルの上限を制限して、修正するようにしてもよい(差分η以上は一定値(差分ηと同値)になるように修正する)(図11(c)参照)。 The function or table for obtaining the correction amount ε may be corrected or changed so that the difference η between the maximum photometric value rgb MAX and the saturation expected luminance value γ ′ becomes the maximum of the correction amount ε. The changing method is not particularly limited. For example, a function or table may be prepared for each difference η, and the function or table to be used may be changed according to the calculated difference η. Further, the function or the table may be corrected at a specific ratio according to the calculated difference η so that the calculated difference η becomes the maximum value (see FIG. 11B). Further, the upper limit of the function or table may be limited and corrected so that the calculated difference η becomes the maximum value (the difference η or more may be corrected to a constant value (the same value as the difference η)). (See FIG. 11 (c)).

図20は、飽和予想領域数S’から補正量εを求める関数(テーブル)を最適化して、露出を設定する場合の手順を示すフローチャートである。   FIG. 20 is a flowchart showing a procedure for setting the exposure by optimizing a function (table) for obtaining the correction amount ε from the number of predicted saturation regions S ′.

同図に示すように、まず、64(8×8)分割された各分割領域において、R、G、Bごとの測光値r、g、bを求め(ステップS50)、求めたR、G、Bごとの測光値r、g、gから各分割領域における輝度値yを求める(ステップS51)。そして、その分割領域ごとの輝度値yから仮の露出値αを求め(ステップS52)、求めた仮の露出値αに飽和限界値δ’を加算して、飽和予想輝度値γ’を求める(ステップS53)。そして、得られた飽和予想輝度値γ’と各分割領域におけるR、G、Bごとの測光値r、g、bを比較して(ステップS54)、測光値r、g、bの少なくとも一つが飽和予想輝度値γ’を超える分割領域の数(飽和予想領域数S’)を求める(ステップS55)。その後、各分割領域におけるR、G、Bごとの測光値r、g、bの最大値、すなわち、最大測光値rgbMAXを求め(ステップS56)、求めた最大測光値rgbMAXと飽和予想輝度値γ’との差分ηを求める(ステップS57)。そして、求めた差分ηが、補正量εの最大値となるように、補正量εを求める関数f(S’)を修正又は変更し、その修正又は変更した関数f’(S’)に従って飽和予想領域数S’に応じた補正量εを求める(ステップS59)。そして、求めた補正量εを仮の露出値αに加算して、最終露出値βを求め(ステップS60)、求めた最終露出値βからプログラム線図に従って露出を決定する(ステップS61)。 As shown in the figure, first, in each divided region divided into 64 (8 × 8), photometric values r, g, and b for R, G, and B are obtained (step S50), and the obtained R, G, and B are obtained. The luminance value y in each divided area is obtained from the photometric values r, g, and g for each B (step S51). Then, a temporary exposure value α is obtained from the luminance value y for each divided region (step S52), and a saturation limit value δ ′ is added to the obtained temporary exposure value α to obtain a saturation expected luminance value γ ′ ( Step S53). Then, the obtained saturation predicted luminance value γ ′ is compared with the photometric values r, g, b for each of R, G, B in each divided region (step S54), and at least one of the photometric values r, g, b is The number of divided areas (saturated expected area number S ′) exceeding the expected saturation brightness value γ ′ is obtained (step S55). Thereafter, the maximum value of the photometric values r, g, and b for each of the divided regions, that is, the maximum photometric value rgb MAX is obtained (step S56), and the obtained maximum photometric value rgb MAX and the saturation expected luminance value are obtained. A difference η from γ ′ is obtained (step S57). Then, the function f (S ′) for obtaining the correction amount ε is corrected or changed so that the obtained difference η becomes the maximum value of the correction amount ε, and saturated according to the corrected or changed function f ′ (S ′). A correction amount ε corresponding to the predicted area number S ′ is obtained (step S59). Then, the obtained correction amount ε is added to the provisional exposure value α to obtain the final exposure value β (step S60), and the exposure is determined from the obtained final exposure value β according to the program diagram (step S61).

これにより、適切に露出値を補正することができ、輝度差の激しいシーンを撮影する場合であっても、高品質な画像を撮影することができる。   As a result, the exposure value can be appropriately corrected, and a high-quality image can be taken even when a scene with a large luminance difference is taken.

以上、一連の実施の形態で説明したように、本発明によれば、測光結果から求めた露出値(仮の露出値)を適切に補正することにより、輝度差の激しいシーンを撮影する場合であっても、白飛び、色飽和のない高品質な画像を撮影することができる。   As described above, as described in the series of embodiments, according to the present invention, by appropriately correcting the exposure value (temporary exposure value) obtained from the photometric result, it is possible to shoot a scene with a large luminance difference. Even in this case, it is possible to shoot a high-quality image without whiteout and color saturation.

なお、上記実施の形態では、本発明をデジタルカメラに適用した場合を例に説明したが、本発明の適用は、これに限定されるものではなく、いわゆる銀塩フィルムを用いたフィルムカメラにも適用することができる。   In the above embodiment, the case where the present invention is applied to a digital camera has been described as an example. However, the application of the present invention is not limited to this, and the present invention is also applied to a film camera using a so-called silver salt film. Can be applied.

また、上記実施の形態では、撮影に使用する撮像素子の出力を利用して、各分割領域における輝度値を求めているが、別途輝度センサを設置し、この輝度センサによって各分割領域における輝度値を求めるようにしてもよい。   Further, in the above embodiment, the luminance value in each divided region is obtained by using the output of the image sensor used for photographing. However, a luminance sensor is separately installed and the luminance value in each divided region is obtained by this luminance sensor. May be requested.

同様に各分割領域についてR、G、Bごとに測光する測光センサを別途設置し、この測光センサによって各分割領域におけるR、G、Bごとの測光値を求めるようにしてもよい。   Similarly, a photometric sensor that measures light for each R, G, and B may be separately installed for each divided region, and a photometric value for each R, G, and B in each divided region may be obtained by this photometric sensor.

また、測光結果から仮の露出値αを求める方法については、特に限定されるものではなく、種々の方式のものを用いることができる。たとえば、上記実施の形態で例示したものの他、ヒストグラムを用いたものや、更に補正を加えるものなど、種々の公知の方式を採用することができる。   The method for obtaining the temporary exposure value α from the photometric result is not particularly limited, and various methods can be used. For example, in addition to those exemplified in the above embodiment, various known methods such as a method using a histogram and a method for further correction can be adopted.

また、露出計で別途計測した値をユーザが入力するようにしてもよい。   Further, the user may input a value separately measured with an exposure meter.

また、上記実施の形態のデジタルカメラでは、本発明に係る信号処理の内容をハードウェア回路で構成しているが、当該ハードウェア回路と同じ機能をソフトウェアで構成することもできる。すなわち、所定の制御プログラムにより構成することもできる。   In the digital camera of the above embodiment, the content of the signal processing according to the present invention is configured by a hardware circuit, but the same function as that of the hardware circuit can be configured by software. That is, it can be configured by a predetermined control program.

また、上記実施の形態のデジタルカメラでは、撮像素子としてCCDを用いているが、撮像素子は、これに限定されるものではなく、この他、CMOSセンサ等の撮像素子を用いてもよい。   In the digital camera of the above embodiment, a CCD is used as an image sensor. However, the image sensor is not limited to this, and an image sensor such as a CMOS sensor may be used.

第1の実施の形態のデジタルカメラの電気的構成を示すブロック図1 is a block diagram showing an electrical configuration of a digital camera according to a first embodiment 第1の実施の形態のデジタルカメラにおけるデジタル信号処理部の概略構成を示すブロック図1 is a block diagram showing a schematic configuration of a digital signal processing unit in a digital camera according to a first embodiment. 第1の実施の形態のデジタルカメラにおける輝度算出部の機能ブロック図Functional block diagram of a luminance calculation unit in the digital camera of the first embodiment 第1の実施の形態のデジタルカメラにおける比較・計数部の機能ブロック図Functional block diagram of the comparison / counting unit in the digital camera of the first embodiment 被写体(撮影シーン)の一例を示す図The figure which shows an example of a to-be-photographed object (shooting scene) 各分割領域における輝度の測定結果の一例を示す図The figure which shows an example of the measurement result of the brightness | luminance in each division area 露出の決定処理の過程で求まる各数値の一覧表List of numerical values obtained during the exposure determination process 飽和予想領域数Sから補正量εを求める関数F(S)の一例を示すグラフThe graph which shows an example of the function F (S) which calculates | requires correction amount (epsilon) from the number S of saturation prediction areas 第1の実施の形態のデジタルカメラにおける露出の決定手順を示すフローチャートA flowchart showing an exposure determination procedure in the digital camera according to the first embodiment. 輝度最大値から最適化した関数F’(S)の一例を示すグラフThe graph which shows an example of the function F '(S) optimized from the luminance maximum value 補正量εを求める関数F(S)の補正例を示す図The figure which shows the example of correction | amendment of the function F (S) which calculates | requires correction amount (epsilon) 補正量εを求める関数F(S)を最適化して露出を設定する場合の処理手順を示すフローチャートThe flowchart which shows the process sequence in the case of optimizing the function F (S) which calculates | requires correction amount (epsilon), and setting exposure. 第2の実施の形態のデジタルカメラにおける比較・計数処理部の機能ブロック図Functional block diagram of the comparison / counting processing unit in the digital camera of the second embodiment 第2の実施の形態のデジタルカメラにおける露出設定の処理手順を示すフローチャートThe flowchart which shows the procedure of the exposure setting in the digital camera of 2nd Embodiment 被写体(撮影シーン)の一例を示す図The figure which shows an example of a to-be-photographed object (shooting scene) 各分割領域におけるR、G、Bごとの測光結果の一例を示す図The figure which shows an example of the photometry result for every R, G, B in each division area 各分割領域における輝度の測定結果の一例を示す図The figure which shows an example of the measurement result of the brightness | luminance in each division area 飽和予想領域数S’から補正量εを求める関数f(S)の一例を示すグラフThe graph which shows an example of the function f (S) which calculates | requires correction amount (epsilon) from the saturation expected area number S ' 補正量εを求める関数f(S’)の補正例を示す図The figure which shows the example of correction | amendment of the function f (S ') which calculates | requires correction amount (epsilon) 補正量εを求める関数f(S’)を最適化して露出を設定する場合の処理手順を示すフローチャートThe flowchart which shows the process sequence in the case of optimizing the function f (S ') which calculates | requires correction amount (epsilon), and setting exposure.

符号の説明Explanation of symbols

10…デジタルカメラ、12…撮影レンズ、14…撮像素子、16…アナログ信号処理部、18…A/D変換器、20…画像入力コントローラ、22…デジタル信号処理部、24…圧縮/伸張処理部、26…表示制御部、28…液晶モニタ、30…記録制御部、32…記憶メディア、34…AF検出部、36…AE/AWB検出部、38…輝度算出部、40…CPU、42…ROM、44…RAM、46…フラッシュメモリ、48…VRAM、50…操作部、52、52’…比較・計数処理部、54…バス   DESCRIPTION OF SYMBOLS 10 ... Digital camera, 12 ... Shooting lens, 14 ... Image sensor, 16 ... Analog signal processing part, 18 ... A / D converter, 20 ... Image input controller, 22 ... Digital signal processing part, 24 ... Compression / decompression processing part , 26 ... display control section, 28 ... liquid crystal monitor, 30 ... recording control section, 32 ... storage medium, 34 ... AF detection section, 36 ... AE / AWB detection section, 38 ... luminance calculation section, 40 ... CPU, 42 ... ROM 44 ... RAM, 46 ... flash memory, 48 ... VRAM, 50 ... operation unit, 52, 52 '... comparison / counting processing unit, 54 ... bus

Claims (4)

被写体の測光結果から求められた露出値に基づいて露出を決定する撮影装置において、
被写体の測光結果から求められた露出値を仮の露出値αとし、仮の露出値αに所定の飽和限界値δを加算した値を飽和予想輝度値γとして算出する飽和予想輝度値演算手段と、
撮影領域を複数の領域に分割し、分割領域ごとに輝度値を検出する輝度値検出手段と、
前記輝度値検出手段で検出された輝度値が、前記飽和予想輝度値γを超えている分割領域の数を飽和予想領域数として検出する飽和予想領域数検出手段と、
所定の関数又はテーブルを用いて前記飽和予想領域数に応じた補正量εを取得する補正量取得手段と、
前記補正量取得手段で取得された補正量εで前記仮の露出値αを補正する露出値補正手段と、
前記輝度値検出手段で分割領域ごとに検出される輝度値の中で最大の輝度値を最大輝度値として検出する最大輝度値検出手段と、
前記最大輝度値検出手段で検出される最大輝度値と前記飽和予想輝度値γとの差ηを求め、求めた差ηが補正量εの最大値となるように前記関数又はテーブルを修正又は変更する修正手段と、
を備えたことを特徴とする撮影装置。
In an imaging device that determines the exposure based on the exposure value obtained from the photometric result of the subject,
A saturation expected brightness value calculating means for calculating a value obtained by adding a predetermined saturation limit value δ to the temporary exposure value α as a saturation expected brightness value γ, with the exposure value obtained from the photometric result of the subject as a temporary exposure value α; ,
A luminance value detecting means for dividing the photographing region into a plurality of regions and detecting a luminance value for each divided region;
A saturation expected area number detecting means for detecting, as the saturation expected area number, the number of divided areas in which the brightness value detected by the brightness value detecting means exceeds the saturation expected brightness value γ,
A correction amount acquisition means for acquiring a correction amount ε according to the number of expected saturation regions using a predetermined function or table;
Exposure value correction means for correcting the temporary exposure value α with the correction amount ε acquired by the correction amount acquisition means;
Maximum brightness value detection means for detecting the maximum brightness value as the maximum brightness value among the brightness values detected for each divided region by the brightness value detection means;
The difference η between the maximum luminance value detected by the maximum luminance value detecting means and the saturation expected luminance value γ is obtained, and the function or table is corrected or changed so that the obtained difference η becomes the maximum value of the correction amount ε. Correction means to
An imaging apparatus comprising:
前記輝度値検出手段で分割領域ごとに検出される輝度値に基づいて前記仮の露出値αを求めることを特徴とする請求項に記載の撮影装置。 The photographing apparatus according to claim 1 , wherein the provisional exposure value α is obtained based on a luminance value detected for each divided region by the luminance value detection unit. 被写体の測光結果から求められた露出値に基づいて露出を決定する撮影装置において、
被写体の測光結果から求められた露出値を仮の露出値αとし、仮の露出値αに所定の飽和限界値δを加算した値を飽和予想輝度値γとして算出する飽和予想輝度値演算手段と、
撮影領域を複数の領域に分割し、各分割領域についてR、G、Bごとに測光する測光手段と、
前記測光手段で測光されたR、G、Bごとの測光値の少なくとも一つが、前記飽和予想輝度値γを超えている分割領域の数を飽和予想領域数として検出する飽和予想領域数検出手段と、
所定の関数又はテーブルを用いて前記飽和予想領域数に応じた補正量εを取得する補正量取得手段と、
前記補正量取得手段で取得された補正量εで前記仮の露出値αを補正する露出値補正手段と、
前記測光手段で分割領域ごとに測光されたR、G、Bごとの測光値の中で最大の測光値を最大測光値として検出する最大測光値検出手段と、
前記最大測光値検出手段で検出される最大測光値と前記飽和予想輝度値γとの差ηを求め、求めた差ηが補正量εの最大値となるように前記関数又はテーブルを修正又は変更する修正手段と、
を備えたことを特徴とする撮影装置。
In an imaging device that determines the exposure based on the exposure value obtained from the photometric result of the subject,
A saturation expected brightness value calculating means for calculating a value obtained by adding a predetermined saturation limit value δ to the temporary exposure value α as a saturation expected brightness value γ, with the exposure value obtained from the photometric result of the subject as a temporary exposure value α; ,
A photometric unit that divides the imaging region into a plurality of regions and performs photometry for each of the divided regions for each of R, G, and B;
A saturation expected area number detecting means for detecting, as a saturation expected area number, the number of divided areas in which at least one of the R, G, and B photometric values measured by the photometric means exceeds the saturation expected luminance value γ; ,
A correction amount acquisition means for acquiring a correction amount ε according to the number of expected saturation regions using a predetermined function or table;
Exposure value correction means for correcting the temporary exposure value α with the correction amount ε acquired by the correction amount acquisition means;
A maximum photometric value detecting means for detecting the maximum photometric value as the maximum photometric value among the photometric values for each of R, G, and B measured for each divided area by the photometric means;
The difference η between the maximum photometric value detected by the maximum photometric value detection means and the expected saturation luminance value γ is obtained, and the function or table is corrected or changed so that the obtained difference η becomes the maximum value of the correction amount ε. Correction means to
An imaging apparatus comprising:
前記測光手段で分割領域ごとに測光されるR、G、Bごとの測光値に基づいて前記仮の露出値αを求めることを特徴とする請求項に記載の撮影装置。 The photographing apparatus according to claim 3 , wherein the temporary exposure value α is obtained based on a photometric value for each of R, G, and B that is measured for each divided region by the photometric unit.
JP2007012856A 2007-01-23 2007-01-23 Imaging device Expired - Fee Related JP4832320B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007012856A JP4832320B2 (en) 2007-01-23 2007-01-23 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007012856A JP4832320B2 (en) 2007-01-23 2007-01-23 Imaging device

Publications (2)

Publication Number Publication Date
JP2008182351A JP2008182351A (en) 2008-08-07
JP4832320B2 true JP4832320B2 (en) 2011-12-07

Family

ID=39725936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007012856A Expired - Fee Related JP4832320B2 (en) 2007-01-23 2007-01-23 Imaging device

Country Status (1)

Country Link
JP (1) JP4832320B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1155564A (en) * 1997-07-31 1999-02-26 Ricoh Co Ltd Automatic exposure controller
JP3732998B2 (en) * 2000-03-09 2006-01-11 三洋電機株式会社 Exposure control device
JP4013456B2 (en) * 2000-07-07 2007-11-28 松下電器産業株式会社 Imaging device
JP4622668B2 (en) * 2005-05-16 2011-02-02 株式会社ニコン Electronic camera and image processing program

Also Published As

Publication number Publication date
JP2008182351A (en) 2008-08-07

Similar Documents

Publication Publication Date Title
JP4914300B2 (en) Imaging apparatus and imaging control method
JP5347707B2 (en) Imaging apparatus and imaging method
JP4542058B2 (en) Imaging apparatus and imaging method
JP5123137B2 (en) Imaging apparatus and imaging method
JP2007019973A (en) Imaging device and imaging method
US8237854B2 (en) Flash emission method and flash emission apparatus
JP2007189544A (en) Imaging apparatus
JP2001103366A (en) Camera
JP4487342B2 (en) Digital camera
JP4717720B2 (en) Image processing apparatus and method, and program
JP2017022610A (en) Image processing apparatus and image processing method
JP2017108309A (en) Imaging apparatus and imaging method
JP5223686B2 (en) Imaging apparatus and imaging method
JP2010093679A (en) Imaging apparatus, and imaging control method
JP2008148180A (en) Imaging apparatus, image processing device and method, and computer program
JP2008053931A (en) Imaging apparatus
JP2008160291A (en) Image signal processor, image signal processing program, and imaging apparatus
JP2008298847A (en) Photographing method and digital camera
JP2009017427A (en) Imaging device
JP2009118052A (en) Image signal processing method and apparatus
JP2007027984A (en) Photographic apparatus and control method thereof
JP2010068331A (en) Imaging device and imaging method
JP2004245923A (en) Automatic exposure bracketing photographing method
WO2006054763A1 (en) Electronic camera
JP4832320B2 (en) Imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101216

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110629

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110810

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: 20110825

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110920

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140930

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees