JP5383308B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP5383308B2
JP5383308B2 JP2009114447A JP2009114447A JP5383308B2 JP 5383308 B2 JP5383308 B2 JP 5383308B2 JP 2009114447 A JP2009114447 A JP 2009114447A JP 2009114447 A JP2009114447 A JP 2009114447A JP 5383308 B2 JP5383308 B2 JP 5383308B2
Authority
JP
Japan
Prior art keywords
face
main subject
image processing
subject
faces
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009114447A
Other languages
Japanese (ja)
Other versions
JP2010263550A (en
Inventor
篤史 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009114447A priority Critical patent/JP5383308B2/en
Publication of JP2010263550A publication Critical patent/JP2010263550A/en
Application granted granted Critical
Publication of JP5383308B2 publication Critical patent/JP5383308B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は顔検出が可能な画像処理装置に関するものである。   The present invention relates to an image processing apparatus capable of detecting a face.

顔検出機能を持つデジタルカメラにおいて、被写体が目をつむっていたことに起因する失敗画像を低減するための技術として目つむり検出機能が知られている。   In a digital camera having a face detection function, a blind eye detection function is known as a technique for reducing a failed image caused by the subject's eyes closing.

目つむり検出機能の手順は以下のようである。まず撮像された画像に対して、顔検出機能により顔領域の検出を行う。顔検出機能によって顔領域が決定すると、各顔に対して目つむり検出機能により目をつむっているかどうかの検出を行う。目つむりが発見された場合、失敗画像を防ぐ手段として、以下の二つの方法が一般的である。   The procedure of the eyebrows detection function is as follows. First, a face area is detected from a captured image by a face detection function. When the face area is determined by the face detection function, it is detected whether or not each face is closed by the eye detection function. The following two methods are generally used as means for preventing a failed image when a blindness is found.

被写体が目をつむっていると検出した場合、自動的に連写撮影を行い、目をつむっていない状態の画像を取得する(特許文献1を参照)。   When it is detected that the subject has closed eyes, continuous shooting is automatically performed to obtain an image without closing eyes (see Patent Document 1).

被写体が目をつむっていると検出した場合、目をつむっている旨の警告表示をユーザに対して行い、再撮影を促す(特許文献2を参照)。   When it is detected that the subject has closed eyes, a warning display to the effect that the eyes are closed is given to the user to encourage re-shooting (see Patent Document 2).

このようにすると、目つむりしていない画像を撮影できるように、カメラが補助することが可能となる。   In this way, the camera can assist so that an unbroken image can be taken.

特開2003−287784JP 2003-287784 A 特開2007−49631JP2007-49631

しかしながらどちらの方式においても、ユーザが撮影したい対象とは別の被写体が画像内に存在する場合、図10(A)のようにユーザが所望する被写体とは別の人物の目つむりが検出され、連写や目つむり警告の表示を行ってしまうという問題があった。これは、ユーザにとっては煩わしい表示となってしまう。また、余計な人物に対しても目つむりの検出処理をしているため、必要以上の処理時間を取られることとなる。   However, in both methods, when there is a subject in the image that is different from the subject that the user wants to shoot, as shown in FIG. There was a problem that continuous shooting and eyebrows warnings were displayed. This is an annoying display for the user. In addition, since eyebrows detection processing is performed for an extra person, it takes more processing time than necessary.

これに対して、図10(B)のように、被写界の中央部一定範囲内に存在する顔や、ある一定以上の顔サイズを持つ顔のみを被写体として取り扱うことにより、前記問題を解決する方法が考えられる。しかし、このように目つむり検出を行う領域を限定したとしても、図10(C)のような集合写真の撮影の際においては、一定範囲外の人物や画像中における顔サイズの小さい人物に目つむり検出機能が働かなくなるという課題があった。   On the other hand, as shown in FIG. 10B, the problem is solved by treating only a face existing within a certain range of the center of the object scene or a face having a certain face size or more as a subject. A way to do this is considered. However, even if the area for detecting eyebrows is limited in this way, when taking a group photo as shown in FIG. 10C, it is necessary to focus on people who are out of a certain range or who have a small face size in the image. There was a problem that the pick detection function stopped working.

これは目つむり検出を行う場合だけでなく、赤目補正を行う場合でも同様の課題と言える。   This can be said to be the same problem not only in the case of detecting eyebrows but also in the case of performing red-eye correction.

また、検出した顔を解析して、その顔が誰であるかを特定する個人認証は、その処理が複雑であるため処理時間を有する。そこで、処理時間を効率化するために、予め関係のなさそうな人物は個人認証の対象から外すことが考えられる。この場合も、上述した目つむり検出や赤目補正と同様に、検出された複数の顔の中から、ユーザが撮影したい対象のみを抽出することが求められる。   In addition, the personal authentication that analyzes the detected face and identifies who the face is is complicated, and has a processing time. Therefore, in order to improve the processing time, it is conceivable that persons who do not seem to be related in advance are excluded from the objects of personal authentication. In this case as well, it is required to extract only the target that the user wants to shoot from among the detected faces, as in the above-described eye-brow detection and red-eye correction.

本発明は、ユーザが撮影対象としていない人物に対し、画像解析、または、画像処理結果の表示が行われてしまうという問題点を解決し、ユーザにとって使い勝手のよい画像処理装置を提供することを課題とする。   It is an object of the present invention to solve the problem that image analysis or display of image processing results is performed on a person who is not a subject of shooting, and to provide an image processing apparatus that is easy to use for the user. And

本発明のその他の課題は、ユーザが任意の被写体を主被写体に変更した場合であっても、ユーザが新たに選択した主被写体を基準として、余計な被写体がどれであるかを判定可能となる。したがって、ユーザが撮影対象として意図する被写体に対してのみ画像解析、または、画像処理結果の表示を行える確率を向上させることである。   Another problem of the present invention is that even when the user changes an arbitrary subject to the main subject, it is possible to determine which extra subject is based on the main subject newly selected by the user. . Therefore, it is to improve the probability that the image analysis or the display of the image processing result can be performed only on the subject that the user intends to shoot.

上記課題を解決するために、本発明の画像処理装置は、画像データから顔を検出する顔検出手段と、前記顔検出手段から複数の顔が検出された場合に、いずれかの顔を主被写体として選択する主被写体選択手段と、前記主被写体選択手段により主被写体として選択されなかった顔の中から、前記主被写体として選択された顔との相関に基づいて、関連被写体としての顔を選択する関連被写体選択手段と、前記顔検出手段により検出された顔に対して所定の画像処理を行う画像処理手段と、操作部を有し、前記主被写体選択手段は、前記操作部における第1の操作に応じて前記主被写体としての顔を選択し、前記関連被写体選択手段は、前記第1の操作よりも後の前記操作部における第2の操作に応じて前記関連被写体としての顔を選択し、前記画像処理手段は、前記主被写体選択手段、及び、前記関連被写体選択手段により選択された顔に対して前記所定の画像処理を行い、それ以外の顔に対しては前記所定の画像処理を行わないことを特徴とする。
同様に上記課題を解決するために、本発明の画像処理装置は、画像データから顔を検出する顔検出手段と、前記顔検出手段から複数の顔が検出された場合に、いずれかの顔を主被写体として選択する主被写体選択手段と、前記主被写体選択手段により主被写体として選択されなかった顔の中から、前記主被写体として選択された顔との相関に基づいて、関連被写体としての顔を選択する関連被写体選択手段と、前記顔検出手段により検出された顔に対して所定の画像処理を行う画像処理手段と、操作部を有し、前記主被写体選択手段は、前記操作部における第1の操作に応じて前記主被写体としての顔を選択し、前記関連被写体選択手段は、前記第1の操作よりも後の前記操作部における第2の操作に応じて前記関連被写体としての顔を選択し、前記画像処理手段は、前記主被写体選択手段、及び、前記関連被写体選択手段により選択された顔に対して前記所定の画像処理の結果の表示を行い、それ以外の顔に対しては前記所定の画像処理の結果の表示を行わないことを特徴とする。
In order to solve the above-described problems, an image processing apparatus according to the present invention includes a face detection unit that detects a face from image data, and a plurality of faces detected from the face detection unit. And selecting a face as a related subject based on a correlation with the face selected as the main subject from the main subject selection means selected as the main subject and the face not selected as the main subject by the main subject selection means A related subject selection unit; an image processing unit that performs predetermined image processing on the face detected by the face detection unit; and an operation unit , wherein the main subject selection unit includes a first operation in the operation unit. And the related subject selecting means selects the face as the related subject in accordance with a second operation in the operation unit after the first operation, Previous The image processing means performs the predetermined image processing on the face selected by the main subject selection means and the related subject selection means, and does not perform the predetermined image processing on the other faces. It is characterized by that.
Similarly, in order to solve the above-described problems, an image processing apparatus according to the present invention detects a face from image data, and detects a face when a plurality of faces are detected from the face detection means. Based on the correlation between the main subject selecting means for selecting as the main subject and the face not selected as the main subject by the main subject selecting means, the face as the related subject is selected. A related subject selection unit to be selected; an image processing unit that performs predetermined image processing on the face detected by the face detection unit; and an operation unit, wherein the main subject selection unit is a first unit in the operation unit. The related subject selection means selects the face as the related subject according to a second operation in the operation unit after the first operation. The image processing means displays the result of the predetermined image processing for the face selected by the main subject selecting means and the related subject selecting means, and for the other faces, the predetermined image processing result is displayed. The result of the image processing is not displayed.

本発明により、画像処理装置の利便性を向上させることが可能となった。   According to the present invention, the convenience of the image processing apparatus can be improved.

本発明のその他の効果は、余計な被写体に対しては目つむりの警告表示が行われないため、ユーザにとって煩わしい表示となることを抑止することが可能となった。   Another effect of the present invention is that a blinding warning display is not performed on an extra subject, so that it is possible to prevent the display from being annoying for the user.

本発明のその他の効果は、ユーザが被写体として意図していない人物に対しては個人認証などの時間を要する画像解析を行わないため、被写体を区別しない処理に比べ、処理時間を短縮することが可能となった。   Another advantage of the present invention is that it does not perform time-consuming image analysis such as personal authentication for a person that the user does not intend as a subject, so that the processing time can be shortened compared to processing that does not distinguish the subject. It has become possible.

本発明の実施形態に係る撮像装置の構成を示すブロック図1 is a block diagram showing a configuration of an imaging apparatus according to an embodiment of the present invention. 本発明の実施形態に係る画像処理部の機能を示すブロック図The block diagram which shows the function of the image process part which concerns on embodiment of this invention 本発明の実施形態1に係る撮像装置の全体的な動作を示すフローチャート1 is a flowchart showing the overall operation of an imaging apparatus according to Embodiment 1 of the present invention. 本発明の実施形態に係る顔検出のアルゴリズムを示すフローチャートThe flowchart which shows the algorithm of the face detection which concerns on embodiment of this invention 本発明の実施形態に係る主被写体選択のアルゴリズムを示すフローチャート6 is a flowchart showing an algorithm for main subject selection according to the embodiment of the present invention. 本発明の実施形態に係る関連被写体選択のアルゴリズムを示すフローチャート6 is a flowchart showing an algorithm for selecting a related subject according to an embodiment of the present invention. 本発明の実施形態に係る目つむり検出のアルゴリズムを示すフローチャートThe flowchart which shows the algorithm of the eyelid detection which concerns on embodiment of this invention 本発明の実施形態2に係る撮像装置の全体的な動作を示すフローチャート7 is a flowchart showing the overall operation of the imaging apparatus according to the second embodiment of the present invention. 本発明の実施形態3に係る撮像装置の全体的な動作を示すフローチャート7 is a flowchart showing the overall operation of an imaging apparatus according to Embodiment 3 of the present invention. 本発明が解決する従来技術の課題に関する説明図Explanatory drawing about the subject of the prior art which this invention solves

(実施形態1)
本実施形態では、主被写体、及び、関連被写体に対しては目つむり検出を行い、それ以外の顔に対しては目つむり検出を行わない実施形態について説明する。
(Embodiment 1)
In the present embodiment, an embodiment will be described in which eyebrows detection is performed for the main subject and related subjects, and eyebrows detection is not performed for other faces.

〔撮像装置の構成について〕
図1は本発明の実施形態における画像処理装置の構成を示すものである。
[Configuration of imaging device]
FIG. 1 shows the configuration of an image processing apparatus according to an embodiment of the present invention.

本実施形態においては画像処理装置の一例として、デジタルカメラを例に挙げ説明する。   In the present embodiment, a digital camera will be described as an example of an image processing apparatus.

101は撮影レンズや絞り装置を含み、被写体から反射された光学像の光量や焦点の位置を調整するため光学系である。   Reference numeral 101 denotes an optical system that includes a photographic lens and a diaphragm device, and adjusts the amount of light and the focal position of the optical image reflected from the subject.

102は光学像を電気信号に変換するCCDやCMOSセンサ等で構成される撮像素子である。   Reference numeral 102 denotes an image pickup device composed of a CCD, a CMOS sensor or the like that converts an optical image into an electric signal.

103は撮像素子102から出力されたアナログ信号の画像データをデジタル信号の画像データに変換するA/D(アナログデジタル)変換部である。103のA/D変換部から出力された画像データは、画像処理部104、及び、メモリ制御部105を介して、或いは、直接、メモリ制御部105を介してメモリ106に書き込まれる。   Reference numeral 103 denotes an A / D (analog / digital) converter that converts image data of an analog signal output from the image sensor 102 into image data of a digital signal. Image data output from the A / D conversion unit 103 is written to the memory 106 via the image processing unit 104 and the memory control unit 105 or directly via the memory control unit 105.

104はA/D変換部から出力された画像データに対して、顔検出、画像解析を行う顔の選択、目つむり検出、赤目補正、個人認証などの画像解析処理や画像処理を行う画像処理部である。   An image processing unit 104 performs image analysis processing and image processing such as face detection, face selection for performing image analysis, eye-browsing detection, red-eye correction, and personal authentication on the image data output from the A / D conversion unit. It is.

105はメモリ106への書き込み、または、メモリ106からの読み込みを制御するメモリ制御部である。   A memory control unit 105 controls writing to the memory 106 or reading from the memory 106.

メモリ106には、撮像素子102とA/D変換部103から得られた画像データや、画像処理部104で画像処理を施された画像データや、画像データのサムネイルを含んだ情報や、撮影した画像データの枚数、顔検出数などが書き込まれる。   In the memory 106, image data obtained from the image sensor 102 and the A / D conversion unit 103, image data subjected to image processing by the image processing unit 104, information including thumbnails of the image data, and images taken The number of image data, the number of face detections, etc. are written.

107はシステム制御部であり、このデジタルカメラのシステム全体を制御する。システム制御部107は、画像処理部104に対しての画像解析処理や画像処理の制御を行う他、メモリ106に書き込まれた画像データをファイル化し、I/F(インターフェース)部108を介して記録媒体に記録する。I/F部108はメモリーカードや記録媒体とのインターフェースである。   A system control unit 107 controls the entire system of the digital camera. The system control unit 107 performs image analysis processing and image processing control on the image processing unit 104, and also converts the image data written in the memory 106 into a file and records it via the I / F (interface) unit 108. Record on media. The I / F unit 108 is an interface with a memory card or a recording medium.

109はD/A(デジタルアナログ)変換部であり、メモリ106に書き込まれた画像データをアナログ信号の画像データに変換する。   Reference numeral 109 denotes a D / A (digital / analog) converter, which converts image data written in the memory 106 into image data of an analog signal.

110はD/A変換部109により変換された画像データを表示する、または、撮像素子102で生成された画像データをスルー表示する表示部である。スルー表示とは、連続的に撮像素子102にて画像データが生成され、表示部110に被写体の様子が動画としてリアルタイムで表示されることである。この表示部110は、画像処理部104で処理された画像データや、メモリ106、記録媒体に記録された画像データを表示したり、画像解析処理や画像処理の処理結果を表示したりする。   Reference numeral 110 denotes a display unit that displays the image data converted by the D / A conversion unit 109 or displays the image data generated by the image sensor 102 through. The through display means that image data is continuously generated by the image sensor 102 and the state of the subject is displayed on the display unit 110 in real time as a moving image. The display unit 110 displays the image data processed by the image processing unit 104, the image data recorded in the memory 106 and the recording medium, and displays the results of image analysis processing and image processing.

操作部111はシステム制御部107に各種の動作指示を入力する。なお、操作部の一例としては撮像を指示するレリーズボタン112や、カーソルやメニューを操作するための方向指示ボタン113やタッチパネル114等がある。   The operation unit 111 inputs various operation instructions to the system control unit 107. Examples of the operation unit include a release button 112 for instructing imaging, a direction instruction button 113 for operating a cursor and a menu, a touch panel 114, and the like.

操作部111に含まれるレリーズボタン112は半押しで第1シャッタースイッチ信号SW1を発生する。システム制御部107は、第1シャッタースイッチ信号SW1を検知することにより、AF(オートフォーカス)処理、AE(自動露光)処理、AWB(オートホワイトバランス)処理、EF(フラッシュプリ発光)処理、及び、顔検出処理等の動作を開始する。AF処理とは、光学系101が、光学像の焦点の位置を調整することである。   The release button 112 included in the operation unit 111 generates the first shutter switch signal SW1 when pressed halfway. The system control unit 107 detects the first shutter switch signal SW1, thereby performing AF (autofocus) processing, AE (automatic exposure) processing, AWB (auto white balance) processing, EF (flash pre-flash) processing, Operations such as face detection processing are started. AF processing means that the optical system 101 adjusts the position of the focal point of the optical image.

レリーズボタン112は全押しで第2シャッタースイッチ信号SW2を発生する。システム制御部107は、第2シャッタースイッチ信号SW2を検知することにより、撮像素子102から読み出した画像データを記録媒体に書き込んで保存する撮影処理の動作を開始する。   When the release button 112 is fully pressed, the second shutter switch signal SW2 is generated. By detecting the second shutter switch signal SW2, the system control unit 107 starts an imaging process operation in which the image data read from the image sensor 102 is written and stored in a recording medium.

〔画像処理部の構成について〕
図2は画像処理部104の構成を示すブロック図である。
[Configuration of image processing unit]
FIG. 2 is a block diagram illustrating a configuration of the image processing unit 104.

本実施形態の画像処理部104は顔検出部201、主被写体選択部202、関連被写体選択部203、目つむり検出部204を有している。各処理部はシステム制御部107の制御下において、画像解析処理や画像処理を実行する。   The image processing unit 104 according to the present exemplary embodiment includes a face detection unit 201, a main subject selection unit 202, a related subject selection unit 203, and a blindness detection unit 204. Each processing unit executes image analysis processing and image processing under the control of the system control unit 107.

顔検出部201は画像処理部104に入力された画像データに対して顔領域の検出を行う。顔検出部201によって検出された顔の画像データや、各顔の目の位置や口の位置といった顔検出情報はメモリ106に書き込まれる。顔検出のアルゴリズムについては後述する。   The face detection unit 201 detects a face area for the image data input to the image processing unit 104. The face image data detected by the face detection unit 201 and face detection information such as the eye position and mouth position of each face are written in the memory 106. The face detection algorithm will be described later.

主被写体選択部202は顔検出部201によって複数の顔が検出された場合、顔検出情報に基づいて、画像データに存在する複数の顔のうち主被写体となる顔を選択する。顔がひとつしか検出されなければ、その顔が主被写体となる。   When a plurality of faces are detected by the face detection unit 201, the main subject selection unit 202 selects a face to be a main subject among a plurality of faces existing in the image data based on the face detection information. If only one face is detected, that face becomes the main subject.

主被写体を選択する方法としては、個人認証アルゴリズムなどを用いて予め登録された個人別の優先順位にしたがって選択する方法や、検出された顔領域の位置や、顔のサイズに応じて選択する方法などが一般的である。例えば、特開2008−005438には、画面中央に近いほど、サイズが大きいほど、顔としての条件を満たす程度が高いほど、その顔の重み値を大きく、最も重み値の大きい顔を主被写体とする方法が記載されている。ここでいう、信頼性係数とはその顔が、顔としての条件を満たす程度を示す値である。すなわち、両目、鼻、口の全ての形状が検出されたうえで顔領域であると判定された顔の信頼性係数は、両目と口の形状しか検出されなかったうえで顔領域であると判定された顔の信頼性係数よりも大きな値となる。   As a method of selecting a main subject, a method of selecting according to individual priority order registered in advance using a personal authentication algorithm or the like, a method of selecting according to the position of the detected face area, and the size of the face Etc. are common. For example, in Japanese Patent Application Laid-Open No. 2008-005438, the closer to the center of the screen, the larger the size, and the higher the degree of satisfying the face condition, the larger the weight value of the face, and the face with the largest weight value is defined as the main subject. How to do is described. Here, the reliability coefficient is a value indicating the degree to which the face satisfies the condition as a face. That is, the face reliability coefficient determined after detecting all the shapes of both eyes, nose, and mouth is determined to be the face area after only the shapes of both eyes and mouth are detected. The value is larger than the reliability coefficient of the face.

あるいは、複数検出された顔の中から、ユーザに操作部111に含まれる方向指示ボタン113やタッチパネル114を操作させて、主被写体を選択させるようにしてもよい。主被写体として選択された顔は、主被写体として識別可能な情報を付加した顔検出情報としてメモリ106に書き込まれる。   Alternatively, the user may select the main subject by operating the direction instruction button 113 or the touch panel 114 included in the operation unit 111 from a plurality of detected faces. The face selected as the main subject is written in the memory 106 as face detection information to which information that can be identified as the main subject is added.

関連被写体選択部203は顔検出情報を元に、ユーザにとって画像解析処理、あるいは、画像処理を行うに値する被写体であるか否かを、主被写体として選択された顔との相関に基づいて判定する。画像解析処理、あるいは、画像処理を行うに値する被写体であるならば、その被写体を主被写体に関連する関連被写体として選択する。関連被写体として選択された顔は、関連被写体として識別可能な情報を不可した顔検出情報としてメモリ106に書き込まれる。以下、画像解析処理として目つむり検出を例に説明を行う。   Based on the face detection information, the related subject selection unit 203 determines whether the user is subject to image analysis processing or image processing based on the correlation with the face selected as the main subject. . If the subject is worth performing image analysis processing or image processing, the subject is selected as a related subject related to the main subject. The face selected as the related subject is written in the memory 106 as face detection information in which information that can be identified as the related subject is disabled. In the following, description will be given by taking eyebrows detection as an example of image analysis processing.

目つむり検出部204は、主被写体選択部202、及び、関連被写体選択部203で選択された顔に対して、顔検出部201で得られた顔検出情報を元に目つむり検出を行う。目つむり検出の方法として、例えば、顔から目周辺と推定される領域を抽出する。その抽出された領域の画像データと予めメモリ内に保存された目画像とのテンプレートマッチングにより目が充分に開いているかどうかを判別する方法などが知られている(特開2006−087083を参照)。本発明の目つむり検出のアルゴリズムについては後述する。   The eyebrows detection unit 204 performs eyebrows detection on the face selected by the main subject selection unit 202 and the related subject selection unit 203 based on the face detection information obtained by the face detection unit 201. As a method for detecting eye-opening, for example, an area estimated to be around the eyes is extracted from the face. A method for determining whether or not the eyes are sufficiently open by template matching between the image data of the extracted area and the eye image stored in the memory in advance is known (see Japanese Patent Application Laid-Open No. 2006-070883). . The eyebrows detection algorithm of the present invention will be described later.

なお、図2では、顔検出部201、主被写体選択部202、関連被写体選択部203、及び、目つむり検出部204が、別々の回路にて構成されるものとして説明を行ったが、これらは、全ての機能を有する単一の回路で構成されていても構わない。   In FIG. 2, the face detection unit 201, the main subject selection unit 202, the related subject selection unit 203, and the eyelid detection unit 204 have been described as being configured in separate circuits. It may be configured by a single circuit having all functions.

以上の構成からなる実施例の動作説明を行う。   The operation of the embodiment having the above configuration will be described.

〔デジタルカメラの全体的な動作〕
図3は本発明に係る撮像装置の全体的な動作を示すフローチャートである。
[Overall operation of digital camera]
FIG. 3 is a flowchart showing the overall operation of the imaging apparatus according to the present invention.

システム制御部107は、静止画を記録する静止画撮影モードが設定されると、ステップS301において、撮像素子102が生成した画像データを表示するスルー表示を開始する。   When the still image shooting mode for recording a still image is set, the system control unit 107 starts through display for displaying the image data generated by the image sensor 102 in step S301.

システム制御部107は、ステップS302において、スルー表示された画像データに人の顔が存在するか否かを検出する顔検出を顔検出部201に行わせる。システム制御部107は、人の顔が検出された場合、画像データにおいて、検出した顔のサイズ(幅や高さや顔の占める画素数など)、位置情報、検出個数、信頼性係数などを顔検出情報としてメモリ106に記憶する。   In step S302, the system control unit 107 causes the face detection unit 201 to perform face detection to detect whether a human face exists in the through-displayed image data. When a human face is detected, the system control unit 107 detects the size of the detected face (width, height, number of pixels occupied by the face, etc.), position information, detected number, reliability coefficient, etc. in the image data. The information is stored in the memory 106 as information.

続いてステップS303において、システム制御部107は、第1シャッタースイッチ信号SW1がONしているか否かを判定する。第1シャッタースイッチ信号がOFFの場合は、処理ステップはS302に戻る。第1シャッタースイッチ信号がONの場合は、ステップS304に進む。   Subsequently, in step S303, the system control unit 107 determines whether or not the first shutter switch signal SW1 is ON. If the first shutter switch signal is OFF, the processing step returns to S302. If the first shutter switch signal is ON, the process proceeds to step S304.

次に、ステップS304において、システム制御部107は、主被写体選択部202に、顔検出処理によって検出された顔の中から主被写体を選択させ、それをメモリ106に記憶させる。この主被写体の選択方法の詳細については後述する。   In step S <b> 304, the system control unit 107 causes the main subject selection unit 202 to select a main subject from the faces detected by the face detection process, and stores the main subject in the memory 106. Details of the main subject selection method will be described later.

主被写体選択部202によって主被写体が選択されると、表示部110は、どの顔が主被写体として選択されたのかがわかるように、主被写体として選択された顔にその旨を示す枠を重畳して表示部110に表示する。顔検出部201にて検出された複数の顔に対して既に枠が表示されているのであれば、主被写体として選択された顔に表示される枠だけ色を変えて表示し、ユーザが一目で主被写体としての顔を認識できるようにする。ユーザはこの表示を見て、もし意図した顔と異なる顔が主被写体として選択されているのであれば、一度、第1シャッタースイッチ信号SW1をOFFにしてから、再びONすることで、再度主被写体の選択をやり直すことができる。あるいは、ユーザが操作部111に含まれるタッチパネル114や方向指示ボタン113を操作して、別の顔を主被写体として選択しなおすようにしてもよい。   When the main subject is selected by the main subject selection unit 202, the display unit 110 superimposes a frame indicating that on the face selected as the main subject so that it can be seen which face is selected as the main subject. Are displayed on the display unit 110. If frames are already displayed for a plurality of faces detected by the face detection unit 201, only the frame displayed on the face selected as the main subject is displayed in a different color so that the user can see at a glance. Make it possible to recognize the face as the main subject. The user sees this display, and if a face different from the intended face is selected as the main subject, the main subject is again turned off by turning the first shutter switch signal SW1 off and then on again. You can redo the selection. Alternatively, the user may select another face as the main subject by operating the touch panel 114 or the direction instruction button 113 included in the operation unit 111.

ステップS305において、システム制御部107はAF処理を行って光学系101の焦点をステップS304で選択された主被写体に合わせるとともに、AE処理を行って絞り値、及び、シャッター時間(シャッタースピード)を決定し、メモリ106に記憶する。   In step S305, the system control unit 107 performs AF processing to focus the optical system 101 on the main subject selected in step S304, and performs AE processing to determine an aperture value and a shutter time (shutter speed). And stored in the memory 106.

次に、ステップS306、S307において、システム制御部107は、第1シャッタースイッチ信号SW1と第2シャッタースイッチ信号SW2がONしているか否かを判定する。第1シャッタースイッチ信号SWがONした状態で第2シャッタースイッチ信号SW2がONになると、処理はステップS306からステップS308へと進む。第1シャッタースイッチ信号SW1がOFFになった場合、S302へと戻る。また、第1シャッタースイッチ信号SW1がON、第2シャッタースイッチ信号SW2がOFFの場合は、ステップS306、S307の処理が繰り返される。   Next, in steps S306 and S307, the system control unit 107 determines whether or not the first shutter switch signal SW1 and the second shutter switch signal SW2 are ON. If the second shutter switch signal SW2 is turned on while the first shutter switch signal SW is turned on, the process proceeds from step S306 to step S308. When the first shutter switch signal SW1 is turned off, the process returns to S302. When the first shutter switch signal SW1 is ON and the second shutter switch signal SW2 is OFF, the processes of steps S306 and S307 are repeated.

ステップS308において、システム制御部107は、第2シャッタースイッチ信号SW2を検知したタイミングに応じて、それまでに得られた画像データから求められた露光量に応じて撮像素子102への露光処理を開始する。露光処理により生成された画像データに対して現像処理を施す撮影処理を実行し、その結果をメモリ106に記憶する。   In step S308, the system control unit 107 starts an exposure process on the image sensor 102 according to the exposure amount obtained from the image data obtained so far according to the timing at which the second shutter switch signal SW2 is detected. To do. A photographing process for performing a developing process on the image data generated by the exposure process is executed, and the result is stored in the memory 106.

ステップS309において、システム制御部107は、顔検出部201に、ステップS308にて生成された画像データに対し再び顔検出を行わせる。そして、主被写体選択部202は、検出された複数の顔の中から、ステップS304で主被写体として選択された顔の位置情報及び、サイズとの相関が最も近い顔を、主被写体として選択し、メモリ106に記憶する。   In step S309, the system control unit 107 causes the face detection unit 201 to perform face detection again on the image data generated in step S308. Then, the main subject selection unit 202 selects, from the plurality of detected faces, the face position information selected as the main subject in step S304 and the face having the closest correlation with the size as the main subject, Store in memory 106.

ステップS310において、システム制御部107は、メモリ106に記憶した主被写体として選択された顔とそれ以外の顔との顔の位置情報、顔サイズ、信頼性係数等の相関に基づいて、主被写体と関連性が高いとみなされる顔を関連被写体として選択する。そして、メモリ106にその結果を記憶する。もちろん、顔の位置情報、サイズ、信頼性係数のいずれかの相関のみを用いて関連被写体を選択してもよいし、これら以外の色信号や輝度信号の相関も加味して関連被写体を選択してもよい。   In step S <b> 310, the system control unit 107 determines the main subject based on the correlation between the face position information, the face size, the reliability coefficient, and the like between the face selected as the main subject and the other face stored in the memory 106. A face deemed highly relevant is selected as a related subject. Then, the result is stored in the memory 106. Of course, the related subject may be selected using only one of the correlations of the face position information, the size, and the reliability coefficient, or the related subject may be selected in consideration of other color signal and luminance signal correlations. May be.

次に、ステップS311において、システム制御部107は、ステップS308にて撮影された画像データのうち、主被写体、及び、関連被写体の顔に対して目をつむっているか否かを判定する目つむり検出を行う。目つむり検出の詳細については後述する。   Next, in step S311, the system control unit 107 determines whether or not the eyes of the main subject and the related subject's face are closed in the image data captured in step S308. I do. The details of the detection of eyebrows will be described later.

次に、ステップS312において、システム制御部107は、表示部110にステップS308の撮影処理で得られた画像データのレックレビュー表示を表示部110に表示して行う。レックレビューとは、撮影画像の確認のために、被写体の撮影後記録媒体への記録前に、予め決められた時間だけ画像データを表示部110に表示する処理である。このとき、ステップS311にて目つむりが検出された被写体がいれば、その被写体が目をつむっていることがわかる旨の表示を表示部110で行う。例えば、目をつむっている被写体の目を囲うように枠を画像データに重ねて表示することで目つむりであることをアピールしたり、目をつむっている旨のコメントや画像を画像データに重ねて表示したりする。ユーザはこの表示を見ることで、撮影した画像データ中の被写体が目をつむっていることを認識し、必要であれば撮影をやり直すことが可能となる。   Next, in step S312, the system control unit 107 displays on the display unit 110 a REC review display of the image data obtained by the imaging processing in step S308 on the display unit 110. The REC review is a process of displaying image data on the display unit 110 for a predetermined time before recording on a recording medium after shooting a subject in order to confirm a shot image. At this time, if there is a subject whose eyes are detected in step S311, the display unit 110 displays that the subject knows that the eyes are eye-catching. For example, by displaying a frame over the image data so as to surround the eye of the subject that is pinching the eyes, it is appealing that the eyes are pinching, or a comment or image indicating that the eyes are pinching is overlaid on the image data Or display. By viewing this display, the user can recognize that the subject in the photographed image data has closed his eyes, and can perform the photographing again if necessary.

レックレビュー表示後、ステップS313において、システム制御部107は、撮影処理で得られた画像データを画像ファイルとして記録媒体に対して書き込む記録処理を実行する。   After the REC review display, in step S313, the system control unit 107 executes a recording process in which the image data obtained by the photographing process is written as an image file on the recording medium.

ステップS313の記録処理が終了すると、ステップS314において、システム制御部107は、第2シャッタースイッチ信号SW2のONまたはOFF状態を判定する。第2シャッタースイッチ信号SW2がONの場合は、ステップS314の判定を繰り返し、第2シャッタースイッチ信号SW2がOFFになるのを待つ。この間、上記レックレビュー表示を継続させる。即ち、ステップS312の記録処理が終了した際に、第2シャッタースイッチ信号SW2が放されるまで表示部110におけるレックレビュー表示を継続させる。このように構成することにより、ユーザは、例えばレリーズボタンの全押し状態を継続することで、レックレビューを用いた撮影画像データの目つむりの確認を入念に行うことが可能となる。   When the recording process of step S313 ends, in step S314, the system control unit 107 determines whether the second shutter switch signal SW2 is ON or OFF. If the second shutter switch signal SW2 is ON, the determination in step S314 is repeated, and the process waits for the second shutter switch signal SW2 to be OFF. During this time, the REC review display is continued. That is, when the recording process in step S312 is completed, the REC review display on the display unit 110 is continued until the second shutter switch signal SW2 is released. By configuring in this way, the user can carefully check the blindness of the captured image data using the REC review, for example, by continuously pressing the release button.

次にユーザが例えばレリーズボタン112を全押し状態にして撮影を行った後、レリーズボタンから手を放して全押し状態が解除されると、処理はステップS314からステップS315へ進む。ステップS314において、システム制御部107は、表示部110の表示状態をレックレビュー表示からスルー表示状態に戻す。この処理により、レックレビュー表示によって撮影画像データを確認した後、表示部110の表示状態は次の撮影のために撮像素子102からの画像データを逐次表示するスルー表示状態に自動的に切り替わることになる。   Next, for example, after the user performs shooting with the release button 112 fully pressed, when the user releases the release button to release the fully pressed state, the process proceeds from step S314 to step S315. In step S314, the system control unit 107 returns the display state of the display unit 110 from the REC review display to the through display state. With this processing, after confirming the captured image data by the REC review display, the display state of the display unit 110 is automatically switched to a through display state in which image data from the image sensor 102 is sequentially displayed for the next photographing. Become.

そして、ステップS316において、システム制御部107は、第1シャッタースイッチ信号SW1のON、または、OFFを判定し、第1シャッタースイッチ信号SW1がONの場合はステップS306へ、OFFの場合はステップS302へ処理を戻す。即ち、レリーズボタン112の半押し状態が継続している(第1シャッタースイッチ信号SW1がON)場合は、システム制御部107は次の撮影に備える(ステップS302)。一方、レリーズボタンが放された状態(第1シャッタースイッチ信号SW1がOFF)であったならば、システム制御部107は、一連の撮影動作を終えて撮影待機状態に戻る(ステップS306)。   In step S316, the system control unit 107 determines whether the first shutter switch signal SW1 is ON or OFF. If the first shutter switch signal SW1 is ON, the process proceeds to step S306. If it is OFF, the process proceeds to step S302. Return processing. That is, when the release button 112 is being pressed halfway (the first shutter switch signal SW1 is ON), the system control unit 107 prepares for the next shooting (step S302). On the other hand, if the release button has been released (the first shutter switch signal SW1 is OFF), the system control unit 107 finishes a series of shooting operations and returns to the shooting standby state (step S306).

〔顔検出アルゴリズム〕
次に、前述した顔検出を行う際のアルゴリズムについて図4を用いて詳細に説明する。
[Face detection algorithm]
Next, an algorithm for performing the above-described face detection will be described in detail with reference to FIG.

顔検出部201はシステム制御部107の制御下で、これから説明する各処理を実行する。   The face detection unit 201 executes each process described below under the control of the system control unit 107.

まずステップS401において、システム制御部107は、顔検出対象の画像データを画像処理部104内の顔検出部201に送る。   First, in step S <b> 401, the system control unit 107 sends the image data to be detected to the face detection unit 201 in the image processing unit 104.

次にステップS402において、顔検出部201は、送られた当該画像データに水平方向のバンドパスフィルタを演算する。   In step S402, the face detection unit 201 calculates a horizontal band-pass filter on the sent image data.

ステップS403において、顔検出部201は、ステップS402で処理された画像データに垂直方向のバンドパスフィルタを演算する。これらの演算処理により、画像データより顔のエッジ成分が検出される。   In step S403, the face detection unit 201 calculates a vertical band-pass filter on the image data processed in step S402. By these arithmetic processes, a face edge component is detected from the image data.

次にステップS404において、顔検出部201は、検出されたエッジ成分に関してパターンマッチングを行い、目、鼻、口、及び、耳の顔を構成するパーツの候補群を抽出する。   In step S <b> 404, the face detection unit 201 performs pattern matching on the detected edge component, and extracts a candidate group of parts constituting the eyes, nose, mouth, and ear faces.

そして、ステップS405において、顔検出部201は、ステップS404で絞り込まれた目、鼻、口、及び、耳の候補群の距離や配置された位置から顔の候補領域を推定する。これらの顔候補領域に対して予め設定した条件フィルタを演算することで、最終的に顔を検出する。ここでは、目、鼻、口、及び、耳の候補群の全てがそろっていなくとも、これらの相関距離や配置が顔としての条件を満たしていれば、その領域が顔領域であると判定する。   In step S405, the face detection unit 201 estimates a face candidate region from the distances and positions of the eye, nose, mouth, and ear candidate groups narrowed down in step S404. The face is finally detected by calculating a preset condition filter for these face candidate regions. Here, even if all of the candidate groups for eyes, nose, mouth, and ears are not complete, if these correlation distances and arrangements satisfy the conditions as a face, it is determined that the area is a face area. .

ステップS406において、顔検出部201は、ステップS405による顔の検出結果に応じて上記顔検出情報を出力し、顔検出処理を終了する。この際、システム制御部107は、出力された顔検出情報ある顔の検出数や顔の位置情報、顔サイズ、顔としての条件を満たす程度を示す信頼性係数、検出された顔を識別するためのID等を、メモリ106に記憶する。ここでいう信頼性係数とは例えば、目が2つあるか否か、2つの目の距離はどれくらいか、2つの目の間に鼻が存在するか否か等に基づき決定される。   In step S406, the face detection unit 201 outputs the face detection information according to the face detection result in step S405, and ends the face detection process. At this time, the system control unit 107 identifies the number of detected faces of the output face detection information, the face position information, the face size, a reliability coefficient indicating the degree of satisfying the face condition, and the detected face. Are stored in the memory 106. The reliability coefficient here is determined based on, for example, whether there are two eyes, how far the two eyes are, and whether a nose exists between the two eyes.

尚、上記説明した顔検出アルゴリズム以外の顔検出方法として、顔検出領域を予め設定しておいて、その領域内の顔を検出する方法、顔の色相から顔を検出する方法等がある。   As face detection methods other than the face detection algorithm described above, there are a method in which a face detection area is set in advance and a face in the area is detected, and a face is detected from the hue of the face.

〔主被写体選択アルゴリズム〕
次に、前述した主被写体選択アルゴリズムについて図5を用いて詳細に説明する。
[Main subject selection algorithm]
Next, the above-described main subject selection algorithm will be described in detail with reference to FIG.

主被写体選択部202は、システム制御部107の制御下で、これから説明する各処理を実行する。その際、顔検出処理の過程でメモリ106に記憶された顔検出情報を用いる。   The main subject selection unit 202 executes each process described below under the control of the system control unit 107. At this time, the face detection information stored in the memory 106 in the face detection process is used.

ステップS501において、主被写体選択部202は、ステップS302で検出された顔の検出数をメモリ106に記憶させておくとともに、主被写体選択処理の対象となる顔をカウントするメモリ106のカウンタNを0(ゼロ)に初期化する。   In step S501, the main subject selection unit 202 stores the number of detected faces detected in step S302 in the memory 106 and sets the counter N of the memory 106 that counts the faces to be subjected to the main subject selection process to 0. Initialize to (zero).

次にステップS502において、主被写体選択部202は、顔検出処理で得られた信頼性係数、顔サイズ、顔の位置情報等の顔検出結果をメモリ106から読み出す。   In step S <b> 502, the main subject selection unit 202 reads the face detection results such as the reliability coefficient, the face size, and the face position information obtained by the face detection process from the memory 106.

次にステップS503において、主被写体選択部202は、顔検出処理によって検出された顔の検出数が0か否かを判定する。顔検出数が0である場合には、人物と思われる被写体は存在しないので主被写体処理を終了する。ステップS503において、ひとつ以上の顔が検出された場合には、ステップS504に進む。   In step S503, the main subject selection unit 202 determines whether the number of detected faces detected by the face detection process is zero. When the face detection number is 0, there is no subject that seems to be a person, and the main subject process is terminated. If one or more faces are detected in step S503, the process proceeds to step S504.

次にステップS504において、主被写体選択部202はカウンタNの値を1増やす。   In step S504, the main subject selection unit 202 increments the value of the counter N by 1.

ステップS505において、主被写体選択部202は、顔検出処理によって検出された顔検出数がひとつであるか否かを判定する。検出された顔がひとつである場合は、主被写体と思われる人物は顔検出された人物に特定されるので、検出された顔を主被写体として選択し(ステップS512)、主被写体選択処理を終了する。この際、主被写体選択部202は、メモリ106に選択された顔が主被写体であることが判別可能な情報を付加して顔検出情報を書き込む。   In step S505, the main subject selection unit 202 determines whether or not the number of face detections detected by the face detection process is one. If there is only one detected face, the person who appears to be the main subject is identified as the person whose face is detected, so the detected face is selected as the main subject (step S512), and the main subject selection process is terminated. To do. At this time, the main subject selection unit 202 writes the face detection information by adding information capable of determining that the selected face is the main subject to the memory 106.

ステップS505において、顔検出数がひとつではない、つまり、検出された顔が複数の場合には、ステップS506に進む。   If the number of detected faces is not one in step S505, that is, if there are a plurality of detected faces, the process proceeds to step S506.

ステップS506において、主被写体選択部202は、顔の信頼性係数に基づいて算出される重み1を算出する。ステップS507において、主被写体選択部202は、検出された顔サイズに基づいて算出される重み2を算出する。ステップS508において、主被写体選択部202は、検出された顔の位置情報に基づいて重み3を算出する。ここでいう重みとは、主被写体を選択するための最終重みを計算する際の係数のことである。例えば、顔サイズが0(ピクセル)のときには重みを0、顔サイズが20(ピクセル)のとき重みを0.2、顔サイズが30(ピクセル)のときには重みが0.8になるように設定する。   In step S506, the main subject selection unit 202 calculates weight 1 calculated based on the face reliability coefficient. In step S507, the main subject selection unit 202 calculates a weight 2 calculated based on the detected face size. In step S508, the main subject selection unit 202 calculates weight 3 based on the detected face position information. The weight here is a coefficient for calculating the final weight for selecting the main subject. For example, when the face size is 0 (pixel), the weight is set to 0, when the face size is 20 (pixel), the weight is set to 0.2, and when the face size is 30 (pixel), the weight is set to 0.8. .

また、被写界の中心座標と、顔検出された顔の位置との距離から重みを計算する例を説明する。本実施形態におけるデジタルカメラの表示用画像データのサイズは320(ピクセル)×240(ピクセル)である。そのため三平方の定理を利用して、被写界の中心座標(160,120)と、メモリ106から読み込んだ顔の位置情報(X、Y)とから距離を算出する。距離が10(ピクセル)までは、重み1.0、80(ピクセル)になると重み0.8、距離80(ピクセル)以上離れていたときは重み0.6になるように設定する。   An example in which the weight is calculated from the distance between the center coordinates of the object scene and the face position where the face is detected will be described. The size of the display image data of the digital camera in this embodiment is 320 (pixels) × 240 (pixels). Therefore, the distance is calculated from the center coordinates (160, 120) of the object scene and the position information (X, Y) of the face read from the memory 106 by using the three square theorem. When the distance is 10 (pixels), the weight is set to 1.0 and 80 (pixels), and when the distance is 80 (pixels) or more, the weight is set to 0.6.

また顔の信頼性係数に関しては、目が対で存在し、かつ、鼻、口のパーツが顔検出処理によって抽出された場合は、重みを1.0、目が片方だけ抽出された場合は重みを0.9、鼻と口だけ抽出された場合は0.8というように設定する。   As for the face reliability coefficient, when the eyes exist in pairs and the nose and mouth parts are extracted by face detection processing, the weight is 1.0, and when only one eye is extracted, the weight is Is set to 0.9, and 0.8 is set when only the nose and mouth are extracted.

次に、ステップS509において、算出された重み1から重み3の総和を計算して得られる値をメモリ106に書き込み、ステップS510に進む。尚、ここで算出する最終重みは各重みの乗算であってもよい。   Next, in step S509, a value obtained by calculating the sum of the calculated weights 1 to 3 is written in the memory 106, and the process proceeds to step S510. The final weight calculated here may be a multiplication of each weight.

ステップS510において、主被写体選択部202は、最終重み値が最も大きい顔を主被写体として選択する。この際、メモリ106に選択された顔が主被写体であることが判別可能な情報を付加して、顔検出情報を書き込み、ステップS511へ進む。   In step S510, the main subject selection unit 202 selects the face having the largest final weight value as the main subject. At this time, information capable of determining that the selected face is the main subject is added to the memory 106, the face detection information is written, and the process proceeds to step S511.

ステップS511において、主被写体選択部202は、カウンタNの値と予めメモリ106に書き込まれている顔検出数とを比較する。カウンタNの値が顔検出数と同じ場合、顔検出された全ての顔に対して主被写体選択処理が実行されたことになるので、主被写体選択処理を終了する。   In step S <b> 511, the main subject selection unit 202 compares the value of the counter N with the face detection number previously written in the memory 106. If the value of the counter N is the same as the number of face detections, the main subject selection process has been executed for all faces whose faces have been detected, so the main subject selection process ends.

カウンタNの値が顔検出数と同じではない場合、ステップS502に戻り処理を繰り返す。   When the value of the counter N is not the same as the face detection number, the process returns to step S502 and the process is repeated.

以上、顔サイズ、顔の位置情報、顔としての条件を満たす程度を示す信頼性係数を用いた主被写体の検出方法について説明したが、個人認証を用いて予め登録された人物と推定された顔を主被写体として選択するようにしても良い。   The method for detecting the main subject using the face size, the position information of the face, and the reliability coefficient indicating the degree to which the condition as the face is satisfied has been described above, but the face estimated as a person registered in advance using personal authentication May be selected as the main subject.

個人認証とは、予め不図示のメモリに登録された個人ごとの顔の特徴点と、顔検出処理によって検出された顔から抽出された特徴点を比較して、画像データにおける顔が誰であるかを特定する処理である。具体的には、顔検出により抽出された目や鼻や口など、各特徴点の互いの配置情報と、予めメモリに登録されている顔の特徴点の配置情報とのマッチングを行い、類似度を計算する。そして、類似度が最も高く、かつ、その類似度が閾値を超えている被写体が存在すれば、その被写体が予め登録された個人と同一人物であると判定する(特開平09−251534を参照)。この個人の優先順位を、特徴点の配置情報に対応させて予めメモリ106に記憶させておくことで、複数の顔が検出された場合には、個人認証に成功した顔であって、かつ、メモリに記憶されたその個人の優先順位が最も高い顔を主被写体として選択することができる。   Personal authentication refers to who is the face in the image data by comparing the feature points of each person registered in a memory not shown in advance with the feature points extracted from the face detected by the face detection process. This is a process for identifying the above. Specifically, matching is performed between the arrangement information of each feature point such as eyes, nose and mouth extracted by face detection and the arrangement information of the facial feature points registered in the memory in advance. Calculate If there is a subject with the highest similarity and the similarity exceeds the threshold, it is determined that the subject is the same person as the individual registered in advance (see Japanese Patent Laid-Open No. 09-251534). . By storing the personal priorities in correspondence with the feature point arrangement information in the memory 106 in advance, when a plurality of faces are detected, the faces are successfully authenticated, and The face with the highest personal priority stored in the memory can be selected as the main subject.

〔関連被写体選択アルゴリズム〕
次に、前述した関連被写体選択アルゴリズムについて図6(A)、図6(B)を用いて詳細に説明する。
[Related subject selection algorithm]
Next, the related subject selection algorithm described above will be described in detail with reference to FIGS. 6 (A) and 6 (B).

関連被写体選択部203は、システム制御部107の制御下で、これから説明する各処理を実行する。その際、顔検出処理の過程でメモリ106に記憶された顔検出情報を用いる。   The related subject selection unit 203 executes each process described below under the control of the system control unit 107. At this time, the face detection information stored in the memory 106 in the face detection process is used.

図6(A)のステップS601において、関連被写体選択部203は、主被写体選択処理の対象となる顔をカウントするカウンタNを0(ゼロ)に初期化する。   In step S601 of FIG. 6A, the related subject selection unit 203 initializes a counter N that counts the face to be subjected to the main subject selection process to 0 (zero).

ステップS602において、関連被写体選択部203は、メモリ106に保存された顔サイズ、顔の位置情報の顔検出結果と、主被写体の選択結果を読み込み、ステップS603へ進む。   In step S602, the related subject selection unit 203 reads the face detection result of the face size and face position information stored in the memory 106 and the selection result of the main subject, and proceeds to step S603.

ステップS603において、関連被写体選択部203はカウンタNの値を1増し、読み込んだ複数の顔検出結果の中からいずれかの顔の顔検出結果を選択する。   In step S603, the related subject selection unit 203 increments the value of the counter N, and selects a face detection result for any face from the plurality of read face detection results.

ステップS604において、関連被写体選択部203は、ステップS603で選択した顔の顔検出結果が主被写体選択部202において、選択された顔であるか否かを判定する。参照している顔が主被写体でない場合は、ステップS605に進む。参照している顔が主被写体である場合は、ステップS609へ進む。   In step S604, the related subject selection unit 203 determines whether the face detection result of the face selected in step S603 is the face selected by the main subject selection unit 202. If the face being referred to is not the main subject, the process proceeds to step S605. If the face being referred to is the main subject, the process proceeds to step S609.

ステップS605において、関連被写体選択部203は、顔検出部201によって検出された主被写体の顔検出情報と、参照している顔の顔検出情報との相関値Rを算出する。相関値Rとは例えば、主被写体の顔サイズAと参照している顔サイズBの比率A/BまたはB/Aのうち、大きな方の値で定義される。相関値Rは、主被写体と参照している顔サイズの差分A−Bの絶対値で定義されてもよい。いずれの場合であっても、相関値Rは顔サイズAと顔サイズBの値が近いほど小さな値となる。ここで言う顔サイズの一例として、顔の縦または横の長さ、または、顔が占める画素数がある。   In step S605, the related subject selection unit 203 calculates a correlation value R between the face detection information of the main subject detected by the face detection unit 201 and the face detection information of the referenced face. The correlation value R is defined by, for example, the larger value of the ratio A / B or B / A between the face size A of the main subject and the reference face size B. The correlation value R may be defined by the absolute value of the difference A−B between the main subject and the referenced face size. In either case, the correlation value R becomes smaller as the face size A and face size B are closer. As an example of the face size mentioned here, there are the length or width of the face, or the number of pixels occupied by the face.

ステップS606において、関連被写体選択部203は、相関値Rと予め設定された閾値THとの比較を行う。比較の結果、相関値Rが閾値THよりも小さい場合は、参照している顔は、主被写体の顔に近いサイズであると判定し、ステップS607に進む。相関値Rが閾値THよりも大きい場合は、ステップS609に進む。この閾値THは実験的に好適な値を求めるようにすればよい。   In step S606, the related subject selection unit 203 compares the correlation value R with a preset threshold value TH. If the correlation value R is smaller than the threshold value TH as a result of the comparison, it is determined that the referenced face is a size close to the face of the main subject, and the process proceeds to step S607. If the correlation value R is greater than the threshold value TH, the process proceeds to step S609. The threshold value TH may be determined experimentally.

ステップS607において、関連被写体選択部203は、主被写体の顔とサイズが近いと判定された顔の位置情報(X,Y)を元に、この参照している顔が予め設定された被写界内の所定領域Dの内部に存在するかどうかを判定する。ここで、予め設定された所定領域Dとは、例えば撮影被写界内の縦、及び、横八割、面積比64%の領域など、任意に設定することができる。所定領域Dの内部に存在すると判定された場合は、ステップS608へ進み関連被写体として選択する。ステップS607において、参照している顔が、所定領域Dの内部には存在しないと判定された場合は、ステップS609へ進む。   In step S <b> 607, the related subject selection unit 203 determines that the referenced face is set in advance based on the position information (X, Y) of the face determined to be close in size to the face of the main subject. It is determined whether or not it exists inside the predetermined area D. Here, the predetermined area D set in advance can be arbitrarily set, for example, a vertical and horizontal 80% area in the shooting field and an area ratio of 64%. If it is determined that the object exists within the predetermined area D, the process proceeds to step S608 and is selected as a related subject. If it is determined in step S607 that the face being referred to does not exist within the predetermined area D, the process proceeds to step S609.

ステップS609において、関連被写体選択部203は、カウンタNの値と予めメモリ106に書き込まれている顔検出数とを比較する。カウンタNの値が顔検出数に達していなければ、ステップS603に戻り、別の顔の顔検出結果を選択して同様の処理を繰り返す。カウンタNの値が顔検出数に達した場合、顔検出された全ての顔に対して関連被写体選択処理が実行されたことになるので、関連被写体選択処理を終了する。   In step S <b> 609, the related subject selection unit 203 compares the value of the counter N with the number of face detections previously written in the memory 106. If the value of the counter N has not reached the face detection number, the process returns to step S603, the face detection result of another face is selected, and the same processing is repeated. When the value of the counter N reaches the number of face detections, the related subject selection process has been executed for all faces whose faces have been detected, so the related subject selection process ends.

このように、図6(A)に示す関連被写体選択アルゴリズムでは、関連被写体選択部203は、顔検出部201によって検出された主被写体以外の顔のうち、主被写体の顔とサイズが近く、かつ、被写界内の中央部付近に位置する顔を関連被写体として選択している。   As described above, in the related subject selection algorithm shown in FIG. 6A, the related subject selection unit 203 is close in size to the face of the main subject among the faces other than the main subject detected by the face detection unit 201, and A face located near the center of the object scene is selected as the related subject.

次に、図6(B)を用いて、関連被写体選択アルゴリズムの別の例について説明を行う。図6(B)に示す関連被写体選択アルゴリズムは、図6(A)のステップS607の処理を、ステップS621、S622の処理に置き換えたものであるので、この処理を中心に説明を行う。   Next, another example of the related subject selection algorithm will be described with reference to FIG. Since the related subject selection algorithm shown in FIG. 6B is obtained by replacing the process in step S607 in FIG. 6A with the processes in steps S621 and S622, this process will be mainly described.

図6(B)のステップS606において、主被写体の顔検出情報と、参照している顔の顔検出情報との相関値Rが閾値THよりも小さい場合は、この参照している顔は主被写体の顔に近いサイズであると判定し、ステップS621に進む。   In step S606 in FIG. 6B, when the correlation value R between the face detection information of the main subject and the face detection information of the referenced face is smaller than the threshold value TH, the referenced face is the main subject. It is determined that the size is close to the face, and the process proceeds to step S621.

ステップS621において、関連被写体選択部203は、主被写体の顔の大きさに応じて第2閾値を設定する。そして、ステップS622において、関連被写体選択部203は、主被写体の顔に近いサイズであると判定された顔の中心位置と、主被写体の顔の中心位置との距離が、ステップS621で設定した第2閾値以内であるかを判定する。そして、この距離が第2閾値以内であれば、ステップS608へ進む。ステップS608では、関連被写体選択部203は、その参照している顔を関連被写体として選択する。このように図6(B)に示す関連被写体選択アルゴリズムでは関連被写体選択部203は、顔検出部201によって検出された主被写体以外の顔のうち、主被写体の顔とサイズが近く、かつ、主被写体の顔と距離が近い顔を関連被写体として選択している。すなわち、図6(A)と異なり、参照している顔が被写界の端部に位置していたとしても、主被写体の顔からの距離が近ければ関連被写体として選択されることがある。   In step S621, the related subject selection unit 203 sets a second threshold value according to the face size of the main subject. In step S622, the related subject selection unit 203 sets the distance between the center position of the face determined to be close to the face of the main subject and the center position of the face of the main subject set in step S621. It is determined whether it is within 2 thresholds. If this distance is within the second threshold, the process proceeds to step S608. In step S608, the related subject selection unit 203 selects the referenced face as a related subject. As described above, in the related subject selection algorithm shown in FIG. 6B, the related subject selection unit 203 has a size close to that of the main subject among the faces other than the main subject detected by the face detection unit 201, and is the main subject. A face close to the subject's face is selected as the related subject. That is, unlike FIG. 6A, even if the face being referred to is located at the end of the object scene, it may be selected as a related subject if the distance from the face of the main subject is short.

このステップS621で設定される第2閾値は、主被写体の顔が大きくなるほど、大きな値となるように設定される。これは2人の人物の距離が同じであっても、それらの人物が撮像装置からどの程度離れているかによって、画像データ中における2人の距離が変化してくるためである。ただし、顔が大きくなるほど、無制限に第2閾値を大きくしても良いというわけではなく、この第2閾値に上限を設けるようにしても構わない。これは、顔がある程度大きくなると、ポートレートのような構図を意図した撮影である可能性が高く、このような場合は、関連する被写体であるならば、その距離がむしろ近くなることが予想されるためである。   The second threshold value set in step S621 is set so as to increase as the face of the main subject increases. This is because even if the distance between the two persons is the same, the distance between the two persons in the image data varies depending on how far the persons are from the imaging device. However, the larger the face is, the larger the second threshold may not be increased without limitation, and an upper limit may be provided for the second threshold. This is likely to be a shot intended for a portrait-like composition when the face becomes large to some extent. In such a case, if the subject is a related subject, the distance is expected to be rather close. Because.

なお、ここでは図6(A)、図6(B)のいずれの例でも、顔サイズを判定基準に用いていたが、これに限られるものではない。主被写体の顔と参照している顔の距離だけで関連被写体を選択しても構わない。それぞれの顔について連続して検出できている時間を計測し、検出できている時間が主被写体の顔と同程度である顔を関連被写体として選択しても構わない。それぞれの顔について移動軌跡を蓄積し、検出した移動軌跡が主被写体の顔と類似する顔を関連被写体として選択しても構わない。あるいは、個人認証を用いて、主被写体選択部202によって主被写体であると判定された被写体と関連性の高い被写体を選択するようにしても構わない。例えば、個人の優先順位を予めメモリに記憶させておくことで、検出された顔に対して認証処理を行い、主被写体として選択された人物の優先順位と近い優先順位を備える人物のみを、関連被写体として選択することも可能である。   Here, in both the examples of FIGS. 6A and 6B, the face size is used as a criterion, but the present invention is not limited to this. The related subject may be selected only by the distance between the face of the main subject and the reference face. It is also possible to measure the time that each face can be detected continuously and select a face that has the same detection time as the face of the main subject as the related subject. A movement locus may be accumulated for each face, and a face whose detected movement locus is similar to the face of the main subject may be selected as the related subject. Alternatively, a subject highly relevant to the subject determined to be the main subject by the main subject selection unit 202 may be selected using personal authentication. For example, by storing personal priorities in the memory in advance, authentication processing is performed on the detected face, and only persons with priorities close to those of the person selected as the main subject are related. It is also possible to select it as a subject.

〔目つむり検出アルゴリズム〕
次に、前述した目つむり検出アルゴリズムについて図7を用いて詳細に説明する。
[Blink detection algorithm]
Next, the above-described eyebrows detection algorithm will be described in detail with reference to FIG.

目つむり検出部204は、システム制御部107の制御下において、これから説明する各処理を実行する。その際、顔検出処理の過程でメモリ106に記憶された顔検出情報を用いる。   The eyelid detection unit 204 executes each process described below under the control of the system control unit 107. At this time, the face detection information stored in the memory 106 in the face detection process is used.

ステップS701において、目つむり検出部204は、顔検出処理で得られた顔領域から目と推定される領域の画像を読み込む。   In step S701, the eyelid detection unit 204 reads an image of an area estimated to be an eye from the face area obtained by the face detection process.

ステップS702において、目つむり検出部204は、目画像のテンプレートデータをメモリ106から読み込む。   In step S <b> 702, the eyelid detection unit 204 reads eye image template data from the memory 106.

ステップS703において、目つむり検出部204は、顔検出処理で得られた目領域の画像と、テンプレートデータとを比較して目の開き具合が充分か否かを判定する。開き具合が充分であると判定された場合には、ステップS705へ進み目つむりが検出された旨の表示を行う対象とはしない。   In step S703, the eyelid detection unit 204 compares the image of the eye area obtained by the face detection process with the template data to determine whether or not the degree of eye opening is sufficient. If it is determined that the degree of opening is sufficient, the process proceeds to step S705, and the display to the effect that the eye-opening is detected is not performed.

ステップS704において、目の開き具合が充分でないと判定された場合には、ステップS706へ進み、表示部110に目つむり警告を行う対象として通知する。表示部110は、この通知を受けて、ステップ312にてレックレビュー表示をする際に、被写体が目つむりしている旨を画像データに重畳して表示する。   If it is determined in step S704 that the degree of opening of the eyes is not sufficient, the process proceeds to step S706, and the display unit 110 is notified of a target for performing a blind eye warning. Upon receiving this notification, the display unit 110 superimposes and displays on the image data that the subject is blinded when performing a REC review display in step 312.

なお、目つむり警告として画面上に文字やアイコンを合成して表示する方法のほかに、音声や、LED等を点滅または点灯させることも可能である。   In addition to the method of combining characters and icons on the screen and displaying them as a blink warning, it is also possible to blink or light up voices, LEDs, or the like.

以上説明したように、本実施形態によれば、選択された主被写体と相関の高い被写体を関連被写体として選択し、選択された主被写体、及び、関連被写体に対してのみ目つむり検出を行う。こうすることで、ユーザが撮影対象として意図する被写体に対してのみ目つむり検出を行う確率を向上させることが可能となる。   As described above, according to the present embodiment, a subject having a high correlation with the selected main subject is selected as a related subject, and blinding detection is performed only on the selected main subject and the related subject. By doing so, it is possible to improve the probability of performing eye-blink detection only on a subject that the user intends to shoot.

特に、デジタルカメラでは、AF処理の対象としての主被写体を選択するタイミングと、実際に目つむり検出を行うタイミングには開きがあることが多いため、主被写体を選択した後に、別の被写体が被写界内に登場するような状況も考えられる。仮に、目つむり検出の対象を、予め選択された主被写体と相関の高い被写体ではなく、単に顔サイズや位置などから求めた重みが大きい被写体を選択するように構成したとする。この場合、撮影直前にカメラの近くに人が登場した場合には、この顔に目つむり検出の対象として選択される確率が高くなってしまう。   In particular, in digital cameras, there is often a gap between the timing for selecting the main subject as the target of AF processing and the timing for actually detecting eye-blinks. A situation that appears in the scene is also conceivable. Suppose that the target for detection of eye-browsing is not an object having a high correlation with the main object selected in advance, but an object having a large weight obtained from the face size or position. In this case, if a person appears near the camera immediately before shooting, the probability that the face will be selected as a target for detection of a blindness increases.

これに対し、本実施形態では、主被写体として相関の高い被写体を目つむり検出の対象として選択している。そのため、主被写体を選択する第1の操作(レリーズボタンの半押し)と関連被写体を選択する第2の操作(レリーズボタンの全押し)の間に意図しない人物が被写界に登場しても、その人物が目つむり検出の対象として選択される確率を低くすることが可能となる。   On the other hand, in the present embodiment, a subject having a high correlation is selected as a target for eye detection. Therefore, even if an unintended person appears in the scene between the first operation for selecting the main subject (half-pressing the release button) and the second operation for selecting the related subject (full-pressing the release button). Thus, it is possible to reduce the probability that the person is selected as a target for detection of eyebrows.

さらに、ユーザが方向指示ボタンで任意の被写体を主被写体として選択したような場合には、必ずしもその主被写体が他の被写体よりも大きく写っている、あるいは、画面の中央よりに位置しているとは限らない。このような状況下では、単に顔サイズや位置などから求めた重みが大きい被写体を目つむり検出の対象として選択してしまうと、ユーザが意図している被写体に対して目つむり検出を行える可能性は低い。これに対し、本実施形態では、ユーザが方向指示ボタン113で任意の被写体を主被写体に変更した場合であっても、ユーザが新たに選択した主被写体を基準として、余計な被写体がどれであるかを判定する。そのため、ユーザが撮影対象として意図する被写体に対してのみ目つむり検出を行える確率を向上させることが可能となる。   Furthermore, when the user selects an arbitrary subject as the main subject with the direction button, the main subject is not necessarily larger than the other subjects, or is located at the center of the screen. Is not limited. Under such circumstances, if a subject with a large weight obtained simply from the face size, position, etc. is selected as the target for eye-blink detection, there is a possibility that the user can perform eye-gaze detection on the subject intended by the user. Is low. On the other hand, in the present embodiment, even if the user changes an arbitrary subject to the main subject using the direction instruction button 113, which is an extra subject based on the main subject newly selected by the user. Determine whether. For this reason, it is possible to improve the probability that the eyebrows detection can be performed only on the subject that the user intends to shoot.

また、本実施形態では、ステップS310にて関連被写体を選択してから、ステップS311にて主被写体と関連被写体に対して目つむりの検出を行ったが、この処理の順を逆にしても構わない。すなわち、ステップS309にて検出されたすべての顔に対して目つむりの検出を行い、目つむりであると判定された顔から、主被写体と関連被写体に該当するものを選択して、ステップS312のレックレビューでその旨を表示する。このようにすることで、目つむりの処理時間は短縮されないが、余計な被写体に対しては目つむりの警告表示が行われないため、ユーザにとって煩わしい表示となることを抑止することができる。   Further, in this embodiment, after selecting the related subject in step S310, the detection of the eyebrows is detected for the main subject and the related subject in step S311. However, the order of this processing may be reversed. Absent. In other words, eye detection is performed on all the faces detected in step S309, and faces corresponding to the main subject and related subjects are selected from the faces determined to be eyebrows. This is indicated in the REC review. By doing so, the processing time for eye-opening is not shortened, but warning display for eye-opening is not performed for an extra subject, so that it can be prevented that the display becomes troublesome for the user.

(実施形態2)
本実施形態は主被写体、及び、関連被写体を選択し、選択された顔に対して個人認証を行い、それ以外の顔に対しては個人認証を行わない実施形態に関して説明する。本実施形態に係る撮像装置の構成は実施形態1に加え、メモリ106は、カレンダー情報や日付に関する情報を有している。なお、本実施形態におけるデジタルカメラの画像処理部104は、目つむり検出部204に代えて、個人認証部を有しているものとする。
(Embodiment 2)
This embodiment will be described with respect to an embodiment in which a main subject and a related subject are selected, personal authentication is performed on the selected face, and personal authentication is not performed on other faces. In addition to the first embodiment, the configuration of the image pickup apparatus according to the present embodiment includes the memory information including calendar information and date. It is assumed that the image processing unit 104 of the digital camera according to the present embodiment has a personal authentication unit instead of the eyelid detection unit 204.

〔デジタルカメラの全体的な動作〕
図8は実施形態2に係るデジタルカメラの全体の動作をフローチャートに示したものである。尚、実施形態1で説明した処理と同じ処理を行うステップは、図3と同じ符号を付けている。
[Overall operation of digital camera]
FIG. 8 is a flowchart showing the overall operation of the digital camera according to the second embodiment. In addition, the step which performs the same process as the process demonstrated in Embodiment 1 attaches | subjects the same code | symbol as FIG.

ステップS301からステップS310までとステップS312からステップS316までは、実施形態1の図3で示した各ステップの処理と同じであるので説明は割愛する。   Steps S301 to S310 and steps S312 to S316 are the same as the processing of each step shown in FIG.

ステップS801において、画像処理部104は、主被写体、及び、関連被写体として選択された顔に対して上述した方法にて個人認証を行い、それ以外の顔に対しては個人認証を行わずステップS802へと進む。   In step S801, the image processing unit 104 performs personal authentication by the method described above for the main subject and the face selected as the related subject, and does not perform personal authentication for other faces. Proceed to

ステップS802において、画像処理部104は、個人認証された人物に対して、撮影履歴の記録をメモリ106に対して行う。画像処理部104は、デジタルカメラ内部に搭載されたカレンダーに従い、同じ日に撮影された画像データにおける個人認証結果をメモリ106に蓄積している。すなわち、同じ日であれば、撮影した画像データから個人が認証されるたびに、その個人の撮影回数を表すカウンタを増加させる。そして、次のステップS312において、システム制御部107が、撮影した画像とともに、どの人物がその日に何回撮影されたのかを示す数字を表示部110に表示させる。このように構成することにより、ユーザが仲間を均等に撮影することを手助けすることが可能となる。もちろん、カウントする期間はユーザが任意に設定することが可能であり、ユーザが指定した期間の間だけカウントを継続したり、電源のオンとオフをトリガーとしてカウント期間を設定したりすることも可能である。   In step S <b> 802, the image processing unit 104 records a shooting history in the memory 106 for a person who has been personally authenticated. The image processing unit 104 stores the personal authentication result in the image data captured on the same day in the memory 106 according to a calendar installed in the digital camera. That is, on the same day, every time an individual is authenticated from the captured image data, a counter indicating the number of times the individual is captured is increased. Then, in the next step S312, the system control unit 107 causes the display unit 110 to display a number indicating which person was photographed and how many times on the day together with the photographed image. By comprising in this way, it becomes possible to help a user image | photograph a friend equally. Of course, the counting period can be set arbitrarily by the user, and the counting can be continued only for the period specified by the user, or the counting period can be set with the power on and off as a trigger. It is.

以上の構成により、主被写体との相関に基づいて関連被写体を選択し、主被写体及び関連被写体と選択された被写体に対してのみ個人認証を行うことで、被写体を区別せずに個人認証を行った場合に比べ、個人認証に必要とする時間を短縮することが可能となった。なお、本実施形態によれば、主被写体、及び、関連被写体と選択された被写体に対してのみ個人認証を行うため、目立ちにくい構図で撮影されてしまった人物は撮影回数のカウント対象となりにくくなる。そのため、たまたま被写界に入ってしまったような人物は、個人認証可能な人物であったとしてもカウントされず、その人物にとって好適な構図である画像に絞って、撮影回数をカウントすることが可能となる。   With the above configuration, the related subject is selected based on the correlation with the main subject, and personal authentication is performed only for the main subject and the related subject and the selected subject, thereby performing personal authentication without distinguishing the subject. Compared to the case, the time required for personal authentication can be shortened. According to the present embodiment, since personal authentication is performed only on the main subject and the subject selected as the related subject, a person who has been photographed with a composition that is not conspicuous is less likely to be counted. . For this reason, a person who happens to enter the scene is not counted even if the person can be personally authenticated, and the number of shots can be counted by focusing on an image having a composition suitable for that person. It becomes possible.

(実施形態3)
本実施形態は主被写体、及び、関連被写体を選択し、該選択された主被写体と関連被写体に対して赤目補正を行う実施形態である。本実施形態に係る撮像装置の構成は実施形態1と同じである。なお、本実施形態におけるデジタルカメラの画像処理部104は、目つむり検出部204に代えて、赤目検出部、赤目補正部を有しているものとする。
(Embodiment 3)
In this embodiment, a main subject and a related subject are selected, and red-eye correction is performed on the selected main subject and related subject. The configuration of the imaging apparatus according to the present embodiment is the same as that of the first embodiment. Note that the image processing unit 104 of the digital camera according to the present embodiment includes a red-eye detection unit and a red-eye correction unit in place of the eyebrows detection unit 204.

〔デジタルカメラの全体的な動作〕
図9は実施形態3にかかる撮像装置全体の動作を示すフローチャートである。実施形態1の図3と同じ処理を行う部分に対しては同じ符号を付けている。
[Overall operation of digital camera]
FIG. 9 is a flowchart illustrating the operation of the entire imaging apparatus according to the third embodiment. Parts that perform the same processing as in FIG. 3 of the first embodiment are denoted by the same reference numerals.

ステップS304からステップS310において、主被写体と関連被写体を選択後、ステップS901において、システム制御部107は、主被写体、及び、関連被写体が赤目になっているか否かの赤目検出行う。赤目検出の方法は、まず顔検出処理によって検出された目領域の色相を調べ、目の領域の平均色相を検出し赤色成分が設定された閾値以上の場合に赤目が生じていると判定する。   After selecting the main subject and the related subject in steps S304 to S310, in step S901, the system control unit 107 performs red-eye detection to determine whether the main subject and the related subject have red eyes. The red-eye detection method first checks the hue of the eye area detected by the face detection process, detects the average hue of the eye area, and determines that red-eye has occurred when the red component is equal to or greater than a set threshold.

赤目が検出された場合はステップS902へと進み、赤目補正を行う。赤目補正とは赤目が検出された領域の彩度を低くする補正を行うことである。   If red eye is detected, the process proceeds to step S902, and red eye correction is performed. Red-eye correction is correction that lowers the saturation of a region where red-eye is detected.

このような構成とすることで、ユーザが撮影対象としていると推定される被写体以外には、赤目補正を行わないので、処理時間が短縮されより使い勝手の良い撮像装置を提供することが可能となった。   With such a configuration, red-eye correction is not performed except for a subject that is estimated to be taken by the user, so that it is possible to provide an imaging device that has a shorter processing time and is easier to use. It was.

また、実施形態1と同様に、関連被写体の選択処理と赤目の検出処理の順を逆にしても構わない。すなわち、ステップS309にて検出されたすべての顔に対して赤目検出を行い、赤目であると判定された顔から、主被写体と関連被写体に該当するものを選択して、ステップS312のレックレビューでその旨を表示する。このようにすることで、余計な被写体に対しては赤目検出結果の表示が行われないため、ユーザにとって煩わしい表示となることを抑止することができる。   As in the first embodiment, the order of the related subject selection process and the red-eye detection process may be reversed. That is, red-eye detection is performed on all the faces detected in step S309, and faces corresponding to the main subject and related subjects are selected from the faces determined to be red-eye, and the REC review in step S312 is performed. A message to that effect is displayed. By doing so, since the display of the red-eye detection result is not performed for an extra subject, it can be prevented that the display becomes annoying for the user.

なお、本発明が主被写体、及び、関連被写体に対して行う画像解析は、目つむり検出、赤目補正、個人認証に限られるものではなく、肌色処理や笑顔検出など、被写体の顔に対して何らかの検出処理や補正処理が行えるものであればよい。   Note that the image analysis performed on the main subject and related subjects by the present invention is not limited to eyebrows detection, red-eye correction, and personal authentication. Any device capable of performing detection processing and correction processing may be used.

また、実施形態1、実施形態2、及び、実施形態3は画像処理装置としてデジタルカメラを例に挙げて説明を行ったが、これに限られるものではない。カメラと情報処理装置の間で画像データの通信を行い、カメラで撮影した画像データに対して、情報処理装置側で画像解析を行うようなシステムからなる画像処理装置にも適用することが可能である。また、目つむり検出、赤目補正、あるいは、個人認証を、必要とされる人物に対してのみ行うという目的であれば、ネットワークを介して受け取った画像データに対して情報処理装置がこれらの画像解析を行うことも可能である。   In the first, second, and third embodiments, a digital camera has been described as an example of the image processing apparatus. However, the present invention is not limited to this. It can also be applied to an image processing apparatus comprising a system in which image data is communicated between a camera and an information processing apparatus, and image data taken by the camera is analyzed on the information processing apparatus side. is there. In addition, if the purpose is to perform eyelid detection, red-eye correction, or personal authentication only for a required person, the information processing apparatus analyzes the image data received via the network. It is also possible to perform.

つまり、上記の実施形態1、実施形態2、及び、実施形態3、いずれかと同等の処理を、プログラムでも実現できる。この場合、図2をはじめとする構成要素の各々は、情報処理装置内部のCPUが実行するサブルーチンで機能させれば良い。   That is, processing equivalent to any of the first, second, and third embodiments can be realized by a program. In this case, each of the components including FIG. 2 may function in a subroutine executed by the CPU in the information processing apparatus.

201 顔検出部
202 主被写体選択部
203 関連被写体選択部
204 目つむり検出部
DESCRIPTION OF SYMBOLS 201 Face detection part 202 Main subject selection part 203 Related subject selection part 204 Eyelid detection part

Claims (9)

画像データから顔を検出する顔検出手段と、
前記顔検出手段から複数の顔が検出された場合に、いずれかの顔を主被写体として選択する主被写体選択手段と、
前記主被写体選択手段により主被写体として選択されなかった顔の中から、前記主被写体として選択された顔との相関に基づいて、関連被写体としての顔を選択する関連被写体選択手段と、
前記顔検出手段により検出された顔に対して所定の画像処理を行う画像処理手段と
操作部を有し、
前記主被写体選択手段は、前記操作部における第1の操作に応じて前記主被写体としての顔を選択し、前記関連被写体選択手段は、前記第1の操作よりも後の前記操作部における第2の操作に応じて前記関連被写体としての顔を選択し、
前記画像処理手段は、前記主被写体選択手段、及び、前記関連被写体選択手段により選択された顔に対して前記所定の画像処理を行い、それ以外の顔に対しては前記所定の画像処理を行わないことを特徴とする画像処理装置。
Face detection means for detecting a face from image data;
Main subject selection means for selecting any face as a main subject when a plurality of faces are detected from the face detection means;
Related subject selection means for selecting a face as a related subject based on the correlation with the face selected as the main subject from the faces not selected as the main subject by the main subject selection means;
Image processing means for performing predetermined image processing on the face detected by the face detection means ;
Having an operation part ,
The main subject selection means selects a face as the main subject in response to a first operation on the operation unit, and the related subject selection means selects a second in the operation unit after the first operation. Select the face as the related subject according to the operation of
The image processing means performs the predetermined image processing on the face selected by the main subject selection means and the related subject selection means, and performs the predetermined image processing on the other faces. There is no image processing apparatus.
画像データから顔を検出する顔検出手段と、
前記顔検出手段から複数の顔が検出された場合に、いずれかの顔を主被写体として選択する主被写体選択手段と、
前記主被写体選択手段により主被写体として選択されなかった顔の中から、前記主被写体として選択された顔との相関に基づいて、関連被写体としての顔を選択する関連被写体選択手段と、
前記顔検出手段により検出された顔に対して所定の画像処理を行う画像処理手段と
操作部を有し、
前記主被写体選択手段は、前記操作部における第1の操作に応じて前記主被写体としての顔を選択し、前記関連被写体選択手段は、前記第1の操作よりも後の前記操作部における第2の操作に応じて前記関連被写体としての顔を選択し、
前記画像処理手段は、前記主被写体選択手段、及び、前記関連被写体選択手段により選択された顔に対して前記所定の画像処理の結果の表示を行い、それ以外の顔に対しては前記所定の画像処理の結果の表示を行わないことを特徴とする画像処理装置。
Face detection means for detecting a face from image data;
Main subject selection means for selecting any face as a main subject when a plurality of faces are detected from the face detection means;
Related subject selection means for selecting a face as a related subject based on the correlation with the face selected as the main subject from the faces not selected as the main subject by the main subject selection means;
Image processing means for performing predetermined image processing on the face detected by the face detection means ;
Having an operation part ,
The main subject selection means selects a face as the main subject in response to a first operation on the operation unit, and the related subject selection means selects a second in the operation unit after the first operation. Select the face as the related subject according to the operation of
The image processing means displays the result of the predetermined image processing for the face selected by the main subject selecting means and the related subject selecting means, and for the other faces, the predetermined image processing result is displayed. An image processing apparatus characterized by not displaying an image processing result.
前記関連被写体選択手段は、前記主被写体選択手段により選択された顔と選択されなかった顔の、位置、サイズ、検出された時間、及び、位置の移動軌跡の少なくともいずれかを比較することにより、前記関連被写体を選択することを特徴とする請求項1または2に記載の画像処理装置。 The related subject selection unit compares at least one of the position, size, detected time, and position movement trajectory of the face selected by the main subject selection unit and the unselected face, the image processing apparatus according to claim 1 or 2, characterized in that selecting the relevant object. 前記所定の画像処理は目つむり検出、赤目補正、及び、個人認証のうち少なくともいずれかであることを特徴とする請求項1乃至いずれか1項に記載の画像処理装置。 Wherein the predetermined image processing eye head detection, red-eye correction, and image processing apparatus according to claims 1 to 3 any one, characterized in that among the personal identification is at least one. 前記画像処理装置は、光学像を電気信号に変換する撮像素子、及び、前記光学像の焦点の位置を調整する光学系を有することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 The said image processing apparatus has an image pick-up element which converts an optical image into an electric signal, and an optical system which adjusts the position of the focus of the said optical image, The any one of Claim 1 thru | or 4 characterized by the above-mentioned. Image processing apparatus. 前記操作部における前記第1の操作に応じて、前記主被写体選択手段が前記主被写体としての顔を選択するとともに、前記光学系が前記主被写体としての顔に焦点の位置をあわせ、前記操作部における前記第2の操作に応じて、前記撮像素子で生成された画像データを記録媒体に記録させることを特徴とする請求項に記載の画像処理装置。 In response to the first operation in the operation unit, the main subject selection unit selects a face as the main subject, and the optical system adjusts a focus position to the face as the main subject, and the operation unit The image processing apparatus according to claim 5 , wherein the image data generated by the image sensor is recorded on a recording medium in accordance with the second operation. 画像データから顔を検出する顔検出工程と、
前記顔検出工程から複数の顔が検出された場合に、いずれかの顔を主被写体として選択する主被写体選択工程と、
前記主被写体選択工程により主被写体として選択されなかった顔の中から、前記主被写体として選択された顔との相関に基づいて、関連被写体としての顔を選択する関連被写体選択工程と、
前記顔検出工程により検出された顔に対して所定の画像処理を行う画像処理工程とを有し、
前記主被写体選択工程では、操作部における第1の操作に応じて前記主被写体としての顔を選択し、
前記関連被写体選択工程では、前記第1の操作よりも後の前記操作部における第2の操作に応じて前記関連被写体としての顔を選択し、
前記画像処理工程は、前記主被写体選択工程、及び、前記関連被写体選択工程により選択された顔に対して前記所定の画像処理を行い、それ以外の顔に対しては前記所定の画像処理を行わないことを特徴とする画像処理方法。
A face detection step of detecting a face from image data;
A main subject selection step of selecting one of the faces as a main subject when a plurality of faces are detected from the face detection step;
A related subject selection step of selecting a face as a related subject based on the correlation with the face selected as the main subject from the faces not selected as the main subject in the main subject selection step;
An image processing step for performing predetermined image processing on the face detected by the face detection step,
In the main subject selection step, a face as the main subject is selected according to a first operation in the operation unit,
In the related subject selection step, a face as the related subject is selected according to a second operation in the operation unit after the first operation,
The image processing step performs the predetermined image processing on the face selected by the main subject selection step and the related subject selection step, and performs the predetermined image processing on the other faces. There is no image processing method characterized by the above.
画像データから顔を検出する顔検出工程と、
前記顔検出工程から複数の顔が検出された場合に、いずれかの顔を主被写体として選択する主被写体選択工程と、
前記主被写体選択工程により主被写体として選択されなかった顔の中から、前記主被写体として選択された顔との相関に基づいて、関連被写体としての顔を選択する関連被写体選択工程と、
前記顔検出工程により検出された顔に対して所定の画像処理を行う画像処理工程とを有し、
前記主被写体選択工程では、操作部における第1の操作に応じて前記主被写体としての顔を選択し、
前記関連被写体選択工程では、前記第1の操作よりも後の前記操作部における第2の操作に応じて前記関連被写体としての顔を選択し、
前記画像処理工程は、前記主被写体選択工程、及び、前記関連被写体選択工程により選択された顔に対して前記所定の画像処理の結果の表示を行い、それ以外の顔に対しては前記所定の画像処理の結果の表示を行わないことを特徴とする画像処理方法。
A face detection step of detecting a face from image data;
A main subject selection step of selecting one of the faces as a main subject when a plurality of faces are detected from the face detection step;
A related subject selection step of selecting a face as a related subject based on the correlation with the face selected as the main subject from the faces not selected as the main subject in the main subject selection step;
An image processing step for performing predetermined image processing on the face detected by the face detection step,
In the main subject selection step, a face as the main subject is selected according to a first operation in the operation unit,
In the related subject selection step, a face as the related subject is selected according to a second operation in the operation unit after the first operation,
The image processing step displays the result of the predetermined image processing for the face selected by the main subject selection step and the related subject selection step, and the other predetermined face for the predetermined subject. An image processing method characterized by not displaying an image processing result.
請求項または請求項に記載の方法を情報処理装置に実行させるためのプログラム。 A program for causing an information processing apparatus to execute the method according to claim 7 or 8 .
JP2009114447A 2009-05-11 2009-05-11 Image processing device Expired - Fee Related JP5383308B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009114447A JP5383308B2 (en) 2009-05-11 2009-05-11 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009114447A JP5383308B2 (en) 2009-05-11 2009-05-11 Image processing device

Publications (2)

Publication Number Publication Date
JP2010263550A JP2010263550A (en) 2010-11-18
JP5383308B2 true JP5383308B2 (en) 2014-01-08

Family

ID=43361240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009114447A Expired - Fee Related JP5383308B2 (en) 2009-05-11 2009-05-11 Image processing device

Country Status (1)

Country Link
JP (1) JP5383308B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5918998B2 (en) * 2011-12-28 2016-05-18 キヤノン株式会社 Image processing apparatus, imaging apparatus, control method, and program
JP6222900B2 (en) * 2012-07-09 2017-11-01 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2019168886A (en) * 2018-03-23 2019-10-03 カシオ計算機株式会社 Detection body region detecting device, imaging device, flying device, detection body region detecting method, imaging method and program
CN108632532A (en) * 2018-05-25 2018-10-09 联想(北京)有限公司 A kind of image processing method and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008131094A (en) * 2006-11-16 2008-06-05 Fujifilm Corp Imaging apparatus and method
JP4888191B2 (en) * 2007-03-30 2012-02-29 株式会社ニコン Imaging device

Also Published As

Publication number Publication date
JP2010263550A (en) 2010-11-18

Similar Documents

Publication Publication Date Title
JP4196714B2 (en) Digital camera
KR101051001B1 (en) Information processing apparatus, eye open / closed degree determination method, recording medium and imaging device
TWI549501B (en) An imaging device, and a control method thereof
CN101241296B (en) Focusing device, focusing method and image-capturing device provided with the focusing device
CN101465972B (en) Apparatus and method for blurring image background in digital image processing device
JP5631106B2 (en) Image processing apparatus, control method thereof, program, and imaging apparatus
EP1522952B1 (en) Digital camera
US20060098104A1 (en) Image capturing apparatus
JP5736796B2 (en) Electronic camera, program and recording medium
JP2004317699A (en) Digital camera
JP5713055B2 (en) Imaging apparatus, imaging method, and program
KR20100048600A (en) Image photography apparatus and method for proposing composition based person
JP2010010729A (en) Image pickup apparatus, and program
KR101686943B1 (en) Digital photographing apparatus and control method thereof
JP5918996B2 (en) Subject recognition apparatus and dictionary data registration method
JP2004320285A (en) Digital camera
JP5383308B2 (en) Image processing device
WO2008126577A1 (en) Imaging apparatus
JP2019121860A (en) Image processing apparatus and control method therefor
JP2008139658A (en) Focusing device, imaging apparatus, and control method thereof
JP2011193066A (en) Image sensing device
JP2005045601A (en) Image photographing apparatus and program
JP2014225763A (en) Imaging apparatus, control method of the same, program, and storage medium
JP2008167028A (en) Imaging apparatus
KR20100098122A (en) Image processing method and apparatus, and digital photographing apparatus using thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120511

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130611

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130808

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131001

R151 Written notification of patent or utility model registration

Ref document number: 5383308

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees