JP5137808B2 - Imaging device, control method thereof, and program - Google Patents
Imaging device, control method thereof, and program Download PDFInfo
- 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
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では、デジタル画像上でサブウィンドウを走査しながら、このサブウィンドウの画像が顔を含む顔画像であるか否かを判別器により順次判別していくことにより、顔を検出する技術が開示されている。
また、特許文献2では、検出領域を変化させながら顔の検出処理を行っている。その際、顔の傾きが小さい場合は検出領域の移動幅を小さくすることで、顔の検出精度を高くし、顔の傾きが大きい場合は検出領域の移動幅を大きくすることで、顔の検出精度が低くなる代わりに検出処理時間を短縮している。
しかしながら、検出条件を変更しながら特定被写体を検出する手法においては、通常、特定被写体の検出精度を高くしようとすると、検出条件をきめ細かく設定する必要があるため、処理時間が長くなる。逆に、検出処理を高速化しようとすると、検出条件を粗く設定する必要があるため、特定被写体の検出精度が低くなる。 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
しかしながら、特許文献2では、顔の傾きが小さい場合には検出精度を高めるように処理するだけで、顔の検出処理時間については考慮されていない。そのため、特許文献2では、顔の傾きが小さい場合には、特許文献1等と同様に、顔に対する適正な合焦制御や露出制御を行えなくなる場合がある。
However, in
本発明は、このような技術的な背景の下になされたもので、その目的は、規定時間内に連続的に特定被写体を検出し、且つ特定被写体の検出精度を向上させるようにすることにある。 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
この際、CPU101は、RAM102をワークエリアとして利用する。なお、ROM103には、図4,5のフローチャート等に係るプログラムも格納されている。操作部104は、ユーザが各種の操作レバーやボタンなどを操作した場合にその操作に係る操作信号をCPU101に出力し、CPU101は、操作信号に応じた各種処理を実行する。
At this time, the
また、ビデオカメラ100は、図1において符号110〜115に示すカメラ系のブロックを有している。変倍レンズ110、フォーカスレンズ111を通過した光学像は、CCDイメージセンサ114の撮像面上に結像されて光電気変換される。ドライバ113は、CPU101の制御の下に、変倍レンズ110、フォーカスレンズ111、及び絞り112を駆動して、光学ズーム倍率、フォーカス及び絞り量の調整を行う。
The
AFE115は、CPU101により指示されたシャッタ速度に基づいてCCDイメージセンサ114を駆動し、1/60秒毎に1フレーム分の画像信号を読み出し、画像信号のサンプル・ホールドと増幅、デジタル信号への変換を行う。
The AFE 115 drives the
更に、ビデオカメラ100は、図1において符号120〜125に示す画像処理系のブロックを有している。CPU101の制御により、画像入力部120は、撮影時にはAFE115から画像信号を入力し、再生時にはCODEC130から画像信号を入力する。画像処理部121は、バッファメモリ122を用いて、色変換や解像度変換、画像の切り出しなどの画像信号処理を行う。フォーカス評価部123、露出評価部124は、画像処理部121から出力される画像(画像信号)の複数の領域に対して、それぞれ、フォーカス、露出の状態を評価する。
Further, the
特徴検出部125は、バッファメモリ122から1フレーム単位で画像を読出し、その画像の中から顔などの特定被写体を検出する。この検出方法それ自体は、例えば特許文献1に係る検出方法等の公知の検出方法を用いることができる。この場合、特徴検出部125は、1920×1080画素の単位で検出領域をシフトしながら、画像の全領域について顔などの特定被写体の特徴を検出していくものとする。
The
本実施の形態に係る特徴検出部125は、更に、特定被写体の数と、それら特定被写体の特徴情報として、大きさ、位置、傾きを検出する。そして、CPU101は、各フレームにおいて検出した特定被写体の大きさ、位置、傾きの特徴情報を、被写体リストとしてRAM102に格納する。なお、特徴検出部125が特定被写体の特徴情報を検出する際に用いる検出条件は、RAM102に格納されているものとする。
The
また、ビデオカメラ100は、図1において符号130〜133に示すレコーダ系のブロックを有している。撮影画像を記録する場合は、CODEC130は、CPU101の制御の下に、画像処理部121から出力される画像信号を符号化してバッファメモリ131に一時記憶させる。ディスクコントローラ132は、その符号化に係る画像信号をバッファメモリ131から読み出して、ディスク133、すなわち、DVDなどの記録媒体に記録する。
Further, the
また、撮影画像を再生する場合は、ディスクコントローラ132は、CPU101の制御の下に、ディスク133から符号化に係る画像信号を読み出し、バッファメモリ131に一時記憶させる。CODEC130は、バッファメモリ131に一時記憶された符号化に係る画像信号を復号化する。
When playing back a captured image, the
また、ビデオカメラ100は、図1において符号140〜146に示す表示系のブロックを有している。描画処理部140は、CPU101の制御の下に、画像処理部121から出力される画像信号に対して文字や図形などを重畳して描画し、バッファメモリ141に一時記憶させる。LCDコントローラ142は、バッファメモリ141から画像信号を読み出して、LCD143に表示させる。また、外部出力コントローラ145は、バッファメモリ141から画像信号を読み出し、外部端子146に接続されたケーブル150を介して外部出力装置151へ出力する。
Further, the
次に、RAM102に格納される被写体リストについて説明する。図2は、RAM102に格納されている被写体リストを例示した概念図である。CPU101は、特徴検出部125により検出された顔などの特定被写体の特徴情報として、位置(X,Y)、幅W、傾きAと消失フレーム数Fを、被写体リストとしてRAM102に格納する。なお、特徴検出部125は、特定被写体の大きさとして、特定被写体の幅Wを検出する。
Next, the subject list stored in the
特定被写体は、人間の顔だけでなく例えば、人間の目や手、猫、犬などのペット等、種々の被写体が考えられるが、便宜上、特定被写体が顔であるものとして以下の説明を行う。 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
そして、CPU101は、同一の顔であると判定した場合は、その顔に係る大きさ(幅W)、位置(X,Y)、及び傾きAを今回検出したものに更新する。一方、同一の顔でないと判定した場合は、CPU101は、今回検出した顔を被写体リストに新規に登録する。
If the
上記の消失フレーム数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
次に、特徴検出部125が顔を検出する場合の検出モード情報について説明する。この検出モード情報は、RAM102に格納されており、大別して優先情報(優先モード情報)と画像情報(画像モード情報)がある(図6参照)。優先モード情報としては、サイズ優先モード(第1の検出モード)と傾き優先モードがある(第2の検出モード)。第1の検出モードとしてのサイズ優先モードは、顔を検出する際に顔のサイズを優先して検出するモードであり、第2の検出モードとしての傾き優先モードは、顔の傾きを優先して顔を検出するモードである。
Next, detection mode information when the
画像情報(画像モード情報)としては、通常画像モードと拡大画像モードとがある。通常画像モードの場合は、拡大処理や縮小処理が施されていない通常の撮影画像を用いて顔の検出処理が行われる。拡大画像モードの場合は、通常の撮影画像から一部分を抜き出して通常の撮影画像と同じサイズに拡大した拡大画像を用いて、顔の検出処理が行われる。 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
次に、優先モード情報の選択処理を、図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
ここで、CPU101は、変数Countを用いるカウンタとして機能する。この変数Countは、何フレーム連続で顔が検出されていないかを示す変数である。すなわち、CPU101は、現在のフレームにおいて顔が検出されなかった場合は、変数Countを「1」だけインクリメント(増加)する(S403)。一方、顔が検出された場合は、CPU101は、変数Countを「0」クリアする(S404)。つまり、この変数Countによって、連続して顔が検出できなかったフレームを数えることができる。
Here, the
現在設定されている優先モード情報が傾き優先モードである場合は、CPU101は、現在のフレームにおいて特定被写体(顔)が特徴検出部125によって検出されたか否かを判別する(S405)。CPU101は、顔が検出されなかった場合は、変数Countを「1」だけインクリメントする(S407)。
When the currently set priority mode information is the tilt priority mode, the
一方、顔が検出された場合は、CPU101は、その顔の傾斜度(傾斜角度)が45度以内であるか否かを判別する(S406)。その結果、顔の傾斜度が45度以内であれば、CPU101は、変数Countを「1」だけインクリメントする(S407)。顔の傾斜度が45度以内ではなく、顔が大きく傾いている場合は、CPU101は、CPU101は、変数Countを「0」クリアする(S408)。
On the other hand, when a face is detected, the
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
一方、変数Countが、「30」以上であれば、CPU101は、次のフレームに対して、現在のフレームに設定されているものと異なる優先モード情報である傾き優先モードを設定する(S412)。
On the other hand, if the variable Count is “30” or more, the
また、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
一方、変数Countが、規定数の「30」以上であれば、CPU101は、次のフレームに対して、現在のフレームに設定されているものと異なる優先モード情報であるサイズ優先モードを設定する(S411)。
On the other hand, if the variable Count is equal to or greater than the prescribed number “30”, the
上記のように、本実施の形態では、傾き優先モードにおいて顔が検出されたとしても、その顔の傾きが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
拡大画像モードが設定されている場合は、特徴検出部125は、画像処理部121によって撮影画像の中央の3/4の領域を切り出され、通常画像と同一サイズに拡大されて生成された拡大画像を用いて顔を検出する。これら通常画像、拡大画像は、両方とも、画像処理部121により、フレーム毎にバッファメモリ122に格納される。
When the enlarged image mode is set, the
CPU101は、画像モード情報については、顔の検出結果に応じて切り替えを行う優先モード情報とは異なり、通常画像モードと拡大画像モードをフレーム毎に交互に設定する。そして、特徴検出部125は、設定された通常画像モード又は拡大画像モードに係る通常画像又は拡大画像をバッファメモリ122から読出し、その読み出した画像の中から顔を検出する。
The
次に、図6に示した検出条件について説明する。この検出条件は、優先モード情報と画像モード情報の組み合わせ結果に応じて、CPU101によって設定される。CPU101は、特徴検出部125により特定被写体(顔)を検出する際の検出条件として、顔の最小の大きさ(最小サイズ)、傾きの範囲を設定することができる。
Next, the detection conditions shown in FIG. 6 will be described. This detection condition is set by the
この最小サイズとしては、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
次に、CPU101は、次のフレームでの顔の検出処理のために、図4の優先モード情報の選択処理を行う(S503)。同様に、CPU101は、次のフレームでの顔の検出処理のために、通常画像と拡大画像が交互に切り替わるように画像モード情報を選択する(S504)。更に、CPU101は、S503,S504にて選択した優先モード情報、画像モード情報に基づいて、次のフレームでの顔の検出条件を選択する(S505)。
Next, the
この場合、CPU101は、図6に示したように、優先情報(優先モード情報)が傾き優先モードであっても、画像情報(画像モード情報)が通常画像である場合は、検出条件を最小サイズ条件(すなわち、サイズ優先の検出条件)とする。そして、優先情報が傾き優先モードで、画像情報が拡大画像である場合のみ、検出条件を最大傾き条件(すなわち、傾き優先の検出条件)とする。
In this case, as shown in FIG. 6, the
これは、動画撮影中に、画面内にサイズの小さな被写体が入ってきたり、ズーム操作によって被写体が小さくなる確率に比較して、被写体がビデオカメラ100に対して横に傾いていたり、被写体の傾きが変化したりする確率は低いと考えられるためである。そこで、傾き優先モードであっても、最大傾き条件を設定するのは2フレームのうちの一方のフレームのみとし、他方のフレームを最小サイズ条件に設定することで、小さな被写体が現れた場合もなるべく検出できるように構成されている。
This is because the subject is tilted sideways with respect to the
次に、ビデオカメラ100で被写体を撮影した場合の動作を、具体例で説明する。ここで、顔の検出モード情報の初期値として、優先モード情報はサイズ優先モード、画像モード情報は通常画像モード、検出条件は最小サイズ条件(最小サイズ200画素、傾き45度)が設定されているものとする。
Next, the operation when a subject is photographed with the
また、顔(特定被写体)を検出できなかった連続フレーム数を示す変数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
特徴検出部125は、前述の初期設定された検出モード情報に基づいて通常画像700の中から顔の検出処理を行い、CPU101は、特徴検出部125による顔の検出結果に基づいて被写体リストを更新する。
The
この場合、サイズ優先モードが設定されているため、特徴検出部125は、顔の傾きが45度以内の場合にしか顔を検出できない状態であり、人物710の顔を検出することができない。従って、CPU101は、変数Countに「1」をセットする。
In this case, since the size priority mode is set, the
次に、CPU101は、検出モード情報を更新する。この場合、CPU101は、変数Countが「1」なので、優先モード情報はサイズ優先モードを維持し、画像モード情報は更新前が通常画像モードであったため拡大画像モードに変更する。また、CPU101は、優先モード情報としてサイズ優先モードを維持したので、検出条件としては最小サイズ条件を設定する。
Next, the
フレームF0から30フレーム後にバッファメモリ122に格納されている画像は、人物710が静止しているため、相変わらず、図7、図8に示したフレームF0と同様の画像のままとなる。従って、特徴検出部125は、この30フレーム後のフレームにおいても、相変わらず、人物710の顔を検出できない状態で、被写体リストの更新と変数Countのインクリメントを行う。
The image stored in the
この場合、CPU101が被写体リストの更新と、変数Countのインクリメントをフレーム毎に行ってきた結果、変数Countは「30」となる。そのため、CPU101は、今まで設定していた優先モード情報(サイズ優先モード)を傾き優先モードに変更する(図4参照)。また、CPU101は、画像モード情報は更新前が通常画像であったため拡大画像に変更する。
In this case, as a result of the
更に、CPU101は、優先モード情報を傾き優先モードに変更し、画像モード情報を拡大画像モードに変更したのに応じて、検出条件としては、最大傾き条件(最小サイズ300画素、傾き135度)を設定する。
Furthermore, the
これは、最小検出サイズを最も小さな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
フレームF0から31フレーム後にバッファメモリ122に格納されている画像は、人物710が静止しているため、相変わらず、図7、図8に示したフレームF0と同様の画像のままとなる。しかし、最大傾き条件(135度)が設定されているため、特徴検出部125は、この31フレーム後のフレームに係る拡大画像800の中から人物710の顔を検出することができる。従って、CPU101は、変数Countをクリアして「0」にする。
The image stored in the
次に、CPU101は、検出モード情報を更新する。この場合、CPU101は、優先モード情報は、変数Countが「0」であるので優先モード情報は傾き優先モードを維持し、画像モード情報は、更新前が拡大画像であったため通常画像に更新する。また、CPU101は、優先モード情報が傾き優先モードであるが、画像モード情報が通常画像モードなので、検出条件としては、最小サイズ条件(最小サイズ200画素、傾き45度)に変更する。これにより、このフレームでは人物710の顔は検出できなくなり変数Countがインクリメントされるが、その次のフレームでは再び拡大画像モードに変更されて最大傾き条件が設定されるため、変数Countはクリアされて「0」となる。
Next, the
その後、図7、図8の状態から人物710が起き上がり、その後1秒間(60フレームの間)、再び人物710は静止しており、同じ画像が撮影されていたものとする。図9、図10は、図7、図8の横になっていた人物710が起き上がった瞬間の撮影画像のフレームF1においてバッファメモリ122に格納されている通常画像900と拡大画像1000を示している。
After that, it is assumed that the
この図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
また、変数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
傾き優先モードが設定されている状態で変数Countが「30」に達すれば、CPU101は、傾き優先モードからサイズ優先モードに変更する。
If the variable Count reaches “30” in the state where the inclination priority mode is set, the
次に、CPU101は、検出モード情報を更新する。優先モード情報は、変数Countが「1」なので傾き優先モードを維持し、画像モード情報は更新前が拡大画像であったため通常画像に切り替える。また、CPU101は、優先モード情報は傾き優先モードであるが、画像モード情報が通常画像なので、検出条件としては最小サイズ条件を設定する。
Next, the
フレームF1から30フレーム後にバッファメモリ122に格納される画像は、人物710が静止しているため、相変わらず、図9、図10に示したフレームF1と同様の画像である。特徴検出部125は、画像モード情報に基づいて、通常画像900から顔を検出する。CPU101は、特徴検出部125による顔の検出結果に基づいて、被写体リストを更新する。
The image stored in the
このフレームF1での検出処理においても人物710の顔が検出されるが、顔の傾きが45度以内であるため、CPU101は、変数Countをインクリメントする。この結果、変数Countは「30」となる。そのため、CPU101は、優先モード情報を傾き優先モードからサイズ優先モードに切り替える。CPU101は、画像モード情報については、更新前が通常画像であったため、拡大画像に切り替える。また、CPU101は、優先モード情報をサイズ優先モードに切替えたので、検出条件は最小サイズ条件を維持する。
The face of the
以上説明したように、CPU101は、特徴検出部125が1/60秒以内に顔を検出できる範囲内で、小サイズの顔を検出することを優先したフレーム毎に切り替え可能に設定する。
As described above, the
このような検出条件の切替処理により、規定時間内に連続的に特定被写体(顔)を検出し、且つ特定被写体が小さい場合や傾斜している場合においても高精度に検出することが可能となる。更には、所望の特定被写体に適正に合焦し、適正な露光状態の高品質の画像を撮影することが可能となる。 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.
100…撮像装置
101…CPU
102…RAM
103…ROM
114…CCDイメージセンサ
121…画像処理部
122…バッファメモリ
125…特徴検出部
100 ...
102 ... RAM
103 ... ROM
114:
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.
前記カウンタ手段は、前記第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.
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)
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)
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 |
-
2008
- 2008-12-24 JP JP2008327913A patent/JP5137808B2/en active Active
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 |