JP5137808B2 - Imaging device, control method thereof, and program - Google Patents

Imaging device, control method thereof, and program Download PDF

Info

Publication number
JP5137808B2
JP5137808B2 JP2008327913A JP2008327913A JP5137808B2 JP 5137808 B2 JP5137808 B2 JP 5137808B2 JP 2008327913 A JP2008327913 A JP 2008327913A JP 2008327913 A JP2008327913 A JP 2008327913A JP 5137808 B2 JP5137808 B2 JP 5137808B2
Authority
JP
Japan
Prior art keywords
detection
specific subject
detection mode
image
mode
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.)
Active
Application number
JP2008327913A
Other languages
Japanese (ja)
Other versions
JP2010154041A (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 JP2008327913A priority Critical patent/JP5137808B2/en
Publication of JP2010154041A publication Critical patent/JP2010154041A/en
Application granted granted Critical
Publication of JP5137808B2 publication Critical patent/JP5137808B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ビデオカメラ等の撮像装置に関し、特に顔などの特定被写体の検出技術に関する。   The present invention relates to an imaging apparatus such as a video camera, and more particularly to a technique for detecting a specific subject such as a face.

近年、撮影画像から顔などの特定被写体を検出し、その特定被写体に適した露光制御、合焦制御等を行うスチルカメラ、ビデオカメラ、監視用カメラなどの撮像装置が実現されている。   In recent years, imaging devices such as a still camera, a video camera, and a surveillance camera that detect a specific subject such as a face from a photographed image and perform exposure control, focus control, and the like suitable for the specific subject have been realized.

顔検出の手法としては、撮影画像に含まれる顔の傾き、向き、大きさ、撮影画像上の位置等は通常は不定であるため、これら顔の傾き、向き、大きさ、位置等の検出条件を変更しながら顔を検出する手法が多用されている。   As a face detection method, the face inclination, orientation, size, position on the photographed image, etc. included in the photographed image are usually indeterminate, so detection conditions such as the face tilt, orientation, size, position, etc. A method of detecting a face while changing the position is often used.

特許文献1では、デジタル画像上でサブウィンドウを走査しながら、このサブウィンドウの画像が顔を含む顔画像であるか否かを判別器により順次判別していくことにより、顔を検出する技術が開示されている。   Patent Document 1 discloses a technique for detecting a face by scanning a sub window on a digital image and sequentially discriminating whether or not the sub window image is a face image including a face. ing.

また、特許文献2では、検出領域を変化させながら顔の検出処理を行っている。その際、顔の傾きが小さい場合は検出領域の移動幅を小さくすることで、顔の検出精度を高くし、顔の傾きが大きい場合は検出領域の移動幅を大きくすることで、顔の検出精度が低くなる代わりに検出処理時間を短縮している。
US2002/0102024 A1(米国特許出願公開公報) 特開2007−128127号公報
In Patent Document 2, face detection processing is performed while changing the detection region. At that time, when the face inclination is small, the detection area movement width is reduced to increase the face detection accuracy, and when the face inclination is large, the detection area movement width is increased to detect the face. Instead of lower accuracy, the detection processing time is shortened.
US2002 / 0102024 A1 (US Patent Application Publication) JP 2007-128127 A

しかしながら、検出条件を変更しながら特定被写体を検出する手法においては、通常、特定被写体の検出精度を高くしようとすると、検出条件をきめ細かく設定する必要があるため、処理時間が長くなる。逆に、検出処理を高速化しようとすると、検出条件を粗く設定する必要があるため、特定被写体の検出精度が低くなる。   However, in the method of detecting a specific subject while changing the detection condition, normally, if it is attempted to increase the detection accuracy of the specific subject, it is necessary to set the detection condition in detail, and therefore the processing time becomes long. On the other hand, if it is attempted to speed up the detection process, the detection conditions need to be set roughly, so that the detection accuracy of the specific subject is lowered.

すなわち、特定被写体の検出精度と検出処理時間とは、いわゆるトレードオフの関係にあり、高い検出精度と短い検出処理時間を両立させることが難しい。この場合、撮影画像から顔などの所望の特定被写体を検出する処理時間が長くなり、規定時間内に特定被写体を検出し終えなかった場合は、特定被写体に対する適正な合焦制御や露出制御を行えなくなり、画質の面で大きな問題となる。   That is, the detection accuracy of a specific subject and the detection processing time are in a so-called trade-off relationship, and it is difficult to achieve both high detection accuracy and a short detection processing time. In this case, the processing time for detecting a desired specific subject such as a face from the captured image becomes long, and if the specific subject is not detected within the specified time, appropriate focusing control and exposure control for the specific subject can be performed. This is a big problem in terms of image quality.

特に、動画を撮影するビデオカメラにおいては、特定被写体が移動する場合が多いので、各フレームの画像について、規定時間内に連続的に特定被写体を検出することが要望される。   In particular, in a video camera that shoots a moving image, a specific subject often moves, so that it is desired to detect the specific subject continuously within a specified time for each frame image.

特許文献1に係る顔検出システムでは、顔の検出処理時間について考慮されておらず、顔に対する適正な合焦制御や露出制御を行えなくなる場合がある。一方、特許文献2に係る顔検出システムでは、検出する顔の傾きが大きい場合には処理時間を短縮するよう考慮されている。   In the face detection system according to Patent Literature 1, the face detection processing time is not taken into consideration, and proper focus control and exposure control on the face may not be performed. On the other hand, in the face detection system according to Patent Document 2, consideration is given to shortening the processing time when the inclination of the face to be detected is large.

しかしながら、特許文献2では、顔の傾きが小さい場合には検出精度を高めるように処理するだけで、顔の検出処理時間については考慮されていない。そのため、特許文献2では、顔の傾きが小さい場合には、特許文献1等と同様に、顔に対する適正な合焦制御や露出制御を行えなくなる場合がある。   However, in Patent Document 2, when the inclination of the face is small, only the processing is performed to increase the detection accuracy, and the face detection processing time is not considered. For this reason, in Patent Document 2, when the inclination of the face is small, it may be impossible to perform proper focus control and exposure control on the face, as in Patent Document 1 and the like.

本発明は、このような技術的な背景の下になされたもので、その目的は、規定時間内に連続的に特定被写体を検出し、且つ特定被写体の検出精度を向上させるようにすることにある。   The present invention has been made under such a technical background, and an object thereof is to continuously detect a specific subject within a specified time and improve the detection accuracy of the specific subject. is there.

上記の目的を達成するため、本発明に係る撮像装置は、撮影手段により撮影された撮影画像から特定被写体を検出する検出手段と、前記検出手段が前記特定被写体を検出するための検出条件を設定する設定手段と、を有し、前記設定手段は、前記検出手段が規定時間以内に前記特定被写体を検出できる範囲内で、第1の検出モードと第2の検出モードを切り替えるものであり、前記第1の検出モードは前記第2の検出モードに比較して小さいサイズの前記特定被写体を検出することを優先した検出モードであり、前記第2の検出モードは前記第1の検出モードに比較して傾斜した状態の前記特定被写体を検出することを優先した検出モードであることを特徴とする。   In order to achieve the above object, an imaging apparatus according to the present invention sets a detection unit for detecting a specific subject from a captured image shot by a shooting unit, and a detection condition for the detection unit to detect the specific subject. Setting means for switching between the first detection mode and the second detection mode within a range in which the detection means can detect the specific subject within a predetermined time, The first detection mode is a detection mode in which priority is given to detecting the specific subject having a smaller size compared to the second detection mode, and the second detection mode is compared with the first detection mode. It is a detection mode in which priority is given to detecting the specific subject in an inclined state.

本発明によれば、規定時間内に連続的に特定被写体を検出し、且つ特定被写体の検出精度を向上させることが可能となる。   According to the present invention, it is possible to continuously detect a specific subject within a specified time and improve the detection accuracy of the specific subject.

以下、発明を実施するための最良の形態について、図面を用いて説明する。   Hereinafter, the best mode for carrying out the invention will be described with reference to the drawings.

図1は、本発明の実施例に係る撮像装置の構成図である。本撮像装置は、ディスク型の記録媒体に動画像を記録するデジタルビデオカメラ(以下、ビデオカメラと称する)として構成されている。   FIG. 1 is a configuration diagram of an imaging apparatus according to an embodiment of the present invention. The imaging apparatus is configured as a digital video camera (hereinafter referred to as a video camera) that records a moving image on a disk-type recording medium.

図1において、ビデオカメラ100は、制御系として、CPU101、RAM102、ROM103、及び操作部104を有している。CPU101は、内部バス105により、RAM102、ROM103、その他の各ブロックに接続され、ROM103に格納された制御プログラムに基づいて各ブロックの制御を行う。   In FIG. 1, a video camera 100 includes a CPU 101, a RAM 102, a ROM 103, and an operation unit 104 as a control system. The CPU 101 is connected to the RAM 102, the ROM 103, and other blocks via the internal bus 105, and controls each block based on a control program stored in the ROM 103.

この際、CPU101は、RAM102をワークエリアとして利用する。なお、ROM103には、図4,5のフローチャート等に係るプログラムも格納されている。操作部104は、ユーザが各種の操作レバーやボタンなどを操作した場合にその操作に係る操作信号をCPU101に出力し、CPU101は、操作信号に応じた各種処理を実行する。   At this time, the CPU 101 uses the RAM 102 as a work area. The ROM 103 also stores programs according to the flowcharts of FIGS. When the user operates various operation levers or buttons, the operation unit 104 outputs an operation signal related to the operation to the CPU 101, and the CPU 101 executes various processes according to the operation signal.

また、ビデオカメラ100は、図1において符号110〜115に示すカメラ系のブロックを有している。変倍レンズ110、フォーカスレンズ111を通過した光学像は、CCDイメージセンサ114の撮像面上に結像されて光電気変換される。ドライバ113は、CPU101の制御の下に、変倍レンズ110、フォーカスレンズ111、及び絞り112を駆動して、光学ズーム倍率、フォーカス及び絞り量の調整を行う。   The video camera 100 has camera system blocks denoted by reference numerals 110 to 115 in FIG. The optical image that has passed through the zoom lens 110 and the focus lens 111 is formed on the imaging surface of the CCD image sensor 114 and is photoelectrically converted. The driver 113 drives the variable power lens 110, the focus lens 111, and the aperture 112 under the control of the CPU 101, and adjusts the optical zoom magnification, focus, and aperture amount.

AFE115は、CPU101により指示されたシャッタ速度に基づいてCCDイメージセンサ114を駆動し、1/60秒毎に1フレーム分の画像信号を読み出し、画像信号のサンプル・ホールドと増幅、デジタル信号への変換を行う。   The AFE 115 drives the CCD image sensor 114 based on the shutter speed instructed by the CPU 101, reads an image signal for one frame every 1/60 seconds, samples and holds and amplifies the image signal, and converts it into a digital signal. I do.

更に、ビデオカメラ100は、図1において符号120〜125に示す画像処理系のブロックを有している。CPU101の制御により、画像入力部120は、撮影時にはAFE115から画像信号を入力し、再生時にはCODEC130から画像信号を入力する。画像処理部121は、バッファメモリ122を用いて、色変換や解像度変換、画像の切り出しなどの画像信号処理を行う。フォーカス評価部123、露出評価部124は、画像処理部121から出力される画像(画像信号)の複数の領域に対して、それぞれ、フォーカス、露出の状態を評価する。   Further, the video camera 100 has image processing system blocks denoted by reference numerals 120 to 125 in FIG. Under the control of the CPU 101, the image input unit 120 inputs an image signal from the AFE 115 during shooting, and inputs an image signal from the CODEC 130 during reproduction. The image processing unit 121 uses the buffer memory 122 to perform image signal processing such as color conversion, resolution conversion, and image clipping. The focus evaluation unit 123 and the exposure evaluation unit 124 evaluate the focus and exposure states for a plurality of regions of the image (image signal) output from the image processing unit 121, respectively.

特徴検出部125は、バッファメモリ122から1フレーム単位で画像を読出し、その画像の中から顔などの特定被写体を検出する。この検出方法それ自体は、例えば特許文献1に係る検出方法等の公知の検出方法を用いることができる。この場合、特徴検出部125は、1920×1080画素の単位で検出領域をシフトしながら、画像の全領域について顔などの特定被写体の特徴を検出していくものとする。   The feature detection unit 125 reads an image from the buffer memory 122 in units of one frame, and detects a specific subject such as a face from the image. As this detection method itself, for example, a known detection method such as the detection method according to Patent Document 1 can be used. In this case, it is assumed that the feature detection unit 125 detects the feature of a specific subject such as a face for the entire region of the image while shifting the detection region in units of 1920 × 1080 pixels.

本実施の形態に係る特徴検出部125は、更に、特定被写体の数と、それら特定被写体の特徴情報として、大きさ、位置、傾きを検出する。そして、CPU101は、各フレームにおいて検出した特定被写体の大きさ、位置、傾きの特徴情報を、被写体リストとしてRAM102に格納する。なお、特徴検出部125が特定被写体の特徴情報を検出する際に用いる検出条件は、RAM102に格納されているものとする。   The feature detection unit 125 according to the present embodiment further detects the number of specific subjects and the size, position, and inclination as the feature information of the specific subjects. Then, the CPU 101 stores the size, position, and tilt characteristic information of the specific subject detected in each frame in the RAM 102 as a subject list. Note that detection conditions used when the feature detection unit 125 detects feature information of a specific subject are stored in the RAM 102.

また、ビデオカメラ100は、図1において符号130〜133に示すレコーダ系のブロックを有している。撮影画像を記録する場合は、CODEC130は、CPU101の制御の下に、画像処理部121から出力される画像信号を符号化してバッファメモリ131に一時記憶させる。ディスクコントローラ132は、その符号化に係る画像信号をバッファメモリ131から読み出して、ディスク133、すなわち、DVDなどの記録媒体に記録する。   Further, the video camera 100 has recorder blocks shown by reference numerals 130 to 133 in FIG. When recording a captured image, the CODEC 130 encodes the image signal output from the image processing unit 121 and temporarily stores it in the buffer memory 131 under the control of the CPU 101. The disk controller 132 reads an image signal related to the encoding from the buffer memory 131 and records it on a disk 133, that is, a recording medium such as a DVD.

また、撮影画像を再生する場合は、ディスクコントローラ132は、CPU101の制御の下に、ディスク133から符号化に係る画像信号を読み出し、バッファメモリ131に一時記憶させる。CODEC130は、バッファメモリ131に一時記憶された符号化に係る画像信号を復号化する。   When playing back a captured image, the disk controller 132 reads an image signal related to encoding from the disk 133 under the control of the CPU 101 and temporarily stores it in the buffer memory 131. The CODEC 130 decodes an image signal related to encoding temporarily stored in the buffer memory 131.

また、ビデオカメラ100は、図1において符号140〜146に示す表示系のブロックを有している。描画処理部140は、CPU101の制御の下に、画像処理部121から出力される画像信号に対して文字や図形などを重畳して描画し、バッファメモリ141に一時記憶させる。LCDコントローラ142は、バッファメモリ141から画像信号を読み出して、LCD143に表示させる。また、外部出力コントローラ145は、バッファメモリ141から画像信号を読み出し、外部端子146に接続されたケーブル150を介して外部出力装置151へ出力する。   Further, the video camera 100 has display system blocks indicated by reference numerals 140 to 146 in FIG. Under the control of the CPU 101, the drawing processing unit 140 draws characters and graphics superimposed on the image signal output from the image processing unit 121, and temporarily stores them in the buffer memory 141. The LCD controller 142 reads an image signal from the buffer memory 141 and displays it on the LCD 143. Further, the external output controller 145 reads an image signal from the buffer memory 141 and outputs the image signal to the external output device 151 via the cable 150 connected to the external terminal 146.

次に、RAM102に格納される被写体リストについて説明する。図2は、RAM102に格納されている被写体リストを例示した概念図である。CPU101は、特徴検出部125により検出された顔などの特定被写体の特徴情報として、位置(X,Y)、幅W、傾きAと消失フレーム数Fを、被写体リストとしてRAM102に格納する。なお、特徴検出部125は、特定被写体の大きさとして、特定被写体の幅Wを検出する。   Next, the subject list stored in the RAM 102 will be described. FIG. 2 is a conceptual diagram illustrating a subject list stored in the RAM 102. The CPU 101 stores the position (X, Y), the width W, the inclination A, and the number of lost frames F as feature information of a specific subject such as a face detected by the feature detection unit 125 in the RAM 102 as a subject list. The feature detection unit 125 detects the width W of the specific subject as the size of the specific subject.

特定被写体は、人間の顔だけでなく例えば、人間の目や手、猫、犬などのペット等、種々の被写体が考えられるが、便宜上、特定被写体が顔であるものとして以下の説明を行う。   As the specific subject, not only a human face but also various subjects such as human eyes and hands, pets such as cats and dogs are conceivable. For convenience, the following description will be made assuming that the specific subject is a face.

CPU101は、被写体リストを更新する際、今回検出された顔と既にリストアップされている顔に係る大きさ(幅W)、位置(X,Y)、及び傾きAの相関関係に基づいて、これら顔が同一の顔であるか否かを判定する。   When the CPU 101 updates the subject list, it is based on the correlation between the size (width W), the position (X, Y), and the inclination A related to the face detected this time and the face already listed. It is determined whether the faces are the same face.

そして、CPU101は、同一の顔であると判定した場合は、その顔に係る大きさ(幅W)、位置(X,Y)、及び傾きAを今回検出したものに更新する。一方、同一の顔でないと判定した場合は、CPU101は、今回検出した顔を被写体リストに新規に登録する。   If the CPU 101 determines that the faces are the same, the CPU 101 updates the size (width W), position (X, Y), and inclination A relating to the faces to those detected this time. On the other hand, if it is determined that they are not the same face, the CPU 101 newly registers the face detected this time in the subject list.

上記の消失フレーム数Fは、何フレーム連続で当該顔が検出されていないかを示す情報であり、当該顔の情報が更新されなかった場合に、CPU101は、消失フレーム数Fを「1」だけインクリメントする。また、CPU101は、消失フレーム数Fが「3」となったとき、すなわち、3フレーム連続で当該顔が検出されなかったときに、被写体リストから当該顔に係る特徴情報を削除する。   The number of lost frames F is information indicating how many consecutive frames the face has not been detected. When the face information is not updated, the CPU 101 sets the number of lost frames F to “1”. Increment. Further, when the number of lost frames F becomes “3”, that is, when the face is not detected for three consecutive frames, the CPU 101 deletes the feature information related to the face from the subject list.

次に、特徴検出部125が顔を検出する場合の検出モード情報について説明する。この検出モード情報は、RAM102に格納されており、大別して優先情報(優先モード情報)と画像情報(画像モード情報)がある(図6参照)。優先モード情報としては、サイズ優先モード(第1の検出モード)と傾き優先モードがある(第2の検出モード)。第1の検出モードとしてのサイズ優先モードは、顔を検出する際に顔のサイズを優先して検出するモードであり、第2の検出モードとしての傾き優先モードは、顔の傾きを優先して顔を検出するモードである。   Next, detection mode information when the feature detection unit 125 detects a face will be described. This detection mode information is stored in the RAM 102, and is roughly classified into priority information (priority mode information) and image information (image mode information) (see FIG. 6). The priority mode information includes a size priority mode (first detection mode) and a tilt priority mode (second detection mode). The size priority mode as the first detection mode is a mode that prioritizes the face size when detecting the face, and the tilt priority mode as the second detection mode prioritizes the face inclination. In this mode, the face is detected.

画像情報(画像モード情報)としては、通常画像モードと拡大画像モードとがある。通常画像モードの場合は、拡大処理や縮小処理が施されていない通常の撮影画像を用いて顔の検出処理が行われる。拡大画像モードの場合は、通常の撮影画像から一部分を抜き出して通常の撮影画像と同じサイズに拡大した拡大画像を用いて、顔の検出処理が行われる。   Image information (image mode information) includes a normal image mode and an enlarged image mode. In the normal image mode, face detection processing is performed using a normal captured image that has not been subjected to enlargement processing or reduction processing. In the magnified image mode, face detection processing is performed using a magnified image extracted from a normal captured image and enlarged to the same size as the normal captured image.

CPU101は、特徴検出部125によってフレームに対して顔の検出処理が終了する毎に、優先モード情報を更新すべきか否かを判定する。   The CPU 101 determines whether or not the priority mode information should be updated every time the feature detection unit 125 completes the face detection process for the frame.

次に、優先モード情報の選択処理を、図4のフローチャートに基づいて説明する。この優先モード情報の選択処理は、フレーム毎に行われるものである。   Next, priority mode information selection processing will be described based on the flowchart of FIG. This priority mode information selection process is performed for each frame.

CPU101は、現在設定されている優先モード情報が、サイズ優先モード、傾き優先モードの何れであるかを判別する(S401)。現在設定されている優先モード情報がサイズ優先モードである場合は、CPU101は、現在のフレームにおいて特定被写体(顔)が特徴検出部125によって検出されたか否かを判別する(S402)。   The CPU 101 determines whether the currently set priority mode information is the size priority mode or the tilt priority mode (S401). If the currently set priority mode information is the size priority mode, the CPU 101 determines whether or not a specific subject (face) has been detected by the feature detection unit 125 in the current frame (S402).

ここで、CPU101は、変数Countを用いるカウンタとして機能する。この変数Countは、何フレーム連続で顔が検出されていないかを示す変数である。すなわち、CPU101は、現在のフレームにおいて顔が検出されなかった場合は、変数Countを「1」だけインクリメント(増加)する(S403)。一方、顔が検出された場合は、CPU101は、変数Countを「0」クリアする(S404)。つまり、この変数Countによって、連続して顔が検出できなかったフレームを数えることができる。   Here, the CPU 101 functions as a counter using the variable Count. This variable Count is a variable indicating how many frames the face is not detected continuously. That is, if no face is detected in the current frame, the CPU 101 increments (increases) the variable Count by “1” (S403). On the other hand, if a face is detected, the CPU 101 clears the variable Count to “0” (S404). In other words, this variable Count can be used to count frames for which no face could be detected continuously.

現在設定されている優先モード情報が傾き優先モードである場合は、CPU101は、現在のフレームにおいて特定被写体(顔)が特徴検出部125によって検出されたか否かを判別する(S405)。CPU101は、顔が検出されなかった場合は、変数Countを「1」だけインクリメントする(S407)。   When the currently set priority mode information is the tilt priority mode, the CPU 101 determines whether or not a specific subject (face) has been detected by the feature detection unit 125 in the current frame (S405). When the face is not detected, the CPU 101 increments the variable Count by “1” (S407).

一方、顔が検出された場合は、CPU101は、その顔の傾斜度(傾斜角度)が45度以内であるか否かを判別する(S406)。その結果、顔の傾斜度が45度以内であれば、CPU101は、変数Countを「1」だけインクリメントする(S407)。顔の傾斜度が45度以内ではなく、顔が大きく傾いている場合は、CPU101は、CPU101は、変数Countを「0」クリアする(S408)。   On the other hand, when a face is detected, the CPU 101 determines whether or not the degree of inclination (inclination angle) of the face is within 45 degrees (S406). As a result, if the inclination of the face is within 45 degrees, the CPU 101 increments the variable Count by “1” (S407). When the inclination of the face is not within 45 degrees and the face is greatly inclined, the CPU 101 clears the variable Count to “0” (S408).

CPU101は、S403又はS404の変数Countの更新処理を行った後、この変数Countが「30」以上であるか否かを判別する(S409)。CPU101は、変数Countが「30」未満であれば、次のフレームに対しても、現在のフレームに設定されているものと同じ優先モード情報であるサイズ優先モードを設定する(S411)。   After performing the update processing of the variable Count in S403 or S404, the CPU 101 determines whether or not the variable Count is “30” or more (S409). If the variable Count is less than “30”, the CPU 101 sets the size priority mode, which is the same priority mode information as that set for the current frame, for the next frame (S411).

一方、変数Countが、「30」以上であれば、CPU101は、次のフレームに対して、現在のフレームに設定されているものと異なる優先モード情報である傾き優先モードを設定する(S412)。   On the other hand, if the variable Count is “30” or more, the CPU 101 sets an inclination priority mode, which is priority mode information different from that set for the current frame, for the next frame (S412).

また、CPU101は、S407又はS408の変数Countの更新処理を行った後、この変数Countが「30」以上(規定数以上)であるか否かを判別する(S410)。CPU101は、変数Countが規定数の「30」未満であれば、次のフレームに対しても、現在のフレームに設定されているものと同じ優先モード情報である傾き優先モードを設定する(S412)。   Further, after performing the update processing of the variable Count in S407 or S408, the CPU 101 determines whether or not the variable Count is “30” or more (a specified number or more) (S410). If the variable Count is less than the prescribed number “30”, the CPU 101 sets the tilt priority mode, which is the same priority mode information as that set for the current frame, for the next frame (S412). .

一方、変数Countが、規定数の「30」以上であれば、CPU101は、次のフレームに対して、現在のフレームに設定されているものと異なる優先モード情報であるサイズ優先モードを設定する(S411)。   On the other hand, if the variable Count is equal to or greater than the prescribed number “30”, the CPU 101 sets a size priority mode, which is priority mode information different from that set for the current frame, for the next frame ( S411).

上記のように、本実施の形態では、傾き優先モードにおいて顔が検出されたとしても、その顔の傾きが45度以内であれば(S406、S406)、顔が検出されなかった場合と同様に、変数Countをインクリメント処理している(S407)。   As described above, in this embodiment, even if a face is detected in the tilt priority mode, if the face tilt is within 45 degrees (S406, S406), the same as when no face is detected. The variable Count is incremented (S407).

これは、45度以下という顔の傾きは、サイズ優先モードでも顔を検出できる可能性が高いので、より小さいサイズの顔を検出できるサイズ優先モードに早期に移行できるようにするためである。   This is because a face inclination of 45 degrees or less is likely to be able to detect a face even in the size priority mode, so that it is possible to make an early transition to the size priority mode in which a smaller size face can be detected.

次に、特徴検出部125が顔の検出に用いる上記の画像モード情報について、詳細に説明する。通常画像モードが設定されている場合は、特徴検出部125は、撮影された画像それ自体、すなわち拡大・縮小処理が施されていない撮影画像(通常画像)をそのまま用いて顔を検出する。   Next, the image mode information used by the feature detection unit 125 for face detection will be described in detail. When the normal image mode is set, the feature detection unit 125 detects a face using the captured image itself, that is, a captured image (normal image) that has not been subjected to enlargement / reduction processing.

拡大画像モードが設定されている場合は、特徴検出部125は、画像処理部121によって撮影画像の中央の3/4の領域を切り出され、通常画像と同一サイズに拡大されて生成された拡大画像を用いて顔を検出する。これら通常画像、拡大画像は、両方とも、画像処理部121により、フレーム毎にバッファメモリ122に格納される。   When the enlarged image mode is set, the feature detecting unit 125 cuts out the central 3/4 region of the captured image by the image processing unit 121 and enlarges the same size as the normal image to generate the enlarged image. The face is detected using. Both the normal image and the enlarged image are stored in the buffer memory 122 for each frame by the image processing unit 121.

CPU101は、画像モード情報については、顔の検出結果に応じて切り替えを行う優先モード情報とは異なり、通常画像モードと拡大画像モードをフレーム毎に交互に設定する。そして、特徴検出部125は、設定された通常画像モード又は拡大画像モードに係る通常画像又は拡大画像をバッファメモリ122から読出し、その読み出した画像の中から顔を検出する。   The CPU 101 sets the image mode information alternately between the normal image mode and the enlarged image mode for each frame, unlike the priority mode information for switching according to the face detection result. Then, the feature detection unit 125 reads the normal image or the enlarged image related to the set normal image mode or the enlarged image mode from the buffer memory 122, and detects the face from the read image.

次に、図6に示した検出条件について説明する。この検出条件は、優先モード情報と画像モード情報の組み合わせ結果に応じて、CPU101によって設定される。CPU101は、特徴検出部125により特定被写体(顔)を検出する際の検出条件として、顔の最小の大きさ(最小サイズ)、傾きの範囲を設定することができる。   Next, the detection conditions shown in FIG. 6 will be described. This detection condition is set by the CPU 101 according to the combination result of the priority mode information and the image mode information. The CPU 101 can set a minimum face size (minimum size) and a tilt range as detection conditions when the feature detection unit 125 detects a specific subject (face).

この最小サイズとしては、200画素、250画素、300画素の画素単位で設定することができ、傾きの範囲は、上向き垂直方向を中心とした45度と135度とを設定することができる(図3参照)。最小サイズが小さいほど、傾きの範囲が広いほど、顔の検出処理に長時間を要する。また、これら最小サイズ、傾きの範囲は、フレーム毎に設定変更することができる。   The minimum size can be set in units of 200 pixels, 250 pixels, and 300 pixels, and the inclination range can be set to 45 degrees and 135 degrees centering on the upward vertical direction (see FIG. 3). The smaller the minimum size and the wider the tilt range, the longer the face detection process. Further, the minimum size and the range of inclination can be changed for each frame.

ここで、本実施の形態においては、1/60秒毎に1フレーム分の処理を行うことを想定しているため、各フレームにおいて顔を検出する場合の検出条件は、その検出処理が1/60秒以内(規定時間以内)に完了する条件でなくてはならない。   Here, in this embodiment, since it is assumed that processing for one frame is performed every 1/60 seconds, the detection condition for detecting a face in each frame is that the detection processing is 1 / The condition must be completed within 60 seconds (within the specified time).

図3は、最小サイズと傾きの範囲の各設定値と、顔の検出処理に要する所要時間との関係を示したものである。サイズを優先して検出したい場合には、検出条件を最小サイズ200画素、傾きの範囲45度に設定する(最小サイズ条件:第1の検出条件)。また、傾きを優先して検出したい場合には、検出条件を最小サイズ300画素、傾きの範囲を135度に設定する(最大傾き条件:第2の検出条件)。この図3が示す詳細な意味内容については、後で具体例により説明する。   FIG. 3 shows the relationship between the set values of the minimum size and the range of inclination and the time required for the face detection process. When it is desired to detect the size preferentially, the detection condition is set to a minimum size of 200 pixels and an inclination range of 45 degrees (minimum size condition: first detection condition). When it is desired to detect the inclination with priority, the detection condition is set to a minimum size of 300 pixels and the inclination range is set to 135 degrees (maximum inclination condition: second detection condition). The detailed meaning and contents shown in FIG. 3 will be described later with a specific example.

次に、顔の検出処理を図5のフローチャートに基づいて説明する。特徴検出部125は、撮影画像の最初のフレームに対して、検出モード情報の初期値(優先モード情報はサイズ優先モード、画像モード情報は通常画像モード、検出条件は最小サイズ条件)を設定する(S501)。そして、特徴検出部125は、S501にて設定した各情報の初期値に対応する検出条件(図6参照)で顔の検出処理を行う(S502)。この場合、CPU101は、特徴検出部125による検出結果に基づいて被写体リストを更新する。   Next, face detection processing will be described based on the flowchart of FIG. The feature detection unit 125 sets the initial value of the detection mode information (the priority mode information is the size priority mode, the image mode information is the normal image mode, and the detection condition is the minimum size condition) for the first frame of the captured image ( S501). Then, the feature detection unit 125 performs face detection processing under the detection condition (see FIG. 6) corresponding to the initial value of each information set in S501 (S502). In this case, the CPU 101 updates the subject list based on the detection result by the feature detection unit 125.

次に、CPU101は、次のフレームでの顔の検出処理のために、図4の優先モード情報の選択処理を行う(S503)。同様に、CPU101は、次のフレームでの顔の検出処理のために、通常画像と拡大画像が交互に切り替わるように画像モード情報を選択する(S504)。更に、CPU101は、S503,S504にて選択した優先モード情報、画像モード情報に基づいて、次のフレームでの顔の検出条件を選択する(S505)。   Next, the CPU 101 performs priority mode information selection processing in FIG. 4 for face detection processing in the next frame (S503). Similarly, the CPU 101 selects image mode information so that the normal image and the enlarged image are alternately switched for the face detection process in the next frame (S504). Further, the CPU 101 selects a face detection condition for the next frame based on the priority mode information and the image mode information selected in S503 and S504 (S505).

この場合、CPU101は、図6に示したように、優先情報(優先モード情報)が傾き優先モードであっても、画像情報(画像モード情報)が通常画像である場合は、検出条件を最小サイズ条件(すなわち、サイズ優先の検出条件)とする。そして、優先情報が傾き優先モードで、画像情報が拡大画像である場合のみ、検出条件を最大傾き条件(すなわち、傾き優先の検出条件)とする。   In this case, as shown in FIG. 6, the CPU 101 sets the detection condition to the minimum size when the image information (image mode information) is a normal image even if the priority information (priority mode information) is the tilt priority mode. The condition (that is, the detection condition with size priority). Only when the priority information is the tilt priority mode and the image information is an enlarged image, the detection condition is set to the maximum tilt condition (that is, the tilt priority detection condition).

これは、動画撮影中に、画面内にサイズの小さな被写体が入ってきたり、ズーム操作によって被写体が小さくなる確率に比較して、被写体がビデオカメラ100に対して横に傾いていたり、被写体の傾きが変化したりする確率は低いと考えられるためである。そこで、傾き優先モードであっても、最大傾き条件を設定するのは2フレームのうちの一方のフレームのみとし、他方のフレームを最小サイズ条件に設定することで、小さな被写体が現れた場合もなるべく検出できるように構成されている。   This is because the subject is tilted sideways with respect to the video camera 100 or the tilt of the subject compared to the probability that a subject with a small size will enter the screen during movie shooting, or the subject will become smaller due to the zoom operation. This is because the probability of changing is considered to be low. Therefore, even in the tilt priority mode, the maximum tilt condition is set only for one of the two frames, and the other frame is set to the minimum size condition so that a small subject appears as much as possible. It is configured so that it can be detected.

次に、ビデオカメラ100で被写体を撮影した場合の動作を、具体例で説明する。ここで、顔の検出モード情報の初期値として、優先モード情報はサイズ優先モード、画像モード情報は通常画像モード、検出条件は最小サイズ条件(最小サイズ200画素、傾き45度)が設定されているものとする。   Next, the operation when a subject is photographed with the video camera 100 will be described using a specific example. Here, as the initial value of the face detection mode information, the size priority mode is set as the priority mode information, the normal image mode is set as the image mode information, and the minimum size condition (minimum size 200 pixels, inclination 45 degrees) is set as the detection condition. Shall.

また、顔(特定被写体)を検出できなかった連続フレーム数を示す変数Countは「0」であるものとする。更に、撮影開始から1秒間(60フレームの期間)、顔は静止しており、同じ画像が撮影されていたものとする。   It is assumed that a variable Count indicating the number of consecutive frames in which a face (specific subject) cannot be detected is “0”. Further, it is assumed that the face is stationary and the same image is captured for 1 second (period of 60 frames) from the start of capturing.

図7、図8は、それぞれ、撮影画像の最初のフレームF0について、バッファメモリ122に格納されている通常画像と拡大画像を示している。図7の通常画像700、図8の拡大画像800には、人物710が写っている。通常画像700、拡大画像800の画像サイズは1920×1080画素であり、人物710の顔の部分の幅は450画素、600画素であり、傾きはいずれも80度であるものとする。   7 and 8 respectively show the normal image and the enlarged image stored in the buffer memory 122 for the first frame F0 of the captured image. A person 710 is shown in the normal image 700 of FIG. 7 and the enlarged image 800 of FIG. The image size of the normal image 700 and the enlarged image 800 is 1920 × 1080 pixels, the width of the face portion of the person 710 is 450 pixels and 600 pixels, and the inclination is 80 degrees.

特徴検出部125は、前述の初期設定された検出モード情報に基づいて通常画像700の中から顔の検出処理を行い、CPU101は、特徴検出部125による顔の検出結果に基づいて被写体リストを更新する。   The feature detection unit 125 performs face detection processing from the normal image 700 based on the previously set detection mode information, and the CPU 101 updates the subject list based on the face detection result by the feature detection unit 125. To do.

この場合、サイズ優先モードが設定されているため、特徴検出部125は、顔の傾きが45度以内の場合にしか顔を検出できない状態であり、人物710の顔を検出することができない。従って、CPU101は、変数Countに「1」をセットする。   In this case, since the size priority mode is set, the feature detection unit 125 can detect the face only when the inclination of the face is within 45 degrees and cannot detect the face of the person 710. Therefore, the CPU 101 sets “1” to the variable Count.

次に、CPU101は、検出モード情報を更新する。この場合、CPU101は、変数Countが「1」なので、優先モード情報はサイズ優先モードを維持し、画像モード情報は更新前が通常画像モードであったため拡大画像モードに変更する。また、CPU101は、優先モード情報としてサイズ優先モードを維持したので、検出条件としては最小サイズ条件を設定する。   Next, the CPU 101 updates the detection mode information. In this case, since the variable Count is “1”, the CPU 101 maintains the size priority mode for the priority mode information, and changes the image mode information to the enlarged image mode because the image mode information was the normal image mode before the update. Since the CPU 101 maintains the size priority mode as the priority mode information, the minimum size condition is set as the detection condition.

フレームF0から30フレーム後にバッファメモリ122に格納されている画像は、人物710が静止しているため、相変わらず、図7、図8に示したフレームF0と同様の画像のままとなる。従って、特徴検出部125は、この30フレーム後のフレームにおいても、相変わらず、人物710の顔を検出できない状態で、被写体リストの更新と変数Countのインクリメントを行う。   The image stored in the buffer memory 122 30 frames after the frame F0 remains the same as the frame F0 shown in FIGS. 7 and 8 because the person 710 is still. Therefore, the feature detection unit 125 updates the subject list and increments the variable Count in a state where the face of the person 710 cannot be detected in the frames after 30 frames.

この場合、CPU101が被写体リストの更新と、変数Countのインクリメントをフレーム毎に行ってきた結果、変数Countは「30」となる。そのため、CPU101は、今まで設定していた優先モード情報(サイズ優先モード)を傾き優先モードに変更する(図4参照)。また、CPU101は、画像モード情報は更新前が通常画像であったため拡大画像に変更する。   In this case, as a result of the CPU 101 updating the subject list and incrementing the variable Count for each frame, the variable Count becomes “30”. Therefore, the CPU 101 changes the priority mode information (size priority mode) set so far to the tilt priority mode (see FIG. 4). Further, the CPU 101 changes the image mode information to an enlarged image because the image mode information was a normal image before the update.

更に、CPU101は、優先モード情報を傾き優先モードに変更し、画像モード情報を拡大画像モードに変更したのに応じて、検出条件としては、最大傾き条件(最小サイズ300画素、傾き135度)を設定する。   Furthermore, the CPU 101 changes the priority mode information to the tilt priority mode, and changes the image mode information to the enlarged image mode, so that the detection condition is the maximum tilt condition (minimum size 300 pixels, tilt 135 degrees). Set.

これは、最小検出サイズを最も小さな200画素に設定しているにも拘らず、顔を検出できない原因として、顔の傾きが、最小検出サイズが200画素であるときに制御で顔を検出し得る45度より大きいことが考えられるからである。   This is because the face can not be detected even though the minimum detection size is set to the smallest 200 pixels, and the face can be detected by the control when the minimum inclination size is 200 pixels. This is because it may be larger than 45 degrees.

ただし、検出可能な顔の角度を単純に大きくしたままでは、図3に示すように、顔の検出処理に要する時間が1/60秒を超えてしまう。この場合、特に、動画を撮影する場合は、顔を検出したとしても、その顔に適した合焦制御、露光制御で実際に撮影を行う時点では検出に係る顔が別の位置に移動してしまい、顔の検出処理が無駄になる。このため、顔の検出に要する時間は、1/60秒以内(規定時間以内)にする必要がある。   However, if the detectable face angle is simply increased, the time required for the face detection process exceeds 1/60 seconds as shown in FIG. In this case, particularly when shooting a moving image, even if a face is detected, the face to be detected moves to another position at the time of actual shooting with focus control and exposure control suitable for the face. Therefore, the face detection process is wasted. For this reason, the time required for face detection needs to be within 1/60 seconds (within a specified time).

そこで、CPU101は、顔を検出できるようにすべく最大傾き条件(135度)を設定すると共に、規定の1/60秒以内の時間で顔を検出するために、最小検出サイズを200画素から300画素にする。   Therefore, the CPU 101 sets a maximum inclination condition (135 degrees) so that the face can be detected, and sets the minimum detection size from 200 pixels to 300 in order to detect the face within a specified time within 1/60 seconds. Make a pixel.

フレームF0から31フレーム後にバッファメモリ122に格納されている画像は、人物710が静止しているため、相変わらず、図7、図8に示したフレームF0と同様の画像のままとなる。しかし、最大傾き条件(135度)が設定されているため、特徴検出部125は、この31フレーム後のフレームに係る拡大画像800の中から人物710の顔を検出することができる。従って、CPU101は、変数Countをクリアして「0」にする。   The image stored in the buffer memory 122 after 31 frames from the frame F0 remains the same as the frame F0 shown in FIGS. 7 and 8 because the person 710 is still. However, since the maximum inclination condition (135 degrees) is set, the feature detection unit 125 can detect the face of the person 710 from the enlarged image 800 related to the frame after 31 frames. Therefore, the CPU 101 clears the variable Count to “0”.

次に、CPU101は、検出モード情報を更新する。この場合、CPU101は、優先モード情報は、変数Countが「0」であるので優先モード情報は傾き優先モードを維持し、画像モード情報は、更新前が拡大画像であったため通常画像に更新する。また、CPU101は、優先モード情報が傾き優先モードであるが、画像モード情報が通常画像モードなので、検出条件としては、最小サイズ条件(最小サイズ200画素、傾き45度)に変更する。これにより、このフレームでは人物710の顔は検出できなくなり変数Countがインクリメントされるが、その次のフレームでは再び拡大画像モードに変更されて最大傾き条件が設定されるため、変数Countはクリアされて「0」となる。   Next, the CPU 101 updates the detection mode information. In this case, since the variable Count is “0” in the priority mode information, the CPU 101 maintains the inclination priority mode in the priority mode information, and the image mode information is updated to a normal image because the image was updated before the update. Further, the CPU 101 changes the priority mode information to the tilt priority mode, but the image mode information is the normal image mode, so the detection condition is changed to the minimum size condition (minimum size 200 pixels, tilt 45 degrees). As a result, the face of the person 710 cannot be detected in this frame, and the variable Count is incremented. However, in the next frame, the mode is changed to the enlarged image mode again and the maximum inclination condition is set, so the variable Count is cleared. “0”.

その後、図7、図8の状態から人物710が起き上がり、その後1秒間(60フレームの間)、再び人物710は静止しており、同じ画像が撮影されていたものとする。図9、図10は、図7、図8の横になっていた人物710が起き上がった瞬間の撮影画像のフレームF1においてバッファメモリ122に格納されている通常画像900と拡大画像1000を示している。   After that, it is assumed that the person 710 rises from the states of FIGS. 7 and 8 and then remains stationary for 1 second (60 frames), and the same image is captured. FIGS. 9 and 10 show the normal image 900 and the enlarged image 1000 stored in the buffer memory 122 in the frame F1 of the captured image at the moment when the person 710 lying in FIGS. 7 and 8 wakes up. .

この図9、図10の通常画像900、拡大画像1000の画像サイズは、図7、図8と同様に1920×1080画素であり、人物710の顔の部分の幅も、図7、図8と同様に450画素、600画素であるものとする。ただし、顔の傾きは、いずれも10度であり、図7、図8の80度から変化しているものとする。   The image size of the normal image 900 and the enlarged image 1000 in FIGS. 9 and 10 is 1920 × 1080 pixels as in FIGS. 7 and 8, and the width of the face portion of the person 710 is as in FIGS. 7 and 8. Similarly, it is assumed that the pixels are 450 pixels and 600 pixels. However, the inclination of the face is 10 degrees in all cases, and changes from 80 degrees in FIGS. 7 and 8.

また、変数Countは「0」であり、優先モード情報としては、引き続いて、傾き優先モードが設定されており、画像モード情報は拡大画像であるものとする。また、検出条件としては、最大傾き条件が設定されているものとする。   Further, the variable Count is “0”, and as the priority mode information, the tilt priority mode is subsequently set, and the image mode information is an enlarged image. Further, it is assumed that the maximum inclination condition is set as the detection condition.

特徴検出部125は、検出モード情報に基づいて、拡大画像1000の中から顔の検出処理を行い、CPU101は、特徴検出部125による顔の検出結果に基づいて、被写体リストを更新する。この場合、人物710は検出されるが、傾きが45度以内であるため、CPU101は、変数Countをインクリメントする。   The feature detection unit 125 performs face detection processing from the enlarged image 1000 based on the detection mode information, and the CPU 101 updates the subject list based on the face detection result by the feature detection unit 125. In this case, the person 710 is detected, but since the inclination is within 45 degrees, the CPU 101 increments the variable Count.

傾き優先モードが設定されている状態で変数Countが「30」に達すれば、CPU101は、傾き優先モードからサイズ優先モードに変更する。   If the variable Count reaches “30” in the state where the inclination priority mode is set, the CPU 101 changes from the inclination priority mode to the size priority mode.

次に、CPU101は、検出モード情報を更新する。優先モード情報は、変数Countが「1」なので傾き優先モードを維持し、画像モード情報は更新前が拡大画像であったため通常画像に切り替える。また、CPU101は、優先モード情報は傾き優先モードであるが、画像モード情報が通常画像なので、検出条件としては最小サイズ条件を設定する。   Next, the CPU 101 updates the detection mode information. In the priority mode information, since the variable Count is “1”, the inclination priority mode is maintained, and the image mode information is switched to the normal image because the image before update is an enlarged image. The CPU 101 sets the minimum size condition as the detection condition because the priority mode information is the tilt priority mode but the image mode information is a normal image.

フレームF1から30フレーム後にバッファメモリ122に格納される画像は、人物710が静止しているため、相変わらず、図9、図10に示したフレームF1と同様の画像である。特徴検出部125は、画像モード情報に基づいて、通常画像900から顔を検出する。CPU101は、特徴検出部125による顔の検出結果に基づいて、被写体リストを更新する。   The image stored in the buffer memory 122 30 frames after the frame F1 is the same image as the frame F1 shown in FIGS. 9 and 10 because the person 710 is still. The feature detection unit 125 detects a face from the normal image 900 based on the image mode information. The CPU 101 updates the subject list based on the face detection result by the feature detection unit 125.

このフレームF1での検出処理においても人物710の顔が検出されるが、顔の傾きが45度以内であるため、CPU101は、変数Countをインクリメントする。この結果、変数Countは「30」となる。そのため、CPU101は、優先モード情報を傾き優先モードからサイズ優先モードに切り替える。CPU101は、画像モード情報については、更新前が通常画像であったため、拡大画像に切り替える。また、CPU101は、優先モード情報をサイズ優先モードに切替えたので、検出条件は最小サイズ条件を維持する。   The face of the person 710 is also detected in the detection process in the frame F1, but the CPU 101 increments the variable Count because the inclination of the face is within 45 degrees. As a result, the variable Count is “30”. Therefore, the CPU 101 switches the priority mode information from the tilt priority mode to the size priority mode. For the image mode information, the CPU 101 switches to the enlarged image because the image before the update was a normal image. Further, since the CPU 101 switches the priority mode information to the size priority mode, the detection condition maintains the minimum size condition.

以上説明したように、CPU101は、特徴検出部125が1/60秒以内に顔を検出できる範囲内で、小サイズの顔を検出することを優先したフレーム毎に切り替え可能に設定する。   As described above, the CPU 101 sets so that switching can be performed for each frame in which priority is given to detecting a small face within a range in which the feature detection unit 125 can detect a face within 1/60 seconds.

このような検出条件の切替処理により、規定時間内に連続的に特定被写体(顔)を検出し、且つ特定被写体が小さい場合や傾斜している場合においても高精度に検出することが可能となる。更には、所望の特定被写体に適正に合焦し、適正な露光状態の高品質の画像を撮影することが可能となる。   By such detection condition switching processing, it is possible to detect a specific subject (face) continuously within a specified time and to detect with high accuracy even when the specific subject is small or inclined. . Furthermore, it is possible to properly focus on a desired specific subject and take a high-quality image with an appropriate exposure state.

なお、本発明は、上記の実施例に限定されることなく、例えば、サイズ優先モードと傾き優先モードを交互に切り替えるタイミングは、特定被写体が検出されないフレームが30フレーム連続した場合に限らず、このフレーム数を変更してもよい。   The present invention is not limited to the above-described embodiment. For example, the timing for alternately switching between the size priority mode and the tilt priority mode is not limited to the case where 30 frames in which a specific subject is not detected are consecutive, The number of frames may be changed.

また、本発明の目的は、前述した実施例の機能を実現するようにプログラミングされたソフトウェアのプログラムコードを記憶した記憶媒体を、システム或いは装置に供給することによっても達成される。この場合、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出し実行することとなる。   The object of the present invention can also be achieved by supplying a storage medium storing a program code of software programmed to realize the functions of the above-described embodiments to a system or apparatus. In this case, the computer (or CPU, MPU, etc.) 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 program code and the storage medium storing the program code constitute the present invention.

また、プログラムコードを供給するための記憶媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光磁気ディスク、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。さらに、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW等の光ディスクも、プログラムコードを供給するための記憶媒体として用いることができる。または、プログラムコードをネットワークを介してダウンロードしてもよい。   Further, as a storage medium for supplying the program code, for example, a floppy (registered trademark) disk, a hard disk, a magneto-optical disk, a CD-ROM, a CD-R, a CD-RW, a magnetic tape, a nonvolatile memory card, A ROM or the like can be used. Furthermore, optical disks such as DVD-ROM, DVD-RAM, DVD-RW, DVD + RW, etc. can also be used as a storage medium for supplying program codes. Alternatively, the program code may be downloaded via a network.

また、コンピュータが読み出したプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれる。   Further, based on the instruction of the program code read by the computer, an OS (operating system) running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing. This is also included.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた場合も含まれる。また、そのプログラムコードの指示に基づき、その拡張機能を拡張ボードや拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれる。   Furthermore, the case where the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer is also included. In addition, based on the instruction of the program code, a CPU or the like provided with the extension function in the extension board or the extension unit may perform part or all of the actual processing, and the function of the above-described embodiment may be realized by the processing. included.

本発明の実施例に係る撮像装置の構成図である。It is a block diagram of the imaging device which concerns on the Example of this invention. 被写体リストの内容を例示した図である。It is the figure which illustrated the contents of the subject list. 特定被写体(顔など)の検出条件(最小サイズ、傾きの範囲)と検出処理時間との関係を示す図である。It is a figure which shows the relationship between detection conditions (minimum size, the range of inclination) of specific subjects (such as a face) and detection processing time. 顔の検出条件としてのサイズ優先モードと傾き優先モードの選択切り替え処理を示すフローチャートである。It is a flowchart which shows the selection switching process of the size priority mode and inclination priority mode as face detection conditions. 顔検出処理を示すフローチャートである。It is a flowchart which shows a face detection process. 顔の各検出モード情報の関係を示す図である。It is a figure which shows the relationship between each detection mode information of a face. 拡大/縮小がなされていない撮影画像(通常画像)を例示した図である。It is the figure which illustrated the picked-up image (normal image) which has not been enlarged / reduced. 図7の通常画像の一部を抜き出して拡大した拡大画像を示す図である。It is a figure which shows the enlarged image which extracted and expanded a part of normal image of FIG. 図7の特定被写体が動いた後に撮影した場合の通常画像を示す図である。It is a figure which shows the normal image at the time of image | photographing, after the specific subject of FIG. 7 moves. 図9の通常画像の一部を抜き出して拡大した拡大画像を示す図である。It is a figure which shows the enlarged image which extracted a part of normal image of FIG. 9, and expanded.

符号の説明Explanation of symbols

100…撮像装置
101…CPU
102…RAM
103…ROM
114…CCDイメージセンサ
121…画像処理部
122…バッファメモリ
125…特徴検出部
100 ... Imaging device 101 ... CPU
102 ... RAM
103 ... ROM
114: CCD image sensor 121 ... Image processing unit 122 ... Buffer memory 125 ... Feature detection unit

Claims (8)

撮影手段により撮影された撮影画像から特定被写体を検出する検出手段と、
前記検出手段が前記特定被写体を検出するための検出条件を設定する設定手段と、
を有し、
前記設定手段は、前記検出手段が規定時間以内に前記特定被写体を検出できる範囲内で、第1の検出モードと第2の検出モードを切り替えるものであり、前記第1の検出モードは前記第2の検出モードに比較して小さいサイズの前記特定被写体を検出することを優先した検出モードであり、前記第2の検出モードは前記第1の検出モードに比較して傾斜した状態の前記特定被写体を検出することを優先した検出モードであることを特徴とする撮像装置。
Detecting means for detecting a specific subject from a photographed image photographed by the photographing means;
Setting means for setting detection conditions for the detection means to detect the specific subject;
Have
The setting means switches between a first detection mode and a second detection mode within a range in which the detection means can detect the specific subject within a specified time. The first detection mode is the second detection mode. The second detection mode is a detection mode in which priority is given to detecting the specific subject having a smaller size compared to the first detection mode, and the second detection mode is for the specific subject in an inclined state as compared to the first detection mode. An imaging apparatus characterized by being in a detection mode in which priority is given to detection.
前記設定手段は、前記第1の検出モードが設定されている状態で前記検出手段が規定数以上のフレームに亘って前記特定被写体の検出処理を行っても、前記特定被写体を検出できなかった場合に、前記第2の検出モードに切り替え、前記第2の検出モードが設定されている状態で前記検出手段が規定数以上のフレームに亘って前記特定被写体の検出処理を行っても、前記特定被写体を検出できなかった場合に、前記第1の検出モードに切り替えることを特徴とする請求項1に記載の撮像装置。   The setting means is unable to detect the specific subject even when the detection means performs the detection processing of the specific subject over a predetermined number of frames in a state where the first detection mode is set. In addition, even if the second detection mode is switched and the detection means performs the detection process of the specific subject over a predetermined number of frames in the state where the second detection mode is set, the specific subject The imaging apparatus according to claim 1, wherein the image pickup device is switched to the first detection mode when the image cannot be detected. 前記設定手段は、前記検出手段が前記撮影画像と、前記撮影画像から一部分を抜き出して前記撮影画像と同じサイズに拡大した拡大画像とを交互に用いて前記特定被写体を検出することを特徴とする請求項1又は2に記載の撮像装置。   The setting unit detects the specific subject by alternately using the photographed image and an enlarged image obtained by extracting a part from the photographed image and enlarging it to the same size as the photographed image. The imaging device according to claim 1 or 2. 前記設定手段は、前記第1の検出モードが設定されている状態では、小さいサイズの前記特定被写体を検出することを優先する第1の検出条件を設定し、前記第2の検出モードが設定されている状態では、前記第1の検出条件と傾斜した状態の前記特定被写体を検出することを優先する第2の検出条件を切り替えて設定することを特徴とする請求項3に記載の撮像装置。   In the state in which the first detection mode is set, the setting unit sets a first detection condition that prioritizes detection of the specific subject having a small size, and the second detection mode is set. The imaging apparatus according to claim 3, wherein the imaging apparatus is configured to switch between the first detection condition and the second detection condition that prioritizes the detection of the specific subject in an inclined state. 前記設定手段は、前記第2の検出モードが設定されている状態において、前記検出手段が前記拡大画像を用いて前記特定被写体を検出する場合にのみ、前記第2の検出条件を設定することを特徴とする請求項4に記載の撮像装置。 The setting means sets the second detection condition only when the detection means detects the specific subject using the enlarged image in a state where the second detection mode is set. The imaging apparatus according to claim 4, wherein the imaging apparatus is characterized. 前記検出手段が前記特定被写体を検出できなかった場合に変数を増加させるカウンタ手段を有し、
前記カウンタ手段は、前記第2の検出モードが設定されている状態で前記検出手段により前記特定被写体が検出された場合であっても、当該検出に係る特定被写体の傾斜度が前記第1の検出モードの下でも前記特定被写体を検出可能な傾斜度である場合は、当該特定被写体が検出されたフレームによって前記変数を増加させることを特徴とする請求項2に記載の撮像装置。
Counter means for increasing the variable when the detection means cannot detect the specific subject;
Even when the specific object is detected by the detection means in a state where the second detection mode is set, the counter means detects the inclination of the specific object related to the detection in the first detection mode. The imaging apparatus according to claim 2, wherein when the inclination is such that the specific subject can be detected even under the mode, the variable is increased according to a frame in which the specific subject is detected.
撮影手段により撮影された撮影画像から特定被写体を検出する検出工程と、
前記検出工程により前記特定被写体を検出するための検出条件を設定する設定工程と、
を有し、
前記設定工程は、前記検出工程において規定時間以内に前記特定被写体を検出できる範囲内で、第1の検出モードと第2の検出モードを切り替えるものであり、前記第1の検出モードは前記第2の検出モードに比較して小さいサイズの前記特定被写体を検出することを優先した検出モードであり、前記第2の検出モードは前記第1の検出モードに比較して傾斜した状態の前記特定被写体を検出することを優先した検出モードであることを特徴とする撮像装置の制御方法。
A detection step of detecting a specific subject from a photographed image photographed by the photographing means;
A setting step for setting a detection condition for detecting the specific subject by the detection step;
Have
The setting step switches between a first detection mode and a second detection mode within a range in which the specific subject can be detected within a specified time in the detection step. The first detection mode is the second detection mode. The second detection mode is a detection mode in which priority is given to detecting the specific subject having a smaller size compared to the first detection mode, and the second detection mode is for the specific subject in an inclined state as compared to the first detection mode. A control method for an imaging apparatus, characterized in that the detection mode prioritizes detection.
請求項7に記載の撮像装置の制御方法をコンピュータが実行できるようにプログラミングされてなるプログラム。   A program that is programmed so that a computer can execute the control method of the imaging apparatus according to claim 7.
JP2008327913A 2008-12-24 2008-12-24 Imaging device, control method thereof, and program Active JP5137808B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008327913A JP5137808B2 (en) 2008-12-24 2008-12-24 Imaging device, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008327913A JP5137808B2 (en) 2008-12-24 2008-12-24 Imaging device, control method thereof, and program

Publications (2)

Publication Number Publication Date
JP2010154041A JP2010154041A (en) 2010-07-08
JP5137808B2 true JP5137808B2 (en) 2013-02-06

Family

ID=42572647

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008327913A Active JP5137808B2 (en) 2008-12-24 2008-12-24 Imaging device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP5137808B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013074570A (en) * 2011-09-29 2013-04-22 Sanyo Electric Co Ltd Electronic camera

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4341696B2 (en) * 2007-05-18 2009-10-07 カシオ計算機株式会社 Imaging device, face area detection program, and face area detection method

Also Published As

Publication number Publication date
JP2010154041A (en) 2010-07-08

Similar Documents

Publication Publication Date Title
JP4626493B2 (en) Image processing apparatus, image processing method, program for image processing method, and recording medium recording program for image processing method
JP4489608B2 (en) DIGITAL STILL CAMERA, IMAGE REPRODUCTION DEVICE, FACE IMAGE DISPLAY DEVICE, AND CONTROL METHOD THEREOF
JP5043736B2 (en) Imaging apparatus and control method thereof
KR100994596B1 (en) Image capture device that record image accordant with predetermined condition, photographing method thereof and storage medium recording that program
JP4761146B2 (en) Imaging apparatus and program thereof
JP6248412B2 (en) Imaging apparatus, imaging method, and program
JP4623193B2 (en) Imaging apparatus, imaging method, and program
EP2211306A1 (en) Imaging apparatus, subject tracking method and storage medium
JP5237721B2 (en) Imaging device
JP2007072606A (en) Image processor and processing method
JP2008288911A (en) Imaging apparatus, face area detection program, and face area detection method
JP5367129B2 (en) Imaging apparatus, control apparatus, and control method thereof
JP6671323B2 (en) Imaging device
JP2005156967A (en) Digital camera and image processing apparatus
JP2010199681A (en) Image processing apparatus and program
JP5137808B2 (en) Imaging device, control method thereof, and program
CN113965704A (en) Control device, control method, and program
JP4888829B2 (en) Movie processing device, movie shooting device, and movie shooting program
JP5332668B2 (en) Imaging apparatus and subject detection program
JP5024033B2 (en) Object tracking device, object tracking program, and object tracking method
JP5610818B2 (en) Imaging apparatus and control method thereof
JP5359715B2 (en) Subject tracking device, subject tracking method, and camera
JP2009194469A (en) Imaging apparatus
JP6335064B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND COMPUTER PROGRAM
JP2019154070A (en) Display device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121011

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121113

R151 Written notification of patent or utility model registration

Ref document number: 5137808

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20151122

Year of fee payment: 3