JP2018098670A - Imaging device, control method of imaging device, and program - Google Patents

Imaging device, control method of imaging device, and program Download PDF

Info

Publication number
JP2018098670A
JP2018098670A JP2016242163A JP2016242163A JP2018098670A JP 2018098670 A JP2018098670 A JP 2018098670A JP 2016242163 A JP2016242163 A JP 2016242163A JP 2016242163 A JP2016242163 A JP 2016242163A JP 2018098670 A JP2018098670 A JP 2018098670A
Authority
JP
Japan
Prior art keywords
correction
area
correction amount
image
pixel signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016242163A
Other languages
Japanese (ja)
Other versions
JP2018098670A5 (en
JP6873679B2 (en
Inventor
新之介 大澤
Shinnosuke Osawa
新之介 大澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016242163A priority Critical patent/JP6873679B2/en
Priority to US15/834,509 priority patent/US10271029B2/en
Publication of JP2018098670A publication Critical patent/JP2018098670A/en
Publication of JP2018098670A5 publication Critical patent/JP2018098670A5/ja
Application granted granted Critical
Publication of JP6873679B2 publication Critical patent/JP6873679B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/643Hue control means, e.g. flesh tone control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/92
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/72Combination of two or more compensation controls
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

PROBLEM TO BE SOLVED: To make it possible to carry out natural gradation correction while restraining deterioration in an S/N ratio.SOLUTION: A system control unit (113) determines each of a first correction amount used in a first gradation correction process and a second correction amount used in a second gradation correction process according to photographing conditions. Then, the system control unit (113) controls the first gradation correction process of combining exposure control and gain control of a pixel signal value of an image and the second gradation correction process of reducing the pixel signal value in a region where the pixel signal value of the image is higher than a prescribed value.SELECTED DRAWING: Figure 1

Description

本発明は、画像を撮影する撮像装置、撮像装置の制御方法及びプログラムに関する。   The present invention relates to an imaging apparatus that captures an image, a control method for the imaging apparatus, and a program.

従来、好ましい明るさ、コントラストの画像を得るために、画像の階調補正を行う技術が知られている。特に、主被写体の明るさが背景の明るさに比べて著しく暗いような逆光シーンで撮影された画像には、画素信号値が飽和するいわゆる「白飛び」が発生し易く、その白飛びを補正する技術として、例えば特許文献1に開示されているような技術が知られている。特許文献1に記載の技術では、先ず、撮像素子を露光する段階では、白飛びの発生を抑えるように、適正露出よりも暗めの露出で撮像が行われる。そして、適正露出より暗めの露出で撮影された領域の輝度値を、適正レベルまで上げて明るくするような出力輝度変換が行われる。以下、このような露出制御及びレベル補正の処理をダイナミックレンジ拡大補正(Dレンジ拡大補正)と表記する。また、特許文献2に開示されているように、撮影により得られた画像の中に生じている白飛び領域を検出して、その白飛び領域の信号値を下げるような補正技術も知られている。以下、このような補正の処理をテカリ補正と表記する。   2. Description of the Related Art Conventionally, a technique for correcting the gradation of an image in order to obtain an image with favorable brightness and contrast is known. In particular, an image shot in a backlight scene where the brightness of the main subject is significantly darker than the background brightness is prone to so-called “whiteout” in which the pixel signal value is saturated. For example, a technique disclosed in Patent Document 1 is known. In the technique described in Patent Document 1, first, at the stage of exposing the imaging element, imaging is performed with exposure that is darker than appropriate exposure so as to suppress the occurrence of overexposure. Then, output luminance conversion is performed so that the luminance value of an area shot with an exposure darker than the appropriate exposure is increased to an appropriate level and brightened. Hereinafter, such exposure control and level correction processing will be referred to as dynamic range expansion correction (D range expansion correction). Further, as disclosed in Patent Document 2, there is also known a correction technique for detecting a whiteout area generated in an image obtained by photographing and reducing the signal value of the whiteout area. Yes. Hereinafter, such a correction process is referred to as a shine correction.

特開2010-183461号公報JP 2010-183461 A 特許第4803178号公報Japanese Patent No. 4803178

しかしながら、特許文献1のように、暗めの露出で撮影した画像を明るくするDレンジ拡大補正処理を行うと、画像のノイズ成分も増幅させてしまい、S/Nが低下することがある。また特許文献2のように、白飛び領域の信号値を下げる、テカリ補正処理を行った場合、白飛び領域の階調は既に情報として失われているため、白飛び領域がある程度大きいと、補正された領域がいわゆるベタ塗りのように見える不自然な画像になることがある。   However, as in Patent Document 1, when D-range expansion correction processing is performed to brighten an image captured with dark exposure, the noise component of the image is also amplified, and the S / N may be reduced. Further, as in Patent Document 2, when the shine correction process is performed to reduce the signal value of the whiteout area, the gradation of the whiteout area has already been lost as information. In some cases, the imaged area may be an unnatural image that looks like a so-called solid painting.

そこで、本発明は、S/Nの低下を抑えつつ自然な階調補正を実現可能にすることを目的とする。   Therefore, an object of the present invention is to enable natural gradation correction while suppressing a decrease in S / N.

本発明は、撮影した画像の画素信号値の飽和を抑制する階調補正を行う撮像装置であって、露出制御と、前記画像の画素信号値に対するゲイン制御とを組み合わせた第1の階調補正を行う第1の補正手段と、前記画像の画素信号値が所定値よりも高い領域の画素信号値を低減する第2の階調補正を行う第2の補正手段と、撮影条件に応じて、前記第1の階調補正に用いる第1の補正量と前記第2の階調補正に用いる第2の補正量とをそれぞれ決定する決定手段と、を有することを特徴とする。   The present invention is an imaging apparatus that performs gradation correction that suppresses saturation of pixel signal values of a captured image, and first gradation correction that combines exposure control and gain control for the pixel signal values of the image. A first correction unit that performs the second correction unit that performs second gradation correction that reduces a pixel signal value in a region where the pixel signal value of the image is higher than a predetermined value, and a shooting condition, And determining means for respectively determining a first correction amount used for the first gradation correction and a second correction amount used for the second gradation correction.

本発明によれば、S/Nの低下を抑えつつ自然な階調補正が実現可能となる。   According to the present invention, natural gradation correction can be realized while suppressing a decrease in S / N.

デジタルカメラの構成例を示すブロック図である。It is a block diagram which shows the structural example of a digital camera. 階調補正の流れを示すフローチャートである。It is a flowchart which shows the flow of a gradation correction | amendment. Dレンジ拡大補正量決定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of D range expansion correction amount determination processing. テカリ補正処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a shine correction process. 逆光シーンで撮影された画像の一例を示す図である。It is a figure which shows an example of the image image | photographed in the backlight scene. 撮影条件に応じたDレンジ拡大補正量の上限値の一例を示す図である。It is a figure which shows an example of the upper limit of D range expansion correction amount according to imaging | photography conditions. 補正量算出に使用する閾値面積の設定例を示す図である。It is a figure which shows the example of a setting of the threshold value area used for correction amount calculation.

以下、本発明の一実施形態を、添付の図面に基づいて詳細に説明する。本実施形態の撮像装置は、デジタルカメラやデジタルビデオカメラ、カメラ機能を備えたスマートフォンやタブレット端末等の各種携帯端末、工業用カメラ、車載カメラ、医療用カメラ等に適用可能である。本実施形態では、デジタルカメラを例に挙げて説明する。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings. The imaging apparatus of the present embodiment can be applied to digital cameras, digital video cameras, various portable terminals such as smartphones and tablet terminals having camera functions, industrial cameras, in-vehicle cameras, medical cameras, and the like. In the present embodiment, a digital camera will be described as an example.

<デジタルカメラの構成>
図1は、本実施形態に係るデジタルカメラ100の概略構成を示すブロック図である。デジタルカメラ100は、撮像機構として、撮影レンズ101と、絞り及びシャッタ102と、自動露出(AE)処理部103と、フォーカスレンズ104と、オートフォーカス(AF)処理部105と、撮像素子106と、A/D変換部107とを備える。また、デジタルカメラ100は、画像処理部108と、画像認識部109と、フォーマット変換部110と、DRAM111とを備えている。さらに、デジタルカメラ100は、画像記録部112と、システム制御部113と、VRAM114と、表示部115と、操作部116と、メインスイッチ(メインSW)117と、撮影スイッチ(撮影SW)118をも備えている。
<Configuration of digital camera>
FIG. 1 is a block diagram illustrating a schematic configuration of a digital camera 100 according to the present embodiment. The digital camera 100 includes an imaging lens 101, an aperture and shutter 102, an automatic exposure (AE) processing unit 103, a focus lens 104, an autofocus (AF) processing unit 105, an image sensor 106, as an imaging mechanism. And an A / D converter 107. The digital camera 100 also includes an image processing unit 108, an image recognition unit 109, a format conversion unit 110, and a DRAM 111. The digital camera 100 further includes an image recording unit 112, a system control unit 113, a VRAM 114, a display unit 115, an operation unit 116, a main switch (main SW) 117, and a shooting switch (shooting SW) 118. I have.

撮影レンズ101は、ズーム機構を有する。絞り及びシャッタ102は、AE処理部103からの指示にしたがって、撮像素子106への入射光量と撮像素子106への光の入射時間の長さとを調整し、これにより露出制御が実現される。AE処理部103は、絞り及びシャッタ102の動作を制御する。フォーカスレンズ104は、AF処理部105からの制御信号にしたがって、撮像素子106の受光面上に焦点を合わせて光学像を結像させる。また、AF処理部105は、デジタルカメラ100から被写体までの距離情報についても算出可能となされている。   The taking lens 101 has a zoom mechanism. In accordance with an instruction from the AE processing unit 103, the aperture and shutter 102 adjusts the amount of light incident on the image sensor 106 and the length of time of light incident on the image sensor 106, thereby realizing exposure control. The AE processing unit 103 controls the operation of the aperture and shutter 102. The focus lens 104 focuses on the light receiving surface of the image sensor 106 in accordance with a control signal from the AF processing unit 105 to form an optical image. The AF processing unit 105 can also calculate distance information from the digital camera 100 to the subject.

撮像素子106は、CCD素子或いはCMOS素子等の光電変換素子を有し、光電変換素子の受光面に結像された光学像を、電気信号に変換してA/D変換部107へ出力する。A/D変換部107は、撮像素子106から入力された電気信号(アナログ信号)をデジタル信号に変換する。また、A/D変換部107は、撮像素子106から入力された電気信号からノイズを除去するCDS回路や、アナログ信号をデジタル信号に変換する前に非線形増幅するための非線形増幅回路等も含む。   The imaging element 106 includes a photoelectric conversion element such as a CCD element or a CMOS element, converts an optical image formed on the light receiving surface of the photoelectric conversion element into an electrical signal, and outputs the electrical signal to the A / D conversion unit 107. The A / D conversion unit 107 converts an electrical signal (analog signal) input from the image sensor 106 into a digital signal. The A / D converter 107 also includes a CDS circuit that removes noise from the electrical signal input from the image sensor 106, a nonlinear amplifier circuit that performs nonlinear amplification before converting an analog signal into a digital signal, and the like.

画像処理部108は、A/D変換部107から入力されたデジタル信号に対して所定の画素補間や画像縮小等のリサイズ処理と色変換処理とを行って画像データを出力する、いわゆる現像処理を行う。   The image processing unit 108 performs a so-called development process in which image data is output by performing resizing processing and color conversion processing such as predetermined pixel interpolation and image reduction on the digital signal input from the A / D conversion unit 107. Do.

また、画像処理部108は、入力されたデジタル信号に対して信号レベルの増減などの処理により階調補正を行うことで、撮影画像の画質を調節するような機能も有している。例えば、画像の信号レベルを調整する階調補正機能として、画像処理部108は、画像全体に一律の増幅率で信号レベルを増減させる機能や、元の信号レベルの大小に応じて信号レベルを変換するいわゆるトーンカーブ(ガンマ)機能等を有する。本実施形態のデジタルカメラ100は、この階調補正機能により、後述するダイナミックレンジ拡大補正処理(Dレンジ拡大補正処理)のうちレベル補正(ゲイン補正)に係る処理を実現可能となっている。さらに、画像処理部108は、画像内の所定の領域について、色輝度信号値に対し加算、減算、乗算、置換等の処理を施す階調補正機能も有している。本実施形態のデジタルカメラ100は、このような画像内の所定の領域に対する階調補正機能により、後述するテカリ補正処理を実現可能となっている。   The image processing unit 108 also has a function of adjusting the image quality of a captured image by performing gradation correction on the input digital signal by processing such as signal level increase / decrease. For example, as a gradation correction function for adjusting the signal level of the image, the image processing unit 108 can increase or decrease the signal level with a uniform amplification factor for the entire image, or convert the signal level according to the magnitude of the original signal level. So-called tone curve (gamma) function. The digital camera 100 according to the present embodiment can realize processing related to level correction (gain correction) in dynamic range expansion correction processing (D range expansion correction processing) described later by this gradation correction function. Furthermore, the image processing unit 108 also has a gradation correction function for performing processing such as addition, subtraction, multiplication, and replacement on the color luminance signal value for a predetermined region in the image. The digital camera 100 according to the present embodiment can realize a shine correction process to be described later by a gradation correction function for a predetermined region in such an image.

画像認識部109は、画像処理部108にて適切に処理された後の画像データが入力される。画像認識部109は、入力された画像の明るさ状況や合焦状況を認識する機能を有する。画像認識部109により認識された画像の明るさ状況を表す情報はAE処理部に送られ、合焦状況を表す情報はAF処理部105に送られる。これにより、AE処理部103では、明るさ状況を表す情報に基づく露出制御が実現され、AF処理部105では、合焦状況を表す情報に基づくAF制御が実現される。また、画像認識部109は、入力された画像内の例えば人物の顔の認識、その顔の表情等を認識する機能をも有している。さらに、画像認識部109による明るさ状況や合焦状況、顔等の認識結果を示す情報は、システム制御部113にも送られ、後述する撮影シーンの解析処理や後述するテカリ補正処理やDレンジ補正処理等の階調補正処理の際に利用される。   The image recognition unit 109 receives image data that has been appropriately processed by the image processing unit 108. The image recognizing unit 109 has a function of recognizing the brightness state and the focusing state of the input image. Information representing the brightness status of the image recognized by the image recognition unit 109 is sent to the AE processing unit, and information representing the focusing status is sent to the AF processing unit 105. As a result, the AE processing unit 103 realizes exposure control based on information representing the brightness situation, and the AF processing unit 105 implements AF control based on information representing the focus situation. The image recognition unit 109 also has a function of recognizing, for example, the face of a person in the input image and the facial expression of the face. Further, information indicating the recognition result of the brightness state, the in-focus state, the face, and the like by the image recognition unit 109 is also sent to the system control unit 113, and a shooting scene analysis process described later, a shine correction process described later, and a D range are performed. This is used for gradation correction processing such as correction processing.

フォーマット変換部110は、画像データをDRAM111に記憶するために、画像処理部108で処理された画像データのフォーマット変換を行う。
DRAM111は、高速書き込み・読み出し処理が可能な内蔵メモリの一例であり、画像データの一時的な記憶を行う高速バッファとして、或いは、画像データの圧縮/伸張処理における作業用メモリ等として使用される。
画像記録部112は、撮影画像(静止画や動画等)を記録するメモリカード等の記録媒体とそのインターフェースを有する。
VRAM114は画像表示用のメモリである。
The format conversion unit 110 performs format conversion of the image data processed by the image processing unit 108 in order to store the image data in the DRAM 111.
The DRAM 111 is an example of a built-in memory capable of high-speed writing / reading processing, and is used as a high-speed buffer for temporarily storing image data, or as a working memory in image data compression / decompression processing.
The image recording unit 112 includes a recording medium such as a memory card that records captured images (still images, moving images, and the like) and an interface thereof.
The VRAM 114 is an image display memory.

表示部115は、例えば、LCD(液晶ディスプレイ)等であり、画像の表示や操作補助のための表示、カメラの動作モード等のカメラ状態の表示等を行う他、撮影時には撮影画面と測距領域をも表示可能となされている。この表示部115には、デジタルカメラ100の筐体背面等に設けられているモニタや電子ビューファインダ(EVF)が含まれる。   The display unit 115 is, for example, an LCD (Liquid Crystal Display) or the like, and displays an image, a display for assisting operation, a display of a camera state such as a camera operation mode, and the like. Can also be displayed. The display unit 115 includes a monitor and an electronic viewfinder (EVF) provided on the housing rear surface of the digital camera 100.

メインスイッチ117は、ユーザがデジタルカメラ100の電源のオン/オフを行う際に操作されるスイッチである。デジタルカメラ100は、ユーザによりメインスイッチ117を介して電源オンの指示が入力されると、各部に電源を供給する。
撮影スイッチ118は、レリーズボタンであり、ボタンを押し込む深さに応じた2段階の操作を検出可能となされている。撮影スイッチ118の操作信号は、システム制御部113に送られる。そして、システム制御部113は、撮影スイッチ118のボタンが浅く押し込まれたときには、撮影準備動作として、AE処理部103にAE処理を行わせ、またAF処理部105にAF処理を行わせる。以下、撮影スイッチ118のボタンが浅く押し込まれる操作がなされた状態をSW1押下と表記する。撮影スイッチ118のボタンがSW1押下よりもさらに深く押し込まれた場合、システム制御部113は、各部を制御して本撮影を実行させる。以下、撮影スイッチ118のボタンがSW1押下よりもさらに深く押し込まれる操作がなされた状態を、SW2押下と表記する。
The main switch 117 is a switch operated when the user turns on / off the power of the digital camera 100. When the user inputs a power-on instruction via the main switch 117, the digital camera 100 supplies power to each unit.
The photographing switch 118 is a release button, and can detect a two-step operation corresponding to the depth to which the button is pressed. An operation signal of the photographing switch 118 is sent to the system control unit 113. The system control unit 113 causes the AE processing unit 103 to perform AE processing and causes the AF processing unit 105 to perform AF processing as shooting preparation operations when the button of the shooting switch 118 is pressed in shallow. Hereinafter, the state in which the button of the photographing switch 118 is shallowly pressed is referred to as SW1 pressing. When the button of the shooting switch 118 is pressed deeper than the SW1 is pressed, the system control unit 113 controls each unit to execute main shooting. Hereinafter, the state in which the operation of pressing the button of the photographing switch 118 further deeper than pressing the SW1 is referred to as SW2 pressing.

ここで、本実施形態のデジタルカメラ100の電源オンから撮影がなされるまでの一例の処理を簡単に説明する。先ず、メインスイッチ117に対する電源オンの操作により電源が入ると、デジタルカメラ100は、撮像素子106による撮像を33ms周期等により周期的に行い、その周期的な撮像による撮影画像を表示部115に順次表示させる撮影待機状態となる。その後、撮影スイッチ118へのSW1押下を経てSW2押下による撮影指示がなされると、デジタルカメラ100は、撮像素子106による本撮影処理を行う。そして、デジタルカメラ100は、その本撮影処理による撮影画像データに対して画像処理部108による画像処理を行い、その画像処理後の画像データを画像記録部112に記録させる。その後、デジタルカメラ100は、再び本撮影待機状態に戻る。そして、メインスイッチ117に対する電源オフの操作がなされると、デジタルカメラ100は、各部への電源供給を停止する。   Here, an example of processing from when the digital camera 100 of the present embodiment is turned on until shooting is briefly described. First, when the power is turned on by turning on the power to the main switch 117, the digital camera 100 periodically performs image capturing by the image sensor 106 with a period of 33 ms or the like, and sequentially captures images captured by the periodic image capturing on the display unit 115. The shooting standby state to be displayed is entered. Thereafter, when a shooting instruction is issued by pressing SW2 through SW1 to the shooting switch 118, the digital camera 100 performs a main shooting process by the image sensor 106. Then, the digital camera 100 performs image processing by the image processing unit 108 on the captured image data obtained by the actual shooting processing, and causes the image recording unit 112 to record the image data after the image processing. Thereafter, the digital camera 100 returns to the main photographing standby state again. When the main switch 117 is turned off, the digital camera 100 stops supplying power to each unit.

操作部116は、ユーザにより操作されるボタンやスイッチ、タッチパネル等と、それらボタンやスイッチ、タッチパネル等の操作に応じた信号を生成するインターフェース回路とを有する。具体的には、操作部116は、画像撮影時の露出補正値や絞り値の設定、画像再生時の設定等の各種設定を行うメニュースイッチ、撮影レンズのズーム動作を指示するズームレバー、動作モードの選択スイッチ等を有する。
動作モード選択スイッチは、ユーザが撮影モードと再生モードの切り換え選択を行う際に操作されるスイッチである。撮影モードの中には、例えば全自動モード、風景モード、ポートレートモード、マクロモード、スポーツモードなどの各種撮影モードがあり、ユーザは動作モード選択スイッチの操作を介して、これらの中から所望の撮影モードを選択可能である。これら各種撮影モードの中から所望の撮影モードが選択された場合、システム制御部113は、その選択された撮影モードに応じた撮影条件を設定する。また、システム制御部113は、全自動モードにおいては、例えば画像認識部109による画像認識結果等を基に撮影シーンを解析し、逆光撮影や夜景撮影、風景撮影、ポートレート撮影、マクロ撮影、スポーツ撮影などに適した撮影条件の自動設定を行う。
The operation unit 116 includes buttons, switches, a touch panel, and the like operated by the user, and an interface circuit that generates a signal corresponding to the operation of the buttons, switches, touch panel, and the like. Specifically, the operation unit 116 includes a menu switch for performing various settings such as setting of an exposure correction value and an aperture value at the time of image shooting, a setting at the time of image reproduction, a zoom lever for instructing a zoom operation of the shooting lens, and an operation mode. Selection switch and the like.
The operation mode selection switch is a switch operated when the user selects switching between the shooting mode and the reproduction mode. The shooting modes include various shooting modes such as a fully automatic mode, a landscape mode, a portrait mode, a macro mode, and a sports mode, and the user can select a desired mode from among these by operating the operation mode selection switch. The shooting mode can be selected. When a desired shooting mode is selected from these various shooting modes, the system control unit 113 sets shooting conditions according to the selected shooting mode. Further, in the fully automatic mode, the system control unit 113 analyzes a shooting scene based on, for example, an image recognition result by the image recognition unit 109, and performs backlight shooting, night scene shooting, landscape shooting, portrait shooting, macro shooting, sports, Automatically sets shooting conditions suitable for shooting.

システム制御部113は、図示しないCPU、ROM、RAMを有する。システム制御部113のCPUは、ROMに格納されたプログラムをRAMの作業エリアに展開して実行することにより、デジタルカメラの全体的な動作制御を行う。また、システム制御部113は、撮像素子106の有する複数の撮像駆動モードから何れのモードを使用するかの制御や、前述した各種撮影モードに応じた撮影条件の設定をも行う。   The system control unit 113 includes a CPU, a ROM, and a RAM (not shown). The CPU of the system control unit 113 performs overall operation control of the digital camera by expanding and executing a program stored in the ROM in a work area of the RAM. The system control unit 113 also controls which mode is used from a plurality of imaging drive modes of the imaging element 106 and sets imaging conditions according to the various imaging modes described above.

撮影モードに応じた撮影条件の設定例として、例えば逆光撮影が行われるような場合、システム制御部113は、例えば光源を背にして立つ人物を撮影する場合のような逆光シーンに適したISO感度等の撮影条件を設定する。また例えば、スポーツ撮影が行われるような場合、システム制御部113は、素早く動いている人物等を撮影する場合のようなスポーツシーンに適したシャッタ速度等の撮影条件を設定する。また例えば、ポートレート撮影やマクロ撮影等が行われる場合、システム制御部113は、主被写体にピントを合わせて背景等のボケを多くするようなポートレートシーンやマクロシーンに適した絞り等の撮影条件を設定する。本実施形態によれば、これら撮影条件は、後述するDレンジ拡大補正処理の補正値、テカリ補正処理の補正値を決定する際等にも使用される。   As an example of setting the shooting conditions according to the shooting mode, for example, when backlight shooting is performed, the system control unit 113, for example, ISO sensitivity suitable for a backlight scene such as shooting a person standing with the light source behind. And so on. For example, when sports photography is performed, the system control unit 113 sets photographing conditions such as a shutter speed suitable for a sports scene such as when photographing a person who moves quickly. In addition, for example, when portrait photography or macro photography is performed, the system control unit 113 shoots an aperture suitable for a portrait scene or a macro scene in which the main subject is focused and the background is blurred. Set conditions. According to the present embodiment, these photographing conditions are also used when determining a correction value for a D range expansion correction process and a correction value for a shine correction process, which will be described later.

また、システム制御部113は、画像認識部109による画像認識結果を基に撮影シーンを解析する際には、例えば後述するように、画像の中で画素信号値が飽和する領域の位置又は面積の何れかを求めるような処理を行う。そして、画素信号値が飽和する領域の位置又は面積は、後述するDレンジ拡大補正処理の補正値、テカリ補正処理の補正値を決定する際等に使用される。   Further, when the system control unit 113 analyzes the shooting scene based on the image recognition result by the image recognition unit 109, for example, as described later, the position or area of the region where the pixel signal value is saturated in the image is determined. A process for obtaining either one is performed. The position or area of the region where the pixel signal value is saturated is used when determining a correction value for a D range expansion correction process and a correction value for a shine correction process, which will be described later.

次に、前述の図1に示した構成を有するデジタルカメラ100において実行される、本実施形態に係る階調補正処理について説明する。本実施形態のデジタルカメラ100は、以下に説明する第1の階調補正処理と第2の階調補正処理の2種類の処理の何れか、又はそれら両方を組み合わせた階調補正を実行可能となされている。   Next, the gradation correction processing according to the present embodiment, which is executed in the digital camera 100 having the configuration shown in FIG. 1, will be described. The digital camera 100 according to the present embodiment can execute gradation correction by combining either one of the first gradation correction processing and the second gradation correction processing described below, or a combination of both. Has been made.

<第1の階調補正処理>
第1の階調補正処理は、低輝度の被写体と高輝度の被写体とが混在しているシーンの撮影が行われる場合、露出制御とトーンカーブの設定制御を行うことで、高輝度側が飽和するいわゆる白飛びを抑制するような階調補正処理である。本実施形態では、このような階調補正をダイナミックレンジ拡大補正(Dレンジ拡大補正、又はD+補正)と表記している。また、低輝度の被写体と高輝度の被写体とが混在するシーンは、一例として逆光シーンなどがある。以下、第1の階調補正処理(Dレンジ拡大補正処理)について具体的に説明する。
<First gradation correction processing>
In the first gradation correction process, when shooting a scene in which a low-brightness subject and a high-brightness subject are mixed, exposure control and tone curve setting control are performed to saturate the high-brightness side. This is gradation correction processing that suppresses so-called whiteout. In the present embodiment, such gradation correction is referred to as dynamic range expansion correction (D range expansion correction or D + correction). An example of a scene in which a low-brightness subject and a high-brightness subject are mixed includes a backlight scene. Hereinafter, the first gradation correction process (D range expansion correction process) will be described in detail.

通常、本撮影前には、撮影条件として、絞り値、シャッタ速度、ISO感度等が決定される。このとき、デジタルカメラ100は、本撮影待機状態での撮影画像の輝度情報や画像内の人物の顔の有無等に応じて露出を決定する。ただし、撮像素子のダイナミックレンジは限りがあり、どのように絞り、シャッタ速度、ゲインが設定されても、例えば、光源を背にして立つ人物を撮影する場合のような逆光シーンでは、人物が暗すぎる、あるいは背景が明るすぎる、といったことが起こる。本実施形態では、このように背景が明るすぎる現象を軽減するための処理としてDレンジ拡大補正処理を行う。   Usually, an aperture value, a shutter speed, ISO sensitivity, and the like are determined as shooting conditions before actual shooting. At this time, the digital camera 100 determines the exposure according to the luminance information of the captured image in the actual shooting standby state, the presence or absence of a human face in the image, and the like. However, the dynamic range of the image sensor is limited, and no matter how the aperture, shutter speed, and gain are set, for example, in a backlit scene such as when shooting a person standing with the light source behind, the person is dark. Too much or the background is too bright. In the present embodiment, D range expansion correction processing is performed as processing for reducing the phenomenon that the background is too bright.

図5(a)は、例えば窓際に立つ人物を撮影するような典型的な逆光シーンで撮影が行われた場合の画像500の一例を示した図である。図5(a)のような逆光シーンの画像500の場合、窓の外の景色の領域501の明るさが、人物の領域502に対して明るすぎるため、例えば人物に露出を合わせると、窓の外の領域501(つまり高輝度部分)に白飛びが発生することになる。このため、Dレンジ拡大補正処理では、高輝度部分に白飛びが発生しないように、露出アンダーとなる露出を設定して本撮影を行い、得られた撮影画像データの低輝度部分の輝度を持ち上げるように設定されたトーンカーブ(ガンマ)を用いたガンマ処理を行う。なお、図5(a)の領域503〜505と図5(b)の説明は後述する。   FIG. 5A is a diagram illustrating an example of an image 500 when shooting is performed in a typical backlight scene where a person standing at the window is shot, for example. In the case of the backlight scene image 500 as shown in FIG. 5A, the brightness of the scenery area 501 outside the window is too bright with respect to the person area 502. Whiteout occurs in the outer region 501 (that is, the high luminance portion). For this reason, in the D range enlargement correction process, in order to prevent overexposure in the high-luminance portion, the exposure is set to underexposure, and the main photographing is performed, and the luminance of the low-luminance portion of the obtained captured image data is increased. Gamma processing using the tone curve (gamma) set as described above is performed. The description of the regions 503 to 505 in FIG. 5A and FIG. 5B will be given later.

<第2の階調補正処理>
第2の階調補正処理は、本撮影後の画像の中の飽和領域(白飛び領域)に対して選択的に、画素信号値を低減する階調補正を行うテカリ補正処理である。以下、第2の階調補正処理(テカリ補正処理)について具体的に説明する。
<Second gradation correction processing>
The second gradation correction process is a shine correction process that performs gradation correction that selectively reduces the pixel signal value with respect to a saturated region (out-of-white region) in the image after the main photographing. Hereinafter, the second gradation correction process (shine correction process) will be described in detail.

第1の階調補正処理の説明で述べたような撮像素子のダイナミックレンジの限界により、本撮影された画像の被写体領域等には、部分的に白飛びが発生することがある。例えば、太陽光や照明光の直射を受けた人物の顔では、頬や額等で光が強く反射するいわゆるテカリが発生し、その部分が白飛びしてしまう、といったことが起こる。このようなテカリ現象を軽減するのがテカリ補正処理である。   Due to the limitation of the dynamic range of the image sensor as described in the description of the first gradation correction processing, whiteout may occur partially in the subject area of the actually captured image. For example, on the face of a person who has been directly exposed to sunlight or illumination light, so-called shine is generated in which the light is strongly reflected by the cheeks or the forehead, and the part is whitened. It is the shine correction process that reduces such shine phenomenon.

例えば図5(a)の画像500の場合、照明光等により人物の領域502の中で頬の領域504,505と額の領域503とにテカリが発生している様子が示されている。テカリ補正処理では、先ず、撮影画像から顔等の補正対象領域が選定され、その補正対象領域内の輝度値から白飛びが発生し得る輝度値の領域(白飛び領域)を求める。そして、テカリ補正処理では、その領域の周辺画素の色成分比率を基に、白飛び領域の色成分比率が推定され、その色推定比率に近づくように、白飛び領域の画素信号値を減算する。このような処理によって、白飛びが発生した領域の輝度が下がり、色の階調が復元されて、テカリが軽減されることになる。   For example, in the case of the image 500 of FIG. 5A, a state in which shine is generated in cheek regions 504 and 505 and a forehead region 503 in a person region 502 by illumination light or the like is shown. In the shine correction process, first, a correction target area such as a face is selected from the photographed image, and a brightness value area (whiteout area) where whiteout may occur is determined from the brightness value in the correction target area. In the shine correction process, the color component ratio of the whiteout area is estimated based on the color component ratio of the surrounding pixels in the area, and the pixel signal value of the whiteout area is subtracted so as to approach the color estimation ratio. . By such processing, the brightness of the area where whiteout occurs is lowered, the color gradation is restored, and the shine is reduced.

<階調補正処理の流れ>
次に、本実施形態のデジタルカメラ100において、上述した第1、第2の階調補正処理を用いて、より適切な階調の画像を得るための全体の流れを、図2〜図4のフローチャートを参照しながら説明する。
図2は、デジタルカメラ100において画像の撮影が行われて記録(保存)されるまでの全体の処理の流れを示したフローチャートである。図2のフローチャートに示す各ステップの処理は、例えばシステム制御部113がプログラムに基づいてデジタルカメラ100の各部を制御することにより実現される。以下、図2のフローチャートのステップS201〜S209をS201〜S209と略記する。このことは後述する他のフローチャートにおいても同様とする。
<Flow of gradation correction processing>
Next, in the digital camera 100 of the present embodiment, the overall flow for obtaining an image with a more appropriate gradation using the first and second gradation correction processes described above is shown in FIGS. This will be described with reference to a flowchart.
FIG. 2 is a flowchart showing a flow of the entire process from taking an image in the digital camera 100 to recording (saving). The processing of each step shown in the flowchart of FIG. 2 is realized, for example, when the system control unit 113 controls each unit of the digital camera 100 based on a program. Hereinafter, steps S201 to S209 in the flowchart of FIG. 2 are abbreviated as S201 to S209. The same applies to other flowcharts described later.

図2のフローチャートの処理は、メインスイッチ117にユーザから電源オンの指示が入力され、各部に電源が投入されてデジタルカメラ100が起動し、各種デバイスの初期化及び起動を経たことでスタートする。このときのデジタルカメラ100は、表示部115におけるEVF画像表示等のような撮影準備作業が行われて、前述した撮影待機状態となる。   The process of the flowchart of FIG. 2 starts when a power-on instruction is input from the user to the main switch 117, the power is turned on to each part, the digital camera 100 is activated, and various devices are initialized and activated. At this time, the digital camera 100 is in a shooting standby state as described above after performing shooting preparation work such as EVF image display on the display unit 115.

図2のフローチャートの処理がスタートすると、システム制御部113は、S201において、ユーザにより撮影スイッチ118のSW1押下がなされたか否かを判定する。システム制御部113は、SW1押下がなされていない間(No)はS201の判定を続け、SW1押下がなされたと判定(Yes)した場合にはS202に処理を進める。   When the processing of the flowchart of FIG. 2 starts, the system control unit 113 determines in step S201 whether or not the user has pressed SW1 of the photographing switch 118. The system control unit 113 continues the determination of S201 while SW1 is not pressed (No), and proceeds to S202 when it is determined that SW1 is pressed (Yes).

S202に進むと、システム制御部113は、画像認識部109による画像認識処理の結果(明るさ状況の認識結果)を基に、AE処理部103を介して仮露出値を決定する。このときの仮露出値は、Dレンジ拡大補正処理を考慮しない露出値として決定される。ここで、画像認識部109は、先ず、撮像素子106により得られた撮影画像を、縦方向が24画素で横方向が16画素程度の細かさで複数のブロックに分割し、それぞれのブロック毎の輝度値を求める。次に、画像認識部109は、ブロック毎の輝度値に対し、各ブロックの位置ごとに設定された重みを加重した平均値(加重平均値)を算出する。そして、AE処理部103は、その加重平均値が所定値に近づくような露出値を求め、それを仮露出値として決定する。このような処理によって、画面全体の平均輝度に近い明るさの被写体にとっては適切な露出値が決定されることになる。ただし、例えば前述した逆光シーンのように、被写体が暗く、背景等が明るいシーンの撮影が行われる場合、前述のように決定された仮露出値は、高輝度領域にとっては高すぎる露出値となり、白飛びが発生することがある。S202の後、システム制御部113は、S203に処理を進める。   In step S <b> 202, the system control unit 113 determines a temporary exposure value via the AE processing unit 103 based on the result of the image recognition processing by the image recognition unit 109 (brightness state recognition result). The temporary exposure value at this time is determined as an exposure value not considering the D range expansion correction process. Here, the image recognition unit 109 first divides a captured image obtained by the image sensor 106 into a plurality of blocks with a fineness of about 24 pixels in the vertical direction and about 16 pixels in the horizontal direction. Find the luminance value. Next, the image recognition unit 109 calculates an average value (weighted average value) obtained by weighting the luminance value for each block with a weight set for each block position. Then, the AE processing unit 103 obtains an exposure value whose weighted average value approaches a predetermined value, and determines it as a temporary exposure value. By such processing, an appropriate exposure value is determined for a subject whose brightness is close to the average luminance of the entire screen. However, for example, when shooting a scene where the subject is dark and the background is bright, such as the backlight scene described above, the temporary exposure value determined as described above is an exposure value that is too high for the high-luminance region, Whiteout may occur. After S202, the system control unit 113 advances the process to S203.

S203に進むと、システム制御部113は、Dレンジ拡大補正処理のための補正量を決定する。Dレンジ拡大補正量を決定する際の具体的な処理の内容については、図3のフローチャートにおいて後述する。S203の後、システム制御部113は、S204に処理を進める。   In step S203, the system control unit 113 determines a correction amount for the D range expansion correction process. The details of the processing for determining the D range expansion correction amount will be described later with reference to the flowchart of FIG. After S203, the system control unit 113 advances the process to S204.

S204に進むと、システム制御部113は、AE処理部103を介して本露出値を決定する。本露出値は、S202にて決定した仮露出値に対して、S203にて決定したDレンジ拡大補正量に相当する分だけ下げた露出値として決定される。S204の後、システム制御部113は、S205に処理を進める。   In step S <b> 204, the system control unit 113 determines the main exposure value via the AE processing unit 103. The actual exposure value is determined as an exposure value that is lower than the temporary exposure value determined in S202 by an amount corresponding to the D range expansion correction amount determined in S203. After S204, the system control unit 113 advances the process to S205.

S205に進むと、システム制御部113は、ユーザから撮影スイッチ118のSW2押下がなされたか否かを判定する。システム制御部113は、SW2押下がなされていない間(No)はS205の判定を続け、SW2押下がなされたと判定(Yes)した場合にはS206に処理を進める。   In step S205, the system control unit 113 determines whether the user has pressed SW2 of the shooting switch 118. The system control unit 113 continues the determination of S205 while the SW2 is not pressed (No), and proceeds to S206 when it is determined that the SW2 is pressed (Yes).

S206に進むと、システム制御部113は、S204で決定された本露出値に基づく本撮影を行うように各部を制御する。これにより、撮像素子106からA/D変換部107を介して、本撮影による画像が取得される。例えば、前述した逆光シーンの撮影が行われた場合には、被写体が露出アンダーとなった本撮影画像が取得されることになる。S206の後、システム制御部113は、S207に処理を進める。   In step S206, the system control unit 113 controls each unit so as to perform main photographing based on the main exposure value determined in step S204. As a result, an image obtained by actual photographing is acquired from the image sensor 106 via the A / D converter 107. For example, when the above-described backlight scene is shot, a real shot image in which the subject is underexposed is acquired. After S206, the system control unit 113 advances the process to S207.

S207に進むと、システム制御部113は、画像処理部108にDレンジ拡大補正処理に基づくゲイン補正を行わせる。具体的には、例えば前述した逆光シーンの撮影が行われた場合、画像処理部108では、第1の階調補正処理の説明で述べたように、露出アンダーとなった低輝度領域の輝度を持ち上げるようなトーンカーブを用いたガンマ処理が行われる。S207の後、システム制御部113は、S208に処理を進める。   In step S207, the system control unit 113 causes the image processing unit 108 to perform gain correction based on the D range expansion correction processing. Specifically, for example, when the above-described backlight scene is shot, the image processing unit 108 sets the luminance of the low-brightness region that is underexposed as described in the explanation of the first gradation correction processing. Gamma processing using a tone curve that lifts is performed. After S207, the system control unit 113 advances the process to S208.

S208に進むと、システム制御部113は、画像処理部108を介してテカリ補正処理を行う。テカリ補正処理の具体的な内容については、図4のフローチャートにおいて後述する。S208の後、システム制御部113は、S209に処理を進める。   In step S <b> 208, the system control unit 113 performs a shine correction process via the image processing unit 108. The specific content of the shine correction process will be described later with reference to the flowchart of FIG. After S208, the system control unit 113 advances the process to S209.

S209に進むと、システム制御部113は、S201〜S208までの処理により最終的に得られた本撮影による画像データを、画像記録部112に記録させる。S209の後、システム制御部113は、S201に処理を戻し、次の撮影のための処理に移行する。   In step S209, the system control unit 113 causes the image recording unit 112 to record the image data obtained by the main shooting finally obtained by the processing in steps S201 to S208. After S209, the system control unit 113 returns the process to S201, and proceeds to a process for the next shooting.

<Dレンジ拡大補正量決定フロー>
以下、図2のS203において行われるDレンジ拡大補正量の決定処理について説明する。図3は、システム制御部113による制御の下で行われるDレンジ拡大補正量の決定処理の流れを示すフローチャートである。図2のS203の処理に進むと、システム制御部113は、図3に示すフローチャートの処理をスタートさせる。
<D range expansion correction amount determination flow>
The D range expansion correction amount determination process performed in S203 of FIG. 2 will be described below. FIG. 3 is a flowchart showing the flow of the D range expansion correction amount determination process performed under the control of the system control unit 113. When the processing proceeds to S203 in FIG. 2, the system control unit 113 starts the processing in the flowchart shown in FIG.

S301に進むと、システム制御部113は、画像認識部109による画像認識処理の結果(明るさ状況の認識結果)を基に、白飛びが発生するかどうかの判定処理を行う。このときの画像認識部109は、本撮影待機状態において図2のS202で決定された仮露出値により周期的に撮影された画像毎に、縦方向が24画素で横方向が16画素程度の細かさで複数のブロックに分割する処理を行う。さらに、画像認識部109は、それぞれのブロック毎に、ブロック内の各画素の輝度値の分布(各輝度値の累積頻度)を求める。そして、画像認識部109は、ブロック毎に求めた輝度値の分布において、累積頻度が所定値より多い輝度値が、予め定めた閾値以上の輝度値になっているブロックを、白飛びブロックと判定する。S301の後、システム制御部113は、S302に処理を進める。   In step S <b> 301, the system control unit 113 determines whether or not whiteout occurs based on the result of the image recognition process by the image recognition unit 109 (brightness state recognition result). At this time, the image recognizing unit 109 is fine with 24 pixels in the vertical direction and about 16 pixels in the horizontal direction for each image periodically shot with the temporary exposure value determined in S202 in FIG. Now, a process of dividing into a plurality of blocks is performed. Further, the image recognition unit 109 obtains a distribution of luminance values of each pixel in the block (cumulative frequency of each luminance value) for each block. Then, the image recognizing unit 109 determines that a block in which a luminance value with a cumulative frequency greater than a predetermined value is equal to or greater than a predetermined threshold in the distribution of luminance values obtained for each block is a whiteout block. To do. After S301, the system control unit 113 advances the process to S302.

S302に進むと、システム制御部113は、Dレンジ補正量(D+補正量)を決定する。具体的には、システム制御部113は、先ず、S301で白飛びブロックと判定された各ブロックの面積を合計した面積HL_Area1を求め、その合計面積HL_Area1を、予め設定されている閾値面積と比較する。本実施形態では、Dレンジ補正量決定の際に用いる閾値面積として、下限の面積TH_DpAreaLと上限の面積TH_DpAreaHとが予め設定されている。下限の面積TH_DpAreaLは、上限の面積TH_DpAreaHより小さい面積として設定されている。本実施形態では、下限の面積TH_DpAreaLと上限の面積TH_DpAreaHを用い、下記の式(1)のように合計面積HL_Area1と比較する。
TH_DpAreaL<HL_Area1<TH_DpAreaH 式(1)
In step S302, the system control unit 113 determines a D range correction amount (D + correction amount). Specifically, the system control unit 113 first obtains an area HL_Area1 that is the sum of the areas of each block determined to be a whiteout block in S301, and compares the total area HL_Area1 with a preset threshold area. . In the present embodiment, the lower limit area TH_DpAreaL and the upper limit area TH_DpAreaH are set in advance as threshold areas used in determining the D range correction amount. The lower limit area TH_DpAreaL is set as an area smaller than the upper limit area TH_DpAreaH. In the present embodiment, the lower limit area TH_DpAreaL and the upper limit area TH_DpAreaH are used and compared with the total area HL_Area1 as shown in the following equation (1).
TH_DpAreaL <HL_Area1 <TH_DpAreaH Formula (1)

そして、システム制御部113は、式(1)を満たすとき、S301で白飛びブロックと判定された各ブロックの平均輝度値を基にDレンジ拡大補正量を仮決定する。なお、各ブロックの平均輝度値を基にDレンジ拡大補正量を求める具体的な処理については、特許文献1等に記載されている公知の技術を用いることができ、ここではその詳細な説明は省略する。   When satisfying the expression (1), the system control unit 113 provisionally determines the D range expansion correction amount based on the average luminance value of each block determined to be a whiteout block in S301. For specific processing for obtaining the D range expansion correction amount based on the average luminance value of each block, a known technique described in Patent Document 1 or the like can be used. Omitted.

また、本実施形態の場合、システム制御部113は、例えば合計面積HL_Area1が上限の面積TH_DpAreaH以上であるときにはDレンジ拡大補正量をゼロ(0)とする。同様に、システム制御部113は、合計面積HL_Area1が下限の面積TH_DpAreaL以下であるときにもDレンジ拡大補正量をゼロ(0)とする。なお、Dレンジ拡大補正量がゼロ(0)とは、言い換えるとDレンジ拡大補正処理が行われないことを意味する。これら下限の面積TH_DpAreaL、上限の面積TH_DpAreaHの具体例については後述する図7において説明する。S302の後、システム制御部113は、S303に処理を進める。   In the present embodiment, the system control unit 113 sets the D range expansion correction amount to zero (0) when, for example, the total area HL_Area1 is equal to or larger than the upper limit area TH_DpAreaH. Similarly, the system control unit 113 sets the D range expansion correction amount to zero (0) even when the total area HL_Area1 is equal to or less than the lower limit area TH_DpAreaL. Note that the D range expansion correction amount of zero (0) means that the D range expansion correction processing is not performed. Specific examples of the lower limit area TH_DpAreaL and the upper limit area TH_DpAreaH will be described later with reference to FIG. After S302, the system control unit 113 advances the process to S303.

S303に進むと、システム制御部113は、撮影条件の判定を行う。具体的には、システム制御部113は、図2のS202で決定した仮露出値に基づくISO感度、シャッタ速度、絞りの各値を判定する。S303の後、システム制御部113は、S304に処理を進める。   In step S303, the system control unit 113 determines shooting conditions. Specifically, the system control unit 113 determines ISO sensitivity, shutter speed, and aperture values based on the temporary exposure value determined in S202 of FIG. After S303, the system control unit 113 advances the process to S304.

S304に進むと、システム制御部113は、S303で求めた撮影条件に基づいて、Dレンジ拡大補正量を本決定する。具体的には、システム制御部113は、S302で仮決定したDレンジ拡大補正量が、図6に示す撮影条件毎に設けたDレンジ拡大補正量の上限値を超えている場合、その上限値まで下げた補正量を、本決定したDレンジ拡大補正量として決定する。そして、S304の後、システム制御部113は、図2のS204に処理を進める。   In step S304, the system control unit 113 determines the D range expansion correction amount based on the shooting condition obtained in step S303. Specifically, when the D range expansion correction amount provisionally determined in S302 exceeds the upper limit value of the D range expansion correction amount provided for each shooting condition shown in FIG. 6, the system control unit 113 sets the upper limit value. The correction amount lowered to is determined as the D range expansion correction amount thus determined. After S304, the system control unit 113 advances the process to S204 in FIG.

ここで、図6の例は、撮影条件のISO感度とAPEX(Additive System of Photographic Exposure)表記のDレンジ拡大補正量(D+補正量)との関係を表した図である。一例としてISO感度が「〜100」の場合、D+補正量(APEX段数)の「2.0」が上限値に相当し、S302で仮決定されたDレンジ拡大補正量が「2.0」より大きい場合には「2.0」に下げた値がDレンジ拡大補正量として本決定される。したがってこの例の場合、図2のS204の本露出決定処理では、ISO感度を「〜100」に設定した上で、シャッタ速度と絞り値の少なくとも一方が調整されることによりAPEX表記で「2.0」に相当する補正量が決定される。さらに、図2のS207では、D+拡大補正量(APEX段数)の「2.0」に応じて予め決められているトーンカーブを用いたゲイン制御による補正処理が行われることになる。   Here, the example of FIG. 6 is a diagram showing the relationship between the ISO sensitivity of the imaging condition and the D range expansion correction amount (D + correction amount) expressed in APEX (Additive System of Photographic Exposure). For example, when the ISO sensitivity is “˜100”, “2.0” of the D + correction amount (APEX stage number) corresponds to the upper limit value, and the D range expansion correction amount temporarily determined in S302 is from “2.0”. If it is larger, the value lowered to “2.0” is determined as the D range expansion correction amount. Therefore, in the case of this example, in the main exposure determination process in S204 of FIG. 2, the ISO sensitivity is set to “˜100”, and at least one of the shutter speed and the aperture value is adjusted so that “2. A correction amount corresponding to “0” is determined. Further, in S207 of FIG. 2, correction processing by gain control using a tone curve determined in advance according to “2.0” of D + enlargement correction amount (APEX stage number) is performed.

<テカリ補正処理フロー>
続いて、図2のS208において行われるテカリ補正処理について説明する。図4は、システム制御部113による制御の下で行われるテカリ補正処理の流れを示すフローチャートである。図2のS208の処理に進むと、システム制御部113は、図4に示すフローチャートの処理をスタートさせる。
<Legacy correction processing flow>
Subsequently, the shine correction process performed in S208 of FIG. 2 will be described. FIG. 4 is a flowchart showing the flow of the shine correction process performed under the control of the system control unit 113. When the process proceeds to S208 in FIG. 2, the system control unit 113 starts the process of the flowchart shown in FIG.

S401に進むと、システム制御部113は、画像認識部109による本撮影画像の顔認識結果を基に、本撮影画像中に人物の顔に相当する部分領域(以下、顔領域とする。)があるか否かを判定する。システム制御部113は、S401において、顔領域がないと判定(No)した場合には図4のテカリ補正処理を終了して、図2のS209に処理を進める。一方、システム制御部113は、S401において、顔領域があると判定(Yes)した場合にはS402に処理を進める。   In step S401, the system control unit 113 sets a partial area corresponding to a human face in the main captured image (hereinafter referred to as a face area) based on the face recognition result of the main captured image by the image recognition unit 109. It is determined whether or not there is. If it is determined in S401 that there is no face area (No), the system control unit 113 ends the shine correction process in FIG. 4 and advances the process to S209 in FIG. On the other hand, if the system control unit 113 determines in S401 that there is a face area (Yes), the system control unit 113 advances the process to S402.

S402に進むと、システム制御部113は、画像認識部109を制御して、顔領域の輝度値を算出させる。このときの画像認識部109は、本撮影画像の中の顔領域に含まれる各画素の輝度値を算出する。S402の後、システム制御部113は、S403に処理を進める。   In step S402, the system control unit 113 controls the image recognition unit 109 to calculate the brightness value of the face area. At this time, the image recognition unit 109 calculates the luminance value of each pixel included in the face area in the actual captured image. After S402, the system control unit 113 advances the process to S403.

S403に進むと、システム制御部113は、顔領域の輝度値によるラベリング処理を行う。具体的には、システム制御部113は、S402にて算出された顔領域の各画素について、輝度値が所定値を超えている画素を判定し、その画素を白飛び画素とする。さらに、システム制御部113は、その白飛び画素の上下左右に隣接する各画素についても白飛び画素であるかどうかを判定する。そして、システム制御部113は、それら白飛び画素であると判定された各画素が纏まって存在している領域を、白飛び連結領域として判定してラベリングを行う。S403の後、システム制御部113は、S404に処理を進める。   In step S403, the system control unit 113 performs a labeling process based on the luminance value of the face area. Specifically, the system control unit 113 determines a pixel whose luminance value exceeds a predetermined value for each pixel in the face area calculated in S402, and sets the pixel as a whiteout pixel. Furthermore, the system control unit 113 determines whether each pixel adjacent to the whiteout pixel in the vertical and horizontal directions is also a whiteout pixel. Then, the system control unit 113 performs labeling by determining an area where the pixels determined to be whiteout pixels collectively exist as a whiteout connection area. After S403, the system control unit 113 advances the process to S404.

S404に進むと、システム制御部113は、S403でそれぞれラベリングされた複数の白飛び連結領域について各々の面積を算出する。すなわち、S403の処理とS404の処理によれば、例えば画面全体に散らばった位置関係の各白飛び画素の合計の面積が算出されるのではなく、それぞれが連なって一塊となる位置関係を有した各白飛び画素からなる連結領域毎の面積が求められる。そして、システム制御部113は、それぞれ面積が求められた各白飛び連結領域の中で、面積が最大の領域を選出する。ここでは、この最大の領域の面積をHL_Area2とする。例えば前述の図5(a)の画像500の場合、人物の領域502の中で頬の領域504,505と額の領域503とが、それぞれラベリングされた白飛び連結領域(つまりテカリ領域)として求められる。図5(b)には、図5(a)の画像500の中の人物の領域502を抜き出して示した図である。そして、図5(b)において、白飛び連結領域(テカリ領域)である頬の領域504,505及び額の領域503の三つの領域のうち、面積が最大の領域は、額の領域503である。S404の後、システム制御部113は、S405に処理を進める。   In step S404, the system control unit 113 calculates the area of each of the plurality of whiteout connected regions labeled in step S403. That is, according to the process of S403 and the process of S404, for example, the total area of each white-out pixel in a positional relationship scattered throughout the entire screen is not calculated, but each has a positional relationship in which each is connected together. The area for each connected region composed of each whiteout pixel is obtained. Then, the system control unit 113 selects a region having the maximum area from among the whiteout connection regions whose areas are respectively determined. Here, the area of the maximum region is HL_Area2. For example, in the case of the image 500 shown in FIG. 5A described above, the cheek regions 504 and 505 and the forehead region 503 in the person region 502 are obtained as labeled over-the-border connected regions (that is, shine areas). It is done. FIG. 5B is a diagram showing a person region 502 extracted from the image 500 of FIG. In FIG. 5B, the region having the largest area among the three regions of the cheek regions 504 and 505 and the forehead region 503, which are the whiteout connection regions (shine areas), is the forehead region 503. . After S404, the system control unit 113 advances the process to S405.

S405に進むと、システム制御部113は、テカリ補正量を決定する。具体的には、システム制御部113は、先ず、S404で求めた最大領域の面積HL_Area2を、予め設定されている閾値面積と比較する。本実施形態では、テカリ補正量決定の際に用いる閾値面積として、下限の面積TH_ShAreaLと上限の面積TH_ShAreaHとが予め設定されている。下限の面積TH_ShAreaLは、上限の面積TH_ShAreaHよりも小さい面積となされている。本実施形態では、下限の面積TH_ShAreaLと上限の面積TH_ShAreaHとを用い、下記の式(2)のように最大領域の面積HL_Area2と比較する。
TH_ShAreaL<HL_Area2<TH_ShAreaH 式(2)
In step S405, the system control unit 113 determines a correction amount. Specifically, the system control unit 113 first compares the area HL_Area2 of the maximum region obtained in S404 with a preset threshold area. In the present embodiment, the lower limit area TH_ShAreaL and the upper limit area TH_ShAreaH are set in advance as threshold areas used in determining the shine correction amount. The lower limit area TH_ShAreaL is smaller than the upper limit area TH_ShAreaH. In this embodiment, the lower limit area TH_ShAreaL and the upper limit area TH_ShAreaH are used and compared with the area HL_Area2 of the maximum region as shown in the following equation (2).
TH_ShAreaL <HL_Area2 <TH_ShAreaH Formula (2)

そして、システム制御部113は、式(2)を満たすとき、白飛び連結領域の平均輝度値を基にテカリ補正量を決定する。なお、白飛びしている領域の輝度値に基づくテカリ補正量は、特許文献2等に記載されている公知の技術を用いて求めることができ、ここではその詳細な説明は省略する。   Then, when satisfying the expression (2), the system control unit 113 determines the shine correction amount based on the average luminance value of the over-connected region. Note that the shine correction amount based on the brightness value of the overexposed region can be obtained using a known technique described in Patent Document 2 and the like, and detailed description thereof is omitted here.

また、本実施形態の場合、システム制御部113は、例えば最大領域の面積HL_Area2が上限の面積TH_ShAreaH以上であるときにはテカリ補正量をゼロ(0)とする。同様に、システム制御部113は、最大領域の面積HL_Area2が下限の面積TH_ShAreaL以下であるときにもテカリ補正量をゼロ(0)とする。テカリ補正量がゼロ(0)とは、言い換えるとテカリ補正処理が行われないことを意味する。これら下限の面積TH_ShAreaL、上限の面積TH_ShAreaHの具体例については後述する図7において説明する。   In the present embodiment, the system control unit 113 sets the shine correction amount to zero (0) when, for example, the area HL_Area2 of the maximum region is equal to or larger than the upper limit area TH_ShAreaH. Similarly, the system control unit 113 sets the shine correction amount to zero (0) when the area HL_Area2 of the maximum region is equal to or smaller than the lower limit area TH_ShAreaL. If the shine correction amount is zero (0), in other words, the shine correction process is not performed. Specific examples of the lower limit area TH_ShAreaL and the upper limit area TH_ShAreaH will be described later with reference to FIG.

ここで、本実施形態の場合、前述したように、Dレンジ拡大補正量の算出時には、閾値面積として下限の面積TH_DpAreaLと上限の閾値TH_DpAreaHとが用いられている。また、テカリ補正量の算出時には、閾値面積として下限の面積TH_ShAreaLと上限の面積TH_ShAreaHとが用いられている。本実施形態において、これらDレンジ拡大補正量とテカリ補正量の算出時に使用される各閾値面積は、下記の式(3)のような関係を有している。
TH_ShAreaL<TH_DpAreaL
TH_ShAreaH<TH_DpAreaH
TH_DpAreaL<TH_ShAreaH 式(3)
In this embodiment, as described above, when calculating the D range expansion correction amount, the lower limit area TH_DpAreaL and the upper limit threshold TH_DpAreaH are used as the threshold areas. Further, when calculating the shine correction amount, the lower limit area TH_ShAreaL and the upper limit area TH_ShAreaH are used as threshold areas. In the present embodiment, each threshold area used when calculating the D range expansion correction amount and the shine correction amount has a relationship as shown in the following equation (3).
TH_ShAreaL <TH_DpAreaL
TH_ShAreaH <TH_DpAreaH
TH_DpAreaL <TH_ShAreaH Formula (3)

図7は、これらDレンジ拡大補正量とテカリ補正量の算出時に使用される各閾値面積の関係を説明する図である。なお、図7では、各閾値面積の大小関係を判り易くするため、それぞれの閾値面積は、画像全体における面積比率に換算して表している。図7に示すように、テカリ補正処理が行われる範囲は、下限の面積TH_ShAreaLから上限の面積TH_ShAreaHまでの範囲であり、画像全体の面積比率に換算すると例えば1%から5%までの範囲となされている。また、Dレンジ拡大補正処理が行われる範囲は、下限の面積TH_DpAreaLから上限の面積TH_DpAreaHまでの範囲であり、画像全体の面積比率に換算すると例えば3%から30%までの範囲となされている。このように、テカリ補正量算出時の下限の面積TH_ShAreaLは、Dレンジ拡大補正量算出時の下限の面積TH_DpAreaLよりも、面積比率に換算して小さい値となされている。一方、テカリ補正量算出時の上限の面積TH_ShAreaHは、Dレンジ拡大補正量算出時の下限の面積TH_DpAreaLよりも、面積比率に換算して大きい値となされている。さらに、テカリ補正量算出時の上限の面積TH_ShAreaHは、Dレンジ拡大補正量算出時の上限の面積TH_DpAreaHよりも、面積比率に換算して小さい値となされている。これらのことから、画像全体の面積比率に換算した1%から3%までの範囲ではテカリ補正処理のみが行われ、5%から30%までの範囲ではDレンジ拡大補正処理のみが行われる。一方、画像全体の面積比率に換算した3%から5%までの範囲ではDレンジ拡大補正処理とテカリ補正処理の双方が行われる。なお、画像全体の面積比率に換算した0%から1%以下の範囲、及び、30%以上から100%までの範囲では、テカリ補正処理とDレンジ拡大補正処理の双方とも補正量はゼロ(0)となされ、何れの補正処理も行われない。   FIG. 7 is a diagram for explaining the relationship between each threshold area used when calculating the D range expansion correction amount and the shine correction amount. In FIG. 7, each threshold area is expressed as an area ratio in the entire image in order to easily understand the magnitude relationship between the threshold areas. As shown in FIG. 7, the range in which the shine correction process is performed is a range from the lower limit area TH_ShAreaL to the upper limit area TH_ShAreaH, and is converted to an area ratio of the entire image, for example, from 1% to 5%. ing. Further, the range in which the D range expansion correction process is performed is a range from the lower limit area TH_DpAreaL to the upper limit area TH_DpAreaH, which is, for example, a range from 3% to 30% when converted to the area ratio of the entire image. Thus, the lower limit area TH_ShAreaL at the time of calculating the shine correction amount is smaller than the lower limit area TH_DpAreaL at the time of calculating the D range expansion correction amount in terms of the area ratio. On the other hand, the upper limit area TH_ShAreaH at the time of calculating the shine correction amount is larger than the lower limit area TH_DpAreaL at the time of calculating the D range expansion correction amount in terms of an area ratio. Furthermore, the upper limit area TH_ShAreaH at the time of calculating the correction amount is smaller than the upper limit area TH_DpAreaH at the time of calculating the D range expansion correction amount. For these reasons, only the shine correction process is performed in the range from 1% to 3% converted to the area ratio of the entire image, and only the D range expansion correction process is performed in the range from 5% to 30%. On the other hand, in the range from 3% to 5% converted to the area ratio of the entire image, both the D range expansion correction process and the shine correction process are performed. In the range from 0% to 1% or less converted to the area ratio of the entire image, and from 30% to 100%, the correction amount is zero (0) in both the shine correction process and the D range expansion correction process. No correction processing is performed.

図4のフローチャートに説明を戻す。S405の後、システム制御部113は、S406に処理を進める。
S406に進むと、システム制御部113は、画像処理部108を制御し、テカリ補正処理を行わせる。この場合、画像処理部108では、第2の階調補正処理の説明で述べたように、飽和領域(白飛び領域)に対して選択的に画素信号値を低減する階調補正、つまりテカリ補正処理を行う。そして、S406の後、システム制御部113は、図2のS209に処理を進める。
Returning to the flowchart of FIG. After S405, the system control unit 113 advances the process to S406.
In step S406, the system control unit 113 controls the image processing unit 108 to perform a shine correction process. In this case, in the image processing unit 108, as described in the description of the second gradation correction process, gradation correction that selectively reduces the pixel signal value with respect to the saturation region (out-of-white region), that is, shine correction. Process. Then, after S406, the system control unit 113 advances the processing to S209 in FIG.

<シャッタ速度の撮影条件に応じたDレンジ拡大補正量の決定処理例>
前述した図6では、ISO感度の撮影条件に応じたDレンジ拡大補正量の決定例を説明したが、例えばシャッタ速度の撮影条件に応じて、Dレンジ拡大補正量とテカリ補正量を決定してもよい。一般的に、シャッタ速度が遅くなるほど、被写体像がブレやすくなる。被写体像にブレがある場合、図4で説明したテカリ補正におけるS401の顔認識結果の精度が落ち、顔とは異なる位置が顔領域として検出されたり、所望の顔が検出されなかったりする場合があり、テカリ補正の補正精度が落ちる可能性がある。一方で、Dレンジ拡大補正では画像全体に対する処理が行われ、テカリ補正の場合のような領域処理は行われないため、被写体像にブレがあっても所望の補正が可能である。したがって、撮影条件のシャッタ速度が遅くなるほど、Dレンジ拡大補正による補正量を大きく設定し、一方、テカリ補正による補正量を小さく設定する、という決定方法をとってもよい。なお、この例の場合、シャッタ速度の撮影条件に応じたテカリ補正の補正量の決定は、例えば図4のS405において行われる。この方法を用いた場合、シャッタ速度が遅く、被写体像にブレが生じる可能性がある場合に、顔とは異なる位置の領域に対してテカリ補正処理を施してしまうような誤補正が生ずるのを抑制可能となる。
<D-Range Expansion Correction Amount Determination Example According to Shutter Speed Shooting Conditions>
In FIG. 6 described above, the example of determining the D range expansion correction amount according to the ISO sensitivity shooting condition has been described. However, for example, the D range expansion correction amount and the shine correction amount are determined according to the shutter speed shooting condition. Also good. In general, the slower the shutter speed, the more easily the subject image is blurred. When the subject image is blurred, the accuracy of the face recognition result in S401 in the shine correction described with reference to FIG. 4 may be reduced, and a position different from the face may be detected as a face area, or a desired face may not be detected. Yes, there is a possibility that the correction accuracy of the shine correction will decrease. On the other hand, in the D range expansion correction, the entire image is processed, and the area processing as in the case of the shine correction is not performed. Therefore, a desired correction is possible even if the subject image is blurred. Therefore, a determination method may be used in which the correction amount by the D range expansion correction is set to be larger and the correction amount by the shine correction is set to be smaller as the shutter speed of the photographing condition is slower. In the case of this example, the determination of the correction amount for the correction according to the shooting condition of the shutter speed is performed in S405 of FIG. 4, for example. When this method is used, when the shutter speed is slow and there is a possibility that the subject image may be blurred, an erroneous correction such as applying a shine correction process to an area at a position different from the face occurs. It becomes possible to suppress.

<絞りの撮影条件に応じたDレンジ拡大補正量の決定処理例>
また、Dレンジ拡大補正量は、絞り値の撮影条件に応じて決定されてもよい。一般的に、絞り値を開放側に設定するほど、被写界深度が浅くなり、ピント合焦位置以外の被写体はボケ易くなる。ピント合焦位置が被写体から外れている場合、図4で説明したテカリ補正におけるS401の顔認識結果の精度が落ち、顔とは異なる位置が顔領域として検出されたり、所望の顔が検出されなかったりする場合があり、テカリ補正の補正精度が落ちる可能性がある。一方で、Dレンジ拡大補正においては、テカリ補正の場合のような領域処理は行われないため、被写体像がボケていても所望の補正が可能である。したがって、撮影条件の絞り値が開放側に設定されるほど、Dレンジ拡大補正による補正量を大きく設定し、一方、テカリ補正による補正量を小さく設定する、という決定方法をとってもよい。なお、この例の場合、絞り値の撮影条件に応じたテカリ補正の補正量の決定は、例えば図4のS405において行われる。この方法を用いた場合、絞りのf値が小さく(開放側の絞り値)、被写界深度が浅くなって、被写体からピントが外れる可能性が高くなる場合に、顔とは異なる位置の領域に対してテカリ補正処理を施してしまうような誤補正が生ずるのを抑制可能となる。
<D-Range Expansion Correction Amount Determination Processing Example According to Aperture Shooting Conditions>
Further, the D range expansion correction amount may be determined according to the photographing condition of the aperture value. Generally, as the aperture value is set to the open side, the depth of field becomes shallower, and subjects other than the in-focus position are more easily blurred. When the in-focus position is out of the subject, the accuracy of the face recognition result in S401 in the shine correction described with reference to FIG. 4 is reduced, and a position different from the face is detected as a face area, or a desired face is not detected. There is a possibility that the correction accuracy of the shine correction may be reduced. On the other hand, in the D range expansion correction, since the area processing as in the case of the shine correction is not performed, a desired correction can be performed even if the subject image is blurred. Therefore, a determination method may be used in which the correction amount by the D range expansion correction is set to be larger and the correction amount by the shine correction is set to be smaller as the aperture value of the shooting condition is set to the open side. In the case of this example, the determination of the correction amount of the shine correction according to the shooting condition of the aperture value is performed in S405 of FIG. 4, for example. When this method is used, an area at a position different from the face when the f value of the aperture is small (the aperture value on the open side), the depth of field becomes shallow, and the possibility that the subject is out of focus increases. Therefore, it is possible to suppress the occurrence of erroneous correction that causes the shine correction process.

以上説明したように、本実施形態のデジタルカメラ100においては、撮影条件に応じて、Dレンジ拡大補正とテカリ補正の少なくとも何れかの補正量を決定している。例えば、Dレンジ拡大補正量は、ISO感度に応じて設けた上限を超えない範囲の補正量として決定可能である。本実施形態の場合、例えば図6に示したように、S/Nの低下が顕著であるISO感度が高い場合に、Dレンジ拡大補正量が低くなるように設定されていることで、ノイズの増加を抑制することができる。一方、Dレンジ拡大補正量が低くなると、本撮影画像の輝度は高くなる。この場合は、前述したように、白飛び連結領域の平均輝度が高くなるため、テカリ補正の補正量が高くなり、白飛びを抑制した画像が得られることになる。   As described above, in the digital camera 100 of the present embodiment, the correction amount of at least one of the D range expansion correction and the shine correction is determined according to the shooting conditions. For example, the D range expansion correction amount can be determined as a correction amount in a range that does not exceed the upper limit set according to the ISO sensitivity. In the case of the present embodiment, for example, as shown in FIG. 6, when the ISO sensitivity with a significant decrease in S / N is high, the D range expansion correction amount is set to be low, thereby reducing noise. Increase can be suppressed. On the other hand, when the D range expansion correction amount decreases, the brightness of the captured image increases. In this case, as described above, since the average brightness of the whiteout connection area is high, the correction amount of the shine correction is high, and an image in which whiteout is suppressed is obtained.

また、本実施形態においては、前述したように、撮影画像の認識処理結果に基づいてDレンジ拡大補正量とテカリ補正量が決定されており、特にテカリ補正については、白飛び連結領域の面積が所定の面積を超えない範囲で、処理が行われるようになっている。本実施形態では、前述したように、テカリ補正処理を行う白飛び連結領域に対する面積の閾値範囲を小さめに設定し、Dレンジ拡大補正を行う際の面積の閾値範囲を大きめに設定していることで、以下のような効果が得られる。すなわち、白飛び連結領域の面積が比較的小さい場合には、テカリ補正処理が優先的に行われるため、Dレンジ拡大補正によるノイズの増加を抑制できる。一方、白飛び連結領域の面積が比較的大きい場合は、テカリ補正処理は行われず、Dレンジ拡大補正処理が優先的に行われるため、テカリ補正処理を大きな領域に対して行うことによる不自然な処理跡が目立たない、自然な階調補正を実現することができる。   Further, in the present embodiment, as described above, the D range expansion correction amount and the shine correction amount are determined based on the recognition processing result of the photographed image. Processing is performed within a range not exceeding a predetermined area. In the present embodiment, as described above, the area threshold range for the whiteout connected region where the shine correction processing is performed is set to be small, and the area threshold range when performing the D range expansion correction is set to be large. Thus, the following effects can be obtained. In other words, when the area of the whiteout connection region is relatively small, the shine correction process is preferentially performed, so that an increase in noise due to the D range expansion correction can be suppressed. On the other hand, when the area of the whiteout connection area is relatively large, the shine correction process is not performed, and the D range expansion correction process is preferentially performed. Therefore, it is unnatural due to performing the shine correction process on a large area. It is possible to realize natural gradation correction in which the processing trace is not conspicuous.

なお、前述した例以外の条件を用いて、Dレンジ拡大補正量とテカリ補正量を決定する方法も考えられる。例えば、テカリ補正では、前述の通り、白飛びしている画素の連結を判定し、各画素の信号値を減算する処理を行うため、補正対象領域が大きいほど処理時間が長くなる。そのため、顔などの重要度の高い特定の領域のみを処理対象とするような方法を用いるようにする。この方法によれば、処理時間の短縮が可能となる。一方で、Dレンジ拡大補正処理は、露出制御と画像全体で一律のガンマ処理を行う処理であるため、補正領域の大小は処理時間に影響しない。そこで、顔を除く他の領域に白飛びが多く発生しているほど、Dレンジ拡大補正量を大きくし、一方で、テカリ補正量を小さく設定する方法を用いるようにする。このように白飛びが多く発生している領域の位置に応じて補正量を設定することによって、必要な階調補正を行いつつ、Dレンジ拡大補正による過大なS/Nの低下を抑制する効果が得られる。   A method of determining the D range expansion correction amount and the shine correction amount using conditions other than the above-described example is also conceivable. For example, in the shine correction, as described above, since the process of determining the connection of the overexposed pixels and subtracting the signal value of each pixel is performed, the larger the correction target area, the longer the processing time. For this reason, a method in which only a specific area having a high importance such as a face is set as a processing target is used. According to this method, the processing time can be shortened. On the other hand, since the D range expansion correction process is a process for performing exposure control and uniform gamma processing for the entire image, the size of the correction area does not affect the processing time. Therefore, a method of increasing the D range enlargement correction amount and setting the shine correction amount to a smaller value as more whiteout occurs in other areas except the face is used. By setting the correction amount according to the position of the region where a lot of whiteout occurs in this way, the effect of suppressing an excessive decrease in S / N due to the D range expansion correction while performing the necessary gradation correction Is obtained.

<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記録媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、本発明は、上述の実施形態の各機能は回路(例えばASIC)とプログラムとの協働により実現することも可能である。
<Other embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a recording medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. In the present invention, each function of the above-described embodiment can be realized by cooperation of a circuit (for example, ASIC) and a program.

上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

100 撮像装置、102 絞り及びシャッタ、103 AE処理部、104 フォーカスレンズ、105 AF処理部、106 撮像素子、108 画像処理部、109 画像認識部、113 システム制御部、116 操作部、118 撮影スイッチ   DESCRIPTION OF SYMBOLS 100 Imaging device, 102 Aperture and shutter, 103 AE processing part, 104 Focus lens, 105 AF processing part, 106 Imaging element, 108 Image processing part, 109 Image recognition part, 113 System control part, 116 Operation part, 118 Shooting switch

Claims (15)

撮影した画像の画素信号値の飽和を抑制する階調補正を行う撮像装置であって、
露出制御と、前記画像の画素信号値に対するゲイン制御とを組み合わせた第1の階調補正を行う第1の補正手段と、
前記画像の画素信号値が所定値よりも高い領域の画素信号値を低減する第2の階調補正を行う第2の補正手段と、
撮影条件に応じて、前記第1の階調補正に用いる第1の補正量と前記第2の階調補正に用いる第2の補正量とを決定する決定手段と、
を有することを特徴とする撮像装置。
An imaging apparatus that performs gradation correction that suppresses saturation of pixel signal values of a captured image,
First correction means for performing first gradation correction that combines exposure control and gain control for the pixel signal value of the image;
Second correction means for performing second gradation correction for reducing pixel signal values in a region where the pixel signal value of the image is higher than a predetermined value;
Determining means for determining a first correction amount used for the first gradation correction and a second correction amount used for the second gradation correction according to a photographing condition;
An imaging device comprising:
前記撮影条件は、ISO感度、シャッタ速度、絞り値のうち少なくとも何れかを含むことを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the photographing condition includes at least one of ISO sensitivity, shutter speed, and aperture value. 前記決定手段は、
前記画像の本撮影が行われる前の撮影待機状態で取得した画像を基に仮露出値を決定し、
前記仮露出値の撮影待機状態で取得される画像の輝度に基づいて前記本撮影に対する前記第1の補正量を仮決定し、
前記仮決定した第1の補正量が、前記撮影条件のISO感度に応じて設定された上限値を超えている場合には、前記上限値まで下げた補正量を、本決定した前記第1の補正量とし、
前記第1の補正手段は、前記本決定された第1の補正量に基づき前記第1の階調補正を行うことを特徴とする請求項1又は2に記載の撮像装置。
The determining means includes
Determine the temporary exposure value based on the image acquired in the shooting standby state before the actual shooting of the image,
Tentatively determining the first correction amount for the main shooting based on the luminance of the image acquired in the shooting standby state of the temporary exposure value;
When the temporarily determined first correction amount exceeds the upper limit value set in accordance with the ISO sensitivity of the photographing condition, the correction amount lowered to the upper limit value is set to the first determined amount. As a correction amount,
3. The imaging apparatus according to claim 1, wherein the first correction unit performs the first gradation correction based on the first correction amount determined in the main.
前記決定手段は、前記撮影条件として設定されたシャッタ速度が遅くなるほど、前記第2の補正量を小さい補正量に決定することを特徴とする請求項1又は2に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the determination unit determines the second correction amount to be a smaller correction amount as the shutter speed set as the photographing condition becomes slower. 前記決定手段は、前記撮影条件として設定されたシャッタ速度が遅くなるほど、前記第1の補正量を大きい補正量に決定することを特徴とする請求項4に記載の撮像装置。   The imaging apparatus according to claim 4, wherein the determination unit determines the first correction amount to be a larger correction amount as the shutter speed set as the photographing condition becomes slower. 前記決定手段は、前記撮影条件として設定された絞り値が小さい値になるほど、前記第2の補正量を小さい補正量に決定することを特徴とする請求項1又は2に記載の撮像装置。   3. The imaging apparatus according to claim 1, wherein the determination unit determines the second correction amount to be a smaller correction amount as the aperture value set as the imaging condition becomes smaller. 前記決定手段は、前記撮影条件として設定された絞り値が小さい値になるほど、前記第1の補正量を大きい補正量に決定することを特徴とする請求項6に記載の撮像装置。   The imaging apparatus according to claim 6, wherein the determination unit determines the first correction amount to be a larger correction amount as the aperture value set as the photographing condition becomes smaller. 撮影した画像の画素信号値の飽和を抑制する階調補正を行う撮像装置であって、
露出制御と、前記画像の画素信号値に対するゲイン制御とを組み合わせた第1の階調補正を行う第1の補正手段と、
前記画像の画素信号値が所定値よりも高い領域の画素信号値を低減する第2の階調補正を行う第2の補正手段と、
撮影シーンを解析する解析手段と、
前記解析の結果に基づいて、前記第1の階調補正に用いる第1の補正量と前記第2の階調補正に用いる第2の補正量とを決定する決定手段と、
を有することを特徴とする撮像装置。
An imaging apparatus that performs gradation correction that suppresses saturation of pixel signal values of a captured image,
First correction means for performing first gradation correction that combines exposure control and gain control for the pixel signal value of the image;
Second correction means for performing second gradation correction for reducing pixel signal values in a region where the pixel signal value of the image is higher than a predetermined value;
An analysis means for analyzing the shooting scene;
Determining means for determining a first correction amount used for the first gradation correction and a second correction amount used for the second gradation correction based on the result of the analysis;
An imaging device comprising:
前記解析手段による前記解析は、前記撮影シーンにおける画素信号値の飽和する領域の位置又は面積の何れかを求める処理を含むことを特徴とする請求項8に記載の撮像装置。   The imaging apparatus according to claim 8, wherein the analysis by the analysis unit includes a process of obtaining either a position or an area of a region where a pixel signal value is saturated in the shooting scene. 前記決定手段は、
前記画素信号値の飽和する領域の面積が予め定められた第1の面積より大きい場合には前記第1の階調補正を行うことを決定し、
前記画素信号値の飽和する領域の面積が予め定められた第2の面積より大きい場合には前記第2の階調補正を行うことを決定し、
前記第1の面積は前記第2の面積より大きい面積であることを特徴とする請求項9に記載の撮像装置。
The determining means includes
When the area of the region where the pixel signal value is saturated is larger than a predetermined first area, it is determined that the first gradation correction is performed,
When the area of the region where the pixel signal value is saturated is larger than a predetermined second area, it is determined to perform the second gradation correction,
The imaging apparatus according to claim 9, wherein the first area is larger than the second area.
前記決定手段は、前記画素信号値の飽和する領域の面積が第3の面積より大きい場合には、前記第2の階調補正を行わず、前記第1の階調補正を行うように決定し、
前記第3の面積は前記第2の面積より大きい面積であることを特徴とする請求項10に記載の撮像装置。
The determining unit determines to perform the first gradation correction without performing the second gradation correction when the area of the region where the pixel signal value is saturated is larger than a third area. ,
The imaging apparatus according to claim 10, wherein the third area is larger than the second area.
前記決定手段は、
前記画素信号値の飽和する領域の面積が予め定められた前記第1の面積から第4の面積までの範囲である場合に前記第1の階調補正を行うことを決定し、
前記画素信号値の飽和する領域の面積が予め定められた前記第2の面積から第3の面積までの範囲である場合に前記第2の階調補正を行うことを決定し、
前記第4の面積は前記第3の面積より大きい面積であり、前記第3の面積は前記第1の面積より大きい面積であることを特徴とする請求項10又は11に記載の撮像装置。
The determining means includes
Determining that the first gradation correction is performed when the area of the region where the pixel signal value is saturated is a predetermined range from the first area to the fourth area;
Determining that the second gradation correction is performed when the area of the region where the pixel signal value is saturated is a predetermined range from the second area to the third area;
The imaging device according to claim 10 or 11, wherein the fourth area is larger than the third area, and the third area is larger than the first area.
撮影した画像の画素信号値の飽和を抑制する階調補正を行う撮像装置の制御方法であって、
撮影条件に応じて、第1の階調補正に用いる第1の補正量と、第2の階調補正に用いる第2の補正量とを、決定する決定工程と、
露出制御と、前記画像の画素信号値に対するゲイン制御とを組み合わせた前記第1の階調補正を、前記第1の補正量を用いて行う第1の補正工程と、
前記画像の画素信号値が所定値よりも高い領域の画素信号値を低減する前記第2の階調補正を、前記第2の補正量を用いて行う第2の補正工程と、
を有することを特徴とする制御方法。
A method for controlling an imaging apparatus that performs gradation correction that suppresses saturation of pixel signal values of a captured image,
A determination step of determining a first correction amount used for the first gradation correction and a second correction amount used for the second gradation correction according to the shooting conditions;
A first correction step of performing the first gradation correction using exposure control and gain control on the pixel signal value of the image using the first correction amount;
A second correction step in which the second gradation correction for reducing the pixel signal value in a region where the pixel signal value of the image is higher than a predetermined value is performed using the second correction amount;
A control method characterized by comprising:
撮影した画像の画素信号値の飽和を抑制する階調補正を行う撮像装置の制御方法であって、
撮影シーンを解析する解析工程と、
前記解析の結果に基づいて、第1の階調補正に用いる第1の補正量と、第2の階調補正に用いる第2の補正量とを、決定する決定工程と、
露出制御と、前記画像の画素信号値に対するゲイン制御とを組み合わせた前記第1の階調補正を、前記第1の補正量を用いて行う第1の補正工程と、
前記画像の画素信号値が所定値よりも高い領域の画素信号値を低減する前記第2の階調補正を、前記第2の補正量を用いて行う第2の補正工程と、
を有することを特徴とする制御方法。
A method for controlling an imaging apparatus that performs gradation correction that suppresses saturation of pixel signal values of a captured image,
An analysis process for analyzing the shooting scene;
A determination step of determining a first correction amount used for the first gradation correction and a second correction amount used for the second gradation correction based on the result of the analysis;
A first correction step of performing the first gradation correction using exposure control and gain control on the pixel signal value of the image using the first correction amount;
A second correction step in which the second gradation correction for reducing the pixel signal value in a region where the pixel signal value of the image is higher than a predetermined value is performed using the second correction amount;
A control method characterized by comprising:
撮像装置が有するコンピュータを、請求項1乃至12の何れか1項に記載の撮像装置の各手段として機能させるためのプログラム。   The program for functioning the computer which an imaging device has as each means of the imaging device of any one of Claims 1 thru | or 12.
JP2016242163A 2016-12-14 2016-12-14 Imaging device, control method and program of imaging device Active JP6873679B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016242163A JP6873679B2 (en) 2016-12-14 2016-12-14 Imaging device, control method and program of imaging device
US15/834,509 US10271029B2 (en) 2016-12-14 2017-12-07 Image pickup apparatus and method of controlling an image pickup apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016242163A JP6873679B2 (en) 2016-12-14 2016-12-14 Imaging device, control method and program of imaging device

Publications (3)

Publication Number Publication Date
JP2018098670A true JP2018098670A (en) 2018-06-21
JP2018098670A5 JP2018098670A5 (en) 2020-01-30
JP6873679B2 JP6873679B2 (en) 2021-05-19

Family

ID=62489939

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016242163A Active JP6873679B2 (en) 2016-12-14 2016-12-14 Imaging device, control method and program of imaging device

Country Status (2)

Country Link
US (1) US10271029B2 (en)
JP (1) JP6873679B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021093608A (en) * 2019-12-09 2021-06-17 国立大学法人 鹿児島大学 Image quality adjustment device, image quality adjustment method, and program

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11240439B2 (en) * 2018-12-20 2022-02-01 Canon Kabushiki Kaisha Electronic apparatus and image capture apparatus capable of detecting halation, method of controlling electronic apparatus, method of controlling image capture apparatus, and storage medium
JP6726324B1 (en) * 2019-01-17 2020-07-22 オリンパス株式会社 Imaging device, image synthesizing method, and image synthesizing program
CN113686260B (en) * 2021-10-25 2022-07-26 成都众柴科技有限公司 Large-span beam deflection monitoring method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001203933A (en) * 2000-01-19 2001-07-27 Hitachi Ltd Image pickup device
JP2013236364A (en) * 2012-04-11 2013-11-21 Canon Inc Image capture apparatus and method of controlling the same

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3480446B2 (en) * 2001-01-11 2003-12-22 ミノルタ株式会社 Digital camera
JP2003121732A (en) * 2001-10-18 2003-04-23 Minolta Co Ltd Digital camera
US8270753B2 (en) * 2005-06-14 2012-09-18 Nikon Corporation Image processing device, computer program product, and image processing method to restore signals in a saturated area
US20090040364A1 (en) * 2005-08-08 2009-02-12 Joseph Rubner Adaptive Exposure Control
JP4516503B2 (en) * 2005-09-07 2010-08-04 富士フイルム株式会社 Imaging system and control method thereof
JP2010183461A (en) 2009-02-06 2010-08-19 Canon Inc Image capturing apparatus and method of controlling the same
JP5713752B2 (en) * 2011-03-28 2015-05-07 キヤノン株式会社 Image processing apparatus and control method thereof
CN106797453B (en) * 2014-07-08 2018-12-07 富士胶片株式会社 Image processing apparatus, photographic device, image processing method and image processing program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001203933A (en) * 2000-01-19 2001-07-27 Hitachi Ltd Image pickup device
JP2013236364A (en) * 2012-04-11 2013-11-21 Canon Inc Image capture apparatus and method of controlling the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021093608A (en) * 2019-12-09 2021-06-17 国立大学法人 鹿児島大学 Image quality adjustment device, image quality adjustment method, and program

Also Published As

Publication number Publication date
US10271029B2 (en) 2019-04-23
US20180167594A1 (en) 2018-06-14
JP6873679B2 (en) 2021-05-19

Similar Documents

Publication Publication Date Title
KR102376901B1 (en) Imaging control method and imaging device
WO2019183813A1 (en) Image capture method and device
JP5249077B2 (en) Imaging apparatus and image processing method
JP2016005203A (en) Image processing system and control method of the same
JP6077853B2 (en) Imaging apparatus, control method therefor, program, and storage medium
CN110430370B (en) Image processing method, image processing device, storage medium and electronic equipment
JP4999871B2 (en) Imaging apparatus and control method thereof
JP6873679B2 (en) Imaging device, control method and program of imaging device
CN110278375B (en) Image processing method, image processing device, storage medium and electronic equipment
JP2014179920A (en) Imaging apparatus, control method thereof, program, and storage medium
JP6108680B2 (en) Imaging apparatus, control method therefor, program, and storage medium
CN110266965B (en) Image processing method, image processing device, storage medium and electronic equipment
JP2010183460A (en) Image capturing apparatus and method of controlling the same
JP2010011153A (en) Imaging apparatus, imaging method and program
JP5335964B2 (en) Imaging apparatus and control method thereof
KR20110103216A (en) An apparatus and a method for processing image, and a computer-readable storage medium
JP2011130243A (en) Image processing apparatus, image processing method, and image input device
JP2010183461A (en) Image capturing apparatus and method of controlling the same
JP5282533B2 (en) Image processing apparatus, imaging apparatus, and program
JP5264541B2 (en) Imaging apparatus and control method thereof
JP2007235421A (en) Imaging apparatus
JP2019153972A (en) Imaging apparatus, control method thereof, and program
JP5351663B2 (en) Imaging apparatus and control method thereof
JP5460909B2 (en) Imaging apparatus and image processing method
KR101817658B1 (en) Digital photographing apparatus splay apparatus and control method thereof

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191213

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200814

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200908

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201105

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210305

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210421

R151 Written notification of patent or utility model registration

Ref document number: 6873679

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151