JP2013132065A - Imaging apparatus and flash control method - Google Patents

Imaging apparatus and flash control method Download PDF

Info

Publication number
JP2013132065A
JP2013132065A JP2013021760A JP2013021760A JP2013132065A JP 2013132065 A JP2013132065 A JP 2013132065A JP 2013021760 A JP2013021760 A JP 2013021760A JP 2013021760 A JP2013021760 A JP 2013021760A JP 2013132065 A JP2013132065 A JP 2013132065A
Authority
JP
Japan
Prior art keywords
face
flash
light source
image
perform
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.)
Pending
Application number
JP2013021760A
Other languages
Japanese (ja)
Inventor
Masahiro Takayama
将浩 高山
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 JP2013021760A priority Critical patent/JP2013132065A/en
Publication of JP2013132065A publication Critical patent/JP2013132065A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To obtain an image the exposure of both a subject and the background of which is appropriate, even if the top light or backlight phenomenon has occurred.SOLUTION: The imaging apparatus capable of performing flash photography includes a face detection unit (114) for detecting the face region from the image of an image signal obtained from an imaging element (101), control means (115) for determining whether or not flash photography is performed based on the brightness in a face region thus detected, and estimation means (103) for estimating a light source from the image signal. The control means determines to perform flash photography even if a part of the face region is bright. The condition for determining to perform flash photography is either the fact that the brightness of a segmented region including the eye, out of the segmented regions of the face region, indicates underexposure and/or the fact that the brightness difference of two preset regions, out of the segmented regions, reaches or goes above a threshold, and includes a fact that the estimated light source is a preset light source.

Description

本発明は撮像装置及びフラッシュ制御方法に関し、更に詳しくは、撮影した画像から検出した顔領域に応じて、フラッシュの発光制御を行う撮像装置及びフラッシュ制御方法に関する。   The present invention relates to an imaging apparatus and a flash control method, and more particularly to an imaging apparatus and a flash control method that perform flash emission control according to a face area detected from a captured image.

従来、デジタルカメラにおいて、撮影して得られた画像データに基づいて自動的に露出を決定する自動露出制御機能を備えた撮像装置がある。自動露出制御の為に行われる測光方式として、例えば、画面全体を考慮して行う測光や、画面内の測光領域を複数のブロックに分割し、各ブロックの測光を行う多分割測光がある。他にも、画面の中央部に重点を置いて測光を行う中央重点測光や、画面の中央部の任意の範囲のみ測光するスポット測光などがある。しかしながら、これらの測光方式では、一般的に主被写体となることが多い、人物を適正に露光できないことがあった。   2. Description of the Related Art Conventionally, there is an imaging apparatus provided with an automatic exposure control function that automatically determines exposure based on image data obtained by photographing in a digital camera. As photometry methods performed for automatic exposure control, for example, there are photometry performed in consideration of the entire screen, and multi-division metering in which the photometry area in the screen is divided into a plurality of blocks and the photometry of each block is performed. In addition, there are center-weighted metering that performs metering with emphasis on the center of the screen, and spot metering that meteres only an arbitrary range in the center of the screen. However, in these photometry methods, there are cases where a person cannot be properly exposed, which is generally the main subject.

そこで、主被写体の輝度が適正になるようにするために、ユーザーに主被写体が存在するエリアを指示させ、指示されたエリアの輝度に合わせて露出を調節するものがある。更に、撮影して得られた画像データの中から形状解析等の手法によって主被写体として例えば顔を自動的に検出し、検出された顔が適正な露出になるように、露出制御を行うカメラが提案されている(例えば、特許文献1を参照)。このカメラでは、画面全体の輝度が適正でも、顔が露出アンダーであれば画面全体を明るくし、顔がオーバーであれば画面全体を暗くする。このように、どのようなシーンにおいても、主被写体の輝度が適正になるように撮影を行うことができる。   Therefore, in order to make the luminance of the main subject appropriate, there is a method in which the user designates an area where the main subject exists and adjusts the exposure according to the luminance of the designated area. Furthermore, a camera that automatically detects, for example, a face as a main subject from image data obtained by photographing using a technique such as shape analysis, and performs exposure control so that the detected face has an appropriate exposure. It has been proposed (for example, see Patent Document 1). With this camera, even if the brightness of the entire screen is appropriate, the entire screen is brightened if the face is underexposed, and the entire screen is darkened if the face is overexposed. In this way, in any scene, shooting can be performed so that the luminance of the main subject is appropriate.

また、フラッシュ撮影時においても、テスト発光して得た画像から顔を検出し、顔領域が適正な露出になるように露出制御を行うカメラも提案されている(例えば、特許文献2を参照)。   In addition, a camera that detects a face from an image obtained by test light emission and performs exposure control so that the face area is properly exposed even during flash photography has been proposed (see, for example, Patent Document 2). .

更に、逆光であるかどうかを判断し、逆光であると判断した場合に、自動的にフラッシュ撮影を行う撮像装置も従来市販されている。   Further, an imaging apparatus that automatically performs flash photography when it is determined whether it is backlit and when it is determined that it is backlit is also commercially available.

特開2003−107555号公報JP 2003-107555 A 特開2004−184508号公報JP 2004-184508 A

しかしながら、上記特許文献1に開示されている方法では、検出した顔の輝度が適正になるように露出を制御するため、顔の輝度は適正になっても、背景の露出がオーバーまたはアンダーになってしまうことがある。図9は、顔が露出アンダーで背景がオーバーである場合に、顔の輝度が適正になるように露出制御することにより、背景のオーバーが悪化する例を示している。このような場合、画像全体として見た場合には失敗画像となってしまうといった問題があった。   However, in the method disclosed in Patent Document 1, since exposure is controlled so that the detected brightness of the face is appropriate, the background exposure is over or under even if the face brightness is appropriate. May end up. FIG. 9 shows an example in which overexposure of the background is deteriorated by performing exposure control so that the brightness of the face becomes appropriate when the face is underexposed and the background is overexposed. In such a case, there is a problem that the image becomes a failed image when viewed as an entire image.

また、逆光時に自動的にフラッシュ撮影を行う撮像装置では、上部からの照明(トップライト)により顔領域に影が生じる現象(以下、「トップライト現象」と呼ぶ。)では顔の一部が明るいために「逆光」と判断されないことがあった。その結果、フラッシュ撮影が行われず、顔の輝度が十分とならない場合があった。例えば、日中の屋外で帽子を被った場合には、逆光でなくても顔領域に大きく影が生じ、顔が暗く写ってしまうことがある。   In addition, in an imaging device that automatically performs flash photography during backlighting, a part of the face is bright due to a phenomenon in which a shadow is generated in the face area by illumination from above (top light) (hereinafter referred to as “top light phenomenon”). For this reason, it may not be judged as “backlight”. As a result, flash photography is not performed, and the brightness of the face may not be sufficient. For example, when a hat is worn outdoors during the daytime, a large shadow may appear in the face area even if it is not backlit, and the face may appear dark.

また、特許文献2に開示されている発明では、日中の屋外で人物撮影を行う通常の撮影ではフラッシュ撮影が必要であると判断されず、逆光時やトップライト現象が起きている場合には顔が暗く写ってしまう。   Also, in the invention disclosed in Patent Document 2, it is not determined that flash photography is necessary for normal photography in which people are photographed outdoors during the day, and when backlighting or a toplight phenomenon occurs. My face looks dark.

本発明は上記問題点を鑑みてなされたものであり、本発明のフラッシュを用いたフラッシュ撮影を行うことが可能な撮像装置は、撮像素子から得られる画像信号の画像から顔領域を検出する顔検出手段と、前記顔検出手段により検出された顔領域における輝度に基づいてフラッシュ撮影を行うかを決定する制御手段と、前記画像信号から光源を推定する推定手段とを有し、前記制御手段は、前記顔領域の一部が明るくとも前記フラッシュ撮影を行うことを決定するものであり、前記フラッシュ撮影を行うことを決定する条件として、前記顔領域を分割した分割領域のうち、目を含む前記分割領域の輝度が露出アンダーを示すこと、及び、前記分割領域のうち、予め設定された2つの領域の輝度差が閾値以上であることの少なくともいずれかであって、且つ、前記推定された光源が予め設定された光源であることを含む。 The present invention has been made in view of the above problems, and an imaging apparatus capable of performing flash photography using a flash according to the present invention is a face that detects a face area from an image of an image signal obtained from an imaging device. Detection means, control means for determining whether to perform flash photography based on the luminance in the face area detected by the face detection means, and estimation means for estimating a light source from the image signal, the control means , Determining to perform the flash shooting even if a part of the face area is bright, and as a condition for determining to perform the flash shooting, the eye includes, among the divided areas obtained by dividing the face area, the eye Either at least one of the brightness of the divided area indicates under-exposure and the brightness difference between two preset areas among the divided areas is equal to or greater than a threshold value. I, and includes the estimated light source is a light source which is set in advance.

本発明によれば、逆光またはトップライト現象が起きている場合であっても、被写体と背景の露出が共に適正な画像を得ることができる。   According to the present invention, it is possible to obtain an image in which both the subject and the background are properly exposed even when the backlight or the toplight phenomenon occurs.

本発明の実施の形態における顔検出機能を備えた撮像装置の機能構成を示す概略ブロック図である。It is a schematic block diagram which shows the function structure of the imaging device provided with the face detection function in embodiment of this invention. テンプレートマッチングによるパターン認識処理を説明するフローチャートである。It is a flowchart explaining the pattern recognition process by template matching. テンプレートマッチングの概念を説明する図である。It is a figure explaining the concept of template matching. 本発明の実施の形態におけるWB補正値の算出処理を示すフローチャートである。It is a flowchart which shows the calculation process of the WB correction value in embodiment of this invention. 画面を任意の複数ブロックに分割した例を示す図である。It is a figure which shows the example which divided | segmented the screen into arbitrary several blocks. 白検出範囲を示す図である。It is a figure which shows a white detection range. 本発明の実施の形態におけるフラッシュの発光制御処理を説明するフローチャートである。It is a flowchart explaining the light emission control processing of the flash in embodiment of this invention. 逆光及びトップライト現象が起きている場合の輝度分布の一例を示す概略図である。It is the schematic which shows an example of the luminance distribution in case the backlight and the toplight phenomenon have occurred. 従来の顔検出を利用した露出制御の問題点を説明するための概念図である。It is a conceptual diagram for demonstrating the problem of the exposure control using the conventional face detection.

以下、添付図面を参照して本発明を実施するための最良の形態を詳細に説明する。   The best mode for carrying out the present invention will be described below in detail with reference to the accompanying drawings.

図1は、画像処理装置の一例として、本発明の第1の実施形態における顔検出機能を備えた撮像装置の機能構成を示す概略ブロック図である。   FIG. 1 is a schematic block diagram illustrating a functional configuration of an imaging apparatus having a face detection function according to the first embodiment of the present invention as an example of an image processing apparatus.

図1において、101はCCDセンサやCMOSセンサ等から成る固体撮像素子であり、その表面は、例えばベイヤー配列のRGBカラーフィルタにより覆われ、カラー撮影が可能な構成となっている。102はメモリで、撮像素子101から得られた画像信号を一旦記憶する。   In FIG. 1, reference numeral 101 denotes a solid-state image sensor composed of a CCD sensor, a CMOS sensor, or the like. The surface of the solid-state image sensor is covered with, for example, an RGB color filter having a Bayer arrangement, and is capable of color photography. A memory 102 temporarily stores an image signal obtained from the image sensor 101.

114は顔検出部であり、メモリ102に記憶された画像信号から、顔領域を検出する。なお、顔領域を検出する技術としては様々な手法が提案されており、顔の位置およびサイズ情報を取得できればどのような手法を用いてもよく、本発明は、顔検出の手法により制限されるものではない。例えば、ニューラルネットワークに代表される学習を用いた方法や、目や鼻と言った物理的形状に特徴のある部位を画像領域からテンプレートマッチングで抽出する手法が知られている。他にも、肌の色や目の形といった画像特徴量を検出し、統計的手法を用いて解析する手法が挙げられる(例えば、特開平10−232934号公報、特開2000−48184号公報を参照)。他に、現在製品として提案されているものとしては、ウェーブレット変換と画像特徴量を利用して顔検出する方法等や、テンプレートマッチング等を組み合わせた方法などがある。   Reference numeral 114 denotes a face detection unit that detects a face area from the image signal stored in the memory 102. Various techniques have been proposed as a technique for detecting a face region, and any technique may be used as long as it can acquire face position and size information, and the present invention is limited by the face detection technique. It is not a thing. For example, a method using learning typified by a neural network and a method of extracting a part having a physical shape such as eyes and nose from an image region by template matching are known. Other methods include detecting image feature quantities such as skin color and eye shape and analyzing them using statistical methods (for example, Japanese Patent Laid-Open Nos. 10-232934 and 2000-48184). reference). In addition, what is currently proposed as a product includes a method of detecting a face using wavelet transform and image feature amounts, a method of combining template matching, and the like.

ここで、顔検出の手法として、パターン認識の一つであるテンプレートマッチングについて説明する。パターン認識とは、観測されたパターンをあらかじめ定められた概念(クラス)の一つに対応させる処理である。図2は、パターン認識処理のフローチャートであり、顔検出部114によって実行される。   Here, template matching, which is one of pattern recognition, will be described as a face detection method. Pattern recognition is a process of matching an observed pattern with one of predetermined concepts (classes). FIG. 2 is a flowchart of the pattern recognition process, which is executed by the face detection unit 114.

先ず、メモリ102から画像データを読み出して前処理し(ステップS1)、前処理された画像データから特徴的部分のパターンを抽出する(ステップS2)。そして、抽出されたパターンをテンプレート(標準パターン)に対応させる(テンプレートマッチング)。例えば、図3に示すように特徴的部分のパターン63が抽出された場合、テンプレート61の中心点62を取得したパターン63のある座標点(i,j)に置く。そして、中心点62のパターン63における位置をずらしながら、テンプレート61とパターン63との重なり部分の類似度を計算していき、類似度が最大になる位置を決定する。パターン63を例えば目や耳等の形状を含むテンプレート61にマッチングさせることにより、目の位置情報や顔領域(顔座標)を取得することができる。   First, image data is read from the memory 102 and preprocessed (step S1), and a pattern of a characteristic portion is extracted from the preprocessed image data (step S2). Then, the extracted pattern is made to correspond to the template (standard pattern) (template matching). For example, when the characteristic part pattern 63 is extracted as shown in FIG. 3, the center point 62 of the template 61 is placed at a certain coordinate point (i, j) of the acquired pattern 63. Then, while shifting the position of the center point 62 in the pattern 63, the similarity of the overlapping portion between the template 61 and the pattern 63 is calculated, and the position where the similarity is maximized is determined. By matching the pattern 63 with, for example, a template 61 including shapes such as eyes and ears, position information of eyes and face areas (face coordinates) can be acquired.

このようにして、認識パターンを取得して(ステップS3)、取得した認識パターンを出力し(ステップS4)、パターン認識処理を終了する。   Thus, a recognition pattern is acquired (step S3), the acquired recognition pattern is output (step S4), and a pattern recognition process is complete | finished.

図1の説明に戻る。CPU115では、顔検出部114から送られた信号に基づいて、顔が検出されていれば、顔が最適な明るさになるようなシャッタースピードTv、絞り値Avを計算し、また顔に合焦するようにフォーカスレンズ駆動量を計算する。更に、フラッシュ116の発光/非発光の判断も行う。一方、顔が検出されていなければ、CPU115は画像全体が最適な明るさになるようなシャッタースピードTv、絞り値Avを計算すると共に、予め設定された合焦領域内にある被写体に合焦するようなフォーカスレンズ駆動量を計算する。CPU115で計算された露出値(Tv、Av)及びフォーカスレンズ駆動量、フラッシュ116の発光/非発光の判断結果は制御回路113に送られる。そして、これら各値に基づいて不図示のレンズや絞り、シャッター、撮像素子101、フラッシュ116がそれぞれ制御される。   Returning to the description of FIG. The CPU 115 calculates the shutter speed Tv and the aperture value Av so that the face becomes optimal brightness if the face is detected based on the signal sent from the face detection unit 114, and focuses on the face. The focus lens drive amount is calculated as follows. Further, it is also determined whether the flash 116 is emitting light or not. On the other hand, if the face is not detected, the CPU 115 calculates the shutter speed Tv and the aperture value Av so that the entire image has the optimum brightness, and focuses on the subject in the preset focus area. The focus lens driving amount is calculated. The exposure value (Tv, Av) calculated by the CPU 115, the focus lens drive amount, and the determination result of light emission / non-light emission of the flash 116 are sent to the control circuit 113. Based on these values, a lens, a diaphragm, a shutter, an image sensor 101, and a flash 116 (not shown) are controlled.

103はホワイトバランス(WB)制御部であり、メモリ102に記憶された画像信号及び顔検出部114から得られる顔情報に基づいてWB補正値を算出し、算出したWB補正値を用いて、メモリ102に記憶された画像信号に対してWB補正を行う。なお、このWB制御部103で用いられるWB補正値の算出方法については、詳細に後述する。   A white balance (WB) control unit 103 calculates a WB correction value based on the image signal stored in the memory 102 and face information obtained from the face detection unit 114, and uses the calculated WB correction value to store the memory. WB correction is performed on the image signal stored in 102. The WB correction value calculation method used by the WB control unit 103 will be described in detail later.

104は、WB制御部103によりWB補正された画像信号が最適な色で再現されるように色ゲインをかけて色差信号R−Y、B−Yに変換する色変換マトリックス(MTX)回路である。105は色差信号R−Y、B−Yの帯域を制限するローパスフィルタ(LPF)回路、106はLPF回路105で帯域制限された画像信号の内、飽和部分の偽色信号を抑圧するCSUP(Chroma Supress)回路である。   Reference numeral 104 denotes a color conversion matrix (MTX) circuit that converts the color difference signals RY and BY into color difference signals so that the image signal corrected by the WB control unit 103 is WB corrected with an optimal color. . Reference numeral 105 denotes a low-pass filter (LPF) circuit that limits the bands of the color difference signals RY and BY. Reference numeral 106 denotes a CSUP (Chroma) that suppresses a false color signal in a saturated portion of the image signal band-limited by the LPF circuit 105. Supress) circuit.

一方、WB制御部103によりWB補正された画像信号は輝度信号(Y)生成回路111にも出力されて輝度信号Yが生成され、生成された輝度信号Yに対してエッジ強調回路112にてエッジ強調処理が施される。   On the other hand, the WB corrected image signal by the WB control unit 103 is also output to the luminance signal (Y) generation circuit 111 to generate the luminance signal Y, and the edge enhancement circuit 112 performs edge processing on the generated luminance signal Y. Emphasis processing is performed.

CSUP回路106から出力される色差信号R−Y、B−Yと、エッジ強調回路112から出力される輝度信号Yは、RGB変換回路107にてRGB信号に変換され、ガンマ補正回路108にて階調補正が施される。その後、色輝度変換回路109にてYUV信号に変換され、更に圧縮回路110にて例えばJPEG圧縮されて、外部記録媒体または内部記録媒体に画像信号として記録される。   The color difference signals RY and BY output from the CSUP circuit 106 and the luminance signal Y output from the edge emphasis circuit 112 are converted into RGB signals by the RGB conversion circuit 107, and the gamma correction circuit 108 converts the gradation signals Y to B and Y. Tone correction is applied. After that, it is converted into a YUV signal by the color luminance conversion circuit 109, and further compressed by, for example, JPEG by the compression circuit 110 and recorded as an image signal on an external recording medium or an internal recording medium.

次に、本実施の形態におけるWB補正値の算出方法について図4を参照して説明する。   Next, a method for calculating the WB correction value in the present embodiment will be described with reference to FIG.

まず、WB制御部103はメモリ102に記憶された画像信号を読み出し、その画面を図5のような任意のm個のブロック(分割領域)に分割する(ステップS101)。そして、各ブロック(1〜m)毎に、画素値を色毎に加算平均して色平均値(R[i]、G[i]、B[i])を算出し、式(1)を用いて色評価値(Cx[i]、Cy[i])を算出する(ステップS102)。
Cx[i] = (R[i] - B[i]) / Y[i] × 1024
Cy[i] = (R[i] + B[i]) - 2G[i]/ Y[i] × 1024 …(1)
ただし、Y[i] = R[i] + 2G[i] + B[i]、[i]は各ブロックのインデックス番号
First, the WB control unit 103 reads an image signal stored in the memory 102, and divides the screen into arbitrary m blocks (divided areas) as shown in FIG. 5 (step S101). Then, for each block (1 to m), the pixel values are added and averaged for each color to calculate a color average value (R [i], G [i], B [i]). The color evaluation values (Cx [i], Cy [i]) are calculated by using them (step S102).
Cx [i] = (R [i]-B [i]) / Y [i] x 1024
Cy [i] = (R [i] + B [i])-2G [i] / Y [i] x 1024 (1)
Where Y [i] = R [i] + 2G [i] + B [i], [i] is the index number of each block

次に、ステップS102で算出したi番目のブロックの色評価値(Cx[i]、Cy[i])が、図6に示す予め設定した白検出範囲301に含まれるかどうかを判断する(ステップS103)。白検出範囲301は、予め異なる光源下で白を撮影し、算出した色評価値をプロットしたものである。図6におけるx座標(Cx)の負方向が高色温度被写体の白を撮影したときの色評価値、正方向が低色温度被写体の白を撮影したときの色評価値である。またy座標(Cy)は光源の緑成分の度合いを意味しており、負方向になるにつれG成分が大きくなり、つまり光源が蛍光灯であることを示している。   Next, it is determined whether or not the color evaluation values (Cx [i], Cy [i]) of the i-th block calculated in step S102 are included in the preset white detection range 301 shown in FIG. S103). The white detection range 301 is obtained by photographing white under different light sources in advance and plotting the calculated color evaluation values. In FIG. 6, the negative direction of the x coordinate (Cx) is a color evaluation value when white of a high color temperature subject is photographed, and the positive direction is a color evaluation value when white of a low color temperature subject is photographed. The y coordinate (Cy) means the degree of the green component of the light source, and the G component increases as it goes in the negative direction, that is, the light source is a fluorescent lamp.

図6のA領域は外光(Daylight)時の白分布であり、B領域はタングステンなどの低色温度光源分布、C領域は蛍光灯類の分布である。算出した色評価値(Cx[i]、Cy[i])がこの白検出範囲301に含まれる場合には(ステップS103でYES)そのブロックが白色であると判断する。この時、各ブロックがどの領域に多く含まれるかにより、照明を推定することができる。従って、WB制御部103が推定手段を構成している。そして、そのブロックの色平均値(R[i]、G[i]、B[i])を積算していき(ステップS104)、含まれない場合には加算せずにステップS105に進む。このステップS103及びステップS104の処理は、式(2)により表すことができる。   The area A in FIG. 6 is a white distribution during external light (Daylight), the area B is a low color temperature light source distribution such as tungsten, and the area C is a distribution of fluorescent lamps. When the calculated color evaluation values (Cx [i], Cy [i]) are included in the white detection range 301 (YES in step S103), it is determined that the block is white. At this time, illumination can be estimated depending on which area each block is included in. Therefore, the WB control unit 103 constitutes an estimation unit. Then, the color average values (R [i], G [i], B [i]) of the block are accumulated (step S104), and if not included, the process proceeds to step S105 without adding. The processing of step S103 and step S104 can be expressed by equation (2).

ここで、式(2)において、色評価値(Cx[i]、Cy[i])が白検出範囲301に含まれる場合はSw[i]を1に、含まれない場合にはSw[i]を0とする。このようにして、ステップS103の判断により色平均値(R[i]、G[i]、B[i])の加算を行うか、行わないかの処理を実質的に行っている。 Here, in Equation (2), Sw [i] is set to 1 when the color evaluation value (Cx [i], Cy [i]) is included in the white detection range 301, and Sw [i is set when it is not included. ] Is set to 0. In this way, the process of whether or not to add the color average values (R [i], G [i], B [i]) is substantially performed according to the determination in step S103.

ステップS105では、全てのブロックについて上記処理を行ったかどうかを判断し、未処理のブロックがあればステップS102に戻って上記処理を繰り返し、全てのブロックの処理が終了していればステップS106に進む。   In step S105, it is determined whether or not the above process has been performed for all blocks. If there is an unprocessed block, the process returns to step S102 and the above process is repeated. If all the blocks have been processed, the process proceeds to step S106. .

ステップS106では、得られた色評価値の積分値(sumR、sumG、sumB)から、以下の式(3)を用いて、WB補正値(WBCo1_R、WBCo1_G、WBCo1_B)を算出する。
WBCo1_R = sumY × 1024 / sumR
WBCo1_G = sumY × 1024 / sumG …(3)
WBCo1_B = sumY × 1024 / sumB
ただし、sumY = (sumR + 2 × sumG + sumB) / 4
In step S106, WB correction values (WBCo1_R, WBCo1_G, WBCo1_B) are calculated from the integrated values (sumR, sumG, sumB) of the obtained color evaluation values using the following equation (3).
WBCo1_R = sumY × 1024 / sumR
WBCo1_G = sumY × 1024 / sumG (3)
WBCo1_B = sumY × 1024 / sumB
However, sumY = (sumR + 2 × sumG + sumB) / 4

次に、本実施の形態におけるフラッシュ116の発光制御処理について図7のフローチャートを参照して説明する。この図7に示す処理は、撮影前の電子ビューファインダ(EVF)用画像取得時に画像全体の露出が適正となるように制御されている場合に、不図示のシャッターボタンをユーザが操作することによる撮影指示に応じて、CPU115の制御により実行される。即ち、CPU115が判定手段、決定手段、制御手段として機能する。   Next, the light emission control processing of the flash 116 in the present embodiment will be described with reference to the flowchart of FIG. The processing shown in FIG. 7 is performed by the user operating a shutter button (not shown) when the exposure of the entire image is controlled so as to be appropriate when the electronic viewfinder (EVF) image before photographing is acquired. This is executed under the control of the CPU 115 in accordance with the photographing instruction. That is, the CPU 115 functions as a determination unit, a determination unit, and a control unit.

先ず、ステップS201においてメモリ102に記憶された画像信号を読み出し、ステップS202において、顔検出部114により顔が検出されたか否かを判定する。顔が検出されなかった場合は、ステップS208に進んで通常撮影を行う。   First, the image signal stored in the memory 102 is read in step S201, and in step S202, it is determined whether or not a face is detected by the face detection unit 114. If no face is detected, the process proceeds to step S208 and normal shooting is performed.

一方、顔が検出された場合、顔検出部114は、メモリ102にから読み出した画像信号の内、顔領域の画像信号を抽出してCPU115に送り、CPU115では、送られた画像信号の輝度値を、図5に示す各ブロック毎に算出する。算出された輝度信号Yの内、顔領域の輝度値を抽出し(ステップS203)、顔領域における暗部の割合が、閾値を超えているかどうかを判定する(ステップS204)。ここで行われる判定について、以下に説明する。   On the other hand, when a face is detected, the face detection unit 114 extracts the image signal of the face area from the image signal read out from the memory 102 and sends it to the CPU 115. In the CPU 115, the luminance value of the sent image signal is extracted. Is calculated for each block shown in FIG. The luminance value of the face area is extracted from the calculated luminance signal Y (step S203), and it is determined whether or not the dark portion ratio in the face area exceeds a threshold value (step S204). The determination performed here will be described below.

本実施の形態では、顔検出部114で検出された顔領域について、図5に示すブロック毎に輝度値を算出し、算出した輝度値が露出アンダーであるかどうかを判断することにより、顔領域の暗部を検知する。逆光状態では、画面全体を適正露出にした場合、図8(a)に示すように顔領域全体が露出アンダーになり、トップライト現象で顔の一部に影が生じている場合は、図8(b)に示すように顔領域の一部が露出アンダーになる。逆光の場合は顔領域全体が暗くなるので容易に逆光の可能性があると判断できる。トップライトの場合は、顔領域において暗分が占める割合で判断する。すなわち、顔領域のあるブロックが暗部と判定され、顔領域における暗部と判定されたブロックの割合が、例えば、2割以上、8割以下である場合に、トップライト現象が起きている可能性があると判断することができる。トップライト現象を判断するための暗部ブロックの割合については、2割以上8割以下で無くても良く、顔の大きさや構図に応じて、或いは実験によって得られた好適な数値に設定しても良い。   In the present embodiment, the face area detected by the face detection unit 114 is calculated for each block shown in FIG. 5, and it is determined whether the calculated brightness value is underexposed. Detect dark areas of. In the backlit state, when the entire screen is properly exposed, the entire face area is underexposed as shown in FIG. 8A, and a shadow is generated on a part of the face due to the top light phenomenon. As shown in (b), a part of the face area is underexposed. In the case of backlighting, the entire face area becomes dark, so it can be easily determined that there is a possibility of backlighting. In the case of top light, the determination is based on the proportion of the dark portion in the face area. That is, when a block having a face area is determined to be a dark part and the ratio of blocks determined to be a dark part in the face area is, for example, 20% or more and 80% or less, there is a possibility that the toplight phenomenon has occurred. It can be judged that there is. The ratio of the dark part block for judging the top light phenomenon may not be 20% or more and 80% or less, and may be set according to the size and composition of the face or a suitable value obtained by experiment. good.

ステップS204で暗部の割合が閾値を超えていない場合は、ステップS208に進んで、通常撮影を行い、超えている場合はステップS205に進む。   If the ratio of the dark part does not exceed the threshold value in step S204, the process proceeds to step S208 to perform normal shooting, and if it exceeds, the process proceeds to step S205.

ステップS205では、WB制御部103はWB補正値を算出する。先にも述べたように、日中の屋外で人物撮影を行う通常の撮影では、画面全体の輝度が十分に高くフラッシュ撮影が必要であると判断されないため、逆光時やトップライト現象が起きている場合には顔がアンダーに撮影されてしまう。WB制御部103におけるホワイトバランス演算結果を逆光、トップライト現象の判断基準として適用する。上述したように、白ブロックを検出する時に、撮影下の光源を予測することができる。例えば、「白点」であると判断されたブロックが、図6の領域Aに多く分布している場合には、日中の日向のような外光(Daylight)下で撮影が行われていると判断する。従って、ホワイトバランス演算の結果、WB制御部103において日中の日向(Daylight)と判断された場合に(ステップS206でYES)、逆光またはトップライト現象が起きていると判断する。そして、ステップS207に進んでフラッシュ116を用いたフラッシュ撮影を行う。日中の日向(Daylight)と判断されなかった場合には、ステップS208に進んで通常撮影を行う。   In step S205, the WB control unit 103 calculates a WB correction value. As mentioned earlier, in normal shooting where people shoot outdoors during the day, the brightness of the entire screen is not high enough to determine that flash shooting is necessary. If you are, your face will be shot under. The result of white balance calculation in the WB control unit 103 is applied as a criterion for determining the backlight and toplight phenomenon. As described above, when detecting a white block, a light source under photographing can be predicted. For example, when a large number of blocks determined to be “white spots” are distributed in the area A in FIG. 6, shooting is performed under daylight such as the sun in the daytime. Judge. Therefore, when the WB control unit 103 determines that the daylight is daylight (Daylight) as a result of the white balance calculation (YES in Step S206), it is determined that the backlight or the toplight phenomenon is occurring. In step S207, flash photography using the flash 116 is performed. If it is not determined that the daylight is during the day, the process proceeds to step S208 to perform normal shooting.

以上のように本実施の形態によれば、顔領域における暗部の割合及びホワイトバランス演算結果が外光(Daylight)であるか否かに応じて、逆光及びトップライト現象の判別を行い、フラッシュを発光制御する。これにより、日中の屋外で逆光及びトップライト現象が起きている場合であっても、人物と背景が共に適正に露出された画像を得ることができる。   As described above, according to the present embodiment, the backlight and the toplight phenomenon are discriminated according to whether the ratio of the dark portion in the face area and the white balance calculation result is external light (Daylight), and the flash is turned on. Control light emission. As a result, an image in which both the person and the background are properly exposed can be obtained even when the backlight and the toplight phenomenon occur outdoors in the daytime.

なお、上記実施の形態においては、光源を推定するために、ホワイトバランスの演算結果を利用する場合について説明したが、これに限るものではなく、どのように光源を推定しても構わない。例えば、光源を推定するための構成を追加してもよい。   In the above-described embodiment, the case where the white balance calculation result is used to estimate the light source has been described. However, the present invention is not limited to this, and the light source may be estimated in any manner. For example, a configuration for estimating the light source may be added.

<変形例>
上記例では、ステップS204における処理において、顔領域における暗部が占める割合に応じて、逆光またはトップライト現象を判断したが、例えば、以下のような判断条件を用いてもよい。
<Modification>
In the above example, in the process in step S204, the backlight or the toplight phenomenon is determined according to the proportion of the dark area in the face area. For example, the following determination conditions may be used.

先ず、顔検出結果から目を含むブロックを判断し、そのブロックが暗部である場合に、トップライト現象が起きている可能性があると判断しても良い。これは、頭上に光源が有る場合に、トップライト現象によって目が影になるためである。   First, a block including an eye may be determined from the face detection result, and if the block is a dark part, it may be determined that a toplight phenomenon may occur. This is because when the light source is above the head, the eyes become shadows due to the top light phenomenon.

また、顔検出結果から目及び口を示すブロックを判断し、これらブロックの輝度差が閾値以上である場合に、トップライト現象が起きている可能性があると判断しても良い。   Further, a block indicating eyes and mouth may be determined from the face detection result, and it may be determined that the toplight phenomenon may occur when the luminance difference between these blocks is equal to or greater than a threshold value.

Claims (3)

フラッシュを用いたフラッシュ撮影を行うことが可能な撮像装置であって、
撮像素子から得られる画像信号の画像から顔領域を検出する顔検出手段と、
前記顔検出手段により検出された顔領域における輝度に基づいてフラッシュ撮影を行うかを決定する制御手段と
前記画像信号から光源を推定する推定手段とを有し、
前記制御手段は、前記顔領域の一部が明るくとも前記フラッシュ撮影を行うことを決定するものであり、前記フラッシュ撮影を行うことを決定する条件として、前記顔領域を分割した分割領域のうち、目を含む前記分割領域の輝度が露出アンダーを示すこと、及び、前記分割領域のうち、予め設定された2つの領域の輝度差が閾値以上であることの少なくともいずれかであって、且つ、前記推定された光源が予め設定された光源であることを含むことを特徴とする撮像装置。
An imaging device capable of flash photography using a flash,
Face detection means for detecting a face region from an image of an image signal obtained from an image sensor;
Control means for determining whether to perform flash photography based on the luminance in the face area detected by the face detection means ;
Estimating means for estimating a light source from the image signal ,
The control means determines to perform the flash shooting even if a part of the face area is bright, and as a condition to determine to perform the flash shooting, among the divided areas into which the face area is divided, The brightness of the divided area including the eyes indicates underexposure , and the brightness difference between two preset areas among the divided areas is at least a threshold value, and the An imaging apparatus comprising: the estimated light source being a preset light source .
前記予め設定された光源は、日中の外光であることを特徴とする請求項に記載の撮像装置。 The imaging apparatus according to claim 1 , wherein the preset light source is daylight outside light. フラッシュを用いたフラッシュ撮影を行うことが可能な撮像装置におけるフラッシュ制御方法であって、
顔検出手段が、撮像素子から得られる画像信号の画像から顔領域を検出する顔検出工程と、
制御手段が、前記顔検出工程で検出された顔領域における輝度に基づいてフラッシュ撮影を行うかを決定する制御工程と、
推定手段が、前記画像信号から光源を推定する推定工程とを有し、
前記制御工程は、前記顔領域の一部が明るくとも前記フラッシュ撮影を行うことを決定するものであり、前記フラッシュ撮影を行うことを決定する条件として、前記顔領域を分割した分割領域のうち、目を含む前記分割領域の輝度が露出アンダーを示すこと、及び、前記分割領域のうちの予め設定された2つの領域の輝度差が閾値以上であることの少なくともいずれかであって、且つ、前記推定された光源が予め設定された光源であることを含むことを特徴とするフラッシュ制御方法。
A flash control method in an imaging apparatus capable of performing flash photography using a flash,
A face detection step in which the face detection means detects a face region from the image of the image signal obtained from the image sensor;
A control step in which the control means determines whether to perform flash photography based on the luminance in the face area detected in the face detection step;
An estimating means including an estimating step of estimating a light source from the image signal ,
The control step is to determine to perform the flash shooting even if a part of the face area is bright, and as a condition to determine to perform the flash shooting, among the divided areas into which the face area is divided, The luminance of the divided region including the eyes indicates under-exposure ; and the luminance difference between two predetermined regions of the divided regions is at least a threshold value; and A flash control method characterized in that the estimated light source includes a preset light source .
JP2013021760A 2013-02-06 2013-02-06 Imaging apparatus and flash control method Pending JP2013132065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013021760A JP2013132065A (en) 2013-02-06 2013-02-06 Imaging apparatus and flash control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013021760A JP2013132065A (en) 2013-02-06 2013-02-06 Imaging apparatus and flash control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007229453A Division JP2009063674A (en) 2007-09-04 2007-09-04 Imaging apparatus and flash control method

Publications (1)

Publication Number Publication Date
JP2013132065A true JP2013132065A (en) 2013-07-04

Family

ID=48909253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013021760A Pending JP2013132065A (en) 2013-02-06 2013-02-06 Imaging apparatus and flash control method

Country Status (1)

Country Link
JP (1) JP2013132065A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200352A (en) * 2017-12-27 2018-06-22 努比亚技术有限公司 A kind of method, terminal and storage medium for reconciling picture luminance
CN112243582A (en) * 2019-08-30 2021-01-19 深圳市大疆创新科技有限公司 Light supplement control method, device and system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001222048A (en) * 2000-02-08 2001-08-17 Olympus Optical Co Ltd Camera
JP2004166196A (en) * 2002-09-20 2004-06-10 Seiko Epson Corp Backlight processing of image using history information of imaging
JP2005020341A (en) * 2003-06-26 2005-01-20 Fuji Photo Film Co Ltd Exposure control method and exposure controller
JP2007201979A (en) * 2006-01-30 2007-08-09 Sony Corp Exposure control apparatus and imaging apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001222048A (en) * 2000-02-08 2001-08-17 Olympus Optical Co Ltd Camera
JP2004166196A (en) * 2002-09-20 2004-06-10 Seiko Epson Corp Backlight processing of image using history information of imaging
JP2005020341A (en) * 2003-06-26 2005-01-20 Fuji Photo Film Co Ltd Exposure control method and exposure controller
JP2007201979A (en) * 2006-01-30 2007-08-09 Sony Corp Exposure control apparatus and imaging apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200352A (en) * 2017-12-27 2018-06-22 努比亚技术有限公司 A kind of method, terminal and storage medium for reconciling picture luminance
CN108200352B (en) * 2017-12-27 2021-03-05 上海营湾医疗科技有限公司 Method, terminal and storage medium for adjusting picture brightness
CN112243582A (en) * 2019-08-30 2021-01-19 深圳市大疆创新科技有限公司 Light supplement control method, device and system and storage medium

Similar Documents

Publication Publication Date Title
US10397486B2 (en) Image capture apparatus and method executed by image capture apparatus
JP4217698B2 (en) Imaging apparatus and image processing method
CN110033418B (en) Image processing method, image processing device, storage medium and electronic equipment
JP6049343B2 (en) Image processing apparatus, image processing method, and program
JP5743696B2 (en) Image processing apparatus, image processing method, and program
US9036046B2 (en) Image processing apparatus and method with white balance correction
US8810681B2 (en) Image processing apparatus and image processing method
CN110047060B (en) Image processing method, image processing device, storage medium and electronic equipment
JP5225137B2 (en) Imaging apparatus, image processing method, and program
JP2021128791A (en) Image processing apparatus, image processing method, and program
CN111434104B (en) Image processing apparatus, image capturing apparatus, image processing method, and recording medium
JP4029206B2 (en) Imaging device
JP2009063674A (en) Imaging apparatus and flash control method
JP4726251B2 (en) Imaging apparatus and image processing method
JP5854716B2 (en) Image processing apparatus, image processing method, and program
JP5316923B2 (en) Imaging apparatus and program thereof
JP2010011153A (en) Imaging apparatus, imaging method and program
JP2013132065A (en) Imaging apparatus and flash control method
JP2012134651A (en) Image processing device, method, and program
JP6570311B2 (en) Image processing apparatus and image processing method
JP6316006B2 (en) SUBJECT SEARCH DEVICE, ITS CONTROL METHOD, CONTROL PROGRAM, AND IMAGING DEVICE
JP4422353B2 (en) Electronic camera
JP2015119436A (en) Imaging apparatus
JP5943682B2 (en) Imaging apparatus, control method thereof, and program
CN115086566B (en) Picture scene detection method and device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131220

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140411