[go: up one dir, main page]

JP5332668B2 - Imaging apparatus and subject detection program - Google Patents

Imaging apparatus and subject detection program Download PDF

Info

Publication number
JP5332668B2
JP5332668B2 JP2009023764A JP2009023764A JP5332668B2 JP 5332668 B2 JP5332668 B2 JP 5332668B2 JP 2009023764 A JP2009023764 A JP 2009023764A JP 2009023764 A JP2009023764 A JP 2009023764A JP 5332668 B2 JP5332668 B2 JP 5332668B2
Authority
JP
Japan
Prior art keywords
subject
image
detection
posture
face
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
JP2009023764A
Other languages
Japanese (ja)
Other versions
JP2010183254A (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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2009023764A priority Critical patent/JP5332668B2/en
Publication of JP2010183254A publication Critical patent/JP2010183254A/en
Application granted granted Critical
Publication of JP5332668B2 publication Critical patent/JP5332668B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging device and a subject detection program that can make processings perform rapidly for subject detection, using an easy method. <P>SOLUTION: The imaging device (11 to 26) detects a subject from an image, by using predetermined parameters of subject detection and includes: an attitude information acquisition means (21, 20) of acquiring information showing the attitude of the device; and a subject detection means (20) of changing the parameters of subject detection according to the attitude of the device, in which the information acquired by the attitude information acquisition means shows, when the subject is detected from the image. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

Description

本発明は、画像から被写体を自動検出する撮像装置および被写体検出プログラムに関する。   The present invention relates to an imaging device that automatically detects a subject from an image and a subject detection program.

画像から被写体を自動検出するための手法が数多く提案されている。   Many methods for automatically detecting a subject from an image have been proposed.

ところで、近年の画像の高解像度化により、画像から被写体を自動検出するにおいては、その検出処理に時間がかかるようになった。そのため、被写体検出機能を有したデジタルカメラ等で撮影を行う際には、レリーズタイムラグが大きくなったり連写速度が遅くなるなどの問題が起こっている。   By the way, due to the recent increase in resolution of images, it takes time to detect the subject automatically in detecting the subject from the image. For this reason, when shooting with a digital camera or the like having a subject detection function, problems such as a large release time lag and a slow continuous shooting speed have occurred.

このような問題を解決する手法として、例えば、特許文献1では、デジタルカメラ等の姿勢に応じて、画像から被写体の顔領域を検出するための検出方法を変更することにより顔検出(被写体検出)の処理を高速化するという手法を開示している。   As a technique for solving such a problem, for example, in Patent Document 1, face detection (subject detection) is performed by changing a detection method for detecting a face area of a subject from an image according to the posture of a digital camera or the like. Discloses a method of speeding up the process.

特開2005−130468号公報JP 2005-130468 A

ところで、画像において被写体(特に、顔)が写る部分は、一般に、画像中でのカメラの姿勢に応じた特定の領域であることが多い。例えば、カメラを通常の横向きの姿勢にして撮影を行った場合、被写体が逆立ちでもしていないかぎり、撮影された画像には、図9(a)に示すように、被写体(特に、顔)が、画像の上側に重心を置いた領域に写っていることが多い。また、画像に写る被写体(特に、顔)の向きは、カメラの姿勢に応じた特定の向きであることが多い。例えば、カメラを通常の横向きの姿勢にして撮影を行った場合、撮影された画像には、図9(b)に示すように、被写体は、その頭頂部が、通常の場合には上を(1)、横に寝転がっている場合には左(4)又は右(2)を向いた形で写っていることが多く、被写体が逆立ちしている場合のようにその頭頂部が下(3)を向いた形で写っていることは少ない。   By the way, in general, a portion where an object (particularly a face) is captured in an image is generally a specific region corresponding to the posture of the camera in the image. For example, when shooting is performed with the camera in a normal landscape orientation, the captured image includes a subject (particularly a face) as shown in FIG. 9A unless the subject is standing upside down. In many cases, the image is shown in an area with the center of gravity placed above the image. In many cases, the direction of the subject (particularly, the face) in the image is a specific direction corresponding to the posture of the camera. For example, when shooting is performed with the camera in a normal sideways posture, the captured image has a top of the subject, as shown in FIG. 9B. 1) When lying on the side, it is often reflected in the shape facing left (4) or right (2), and the top of the head is below (3) as if the subject is standing upside down. It is rare that it is reflected in the form facing the.

つまり、画像中の被写体(特に、顔)が写っている部分(領域)や、画像中の被写体の向き(方向)は、カメラの姿勢によって特定することができる。   That is, the part (area) in which the subject (particularly the face) in the image is shown, and the orientation (direction) of the subject in the image can be specified by the posture of the camera.

しかし、従来技術は、カメラの姿勢に応じて、顔領域(被写体)の検出方法を変更するものではあるが、画像から被写体の顔領域を検出する際には、画像中の全領域に対して検出処理を行っていた。また、従来技術は、画像中の被写体の方向を考慮して画像から被写体の顔領域を検出するものではなかった。   However, the conventional technique changes the detection method of the face area (subject) according to the posture of the camera, but when detecting the face area of the subject from the image, the entire area in the image is detected. Detection processing was performed. Further, the conventional technology does not detect the face area of the subject from the image in consideration of the direction of the subject in the image.

このため、顔検出(被写体検出)の処理を高速化するには、改善の余地があった。   For this reason, there is room for improvement in speeding up the face detection (subject detection) process.

また、従来技術のように、カメラの姿勢に応じて検出方法を変更するものであると、カメラがサポートする姿勢の種類に追加がある場合には、それに対応した検出方法も新たに追加する必要があるなど、簡単には、その追加などに対応することができなかった。   Also, if the detection method is changed according to the camera posture as in the conventional technology, if there is an additional type of posture supported by the camera, it is also necessary to add a new detection method corresponding to it. It was not possible to cope with the addition easily.

このため、検出方法を変更するよりも簡単な方法で、顔検出(被写体検出)処理の高速化を実現する必要があった。   For this reason, it is necessary to realize a high-speed face detection (subject detection) process by a simpler method than changing the detection method.

本発明は、上記従来技術の課題を解決するためのものである。本発明の目的は、簡単な方法によって被写体検出の処理を高速化することができる撮像装置および被写体検出プログラムを提供することである。   The present invention is to solve the above-mentioned problems of the prior art. An object of the present invention is to provide an imaging apparatus and a subject detection program capable of speeding up subject detection processing by a simple method.

第1の発明の撮像装置は、予め定められた被写体検出のパラメータを使用して、画像から被写体の検出を行う撮像装置であって、装置の姿勢を示す情報を取得する姿勢情報取得手段と、画像から被写体の検出を行うときに、姿勢情報取得手段によって取得され情報が示す装置の姿勢に応じて、被写体検出のパラメータを変更する被写体検出手段とを備え、被写体検出手段は、姿勢情報取得手段により姿勢を示す情報が取得され、取得された姿勢に応じて、被写体検出のパラメータを変更するのと並列に、画像を基に、その画像サイズを所定のサイズに縮小した縮小画像を作成し、作成した縮小画像を使用して被写体の検出を行うAn image pickup apparatus according to a first aspect of the present invention is an image pickup apparatus that detects a subject from an image using predetermined subject detection parameters, and includes posture information acquisition means for acquiring information indicating the posture of the device; when performing the detection of the subject from an image, according to the posture of the apparatus shown has been acquired information by the attitude information acquisition means, and a subject detecting means for changing the parameters of the object detection, object detection means, orientation obtaining Information indicating the posture is acquired by the means, and a reduced image is created by reducing the image size to a predetermined size based on the image in parallel with changing the subject detection parameter according to the acquired posture. The subject is detected using the created reduced image .

第2の発明は、第1の発明において、被写体検出のパラメータの少なくとも1つは、画像中における被写体の検出を行う領域である検出対象領域と被写体の検出を行わない領域である検出非対象領域との区分を指定するパラメータである。   In a second aspect based on the first aspect, at least one of the subject detection parameters is a detection target region that is a region in the image where the subject is detected and a detection non-target region where the subject is not detected. It is a parameter that specifies the category.

第3の発明は、第1または第2の発明において、被写体検出のパラメータの少なくとも1つは、画像中において検出を有効とする被写体の方向のパターンを指定するパラメータである。   According to a third aspect, in the first or second aspect, at least one of the subject detection parameters is a parameter for designating a pattern of a subject direction for which detection is effective in an image.

第4の発明は、第1〜第3の発明の何れか一の発明において、被写体検出手段は、装置の姿勢にかかわらず、常に横位置の画像を使用して被写体の検出を行う。   In a fourth aspect based on any one of the first to third aspects, the subject detection means always detects a subject using an image in a lateral position regardless of the posture of the apparatus.

の発明の被写体検出プログラムは、予め定められた被写体検出のパラメータを使用して、画像から被写体の検出を行う被写体検出プログラムであって、装置の姿勢を示す情報を取得する姿勢情報取得ステップと、画像から被写体の検出を行うときに、姿勢情報取得ステップによって取得され情報が示す装置の姿勢に応じて、被写体検出のパラメータを変更する被写体検出ステップとをコンピュータに実行させ、被写体検出ステップは、姿勢情報取得ステップにより姿勢を示す情報が取得され、取得された姿勢に応じて、被写体検出のパラメータを変更するのと並列に、画像を基に、その画像サイズを所定のサイズに縮小した縮小画像を作成し、作成した縮小画像を使用して被写体の検出を行うA subject detection program according to a fifth aspect of the present invention is a subject detection program for detecting a subject from an image using a predetermined subject detection parameter, and a posture information acquisition step for acquiring information indicating the posture of the apparatus If, when performing detection of the subject from an image, depending on the orientation of the device indicated by the information acquired by the orientation information acquiring step, to execute the subject detection step of changing parameters of the object detection in a computer, the subject detection step In the posture information acquisition step, information indicating the posture is acquired, and the image size is reduced to a predetermined size based on the image in parallel with changing the subject detection parameter according to the acquired posture. A reduced image is created, and a subject is detected using the created reduced image .

の発明は、第の発明において、被写体検出のパラメータの少なくとも1つは、画像中における被写体の検出を行う領域である検出対象領域と被写体の検出を行わない領域である検出非対象領域との区分を指定するパラメータである。 In a sixth aspect based on the fifth aspect , at least one of the subject detection parameters is a detection target region that is a region where the subject is detected in the image and a detection non-target region where the subject is not detected. It is a parameter that specifies the category.

の発明は、第または第の発明において、被写体検出のパラメータの少なくとも1つは、画像中において検出を有効とする被写体の方向のパターンを指定するパラメータである。 In a seventh aspect based on the fifth or sixth aspect , at least one of the subject detection parameters is a parameter for designating a pattern in the direction of the subject for which detection is effective in the image.

の発明は、第5〜第7発明の何れか一の発明において、被写体検出ステップでは、装置の姿勢にかかわらず、常に横位置の画像を使用して被写体の検出を行う。 Eighth invention, in any one invention of the fifth to seventh invention, in the subject detecting step, regardless of the orientation of the device, the detection of an object always use the image of the lateral position.

本発明では、画像から被写体の検出を行うときに、取得した情報が示す装置の姿勢に応じて、被写体検出のパラメータを変更する。   In the present invention, when subject detection is performed from an image, subject detection parameters are changed according to the orientation of the device indicated by the acquired information.

従って、本発明を利用すれば、被写体検出のパラメータを変更するのみの簡単な方法によって、被写体検出の処理を高速化することができる。   Therefore, by using the present invention, it is possible to speed up the subject detection process by a simple method that only changes the subject detection parameters.

本実施形態のデジタルカメラのブロック図である。It is a block diagram of the digital camera of this embodiment. デジタルカメラの姿勢及び姿勢情報を説明する図である。It is a figure explaining the attitude | position and attitude | position information of a digital camera. デジタルカメラの顔検出の動作を示す流れ図である。It is a flowchart which shows the operation | movement of the face detection of a digital camera. 姿勢毎に撮影される画像のイメージ(横位置)を示す図である。It is a figure which shows the image (horizontal position) of the image image | photographed for every attitude | position. 「非検出マスク」について説明する図である。It is a figure explaining a "non-detection mask". 「方向パターン」について説明する図である。It is a figure explaining "direction pattern". デジタルカメラの顔検出の動作を示す流れ図(変形例)である。It is a flowchart (modification) which shows operation of face detection of a digital camera. 姿勢毎に撮影される画像のイメージ(縦位置)を示す図である。It is a figure which shows the image (vertical position) of the image image | photographed for every attitude | position. 画像中の被写体の写っている領域と被写体の方向の一般例を示す図である。It is a figure which shows the general example of the area | region and the direction of a to-be-photographed object in the image.

以下、本発明の実施形態を説明する。本実施形態は、デジタルカメラの実施形態である。   Embodiments of the present invention will be described below. The present embodiment is an embodiment of a digital camera.

図1は、本実施形態のデジタルカメラのブロック図である。   FIG. 1 is a block diagram of the digital camera of this embodiment.

デジタルカメラは、撮像レンズ11およびレンズ駆動部12と、撮像素子13と、アナログ信号処理部14と、タイミングジェネレータ(TG)15と、バッファメモリ16と、画像処理部17と、表示制御部18と、表示部19と、制御部20と、センサ部21と、圧縮/復号部22と、記録インターフェース(記録I/F)23と、記録媒体24と、操作部25と、バス26とを有している。ここで、バッファメモリ16、画像処理部17、表示制御部18、制御部20、センサ部21、圧縮/復号部22、記録I/F23は、バス26を介して接続されている。また、レンズ駆動部12、アナログ信号処理部14、TG15、操作部25は、それぞれ制御部20に接続されている。   The digital camera includes an imaging lens 11 and a lens driving unit 12, an imaging element 13, an analog signal processing unit 14, a timing generator (TG) 15, a buffer memory 16, an image processing unit 17, and a display control unit 18. A display unit 19, a control unit 20, a sensor unit 21, a compression / decoding unit 22, a recording interface (recording I / F) 23, a recording medium 24, an operation unit 25, and a bus 26. ing. Here, the buffer memory 16, the image processing unit 17, the display control unit 18, the control unit 20, the sensor unit 21, the compression / decoding unit 22, and the recording I / F 23 are connected via a bus 26. Further, the lens driving unit 12, the analog signal processing unit 14, the TG 15, and the operation unit 25 are connected to the control unit 20, respectively.

撮像レンズ11は、フォーカスレンズやズームレンズを含む複数のレンズ群で構成されている。なお、簡単のため、図1では撮像レンズ11を1枚のレンズとして図示している。   The imaging lens 11 includes a plurality of lens groups including a focus lens and a zoom lens. For simplicity, the imaging lens 11 is illustrated as a single lens in FIG.

レンズ駆動部12は、制御部20の指示に応じてレンズ駆動信号を発生し、撮像レンズ11を光軸方向に移動させてフォーカス調整やズーム調整を行うと共に、撮像レンズ11を通過した光束による被写体像を撮像素子13の受光面に形成する。   The lens driving unit 12 generates a lens driving signal in accordance with an instruction from the control unit 20, performs focus adjustment and zoom adjustment by moving the imaging lens 11 in the optical axis direction, and subjects the light flux that has passed through the imaging lens 11 to the subject. An image is formed on the light receiving surface of the image sensor 13.

撮像素子13は、CCD型やCMOS型の撮像素子であり、撮像レンズ11の像空間側に配置されている。撮像素子13は、受光面に形成された被写体像を光電変換してアナログ画像信号を生成する。この撮像素子13の出力はアナログ信号処理部14に接続されている。   The imaging element 13 is a CCD type or CMOS type imaging element, and is arranged on the image space side of the imaging lens 11. The image sensor 13 photoelectrically converts a subject image formed on the light receiving surface to generate an analog image signal. The output of the image sensor 13 is connected to an analog signal processing unit 14.

アナログ信号処理部14は、制御部20の指示に応じて、撮像素子13から出力されたアナログ画像信号に対し、CDS(相関二重サンプリング)、ゲイン調整、A/D変換などのアナログ信号処理を施すと共に、その処理後の画像信号を出力する。なお、アナログ信号処理部14の出力はバッファメモリ16に接続されている。   The analog signal processing unit 14 performs analog signal processing such as CDS (correlated double sampling), gain adjustment, and A / D conversion on the analog image signal output from the image sensor 13 in accordance with an instruction from the control unit 20. And the processed image signal is output. The output of the analog signal processing unit 14 is connected to the buffer memory 16.

また、アナログ信号処理部14は、制御部20の指示に基づいてゲイン調整の調整量を設定し、それによってISO感度に相当する撮影感度の調整を行う。   Further, the analog signal processing unit 14 sets an adjustment amount for gain adjustment based on an instruction from the control unit 20, and thereby adjusts photographing sensitivity corresponding to ISO sensitivity.

TG15は、制御部20の指示に基づき撮像素子13およびアナログ信号処理部14に対してタイミングパルスを供給する。撮像素子13およびアナログ信号処理部14の駆動タイミングはそのタイミングパルスによって制御される。   The TG 15 supplies timing pulses to the image sensor 13 and the analog signal processing unit 14 based on instructions from the control unit 20. The drive timing of the image sensor 13 and the analog signal processing unit 14 is controlled by the timing pulse.

バッファメモリ16は、アナログ信号処理部14から出力される画像信号を画像データとして一時的に記憶する。また、バッファメモリ16は、制御部20により記録媒体24から読み出された画像データや、制御部20による処理の過程で作成された画像データを一時的に記憶する。   The buffer memory 16 temporarily stores the image signal output from the analog signal processing unit 14 as image data. The buffer memory 16 temporarily stores image data read from the recording medium 24 by the control unit 20 and image data created in the course of processing by the control unit 20.

画像処理部17は、制御部20の指示に応じて、バッファメモリ16の画像データに対し、ホワイトバランス調整、補間、輪郭強調、ガンマ補正、解像度変換(画素数変換)などの画像処理を施す。なお、解像度変換(画素数変換)は、表示部19に画像データを表示させる場合などに必要な処理である。画像処理部17は、ASICなどとして構成される。   The image processing unit 17 performs image processing such as white balance adjustment, interpolation, contour enhancement, gamma correction, resolution conversion (pixel number conversion) on the image data in the buffer memory 16 in accordance with an instruction from the control unit 20. Note that resolution conversion (pixel number conversion) is a process necessary for displaying image data on the display unit 19. The image processing unit 17 is configured as an ASIC or the like.

表示制御部18は、制御部20の指示に応じて、画像処理後の画像データに所定の信号処理(例えば、NTSC方式の複合映像信号に変換するための信号処理)を施して表示部19へ出力する。この出力により、画像データが表示部19に表示される。なお、表示部19は、デジタルカメラ筐体の背面などに設けられたLCDモニタや、接眼部を備えた電子ファインダなどである。   In response to an instruction from the control unit 20, the display control unit 18 performs predetermined signal processing (for example, signal processing for converting into an NTSC composite video signal) on the image data after the image processing, and displays the image data on the display unit 19. Output. With this output, the image data is displayed on the display unit 19. The display unit 19 is an LCD monitor provided on the back surface of the digital camera housing, an electronic viewfinder having an eyepiece unit, or the like.

センサ部21は、デジタルカメラの姿勢を検出するためのセンサ、例えば、傾斜センサなどを含む。制御部20は、このセンサ部21を駆動して、デジタルカメラの姿勢を示す情報(姿勢情報)を取得する。   The sensor unit 21 includes a sensor for detecting the attitude of the digital camera, for example, a tilt sensor. The control unit 20 drives the sensor unit 21 to acquire information (posture information) indicating the posture of the digital camera.

ここで、姿勢情報について、図2を参照して説明する。なお、以下では、LCDモニタの画面が設けられた面をデジタルカメラの正面として説明する。本実施形態においては、図2(a)に示すようにデジタルカメラの底面が重力方向に向けられた姿勢である場合には、例えば、「横」との姿勢情報が取得される。また、図2(b)に示すようにデジタルカメラの左側面が重力方向に向けられた姿勢である場合には、例えば、「縦−90度」との姿勢情報が取得される。また、図2(c)に示すようにデジタルカメラの右側面が重力方向に向けられた姿勢である場合には、例えば、「縦+90度」との姿勢情報が取得される。このように、本実施形態のデジタルカメラでは、「横」と、「縦−90度」と、「縦+90度」との3種類の姿勢情報が取得される。なお、説明の都合上、以下では、姿勢情報の「横」、「縦−90度」、「縦+90度」をデジタルカメラの姿勢を表す呼び名としてそのまま使用する。   Here, the posture information will be described with reference to FIG. In the following description, the surface on which the LCD monitor screen is provided is described as the front of the digital camera. In the present embodiment, when the bottom surface of the digital camera is in the direction of gravity as shown in FIG. 2A, for example, posture information “lateral” is acquired. Further, as illustrated in FIG. 2B, when the left side surface of the digital camera is in the gravity direction, for example, posture information “vertical −90 degrees” is acquired. In addition, when the right side surface of the digital camera is in the direction of gravity as illustrated in FIG. 2C, for example, posture information “vertical +90 degrees” is acquired. As described above, in the digital camera according to the present embodiment, three types of posture information of “horizontal”, “vertical −90 degrees”, and “vertical +90 degrees” are acquired. For convenience of explanation, “horizontal”, “vertical −90 degrees”, and “vertical +90 degrees” of the posture information are used as they are as names for representing the posture of the digital camera.

圧縮/復号部22は、制御部20の指示に応じて、バッファメモリ16の画像データに圧縮処理又は復号処理を施す。なお、圧縮処理及び復号処理は、JPEG(Joint Photographic Experts Group)形式などによって行われる。圧縮/復号部22は、可逆圧縮(いわゆるロスレス符号化)を行うことも可能な構成となっている。   The compression / decoding unit 22 performs compression processing or decoding processing on the image data in the buffer memory 16 in accordance with an instruction from the control unit 20. The compression process and the decoding process are performed in a JPEG (Joint Photographic Experts Group) format or the like. The compression / decoding unit 22 is configured to be able to perform lossless compression (so-called lossless encoding).

記録I/F23には、記録媒体24を接続するためのコネクタが形成されている。記録I/F23は、そのコネクタに接続された記録媒体24にアクセスして、各種データの書き込みや読み出しを行う。制御部20は、撮影時には、この記録I/F23を介して、バッファメモリ16の圧縮処理後の画像データを記録媒体24へ記録する。但し、デジタルカメラが非圧縮記録モードに設定された場合には、制御部20は、バッファメモリ16の画像処理後の画像データを、圧縮処理を施さずに非圧縮のまま記録媒体24へ記録する。また、制御部20は、画像再生時には、記録I/F23を介して、その記録された画像データを記録媒体24から読み出してバッファメモリ16へ記録する。なお、記録媒体24は、半導体メモリを内蔵したメモリカードや、小型のハードディスクなどである。   The recording I / F 23 is formed with a connector for connecting the recording medium 24. The recording I / F 23 accesses the recording medium 24 connected to the connector, and writes and reads various data. At the time of shooting, the control unit 20 records the image data after the compression processing of the buffer memory 16 on the recording medium 24 via the recording I / F 23. However, when the digital camera is set to the uncompressed recording mode, the control unit 20 records the image data after the image processing in the buffer memory 16 on the recording medium 24 without being compressed, without being compressed. . Further, the controller 20 reads the recorded image data from the recording medium 24 via the recording I / F 23 and records it in the buffer memory 16 during image reproduction. The recording medium 24 is a memory card with a built-in semiconductor memory, a small hard disk, or the like.

操作部25は、レリーズボタン(シャッターボタン)、モード設定ボタン、メニューボタン、画像再生ボタン等の各種の操作部材を含み、撮影者などのユーザーによる部材操作の内容に応じた操作信号を制御部20に送る。   The operation unit 25 includes various operation members such as a release button (shutter button), a mode setting button, a menu button, an image reproduction button, and the like, and an operation signal corresponding to the content of the member operation by a user such as a photographer. Send to.

制御部20は、ユーザーによる操作部材の操作内容に応じてデジタルカメラの各部を統括制御する。   The control unit 20 comprehensively controls each unit of the digital camera according to the operation content of the operation member by the user.

例えば、モード設定ボタン等の操作によりデジタルカメラが撮影モードに設定されると、制御部20は、レンズ駆動部12、アナログ信号処理部14およびTG15を駆動してスルー画像の撮影を開始する。このとき、撮像素子13はドラフトモード(間引き読み出しモード)で駆動され、スルー画像の画像データがアナログ信号処理部14を介してバッファメモリ16へ順次記録される。制御部20は、そのスルー画像の画像データを基に、レンズ駆動部12と協働して撮像レンズ11の焦点調節制御(AF)を行う。特に、デジタルカメラの顔認識機能として、例えば、顔認識AFが有効にされた場合には、制御部20は、スルー画像の画像データから被写体の顔の部分(顔領域)を検出して、その顔領域に焦点が合うように焦点調節制御(AF)を行う。また、制御部20は、不図示の測光部を駆動して、バッファメモリ16のスルー画像の画像データを基に撮影シーンの評価値を算出させると、その評価値に基づきアナログ信号処理部14などの設定内容を調整する。また、制御部20は、画像処理部17を駆動してバッファメモリ16のスルー画像の画像データに画像処理を施した後、表示制御部18を駆動して画像処理後のスルー画像の画像データを表示部19に順次表示させる(ライブビュー表示)。   For example, when the digital camera is set to the shooting mode by operating the mode setting button or the like, the control unit 20 drives the lens driving unit 12, the analog signal processing unit 14, and the TG 15 to start shooting a through image. At this time, the image sensor 13 is driven in the draft mode (decimation readout mode), and the image data of the through image is sequentially recorded in the buffer memory 16 via the analog signal processing unit 14. The control unit 20 performs focus adjustment control (AF) of the imaging lens 11 in cooperation with the lens driving unit 12 based on the image data of the through image. In particular, as a face recognition function of a digital camera, for example, when face recognition AF is enabled, the control unit 20 detects a face portion (face area) of a subject from image data of a through image, and Focus adjustment control (AF) is performed so that the face area is in focus. Further, when the control unit 20 drives a photometry unit (not shown) to calculate the evaluation value of the shooting scene based on the image data of the through image in the buffer memory 16, the analog signal processing unit 14 and the like are based on the evaluation value. Adjust the settings of. The control unit 20 drives the image processing unit 17 to perform image processing on the image data of the through image in the buffer memory 16, and then drives the display control unit 18 to display the image data of the through image after image processing. The information is sequentially displayed on the display unit 19 (live view display).

次に、撮影モードで動作中にレリーズボタンが半押しされると、制御部20は、本撮影に先立ち、レンズ駆動部12と協働して撮像レンズ11の焦点調節制御(AF)を行う。このとき、被写体の顔領域が検出されていれば、その顔領域に焦点が合うように焦点調節制御(AF)が行われる。   Next, when the release button is pressed halfway during operation in the shooting mode, the control unit 20 performs focus adjustment control (AF) of the imaging lens 11 in cooperation with the lens driving unit 12 prior to the main shooting. At this time, if the face area of the subject is detected, focus adjustment control (AF) is performed so that the face area is in focus.

また、撮影モードで動作中にレリーズボタンが全押しされると、制御部20は、不図示の測光部が算出した評価値に基づき撮影条件(絞り値、シャッター速度、ストロボ発光の有無など)を決定する。そして、制御部20は、決定した撮影条件の下でレンズ駆動部12、アナログ信号処理部14およびTG15を駆動して本撮影を実施する。このとき、撮像素子13はフレームモード(全画素読み出しモード)で駆動され、撮影された画像(本撮影画像)の画像データがアナログ信号処理部14を介してバッファメモリ16へ記録される。この後、制御部20は、画像処理部17を駆動して、バッファメモリ16に記録された本撮影画像の画像データに対し画像処理を施す。また、制御部20は、表示制御部18を駆動して、画像処理後の本撮影画像を表示部19に表示させる。そして、制御部20は、圧縮/復号部22を駆動して、画像処理後の本撮影画像の画像データに対し圧縮処理を施すと共に、圧縮処理後の本撮影画像の画像データを記録I/F23を介して記録媒体24へ記録する。なお、制御部20は、デジタルカメラが非圧縮記録モードに設定された場合には、圧縮/復号部22を駆動することなく、画像処理後の本撮影画像の画像データを非圧縮のまま記録I/F23を介して記録媒体24へ記録する。   When the release button is fully pressed during operation in the shooting mode, the control unit 20 sets shooting conditions (aperture value, shutter speed, presence / absence of flash emission, etc.) based on an evaluation value calculated by a photometry unit (not shown). decide. Then, the control unit 20 drives the lens driving unit 12, the analog signal processing unit 14, and the TG 15 under the determined shooting conditions to perform the main shooting. At this time, the image sensor 13 is driven in a frame mode (all pixel readout mode), and image data of a captured image (main captured image) is recorded in the buffer memory 16 via the analog signal processing unit 14. Thereafter, the control unit 20 drives the image processing unit 17 to perform image processing on the image data of the main captured image recorded in the buffer memory 16. In addition, the control unit 20 drives the display control unit 18 to display the actual captured image after image processing on the display unit 19. Then, the control unit 20 drives the compression / decoding unit 22 to perform compression processing on the image data of the actual captured image after the image processing, and record the image data of the actual captured image after the compression processing. To the recording medium 24. When the digital camera is set to the uncompressed recording mode, the control unit 20 records the image data of the actual captured image after image processing without being compressed without driving the compression / decoding unit 22. Recording is performed on the recording medium 24 via / F23.

また、画像再生ボタンが押下されると、制御部20は、記録I/F23を介して、記録媒体24に記録された本撮影画像等の画像データを再生画像の画像データとしてバッファメモリ16へ読み出す。その後、制御部20は、必要に応じて圧縮/復号部22を駆動して、そのバッファメモリ16の画像データに復号処理を施す。また、デジタルカメラの顔認識機能として、例えば、顔認識再生が有効にされた場合には、制御部20は、バッファメモリ16の画像データから被写体の顔領域を検出する。また、制御部20は、必要に応じて画像処理部17を駆動し、バッファメモリ16の画像データに対して必要な画像処理を施す。そして、制御部20は、表示制御部18を駆動して、バッファメモリ16の画像データを表示部19に表示させる。このとき、被写体の顔領域が検出されていれば、表示部19には、その検出を示す枠(検出枠)がその顔領域に重畳された画像が表示されたり、その顔領域を中心にして拡大された画像が表示される。   When the image reproduction button is pressed, the control unit 20 reads out image data such as a main photographic image recorded on the recording medium 24 to the buffer memory 16 as image data of the reproduced image via the recording I / F 23. . Thereafter, the control unit 20 drives the compression / decoding unit 22 as necessary to perform decoding processing on the image data in the buffer memory 16. As a face recognition function of the digital camera, for example, when face recognition / playback is enabled, the control unit 20 detects the face area of the subject from the image data in the buffer memory 16. Further, the control unit 20 drives the image processing unit 17 as necessary, and performs necessary image processing on the image data in the buffer memory 16. Then, the control unit 20 drives the display control unit 18 to display the image data in the buffer memory 16 on the display unit 19. At this time, if the face area of the subject is detected, the display unit 19 displays an image in which a frame (detection frame) indicating the detection is superimposed on the face area, or centered on the face area. An enlarged image is displayed.

以下、デジタルカメラの顔検出の動作を、図3の流れ図を参照して説明する。図3は、顔認識AFや顔認識再生など、デジタルカメラの顔認識機能が有効にされた場合における撮影や画像再生の動作の中で実行される顔検出処理のフローチャートである。   Hereinafter, the face detection operation of the digital camera will be described with reference to the flowchart of FIG. FIG. 3 is a flowchart of face detection processing executed during shooting and image playback operations when the digital camera face recognition function such as face recognition AF and face recognition playback is enabled.

ステップ101(S101):制御部20は、撮影や画像再生の動作によってバッファメモリ16に記録されたスルー画像、本撮影画像、再生画像のうちの何れかの画像データを顔検出処理の対象画像(検出対象画像)として使用するように設定する。   Step 101 (S101): The control unit 20 converts any one of the through image, the actual captured image, and the reproduced image recorded in the buffer memory 16 by the photographing and image reproduction operations into the target image (for the face detection process). To be used as a detection target image).

なお、本実施形態のデジタルカメラでは、姿勢が「横」の場合には、図4(a)に示すように、LCDモニタ画面に表示されたままの「横位置」の画像が撮影されてバッファメモリ16に記録される。また、姿勢が「縦−90度」の場合には、図4(b)に示すように、LCDモニタ画面に表示された画像を時計回り(右回り)に90度回転した画像が撮影されてバッファメモリ16に記録される。また、姿勢が「縦+90度」の場合には、図4(c)に示すように、LCDモニタ画面に表示された画像を反時計回り(左回り)に90度回転した画像が撮影されてバッファメモリ16に記録される。つまり、本実施形態のデジタルカメラでは、その姿勢にかかわらず、バッファメモリ16に記録されたこれら「横位置」の画像が検出対象画像として使用される。   In the digital camera of the present embodiment, when the posture is “horizontal”, as shown in FIG. 4A, an image of “horizontal position” displayed on the LCD monitor screen is captured and buffered. Recorded in the memory 16. When the posture is “vertical-90 degrees”, as shown in FIG. 4B, an image obtained by rotating the image displayed on the LCD monitor screen 90 degrees clockwise (clockwise) is photographed. Recorded in the buffer memory 16. When the posture is “vertical +90 degrees”, an image obtained by rotating the image displayed on the LCD monitor screen 90 degrees counterclockwise (counterclockwise) as shown in FIG. Recorded in the buffer memory 16. That is, in the digital camera according to the present embodiment, these “lateral position” images recorded in the buffer memory 16 are used as detection target images regardless of the posture.

ステップ102:制御部20は、センサ部21を駆動して、デジタルカメラの姿勢を示す情報(姿勢情報)を取得する。但し、顔認識再生などの画像再生の動作により本フローチャートの処理が実行される場合には、制御部20は、再生画像のファイルから姿勢情報を取得する。なお、再生画像のファイルがExif形式に基づいたものであれば、姿勢情報は、そのタグ情報として記録されている。   Step 102: The control unit 20 drives the sensor unit 21 to acquire information (posture information) indicating the posture of the digital camera. However, when the processing of this flowchart is executed by an image reproduction operation such as face recognition reproduction, the control unit 20 acquires posture information from a reproduction image file. If the reproduction image file is based on the Exif format, the posture information is recorded as the tag information.

ステップ103:制御部20は、取得した姿勢情報が示すデジタルカメラの姿勢に応じて顔検出のパラメータを決定する。   Step 103: The control unit 20 determines face detection parameters according to the posture of the digital camera indicated by the obtained posture information.

ここで、顔検出のパラメータについて説明する。先ず、第1の顔検出パラメータである「非検出マスク」について、図5を用いて説明する。   Here, face detection parameters will be described. First, the “non-detection mask” that is the first face detection parameter will be described with reference to FIG.

「非検出マスク」は、検出対象画像中における顔検出の処理を行う領域(検出対象領域)と行わない領域(検出非対象領域)との区分を指定するためのパラメータである。図5に示す「非検出マスク1」〜「非検出マスク3」では、それぞれ、斜線で表した領域により検出非対象領域を指定し、一方、白抜きにして表した領域により検出対象領域を指定する。   The “non-detection mask” is a parameter for designating a classification of a region (detection target region) where face detection processing is performed in a detection target image and a region where detection processing is not performed (detection non-target region). In “Non-detection mask 1” to “Non-detection mask 3” shown in FIG. 5, a detection non-target region is specified by a hatched region, and a detection target region is specified by a white region. To do.

本実施形態のデジタルカメラでは、姿勢が「横」の場合には、図5(a)に示すように、検出対象画像の上側に重心を置いた領域を検出対象領域として指定するための「非検出マスク1」が用いられる。また、姿勢が「縦−90度」の場合には、図5(b)に示すように、検出対象画像の右側に重心を置いた領域を検出対象領域として指定するための「非検出マスク2」が用いられる。また、姿勢が「縦+90度」の場合には、図5(c)に示すように、検出対象画像の左側に重心を置いた領域を検出対象領域として指定するための「非検出マスク3」が用いられる。   In the digital camera according to the present embodiment, when the posture is “horizontal”, as shown in FIG. 5A, “non-display” for designating a region having the center of gravity above the detection target image as the detection target region. A detection mask 1 ”is used. When the orientation is “vertical-90 degrees”, as shown in FIG. 5B, a “non-detection mask 2” for designating a region with the center of gravity on the right side of the detection target image as the detection target region. Is used. Further, when the posture is “vertical +90 degrees”, as shown in FIG. 5C, “non-detection mask 3” for designating a region having the center of gravity on the left side of the detection target image as the detection target region. Is used.

つまり、「非検出マスク」は、「横」、「縦−90度」、「縦+90度」の各姿勢で撮影された画像中において、一般的な構図から通常その部分には被写体の顔が存在しないだろうと考えられる領域を検出非対象領域に指定するためのものである。例えば、「横」の姿勢で撮影された画像の下側の部分には逆立ちでもしていない限り被写体の顔が存在することはないと考えられるので、デジタルカメラの姿勢が「横」である場合には、図5(a)に示す「非検出マスク1」を使用して、それを検出対象画像に被せるようにする。これにより、検出対象画像中の顔が存在しないだろうと考えられる領域は検出非対象領域に指定されて、その領域については顔検出の処理が行われない。そのため、顔検出の処理が検出対象画像の全領域に対して行われる場合と比べて、顔検出を高速に行えるようになる。   In other words, the “non-detection mask” means that the face of the subject is usually present in the portion taken from the general composition in the images taken in the postures of “horizontal”, “vertical −90 degrees”, and “vertical +90 degrees”. This is for designating a region considered to be nonexistent as a non-detection target region. For example, if the face of the subject is unlikely to be present in the lower part of the image taken in the “landscape” position unless the camera is upside down, the digital camera is in the “landscape” position. For this, the “non-detection mask 1” shown in FIG. 5A is used to cover the detection target image. As a result, an area in which the face in the detection target image is considered not to exist is designated as a non-detection target area, and face detection processing is not performed for that area. Therefore, face detection can be performed at a higher speed than when face detection processing is performed on the entire region of the detection target image.

なお、「非検出マスク1」〜「非検出マスク3」の情報は、デジタルカメラのROM(不図示)などの記憶媒体に予め格納されるものである。   The information of “non-detection mask 1” to “non-detection mask 3” is stored in advance in a storage medium such as a ROM (not shown) of the digital camera.

以上から、制御部20は、取得した姿勢情報が「横」の場合には「非検出マスク1」を、姿勢情報が「縦−90度」の場合には「非検出マスク2」を、姿勢情報が「縦+90度」の場合には「非検出マスク3」を、第1の顔検出パラメータとして決定する。   From the above, the control unit 20 sets the “non-detection mask 1” when the acquired posture information is “horizontal”, and the “non-detection mask 2” when the posture information is “vertical-90 degrees”. When the information is “vertical +90 degrees”, “non-detection mask 3” is determined as the first face detection parameter.

次に、第2の顔検出パラメータである「方向パターン」について、図6を用いて説明する。   Next, the “direction pattern” that is the second face detection parameter will be described with reference to FIG.

「方向パターン」は、検出対象画像中において検出を有効とする被写体の顔の向き(方向)のパターンを指定するためのパラメータである。   The “direction pattern” is a parameter for designating the pattern of the face direction (direction) of the subject for which detection is effective in the detection target image.

本実施形態のデジタルカメラでは、検出対象画像から、図6(a)の(1)〜(4)に示す4つの方向の顔を検出可能としている。そして、本実施形態のデジタルカメラでは、図6(b)に示すように、姿勢が「横」である場合には、4つのうち(4)、(1)、(2)に示す方向の顔の検出を有効とするように指定するための「方向パターン1」が用いられる。また、姿勢が「縦−90度」である場合には、4つのうち(1)、(2)、(3)に示す方向の顔の検出を有効とするように指定するための「方向パターン2」が用いられる。また、姿勢が「縦+90度」である場合には、4つのうち(1)、(4)、(3)に示す方向の顔の検出を有効とするように指定するための「方向パターン3」が用いられる。   In the digital camera of this embodiment, the faces in four directions shown in (1) to (4) of FIG. 6A can be detected from the detection target image. In the digital camera of the present embodiment, as shown in FIG. 6B, when the posture is “horizontal”, the faces in the directions shown in (4), (1), and (2) among the four “Direction pattern 1” is used to specify that the detection of the above is valid. Further, when the posture is “vertical-90 degrees”, a “direction pattern” for designating that the detection of the face in the directions shown in (1), (2), and (3) is valid among the four. 2 "is used. Further, when the posture is “vertical +90 degrees”, “direction pattern 3” for designating that the detection of the face in the directions shown in (1), (4), and (3) is valid among the four. Is used.

つまり、「方向パターン」は、「横」、「縦−90度」、「縦+90度」の各姿勢で撮影された検出対象画像において、一般的な構図から通常その方向なら写るだろうと考えられる顔の方向(少なくとも1つ以上)を検出の対象として指定するためのものである。例えば、検出対象画像が「縦+90度」の姿勢で撮影されたものであるとすれば、被写体が逆立ちでもしていない限り図6(a)の(2)に示す方向の顔は写っていないと考えられる。そのため、本実施形態のデジタルカメラでは、姿勢が「縦+90度」である場合には、図6(a)の(2)を除く(1)、(4)、(3)の方向の顔の検出を有効とするように指定する図6(b)の「方向パターン3」が使用される。これにより、写っていないだろうと考えられる方向の顔については顔検出の処理が行われない。そのため、顔検出の処理が図6(a)の(1)〜(4)に示す全ての方向の顔に対して行われる場合と比べて、顔検出を高速に行えるようになる。   In other words, it is considered that the “direction pattern” is usually captured in the direction from the general composition in the detection target image taken in the postures of “horizontal”, “vertical −90 degrees”, and “vertical +90 degrees”. This is for designating the face direction (at least one or more) as a detection target. For example, if the detection target image is taken in a posture of “vertical +90 degrees”, the face in the direction shown in (2) of FIG. 6A is not captured unless the subject is standing upside down. it is conceivable that. Therefore, in the digital camera of this embodiment, when the posture is “vertical +90 degrees”, the face in the direction (1), (4), (3) except (2) in FIG. “Direction pattern 3” in FIG. 6B, which specifies that detection is valid, is used. As a result, the face detection process is not performed for a face in a direction considered not to be captured. Therefore, the face detection can be performed at a higher speed than when face detection processing is performed on faces in all directions shown in (1) to (4) of FIG.

なお、図6(b)に示す「方向パターン1」〜「方向パターン3」では、それぞれ3つの方向の顔の検出を有効とするようように指定しているが、「方向パターン」で指定する顔の方向は、3つに限定されず、幾つ指定してもよい。即ち、1つだけ指定してもよく、あるいは全て(図6(a)では4つ)を指定してもよい。例えば、デジタルカメラの姿勢が「横」の場合、顔の方向として、図6(a)の(1)の方向は、通常「方向パターン」で指定する必要があると考えられるが、図6(a)の(4)及び(2)の方向については、被写体が横に寝転がっているようなケースのものであるため、それを顔検出の対象外とするのであればそれら2つの方向を「方向パターン」で指定する必要はない。よって、それら2つの方向を図6(b)の「方向パターン1」から削除すると、デジタルカメラの姿勢が「横」の場合に顔検出が行われる顔の方向は図6(a)の(1)の一方向のみとなるので、顔検出を更に高速に行えるようになる。   In the “direction pattern 1” to “direction pattern 3” shown in FIG. 6B, the face detection in three directions is specified to be valid, but the “direction pattern” is specified. The number of face directions is not limited to three, and any number of face directions may be specified. That is, only one may be specified, or all (four in FIG. 6A) may be specified. For example, when the posture of the digital camera is “horizontal”, it is considered that the direction of (1) in FIG. 6 (a) usually needs to be designated as a “direction pattern” as the face direction. The directions of (4) and (2) in a) are for cases where the subject is lying on the side, so if these are excluded from face detection targets, these two directions are It is not necessary to specify with "Pattern". Therefore, when these two directions are deleted from “direction pattern 1” in FIG. 6B, the face direction in which face detection is performed when the posture of the digital camera is “lateral” is (1) in FIG. ) In only one direction, face detection can be performed at higher speed.

また、「方向パターン1」〜「方向パターン3」の情報は、デジタルカメラのROM(不図示)などの記憶媒体に予め格納されるものである。   The information of “direction pattern 1” to “direction pattern 3” is stored in advance in a storage medium such as a ROM (not shown) of the digital camera.

以上から、制御部20は、取得した姿勢情報が「横」の場合には「方向パターン1」を、姿勢情報が「縦−90度」の場合には「方向パターン2」を、姿勢情報が「縦+90度」の場合には「方向パターン3」を、第2の顔検出パラメータとして決定する。   From the above, the control unit 20 displays “direction pattern 1” when the acquired posture information is “horizontal”, “direction pattern 2” when the posture information is “vertical-90 degrees”, and the posture information is In the case of “vertical +90 degrees”, “direction pattern 3” is determined as the second face detection parameter.

ステップ104:制御部20は、上記のように決定した顔検出パラメータを使用して、検出対象画像から被写体の顔領域を検出する。   Step 104: The control unit 20 detects the face area of the subject from the detection target image using the face detection parameter determined as described above.

つまり、第1の顔検出パラメータとして決定された「非検出マスク」を検出対象画像に被せた上で、その「非検出マスク」の検出対象領域から被写体の顔領域を検出するようにする。このとき、被写体の顔領域の検出は、第2の顔検出パラメータとして決定された「方向パターン」により検出が有効とされる方向の顔についてのみ行うようにする。   That is, after the “non-detection mask” determined as the first face detection parameter is placed on the detection target image, the face area of the subject is detected from the detection target area of the “non-detection mask”. At this time, the detection of the face area of the subject is performed only for the face in the direction in which the detection is valid based on the “direction pattern” determined as the second face detection parameter.

なお、被写体の顔領域の検出は、第1の顔検出パラメータだけを使用して行うようにしてもよく、もちろん、第2の顔検出パラメータだけを使用して行うようにしてもよい。   Note that the detection of the face area of the subject may be performed using only the first face detection parameter, and of course, it may be performed using only the second face detection parameter.

また、被写体の顔領域の検出は、例えば、特開2006−155096号公報などで開示される従来の「パターンマッチング手法」等を利用して行うようにするとよい。   The detection of the face area of the subject may be performed using a conventional “pattern matching method” disclosed in, for example, Japanese Patent Application Laid-Open No. 2006-1555096.

(実施形態の補足事項)
上記では、ステップ101において、撮影や画像再生の動作によってバッファメモリ16に記録された画像データを顔検出処理の対象画像、即ち、検出対象画像としてそのまま使用するように設定した。しかし、顔検出を高速に行うために、例えば、図7のフローチャートに示すように、図3のフローチャートの顔検出処理の一部を変形してもよい。具体的には、図7のフローチャートに示すように、ステップ101において、バッファメモリ16に記録された画像データを基に、その画像サイズを所定のサイズに縮小した縮小画像を作成する。そして、ステップ104の処理の先頭において、その縮小画像を検出対象画像として使用するように設定する。このように、縮小画像を使用して顔検出を行うようにすれば、元の大きな画像サイズの画像を使用する場合と比べて、顔検出の処理でのパターン検索でのデータ量が少なくなるので、顔検出にかかる時間を短縮することができるようになる。但し、そうした場合、第1の顔検出パラメータとして使用される「非検出マスク」の情報については、縮小画像の画像サイズに合わせたものを予め用意してデジタルカメラのROM(不図示)などの記憶媒体に事前に格納しておくようにする。
(Supplementary items of the embodiment)
In the above description, in step 101, the image data recorded in the buffer memory 16 by the shooting and image reproduction operations is set to be used as it is as the target image of the face detection process, that is, the detection target image. However, in order to perform face detection at high speed, for example, as shown in the flowchart of FIG. 7, a part of the face detection process of the flowchart of FIG. 3 may be modified. Specifically, as shown in the flowchart of FIG. 7, in step 101, based on the image data recorded in the buffer memory 16, a reduced image is created by reducing the image size to a predetermined size. Then, at the beginning of the processing in step 104, the reduced image is set to be used as a detection target image. In this way, if face detection is performed using a reduced image, the amount of data in pattern search in face detection processing is reduced compared to the case of using an image having an original large image size. The time required for face detection can be shortened. However, in such a case, the information on the “non-detection mask” used as the first face detection parameter is prepared in advance according to the image size of the reduced image and stored in the ROM (not shown) of the digital camera. Store in advance on the medium.

なお、図7のフローチャートでは、縮小画像を作成することによって顔検出にかかる時間を増加させないように、ステップ101の縮小画像を作成する処理と、ステップ102の姿勢検出およびステップ103の顔検出パラメータ決定の処理とを並列に実行させるようにしている。その場合、例えば、制御部20は、画像処理部17を駆動して画像処理部17に縮小画像を作成させる。また、それと並行して、制御部20は、センサ部21を駆動して姿勢情報を取得すると共に、その姿勢情報が示すデジタルカメラの姿勢に応じて顔検出パラメータを決定するようにする。   In the flowchart of FIG. 7, processing for creating a reduced image in step 101, posture detection in step 102, and face detection parameter determination in step 103 so as not to increase the time required for face detection by creating a reduced image. The process is executed in parallel. In that case, for example, the control unit 20 drives the image processing unit 17 to cause the image processing unit 17 to create a reduced image. At the same time, the control unit 20 drives the sensor unit 21 to acquire posture information, and determines a face detection parameter according to the posture of the digital camera indicated by the posture information.

また、バッファメモリ16に記録された画像データから被写体の顔が存在すると考えられる所定の領域を切り出して、その切り出した画像(部分画像)を検出対象画像として使用するようにしてもよい。そうすれば、バッファメモリ16の画像データが検出対象画像として使用される場合と比べて、顔検出の処理でのパターン検索の範囲を狭くすることができるので、顔検出にかかる時間を短縮することができるようになる。なお、そうした場合には、第2の顔検出パラメータである「非検出マスク」は使用しなくてもよいが、顔検出の処理でのパターン検索の範囲を更に狭めたい場合には「非検出マスク」を部分画像に対して被せるとよい。さらに、部分画像を上記のように所定のサイズに縮小して、その縮小した画像を検出対象画像として使用するようにしてもよい。あるいは、上記の縮小画像から被写体の顔が存在すると考えられる所定の領域を切り出して、その切り出した画像を検出対象画像として使用するようにしてもよい。   Further, a predetermined area where the subject's face is considered to exist may be cut out from the image data recorded in the buffer memory 16, and the cut-out image (partial image) may be used as the detection target image. By doing so, compared to the case where the image data in the buffer memory 16 is used as a detection target image, the pattern search range in the face detection process can be narrowed, so that the time required for face detection can be shortened. Will be able to. In such a case, the “non-detection mask” that is the second face detection parameter may not be used. However, if it is desired to further narrow the pattern search range in the face detection process, the “non-detection mask” is used. "Is good to cover the partial image. Furthermore, the partial image may be reduced to a predetermined size as described above, and the reduced image may be used as the detection target image. Alternatively, a predetermined area where the subject's face is considered to exist may be cut out from the reduced image, and the cut-out image may be used as the detection target image.

また、上記では、図4(b)に示す「横位置」の画像が検出対象画像として使用されるとしたが、例えば、図8に示すように「縦位置」の画像を検出対象画像として使用する場合には、「非検出マスク」及び「方向パターン」には次のものを使用するようにする。   In the above description, the “horizontal position” image shown in FIG. 4B is used as the detection target image. For example, as shown in FIG. 8, the “vertical position” image is used as the detection target image. In this case, the following are used for the “non-detection mask” and the “direction pattern”.

先ず、「非検出マスク」には、図5に示す「非検出マスク1」〜「非検出マスク3」をそれぞれ反時計回り(左回り)に90度回転したものを使用するようにする。なお、その「縦位置」の画像用に使用する各マスクの情報は、デジタルカメラのROM(不図示)などの記憶媒体に予め格納しておくようにする。   First, the “non-detection mask” is obtained by rotating “non-detection mask 1” to “non-detection mask 3” shown in FIG. 5 by 90 degrees counterclockwise (counterclockwise). The information of each mask used for the “vertical position” image is stored in advance in a storage medium such as a ROM (not shown) of the digital camera.

次に、「方向パターン」には、デジタルカメラの姿勢が図8(a)に示すように「横」の場合は、図6(b)に示す「方向パターン3」を使用するようにする。また、姿勢が図8(b)に示すように「縦−90度」の場合は、図6(b)に示す「方向パターン1」を使用するようにする。また、姿勢が図8(c)に示すように「縦+90度」の場合は、図6(a)の(4)、(3)、(2)に示す方向の顔の検出を有効とするように指定する「方向パターン4」を新たに用意してそれを使用するようにする。なお、その「方向パターン4」の情報は、デジタルカメラのROM(不図示)などの記憶媒体に予め格納しておくようにする。   Next, when the orientation of the digital camera is “horizontal” as shown in FIG. 8A, “direction pattern 3” shown in FIG. 6B is used as the “direction pattern”. Further, when the posture is “vertical-90 degrees” as shown in FIG. 8B, “direction pattern 1” shown in FIG. 6B is used. Further, when the posture is “vertical +90 degrees” as shown in FIG. 8C, the detection of the face in the direction shown in FIGS. 6A, 6B, 3C, and 2B is enabled. "Direction pattern 4" to be designated as such is newly prepared and used. The information of “direction pattern 4” is stored in advance in a storage medium such as a ROM (not shown) of the digital camera.

また、上記では、姿勢情報で取得されるデジタルカメラの姿勢は、「横」、「縦−90度」、「縦+90度」の3種類としたが、この3種類に限定されない。   In the above description, the orientations of the digital camera acquired by the orientation information are “horizontal”, “vertical −90 degrees”, and “vertical +90 degrees”, but are not limited to these three types.

また、上述した顔検出の処理は、被写体そのものを検出する場合にも適用することができる。   The face detection process described above can also be applied to the case where the subject itself is detected.

(本実施形態の作用効果)
以上、本実施形態のデジタルカメラでは、顔検出の処理において、姿勢情報が取得され、その姿勢情報が示すカメラの姿勢に応じて、第1の顔検出パラメータである「非検出マスク」が決定される。そして、その第1の顔検出パラメータとして決定された「非検出マスク」を検出対象画像に被せた上で、その「非検出マスク」の検出対象領域から被写体の顔領域が検出される。このため、検出対象画像中の顔が存在しないだろうと考えられる領域は検出非対象領域に指定されて、その領域については顔検出の処理が行われない。
(Operational effect of this embodiment)
As described above, in the digital camera of this embodiment, posture information is acquired in the face detection process, and the “non-detection mask” that is the first face detection parameter is determined according to the posture of the camera indicated by the posture information. The Then, the “non-detection mask” determined as the first face detection parameter is placed on the detection target image, and then the face area of the subject is detected from the detection target area of the “non-detection mask”. For this reason, an area in which the face in the detection target image is considered not to exist is designated as a non-detection target area, and face detection processing is not performed for that area.

従って、本実施形態のデジタルカメラでは、顔検出の処理が検出対象画像の全領域に対して行われる場合と比べて、顔検出を高速に行うことができる。   Therefore, in the digital camera of the present embodiment, face detection can be performed at a higher speed than when face detection processing is performed on the entire region of the detection target image.

また、本実施形態のデジタルカメラでは、顔検出の処理において、姿勢情報が取得され、その姿勢情報が示すカメラの姿勢に応じて、第2の顔検出パラメータである「方向パターン」が決定される。そして、その第2の顔検出パラメータである「方向パターン」によって検出が有効とされる方向の顔についてのみ顔検出の処理が行われて、その結果、検出対象画像から被写体の顔領域が検出される。このため、「方向パターン」で指定されていない写っていないだろうと考えられる方向の顔については顔検出の処理が行われない。   In the digital camera of the present embodiment, posture information is acquired in the face detection process, and a “direction pattern” that is the second face detection parameter is determined according to the posture of the camera indicated by the posture information. . Then, face detection processing is performed only for faces in the direction in which detection is enabled by the “direction pattern” that is the second face detection parameter, and as a result, the face area of the subject is detected from the detection target image. The For this reason, face detection processing is not performed for a face in a direction that is not designated by the “direction pattern” and that is not likely to be captured.

従って、本実施形態のデジタルカメラでは、顔検出の処理が全ての方向の顔に対して行われる場合と比べて、顔検出を高速に行うことができる。   Therefore, in the digital camera of the present embodiment, face detection can be performed at a higher speed than when face detection processing is performed on faces in all directions.

また、本実施形態のデジタルカメラでは、顔検出の処理において、撮影や画像再生の動作によってバッファメモリ16に記録された画像データを基に、その画像サイズを所定のサイズに縮小した縮小画像が作成される。そして、その縮小画像を検出対象画像として使用して顔検出の処理が行われる。   In the digital camera according to the present embodiment, in the face detection process, a reduced image is generated by reducing the image size to a predetermined size based on the image data recorded in the buffer memory 16 by the shooting or image reproduction operation. Is done. Then, the face detection process is performed using the reduced image as the detection target image.

従って、本実施形態のデジタルカメラでは、元の大きな画像サイズの画像を使用する場合と比べて、顔検出の処理でのパターン検索でのデータ量が少なくなるので、顔検出を高速に行うことができる。   Therefore, in the digital camera of the present embodiment, the amount of data for pattern search in the face detection process is smaller than when using the original large image size image, so that face detection can be performed at high speed. it can.

また、本実施形態のデジタルカメラでは、顔検出の処理において、撮影や画像再生の動作によってバッファメモリ16に記録された画像データから、被写体の顔が存在すると考えられる所定の領域が部分画像として切り出される。そして、その部分画像を検出対象画像として使用して顔検出の処理が行われる。   In the digital camera of this embodiment, in the face detection process, a predetermined area where the subject's face is thought to exist is cut out as a partial image from the image data recorded in the buffer memory 16 by shooting or image reproduction. It is. Then, face detection processing is performed using the partial image as a detection target image.

従って、本実施形態のデジタルカメラでは、元のバッファメモリ16の画像データが検出対象画像として使用される場合と比べて、顔検出の処理でのパターン検索の範囲を狭くすることができるので、顔検出を高速に行うことができる。   Therefore, in the digital camera of this embodiment, the pattern search range in the face detection process can be narrowed compared to the case where the image data of the original buffer memory 16 is used as the detection target image. Detection can be performed at high speed.

また、本実施形態のデジタルカメラでは、顔検出の処理において、姿勢情報が示すカメラの姿勢に応じて決定された顔検出パラメータを使用して、検出対象画像から被写体の顔領域が検出される。なお、顔検出パラメータ、即ち、第1の顔検出パラメータである「非検出マスク」と第2の顔検出パラメータである「方向パターン」とは、デジタルカメラのROM(不図示)などの記憶媒体に予め格納されるものである。   In the digital camera of this embodiment, the face area of the subject is detected from the detection target image using face detection parameters determined according to the camera posture indicated by the posture information in the face detection process. The face detection parameters, that is, the first face detection parameter “non-detection mask” and the second face detection parameter “direction pattern” are stored in a storage medium such as a ROM (not shown) of the digital camera. It is stored in advance.

従って、本実施形態のデジタルカメラでは、姿勢情報が示すカメラの姿勢に応じて顔検出パラメータを変更するのみの簡単な方法によって顔検出を行うことができ、また、デジタルカメラがサポートする姿勢の種類に追加がある場合にも、それに対応した顔検出パラメータを追加するのみで姿勢の種類の追加などに対応することができる。   Therefore, in the digital camera of the present embodiment, face detection can be performed by a simple method that only changes the face detection parameter in accordance with the camera posture indicated by the posture information, and the types of posture supported by the digital camera. Even if there is an addition to the pose, it is possible to cope with the addition of the kind of posture by simply adding the face detection parameter corresponding to it.

このように、本実施形態のデジタルカメラでは、簡単な方法によって被写体検出の処理を高速化することができる。   As described above, in the digital camera according to the present embodiment, the object detection process can be speeded up by a simple method.

(その他)
なお、上述したデジタルカメラの動作に係るプログラムは、その一部または全部をコンピュータなどの外部処理装置に実行させてもよい。その場合、必要なプログラムがCD−ROM等のコンピュータ読み取り可能な記憶媒体やインターネット等の通信網などを介して外部処理装置へインストールされる。
(Other)
Note that a part or all of the above-described program related to the operation of the digital camera may be executed by an external processing device such as a computer. In that case, a necessary program is installed in the external processing apparatus via a computer-readable storage medium such as a CD-ROM or a communication network such as the Internet.

また、上記ではデジタルカメラの実施例を説明したが、本発明の画像再生装置は、画像を再生して表示することが可能な他の機器、例えば、携帯電話機やデジタルビデオカメラなどにも適用することが可能である。   In the above description, the embodiment of the digital camera has been described. However, the image playback apparatus of the present invention is also applicable to other devices capable of playing back and displaying an image, such as a mobile phone and a digital video camera. It is possible.

11…撮像レンズ,12…レンズ駆動部,13…撮像素子,14…アナログ信号処理部,15…タイミングジェネレータ(TG),16…バッファメモリ,17…画像処理部,18…表示制御部,19…表示部,20…制御部,21…センサ部,22…圧縮/復号部,23…記録インターフェース(記録I/F),24…記録媒体,25…操作部,26…バス
DESCRIPTION OF SYMBOLS 11 ... Imaging lens, 12 ... Lens drive part, 13 ... Imaging device, 14 ... Analog signal processing part, 15 ... Timing generator (TG), 16 ... Buffer memory, 17 ... Image processing part, 18 ... Display control part, 19 ... Display unit, 20 ... control unit, 21 ... sensor unit, 22 ... compression / decoding unit, 23 ... recording interface (recording I / F), 24 ... recording medium, 25 ... operation unit, 26 ... bus

Claims (8)

予め定められた被写体検出のパラメータを使用して、画像から被写体の検出を行う撮像装置であって、
装置の姿勢を示す情報を取得する姿勢情報取得手段と、
画像から被写体の検出を行うときに、前記姿勢情報取得手段によって取得された前記情報が示す前記姿勢に応じて、前記被写体検出のパラメータを変更する被写体検出手段とを備え、
前記被写体検出手段は、前記姿勢情報取得手段により前記姿勢を示す情報が取得され、取得された前記姿勢に応じて、前記被写体検出のパラメータを変更するのと並列に、前記画像を基に、その画像サイズを所定のサイズに縮小した縮小画像を作成し、作成した前記縮小画像を使用して被写体の検出を行う
とを特徴とする撮像装置。
An imaging device that detects a subject from an image using predetermined subject detection parameters,
Attitude information acquisition means for acquiring information indicating the attitude of the device;
Subject detection means for changing the subject detection parameters in accordance with the posture indicated by the information acquired by the posture information acquisition means when detecting a subject from an image ;
The subject detection unit acquires the information indicating the posture by the posture information acquisition unit, and changes the subject detection parameter in accordance with the acquired posture based on the image. Create a reduced image with the image size reduced to a predetermined size, and detect the subject using the created reduced image
Imaging device comprising a call.
請求項1に記載の撮像装置において、
前記被写体検出のパラメータの少なくとも1つは、前記画像中における被写体の検出を行う領域である検出対象領域と被写体の検出を行わない領域である検出非対象領域との区分を指定するパラメータである
ことを特徴とする撮像装置。
The imaging device according to claim 1,
At least one of the subject detection parameters is a parameter that designates a division between a detection target region that is a region where the subject is detected in the image and a detection non-target region that is a region where the subject is not detected. An imaging apparatus characterized by the above.
請求項1または請求項2に記載の撮像装置において、
前記被写体検出のパラメータの少なくとも1つは、前記画像中において検出を有効とする被写体の方向のパターンを指定するパラメータである
ことを特徴とする撮像装置。
In the imaging device according to claim 1 or 2,
The imaging apparatus according to claim 1, wherein at least one of the subject detection parameters is a parameter for designating a pattern of a subject direction for which detection is effective in the image.
請求項1〜請求項3の何れか一項に記載の撮像装置において、
前記被写体検出手段は、前記姿勢にかかわらず、常に横位置の前記画像を使用して被写体の検出を行う
ことを特徴とする撮像装置。
In the imaging device according to any one of claims 1 to 3,
The imaging apparatus characterized in that the subject detection means always detects a subject using the image in a lateral position regardless of the posture.
予め定められた被写体検出のパラメータを使用して、画像から被写体の検出を行う被写体検出プログラムであって、
装置の姿勢を示す情報を取得する姿勢情報取得ステップと、
画像から被写体の検出を行うときに、前記姿勢情報取得ステップによって取得された前記情報が示す前記姿勢に応じて、前記被写体検出のパラメータを変更する被写体検出ステップとをコンピュータに実行させ、
前記被写体検出ステップは、前記姿勢情報取得ステップにより前記姿勢を示す情報が取得され、取得された前記姿勢に応じて、前記被写体検出のパラメータを変更するのと並列に、前記画像を基に、その画像サイズを所定のサイズに縮小した縮小画像を作成し、作成した前記縮小画像を使用して被写体の検出を行う
ことを特徴とする被写体検出プログラム
A subject detection program for detecting a subject from an image using predetermined subject detection parameters ,
An attitude information acquisition step for acquiring information indicating the attitude of the device;
When detecting a subject from an image, the computer executes a subject detection step of changing the subject detection parameter according to the posture indicated by the information acquired by the posture information acquisition step;
In the subject detection step , information indicating the posture is acquired by the posture information acquisition step, and the subject detection parameter is changed based on the image in parallel with changing the subject detection parameter according to the acquired posture. A subject detection program , wherein a reduced image obtained by reducing an image size to a predetermined size is created , and a subject is detected using the created reduced image.
請求項5に記載の被写体検出プログラムにおいて、
前記被写体検出のパラメータの少なくとも1つは、前記画像中における被写体の検出を行う領域である検出対象領域と被写体の検出を行わない領域である検出非対象領域との区分を指定するパラメータである
ことを特徴とする被写体検出プログラム。
The subject detection program according to claim 5,
At least one of the subject detection parameters is a parameter that designates a division between a detection target region that is a region where the subject is detected in the image and a detection non-target region that is a region where the subject is not detected. An object detection program characterized by
請求項5または請求項6に記載の被写体検出プログラムにおいて、
記被写体検出のパラメータの少なくとも1つは、前記画像中において検出を有効とする被写体の方向のパターンを指定するパラメータである
とを特徴とする被写体検出プログラム。
Te subject detecting program smell of claim 5 or claim 6,
Is at least one of the parameters before Symbol subject detection, is a parameter that specifies the direction of the pattern of the object to enable detection in the in the image
Subject detecting program characterized and this.
請求項5〜請求項7の何れか一項に記載の被写体検出プログラムにおいて、
前記被写体検出ステップでは、前記姿勢にかかわらず、常に横位置の前記画像を使用して被写体の検出を行
ことを特徴とする被写体検出プログラム。
In the subject detection program according to any one of claims 5 to 7,
Wherein the object detection step, the subject detecting program, wherein the posture regardless, intends always line detection of an object using the image of the lateral position.
JP2009023764A 2009-02-04 2009-02-04 Imaging apparatus and subject detection program Active JP5332668B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009023764A JP5332668B2 (en) 2009-02-04 2009-02-04 Imaging apparatus and subject detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009023764A JP5332668B2 (en) 2009-02-04 2009-02-04 Imaging apparatus and subject detection program

Publications (2)

Publication Number Publication Date
JP2010183254A JP2010183254A (en) 2010-08-19
JP5332668B2 true JP5332668B2 (en) 2013-11-06

Family

ID=42764459

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009023764A Active JP5332668B2 (en) 2009-02-04 2009-02-04 Imaging apparatus and subject detection program

Country Status (1)

Country Link
JP (1) JP5332668B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5942861B2 (en) * 2013-01-11 2016-06-29 オムロン株式会社 Image processing apparatus, image processing method, and image processing program
JP6107844B2 (en) * 2015-01-28 2017-04-05 カシオ計算機株式会社 Detection device, detection control method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4290100B2 (en) * 2003-09-29 2009-07-01 キヤノン株式会社 Imaging apparatus and control method thereof
JP4757106B2 (en) * 2006-06-14 2011-08-24 キヤノン株式会社 IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP4556968B2 (en) * 2007-05-18 2010-10-06 カシオ計算機株式会社 Face detection device, face detection method, and face detection program
JP2009017134A (en) * 2007-07-03 2009-01-22 Canon Inc Imaging apparatus and imaging method
JP5293139B2 (en) * 2008-09-05 2013-09-18 株式会社リコー Imaging apparatus, imaging method, program, and recording medium

Also Published As

Publication number Publication date
JP2010183254A (en) 2010-08-19

Similar Documents

Publication Publication Date Title
KR101342477B1 (en) Imaging apparatus and imaging method for taking moving image
CN101931752B (en) Imaging apparatus and focusing method
JP5235798B2 (en) Imaging apparatus and control method thereof
KR100920559B1 (en) Moving image playback device with camera-shake correction function and program recording medium
US20110007187A1 (en) Imaging Device And Image Playback Device
JP5655291B2 (en) Electronic camera
JP2010200239A (en) Imaging apparatus, image display device, imaging method and image display method, and focal-area frame position correction method
JP5186021B2 (en) Imaging apparatus, image processing apparatus, and imaging method
JP2009303196A (en) Photographic device and program
US20100141823A1 (en) Image Processing Apparatus And Electronic Appliance
CN107231517A (en) Image processing method, image processing apparatus and recording medium
JP2015053741A (en) Image playback device
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
KR20150032165A (en) Moving image selection apparatus for selecting moving image to be combined, moving image selection method, and storage medium
US8068144B2 (en) Image recording and reproducing apparatus
JP4654887B2 (en) Imaging device
JP2009141538A (en) IMAGING DEVICE, IMAGE REPRODUCING DEVICE, AND PROGRAM THEREOF
KR20120071972A (en) Digital image signal processing apparatus and method for controlling the same
JP5267279B2 (en) Image composition apparatus and program
JP4888829B2 (en) Movie processing device, movie shooting device, and movie shooting program
JP5332668B2 (en) Imaging apparatus and subject detection program
JP2014049882A (en) Imaging apparatus
JP2012151708A (en) Imaging device
JP2009094741A (en) Imaging apparatus, imaging method, and program
JP2011182014A (en) Image pickup device, image processing method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120125

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120710

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130115

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130313

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130715

R150 Certificate of patent or registration of utility model

Ref document number: 5332668

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250