JP2010050933A - Imaging device and red-eye correction method - Google Patents

Imaging device and red-eye correction method Download PDF

Info

Publication number
JP2010050933A
JP2010050933A JP2008215921A JP2008215921A JP2010050933A JP 2010050933 A JP2010050933 A JP 2010050933A JP 2008215921 A JP2008215921 A JP 2008215921A JP 2008215921 A JP2008215921 A JP 2008215921A JP 2010050933 A JP2010050933 A JP 2010050933A
Authority
JP
Japan
Prior art keywords
face
red
image
image signal
eye
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
JP2008215921A
Other languages
Japanese (ja)
Other versions
JP5448391B2 (en
JP2010050933A5 (en
Inventor
Satoshi Kubota
聡 窪田
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 JP2008215921A priority Critical patent/JP5448391B2/en
Publication of JP2010050933A publication Critical patent/JP2010050933A/en
Publication of JP2010050933A5 publication Critical patent/JP2010050933A5/ja
Application granted granted Critical
Publication of JP5448391B2 publication Critical patent/JP5448391B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stroboscope Apparatuses (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform red-eye detection accurately for improving a red-eye correction factor even when an object or a photographer is moving. <P>SOLUTION: The imaging device has a face detection means (38) to perform processing for detecting a human face from the image represented by the image signal, a red-eye detection means (38) to perform processing for detecting a red-eye from the detected face, a development means (50) to perform processing for development including at least luminance and color correction for the image signal, a red-eye correction means (50) to correct the detected red-eye, and a system control section (60). The system control section makes the face detection means perform processing for detecting a face from the image signal before processing for development is performed, makes the development means perform processing for development on the basis of the detected face when the face is detected, makes the face detection means perform processing for detecting a face from the developed image signal, and makes the red-eye detection means perform processing for detecting the red-eye from the face detected from the developed image signal when the face is detected from the developed image signal. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、撮像装置及び赤目補正方法に関し、更に詳しくは、赤目補正を行う撮像装置及び該撮像装置で用いられる赤目補正方法に関する。   The present invention relates to an imaging device and a red-eye correction method, and more particularly to an imaging device that performs red-eye correction and a red-eye correction method used in the imaging device.

古くからのフィルムカメラや現在主流のデジタルカメラを問わず、暗中にてフラッシュ撮影した際、人物の目が赤く撮影されてしまうという赤目現象が知られている。これは、暗所ゆえ人の瞳孔が大きく開いている状態では、フラッシュ光により網膜の血管が撮影されてしまうために起こる現象である。   Regardless of the old film camera or the current mainstream digital camera, a red-eye phenomenon is known in which a person's eyes are photographed in red when shooting with flash in the dark. This is a phenomenon that occurs because the blood vessels of the retina are photographed by flash light in a dark place where the human pupil is wide open.

この赤目現象を緩和し、軽減させる一つの方法として、撮影前に人物に対して光を投光し、大きく開いている瞳孔を閉じさせる方法がある。投光装置としては、フラッシュ撮影時に使用するキセノン管を使用したり、測距時に使用するLEDを用いる場合がある。いずれの投光装置でも、被写体がカメラを注視していることが前提であり、仮に注視していたとしても瞳孔を全閉させない限り赤目現象が発生する可能性はあるため、赤目現象の対策としては課題の残る方法であった。   As one method for alleviating and reducing this red-eye phenomenon, there is a method of projecting light to a person before photographing and closing a wide open pupil. As the light projecting device, a xenon tube used for flash photography or an LED used for distance measurement may be used. In any projector, it is assumed that the subject is gazing at the camera, and even if it is gazing, red eyes may occur unless the pupil is fully closed. Was a way of remaining challenges.

一方、デジタルカメラはフィルムカメラとは大きく異なり、カメラ内で写真現像処理を行うことができる。撮像素子にて露光された被写体像を読み出し、画像処理装置にて現像処理を行うことで、LCDなどの画像表示装置への表示すると共に、画像記憶媒体に現像後の画像を保存しておき、PCなどの外部機器で撮影画像を表示することができる。このカメラ内現像処理において、人物の顔の検出、検出した顔の目に赤目現象が現れていないかを検出し、赤目であった場合、赤目を黒く塗りつぶすように画像処理して赤目現象を解消する方法が行われている。   On the other hand, a digital camera is very different from a film camera, and can perform photo development processing in the camera. By reading out the subject image exposed by the image sensor and performing development processing by the image processing device, the image is displayed on an image display device such as an LCD, and the developed image is stored in an image storage medium. The captured image can be displayed on an external device such as a PC. In this in-camera development process, the human face is detected and whether the red eye phenomenon appears in the detected face, and if it is red eye, the red eye phenomenon is eliminated by performing image processing to paint the red eye black. The way to be done.

例えば、特許文献1では、赤目補正時に実施する顔検出にかかる時間を短縮するために、サムネイル用の低解像度画像を用いて赤目補正を行うことが提案されている。また、特許文献2においては、写真画像中から赤目現象が発生していることを高速で検出するために、画像の領域ごとに顔検出時の条件を変えて検出を行うようにしている。   For example, Patent Document 1 proposes to perform red-eye correction using a low-resolution image for thumbnails in order to reduce the time required for face detection performed during red-eye correction. In Patent Document 2, in order to detect at a high speed that a red-eye phenomenon has occurred in a photographic image, detection is performed by changing the face detection conditions for each image area.

特開2005−167697号公報Japanese Patent Laying-Open No. 2005-167697 特開2005−322220号公報JP 2005-322220 A

フラッシュ撮影時に人物の顔に赤目現象が発生しているかどうかを検出するためには、撮像画像から輝度情報と色情報を分離し、いわゆるYUV形式の画像にする。このYUV形式の画像から顔領域を検出し、さらに検出した顔の目領域から赤目現象の赤色を検出する。   In order to detect whether or not a red-eye phenomenon has occurred on the face of a person during flash photography, luminance information and color information are separated from the captured image to form a so-called YUV format image. A face area is detected from the YUV format image, and red of the red-eye phenomenon is detected from the detected eye area of the face.

顔検出時には顔の輝度やコントラストが適切に再現され、また、赤目検出時には色が適切に再現されているほうが検出精度が高くなり、また写真の画質としても、輝度、コントラスト、色が適切に処理されていたほうが好ましい画像となる。   When detecting a face, the brightness and contrast of the face are properly reproduced, and when red-eye is detected, the color is appropriately reproduced with higher detection accuracy. It is preferable that the image is selected.

しかしながら、画像の輝度やコントラストや色が適切に再現されない場合がある。これは、静止画撮影前に顔検出を行い、絞り値やシャッタ速度、ISO感度といった露出条件とフラッシュ光発光強度を決定した後に、撮影処理を行うカメラの撮影シーケンスに依存している。例えば、被写体や撮影者が動いている場合、撮影条件決定時の被写体の状況と、実際に撮影を行う時点での被写体の状況が異なる場合があり、画像の輝度が適切に再現されなくなり、それに連動して色も適切にならないことがある。   However, the brightness, contrast, and color of the image may not be reproduced properly. This depends on the shooting sequence of the camera that performs shooting processing after performing face detection before shooting a still image, determining exposure conditions such as aperture value, shutter speed, ISO sensitivity, and flash light emission intensity. For example, if the subject or the photographer is moving, the situation of the subject at the time of shooting condition determination and the situation of the subject at the time of actual shooting may differ, and the brightness of the image will not be reproduced properly, In conjunction with this, colors may not be appropriate.

このように、輝度や色が適切ではない画像に対して顔検出や赤目検出を行った場合に、高い精度で検出を行うことができず、これが赤目補正率を低下させる要因の一つとなっていた。   As described above, when face detection or red-eye detection is performed on an image whose luminance or color is not appropriate, detection cannot be performed with high accuracy, which is one of the factors that reduce the red-eye correction rate. It was.

特許文献1に開示された方法では、撮像素子の高画素化が進む昨今、時間短縮を実現することは可能であるが、低解像度画像を使用するため、人物の目の位置を精度良く求める必要がある赤目補正においては適さない方法であった。   With the method disclosed in Patent Document 1, it is possible to reduce the time as the number of pixels of an image sensor increases. However, since a low-resolution image is used, it is necessary to accurately determine the position of a person's eyes. There is a method that is not suitable for red-eye correction.

また、特許文献2では、上記のような被写体や撮影者が動いている状態で輝度や色が適切になっていない場合への対策としては不向きなものであった。   Further, Patent Document 2 is not suitable as a countermeasure for the case where the brightness and color are not appropriate in the state where the subject and the photographer are moving as described above.

本発明は上記問題点を鑑みてなされたものであり、被写体や撮影者が動いている状況であっても、赤目検出を精度良く実施し、赤目補正率を向上させることを目的とする。   The present invention has been made in view of the above problems, and it is an object of the present invention to perform red-eye detection with high accuracy and improve the red-eye correction rate even when the subject or the photographer is moving.

また、赤目検出のためにかかる時間を、短く抑えることを更なる目的とする。   It is a further object to keep the time taken for red-eye detection short.

上記目的を達成するために、本発明の撮像装置は、画像信号から人の顔を検出する処理を行う顔検出手段と、前記顔検出手段により検出された顔から、赤目を検出する処理を行う赤目検出手段と、前記画像信号に対して、少なくとも輝度及び色の補正を含む現像処理を行う現像手段と、前記赤目検出手段により検出された赤目を補正する赤目補正手段と、制御手段とを有し、前記制御手段は、前記顔検出手段を制御して、前記画像信号から顔を検出する処理を行わせ、前記顔検出手段により顔が検出された場合に、前記現像手段を制御して、該検出された顔に基づいて前記現像処理を行わせ、前記顔検出手段を制御して、前記現像処理した画像信号から顔を検出する処理を行わせ、前記現像処理した画像信号から顔が検出された場合に、前記赤目検出手段を制御して、該現像処理した画像信号から検出した顔から赤目を検出する処理を行わせる。   In order to achieve the above object, an imaging apparatus according to the present invention performs processing for detecting a human face from an image signal, and processing for detecting red eyes from a face detected by the face detecting unit. A red-eye detecting unit; a developing unit that performs development processing including at least luminance and color correction on the image signal; a red-eye correcting unit that corrects a red-eye detected by the red-eye detecting unit; and a control unit. The control unit controls the face detection unit to perform processing for detecting a face from the image signal. When the face is detected by the face detection unit, the control unit controls the development unit, Based on the detected face, the development process is performed, the face detection unit is controlled to perform a process of detecting a face from the developed image signal, and a face is detected from the developed image signal If It controls the eye detection means, to perform processing of detecting a red-eye from the detected face from developing processed image signal.

また、上記撮像装置は被写体の光学像を画像信号に変換する撮像素子を更に有し、前記制御手段は、前記現像処理される前の画像信号から顔を検出する処理を、前記撮像素子から該画像信号を読み出す処理と並行して行うように、前記顔検出手段を制御する。   The imaging apparatus further includes an imaging element that converts an optical image of a subject into an image signal, and the control unit performs processing for detecting a face from the image signal before the development processing from the imaging element. The face detection means is controlled so as to be performed in parallel with the process of reading the image signal.

また、本発明の赤目補正方法は、画像信号から人の顔を検出する処理を行う第1の顔検出工程と、前記第1の顔検出工程で顔が検出された場合に、該検出された顔に基づいて前記画像信号に対して、少なくとも輝度及び色の補正を含む現像処理を行う現像工程と、前記現像処理した画像信号に対して顔を検出する処理を行う第2の顔検出工程と、前記第2の顔検出工程で顔が検出された場合に、該検出された顔から赤目を検出する処理を行う赤目検出工程と、前記赤目検出工程で検出された赤目を補正する赤目補正工程とを有する。   The red-eye correction method according to the present invention includes a first face detection process for performing processing for detecting a human face from an image signal, and the face detected in the first face detection process. A development step for performing development processing including at least luminance and color correction on the image signal based on a face; and a second face detection step for performing processing for detecting a face on the developed image signal; When a face is detected in the second face detection step, a red-eye detection step for performing processing for detecting red eyes from the detected face, and a red-eye correction step for correcting red eyes detected in the red-eye detection step And have.

また、上記赤目補正方法は、撮像素子から前記画像信号を読み出す読み出し工程を更に含み、前記第1の顔検出工程を、前記読み出し工程と並行して行う。   The red-eye correction method further includes a reading step of reading the image signal from the image sensor, and the first face detection step is performed in parallel with the reading step.

被写体や撮影者が動いている状況であっても、赤目検出を精度良く実施し、赤目補正率を向上させることができる。   Even when the subject or the photographer is moving, the red-eye detection can be performed with high accuracy and the red-eye correction rate can be improved.

また、赤目検出のためにかかる時間を、短く抑えることができる。   In addition, the time required for red-eye detection can be kept short.

以下、添付図面を参照して本発明を実施するための最良の形態を詳細に説明する。ただし、本形態において例示される構成部品の寸法、形状、それらの相対配置などは、本発明が適用される装置の構成や各種条件により適宜変更されるべきものであり、本発明がそれらの例示に限定されるものではない。   The best mode for carrying out the present invention will be described below in detail with reference to the accompanying drawings. However, the dimensions, shapes, relative arrangements, and the like of the components exemplified in the present embodiment should be changed as appropriate according to the configuration of the apparatus to which the present invention is applied and various conditions. It is not limited to.

図1は、本発明の実施の形態における撮像装置の構成を示すブロック図である。   FIG. 1 is a block diagram illustrating a configuration of an imaging apparatus according to an embodiment of the present invention.

図1において、60は撮像装置全体の動作を制御するシステム制御部である。   In FIG. 1, reference numeral 60 denotes a system control unit that controls the operation of the entire imaging apparatus.

10は撮影レンズであり、外光を集光する。図ではレンズは1枚として表しているが、通常、複数枚のレンズから構成されている。撮影レンズ10は、レンズ駆動回路42により、例えば、光軸に沿って前後に動かすことで、焦点を調節するためのフォーカスレンズ及び画角を調節するズームレンズを含む。更に、ブレ量検知回路44で測定したカメラのブレ量を基にして、手ブレ補正回路40によりレンズを動かして手ブレをキャンセルする方向に光軸を変化させることで光学的な手ブレ補正を行うブレ補正レンズなどを含む。また、撮影レンズ10を含む鏡筒部を繰り出し及び繰り込みさせる方式とし、カメラ未使用時の本体体積を小さくして携帯性を向上することが可能である。   Reference numeral 10 denotes a photographing lens that collects external light. Although the lens is shown as one in the figure, it is usually composed of a plurality of lenses. The photographing lens 10 includes, for example, a focus lens for adjusting the focus and a zoom lens for adjusting the angle of view by moving the lens driving circuit 42 back and forth along the optical axis. Further, based on the camera shake amount measured by the camera shake detection circuit 44, the camera shake correction circuit 40 moves the lens to change the optical axis in the direction of canceling camera shake, thereby performing optical camera shake correction. Including an image stabilization lens to perform. Moreover, it is possible to improve the portability by adopting a system in which the lens barrel portion including the photographing lens 10 is extended and retracted, and the main body volume is reduced when the camera is not used.

なお、ブレ量検知回路44はジャイロセンサを含み、図1ではレンズを駆動することで手ブレ補正を実現しているが、後述する撮像素子16を駆動することで同様に手ブレを補正することも可能である。   Note that the shake amount detection circuit 44 includes a gyro sensor, and in FIG. 1, camera shake correction is realized by driving a lens. However, camera shake correction is similarly performed by driving an image sensor 16 described later. Is also possible.

12はメカニカルシャッタ(以下、単に「シャッタ」と呼ぶ。)である。システム制御部60は、メカニカルシャッタ制御情報をシャッタ駆動回路28に伝達することで、シャッタ12を制御することが可能である。静止画撮影時の露光時間は、シャッタ12の開閉時間により決定されるが、システム制御部60がこの開閉時間を判断し、シャッタ駆動回路28に指示を出す。   Reference numeral 12 denotes a mechanical shutter (hereinafter simply referred to as “shutter”). The system control unit 60 can control the shutter 12 by transmitting mechanical shutter control information to the shutter drive circuit 28. The exposure time during still image shooting is determined by the opening / closing time of the shutter 12, and the system control unit 60 determines this opening / closing time and issues an instruction to the shutter drive circuit 28.

14は撮影レンズ10を通過した光の光量を調節する絞りである。絞り14としては、例えば、複数枚の羽から構成された虹彩絞りや、あらかじめ、板を様々な径で穴を打ち抜いた丸絞りがある。システム制御部60は、絞り制御情報を絞り駆動回路26に伝達することで、絞り14を制御することが可能である。システム制御部60から絞り駆動回路26への制御情報伝達は、シリアル通信やパルス信号などにより行われ、絞り駆動回路26の仕様に合わせて適した手段をとる。システム制御部60はこれらの絞り14と絞り駆動回路26を用い、被写体輝度が高い場合は絞りを絞って光量を落とすように制御し、被写体輝度が低い場合は絞りを開いて光をより多く取り込むように制御することが可能である。   Reference numeral 14 denotes an aperture for adjusting the amount of light passing through the photographing lens 10. Examples of the diaphragm 14 include an iris diaphragm composed of a plurality of wings and a round diaphragm in which holes are punched out in advance with various diameters. The system control unit 60 can control the diaphragm 14 by transmitting the diaphragm control information to the diaphragm driving circuit 26. Transmission of control information from the system control unit 60 to the aperture driving circuit 26 is performed by serial communication, a pulse signal, or the like, and means suitable for the specifications of the aperture driving circuit 26 is taken. The system control unit 60 uses the diaphragm 14 and the diaphragm drive circuit 26 to control the diaphragm so as to reduce the amount of light when the subject brightness is high, and when the subject brightness is low, the diaphragm is opened to capture more light. It is possible to control as follows.

16はCCDやCMOSセンサ等の撮像素子であり、撮影レンズ10、シャッタ12、絞り14を介して入射した被写体の光学像を電気信号(画像信号)に変換して出力する。システム制御部60は、撮像素子制御信号をTG(Timing Generator)24に伝達することで、撮像素子16を制御することができる。システム制御部60からTG24への制御情報伝達は、シリアル通信やパラレルバス通信などがあり、TG24の仕様に合わせて適した手段をとる。   Reference numeral 16 denotes an image sensor such as a CCD or CMOS sensor, which converts an optical image of a subject incident through the taking lens 10, the shutter 12, and the aperture 14 into an electrical signal (image signal) and outputs it. The system control unit 60 can control the image sensor 16 by transmitting an image sensor control signal to a TG (Timing Generator) 24. Transmission of control information from the system control unit 60 to the TG 24 includes serial communication, parallel bus communication, and the like, and means suitable for the specifications of the TG 24 is taken.

TG24は、システム制御部60から受信した制御情報をもとに撮像素子16を駆動する。撮像素子16は各画素における電荷の蓄積と、蓄積した電荷の読み出し動作を周期的に行っており、この動作はTG24からの駆動信号を基準にして行われる。撮像素子16に蓄積された電荷の内、特定のラインや特定の領域のみから電荷を読み出してくることが可能である。これは、TG24から出力される読み出し制御パルスにより読み出し方を変更することで実現することができる。システム制御部60は状況に応じて最適な読み出し方式を決定し、TG24に指示する。例えば、静止画撮影時は高解像度が要求されるため撮像素子16の全データを読み出し、電子ファインダー時や動画撮影時は30fpsや60fpsなどの高いフレームレートが要求されるため特定のラインだけ間引いて読み出す、といった使い分けを行う。またTG24を介して、撮像素子16の露光時間を制御することが可能である。任意のタイミングで、撮像素子16がチャージした電荷をクリアするように、TG24から撮像素子16へ駆動信号を出すことでこれを可能としている。   The TG 24 drives the image sensor 16 based on the control information received from the system control unit 60. The image pickup device 16 periodically performs charge accumulation in each pixel and readout operation of the accumulated charge, and this operation is performed with reference to a drive signal from the TG 24. It is possible to read out charges from only a specific line or a specific area among the charges accumulated in the image sensor 16. This can be realized by changing the reading method by the read control pulse output from the TG 24. The system control unit 60 determines an optimum reading method according to the situation and instructs the TG 24. For example, since high resolution is required during still image shooting, all data of the image sensor 16 is read out, and when a high frame rate such as 30 fps or 60 fps is required during electronic viewfinder or movie shooting, only specific lines are thinned out. It is used properly such as reading. Also, the exposure time of the image sensor 16 can be controlled via the TG 24. This is made possible by outputting a drive signal from the TG 24 to the image sensor 16 so as to clear the charge charged by the image sensor 16 at an arbitrary timing.

18は、撮像素子16から出力された電気信号(画像信号)に対して、相関二重サンプリング方式により画像データのノイズ成分を除去する、CDS(Correlated Double Sampler)回路である。20は、画像データのレベルを減衰/増幅するPGA(Programmable Gain Amplifier)回路であって、増幅量は、後述するシステム制御部60により制御される。システム制御部60からPGA回路20への制御情報伝達は、シリアル通信やパラレルバス通信などがあり、PGA回路20の仕様に合わせて適した手段をとる。通常、適正なレベルの画像データを得るために、絞り14で撮像素子16への入射光量を、また、シャッタ12により露光時間を適切に設定することで、撮像素子16の露出を適正にする。これに加えて、PGA回路20で画像データ信号を減衰/増幅することで、擬似的に画像データの露出を変える役割を担うことができる。これは、絞りやシャッタ速度と並ぶ撮影時の露出条件の一つとして、感度という概念でユーザーに機能提供することが可能である。   Reference numeral 18 denotes a CDS (Correlated Double Sampler) circuit that removes noise components of image data from the electrical signal (image signal) output from the image sensor 16 by a correlated double sampling method. Reference numeral 20 denotes a PGA (Programmable Gain Amplifier) circuit that attenuates / amplifies the level of the image data, and the amount of amplification is controlled by a system control unit 60 described later. Control information transmission from the system control unit 60 to the PGA circuit 20 includes serial communication, parallel bus communication, and the like, and takes measures suitable for the specifications of the PGA circuit 20. Usually, in order to obtain image data of an appropriate level, the amount of light incident on the image sensor 16 is appropriately set by the aperture 14 and the exposure time is appropriately set by the shutter 12 so that the exposure of the image sensor 16 is appropriate. In addition, by attenuating / amplifying the image data signal by the PGA circuit 20, it is possible to play a role of changing the exposure of the image data in a pseudo manner. This is a function of providing the user with a concept of sensitivity as one of the exposure conditions at the time of photographing along with the aperture and shutter speed.

PGA回路20により処理された画像データは、A/D(Analog/Digital)回路22にてアナログ信号からデジタル信号へ変換される。デバイスにより、デジタル信号のビット幅は10ビット、12ビット、14ビットなどがある。後段の画像処理回路50は、複数種類のビット幅に対応可能である。図では、CDS回路18、PGA回路20、A/D回路22をそれぞれ別の構成として表しているが、一つのICパッケージにこれらの回路の機能を搭載したものを採用することも可能である。   The image data processed by the PGA circuit 20 is converted from an analog signal to a digital signal by an A / D (Analog / Digital) circuit 22. Depending on the device, the bit width of the digital signal may be 10 bits, 12 bits, 14 bits, or the like. The subsequent image processing circuit 50 can cope with a plurality of types of bit widths. In the figure, the CDS circuit 18, the PGA circuit 20, and the A / D circuit 22 are shown as different configurations, but it is also possible to adopt a circuit in which the functions of these circuits are mounted in one IC package.

A/D回路22から出力されたデジタル化された画像データは画像処理回路50へ入力される。画像処理回路50は複数のブロックから構成され、さまざまな機能を実現している。   The digitized image data output from the A / D circuit 22 is input to the image processing circuit 50. The image processing circuit 50 includes a plurality of blocks and realizes various functions.

例えば、撮像素子16はカラーフィルタを通して各画素ごとに特定の色成分の光を抽出して、抽出した光を光電変換するのが一般的である。A/D回路22から出力される画像信号は撮像素子16の画素及びカラーフィルタ配置に対応したデータ形式になっており、輝度成分のみを評価して露出制御を行う自動露出制御(AE:AutoExposureControl)で使用するには適さない。そこで、画像処理回路50では、画像信号から色情報を排除し、輝度情報のみを抜き出す機能を備えている。   For example, the image sensor 16 generally extracts light of a specific color component for each pixel through a color filter, and photoelectrically converts the extracted light. The image signal output from the A / D circuit 22 has a data format corresponding to the pixel of the image sensor 16 and the color filter arrangement, and automatic exposure control (AE: AutoExposureControl) that performs exposure control by evaluating only the luminance component. Not suitable for use with. Therefore, the image processing circuit 50 has a function of removing color information from the image signal and extracting only luminance information.

さらに、画像処理回路50は、撮像素子16から読み出された画像信号の周波数成分のみを抜き出す機能を備え、自動ピント合わせ制御(AF:AutoFocus)時に使用することができる。撮像素子16から読み出された画像信号のどの領域の周波数成分を抽出するか、または、領域内を分割設定できる機能を備えている。このAF処理時には、撮像素子16の駆動を焦点調節に適した駆動にすることが可能である。撮像素子16を使用したテレビAFの場合、撮像素子16から画像信号を読み出す度にフォーカスレンズを新たなピント位置に駆動するため、撮像素子16のフレームレートが高いほうが、フォーカスレンズを素早く多くのピント位置に動かすことができる。このため、AF時のみ速いフレームレートになるように撮像素子16を駆動することができる。逆にフレームレートを遅くし、撮像素子からより多くの画素データを読み出すようにすることで、画像処理回路50で周波数解析可能なデータが増え、より正確な焦点調節制御が可能になるという面もある。このような撮像素子16の使い方は、カメラの撮影モードや、被写体の明るさに応じて適応的に決めることが可能である。   Furthermore, the image processing circuit 50 has a function of extracting only the frequency component of the image signal read from the image sensor 16, and can be used during automatic focusing control (AF: AutoFocus). A function is provided in which the frequency component of which area of the image signal read from the image sensor 16 is extracted or the area can be divided and set. At the time of this AF processing, it is possible to drive the image sensor 16 to be suitable for focus adjustment. In the case of television AF using the image sensor 16, the focus lens is driven to a new focus position each time an image signal is read from the image sensor 16, so that the higher the frame rate of the image sensor 16, the more quickly the focus lens is focused. Can be moved to a position. For this reason, the image sensor 16 can be driven so as to have a fast frame rate only during AF. Conversely, by reducing the frame rate and reading more pixel data from the image sensor, the amount of data that can be analyzed by the image processing circuit 50 increases, and more accurate focus adjustment control is possible. is there. Such use of the image sensor 16 can be determined adaptively according to the shooting mode of the camera and the brightness of the subject.

さらに、画像処理回路50は、A/D回路22によりデジタル化された画像データのレベルの増減、画像の色効果などを操作する機能を備え、撮影画像の画質を調節するという役割も担っている。画像データのレベルに関しては、画像全体に一律の増幅率でレベルを増減させる機能や、元の信号レベルの大小に応じて信号レベルを変換するガンマ機能がある。他に、画面内の領域毎の周波数成分に応じた増幅率でレベルを増減させる機能など、様々なレベル調節をすることができる。   Further, the image processing circuit 50 has a function of adjusting the level of the image data digitized by the A / D circuit 22 and operating the color effect of the image, and also plays a role of adjusting the image quality of the photographed image. . Regarding the level of image data, there are a function for increasing and decreasing the level with a uniform amplification factor for the entire image and a gamma function for converting the signal level according to the magnitude of the original signal level. In addition, various level adjustments such as a function of increasing / decreasing the level with an amplification factor corresponding to a frequency component for each region in the screen can be performed.

A/D回路22によりデジタル化された画像データは画像処理回路50へ入力すると同時に、一時記憶メモリ30に記憶することができる。一時記憶メモリ30に一旦記憶した画像データは再度読み出すことができ、システム制御部60から画像データを参照したり、読み出した画像データを画像処理回路50に入力することが可能である。さらに、画像処理回路50で画像処理した画像データを一時記憶メモリ30に書き戻したり、システム制御部60から任意のデータを書き込むことも可能である。   The image data digitized by the A / D circuit 22 can be input to the image processing circuit 50 and simultaneously stored in the temporary storage memory 30. The image data once stored in the temporary storage memory 30 can be read again, the image data can be referred to from the system control unit 60, and the read image data can be input to the image processing circuit 50. Furthermore, the image data processed by the image processing circuit 50 can be written back to the temporary storage memory 30 or arbitrary data can be written from the system control unit 60.

画像処理回路50で適切に処理された画像データを、画像認識回路38に入力することができる。画像認識回路38は、入力された画像の明るさ状況、合焦状況、色状況の認識に加え、人物の顔認識とその表情、文字がある場合はその文字情報を認識することができる。また、画像認識回路38には複数の画像を入力することができ、例えば2つの画像を入力し、その2つの画像の特徴を比較することで、同一の画像かどうかを判定することができる。   Image data appropriately processed by the image processing circuit 50 can be input to the image recognition circuit 38. The image recognition circuit 38 can recognize the character information of a person's face, its facial expression, and characters in addition to recognizing the brightness, focus, and color of the input image. In addition, a plurality of images can be input to the image recognition circuit 38. For example, it is possible to determine whether the images are the same by inputting two images and comparing the characteristics of the two images.

70は操作部であり、電源ON/OFFスイッチ102、シャッタスイッチ104、モード切替スイッチ110、パラメータ選択スイッチ群151等を含む。   An operation unit 70 includes a power ON / OFF switch 102, a shutter switch 104, a mode change switch 110, a parameter selection switch group 151, and the like.

108はLCDなどにより構成される画像表示装置である。画像表示装置108に画像を出力する場合、画像処理回路50で画像処理を行った画像データをVRAM34上に展開しておき、それをデジタル/アナログ(D/A)回路36にてアナログデータに変換してから表示する。また、電子ファインダ機能は、撮像素子16から読み出される連続した画像を、順次、画像表示装置108に表示更新していくことで実現することができる。VRAM34上に画像データを展開する際、1つの画像データを画像表示装置108に最も大きくなるように、または複数の画像をマルチ画面表示するように、など、様々な表示形態に対応するようにVRAM34上に展開することができる。   Reference numeral 108 denotes an image display device constituted by an LCD or the like. When outputting an image to the image display device 108, the image data subjected to the image processing by the image processing circuit 50 is developed on the VRAM 34 and converted into analog data by the digital / analog (D / A) circuit 36. Then display. In addition, the electronic viewfinder function can be realized by sequentially updating and displaying the continuous images read from the image sensor 16 on the image display device 108. When the image data is expanded on the VRAM 34, the VRAM 34 is adapted to correspond to various display forms such that one image data is maximized on the image display device 108, or a plurality of images are displayed on a multi-screen. Can be deployed on top.

また、画像表示装置108には、画像だけでなく任意の情報を単独、もしくは画像と共に表示することが可能である。カメラの状態表示や、ユーザーが選択あるいはカメラが決定したシャッタ速度や絞り値、感度情報などの文字情報や、画像処理回路50で測定した輝度分布のようなグラフも表示可能である。情報の表示位置、表示色も任意に選択可能である。これら様々な情報を表示することで、ユーザーインタフェースとすることが可能となる。また、画像表示装置108には、画像記憶媒体82に記憶されている画像データを表示することも可能である。画像データが圧縮されている場合、圧縮伸張ブロック32にて伸張し、VRAM34にデータを展開する。この展開したデータをD/A回路36にてアナログデータに変換して出力する。   Further, the image display device 108 can display not only an image but also arbitrary information alone or together with the image. It is also possible to display camera status display, character information such as shutter speed, aperture value, sensitivity information selected by the user or determined by the camera, and a graph such as luminance distribution measured by the image processing circuit 50. The display position and display color of information can be arbitrarily selected. By displaying these various types of information, a user interface can be provided. The image display device 108 can also display image data stored in the image storage medium 82. If the image data is compressed, the image data is decompressed by the compression / decompression block 32 and the data is expanded in the VRAM 34. The expanded data is converted into analog data by the D / A circuit 36 and output.

画像記憶媒体82は不揮発性のものであり、画像記憶媒体インタフェース80を介して、主に撮影した画像データを記憶することが可能である。画像データの記憶に関しては、例えば、フォルダ階層を持たせたり、撮影した順にフォルダやファイル名が昇順に命名されるようにすることができる。各画像データには、絞り値やシャッタ速度、ISO感度などの撮影情報や、撮影した時刻などを付加することができ、それらを画像データと共に記憶することが可能となっている。さらに、記憶した画像データの読み出しはもちろん、画像の複製、移動、消去も可能である。   The image storage medium 82 is non-volatile, and can mainly store captured image data via the image storage medium interface 80. Regarding the storage of image data, for example, a folder hierarchy can be provided, or folders and file names can be named in ascending order in the order of shooting. Shooting information such as aperture value, shutter speed, ISO sensitivity, shooting time, and the like can be added to each image data, and these can be stored together with the image data. Furthermore, the stored image data can be read out, and the image can be copied, moved, and deleted.

また、86は、プリンタやPC、表示装置等の外部装置であって、外部機器インタフェース84を介して接続される。   Reference numeral 86 denotes an external device such as a printer, a PC, or a display device, which is connected via an external device interface 84.

図2は、図1に示す撮像装置の外観図を示す。図2(a)に示すように、撮像装置の前面には撮影レンズ10が配置され、被写体像をとらえることができる。撮影レンズ10の同一面にフラッシュ90が配置されている。主被写体が暗い場合にフラッシュ90を発光させることで十分な光量を得ることができ、暗い中でも速いシャッタ速度を保ち、好適な画像を得ることができる。図2では撮影レンズ10とフラッシュ90が同一面に配置されているが、本発明はこれに限るものではなく、例えば、フラッシュ光が直接主被写体に当たることを避けるために、フラッシュがカメラ上部に向くように配置してもよい。   FIG. 2 shows an external view of the imaging apparatus shown in FIG. As shown in FIG. 2A, a photographing lens 10 is disposed on the front surface of the imaging apparatus, and a subject image can be captured. A flash 90 is disposed on the same surface of the photographic lens 10. A sufficient amount of light can be obtained by causing the flash 90 to emit light when the main subject is dark, and a suitable image can be obtained while maintaining a high shutter speed even in the dark. In FIG. 2, the photographing lens 10 and the flash 90 are arranged on the same plane, but the present invention is not limited to this. For example, in order to avoid the flash light directly hitting the main subject, the flash faces the upper part of the camera. You may arrange as follows.

上述したように、暗い環境下で人物をフラッシュ撮影した際、人物の目が赤く写ってしまう赤目現象が知られている。これは、暗い環境下では目の瞳孔が大きくなりやすく、その状態でフラッシュを発光するとフラッシュ光が網膜に映りこみ、それが写真として赤く写ってしまう現象である。   As described above, a red-eye phenomenon is known in which a person's eyes appear red when a person is flash-photographed in a dark environment. This is a phenomenon in which the pupil of the eye tends to be large in a dark environment, and when the flash is emitted in this state, the flash light is reflected on the retina and appears red as a photograph.

図2(b)に示すように、撮像装置の背面に画像表示装置108が配置されている。前述したように、画像表示装置108には画像のみならず、文字情報やグラフなどを表示することができ、ユーザーとインタフェースをとる重要な部材となっている。近年デジタルカメラでは電子ビューファインダ(EVF:ElectricalViewFinder)が主流となっており、画像表示装置108に出力される連続画像を参照することで被写体を捕らえ、ファインダーとして使用している。このとき、AEやAFにおける測光領域情報、測距領域情報をライブ画像に重畳して表示することも可能である。さらに、被写体の認識状況として、人物の顔を認識した結果として、人物の顔に枠を重畳させて表示したり、青空、夕陽、逆光など、背景シーンの状況を認識してアイコンで表示するなどが可能となっている。   As shown in FIG. 2B, an image display device 108 is disposed on the back surface of the imaging device. As described above, not only images but also character information and graphs can be displayed on the image display device 108, which is an important member for interfacing with the user. In recent years, an electronic viewfinder (EVF: Electric ViewFinder) has become mainstream in digital cameras, and a subject is captured by referring to a continuous image output to the image display device 108 and used as a viewfinder. At this time, the photometry area information and distance measurement area information in AE and AF can be displayed superimposed on the live image. Furthermore, as the recognition status of the subject, as a result of recognizing the person's face, a frame is superimposed on the person's face, or the background scene situation such as blue sky, sunset, backlight, etc. is recognized and displayed as an icon, etc. Is possible.

また、従来からの光学ファインダ106を併設する構成とすることも可能である。電子ビューファインダーは、高い視野率を実現し易い、画像表示装置108の大きさによっては被写体が大きく見易い、撮影画像とファインダ画像の画角差(パララックス)が無い、などのメリットがある。その反面、撮像素子16や画像表示装置108を動作させるための電力が必要となり、電池の消耗が早くなることが懸念される。このため、電池の消耗を避けて多くの撮影枚数が望まれる場合には、電子ビューファインダー機能をOFFにし、光学ファインダ106を使用するという使い方も可能である。   In addition, a conventional optical finder 106 may be provided. The electronic viewfinder has advantages such that it is easy to realize a high field of view, the subject is easy to see depending on the size of the image display device 108, and there is no field angle difference (parallax) between the captured image and the viewfinder image. On the other hand, power is required to operate the image sensor 16 and the image display device 108, and there is a concern that the battery will be consumed quickly. For this reason, when a large number of shots are desired while avoiding battery consumption, the electronic viewfinder function can be turned off and the optical viewfinder 106 can be used.

モード切替スイッチ110は、静止画撮影モード、動画撮影モード、画像認識モード、再生モードなどのカメラ動作モードを切り替えることができる。ここでは、数モードを切り替え可能な部材として表現するが、撮影する特定のシーンに最適化した、風景撮影モードや人物撮影モードなどの多くの静止画モードを備えることも可能である。   The mode switch 110 can switch camera operation modes such as a still image shooting mode, a moving image shooting mode, an image recognition mode, and a playback mode. Here, although expressed as a member capable of switching several modes, it is possible to provide many still image modes such as a landscape shooting mode and a person shooting mode optimized for a specific scene to be shot.

パラメータ選択スイッチ群151a〜151eにより、測距領域や測光モードをはじめとする撮影時の撮影条件の選択や、撮影画像再生時のページ送り、カメラの動作設定全般などをユーザーが選択することができる。さらに前述の電子ファインダーのOn/Offを選択することもできる。また、画像表示装置108は画像を表示すると共に、タッチパネルとして入力装置となる構成とすることもできる。   The parameter selection switch groups 151a to 151e allow the user to select shooting conditions such as a distance measurement area and a photometry mode, shooting page playback, and overall camera operation settings. . Furthermore, On / Off of the above-described electronic viewfinder can be selected. Further, the image display device 108 can display an image and can be configured as an input device as a touch panel.

撮像装置の上部にはシャッタスイッチ104が配置されている。シャッタスイッチ104は操作部材の1つであるが、ボタンを浅く押下する場合(SW1)と深く押下する場合(SW2)の2段階の押下操作により、撮影の準備及び開始を指示する。カメラで自動露出制御や自動ピント制御を行うカメラの場合、シャッタスイッチ104を浅く押すことで撮影準備として自動露出制御とピント制御が行われ、深く押すことで静止画撮影や画像認識の指示を行う操作が実現可能である。   A shutter switch 104 is disposed above the image pickup apparatus. The shutter switch 104 is one of the operation members. The shutter switch 104 instructs the preparation and start of photographing by a two-step pressing operation when the button is pressed lightly (SW1) and when the button is pressed deeply (SW2). In the case of a camera that performs automatic exposure control and automatic focus control with a camera, automatic exposure control and focus control are performed as a preparation for shooting by pressing the shutter switch 104 shallowly, and instructions for still image shooting and image recognition are performed by pressing the shutter switch 104 deeply. Operation is feasible.

自動露出制御は、モード切替スイッチ110で選択されている撮影モードで好適な露出を得るように動作する。撮影モードには、例えば、ポートレートモードや風景モード、夜景モード、といった特定の被写体に特化したものや、オートモードといった汎用的なモードがある。また、シャッタ速度優先モードや絞り優先モードなど、撮影時のシャッタ速度や絞り値をあらかじめユーザーが指定しておくモードもある。これらのモードでは、PGA回路20で設定する撮影感度を自動で好適に選択設定したり、予めユーザーが感度を指定することができる。ユーザーが予め感度を指定する際、撮影感度を上げるほど画像信号のS/N比が低下するため、画質を優先したいユーザーは低感度を選択することが想定される。またAF制御は、各撮影モードで好適なピンと合わせが可能なように動作を切り替えることができる。たとえば風景モードでは主被写体が遠側にあることが想定されるため、その周辺のみを測距したりすることが可能である。   The automatic exposure control operates so as to obtain a suitable exposure in the shooting mode selected by the mode switch 110. The shooting mode includes, for example, a mode specialized for a specific subject such as a portrait mode, a landscape mode, and a night view mode, and a general mode such as an auto mode. There is also a mode in which the user designates the shutter speed and aperture value at the time of shooting, such as the shutter speed priority mode and the aperture priority mode. In these modes, the photographing sensitivity set by the PGA circuit 20 can be automatically selected and set appropriately, or the user can designate the sensitivity in advance. When the user designates the sensitivity in advance, the S / N ratio of the image signal decreases as the shooting sensitivity is increased. Therefore, it is assumed that the user who wants to give priority to the image quality selects the low sensitivity. The AF control can be switched so that a suitable pin can be aligned in each shooting mode. For example, in the landscape mode, it is assumed that the main subject is on the far side, and therefore it is possible to measure the distance only in the vicinity thereof.

このような構成からなる撮像装置で人物を撮影すると、人物の顔を検出した結果、カメラ側でピント、露出、色を好適に調節してくれるために、ユーザーに大きなメリットがある。   When a person is photographed with the image pickup apparatus having such a configuration, since the face of the person is detected and the camera side adjusts the focus, exposure, and color appropriately, there is a great merit for the user.

図3にその様子を示す。図3において(a)は、シャッタスイッチ104のSW1のON時点でAE、AFを行った際の状況を示し、(b)は、SW2のONによりフラッシュ発光量の決定と撮影を行った際の状況を示している。図3に示す例では、SW1のON時の被写体301の位置と、SW2のON時の被写体301の位置がほぼ同じである場合を示している。この場合、ピント合わせや露出決定時と実際の撮影時とで被写体の位置に差が無く、露出決定時の人物の顔検出結果302と撮影時の人物の顔検出結果302にもズレが無いため、好適な画像を得ることができる。   This is shown in FIG. 3A shows the situation when AE and AF are performed when SW1 of the shutter switch 104 is turned on, and FIG. 3B shows the state when the flash emission amount is determined and the photographing is performed when SW2 is turned on. Indicates the situation. The example shown in FIG. 3 shows a case where the position of the subject 301 when SW1 is ON and the position of the subject 301 when SW2 is ON are substantially the same. In this case, there is no difference in the position of the subject between focusing and exposure determination and actual shooting, and there is no deviation between the human face detection result 302 at the time of exposure determination and the human face detection result 302 at the time of shooting. A suitable image can be obtained.

しかし、SW1のON時とSW2のON時とで被写体の状況が変化していた場合、好適な画像が得られない場合がある。図4にその様子を示す。図4(a)に示すSW1のON時に被写体301は画面左側に位置し、その位置において人物の顔の検出も正しく行われている。その後、図4(b)に示すSW2のON時には被写体301が画面右側に移動しているものとする。この場合、SW1のON時のピントや露出を決定した際の顔検出位置302から、SW2のON時に大きく離れてしまった状態で予備発光を行ってフラッシュ発光量を決定し、フラッシュ撮影を行うことになる。そのため、被写体301顔が存在しない位置302に顔があるつもりでフラッシュ発光量を決定して撮影動作を行ってしまうため、撮影結果として、図4(c)に示すような、主被写体が適正露出から外れた画像が撮影されてしまう場合がある。また、フラッシュ発光せずに撮影動作を行う場合であっても、露出を決定したSW1のON時と撮影動作時で被写体301の輝度が変化してしまったときは、主被写体が適正露出から外れた画像が撮影されてしまう場合がある。   However, when the state of the subject has changed between when SW1 is turned on and when SW2 is turned on, a suitable image may not be obtained. This is shown in FIG. When SW1 shown in FIG. 4A is ON, the subject 301 is located on the left side of the screen, and the human face is correctly detected at that position. Thereafter, it is assumed that the subject 301 has moved to the right side of the screen when SW2 shown in FIG. In this case, flash shooting is performed by determining the flash emission amount by performing preliminary light emission in a state in which the focus detection and exposure when SW1 is turned on are far away from the face detection position 302 when SW2 is turned on. become. For this reason, the shooting operation is performed by determining the flash emission amount with the intention that the face is located at the position 302 where the face of the subject 301 does not exist. Therefore, the main subject as shown in FIG. In some cases, an image out of the range may be taken. Even if the shooting operation is performed without flash emission, if the brightness of the subject 301 changes between the time when SW1 that determines the exposure is turned on and the time when the shooting operation is performed, the main subject deviates from the proper exposure. May be taken.

このような現象は、SW1のON時の顔検出結果を基にして焦点調節や露出制御を行う仕様のカメラでおき、弊害が出やすくなる。SW1をONに保持した状態でも顔検出を行い、その検出結果に応じて露出やピントを被写体に追従させる仕様のカメラの場合は弊害を軽減することができる。しかしながら、それをもってしても、顔検出にはある程度の処理時間がかかってしまうため、実際の被写体の動きには追従しきることができず、根本的に問題を解決することはできない。   Such a phenomenon occurs in a camera with a specification that performs focus adjustment and exposure control based on a face detection result when SW1 is ON, and is likely to cause harmful effects. The adverse effect can be reduced in the case of a camera that performs face detection even when SW1 is held ON, and that follows exposure and focus according to the detection result. However, even with that, it takes a certain amount of processing time to detect the face, so it cannot follow the actual movement of the subject and cannot fundamentally solve the problem.

図5は、本発明の実施の形態における被写体移動に対応して好適な露出や色を再現するための様子を示す。ここで、図5(a)に示すように、SW1のON時の被写体301の位置とその時の顔検出位置302は画面左側に位置し、その後、図5(b)に示すようにSW2のON時に被写体301が画面右側に移動してしまった状態で撮影したものとする。この場合、図5(c)に示すように、被写体301の明るさが適正露出で撮影されなかったとしても、撮影した画像データから顔検出を行うことで、被写体301が画面右側にいることを検知する。そして、この検知結果を用い、顔検出位置310の明るさが適正露出に近づくように画像処理回路50で明るさを調節することで、図5(d)に示すように好適な画像を得る。   FIG. 5 shows a state for reproducing suitable exposure and color corresponding to the movement of the subject in the embodiment of the present invention. Here, as shown in FIG. 5 (a), the position of the subject 301 when SW1 is turned on and the face detection position 302 at that time are located on the left side of the screen, and then SW2 is turned on as shown in FIG. 5 (b). It is assumed that the image is taken with the subject 301 sometimes moved to the right side of the screen. In this case, as shown in FIG. 5C, even if the brightness of the subject 301 is not photographed with proper exposure, the subject 301 is on the right side of the screen by performing face detection from the photographed image data. Detect. Then, using this detection result, the image processing circuit 50 adjusts the brightness so that the brightness of the face detection position 310 approaches the appropriate exposure, thereby obtaining a suitable image as shown in FIG.

画像認識回路38では、画像データから人物の顔の位置、大きさ、信頼度(本当に人物の顔かどうかに関する情報)などからなる人物の顔検知を行うと共に、さらに、フラッシュ撮影時に人物の目が赤く写ってしまう赤目現象の検知を行う。そして赤目現象を検知した場合、画像処理回路50においてその赤目を黒く塗りつぶすように画像処理することで、赤目補正を行うことができる。   The image recognition circuit 38 detects a person's face from the image data based on the position, size, reliability (information about whether the person is really a person's face), and the like. Detects red-eye phenomenon that appears red. When the red-eye phenomenon is detected, red-eye correction can be performed by performing image processing in the image processing circuit 50 so that the red eye is painted black.

この赤目補正を行うにあたり、先に図5(c)で説明したような、撮影後の顔検出及び撮影後の明るさ補正を行っていない場合で、赤目補正がどのような影響を受けるかを図6及び図7を参照して説明する。   In performing the red-eye correction, how the red-eye correction is affected when face detection after shooting and brightness correction after shooting are not performed as described above with reference to FIG. This will be described with reference to FIGS.

図6(a)は、撮影後の顔検出及び撮影後の明るさ補正を行わず、被写体301である人物が適正露出より暗い状態になってしまった場合を示す。図6(b)に示すように、赤目を検出するためには、まず、被写体301の顔を検出する。図6(a)に示す例では、被写体301は適正露出よりも暗く撮影されてしまっており、顔検出の精度が十分ではない場合がある。図6(b)では顔検出ができたものとして顔検出位置310として記しているが、これが顔として認識されない場合、次の工程の赤目検出自体を行うことができなくなる。仮に顔検出ができた場合、被写体301の顔検出位置310を基に目領域320を設定し、その中で人物の目が赤目になっているか否かを画像認識回路38にて検出する。この赤目検出処理も、被写体301が暗い状態で検出を行うことになり、暗さと共に適切な色再現もできていない状況では赤目検出の精度が十分ではない場合がある。   FIG. 6A shows a case where the person who is the subject 301 is darker than the appropriate exposure without performing face detection after shooting and brightness correction after shooting. As shown in FIG. 6B, in order to detect red eyes, first, the face of the subject 301 is detected. In the example shown in FIG. 6A, the subject 301 is photographed darker than the appropriate exposure, and the accuracy of face detection may not be sufficient. In FIG. 6B, the face detection position 310 is described as a face detected, but if this is not recognized as a face, the red eye detection itself in the next step cannot be performed. If face detection is possible, an eye area 320 is set based on the face detection position 310 of the subject 301, and the image recognition circuit 38 detects whether or not the human eye is red-eye. This red-eye detection process is also performed when the subject 301 is dark, and the accuracy of red-eye detection may not be sufficient in a situation where appropriate color reproduction is not possible along with the darkness.

図7は、撮影後の顔検出及び撮影後の明るさ補正を行い、主被写体である人物が適正露出になっている場合を示す。この場合、赤目検出用の顔検出では、図7(a)に示すように被写体301の明るさが適正であるために、図7(b)に示すように高い精度で検出することができる。さらに、図7(c)に示すように、顔検出位置310を基にして設定した目領域320から赤目を検出する場合、明るさ、色が適切に再現されているために高い精度で赤目検出を行うことができる。この検出結果を基に画像処理回路50で赤目補正を行う際も、図6のように人物が暗い場合に比べて、適切な赤目補正が可能となる。   FIG. 7 shows a case where face detection after shooting and brightness correction after shooting are performed, and the person who is the main subject has proper exposure. In this case, the face detection for red-eye detection can be detected with high accuracy as shown in FIG. 7B because the brightness of the subject 301 is appropriate as shown in FIG. 7A. Further, as shown in FIG. 7C, when detecting red eyes from the eye region 320 set based on the face detection position 310, the brightness and color are appropriately reproduced, so that the red eyes are detected with high accuracy. It can be performed. Even when red-eye correction is performed by the image processing circuit 50 based on the detection result, appropriate red-eye correction can be performed as compared with the case where the person is dark as shown in FIG.

このように、SW2のONに応じて実際に撮影を行った後、撮影した画像データから人物の顔を検出し、その顔検出結果を基に顔の明るさや色を好適に画像処理することで、結果的に赤目補正率が向上する。しかしながら、単にな処理の追加を行っただけでは撮影にかかる時間が延びてしまい、レスポンス良く瞬間を切り取るカメラとしては好ましいことではない。   In this way, after actually taking a picture in response to SW2 being turned on, the face of a person is detected from the taken image data, and the brightness and color of the face are suitably image-processed based on the face detection result. As a result, the red-eye correction rate is improved. However, simply adding processing increases the time required for shooting, which is not preferable as a camera that cuts out the moment with good response.

そこで、図8に、撮影及び画像処理全体にかかる時間を延ばすことなく、撮影後に顔検出を行って顔を好適に画像処理するためのタイミングチャートを示す。   Therefore, FIG. 8 shows a timing chart for performing face detection suitably after photographing and performing face image processing appropriately without extending the time taken for the whole photographing and image processing.

図8において、「VD」は撮像素子16の駆動信号の一つである垂直同期信号である。EVFや動画撮影中など、一定周期で露光と、露光により各画素に蓄積された画像信号の読み出しを行う場合はVDも一定周期になるのが基本である。なお、撮像素子16の駆動方法を切り替える場合や、図のような静止画撮影シーケンスにおいて露光データを読み出す直前にVD期間を適切に制御するため、周期性は失われる場合があるが、図8では模式的に一定周期で示している。「シャッタ」は、撮像素子16に所定時間露光したのち、これ以上撮像素子16に露光を行わないように遮光するためのシャッタ閉タイミングを示している。「処理」における「露光時間」が撮像素子16を露光している期間となる。   In FIG. 8, “VD” is a vertical synchronization signal that is one of the drive signals of the image sensor 16. When performing exposure at a constant cycle and reading out image signals accumulated in each pixel by exposure, such as during EVF or moving image shooting, VD is also basically at a fixed cycle. Note that the periodicity may be lost when the driving method of the image sensor 16 is switched or the VD period is appropriately controlled just before the exposure data is read out in the still image shooting sequence as shown in FIG. This is schematically shown at a constant period. “Shutter” indicates a shutter closing timing for shielding light so that the image sensor 16 is no longer exposed after the image sensor 16 is exposed for a predetermined time. The “exposure time” in “processing” is a period during which the image sensor 16 is exposed.

シャッタ12を閉じた後、画像信号を読み出す作業を行う。図8では全データを6フィールドに分けて、5行おきに読み出す仕様の撮像素子での読み出しの様子を示している。R1〜R6が各フィールドの読み出しに相当し、VDに同期して読み出しが行われる。読み出したデータは一時記憶メモリ30に格納され、画像処理回路50で画像処理するために一時記憶メモリ30から読み出される。この処理を図では「現像」として表現している。   After the shutter 12 is closed, an operation for reading an image signal is performed. FIG. 8 shows a state in which all data is divided into 6 fields and read by an image sensor having a specification of reading every 5 rows. R1 to R6 correspond to reading of each field, and reading is performed in synchronization with VD. The read data is stored in the temporary storage memory 30 and read from the temporary storage memory 30 for image processing by the image processing circuit 50. This process is expressed as “development” in the figure.

フラッシュ発光を行わない撮影の場合、現像後の画像データを圧縮記録するが、フラッシュ発光を行った撮影の場合、赤目補正のための処理が行われる。まず、現像後の画像データを読み出し、顔検出処理を行う。この時、現像後の画像の輝度が適切であれば精度の高い顔検出ができるが、人物の顔が暗いなどの場合、十分な精度で顔検出ができない可能性がある。そこで本発明では現像前に顔検出を行い、その顔検出結果をもって人物の顔の明るさが適正に処理されるように、現像処理を行う。これにより、赤目補正のための顔検出を高い精度で行うことができるようになる。   In the case of shooting without flash emission, image data after development is compressed and recorded, but in the case of shooting with flash emission, processing for red-eye correction is performed. First, the developed image data is read and face detection processing is performed. At this time, if the brightness of the developed image is appropriate, highly accurate face detection can be performed, but if the face of a person is dark, face detection may not be possible with sufficient accuracy. Accordingly, in the present invention, face detection is performed before development, and development processing is performed so that the brightness of a person's face is appropriately processed based on the face detection result. As a result, face detection for red-eye correction can be performed with high accuracy.

現像前の顔検出は、人物の顔の明るさが適正ではない可能性があるため、赤目補正用に行う現像後の顔検出に対し、顔検出条件を緩く設定して現像前の顔検出を行う。なお、一部のフィールドから画像信号を読み出した段階では、フィールド画像は垂直方向に間引かれた状態となっている。そのため、このフィールド画像を縦横比の間引き率が揃うように解像度変換した画像データを生成し、この画像データに対して現像前の顔検出が行われる。これにより、人物の顔の明るさが適正ではない場合であっても顔と思われるものを顔として検出し、現像にて画像処理を行う。また、図8では現像前の顔検出を第2フィールドの読み出しが終了した時点で第1及び第2フィールド画像に対して顔検出を行うようにしているが、本発明はこれに限るものでは無い。例えば、顔検出に十分な画像データが読み出せた時点で現像前の顔検出を行うようにしても良い。現像前の顔検出は一部のフィールドから画像信号を読み出した段階で行われるため、現像後の顔検出よりも小さい解像度の画像データに対して行われることになる。   The face detection before development may not be appropriate for the brightness of the person's face, so the face detection conditions before the development are set loosely with respect to the face detection after development for red-eye correction. Do. Note that at the stage where image signals are read from some fields, the field images are thinned out in the vertical direction. For this reason, image data is generated by converting the resolution of the field image so that the thinning ratios of the aspect ratio are uniform, and face detection before development is performed on the image data. Thereby, even if the brightness of a person's face is not appropriate, what appears to be a face is detected as a face, and image processing is performed by development. In FIG. 8, face detection before development is performed on the first and second field images at the time when reading of the second field is completed, but the present invention is not limited to this. . For example, face detection before development may be performed when image data sufficient for face detection can be read. Since face detection before development is performed at the stage of reading out an image signal from a part of the field, it is performed on image data having a smaller resolution than face detection after development.

このように、人物の顔の明るさが適正となった状態で赤目補正用の顔検出を行い、その後、顔検出結果から人物の目の位置に対し、赤目現象が発生しているかどうかを検査する。現像後の画像データは、明るさが適切に処理されていると共に、色再現も適切に行われているので、赤が赤として画像処理され易くなっている。このため、赤色を探す赤目検出処理においても検出精度が高まり、良好な赤目検出結果を得ることができる。この赤目検出結果をもって、一時記憶メモリ30に格納されている画像データの赤目位置の色情報を黒色に置き換えるように赤目補正処理を行う。   In this way, face detection for red-eye correction is performed in a state where the brightness of the person's face is appropriate, and then it is inspected from the face detection result whether a red-eye phenomenon has occurred for the position of the person's eyes. To do. Since the image data after development is appropriately processed for brightness and color reproduction is also performed appropriately, red is easily processed as red. For this reason, in the red-eye detection process for searching for red, the detection accuracy is improved, and a good red-eye detection result can be obtained. With this red-eye detection result, a red-eye correction process is performed so that the color information of the red-eye position of the image data stored in the temporary storage memory 30 is replaced with black.

図9は、露光データの読み出しをフィールド分割せずに、1度の読み出しで行うように撮像素子16を駆動する場合のタイミングを示す。基本シーケンスは図8に示すものと同様である。読み出した画像信号を一時記憶メモリ30に格納してから顔検出を行うのではなく、画像信号を読み出しながら、その画像信号をそのまま画像認識回路38に入力して顔検出を行うことで、現像前の顔検出の開始が、画像信号の読み出しと同時に行われる。なお、上述したように、読み出した画像信号は垂直方向に間引かれた状態となっているため、読み出した画像信号から更に一部の画像信号を選択して縦横比の間引き率を揃えた画像データを画像認識回路38に入力している。画像信号の読み出しが完了した後、一時記憶メモリ30に格納された画像データを再度読み出すシーケンスとした場合、データ読み出しと顔検出にかかる時間がそのまま撮影所要時間として加算されてしまう。そのため、読み出した画像信号をそのまま顔検出にかけるシーケンスとすることで、撮影所要時間の遅延を抑えることが可能となる。   FIG. 9 shows the timing when the image sensor 16 is driven so that the exposure data is read out once without dividing the field. The basic sequence is the same as that shown in FIG. Rather than storing the read image signal in the temporary storage memory 30 and performing face detection, the image signal is input to the image recognition circuit 38 as it is while reading the image signal, and face detection is performed. The face detection is started simultaneously with the reading of the image signal. As described above, since the read image signal is thinned out in the vertical direction, a part of the image signal is further selected from the read image signal and the thinning ratio is adjusted. Data is input to the image recognition circuit 38. When the sequence for reading the image data stored in the temporary storage memory 30 again after the completion of the reading of the image signal is made, the time required for data reading and face detection is added as it is as the time required for photographing. For this reason, it is possible to suppress a delay in the required shooting time by using a sequence in which the read image signal is directly subjected to face detection.

図10は、本実施の形態における撮影及び画像処理の手順を示すフローチャートである。   FIG. 10 is a flowchart showing the procedures of photographing and image processing in the present embodiment.

カメラ起動後、撮影モードが選択されると、撮影処理が開始され(ステップS201)、画像表示装置108を電子ビューファインダ(EVF)として機能させるために、ライブビューに用いる画像の読み出し及び出力を開始する。開始と共に、ライブビュー画像の画質を適切にするために、ステップS203において露出制御(AE)、ステップS205においてホワイトバランス制御(AWB)、ステップS207においてフォーカス制御(AF)が行われる。なお、これらの処理の順番は、上記の処理順に限るものではなく、逆であっても、また、その一部または全部を並行して行っても良い。   When a shooting mode is selected after the camera is activated, shooting processing is started (step S201), and reading and outputting of an image used for live view is started in order to cause the image display device 108 to function as an electronic viewfinder (EVF). To do. At the start, exposure control (AE) is performed in step S203, white balance control (AWB) is performed in step S205, and focus control (AF) is performed in step S207 in order to make the image quality of the live view image appropriate. Note that the order of these processes is not limited to the above-described process order, and may be reversed, or some or all of them may be performed in parallel.

ステップS203におけるAEでは、被写体輝度の変化に追従して、絞り14の開口径、TG24の制御による撮像素子16の電荷掃き捨てタイミング(電子シャッタ)、PGA回路20のゲインを制御する。これらの制御により、撮像素子16により得られる画像信号の信号レベルが所定の範囲内となるように周期的に動作し続ける。ステップS205におけるAWBでは、光源に応じて被写体の色が適切になるように周期的に動作し続ける。また、ステップS207におけるAFは、主被写体に合焦し続けるように周期的に撮影レンズ10を駆動して合焦制御を行う。   In AE in step S203, the aperture diameter of the diaphragm 14, the charge sweeping timing (electronic shutter) of the image sensor 16 by the control of the TG 24, and the gain of the PGA circuit 20 are controlled following the change in the subject brightness. By these controls, the image signal obtained by the image sensor 16 continues to operate periodically so that the signal level is within a predetermined range. In AWB in step S205, the operation continues periodically so that the color of the subject becomes appropriate according to the light source. The AF in step S207 performs focusing control by periodically driving the photographing lens 10 so as to keep focusing on the main subject.

AE、AWB、AFが動作するのと並行して、画像データ中に人物の顔の存在を検出する顔検出処理を動作させる(ステップS209)、顔が検出できた場合は、AE、AWB、AFでもその顔検出結果を利用し、人物の顔の画質が適切になるように動作を行う。   In parallel with the operation of AE, AWB, and AF, a face detection process for detecting the presence of a human face in the image data is operated (step S209). If a face is detected, AE, AWB, and AF are detected. However, using the face detection result, the operation is performed so that the image quality of the person's face is appropriate.

撮像装置の使用者が撮影を行おうとして、シャッタスイッチ104を押下してSW1がONとなったことを検出すると(ステップS211)、静止画撮影のための露光条件を決定するためのAE処理が行われる(ステップS213)。ここでは、SW1ON前までの被写体輝度の状況や、顔検出結果を基にして、静止画撮影時に使用する絞り値、シャッタ速度、感度(ゲイン)を決定する。この時、被写体が暗く、シャッタ速度が遅くなるために画像がブレる可能性が高いと判断された場合には、静止画撮影においてフラッシュ光を発光するかどうかも合わせて決定する。撮像装置の仕様によっては、フラッシュ光の発光、非発光をあらかじめユーザーが指定できるものもあり、その場合は指定されている設定に従う。続いて、被写体への焦点調節制御を   When the user of the imaging apparatus attempts to shoot and detects that SW1 is turned on by pressing the shutter switch 104 (step S211), an AE process for determining an exposure condition for still image shooting is performed. This is performed (step S213). Here, the aperture value, shutter speed, and sensitivity (gain) used at the time of still image shooting are determined based on the state of the subject brightness before SW1 is turned on and the face detection result. At this time, if it is determined that there is a high possibility that the image will be blurred because the subject is dark and the shutter speed is slow, it is also determined whether to emit flash light in still image shooting. Depending on the specifications of the imaging device, there are those in which the user can specify in advance whether the flash light is emitted or not, and in this case, the specified setting is followed. Next, focus adjustment control on the subject

行う(ステップS215)。ステップS207におけるSW1がONとなる前のAFで被写体におおよそ合焦しているが、ここではSW1ON後に再度、静止画撮影のための高精度な焦点調節制御を行う。
静止画撮影のための露出条件が確定し、合焦状態となってからSW1がOFFとなった場合(ステップS217でYES)は撮影を中止し、EVF用のAE(ステップS203)、AWB(ステップS205)、AF(ステップS207)を再開する。一方、SW2がONとなった場合には(ステップS219でYES)、静止画の撮影を開始する。
This is performed (step S215). In step S207, the subject is substantially focused by AF before SW1 is turned on. Here, after SW1 is turned on, high-precision focus adjustment control for still image shooting is performed again.
If the exposure condition for still image shooting is determined and SW1 is turned off after the focus state is reached (YES in step S217), shooting is stopped, AE for EVF (step S203), AWB (step S205), AF (step S207) is resumed. On the other hand, if SW2 is turned on (YES in step S219), still image shooting is started.

まず、ステップS213において静止画用の露出を決定した際に合わせて決定された、フラッシュ発光の有無に応じ、フラッシュ発光撮影を行う場合には、撮影時の発光量を決定する調光処理が行われる(ステップS223)。ここでは、所定の発光量でフラッシュをプリ発光させ、反射光の強度を測ることで、被写体の距離や反射率を含めた被写体の状況を把握し、静止画撮影時の発光量を決定する処理が行われる。ここまでで撮影に必要な条件は揃ったため、次に実際の撮影及び撮影した画像の画像処理を行う(ステップS300)。撮影及び画像処理を終えると、ステップS217に戻って、上記処理を繰り返す。   First, when performing flash photography according to the presence / absence of flash emission determined when the exposure for the still image is determined in step S213, a light control process for determining the light emission amount at the time of photography is performed. (Step S223). Here, the flash is pre-flashed with a predetermined light emission amount, and the intensity of the reflected light is measured, so that the subject condition including the distance and reflectance of the subject is grasped, and the light emission amount during still image shooting is determined. Is done. Since the conditions necessary for photographing have been prepared so far, next actual photographing and image processing of the photographed image are performed (step S300). When shooting and image processing are completed, the process returns to step S217 to repeat the above processing.

図11は、ステップS300で行われる撮影及び画像処理動作の詳細を示すフローチャートである。   FIG. 11 is a flowchart showing details of the photographing and image processing operations performed in step S300.

撮像素子16への露光を開始する前に、絞り14の開口径を、ステップS213で求めた静止画撮影用の開口径に制御する(ステップS303)。次に、ステップS305において撮像素子16への露光を開始する。フォーカルプレーンシャッタのように露光開始と終了のいずれもメカシャッタの開閉により行う撮像装置の場合は、ここでメカシャッタが開くことになる。一方、露光の開始前にメカシャッタを開いておき、露光開始を撮像素子16の電荷を電子的に掃き捨てる電子シャッタにより行う構成の場合、ここで撮像素子16の電荷掃き捨て制御を行うことで露光を開始する。   Before the exposure to the image sensor 16 is started, the aperture diameter of the diaphragm 14 is controlled to the aperture diameter for still image shooting obtained in step S213 (step S303). Next, exposure to the image sensor 16 is started in step S305. In the case of an imaging apparatus that performs both opening and closing of exposure by opening and closing the mechanical shutter, such as a focal plane shutter, the mechanical shutter is opened here. On the other hand, when the mechanical shutter is opened before the start of exposure and the exposure is started by an electronic shutter that electronically sweeps away the charge of the image sensor 16, exposure is performed by performing charge sweep control of the image sensor 16 here. To start.

フラッシュを発光して撮影を行う場合(ステップS307でYES)、露光中に発光を行う(ステップS309)。発光量は、図10のステップS223で事前に決められたものを使用するが、撮像装置の仕様によっては発光量、発光タイミングをユーザーが任意に指定できるものもあるため、その場合はユーザー設定に従って発光制御を行う。図10のステップS213で決められた露光時間の経過を見てシャッタ12を閉じることで、露光を終了する(ステップS311)。そして、撮像素子16から画像信号を読み出す前に、画像信号の信号レベルを調節するためのPGA回路20で用いるゲインを設定する。このゲインは、デジタルカメラとしては感度としてユーザーに機能提供されている。   When shooting is performed with the flash fired (YES in step S307), light is emitted during exposure (step S309). The light emission amount is determined in advance in step S223 in FIG. 10. However, depending on the specifications of the imaging apparatus, there is a light emission amount and light emission timing that can be arbitrarily specified by the user. Perform light emission control. When the exposure time determined in step S213 in FIG. 10 elapses and the shutter 12 is closed, the exposure ends (step S311). Then, before reading the image signal from the image sensor 16, the gain used in the PGA circuit 20 for adjusting the signal level of the image signal is set. This gain is provided to the user as a sensitivity as a digital camera.

図11は、図8と同様に、撮像素子16全体から、画像信号を6フィールドに分割して読み出すものとし、フィールド毎に順次読み出しを行う(ステップS315、S317、S321、S323、S325、S327)。ここでは、第1フィールドと第2フィールドの読み出しが完了し(ステップS315、S317)、一時記憶メモリ30にデータが格納された時点で、現像用の顔検出(第1の顔検出工程)を開始する(ステップS319)。前述したように、どのフィールドの画像データを用いてを顔検出を行うかはこの限りではない。また、この時の画像データは人物の顔の明るさが適正ではない可能性があるため、顔検出の検出条件を緩く設定しておく。   In FIG. 11, as in FIG. 8, the image signal is divided into six fields and read out from the entire image sensor 16 and is sequentially read out for each field (steps S <b> 315, S <b> 317, S <b> 321, S <b> 323, S <b> 325, S <b> 327). . Here, when the reading of the first field and the second field is completed (steps S315 and S317) and the data is stored in the temporary storage memory 30, the face detection for development (first face detection step) is started. (Step S319). As described above, which field of image data is used for face detection is not limited to this. In addition, since the brightness of the face of the person in the image data at this time may not be appropriate, the detection conditions for the face detection are set loosely.

撮像素子16全体からの画像信号の読み出しと、現像用の顔検出が終了すると、画像処理回路50でどのような現像処理を行うかを決定する。顔が検出されていれば、検出された顔が適切になるように、画像の色(AWB)の調節量(ステップS329)及び画像の明るさの調節量(ステップS331)を決定し、これらの調節量を用いて、画像の現像処理を行う(ステップS333)。この現像処理により、人物の顔の明るさや色が適切に再現されるようになる。あとは前述した通り、現像済みの画像データを用いて、赤目補正のための精度の高い顔検出(第2の顔検出工程)(ステップS335)と、赤目検出(ステップS337)とを行う。そして、赤目が検出された場合には、ステップS339でフラッシュ撮影が行われたかを判断する。フラッシュ撮影が行われていなければそのまま処理終了し、行われていれば、赤目補正処理を実行する(ステップS341)。   When the reading of the image signal from the entire image sensor 16 and the development face detection are completed, the image processing circuit 50 determines what kind of development processing is performed. If a face is detected, the image color (AWB) adjustment amount (step S329) and the image brightness adjustment amount (step S331) are determined so that the detected face is appropriate. Image development processing is performed using the adjustment amount (step S333). By this development processing, the brightness and color of a person's face can be appropriately reproduced. After that, as described above, using the developed image data, highly accurate face detection (second face detection step) for red-eye correction (step S335) and red-eye detection (step S337) are performed. If red-eye is detected, it is determined in step S339 whether flash photography has been performed. If flash photography has not been performed, the processing is terminated as is, and if it has been performed, red-eye correction processing is executed (step S341).

図12は、ステップS300で行われる撮影及び画像処理動作の詳細を示すフローチャートであるが、図9で説明したように、フィールド分割せずに撮像素子16全体から画像信号を読み出す場合の処理を示している。図11との差異は、以下の2点である。即ち、ステップS315、S317、S321、S323、S325、S317の代わりに、ステップS417において撮像素子16の前画素からの読み出しを行い、この読み出し開始と同時に、ステップS415において、現像用顔検出を行うことである。これ以外の処理は、図11と同様であるため、ここでは説明を省略する。   FIG. 12 is a flowchart showing details of the photographing and image processing operations performed in step S300. As described with reference to FIG. 9, the processing when the image signal is read from the entire image sensor 16 without field division is shown. ing. The difference from FIG. 11 is the following two points. That is, instead of steps S315, S317, S321, S323, S325, and S317, reading from the previous pixel of the image sensor 16 is performed in step S417, and simultaneously with the start of the reading, development face detection is performed in step S415. It is. Since the other processes are the same as those in FIG. 11, the description thereof is omitted here.

上記の通り本実施の形態によれば、撮影画像した画像データから人物の顔検出を行い人物の顔の明るさや色を好適に画像処理する。これにより、撮影前の撮影準備時点から実際の撮影までに被写体が動いてしまったとしても、良好な撮影画像が得ることができると共に、赤目補正のための顔検出および赤目検出精度が向上する。   As described above, according to the present embodiment, a human face is detected from captured image data, and the brightness and color of the human face are appropriately image-processed. Thereby, even if the subject moves from the shooting preparation time before shooting to the actual shooting, a good shot image can be obtained, and the face detection and red-eye detection accuracy for red-eye correction are improved.

さらに、この効果を得るにあたり、撮影にかかる処理時間を延ばすことなく実現することができ、レスポンスよく瞬間を切り取るカメラとして高い性能を備えることが可能となる。   Furthermore, in order to obtain this effect, it can be realized without extending the processing time for photographing, and it is possible to provide high performance as a camera that cuts out the moment with good response.

<他の実施形態>
なお、本発明は、複数の機器(例えばホストコンピュータ、インターフェイス機器、カメラヘッドなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、デジタルビデオカメラ、デジタルスチルカメラなど)に適用してもよい。
<Other embodiments>
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a camera head, etc.), or a device (for example, a digital video camera, a digital still camera, etc.) including a single device. You may apply to.

また、本発明の目的は、以下の様にして達成することも可能である。まず、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給する。そして、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行する。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   The object of the present invention can also be achieved as follows. First, a storage medium (or recording medium) that records a program code of software that implements the functions of the above-described embodiments is supplied to a system or apparatus. Then, the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、以下のようにして達成することも可能である。即ち、読み出したプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合である。ここでプログラムコードを記憶する記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、ROM、RAM、磁気テープ、不揮発性のメモリカード、CD−ROM、CD−R、DVD、光ディスク、光磁気ディスク、MOなどが考えられる。また、LAN(ローカル・エリア・ネットワーク)やWAN(ワイド・エリア・ネットワーク)などのコンピュータネットワークを、プログラムコードを供給するために用いることができる。   Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the following can be achieved. That is, when the operating system (OS) running on the computer performs part or all of the actual processing based on the instruction of the read program code, the functions of the above-described embodiments are realized by the processing. It is. Examples of the storage medium for storing the program code include a flexible disk, hard disk, ROM, RAM, magnetic tape, nonvolatile memory card, CD-ROM, CD-R, DVD, optical disk, magneto-optical disk, MO, and the like. Can be considered. Also, a computer network such as a LAN (Local Area Network) or a WAN (Wide Area Network) can be used to supply the program code.

本発明の実施の形態における撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device in embodiment of this invention. 図1に示す撮像装置の外観を示す図である。It is a figure which shows the external appearance of the imaging device shown in FIG. 撮影前と撮影時の、被写体位置と顔認識結果と撮影結果の一例を示す図である。It is a figure which shows an example of a to-be-photographed object position, face recognition result, and a photography result before imaging | photography. 撮影前と撮影時で被写体が移動した場合の顔認識結果と撮影結果の一例を示す図である。It is a figure which shows an example of the face recognition result and imaging | photography result when a to-be-photographed object moves before imaging | photography and at the time of imaging | photography. 撮影前と撮影時で被写体が移動した場合の顔認識結果と撮影結果及び撮影後の補正処理結果の一例を示す図である。It is a figure which shows an example of the face recognition result when a to-be-photographed object moved before and during imaging, an imaging result, and a correction processing result after imaging. 暗く撮れた人物に対する赤目補正処理を説明するための図である。It is a figure for demonstrating the red eye correction process with respect to the person who was photographed darkly. 適正な明るさで撮れた人物に対する赤目補正処理を説明するための図である。It is a figure for demonstrating the red-eye correction process with respect to the person who image | photographed with appropriate brightness. 本発明の実施の形態における撮影及び補正処理のタイミングを示すタイミングチャートである。It is a timing chart which shows the timing of imaging | photography and correction | amendment processing in embodiment of this invention. 本発明の実施の形態における撮影及び補正処理の別のタイミングを示すタイミングチャートである。It is a timing chart which shows another timing of photography and correction processing in an embodiment of the invention. 本発明の実施の形態における撮影手順を示すフローチャートである。It is a flowchart which shows the imaging | photography procedure in embodiment of this invention. 本発明の実施の形態における撮影処理を示すフローチャートである。It is a flowchart which shows the imaging | photography process in embodiment of this invention. 本発明の実施の形態における撮影処理を示すフローチャートである。It is a flowchart which shows the imaging | photography process in embodiment of this invention.

符号の説明Explanation of symbols

16 撮像素子
38 画像認識回路
50 画像処理回路
60 システム制御部
16 Image sensor 38 Image recognition circuit 50 Image processing circuit 60 System control unit

Claims (10)

画像信号から人の顔を検出する処理を行う顔検出手段と、
前記顔検出手段により検出された顔から、赤目を検出する処理を行う赤目検出手段と、
前記画像信号に対して、少なくとも輝度及び色の補正を含む現像処理を行う現像手段と、
前記赤目検出手段により検出された赤目を補正する赤目補正手段と、
制御手段とを有し、
前記制御手段は、
前記顔検出手段を制御して、前記画像信号から顔を検出する処理を行わせ、
前記顔検出手段により顔が検出された場合に、前記現像手段を制御して、該検出された顔に基づいて前記現像処理を行わせ、
前記顔検出手段を制御して、前記現像処理した画像信号から顔を検出する処理を行わせ、
前記現像処理した画像信号から顔が検出された場合に、前記赤目検出手段を制御して、該現像処理した画像信号から検出した顔から赤目を検出する処理を行わせる
ことを特徴とする撮像装置。
Face detection means for performing processing for detecting a human face from an image signal;
Red-eye detection means for performing processing for detecting red eyes from the face detected by the face detection means;
Developing means for performing development processing including at least luminance and color correction on the image signal;
Red-eye correction means for correcting red eyes detected by the red-eye detection means;
Control means,
The control means includes
Controlling the face detection means to perform a process of detecting a face from the image signal;
When a face is detected by the face detecting means, the developing means is controlled to perform the developing process based on the detected face;
Controlling the face detection means to perform a process of detecting a face from the developed image signal;
When a face is detected from the developed image signal, the red-eye detection unit is controlled to perform a process of detecting red eyes from the face detected from the developed image signal. .
被写体の光学像を画像信号に変換する撮像素子を更に有し、
前記制御手段は、前記現像処理される前の画像信号から顔を検出する処理を、前記撮像素子から該画像信号を読み出す処理と並行して行うように、前記顔検出手段を制御することを特徴とする請求項1に記載の撮像装置。
An image sensor that converts an optical image of the subject into an image signal;
The control means controls the face detection means so that a process of detecting a face from the image signal before the development process is performed in parallel with a process of reading the image signal from the image sensor. The imaging apparatus according to claim 1.
前記現像処理される前の画像信号から顔を検出する処理では、前記現像処理した画像信号から顔を検出する処理よりも、解像度の低い画像を用いることを特徴とする請求項1または2に記載の撮像装置。   3. The process for detecting a face from the image signal before the development process uses an image having a lower resolution than the process for detecting a face from the image signal after the development process. Imaging device. 前記制御手段は、更に、前記画像信号がフラッシュ撮影して得られた画像信号であれば、前記赤目検出手段により検出された赤目に対して赤目の補正を行わせ、フラッシュ撮影して得られた画像信号でなければ、該赤目の補正を行わないように、前記赤目補正手段を制御することを特徴とする請求項1乃至3のいずれか1項に記載の撮像装置。   If the image signal is an image signal obtained by flash photography, the control means further performs red-eye correction on the red eye detected by the red-eye detection means, and is obtained by flash photography. The imaging apparatus according to any one of claims 1 to 3, wherein the red-eye correction unit is controlled so that the red-eye correction is not performed if the image signal is not an image signal. 前記制御手段は、前記現像処理の後に行う顔の検出に用いる検出条件を、前記現像処理の前に行う顔の検出に用いる検出条件よりも厳しくしたことを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。   5. The control unit according to claim 1, wherein a detection condition used for face detection performed after the development processing is made stricter than a detection condition used for face detection performed before the development processing. The imaging apparatus of Claim 1. 前記制御手段は、前記顔検出手段により顔が検出されなかった場合に、顔に基づかない現像処理を行うように前記現像手段を制御することを特徴とする請求項1乃至5のいずれか1項に記載の撮像装置。   6. The control unit according to claim 1, wherein the control unit controls the development unit to perform a development process that is not based on a face when a face is not detected by the face detection unit. The imaging device described in 1. 画像信号から人の顔を検出する処理を行う第1の顔検出工程と、
前記第1の顔検出工程で顔が検出された場合に、該検出された顔に基づいて前記画像信号に対して、少なくとも輝度及び色の補正を含む現像処理を行う現像工程と、
前記現像処理した画像信号に対して顔を検出する処理を行う第2の顔検出工程と、
前記第2の顔検出工程で顔が検出された場合に、該検出された顔から赤目を検出する処理を行う赤目検出工程と、
前記赤目検出工程で検出された赤目を補正する赤目補正工程と
を有することを特徴とする赤目補正方法。
A first face detection step for performing processing for detecting a human face from an image signal;
A development step of performing development processing including at least luminance and color correction on the image signal based on the detected face when a face is detected in the first face detection step;
A second face detection step of performing a process of detecting a face on the developed image signal;
A red-eye detection step of performing a process of detecting red eyes from the detected face when a face is detected in the second face detection step;
A red-eye correction step of correcting the red-eye detected in the red-eye detection step.
撮像素子から前記画像信号を読み出す読み出し工程を更に含み、
前記第1の顔検出工程を、前記読み出し工程と並行して行うことを特徴とする請求項7に記載の赤目補正方法。
A reading step of reading the image signal from the image sensor;
The red-eye correction method according to claim 7, wherein the first face detection step is performed in parallel with the reading step.
コンピュータに、請求項7または8に記載の赤目補正方法の各工程を実行させるためのプログラム。   The program for making a computer perform each process of the red-eye correction method of Claim 7 or 8. 請求項9に記載のプログラムを格納したことを特徴とするコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 9.
JP2008215921A 2008-08-25 2008-08-25 Imaging apparatus and red-eye correction method Expired - Fee Related JP5448391B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008215921A JP5448391B2 (en) 2008-08-25 2008-08-25 Imaging apparatus and red-eye correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008215921A JP5448391B2 (en) 2008-08-25 2008-08-25 Imaging apparatus and red-eye correction method

Publications (3)

Publication Number Publication Date
JP2010050933A true JP2010050933A (en) 2010-03-04
JP2010050933A5 JP2010050933A5 (en) 2011-10-06
JP5448391B2 JP5448391B2 (en) 2014-03-19

Family

ID=42067619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008215921A Expired - Fee Related JP5448391B2 (en) 2008-08-25 2008-08-25 Imaging apparatus and red-eye correction method

Country Status (1)

Country Link
JP (1) JP5448391B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014212502A (en) * 2013-04-22 2014-11-13 株式会社ザクティ Electronic camera
CN113516593A (en) * 2020-04-10 2021-10-19 杭州海康威视数字技术股份有限公司 Human eye image detection and restoration method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000305141A (en) * 1999-04-21 2000-11-02 Olympus Optical Co Ltd Electronic camera
JP2004201228A (en) * 2002-12-20 2004-07-15 Fuji Photo Film Co Ltd Method and device for extracting face area
JP2005191687A (en) * 2003-12-24 2005-07-14 Canon Inc Image processing apparatus and method thereof, and image pickup apparatus
JP2007067934A (en) * 2005-08-31 2007-03-15 Canon Inc Imaging apparatus and its control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000305141A (en) * 1999-04-21 2000-11-02 Olympus Optical Co Ltd Electronic camera
JP2004201228A (en) * 2002-12-20 2004-07-15 Fuji Photo Film Co Ltd Method and device for extracting face area
JP2005191687A (en) * 2003-12-24 2005-07-14 Canon Inc Image processing apparatus and method thereof, and image pickup apparatus
JP2007067934A (en) * 2005-08-31 2007-03-15 Canon Inc Imaging apparatus and its control method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014212502A (en) * 2013-04-22 2014-11-13 株式会社ザクティ Electronic camera
CN113516593A (en) * 2020-04-10 2021-10-19 杭州海康威视数字技术股份有限公司 Human eye image detection and restoration method
CN113516593B (en) * 2020-04-10 2024-02-27 杭州海康威视数字技术股份有限公司 Human eye image detection and restoration method

Also Published As

Publication number Publication date
JP5448391B2 (en) 2014-03-19

Similar Documents

Publication Publication Date Title
JP4644883B2 (en) Imaging device
JP4626425B2 (en) Imaging apparatus, imaging method, and imaging program
JP5061188B2 (en) Digital single-lens reflex camera
US7893969B2 (en) System for and method of controlling a parameter used for detecting an objective body in an image and computer program
JP4615458B2 (en) Exposure control method and imaging apparatus
JP4510768B2 (en) Imaging apparatus and method, and program
JP2007264196A (en) Strobe control unit and method
KR20120128441A (en) Digital photographing apparatus and control method thereof
JP2007311861A (en) Photographic apparatus and method
JP5064926B2 (en) Imaging apparatus and control method thereof
JP4509081B2 (en) Digital camera and digital camera program
JP5759190B2 (en) Imaging apparatus and control method thereof
JP2009081808A (en) Device, method and program for controlling photographing, and photographing apparatus
US20080024644A1 (en) System for and method of taking image
JP2007096455A (en) Photographing apparatus
JP4977569B2 (en) Imaging control apparatus, imaging control method, imaging control program, and imaging apparatus
JP5159536B2 (en) Imaging apparatus, control method thereof, and program
JP6758950B2 (en) Imaging device, its control method and program
JP5618765B2 (en) Imaging apparatus and control method thereof
JP4182864B2 (en) Electronic camera
JP5448391B2 (en) Imaging apparatus and red-eye correction method
JP2005260879A (en) Digital camera
JP2009033386A (en) Photographing device and method
JP6410416B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2007028486A (en) Digital camera

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110823

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110823

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130225

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130417

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131224

R151 Written notification of patent or utility model registration

Ref document number: 5448391

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees