JP4274233B2 - Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method - Google Patents

Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method Download PDF

Info

Publication number
JP4274233B2
JP4274233B2 JP2006325015A JP2006325015A JP4274233B2 JP 4274233 B2 JP4274233 B2 JP 4274233B2 JP 2006325015 A JP2006325015 A JP 2006325015A JP 2006325015 A JP2006325015 A JP 2006325015A JP 4274233 B2 JP4274233 B2 JP 4274233B2
Authority
JP
Japan
Prior art keywords
face
image
detected
unit
movement amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006325015A
Other languages
Japanese (ja)
Other versions
JP2008141437A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2006325015A priority Critical patent/JP4274233B2/en
Priority to US11/924,158 priority patent/US8228390B2/en
Priority to CN2007101954816A priority patent/CN101193208B/en
Publication of JP2008141437A publication Critical patent/JP2008141437A/en
Application granted granted Critical
Publication of JP4274233B2 publication Critical patent/JP4274233B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • H04N5/772Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera the recording apparatus and the television camera being placed in the same enclosure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4316Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/804Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback involving pulse code modulation of the colour picture signal components
    • H04N9/8042Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback involving pulse code modulation of the colour picture signal components involving data reduction
    • H04N9/8047Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback involving pulse code modulation of the colour picture signal components involving data reduction using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/82Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only
    • H04N9/8205Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal
    • H04N9/8227Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal the additional signal being at least another television signal

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Adjustment Of Camera Lenses (AREA)
  • Image Processing (AREA)

Description

本発明は、撮像装置に関し、特に、撮影画像等のブレを補正する撮影装置、画像処理装置、および、これらにおける画像処理方法ならびに当該方法をコンピュータに実行させるプログラムに関する。   The present invention relates to an imaging apparatus, and more particularly to an imaging apparatus that corrects blurring of a captured image, an image processing apparatus, an image processing method therefor, and a program that causes a computer to execute the method.

従来、デジタルスチルカメラ、デジタルビデオカメラ等の撮像装置、および両者の機能を備える動画および静止画カメラ等の撮像装置が急速に普及し、これらの撮像装置の高性能化が進んでいる。これらの撮像装置を手で持って撮影する場合には、撮像装置自体のブレおよび被写体のブレの2種類のブレが主に生じる。   2. Description of the Related Art Conventionally, imaging devices such as digital still cameras and digital video cameras, and imaging devices such as moving image and still image cameras having the functions of both have rapidly spread, and the performance of these imaging devices has been increasing. When shooting with these imaging devices held by hand, two types of blurring, namely blurring of the imaging device itself and blurring of the subject, mainly occur.

これらのブレを検出する方法として、(1)振動センサ、速度センサ、加速度センサ、重力センサ等によるブレの検出方法や、(2)画像処理による動きベクトルの検出方法等の検出方法が主に知られている。   As a method for detecting these shakes, (1) a shake detection method using a vibration sensor, speed sensor, acceleration sensor, gravity sensor, etc., and (2) a detection method such as a motion vector detection method using image processing are mainly known. It has been.

これらの検出方法によって検出されたブレ成分を用いて、このブレ成分をキャンセルする方向に撮影画像の位置を移動させることによって撮影画像におけるブレを補正することができる。なお、ブレの補正方法としては、(3)撮像素子の読み出しアドレスのシフト、画像メモリの書き込みまたは読み出しアドレスのシフト等の電子的ブレ補正処理、および(4)ブレ補正用レンズのシフトや傾斜、ブレ補正用プリズムの変形や傾斜、撮像素子のシフト等の光学的ブレ補正処理の2種類の補正方法が主に知られている。   Using the blur component detected by these detection methods, the blur in the shot image can be corrected by moving the position of the shot image in a direction to cancel the blur component. In addition, as a blur correction method, (3) electronic image blur correction processing such as shift of the read address of the image sensor, image memory write or read address, and (4) shift or tilt of the blur correction lens, Two types of correction methods for optical blur correction processing such as deformation and tilt of a blur correction prism and shift of an image sensor are mainly known.

例えば、タイミングジェネレータから供給されるサンプリング信号のうちシャッタ速度に応じたサンプルタイミングによって、手振れセンサから供給される手振れ検出情報をサンプリングし、サンプリングされた手振れ検出情報に基づいて、撮像素子によって得られる画像信号の読み出し位置を制御して手振れを補正する撮像装置が提案されている(例えば、特許文献1参照。)。
特開平05−316404号公報(図1)
For example, the image obtained by the image sensor based on the sampled camera shake detection information is sampled by sampling the camera shake detection information supplied from the camera shake sensor at the sample timing corresponding to the shutter speed among the sampling signals supplied from the timing generator. An imaging device that corrects camera shake by controlling a signal readout position has been proposed (see, for example, Patent Document 1).
Japanese Patent Laid-Open No. 05-316404 (FIG. 1)

上述の従来技術では、撮影画像に含まれる被写体に関わらずに均一的にブレ補正処理が実施される。このため、撮影画像全体としての手振れ等のブレを補正することができる。   In the above-described conventional technology, the blur correction process is uniformly performed regardless of the subject included in the captured image. For this reason, it is possible to correct blur such as camera shake as the entire captured image.

しかしながら、これらの補正処理では、撮影画像に含まれる背景や人物が均一に扱われるため、撮影者が被写体として狙っていた人物やその顔、目、鼻、口等にブレ成分が残った状態となることが考えられる。そこで、撮影画像全体としてのブレを補正するとともに、撮影画像に含まれる人物の顔等のブレについても適切に補正することができれば、さらに鮮鋭度の高い顔を撮影することができると考えられる。   However, in these correction processes, since the background and the person included in the photographed image are treated uniformly, the blur component remains in the person, the face, eyes, nose, mouth, etc. that the photographer aimed at as the subject. It is possible to become. Therefore, it is considered that a face with higher sharpness can be photographed if the blur of the entire photographed image can be corrected and the blur of a person's face or the like included in the photographed image can be appropriately corrected.

そこで、本発明は、画像に含まれるブレを適切に補正することを目的とする。   Accordingly, an object of the present invention is to appropriately correct blur included in an image.

本発明は、上記課題を解決するためになされたものであり、その第1の側面は、被写体の画像を撮像する撮像手段と、上記撮像手段により撮像された画像から顔を検出する顔検出手段と、上記撮像手段により撮像された画像における上記顔検出手段により検出された顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出する移動量検出手段と、上記移動量検出手段により検出された顔移動量および背景移動量に基づいて上記撮像手段により撮像された画像のブレを補正するブレ補正手段と
を具備することを特徴とする撮像装置、およびその画像処理方法ならびに当該方法をコンピュータに実行させるプログラムである。これにより、撮像画像から顔を検出すると、撮像画像における顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出し、検出された顔移動量および背景移動量に基づいて撮像画像のブレを補正するという作用をもたらす。
The present invention has been made in order to solve the above problems, and a first aspect of the present invention is an imaging unit that captures an image of a subject, and a face detection unit that detects a face from the image captured by the imaging unit. And a face movement amount that is a blur amount of the face area detected by the face detection unit and a background movement amount that is a blur amount of an area other than the face region in the image captured by the imaging unit. A moving amount detecting unit; and a blur correcting unit that corrects a blur of an image captured by the imaging unit based on a face moving amount and a background moving amount detected by the moving amount detecting unit. An imaging apparatus, an image processing method thereof, and a program for causing a computer to execute the method. Thus, when a face is detected from the captured image, a face movement amount that is a blur amount of the face area in the captured image and a background movement amount that is a blur amount of an area other than the face area are detected, and the detected face is detected. This brings about the effect of correcting the blur of the captured image based on the movement amount and the background movement amount.

また、この第1の側面において、上記移動量検出手段により検出された顔移動量および背景移動量に基づいて上記ブレ補正手段により補正される画像のブレの補正量を算出する補正量算出手段をさらに具備することができる。これにより、撮像画像から検出された顔移動量および背景移動量に基づいて、撮像画像のブレの補正量を算出するという作用をもたらす。この場合において、上記補正量算出手段は、上記移動量検出手段により検出された顔移動量および背景移動量と所定の重み付け係数とに基づいて上記補正量を算出することができる。これにより、撮像画像から検出された顔移動量および背景移動量と所定の重み付け係数とに基づいて、撮像画像のブレの補正量を算出するという作用をもたらす。この場合において、上記補正量算出手段は、上記移動量検出手段により検出された背景移動量に係る重み付け係数の値よりも上記移動量検出手段により検出された顔移動量に係る重み付け係数の値を大きくして上記補正量を算出することができる。これにより、背景移動量に係る重み付け係数の値よりも顔移動量に係る重み付け係数の値を大きくして、撮像画像のブレの補正量を算出するという作用をもたらす。   Further, in the first aspect, a correction amount calculating means for calculating a correction amount of an image blur to be corrected by the blur correction means based on the face movement amount and the background movement amount detected by the movement amount detection means. Furthermore, it can comprise. Accordingly, there is an effect of calculating a blur correction amount of the captured image based on the face movement amount and the background movement amount detected from the captured image. In this case, the correction amount calculation means can calculate the correction amount based on the face movement amount and background movement amount detected by the movement amount detection means and a predetermined weighting coefficient. This brings about the effect that the amount of blur correction of the captured image is calculated based on the face movement amount and background movement amount detected from the captured image and the predetermined weighting coefficient. In this case, the correction amount calculation means uses the weighting coefficient value related to the face movement amount detected by the movement amount detection means rather than the weighting coefficient value related to the background movement amount detected by the movement amount detection means. The correction amount can be calculated by increasing it. Thereby, the weighting coefficient value related to the face movement amount is made larger than the weighting coefficient value related to the background movement amount, and the blur correction amount of the captured image is calculated.

また、この第1の側面において、上記顔検出手段は、上記撮像手段により撮像された画像から検出された顔に関する各種情報を検出し、上記補正量算出手段は、上記顔検出手段により検出された顔に関する各種情報に基づいて上記重み付け係数を算出することができる。これにより、撮像画像から検出された顔に関する各種情報を検出し、検出された顔に関する各種情報に基づいて重み付け係数を算出するという作用をもたらす。この場合において、上記顔に関する各種情報は、顔領域の面積、顔領域の座標、顔らしさの値、顔の正面向きの度合い、顔の傾きの度合い、表情が笑っている度合い、表情が真剣な度合い、目を閉じている度合いの何れか1つの情報またはこれらを組み合わせた情報であることができる。これにより、顔領域の面積、顔領域の座標、顔らしさの値、顔の正面向きの度合い、顔の傾きの度合い、表情が笑っている度合い、表情が真剣な度合い、目を閉じている度合いの何れか1つの情報またはこれらを組み合わせた情報に基づいて重み付け係数を算出するという作用をもたらす。   In the first aspect, the face detection unit detects various information about the face detected from the image captured by the imaging unit, and the correction amount calculation unit is detected by the face detection unit. The weighting coefficient can be calculated based on various information regarding the face. Thereby, various information regarding the face detected from the captured image is detected, and the weighting coefficient is calculated based on the various information regarding the detected face. In this case, the various information regarding the face includes the area of the face area, the coordinates of the face area, the value of the face-likeness, the degree of face orientation, the degree of inclination of the face, the degree of facial expression laughing, and the expression is serious. It may be information on any one of the degree, the degree of closing the eyes, or information combining these. As a result, the area of the face area, the coordinates of the face area, the value of facialness, the degree of face orientation, the degree of inclination of the face, the degree of facial expression smiling, the degree of seriousness of facial expression, the degree of closed eyes This brings about the effect that the weighting coefficient is calculated based on any one piece of information or information obtained by combining these pieces of information.

また、この第1の側面において、上記補正量算出手段は、上記顔検出手段により検出された顔の領域付近における重み付け係数の値を大きくして上記補正量を算出することができる。これにより、撮影画像から検出された顔の領域付近における重み付け係数の値を大きくして、撮像画像のブレの補正量を算出するという作用をもたらす。   In the first aspect, the correction amount calculating means can calculate the correction amount by increasing the value of the weighting coefficient in the vicinity of the face area detected by the face detecting means. This brings about the effect of increasing the value of the weighting coefficient in the vicinity of the face area detected from the photographed image and calculating the blur correction amount of the captured image.

また、この第1の側面において、上記移動量検出手段は、上記顔検出手段により検出された顔が所定の領域に含まれるように上記撮像手段により撮像された画像を複数の領域に分割して当該顔が含まれる領域から顔移動量を検出して当該顔が含まれる領域以外の領域から背景移動量を検出することができる。これにより、撮像画像から検出された顔が所定の領域に含まれるようにその撮像画像を複数の領域に分割し、当該顔が含まれる領域から顔移動量を検出して当該顔が含まれる領域以外の領域から背景移動量を検出するという作用をもたらす。   In the first aspect, the movement amount detection unit divides the image captured by the imaging unit into a plurality of regions so that the face detected by the face detection unit is included in a predetermined region. The face movement amount can be detected from the area including the face, and the background movement amount can be detected from the area other than the area including the face. Thus, the captured image is divided into a plurality of regions so that the face detected from the captured image is included in the predetermined region, and the face movement amount is detected from the region including the face and the region including the face is included. The effect of detecting the amount of background movement from the other area is brought about.

また、この第1の側面において、上記撮像装置の振動によるブレ量を検出する振動検出手段をさらに具備し、上記ブレ補正手段は、上記移動量検出手段により検出された顔移動量および背景移動量と上記振動検出手段により検出されたブレ量とに基づいて上記撮像手段により撮像された画像のブレを補正することができる。これにより、検出された顔移動量および背景移動量と、撮像装置の振動によるブレ量とに基づいて、撮像画像のブレを補正するという作用をもたらす。   Further, in the first aspect, the image processing apparatus further includes vibration detection means for detecting a shake amount due to vibration of the imaging device, and the shake correction means includes the face movement amount and the background movement amount detected by the movement amount detection means. And the amount of blur detected by the vibration detecting means can correct the blur of the image captured by the imaging means. This brings about the effect | action of correcting the blurring of a captured image based on the detected face movement amount and background movement amount, and the blurring amount due to the vibration of the imaging device.

また、この第1の側面において、上記顔検出手段により検出された顔に関する各種情報に基づいて当該顔についてフォーカスが合っている度合いまたは露出が合っている度合いを検出するカメラ制御値検出手段をさらに具備し、上記補正量算出手段は、上記カメラ制御値検出手段により検出された顔についてのフォーカスが合っている度合いまたは露出が合っている度合いに基づいて当該顔に係る補正量を算出することができる。これにより、撮像画像から検出された顔についてのフォーカスが合っている度合いまたは露出が合っている度合いに基づいて当該顔に係る補正量を算出するという作用をもたらす。   In the first aspect, the camera control value detection unit further detects a degree of focus or exposure of the face based on various information about the face detected by the face detection unit. And the correction amount calculation means calculates the correction amount related to the face based on the degree of focus or the degree of exposure of the face detected by the camera control value detection means. it can. This brings about the effect that the correction amount related to the face is calculated based on the degree of focus or the degree of exposure of the face detected from the captured image.

また、この第1の側面において、上記撮像手段により撮像された画像から顔を検出するか否かを設定する設定手段をさらに具備することができる。これにより、撮像画像から顔を検出するか否かを設定し、顔移動量を考慮した撮像画像のブレ補正の有無を選択するという作用をもたらす。   In the first aspect, the image forming apparatus may further include setting means for setting whether or not to detect a face from the image picked up by the image pickup means. Thereby, whether or not to detect a face from the captured image is set, and the presence or absence of blur correction of the captured image in consideration of the face movement amount is selected.

また、この第1の側面において、特定の人物の顔に関する特定人物情報を記憶する特定人物記憶手段と、上記顔検出手段により検出された顔が上記特定人物記憶手段に記憶されている特定人物の顔と一致するか否かを判定する特定人物判定手段とをさらに具備し、上記補正量算出手段は、上記顔検出手段により検出された顔が上記特定人物記憶手段に記憶されている特定人物の顔と一致すると上記特定人物判定手段により判定された場合には当該特定人物の顔の領域であるか否かに応じて上記重み付け係数を変更して上記補正量を算出することができる。これにより、撮像画像から検出された顔が特定人物の顔と一致すると判定された場合には当該特定人物の顔の領域であるか否かに応じて重み付け係数を変更して、撮像画像のブレの補正量を算出するという作用をもたらす。   In the first aspect, the specific person storage means for storing specific person information relating to the face of the specific person, and the face detected by the face detection means are stored in the specific person storage means. Specific person determining means for determining whether or not the face matches the face, and the correction amount calculating means includes a specific person whose face detected by the face detecting means is stored in the specific person storing means. When it is determined by the specific person determination means that the face matches, the correction amount can be calculated by changing the weighting coefficient according to whether or not the area is the face of the specific person. As a result, when it is determined that the face detected from the captured image matches the face of the specific person, the weighting coefficient is changed depending on whether or not the face area of the specific person is, and blurring of the captured image is performed. The correction amount is calculated.

また、この第1の側面において、上記補正量算出手段は、上記移動量検出手段により検出された顔移動量の平均値である第1平均値を算出して当該第1平均値に基づいて上記顔検出手段により検出された顔の領域に係る補正量を算出するとともに上記移動量検出手段により検出された背景移動量の平均値である第2平均値を算出して当該第2平均値に基づいて上記顔検出手段により検出された顔の領域以外の領域に係る補正量を算出することができる。これにより、検出された顔移動量の平均値を算出してその平均値に基づいて顔の領域に係る補正量を算出するとともに、検出された背景移動量の平均値を算出してその平均値に基づいて顔の領域以外の領域に係る補正量を算出するという作用をもたらす。   In the first aspect, the correction amount calculation unit calculates a first average value that is an average value of the face movement amount detected by the movement amount detection unit, and calculates the first average value based on the first average value. Based on the second average value by calculating a correction amount related to the face area detected by the face detection means and calculating a second average value that is an average value of the background movement amounts detected by the movement amount detection means. Thus, it is possible to calculate a correction amount relating to an area other than the face area detected by the face detecting means. Thus, the average value of the detected face movement amount is calculated, the correction amount related to the face area is calculated based on the average value, and the average value of the detected background movement amount is calculated and the average value The correction amount relating to the area other than the face area is calculated based on the above.

また、この第1の側面において、上記補正量算出手段は、上記顔検出手段により複数の顔が検出された場合には上記検出された顔の領域毎に顔移動量の平均値を算出して当該平均値に基づいて上記補正量を算出することができる。これにより、複数の顔が検出された場合には、顔の領域毎に顔移動量の平均値を算出して、その平均値に基づいて顔の領域毎に補正量を算出するという作用をもたらす。   In the first aspect, the correction amount calculating means calculates an average value of face movement amounts for each detected face area when the face detecting means detects a plurality of faces. The correction amount can be calculated based on the average value. Thereby, when a plurality of faces are detected, the average value of the face movement amount is calculated for each face region, and the correction amount is calculated for each face region based on the average value. .

また、この第1の側面において、上記ブレ補正手段は、上記撮像手段により撮像された画像において上記顔検出手段により検出された顔の領域が当該画像の中央寄りに移動するように当該画像のブレを補正することができる。これにより、撮像画像において検出された顔の領域が画像の中央寄りに移動するように撮像画像のブレを補正するという作用をもたらす。   Further, in this first aspect, the blur correction unit causes the blur of the image so that the face area detected by the face detection unit moves closer to the center of the image in the image captured by the imaging unit. Can be corrected. This brings about the effect of correcting the blur of the captured image so that the face area detected in the captured image moves closer to the center of the image.

また、この第1の側面において、上記移動量検出手段は、上記撮像手段により撮像された画像において上記顔検出手段により検出された顔と当該画像の所定時間前に撮像された画像において上記顔検出手段により検出された顔との相関性の高さに基づいて当該顔の領域に係る顔移動量を検出することができる。これにより、撮像画像において検出された顔と当該画像の所定時間前に撮像された画像において検出された顔との相関性の高さに基づいて当該顔の領域の顔移動量を検出するという作用をもたらす。   Further, in this first aspect, the movement amount detection unit is configured to detect the face in an image captured by the face detection unit in an image captured by the imaging unit and an image captured before a predetermined time of the image. Based on the high correlation with the face detected by the means, it is possible to detect the face movement amount related to the face area. Accordingly, the face movement amount of the face area is detected based on the high degree of correlation between the face detected in the captured image and the face detected in the image captured a predetermined time before the image. Bring.

また、本発明の第2の側面は、画像を入力する画像入力手段と、上記画像入力手段により入力された画像から顔を検出する顔検出手段と、上記画像入力手段により入力された画像における上記顔検出手段により検出された顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出する移動量検出手段と、上記移動量検出手段により検出された顔移動量および背景移動量に基づいて上記画像入力手段により入力された画像のブレを補正するブレ補正手段とを具備することを特徴とする画像処理装置、およびその画像処理方法ならびに当該方法をコンピュータに実行させるプログラムである。これにより、入力画像から顔を検出すると、入力画像における顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出し、検出された顔移動量および背景移動量に基づいて入力画像のブレを補正するという作用をもたらす。   According to a second aspect of the present invention, there is provided an image input means for inputting an image, a face detection means for detecting a face from the image input by the image input means, and the image in the image input by the image input means. A movement amount detection means for detecting a face movement amount that is a blur amount of a face area detected by the face detection means and a background movement amount that is a blur amount of an area other than the face area; and the movement amount detection means. An image processing apparatus comprising: a blur correction unit that corrects a blur of an image input by the image input unit based on the detected face movement amount and background movement amount; A program that causes a computer to execute a method. Thus, when a face is detected from the input image, a face movement amount that is a blur amount of the face area in the input image and a background movement amount that is a blur amount of an area other than the face area are detected, and the detected face is detected. This provides an effect of correcting the blurring of the input image based on the movement amount and the background movement amount.

本発明によれば、画像に含まれるブレを適切に補正することができるという優れた効果を奏し得る。   According to the present invention, it is possible to achieve an excellent effect that blur included in an image can be corrected appropriately.

次に本発明の実施の形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の実施の形態における撮像装置100の機能構成例を示すブロック図である。撮像装置100として、デジタルスチルカメラやデジタルビデオカメラ等の撮像装置、または、携帯電話やパーソナルコンピュータ等の端末装置に付属するカメラ等の撮像装置が例として挙げられる。   FIG. 1 is a block diagram illustrating a functional configuration example of an imaging apparatus 100 according to an embodiment of the present invention. Examples of the imaging device 100 include an imaging device such as a digital still camera or a digital video camera, or an imaging device such as a camera attached to a terminal device such as a mobile phone or a personal computer.

撮像装置100は、制御部110と、撮像部120と、信号処理部130と、画像記憶部140と、画像圧縮伸張部150と、ユーザインターフェース160と、入出力端子170と、記憶媒体180と、バス190と、振動センサ200と、メモリ210と、顔検出部300と、動きベクトル検出部400と、ブレ補正部410とを備える。なお、各ブロック間における画像信号の送受信は、直接のやりとり、または、画像記憶部140またはバス190を経由したやりとりによって行われる。   The imaging apparatus 100 includes a control unit 110, an imaging unit 120, a signal processing unit 130, an image storage unit 140, an image compression / decompression unit 150, a user interface 160, an input / output terminal 170, a storage medium 180, A bus 190, a vibration sensor 200, a memory 210, a face detection unit 300, a motion vector detection unit 400, and a shake correction unit 410 are provided. Note that transmission / reception of image signals between the blocks is performed by direct exchange or exchange via the image storage unit 140 or the bus 190.

制御部110は、メモリ(図示せず)に格納されている各種制御プログラムに基づいて撮像装置100の各部を制御する制御部である。   The control unit 110 is a control unit that controls each unit of the imaging apparatus 100 based on various control programs stored in a memory (not shown).

撮像部120は、光学系121および撮像素子122を備え、被写体からの入射光を電気信号に光電変換し、光電変換された電気信号を信号処理部130に出力するものである。光学系121は、フォーカスレンズ、ズームレンズ、ブレ補正用レンズ、ブレ補正用プリズム等のレンズ群を備え、これらのレンズ群を介して入力された被写体からの入射光を撮像素子122に出力するものである。撮像素子122は、光学系121から出力された入射光を光電変換し、光電変換された電気信号を信号処理部130に出力するものである。なお、撮像部120において、ブレ補正用レンズの移動または傾き、ブレ補正用プリズムの変形や傾き、撮像素子122の移動等をすることによって、検出されたブレを光学的に補正することができる。これらは、制御部110からの制御に基づいて実行される。   The imaging unit 120 includes an optical system 121 and an imaging element 122, and photoelectrically converts incident light from a subject into an electrical signal and outputs the photoelectrically converted electrical signal to the signal processing unit 130. The optical system 121 includes a lens group such as a focus lens, a zoom lens, a blur correction lens, and a blur correction prism, and outputs incident light from a subject input through these lens groups to the image sensor 122. It is. The image sensor 122 photoelectrically converts incident light output from the optical system 121 and outputs the photoelectrically converted electric signal to the signal processing unit 130. In the imaging unit 120, the detected blur can be optically corrected by moving or tilting the blur correction lens, deforming or tilting the blur correction prism, moving the image sensor 122, or the like. These are executed based on control from the control unit 110.

信号処理部130は、撮像素子122から出力された電気信号に対して各種の信号処理を施し、信号処理が施された画像データを画像記憶部140と画像圧縮伸張部150とユーザインターフェース160と顔検出部300とに出力するものである。信号処理部130における信号処理として、ノイズ軽減処理、レベル補正処理、A/D変換処理および色彩補正処理等の信号処理がある。また、信号処理部130は、制御部110の指示に基づいて各部から入力された画像に対して各種の画像処理を実行する。   The signal processing unit 130 performs various types of signal processing on the electrical signal output from the image sensor 122, and the image data subjected to the signal processing is stored in the image storage unit 140, the image compression / decompression unit 150, the user interface 160, and the face. This is output to the detection unit 300. Signal processing in the signal processing unit 130 includes signal processing such as noise reduction processing, level correction processing, A / D conversion processing, and color correction processing. In addition, the signal processing unit 130 performs various image processing on the image input from each unit based on an instruction from the control unit 110.

画像記憶部140は、撮像装置100において処理対象となる画像データを記憶するものである。   The image storage unit 140 stores image data to be processed in the imaging apparatus 100.

画像圧縮伸張部150は、入力された各種画像データを各画像処理に応じて圧縮または伸張するものである。例えば、画像圧縮伸張部150により圧縮処理が施された画像データが記憶媒体180に出力されて記憶媒体180に記録される。また、画像圧縮伸張部150により伸張処理が施された画像データが画像記憶部140、表示部161、顔検出部300に出力される。なお、圧縮形式として、例えばJPEG(Joint Photographic Experts Group)形式を採用することができる。   The image compression / decompression unit 150 compresses or decompresses various input image data according to each image processing. For example, the image data subjected to the compression processing by the image compression / decompression unit 150 is output to the storage medium 180 and recorded on the storage medium 180. Further, the image data subjected to the decompression process by the image compression / decompression unit 150 is output to the image storage unit 140, the display unit 161, and the face detection unit 300. As a compression format, for example, a JPEG (Joint Photographic Experts Group) format can be adopted.

ユーザインターフェース160は、表示部161と選択受付部162とを備え、撮像装置100を使用するユーザに対するインターフェースを提供するものである。   The user interface 160 includes a display unit 161 and a selection receiving unit 162, and provides an interface for a user who uses the imaging apparatus 100.

表示部161は、信号処理部130または画像圧縮伸張部150が出力した画像データに対応する画像を表示する表示部である。表示部161は、例えば、撮像装置100が撮像する被写体の画像である撮影画像を表示する。   The display unit 161 is a display unit that displays an image corresponding to the image data output from the signal processing unit 130 or the image compression / decompression unit 150. The display unit 161 displays, for example, a captured image that is an image of a subject captured by the imaging device 100.

選択受付部162は、ユーザが入力した選択情報を電気信号に変換し、変換された電気信号を制御部110に出力するものである。例えば、撮像部120が出力した撮影画像から顔検出部300が顔を検出した場合には、その撮影画像について検出された顔に基づくブレ補正処理を撮像装置100が実行する。このように、撮影画像に顔が含まれている場合において、その顔に基づくブレ補正処理を実行するように設定(ON設定)することができるとともに、その顔に基づくブレ補正処理を実行しない設定(OFF設定)をすることができる。このON、OFF設定を選択受付部162において行う。   The selection receiving unit 162 converts selection information input by the user into an electric signal and outputs the converted electric signal to the control unit 110. For example, when the face detection unit 300 detects a face from the captured image output from the imaging unit 120, the imaging apparatus 100 executes a shake correction process based on the face detected for the captured image. As described above, when a captured image includes a face, it is possible to set (ON setting) to execute the shake correction process based on the face, and to not execute the shake correction process based on the face. (OFF setting) can be performed. The ON / OFF setting is performed in the selection receiving unit 162.

なお、ユーザインターフェース160は、例えば、タッチパネルとして表示部161と選択受付部162とが一体で構成するようにしてもよく、表示部161を液晶ディスプレイ(LCD)とし、選択受付部162をハードキーとして双方を別体で構成するようにしてもよい。   In addition, the user interface 160 may be configured such that the display unit 161 and the selection receiving unit 162 are integrated as a touch panel, for example. The display unit 161 is a liquid crystal display (LCD), and the selection receiving unit 162 is a hard key. You may make it comprise both separately.

入出力端子170は、画像圧縮伸張部150が出力した画像データを外部記憶媒体等の外部装置に出力するとともに、外部記憶媒体から入力された画像データを画像圧縮伸張部150に出力する入出力端子である。   The input / output terminal 170 outputs the image data output from the image compression / decompression unit 150 to an external device such as an external storage medium, and outputs the image data input from the external storage medium to the image compression / decompression unit 150. It is.

記憶媒体180は、画像圧縮伸張部150が出力した画像データを記憶するとともに、記憶されている画像データを画像圧縮伸張部150に出力する画像記憶媒体である。なお、画像記憶媒体としては、磁気ディスク、光ディスク、半導体記憶媒体、磁気テープ等の画像記憶媒体がある。また、画像記憶媒体は、外部取り外しの可能な記憶媒体および内蔵の記憶媒体の少なくとも何れか一方である。   The storage medium 180 is an image storage medium that stores the image data output from the image compression / decompression unit 150 and outputs the stored image data to the image compression / decompression unit 150. Examples of the image storage medium include an image storage medium such as a magnetic disk, an optical disk, a semiconductor storage medium, and a magnetic tape. The image storage medium is at least one of an externally removable storage medium and a built-in storage medium.

バス190は、画像データを伝達するための共有バスである。   The bus 190 is a shared bus for transmitting image data.

振動センサ200は、撮像装置100の振動を検出し、画像に依存しないブレ成分(すなわち、撮像装置100本体のブレ成分)を検出するものであり、検出された各種情報を制御部110に出力する。振動センサ200は、例えばジャイロセンサ、速度センサ、加速度センサにより実現することができる。   The vibration sensor 200 detects vibration of the imaging apparatus 100 and detects a blur component that does not depend on an image (that is, a blur component of the main body of the imaging apparatus 100), and outputs various detected information to the control unit 110. . The vibration sensor 200 can be realized by, for example, a gyro sensor, a speed sensor, or an acceleration sensor.

メモリ210は、各種情報を記憶する揮発/不揮発性の記憶媒体である。   The memory 210 is a volatile / nonvolatile storage medium that stores various types of information.

顔検出部300は、入力された画像データに対応する画像に含まれる人の顔を検出するものである。なお、顔検出部300の詳細については、図2を参照して説明する。   The face detection unit 300 detects a human face included in an image corresponding to input image data. Details of the face detection unit 300 will be described with reference to FIG.

動きベクトル検出部400は、入力された画像データに対応する画像について分割された各ブロックの動きベクトルを画像処理によって検出し、検出された動きベクトルに対応する値を制御部110に出力するものである。   The motion vector detection unit 400 detects a motion vector of each block divided for an image corresponding to input image data by image processing, and outputs a value corresponding to the detected motion vector to the control unit 110. is there.

ブレ補正部410は、動きベクトル検出部400が検出した動きベクトルに基づいて算出されるブレ補正量等に基づいて、入力された画像データに対応する画像の位置を移動させて、その画像のブレを補正するものである。なお、ブレ補正部410は、電子的ブレ補正手段および光学的ブレ補正手段を有する。これらの詳細については、図14を参照して説明する。   The blur correction unit 410 moves the position of the image corresponding to the input image data based on the blur correction amount calculated based on the motion vector detected by the motion vector detection unit 400, and blurs the image. Is to correct. Note that the blur correction unit 410 includes an electronic blur correction unit and an optical blur correction unit. Details thereof will be described with reference to FIG.

なお、ブレ補正部410によりブレが補正された画像が画像圧縮伸張部150に出力される。そして、画像圧縮伸張部150は、ブレが補正された画像に対して画像圧縮処理を施し、画像圧縮処理が施された画像を記憶媒体180に記録する。また、ブレが補正された画像が表示部161に表示される。   Note that an image whose blur is corrected by the blur correction unit 410 is output to the image compression / decompression unit 150. Then, the image compression / decompression unit 150 performs image compression processing on the image whose blurring has been corrected, and records the image subjected to the image compression processing in the storage medium 180. In addition, an image whose blur is corrected is displayed on the display unit 161.

図2は、顔検出部300の機能構成例を示すブロック図である。   FIG. 2 is a block diagram illustrating a functional configuration example of the face detection unit 300.

顔検出部300は、制御部310と、画像入力部320と、画像拡大縮小部330と、画像保持部340と、基準データ保持部350と、判定部360と、検出結果出力部370と、画像出力部380とを備える。   The face detection unit 300 includes a control unit 310, an image input unit 320, an image enlargement / reduction unit 330, an image holding unit 340, a reference data holding unit 350, a determination unit 360, a detection result output unit 370, an image And an output unit 380.

制御部310は、制御部110からの指示に従って顔検出部300の各部を制御するものである。   The control unit 310 controls each unit of the face detection unit 300 in accordance with instructions from the control unit 110.

画像入力部320は、信号処理部130、画像記憶部140、画像圧縮伸張部150の何れかから画像データが入力されると、入力された画像データを画像拡大縮小部330に出力するものである。   When image data is input from any of the signal processing unit 130, the image storage unit 140, and the image compression / decompression unit 150, the image input unit 320 outputs the input image data to the image enlargement / reduction unit 330. .

画像拡大縮小部330は、画像入力部320が出力した画像データに対応する画像に対して、顔の検出に適する画像に拡大または縮小処理を実行するものである。なお、画像の拡大率または縮小率は、制御部110からの指示に基づいて決定される。   The image enlargement / reduction unit 330 performs an enlargement or reduction process on an image suitable for face detection on the image corresponding to the image data output from the image input unit 320. The image enlargement ratio or reduction ratio is determined based on an instruction from the control unit 110.

画像保持部340は、画像拡大縮小部330が拡大または縮小処理をした画像を保持するものである。   The image holding unit 340 holds an image that has been enlarged or reduced by the image enlargement / reduction unit 330.

基準データ保持部350は、顔検出に用いる顔の基準データを保持するものであり、保持している顔の基準データを判定部360に出力する。ここで基準となる顔データは、例えば、顔画像そのもの、人の顔としての特徴データベース、特定の人物の顔に関する特徴データベース等である。一般に、顔画像そのものよりも特徴データの方が、多くの顔データベースを比較的少ない記憶容量で保持することができる。   The reference data holding unit 350 holds face reference data used for face detection, and outputs the held face reference data to the determination unit 360. Here, the reference face data is, for example, a face image itself, a feature database as a human face, a feature database related to a specific person's face, or the like. In general, the feature data can hold many face databases with a relatively small storage capacity than the face image itself.

判定部360は、画像保持部340に保持されている画像データに対応する画像に顔が含まれているか否かを判定するものであり、判定結果を検出結果出力部370に出力する。具体的には、判定部360は、画像保持部340に保持されている画像データに対応する画像を一定のウィンドウサイズで部分的に取り出し、取り出された画像と、基準データ保持部350に保持されている顔データとの相関性の高さに基づいて、取り出された画像が顔画像であるか否かを判定する。これらの判定を繰り返し実行し、画像保持部340に保持されている画像データに対応する画像に顔が含まれているか否かを判定する。   The determination unit 360 determines whether or not a face is included in the image corresponding to the image data held in the image holding unit 340, and outputs the determination result to the detection result output unit 370. Specifically, the determination unit 360 partially extracts an image corresponding to the image data stored in the image storage unit 340 with a certain window size, and stores the extracted image and the reference data storage unit 350. Whether or not the extracted image is a face image is determined based on the high correlation with the face data. These determinations are repeatedly executed to determine whether or not a face is included in the image corresponding to the image data held in the image holding unit 340.

また、判定部360は、基準データ保持部350に保持されている顔データとの相関性の高さに基づいて、画像保持部340に保持されている画像データに対応する画像に含まれている顔に関する各種情報を抽出し、抽出された各種情報を顔検出結果として検出結果出力部370に出力する。   Further, the determination unit 360 is included in the image corresponding to the image data held in the image holding unit 340 based on the high degree of correlation with the face data held in the reference data holding unit 350. Various information about the face is extracted, and the extracted various information is output to the detection result output unit 370 as a face detection result.

検出結果出力部370は、判定部360が出力した判定結果および顔検出結果を受け取ると、受け取った判定結果および顔検出結果を制御部110に出力するものである。   When the detection result output unit 370 receives the determination result and the face detection result output from the determination unit 360, the detection result output unit 370 outputs the received determination result and face detection result to the control unit 110.

画像出力部380は、画像保持部340に保持されている画像を画像記憶部140に出力するものである。   The image output unit 380 outputs the image held in the image holding unit 340 to the image storage unit 140.

ここで、顔検出部300が出力する顔検出結果の値について説明する。   Here, the value of the face detection result output by the face detection unit 300 will be described.

顔検出部300が出力する顔検出結果の値として、以下に示す(1)乃至(6)等の顔領域に関する評価値がある。
(1)顔の面積の大小(カメラからの距離)
(2)顔の位置(画像中心からの距離)
(3)顔らしさの値
(4)顔の横向きの度合い(正面方向、上下左右何れかの方向)
(5)顔の傾きの度合い(首をかしげている)
(6)顔の上下左右
As face detection result values output by the face detection unit 300, there are evaluation values related to face areas such as (1) to (6) shown below.
(1) Face size (distance from camera)
(2) Face position (distance from image center)
(3) Face-like value (4) Lateral degree of face (front direction, up / down / left / right direction)
(5) Degree of face inclination (the neck is bent)
(6) Up / Down / Left / Right

また、(1)乃至(6)以外の顔検出結果の値として、以下に示す(7)乃至(9)等の顔の表情や顔の一部分の状態等に関する評価値がある。
(7)笑顔の度合い
(8)真顔(真剣な顔)の度合い
(9)目が閉じている(まばたきをしている)度合い
In addition, as face detection result values other than (1) to (6), there are evaluation values related to facial expressions, face states, etc., such as (7) to (9) shown below.
(7) Degree of smile (8) Degree of serious face (serious face) (9) Degree of eyes closed (winning)

これらの顔領域に関する評価値等を用いて、動きベクトルについての重み付け係数等を算出することができる。   A weighting coefficient or the like for a motion vector can be calculated using an evaluation value or the like related to these face regions.

図3は、本発明の実施の形態における撮像装置100における画像のブレ補正に関する機能構成例を示すブロック図である。   FIG. 3 is a block diagram illustrating a functional configuration example related to image blur correction in the imaging apparatus 100 according to the embodiment of the present invention.

撮像装置100は、画像入力部420と、顔検出部300と、動きベクトル検出部400と、ブレ補正部410と、画像出力部430と、補正量算出部440と、選択受付部162とを備える。   The imaging apparatus 100 includes an image input unit 420, a face detection unit 300, a motion vector detection unit 400, a shake correction unit 410, an image output unit 430, a correction amount calculation unit 440, and a selection reception unit 162. .

画像入力部420は、画像を入力するものであり、入力された画像を顔検出部300と、動きベクトル検出部400と、ブレ補正部410とに出力するものである。   The image input unit 420 inputs an image, and outputs the input image to the face detection unit 300, the motion vector detection unit 400, and the shake correction unit 410.

顔検出部300は、図1および図2で示した顔検出部300と同じものであり、画像入力部420が出力した画像から顔を検出するものであり、検出結果等を動きベクトル検出部400と補正量算出部440とに出力するものである。また、顔検出部300は、撮影画像に含まれる顔に基づくブレ補正処理についてON設定が選択受付部162から出力された場合には顔検出処理を実行し、一方、OFF設定が出力された場合には顔検出処理を実行しない。   The face detection unit 300 is the same as the face detection unit 300 shown in FIGS. 1 and 2, detects a face from the image output from the image input unit 420, and uses the detection result as the motion vector detection unit 400. And the correction amount calculation unit 440. Further, the face detection unit 300 executes the face detection process when the ON setting is output from the selection receiving unit 162 for the shake correction process based on the face included in the photographed image, and when the OFF setting is output. No face detection process is executed.

動きベクトル検出部400は、画像入力部420が出力した画像について画像処理によって動きベクトルを検出し、検出された動きベクトルを補正量算出部440に出力するものである。なお、動きベクトル検出部400が検出する動きベクトルについては、図4乃至図14等を用いて詳細に説明する。   The motion vector detection unit 400 detects a motion vector for the image output from the image input unit 420 by image processing, and outputs the detected motion vector to the correction amount calculation unit 440. The motion vector detected by the motion vector detection unit 400 will be described in detail with reference to FIGS.

補正量算出部440は、顔検出部300が検出した顔に関する各種情報等に基づいて、動きベクトル検出部400が出力した動きベクトルに重み付け処理を施してブレ補正量を算出し、算出されたブレ補正量をブレ補正部410に出力するものである。なお、補正量算出部440が算出するブレ補正量については、図4乃至図14等を用いて詳細に説明する。   The correction amount calculation unit 440 calculates a shake correction amount by applying a weighting process to the motion vector output from the motion vector detection unit 400 based on various information about the face detected by the face detection unit 300, and the like. The correction amount is output to the blur correction unit 410. Note that the blur correction amount calculated by the correction amount calculation unit 440 will be described in detail with reference to FIGS.

ブレ補正部410は、補正量算出部440が出力したブレ補正量に基づいて、画像入力部420が出力した画像の位置を移動させて、その画像のブレを補正するものである。   The blur correction unit 410 moves the position of the image output by the image input unit 420 based on the blur correction amount output by the correction amount calculation unit 440 and corrects the blur of the image.

画像出力部430は、ブレ補正部410によりブレが補正された画像を出力するものである。画像出力部430は、例えば、撮影画像を表示する表示部161に対応する。また、例えば、撮影画像に対応する画像データを、撮影画像を表示する他の外部装置に出力する入出力端子170に対応する。なお、撮影画像に対応する画像データを記憶媒体180等の画像記憶媒体に出力してその外部装置に撮影画像を記憶させるようにすることができる。   The image output unit 430 outputs an image whose shake has been corrected by the shake correction unit 410. The image output unit 430 corresponds to, for example, the display unit 161 that displays a captured image. For example, it corresponds to an input / output terminal 170 that outputs image data corresponding to a captured image to another external apparatus that displays the captured image. Note that image data corresponding to a captured image can be output to an image storage medium such as the storage medium 180 and the captured image can be stored in the external device.

選択受付部162は、図1で示した選択受付部162と同じものであり、ユーザにより入力された顔のブレ補正に関するON設定またはOFF設定に関する選択情報を顔検出部300に出力するものである。   The selection receiving unit 162 is the same as the selection receiving unit 162 shown in FIG. 1, and outputs selection information related to ON setting or OFF setting related to face blur correction input by the user to the face detection unit 300. .

次に、動きベクトルの検出方法の一つとして、ブロックマッチング方式の画像処理による動きベクトル検出方法について図面を参照して説明する。   Next, as one of motion vector detection methods, a motion vector detection method using block matching image processing will be described with reference to the drawings.

図4は、動きベクトル検出部400がブロックマッチング方式の画像処理によって撮影画像から動きベクトルを検出する場合における画像分割の一例を示す図である。   FIG. 4 is a diagram illustrating an example of image division in the case where the motion vector detection unit 400 detects a motion vector from a captured image by block matching image processing.

ブロックマッチング方式の画像処理による動きベクトル検出方法とは、図4に示すように、動画像を構成する時間的に連続するフレーム画像(画像500)を小さなブロックに分割し、分割されたブロックと似ている画像ブロックが前フレームのどこにあるかを探索し、探索結果に基づいて分割された各ブロックにおける動きベクトルを検出する方法である。   As shown in FIG. 4, the motion vector detection method based on block matching image processing divides a temporally continuous frame image (image 500) constituting a moving image into small blocks, which are similar to the divided blocks. This is a method of searching where the current image block is in the previous frame and detecting a motion vector in each block divided based on the search result.

具体的に、動きベクトル検出部400がブロックマッチング方式の画像処理によって画像500から動きベクトルを検出する場合には、画像500を複数の領域に分割する。例えば、最も簡易な画像分割は画像の縦横を等分する分割であり、図4に示すように、画像500を16分割にすることができる。また、分割された画像における各領域においてターゲットブロックが配置され、配置された各ターゲットブロックに対して、想定される最大の動き量の大きさにサーチ範囲が設定される。そして、設定されたサーチ範囲内でターゲットブロックにより動きベクトルが算出される。例えば、図4に示すように、画像500が16分割された各領域においてターゲットブロック501、503乃至517が配置され、各ターゲットブロックに対してサーチ範囲が設けられる。なお、ターゲットブロックは、サーチ範囲内においてサーチ対象となるものを探索する領域であり、例えば、ターゲットブロック501はサーチ範囲502内を探索する。   Specifically, when the motion vector detection unit 400 detects a motion vector from the image 500 by block matching image processing, the image 500 is divided into a plurality of regions. For example, the simplest image division is a division that equally divides the image vertically and horizontally, and the image 500 can be divided into 16 as shown in FIG. In addition, target blocks are arranged in each region in the divided image, and a search range is set to the maximum amount of motion assumed for each arranged target block. Then, a motion vector is calculated by the target block within the set search range. For example, as shown in FIG. 4, target blocks 501, 503 to 517 are arranged in each region obtained by dividing an image 500 into 16 parts, and a search range is provided for each target block. The target block is an area for searching for a search target within the search range. For example, the target block 501 searches the search range 502.

図5は、動きベクトル検出部400がブロックマッチング方式の画像処理によって撮影画像から動きベクトルを検出する場合における前フレーム540と現フレーム550との関係の一例を示す図である。   FIG. 5 is a diagram illustrating an example of the relationship between the previous frame 540 and the current frame 550 when the motion vector detection unit 400 detects a motion vector from a captured image by block matching image processing.

前フレーム540および現フレーム550は、動画像を構成する時間的に連続するフレーム画像のうちの現フレームおよび所定時間前の前フレームである。なお、前フレーム540にはターゲットブロック541が配置される。また、現フレーム550においては、ターゲットブロック541が配置された同座標にターゲットブロック551が射影され、ターゲットブロック551の周辺にサーチ範囲552が設定される。なお、図5に示す前フレーム540、現フレーム550、およびこれらに含まれるターゲットブロック、サーチ範囲等については、説明のため拡大等をして示している。また、各サーチ範囲は重複して設定されるようにしてもよい。   The previous frame 540 and the current frame 550 are the current frame and the previous frame of a predetermined time before the temporally continuous frame images constituting the moving image. Note that a target block 541 is disposed in the previous frame 540. In the current frame 550, the target block 551 is projected to the same coordinates where the target block 541 is arranged, and a search range 552 is set around the target block 551. It should be noted that the previous frame 540 and the current frame 550 shown in FIG. 5 and the target blocks, search range, and the like included in these are enlarged for explanation. Further, each search range may be set overlappingly.

続いて、現フレーム550に設定されたサーチ範囲552においてターゲットブロック551を移動させる。例えば、サーチ範囲552において領域551a乃至551c等を移動させる。そして、サーチ範囲552において、前フレーム540に含まれるターゲットブロック541と最も相関の高い領域を探索する。例えば、サーチ範囲552においてターゲットブロック541と最も相関の高い領域を領域553とする。   Subsequently, the target block 551 is moved in the search range 552 set in the current frame 550. For example, the areas 551a to 551c and the like are moved in the search range 552. Then, in the search range 552, an area having the highest correlation with the target block 541 included in the previous frame 540 is searched. For example, a region having the highest correlation with the target block 541 in the search range 552 is set as a region 553.

そして、この探索の結果、サーチ範囲552において、ターゲットブロック541と最も相関の高い領域が検出された場合には、前フレーム540に含まれるターゲットブロック541が、現フレーム550のサーチ範囲552において検出された領域553の位置に動いたと推定する。そして、現フレーム550に設定されたサーチ範囲552においてターゲットブロック551と領域553との位置関係に基づいて、動きベクトル554が求められる。このように、ブロックマッチング方式の画像処理による動きベクトルの検出方法では、1つのターゲットブロックに対して1つの動きベクトルを算出する。つまり、分割されたブロック単位で、フレーム間の相関判定(マッチング判定)処理を行い、ブロック毎に動きベクトルを求める。   As a result of this search, when a region having the highest correlation with the target block 541 is detected in the search range 552, the target block 541 included in the previous frame 540 is detected in the search range 552 of the current frame 550. It is estimated that the position has moved to the position of the area 553. Then, based on the positional relationship between the target block 551 and the region 553 in the search range 552 set in the current frame 550, a motion vector 554 is obtained. In this way, in the motion vector detection method using block matching image processing, one motion vector is calculated for one target block. That is, correlation determination (matching determination) processing between frames is performed for each divided block, and a motion vector is obtained for each block.

なお、図4に示すように、1つの画像500については、各ターゲットブロックにおける動きベクトルが検出され、検出された動きベクトルに所定の平均化処理が施されて、1つの画像500における1つのグローバルな動きベクトルが検出される。また、各ターゲットブロックにおいて検出された動きベクトルに重み付け処理が施され、各ターゲットブロックについてのローカルな動きベクトルが検出される。   As shown in FIG. 4, for one image 500, a motion vector in each target block is detected, a predetermined averaging process is performed on the detected motion vector, and one global in one image 500 is detected. Simple motion vectors are detected. In addition, the motion vector detected in each target block is weighted, and a local motion vector for each target block is detected.

ここで、図4に示すように、画像500に人間601の顔602が含まれている場合において、顔検出部300によって顔602の顔領域603が検出されている場合を考える。例えば、図4に示すように、顔検出部300によって検出された顔領域603がターゲットブロック511に含まれている場合には、顔領域603を含むターゲットブロック511についての動きベクトルを検出する。このように、顔領域603について1つの動きベクトルを検出することができるため、例えば、人間601が移動しているような場合であっても、顔領域603についての適切な動きベクトルを検出することができる。   Here, as shown in FIG. 4, a case where the face area 603 of the face 602 is detected by the face detection unit 300 when the face 602 of the person 601 is included in the image 500 will be considered. For example, as illustrated in FIG. 4, when a face area 603 detected by the face detection unit 300 is included in the target block 511, a motion vector for the target block 511 including the face area 603 is detected. As described above, since one motion vector can be detected for the face area 603, for example, even when the human 601 is moving, an appropriate motion vector for the face area 603 is detected. Can do.

これに対して、図6(a)に示すように、画像560に人間604の顔605が含まれている場合において、顔検出部300によって顔605の顔領域606が検出され、画像560が16分割されている場合を考える。この場合には、顔検出部300によって検出された顔領域606が、1つのターゲットブロックに含まれておらず、複数のターゲットブロック563乃至566に含まれている。そうすると、顔領域606を含む複数のターゲットブロック563乃至566のそれぞれについての動きベクトルが検出される。このため、例えば、人間604が移動しているような場合には、適切な動きベクトルを検出することができない場合がある。そこで、本発明の実施の形態では、動きベクトル検出部400が撮影画像から動きベクトルを検出する場合において、顔検出部300によって検出された顔領域に基づいて撮影画像を分割して動きベクトルを検出する。   On the other hand, as shown in FIG. 6A, when the face 605 of the person 604 is included in the image 560, the face area 606 of the face 605 is detected by the face detection unit 300, and the image 560 becomes 16 Consider the case where it is divided. In this case, the face area 606 detected by the face detection unit 300 is not included in one target block, but is included in a plurality of target blocks 563 to 566. Then, motion vectors for each of the plurality of target blocks 563 to 566 including the face area 606 are detected. For this reason, for example, when the person 604 is moving, an appropriate motion vector may not be detected. Therefore, in the embodiment of the present invention, when the motion vector detection unit 400 detects a motion vector from the captured image, the captured image is divided based on the face area detected by the face detection unit 300 to detect the motion vector. To do.

図6は、動きベクトル検出部400がブロックマッチング方式の画像処理によって撮影画像から動きベクトルを検出する場合における画像分割の例を示す図である。   FIG. 6 is a diagram illustrating an example of image division when the motion vector detection unit 400 detects a motion vector from a captured image by block matching image processing.

図6(a)は、図4に示す画像500と同様に、画像560を16分割する場合の画像分割例を示す図である。このように、人間604が含まれている画像560について、顔検出部300によって検出された顔領域606を考慮せずに分割した場合には、顔領域606が複数のターゲットブロック563乃至566に含まれることになる。   FIG. 6A is a diagram illustrating an example of image division in the case where the image 560 is divided into 16 as in the case of the image 500 illustrated in FIG. 4. As described above, when the image 560 including the person 604 is divided without considering the face area 606 detected by the face detection unit 300, the face area 606 is included in the plurality of target blocks 563 to 566. Will be.

図6(b)は、顔検出部300によって検出された顔領域606に基づいて、画像560を9分割する場合の画像分割例を示す図である。このように、人間604が含まれている画像560について、顔検出部300によって検出された顔領域606が1つのターゲットブロック573に含まれるように画像分割をすることによって、顔領域606について1つの動きベクトルを検出することができる。   FIG. 6B is a diagram illustrating an image division example when the image 560 is divided into nine based on the face region 606 detected by the face detection unit 300. As described above, by dividing the image 560 including the human 604 so that the face area 606 detected by the face detection unit 300 is included in one target block 573, one face area 606 is obtained. A motion vector can be detected.

このように、図6(a)に示す画像560においては、顔領域が画像分割の境界と交わってしまうため、1つの顔領域に対して1つの動きベクトルを検出することができない。これに対して、図6(b)に示す画像560においては、画像分割の境界と顔領域が交わっていないため、1つの顔領域に対して1つの動きベクトルを検出することができ、画像分割の境界の設定方法として好ましい。このように、何れかのターゲットブロックが顔領域を包含するような位置に画像分割の境界を移動させることによって、顔領域に最適な動きベクトルを確実に検出することが可能となる。なお、ターゲットブロックを配置する場合には、検出された顔を囲むようにターゲットブロックが配置されるようにすれば、画像を等分割する以外の他の配置方法を用いることができる。   As described above, in the image 560 shown in FIG. 6A, the face area intersects with the boundary of image division, and therefore one motion vector cannot be detected for one face area. On the other hand, in the image 560 shown in FIG. 6B, since the boundary of the image division and the face area do not intersect, one motion vector can be detected for one face area. This is preferable as a method for setting the boundary. As described above, by moving the boundary of the image division to a position where any target block includes the face area, it is possible to reliably detect an optimal motion vector for the face area. When the target block is arranged, other arrangement methods other than equally dividing the image can be used as long as the target block is arranged so as to surround the detected face.

このように、本発明の実施の形態では、撮影画像から動きベクトルを検出する処理において、顔検出部300が出力した顔領域の座標を利用する。   As described above, in the embodiment of the present invention, the coordinates of the face area output by the face detection unit 300 are used in the process of detecting the motion vector from the captured image.

なお、顔領域におけるブレ成分(ブレ量)を重点的に補正するため、顔領域を含むターゲットブロックについては、比較的大きい重み付け処理を実行し、全体の動きベクトルの算出に対する寄与度を高める。この重み付け処理については、以下で示すように、顔領域の面積の広さ、顔としての確からしさ、正面向きの度合い等によって、精密に設定することが可能である。   In order to intensively correct the blur component (blur amount) in the face area, a relatively large weighting process is executed on the target block including the face area to increase the contribution to the calculation of the entire motion vector. As shown below, this weighting process can be precisely set according to the size of the face area, the certainty of the face, the degree of frontal orientation, and the like.

図7は、動きベクトル検出部400が画像580から検出した動きベクトルの例を示す図である。   FIG. 7 is a diagram illustrating an example of a motion vector detected from the image 580 by the motion vector detection unit 400.

画像580においては、図4に示す画像500と同様に、画像580が16分割されて各ブロックにおける動きベクトルが検出される。なお、画像580には、人間607および610が含まれ、顔608の顔領域609および顔611の顔領域612が顔検出部300によって検出されている。このため、検出された各顔領域609および612を含むように、各ターゲットブロックが配置されている。矢印581v、584v等は、ターゲットブロック581乃至597において検出された動きベクトルの例を示すものである。図7に示すように、各ターゲットブロックにおいて動きベクトルが検出される。   In the image 580, as in the image 500 shown in FIG. 4, the image 580 is divided into 16 and the motion vector in each block is detected. Note that the image 580 includes humans 607 and 610, and the face area 609 of the face 608 and the face area 612 of the face 611 are detected by the face detection unit 300. For this reason, each target block is arranged so as to include each detected face area 609 and 612. Arrows 581v, 584v, etc. show examples of motion vectors detected in the target blocks 581 to 597. As shown in FIG. 7, a motion vector is detected in each target block.

次に、検出された動きベクトルを重み付け処理するための重み付け係数の算出方法について図面を参照して説明する。   Next, a weighting coefficient calculation method for weighting the detected motion vector will be described with reference to the drawings.

最初に、検出された顔に関する各種情報に基づいて重み付け係数を算出する場合について説明する。   First, a case where a weighting coefficient is calculated based on various types of information related to the detected face will be described.

図8は、人間の顔613、615、617が含まれている画像701を示す図である。上述したように、撮影画像において動きベクトルが検出された場合においては、検出された動きベクトルをブレ補正量としてそのまま使用せずに、被写体に応じた重み付け処理を行い、重み付け処理された後の動きベクトルを使用してブレ補正を行う。例えば、人間の顔が含まれている撮影画像の場合には、撮影画像におけるターゲットブロックが顔領域を含んでいるか否かに応じて重み付け係数を算出する。また、ターゲットブロックが顔領域を含んでいる場合は、顔領域付近の画像ブレを重点的に補正するために、当該ターゲットブロックに対してさらに大きな重み付け係数を算出する。   FIG. 8 is a diagram illustrating an image 701 including human faces 613, 615, and 617. As described above, when a motion vector is detected in a captured image, the detected motion vector is not used as it is as a blur correction amount, and weighting processing is performed according to the subject, and the motion after the weighting processing is performed. Perform blur correction using vectors. For example, in the case of a captured image including a human face, the weighting coefficient is calculated according to whether or not the target block in the captured image includes a face area. When the target block includes a face area, a larger weighting coefficient is calculated for the target block in order to intensively correct image blurring in the vicinity of the face area.

例えば、撮影画像におけるターゲットブロックがN個の場合について説明する。撮影画像におけるターゲットブロックが顔領域を含んでいない場合には、予め決まっている重み付け係数wn'=w0(n=0〜N−1)を算出する。ただし、この重み付け係数の初期値w0は、w0=1/Nである。一方、撮影画像におけるターゲットブロックが顔領域を含んでいる場合には、次の(式1)に示すように、重み付けの要因を複数用いて、重み付け係数を算出する。なお、E01乃至E05はそれぞれの顔評価値の重み付け係数である。
wn'=w0×{(E01×顔領域の面積)
+(E02×顔領域の座標)
+(E03×顔らしさの値)
+(E04×顔の正面向きの度合い)
+(E05×顔の傾きの度合い)}……(式1)
For example, a case where the number of target blocks in a captured image is N will be described. When the target block in the captured image does not include a face area, a predetermined weighting coefficient wn ′ = w0 (n = 0 to N−1) is calculated. However, the initial value w0 of this weighting coefficient is w0 = 1 / N. On the other hand, when the target block in the captured image includes a face area, a weighting coefficient is calculated using a plurality of weighting factors as shown in the following (Equation 1). E01 to E05 are weighting coefficients for the respective face evaluation values.
wn ′ = w0 × {(E01 × face area)
+ (E02 x face area coordinates)
+ (E03 x facial value)
+ (E04 x degree of face orientation)
+ (E05 × degree of face inclination)} (Formula 1)

具体的には、ターゲットブロックに含まれる顔領域について、顔領域の面積が広いほど重みを増やし、顔領域の座標が中央寄りであるほど重みを増やし、顔らしさの値が高いほど重みを増やし、顔の正面向きの度合いが高いほど重みを増やし、顔の傾きが少ないほど重みを増やす等の重み付け処理で算出する。   Specifically, for the face area included in the target block, the weight is increased as the area of the face area is wider, the weight is increased as the coordinates of the face area are closer to the center, and the weight is increased as the face-likeness value is higher. The weight is increased as the degree of frontal orientation of the face is higher and the weight is increased as the face inclination is smaller.

N個のターゲットブロックから、それぞれの重み付け係数w0'〜w(N−1)'が算出された場合には、それぞれの重み付け係数の総和が1となるように正規化処理を施す。   When the weighting coefficients w0 ′ to w (N−1) ′ are calculated from the N target blocks, normalization processing is performed so that the sum of the weighting coefficients becomes 1.

例えば、図8に示すように、複数の人間の顔613、615、617が含まれている画像701において、顔領域614に含まれる人間の顔613は、顔領域の面積が広く、その座標が中央寄りであり、顔の正面向きの度合いが高く、顔の傾きが少ないため、重み付け係数が高い。また、顔領域618に含まれる人間の顔617は、顔領域の面積が比較的狭く、その座標が中央寄りではなく、顔の傾きが比較的大きいため、重み付け係数が低い。さらに、顔領域616に含まれる人間の顔615は、顔領域の面積が比較的狭く、その座標が中央寄りではなく、顔の正面向きの度合いが低いため、重み付け係数が低い。   For example, as shown in FIG. 8, in an image 701 including a plurality of human faces 613, 615, and 617, the human face 613 included in the face area 614 has a large area of the face area, and its coordinates are The weighting coefficient is high because it is closer to the center, has a high degree of face orientation, and has a small face inclination. The human face 617 included in the face area 618 has a low weighting coefficient because the face area has a relatively small area, its coordinates are not close to the center, and the face inclination is relatively large. Furthermore, the human face 615 included in the face area 616 has a relatively low weight area because the area of the face area is relatively small, the coordinates are not close to the center, and the degree of frontal orientation of the face is low.

次に、検出された顔についてのフォーカスや露出の合っている度合いに基づいて重み付け係数を算出する場合について説明する。   Next, a case where the weighting coefficient is calculated based on the degree of focus and exposure of the detected face will be described.

図9乃至図12は、複数の人間の顔が含まれている撮影画像の例を示す図である。   FIGS. 9 to 12 are diagrams illustrating examples of captured images including a plurality of human faces.

図9に示すように、例えば、撮像装置100からの距離が異なる複数の人間の顔が含まれている撮影画像においては、顔の各種情報に基づいて重み付け係数を算出することができるとともに、各顔のフォーカスや露出の合っている度合い等に基づいて、重み付け係数を算出することができる。また、各顔のフォーカスや露出の合っている度合いに基づいて、顔の各種情報に基づいて算出された重み付け係数を補正することができる。   As shown in FIG. 9, for example, in a captured image including a plurality of human faces with different distances from the imaging device 100, weighting coefficients can be calculated based on various types of face information, The weighting coefficient can be calculated based on the degree of focus and exposure of the face. Also, the weighting coefficient calculated based on various face information can be corrected based on the degree of focus and exposure of each face.

図9(a)は、撮像装置100からの距離が異なる複数の人間の顔619、621、623が含まれている画像702を示す図である。なお、画像702においては、各顔619、621、623を含む顔領域620、622、624が検出されている。   FIG. 9A is a diagram illustrating an image 702 including a plurality of human faces 619, 621, and 623 having different distances from the imaging device 100. In the image 702, face areas 620, 622, and 624 including the faces 619, 621, and 623 are detected.

フォーカスの合っている度合いを検出する方法として、検出された顔領域内にAF検波枠を設け、枠の内側で高周波成分を求め、高周波成分の積分値が大きいほど、フォーカスが合っているとみなす方法がある。例えば、図9(a)に示す画像702において、最もフォーカスが合っている顔領域を顔領域622とする。この場合には、画像702において顔領域622に係るターゲットブロックの重み付け係数の重みを増やすようにする。   As a method of detecting the degree of focus, an AF detection frame is provided in the detected face area, a high frequency component is obtained inside the frame, and the higher the high frequency component integrated value, the more the focus is considered. There is a way. For example, in the image 702 illustrated in FIG. 9A, the face area that is most focused is set as the face area 622. In this case, the weight of the weighting coefficient of the target block related to the face area 622 in the image 702 is increased.

図9(b)は、撮像装置100からの距離が異なる複数の人間の顔625、627、629が含まれている画像703を示す図である。なお、画像703においては、各顔625、627、629を含む顔領域626、628、630が検出されている。   FIG. 9B is a diagram illustrating an image 703 including a plurality of human faces 625, 627, and 629 having different distances from the imaging device 100. In the image 703, face areas 626, 628, and 630 including the faces 625, 627, and 629 are detected.

露出が合っている度合いを検出する方法として、適正露出を予め設定できるようにしておき、その値に近いほど露出が合っているとみなす方法がある。例えば、図9(b)に示す画像703において、最も露出が合っている顔領域を顔領域626とする。この場合には、画像703において顔領域626に係るターゲットブロックの重み付け係数の重みを増やすようにする。   As a method for detecting the degree of exposure, there is a method in which an appropriate exposure can be set in advance, and the closer the value is, the more the exposure is considered. For example, in the image 703 shown in FIG. 9B, the most exposed face area is set as the face area 626. In this case, the weight of the weighting coefficient of the target block related to the face area 626 in the image 703 is increased.

図10は、多数の人間の顔が含まれている画像704(いわゆる集合写真)を示す図である。なお、画像704においては、人間631の顔632を含む顔領域633とともに他の顔領域の全てが検出されている。   FIG. 10 is a diagram showing an image 704 (so-called group photo) including many human faces. In the image 704, all the other face areas are detected together with the face area 633 including the face 632 of the human 631.

図10に示すように、いわゆる集合写真のような画像704においては、面積の比較的狭い顔領域が多数存在し、面積の広い顔領域が現れない。また、画像704に存在する顔の多くが正面を向いていることが多い。このため、撮影画像がいわゆる集合写真の画像であると判断された場合には、各々の顔領域に対する重み付けを均一にして、さらに重み付け係数を低めに設定するようにすることができる。これにより、いわゆる集合写真の画像に適した重み付けに補正することができる。   As shown in FIG. 10, in an image 704 like a so-called group photo, there are many face areas having a relatively small area, and a face area having a large area does not appear. In many cases, many of the faces present in the image 704 are facing the front. For this reason, when it is determined that the captured image is a so-called group photo image, the weighting for each face region can be made uniform, and the weighting coefficient can be set lower. Thereby, it can correct | amend to the weighting suitable for the image of what is called a group photograph.

図11は、主たる被写体の人物634および636とともに、他の人物638および640が背景に含まれている画像705を示す図である。   FIG. 11 is a diagram showing an image 705 in which other persons 638 and 640 are included in the background together with persons 634 and 636 as main subjects.

図11に示すように、主たる被写体の人物634および636以外に、他の人物638および640が背景に存在する画像705においては、主たる被写体の人物634および636については、その顔領域の面積が比較的広く、さらに顔領域が画像の中央付近に存在する場合が多い。一方、背景の他の人物638および640については、その顔領域の面積は比較的狭く、さらに顔領域が画像の周辺付近に存在する場合が多い。また、主たる被写体の人物は正面を向いている確率が高く、背景の他の人物は正面を向いている確率が低い場合が多い。このため、これらを考慮して、背景の人物であると判断された場合には、その背景の人物の顔領域についての重み付け係数を低めに設定することができる。これにより、背景の人物に適した重み付けに補正することができる。   As shown in FIG. 11, in the image 705 in which other people 638 and 640 exist in the background in addition to the main subjects 634 and 636, the areas of the face regions of the main subjects 634 and 636 are compared. In many cases, the face area is present near the center of the image. On the other hand, for the other persons 638 and 640 in the background, the area of the face area is relatively small, and the face area often exists near the periphery of the image. In many cases, the person who is the main subject has a high probability of facing the front and the other persons in the background have a low probability of facing the front. For this reason, when it is determined that the person is a person in the background in consideration of these, the weighting coefficient for the face area of the person in the background can be set lower. Thereby, it can correct | amend to the weighting suitable for the person of a background.

図12は、複数の人間の顔642、644、646が含まれている画像706を示す図である。   FIG. 12 is a diagram illustrating an image 706 including a plurality of human faces 642, 644, 646.

図12に示すように、例えば、画像706において複数の顔領域643、645、647が存在する場合において、複数の顔領域の中から特定人物(既知の人物)と認識される顔領域が存在している場合には、未知の顔領域よりも大きい重み付け係数を付与する。これにより、特定人物に対して最適なブレ補正を実現することができる。   As shown in FIG. 12, for example, when there are a plurality of face areas 643, 645, and 647 in the image 706, there is a face area recognized as a specific person (known person) from the plurality of face areas. If so, a weighting coefficient larger than that of the unknown face area is given. As a result, it is possible to realize the optimum blur correction for the specific person.

例えば、図12に示すように、画像706において複数の顔領域643、645、647が存在する場合において、特定人物の顔領域を顔領域643とする。この場合において、顔領域643に係るターゲットブロックの重み付け係数については、顔領域の面積や正面向きの度合い等よりも優先して、特定人物に対して最も大きな重み付け係数を付与するようにする。   For example, as illustrated in FIG. 12, when a plurality of face areas 643, 645, and 647 exist in the image 706, the face area of the specific person is set as the face area 643. In this case, with respect to the weighting coefficient of the target block related to the face area 643, the largest weighting coefficient is given to the specific person in preference to the area of the face area, the degree of frontal orientation, and the like.

なお、特定人物とは、撮像装置100のユーザにより特定された人物である。その人物の顔領域に関する各種データが特定人物データベースとして撮像装置100内に保持される。なお、各種データとしては、例えば、顔の輪郭、顔の構成部分(目、鼻、眉、口、耳、髪、ひげ、眼鏡等)の形状や特徴、位置等がある。また、外部から撮像装置100に特定人物のデータを与えるようにしてもよい。その特定人物の顔に関する特定人物データベースと、撮影画像から検出された顔領域での各種データとを比較し、その相関値を算出して、同一人物であるか否かを判定し、同一人物であれば、その人物が特定人物であると判定する。このような顔画像による特定人物の認識に関しては、特公平6−7388等に記載されている技術がよく知られている。   Note that the specific person is a person specified by the user of the imaging apparatus 100. Various data relating to the face area of the person is stored in the imaging apparatus 100 as a specific person database. The various data includes, for example, the face contour, the shape, characteristics, position, etc. of the face components (eyes, nose, eyebrows, mouth, ears, hair, beard, glasses, etc.). In addition, specific person data may be given to the imaging apparatus 100 from the outside. The specific person database related to the face of the specific person is compared with various data in the face area detected from the photographed image, and the correlation value is calculated to determine whether or not the same person. If there is, it is determined that the person is a specific person. Regarding the recognition of a specific person using such a face image, a technique described in Japanese Patent Publication No. 6-7388 is well known.

以上で示したように、撮影画像から顔が1つまたは複数検出された場合において、どの顔がどの程度重要な被写体であるかを数値で表現することができ、顔検出の結果値を各動きベクトルの重み付け係数の算出に忠実に反映させることが可能である。   As described above, when one or more faces are detected from a captured image, it is possible to express numerically which face is an important subject and how the face detection results It is possible to accurately reflect the calculation of the weighting coefficient of the vector.

次に本発明の実施の形態における撮像装置100の動作について図面を参照して説明する。   Next, the operation of the imaging apparatus 100 according to the embodiment of the present invention will be described with reference to the drawings.

図13は、撮像装置100によるブレ補正量算出処理の処理手順を示すフローチャートである。   FIG. 13 is a flowchart illustrating a processing procedure of blur correction amount calculation processing by the imaging apparatus 100.

最初に、撮像装置100において撮像部120が撮像した画像である撮影画像が入力される(ステップS901)。撮像部120から撮影画像が入力されると、顔検出の設定がONにされているか否かが判断される(ステップS902)。顔検出の設定がOFFであれば(ステップS902)、顔に基づくブレ補正をする必要がないため、ステップS912に進む。   First, a captured image that is an image captured by the image capturing unit 120 in the image capturing apparatus 100 is input (step S901). When a captured image is input from the imaging unit 120, it is determined whether the face detection setting is turned on (step S902). If the face detection setting is OFF (step S902), since it is not necessary to perform face-based blur correction, the process proceeds to step S912.

顔検出の設定がONにされていれば(ステップS902)、顔検出部300は、入力された画像から顔を検出するとともに検出された各顔の各種情報を算出する(ステップS903)。   If the face detection setting is ON (step S902), the face detection unit 300 detects a face from the input image and calculates various information of each detected face (step S903).

続いて、入力された画像から顔が検出されたか否かが判断される(ステップS904)。入力された画像から顔が検出されていなければ(ステップS904)、顔に基づくブレ補正をする必要がないため、ステップS912に進む。   Subsequently, it is determined whether or not a face is detected from the input image (step S904). If no face is detected from the input image (step S904), it is not necessary to perform blur correction based on the face, and the process proceeds to step S912.

入力された画像から顔が検出されていれば(ステップS904)、検出された各顔領域を包含するように、入力された画像が複数のブロックに分割される(ステップS905)。この分割については、図6(b)に示すように、顔領域が分割されないように各ブロックの境界が設定される。例えば、入力された画像がN個のブロックに分割されたとする。なお、入力された画像から複数の顔が検出されている場合には、検出された各顔の評価値に基づいて主要と思われる一または複数の顔が選択され、選択された顔の各顔領域を包含するように、入力された画像が複数のブロックに分割されるようにしてもよい。   If a face is detected from the input image (step S904), the input image is divided into a plurality of blocks so as to include each detected face region (step S905). For this division, as shown in FIG. 6B, the boundary of each block is set so that the face area is not divided. For example, assume that the input image is divided into N blocks. If a plurality of faces are detected from the input image, one or more faces that are considered to be main are selected based on the evaluation value of each detected face, and each face of the selected face is selected. The input image may be divided into a plurality of blocks so as to include the region.

続いて、複数のターゲットブロックの中から1つのターゲットブロックが取り出される(ステップS906)。続いて、取り出されたターゲットブロックに関する動きベクトルが検出されて記憶される(ステップS907)。続いて、取り出されたターゲットブロックに顔が含まれているか否かが判断される(ステップS908)。取り出されたターゲットブロックに顔が含まれていれば(ステップS908)、ターゲットブロックに含まれている顔の各種情報に基づいて重み付け係数が算出される(ステップS909)。例えば、ターゲットブロックに顔が含まれている場合には、上述した(式1)を用いて当該ターゲットブロックにおける重み付け係数が算出される(ステップS909)。このようにすることによって、ターゲットブロックに顔が含まれている場合には、当該ターゲットブロックについては比較的大きな重み付け係数が算出され、当該ターゲットブロックに含まれる顔の顔領域付近の画像のブレを重点的に補正することができる。なお、ステップS909で、ターゲットブロックにおける重み付け係数を算出する場合においては、図9乃至12を用いて説明した重み付け係数の算出方法を用いるようにしてもよい。   Subsequently, one target block is extracted from the plurality of target blocks (step S906). Subsequently, a motion vector relating to the extracted target block is detected and stored (step S907). Subsequently, it is determined whether or not a face is included in the extracted target block (step S908). If a face is included in the extracted target block (step S908), a weighting coefficient is calculated based on various types of face information included in the target block (step S909). For example, when the face is included in the target block, the weighting coefficient in the target block is calculated using (Equation 1) described above (step S909). In this way, when a face is included in the target block, a relatively large weighting coefficient is calculated for the target block, and blurring of an image near the face area of the face included in the target block is performed. It can be corrected intensively. In the case where the weighting coefficient in the target block is calculated in step S909, the weighting coefficient calculation method described with reference to FIGS. 9 to 12 may be used.

一方、取り出したターゲットブロックに顔が含まれていなければ(ステップS908)、当該ターゲットブロックについては予め決定されている重み付け係数が算出される(ステップS910)。例えば、ターゲットブロックがN個ある場合において、予め決定されている重み付け係数の初期値をw0とした場合には、重み付け係数としてwn'=w0=1/Nが算出される(n=0〜N−1)。   On the other hand, if the extracted target block does not contain a face (step S908), a predetermined weighting coefficient is calculated for the target block (step S910). For example, when there are N target blocks and wn ′ = w0 = 1 / N is calculated as the weighting coefficient when the initial value of the weighting coefficient determined in advance is w0 (n = 0 to N). -1).

続いて、複数のターゲットブロックの全てのターゲットブロックが取り出されたか否かが判断される(ステップS911)。全てのターゲットブロックが取り出されていなければ(ステップS911)、ステップS906に進み、各ターゲットブロックの重み付け係数の算出処理を繰り返す(ステップS906乃至S910)。   Subsequently, it is determined whether all target blocks of the plurality of target blocks have been extracted (step S911). If all the target blocks have not been extracted (step S911), the process proceeds to step S906, and the process of calculating the weighting coefficient for each target block is repeated (steps S906 to S910).

全てのターゲットブロックが取り出されていれば(ステップS911)、算出されたN個の各ターゲットブロックにおける重み付け係数w0'〜w(N−1)'について、その総和が1となるように正規化処理が実行される。続いて、正規化処理された各ターゲットブロックにおける重み付け係数w0'〜w(N−1)'を用いて、検出された各ターゲットブロックにおける動きベクトルについて重み付け処理が実行され、各ターゲットブロックに係るフレームにおける動きベクトルが算出される(ステップS915)。続いて、算出された各フレームの動きベクトルが補正量としてブレ補正部410に出力される(ステップS916)。   If all target blocks have been extracted (step S911), normalization processing is performed so that the sum of weighting coefficients w0 ′ to w (N−1) ′ in the calculated N target blocks is 1. Is executed. Subsequently, a weighting process is performed on the detected motion vector in each target block using the weighting coefficients w0 ′ to w (N−1) ′ in each target block that has been subjected to normalization processing, and a frame related to each target block The motion vector at is calculated (step S915). Subsequently, the calculated motion vector of each frame is output to the blur correction unit 410 as a correction amount (step S916).

また、顔検出の設定がONの場合(ステップS902)または入力画像から顔が検出されなかった場合には(ステップS904)、入力された画像が複数のターゲットブロックに分割される(ステップS912)。例えば、入力された画像がN個のターゲットブロックに等分割される。   If the face detection setting is ON (step S902) or if no face is detected from the input image (step S904), the input image is divided into a plurality of target blocks (step S912). For example, the input image is equally divided into N target blocks.

続いて、複数のターゲットブロックの中から1つのターゲットブロックが順次取り出され、取り出されたターゲットブロックに関する動きベクトルが順次検出されて記憶される(ステップS913)。続いて、各ターゲットブロックについて予め決定されている重み付け係数が算出される(ステップS914)。例えば、ターゲットブロックがN個ある場合において、予め決定されている重み付け係数の初期値をw0とした場合には、重み付け係数としてwn'=w0=1/Nが算出される。続いて、ステップS915に進み、各ターゲットブロックに係るフレームにおける動きベクトルが算出される。   Subsequently, one target block is sequentially extracted from the plurality of target blocks, and motion vectors relating to the extracted target blocks are sequentially detected and stored (step S913). Subsequently, a predetermined weighting coefficient is calculated for each target block (step S914). For example, in the case where there are N target blocks, wn ′ = w0 = 1 / N is calculated as the weighting coefficient when the initial value of the weighting coefficient determined in advance is w0. Then, it progresses to step S915 and the motion vector in the frame which concerns on each target block is calculated.

以上で示したように、N個のターゲットブロックに係る各フレームにおいて検出された動きベクトルについて、各ターゲットブロックに含まれる顔領域を考慮した重み付け係数による重み付け処理を行い、最終的に1フレームに1つの動きベクトルを算出する。この動きベクトルは、ブレ補正部410に出力され、ブレと反対方向に補正が行われる。これにより、出力画像については、ブレの十分に少ない良好な画像が得られる。特に背景よりも人物の顔部分に対してブレが抑圧され、主要な被写体を鮮鋭に撮影することができる。   As described above, the motion vector detected in each frame related to the N target blocks is subjected to the weighting process using the weighting coefficient in consideration of the face area included in each target block, and finally 1 per frame. One motion vector is calculated. This motion vector is output to the shake correction unit 410 and corrected in the direction opposite to the shake. As a result, a good image with sufficiently small blurring can be obtained for the output image. In particular, the blurring is suppressed on the face portion of the person rather than the background, and the main subject can be photographed sharply.

次に、補正量算出部440が算出したブレ補正量に基づいて撮影画像のブレを補正するブレ補正部410について図14を参照して説明する。   Next, the blur correction unit 410 that corrects the blur of the captured image based on the blur correction amount calculated by the correction amount calculation unit 440 will be described with reference to FIG.

ブレ補正部410は、上述したように、電子的ブレ補正手段および光学的ブレ補正手段を有する。電子的ブレ補正手段は、撮像素子122のアドレスをずらして書き込みまたは読み出し動作をすることによってブレを補正する手段、または、画像記憶部140のアドレスをずらして書き込みまたは読み出し動作をすることによってブレを補正する手段である。また、光学的ブレ補正手段は、ブレ補正用レンズの移動や傾きによってブレを補正する手段、または、ブレ補正用プリズムの変形や傾きによってブレを補正する手段、または、撮像素子122の移動によってブレを補正する手段である。   As described above, the shake correction unit 410 includes an electronic shake correction unit and an optical shake correction unit. The electronic blur correction unit corrects blur by shifting the address of the image sensor 122 to perform writing or reading operation, or blurs by shifting the address of the image storage unit 140 and performing writing or reading operation. It is a means to correct. The optical blur correction unit is a unit that corrects blur by movement or tilt of the blur correction lens, a unit that corrects blur by deformation or tilt of the blur correction prism, or a blur by moving the image sensor 122. It is a means to correct.

なお、電子的ブレ補正手段および光学的ブレ補正手段は、1つの画像に対して複数得られたローカルな動きベクトルから、1つの動きベクトルを算出して、このベクトルに基づいて画像のブレを補正することができる。また、電子的ブレ補正手段は、1つの画像に対して複数得られたローカルな動きベクトルから、ローカルな補正を行うことが可能である。なお、ブレ補正部410は、少なくとも電子的ブレ補正手段を具備するようにする。   The electronic blur correction unit and the optical blur correction unit calculate one motion vector from a plurality of local motion vectors obtained for one image, and correct the blur of the image based on the vector. can do. In addition, the electronic blur correction unit can perform local correction from a plurality of local motion vectors obtained for one image. The blur correction unit 410 includes at least an electronic blur correction unit.

図14は、人間648が含まれている画像707において、9分割された各ブロックから算出された動きベクトル751乃至759を示す図である。なお、画像707において、動きベクトル751乃至758は、画像707における背景部分と判断されたブロックの動きベクトル(グローバルなベクトル)であり、同一の動きベクトルである。一方、動きベクトル759は、動被写体である人間648の顔649の顔領域650を含むブロックにおける動きベクトル(ローカルなベクトル)であるため、動きベクトル751乃至758とは異なる動きベクトルとなっている。なお、動きベクトル759は、顔の領域のブレ量である顔移動量の例であり、動きベクトル751乃至758は、顔の領域以外の領域のブレ量である背景移動量の例である。   FIG. 14 is a diagram illustrating motion vectors 751 to 759 calculated from each block divided into nine in an image 707 including a person 648. In the image 707, motion vectors 751 to 758 are motion vectors (global vectors) of blocks determined as background portions in the image 707, and are the same motion vectors. On the other hand, since the motion vector 759 is a motion vector (local vector) in a block including the face area 650 of the face 649 of the human 648 that is a moving subject, the motion vector is different from the motion vectors 751 to 758. Note that the motion vector 759 is an example of a face movement amount that is a blur amount of a face area, and the motion vectors 751 to 758 are examples of a background movement amount that is a blur amount of an area other than the face area.

図14に示す画像707については、ブレ補正部410の電子的ブレ補正手段は、動きベクトル751乃至758に係る各ブロックについては、同一の動きベクトルであるため、同一のローカルな補正を行う。一方、動きベクトル759に係るブロックについては、動きベクトル759が動きベクトル751乃至758とは異なる動きベクトルであるため、動きベクトル759に応じたローカルな補正を行う。   For the image 707 shown in FIG. 14, the electronic shake correction unit of the shake correction unit 410 performs the same local correction because the blocks related to the motion vectors 751 to 758 are the same motion vector. On the other hand, regarding the block related to the motion vector 759, since the motion vector 759 is a motion vector different from the motion vectors 751 to 758, local correction according to the motion vector 759 is performed.

これにより、被写体である人間の顔についてブレが少ない鮮鋭な画像を撮影することができる。特に人の顔の付近については、ブレを十分に抑圧することができ、主要な被写体を高画質で撮影することができる。また、背景ブレや背景の物体の動きに影響を受けることなく、人物の顔に自動的に重点をおいて、効果的にブレ補正を実現することができる。なお、本発明の実施の形態は、ブレ補正手段について特定の手段に限定するものではなく、電子的補正や光学的補正の手段に係らず、他のブレ補正手段に対しても適用することができる。   As a result, a sharp image with less blur can be taken with respect to the human face as the subject. Particularly in the vicinity of a human face, blurring can be sufficiently suppressed, and a main subject can be photographed with high image quality. In addition, it is possible to effectively achieve blur correction by automatically focusing on a person's face without being affected by background blur or movement of an object on the background. The embodiment of the present invention is not limited to a specific means for the shake correction means, and can be applied to other shake correction means regardless of electronic correction or optical correction means. it can.

次に、振動センサ200が出力した撮像装置100本体におけるブレ成分(ブレ量)201を用いて、撮影画像におけるブレを補正する場合について図15を参照して説明する。   Next, a case where blurring in a captured image is corrected using a blur component (blur amount) 201 in the main body of the imaging apparatus 100 output from the vibration sensor 200 will be described with reference to FIG.

図15は、振動センサ200が出力した撮像装置100本体のブレ成分(ブレ量)201と、動きベクトル検出部400が出力した画像の各部分におけるブレ成分(ブレ量)401とに基づいて、被写体のブレ成分を抽出する場合における抽出方法の一例を示す図である。   FIG. 15 shows the subject based on the blur component (blur amount) 201 of the image pickup apparatus 100 output from the vibration sensor 200 and the blur component (blur amount) 401 in each part of the image output from the motion vector detection unit 400. It is a figure which shows an example of the extraction method in the case of extracting this blur component.

図15に示すように、動きベクトル検出部400が出力した画像の各部分におけるブレ成分401から、振動センサ200が出力した撮像装置100本体のブレ成分201を減算すると、動被写体のブレ成分402を算出することができる。つまり、撮影画像の各部分におけるブレ成分から撮像装置100本体のブレ成分(手振れ等によるブレ成分)を除去することができるため、動被写体のブレ成分を算出することができる。算出されたブレ成分を顔領域のブレ成分検出に利用することができる。   As shown in FIG. 15, when the blur component 201 of the main body of the imaging device 100 output by the vibration sensor 200 is subtracted from the blur component 401 in each part of the image output by the motion vector detection unit 400, the blur component 402 of the moving subject is obtained. Can be calculated. That is, since the blur component (blur component due to camera shake) of the main body of the imaging apparatus 100 can be removed from the blur component in each part of the captured image, the blur component of the moving subject can be calculated. The calculated blur component can be used for blur component detection in the face area.

図16は、動きベクトル検出部400が検出した画像708の各部分における動きベクトルと、動きベクトル検出部400が検出した画像708に含まれる動被写体である人間651の動きベクトルとに基づいて、画像708に含まれる動被写体以外の背景部分のブレ成分を抽出する場合における抽出方法の一例を示す図である。   FIG. 16 illustrates an image based on the motion vector in each part of the image 708 detected by the motion vector detection unit 400 and the motion vector of the human 651 that is a moving subject included in the image 708 detected by the motion vector detection unit 400. 708 is a diagram illustrating an example of an extraction method when a blur component of a background portion other than a moving subject included in 708 is extracted.

図16に示すように、画像708の各部分の動きベクトルから、動被写体である人間651の顔領域および胴体部分と推定される領域651aに関する動きベクトルを減算すると、動いている被写体に影響を受けない、純粋な背景のみの動きベクトルを抽出することができる。   As shown in FIG. 16, when the motion vector related to the region 651a estimated as the face region and the body portion of the human 651 that is the moving subject is subtracted from the motion vector of each portion of the image 708, the moving subject is affected. It is possible to extract a motion vector of only a pure background.

このように、振動センサ200を用いることによって、画像処理に依存しないブレ成分(すなわち、撮像装置100本体のブレ成分)を検出することが可能である。また、画像の各部分において動きベクトル検出部400が検出した動きベクトルから振動センサ200が検出したブレ成分を減算し、減算して求められた値を用いて重み付け処理を実行して動被写体のブレ補正量を算出することができる。このように、動きベクトル検出部400により検出された動きベクトルの値と、振動センサ200により検出されたブレ成分の値と用いて、ブレ補正量を算出することができる。   Thus, by using the vibration sensor 200, it is possible to detect a blur component that does not depend on image processing (that is, a blur component of the main body of the imaging device 100). In addition, the blur component detected by the vibration sensor 200 is subtracted from the motion vector detected by the motion vector detection unit 400 in each part of the image, and weighting processing is performed using a value obtained by subtraction, thereby blurring the moving subject. A correction amount can be calculated. As described above, the blur correction amount can be calculated using the value of the motion vector detected by the motion vector detection unit 400 and the value of the blur component detected by the vibration sensor 200.

次に、顔検出部300が検出した顔領域と動きベクトル検出部400が検出した動きベクトルとに基づいて撮影画像の各部のブレを補正するブレ補正について図面を参照して説明する。なお、上記では、動きベクトル検出部400が動きベクトルを検出する場合において、顔検出部300が顔を検出している場合には、検出された顔を含むように撮影画像を複数の領域に分割し、分割された各領域における動きベクトルを求める例を説明した。   Next, blur correction for correcting the blur of each part of the captured image based on the face area detected by the face detection unit 300 and the motion vector detected by the motion vector detection unit 400 will be described with reference to the drawings. In the above description, when the motion vector detection unit 400 detects a motion vector and the face detection unit 300 detects a face, the captured image is divided into a plurality of regions so as to include the detected face. The example in which the motion vector in each divided area is obtained has been described.

ここでは、動きベクトル検出部400が動きベクトルを検出する場合において、撮影画像に含まれる顔とは無関係に、撮影画像を複数の領域に分割し、分割された各領域における動きベクトルを求める場合におけるブレ補正の例について説明する。つまり、撮影画像を複数の領域に分割し、分割された各領域において検出された動きベクトルを、背景のブレベクトル(グローバルなベクトル)と、顔領域を含む動被写体部分のブレベクトル(ローカルなベクトル)とに分離して、ブレ量の検出および補正をローカルに行う。   Here, when the motion vector detection unit 400 detects a motion vector, the captured image is divided into a plurality of regions regardless of the face included in the captured image, and a motion vector in each divided region is obtained. An example of blur correction will be described. In other words, the captured image is divided into a plurality of regions, and the motion vector detected in each of the divided regions is divided into a background blur vector (global vector) and a blur vector (local vector) of a moving subject including a face region. ) And the blur amount is detected and corrected locally.

図17は、人間652および人間655が含まれている画像711において、16分割された各ブロックから算出された動きベクトル759乃至774を示す図である。なお、画像711において、動きベクトル759乃至768は、画像711における背景部分と判断されたブロックの動きベクトル(グローバルなベクトル)であり、同一の動きベクトルである。また、動きベクトル769および770は、動被写体である人間652の顔653の顔領域654の一部を含むブロックにおける動きベクトル(ローカルなベクトル)である。また、動きベクトル771は、動被写体である人間652の胴体部分の一部を含むブロックにおける動きベクトル(ローカルなベクトル)である。また、動きベクトル772および773は、動被写体である人間655の顔656の顔領域657の一部を含むブロックにおける動きベクトル(ローカルなベクトル)である。また、動きベクトル774は、動被写体である人間655の胴体部分の一部を含むブロックにおける動きベクトル(ローカルなベクトル)である。   FIG. 17 is a diagram illustrating motion vectors 759 to 774 calculated from each block divided into 16 in an image 711 including the human 652 and the human 655. In the image 711, motion vectors 759 to 768 are motion vectors (global vectors) of blocks determined as background portions in the image 711, and are the same motion vectors. The motion vectors 769 and 770 are motion vectors (local vectors) in a block including a part of the face area 654 of the face 653 of the human 652 that is a moving subject. The motion vector 771 is a motion vector (local vector) in a block including a part of the torso portion of the human 652 that is a moving subject. Also, the motion vectors 772 and 773 are motion vectors (local vectors) in a block including a part of the face area 657 of the face 656 of the human 655 that is a moving subject. The motion vector 774 is a motion vector (local vector) in a block including a part of the torso portion of the human 655 that is a moving subject.

ブレ補正部410が有する電子的ブレ補正手段は、1つの画像に対して複数得られたローカルな動きベクトルから、ローカルな補正を行うことが可能である。   The electronic shake correction means included in the shake correction unit 410 can perform local correction from a plurality of local motion vectors obtained for one image.

図17に示す画像711については、ブレ補正部410の電子的ブレ補正手段は、動きベクトル759乃至768に係る各ブロックについては、同一の動きベクトルであるため、同一のローカルな補正を行う。一方、動きベクトル769乃至774に係るブロックについては、動きベクトル769乃至774に応じたローカルな補正を行う。つまり、動被写体である人間655の顔656や胴体部分が移動しているような場合には、その移動に合わせてブレを補正することができる。   With respect to the image 711 shown in FIG. 17, the electronic shake correction unit of the shake correction unit 410 performs the same local correction because the blocks related to the motion vectors 759 to 768 have the same motion vector. On the other hand, for the blocks related to the motion vectors 769 to 774, local correction according to the motion vectors 769 to 774 is performed. That is, when the face 656 or the torso of the human 655 that is a moving subject is moving, the shake can be corrected in accordance with the movement.

このように、分割されたブロック毎に顔の少なくとも一部の領域があるか否かの判定を行い、この判定結果をブッロクに対応させて保存するとともに、顔領域および背景領域のそれぞれの平均ベクトルを算出し、算出された平均ベクトルを保存し、これらの平均ベクトルに基づいてブレ補正量を算出する。なお、顔領域から推定される動被写体領域(例えば、その人物の胴体部分や腕・脚部分)についても顔の一部と判定し、顔領域とともに、または、顔領域および顔以外の動被写体領域のそれぞれについての平均ベクトルを算出するようにしてもよい。これにより、被写体である人間の顔についてブレが少ない鮮鋭な画像を撮影することができる。特に人の顔の付近については、ブレを十分に抑圧することができ、主要な被写体を高画質で撮影することができる。また、背景ブレや背景の物体の動きに影響を受けることなく、人物の顔に自動的に重点をおいて、効果的にブレ補正を実現することができる。   In this way, it is determined whether or not there is at least a partial area of the face for each divided block, and the determination result is stored in correspondence with the block, and the average vector of each of the face area and the background area is stored. Is calculated, the calculated average vector is stored, and a blur correction amount is calculated based on these average vectors. Note that a moving subject area estimated from the face area (for example, the torso part or arm / leg part of the person) is also determined as a part of the face, and together with the face area or a moving subject area other than the face area and face. An average vector may be calculated for each of the above. As a result, a sharp image with less blur can be taken with respect to the human face as the subject. Particularly in the vicinity of a human face, blurring can be sufficiently suppressed, and a main subject can be photographed with high image quality. In addition, it is possible to effectively achieve blur correction by automatically focusing on a person's face without being affected by background blur or movement of an object on the background.

次に、図17で示すブレ補正方法の動作について図18を参照して説明する。   Next, the operation of the blur correction method shown in FIG. 17 will be described with reference to FIG.

図18は、撮像装置100によるブレ補正量算出処理の処理手順を示すフローチャートである。   FIG. 18 is a flowchart illustrating a processing procedure of blur correction amount calculation processing by the imaging apparatus 100.

最初に、撮像装置100において撮像部120が撮像した画像である撮影画像が入力される(ステップS921)。撮像部120から撮影画像が入力されると、顔検出の設定がONにされているか否かが判断される(ステップS922)。顔検出の設定がOFFであれば(ステップS922)、顔に基づくブレ補正をする必要がなく、通常のブレ補正処理によりブレ補正量が算出され、算出されたブレ補正量をブレ補正部410に出力する(ステップ938)。   First, a captured image that is an image captured by the image capturing unit 120 in the image capturing apparatus 100 is input (step S921). When a captured image is input from the imaging unit 120, it is determined whether the face detection setting is turned on (step S922). If the face detection setting is OFF (step S922), it is not necessary to perform face-based blur correction, the blur correction amount is calculated by normal blur correction processing, and the calculated blur correction amount is input to the blur correction unit 410. Output (step 938).

顔検出の設定がONにされていれば(ステップS922)、顔検出部300は、入力された画像から顔を検出するとともに検出された各顔の各種情報を算出する(ステップS923)。   If the face detection setting is ON (step S922), the face detection unit 300 detects a face from the input image and calculates various information of each detected face (step S923).

続いて、入力された画像が複数の領域(ブロック)に分割される(ステップS924)。例えば、入力された画像がN個のブロックに分割されたとする。   Subsequently, the input image is divided into a plurality of regions (blocks) (step S924). For example, assume that the input image is divided into N blocks.

続いて、複数の領域の中から1つのブロックが取り出され(ステップS925)、取り出されたブロックに顔が含まれているか否かが判断される(ステップS926)。取り出されたブロックに顔が含まれていれば(ステップS926)、取り出されたブロックにおける動きベクトルが検出されるとともに、検出された動きベクトルが顔用の配列に記憶される(ステップS927)。続いて、取り出されたブロックに対応する顔/背景判定情報として「顔」が記憶される(ステップS928)。なお、複数の顔が検出されている場合には、各顔についての顔用の配列に各動きベクトルが記憶され、取り出されたブロックに対応する顔/背景判定情報として各顔の情報が記憶される。   Subsequently, one block is extracted from the plurality of areas (step S925), and it is determined whether or not a face is included in the extracted block (step S926). If the extracted block includes a face (step S926), the motion vector in the extracted block is detected, and the detected motion vector is stored in the face array (step S927). Subsequently, “face” is stored as face / background determination information corresponding to the extracted block (step S928). When a plurality of faces are detected, each motion vector is stored in the face array for each face, and information on each face is stored as face / background determination information corresponding to the extracted block. The

一方、取り出されたブロックに顔が含まれていなければ(ステップS926)、取り出されたブロックにおける動きベクトルが検出されるとともに、検出された動きベクトルが背景用の配列に記憶される(ステップS929)。続いて、取り出されたブロックに対応する顔/背景判定情報として「背景」が記憶される(ステップS930)。   On the other hand, if the extracted block does not contain a face (step S926), the motion vector in the extracted block is detected and the detected motion vector is stored in the background array (step S929). . Subsequently, “background” is stored as face / background determination information corresponding to the extracted block (step S930).

続いて、複数のブロックの全てのブロックが取り出されたか否かが判断される(ステップS931)。全てのブロックが取り出されていなければ(ステップS931)、ステップS925に進み、各ブロックの動きベクトルの検出処理を繰り返す(ステップS925乃至S930)。   Subsequently, it is determined whether or not all the blocks of the plurality of blocks have been extracted (step S931). If all the blocks have not been extracted (step S931), the process proceeds to step S925, and the motion vector detection process for each block is repeated (steps S925 to S930).

全てのブロックが取り出されていれば(ステップS931)、顔用の配列に記憶されている動きベクトルに基づいて顔領域に関する平均ベクトルが算出されるとともに、背景用の配列に記憶されている動きベクトルに基づいて背景領域に関する平均ベクトルが算出される(ステップS932)。なお、複数の顔が検出されている場合には、各顔についての顔領域に関する平均ベクトルが算出される。   If all the blocks have been extracted (step S931), an average vector for the face area is calculated based on the motion vector stored in the face array and the motion vector stored in the background array. Based on the above, an average vector related to the background region is calculated (step S932). When a plurality of faces are detected, an average vector related to the face area for each face is calculated.

続いて、複数の領域の中から1つのブロックが取り出され(ステップS933)、取り出されたブロックに対応する顔/背景判定情報に「顔」が記憶されているか否かが判断される(ステップS934)。取り出されたブロックに対応する顔/背景判定情報に「顔」が記憶されていれば(ステップS934)、顔領域に関する平均ベクトルに基づいて、取り出されたブロックに対応するブレ補正量が算出される(ステップS935)。一方、取り出されたブロックに対応する顔/背景判定情報に「背景」が記憶されていれば(ステップS934)、背景領域に関する平均ベクトルに基づいて、取り出されたブロックに対応するブレ補正量が算出される(ステップS936)。   Subsequently, one block is extracted from the plurality of areas (step S933), and it is determined whether or not “face” is stored in the face / background determination information corresponding to the extracted block (step S934). ). If “face” is stored in the face / background determination information corresponding to the extracted block (step S934), the blur correction amount corresponding to the extracted block is calculated based on the average vector regarding the face area. (Step S935). On the other hand, if “background” is stored in the face / background determination information corresponding to the extracted block (step S934), the blur correction amount corresponding to the extracted block is calculated based on the average vector regarding the background region. (Step S936).

続いて、複数のブロックの全てのブロックが取り出されたか否かが判断される(ステップS937)。全てのブロックが取り出されていなければ(ステップS937)、ステップS933に進み、各ブロックの補正量の算出処理を繰り返す(ステップS933乃至S936)。   Subsequently, it is determined whether or not all the blocks of the plurality of blocks have been extracted (step S937). If all the blocks have not been extracted (step S937), the process proceeds to step S933, and the correction amount calculation process for each block is repeated (steps S933 to S936).

全てのブロックが取り出されていれば(ステップS937)、算出された各ブロックの補正量がブレ補正部410に出力される(ステップS938)。   If all the blocks have been extracted (step S937), the calculated correction amount of each block is output to the blur correction unit 410 (step S938).

以上で示したように、N個のブロックの全てについて動きベクトルを検出し、各ブロックにおける動きベクトルに基づいて顔領域および背景領域に応じた平均ベクトルを算出し、算出された平均ベクトルに基づいて各ブロックにおける顔領域および背景領域に応じた補正量を算出する。この補正量は、ブレ補正部410へ与えられ、ブレと反対方向に補正が行われて、出力画像ではブレの十分に少ない良好な画像が得られる。特に背景よりも人物の顔部分に対してブレが抑圧され、主要な被写体を鮮鋭に撮影することができる。   As described above, a motion vector is detected for all N blocks, an average vector corresponding to the face area and the background area is calculated based on the motion vector in each block, and based on the calculated average vector A correction amount corresponding to the face area and background area in each block is calculated. This correction amount is given to the blur correction unit 410, and correction is performed in the direction opposite to the blur, so that a good image with sufficiently small blur is obtained in the output image. In particular, the blurring is suppressed on the face portion of the person rather than the background, and the main subject can be photographed sharply.

次に、顔領域を含む動被写体領域についてのローカルな動きベクトルに基づいた補正量を、撮影画像の中央寄りになるように算出することによって、人物の像を常に画像の中央付近に移動するブレ補正について説明する。   Next, by calculating the correction amount based on the local motion vector for the moving subject area including the face area so as to be closer to the center of the captured image, the image of the person is always moved near the center of the image. The correction will be described.

図19は、顔領域を含む動被写体領域が撮影画像の中央寄りになるように算出する場合における概略を示す図である。   FIG. 19 is a diagram illustrating an outline in the case where calculation is performed so that the moving subject region including the face region is closer to the center of the captured image.

図19(a)に示すように、画像712について算出されたグローバルな補正量(補正ベクトル)がベクトルaである場合には、画像712に含まれる顔領域についてもベクトルaだけブレ補正処理が行われる。   As shown in FIG. 19A, when the global correction amount (correction vector) calculated for the image 712 is the vector a, the blur correction process is performed on the face area included in the image 712 by the vector a. Is called.

例えば、図19(b)に示すように、画像714に含まれる人間の顔658が画像の中央付近に存在しない場合には、ブレ補正とともに人間の顔658を画像714の中央付近に移動させることができる。   For example, as shown in FIG. 19B, when the human face 658 included in the image 714 does not exist near the center of the image, the human face 658 is moved near the center of the image 714 together with the blur correction. Can do.

例えば、画像714について算出されたグローバルな補正量がベクトルaである場合において、画像の中央に移動するためのベクトルbを求め、このベクトルbに重み付け係数W6を乗じ、ベクトルaとの合成でローカルな補正を行う(式2)。なお、ベクトルbは、顔の座標と画像中心の座標との差異によって算出されるベクトルである。また、w6は、重み付け係数であり、例えば0.1〜0.5の値を用いることができる。
補正量=ベクトルa+w6×ベクトルb……(式2)
For example, when the global correction amount calculated for the image 714 is the vector a, the vector b for moving to the center of the image is obtained, the vector b is multiplied by the weighting coefficient W6, and the combination with the vector a is local Correction is performed (Formula 2). The vector b is a vector calculated from the difference between the face coordinates and the image center coordinates. Moreover, w6 is a weighting coefficient and can use the value of 0.1-0.5, for example.
Correction amount = vector a + w6 × vector b (Expression 2)

これにより、顔領域のブレ補正とともに、フレーミングの補正との双方を同時に行うことができる。   Thereby, both the blur correction of the face area and the framing correction can be performed simultaneously.

また、顔領域、および顔領域から推定される人物の領域はローカルなベクトルで補正し、それ以外の背景部分は全体的な(グローバルな)ベクトルで補正することが可能となり、画像の各領域においてそれぞれ最適なブレ補正ができる。   In addition, the face area and the person area estimated from the face area can be corrected with local vectors, and other background parts can be corrected with global (global) vectors. Each can perform the optimal blur correction.

また、顔領域、および顔領域から推定される動被写体領域に対するローカルな補正ベクトルを、画像の中央寄りになるよう算出することにより、人物の像を画像の中央へと移動するようなブレ補正を行い、さらに適正なフレーミングを実現することができる。   In addition, by calculating a local correction vector for the face area and the moving subject area estimated from the face area so as to be closer to the center of the image, blur correction is performed such that the image of the person moves to the center of the image. And more appropriate framing can be achieved.

次に、動きベクトルの検出方法の一つとして、上述したブロックマッチング方式の画像処理による動きベクトル検出方法以外の動きベクトル検出方法の例について図面を参照して説明する。   Next, as one of motion vector detection methods, an example of a motion vector detection method other than the above-described motion vector detection method based on block matching image processing will be described with reference to the drawings.

図20は、顔検出部300が検出した顔領域に基づいて撮影画像から動きベクトルを検出する場合における動きベクトル検出方法の一例を示す図である。   FIG. 20 is a diagram illustrating an example of a motion vector detection method when a motion vector is detected from a captured image based on the face area detected by the face detection unit 300.

顔検出部300が検出した顔領域に基づく動きベクトル検出方法とは、図20に示すように、動画像を構成する時間的に連続する前フレーム画像(画像715)および現フレーム画像(画像716)における顔領域に基づいて検出する方法である。なお、現フレーム画像(画像716)は、前フレーム画像(画像715)の所定時間t経過後のフレームである。また、ブレ検出手段(移動量算出手段)として、振動センサ200と、顔検出部300が検出した顔領域に基づく動きベクトル検出手段の両方を利用する。   As shown in FIG. 20, the motion vector detection method based on the face area detected by the face detection unit 300 is a temporally continuous previous frame image (image 715) and current frame image (image 716) constituting a moving image. It is a method of detecting based on the face area in The current frame image (image 716) is a frame after a predetermined time t has elapsed from the previous frame image (image 715). Further, both the vibration sensor 200 and the motion vector detection unit based on the face area detected by the face detection unit 300 are used as the shake detection unit (movement amount calculation unit).

図20(a)は、前フレーム画像(画像715)において、人間660およびその顔661と、顔検出部300により検出された顔661の顔領域662とを示す図である。   FIG. 20A is a diagram showing a person 660, its face 661, and a face area 662 of the face 661 detected by the face detection unit 300 in the previous frame image (image 715).

図20(b)は、現フレーム画像(画像716)において、人間660およびその顔661と、顔検出部300により検出された顔661の顔領域663と、振動センサ200により検出された手振れベクトル680と、顔検出部300が検出した顔領域に基づいて検出された動きベクトル681とを示す図である。このように、図20(b)には、手振れベクトル681と顔領域に基づく動きベクトル681とを合成した場合を示す。   FIG. 20B shows the human 660 and its face 661, the face area 663 of the face 661 detected by the face detection unit 300, and the hand movement vector 680 detected by the vibration sensor 200 in the current frame image (image 716). And a motion vector 681 detected based on the face area detected by the face detection unit 300. As described above, FIG. 20B shows a case where the camera shake vector 681 and the motion vector 681 based on the face area are combined.

例えば、現フレーム画像(画像716)において顔検出部300により顔領域が検出された場合には、検出された1または複数の顔についての顔領域の座標、顔らしさの値、顔の向きの値等の各種情報に基づいて総合的な評価値Enを求める。例えば、次の(式3)を用いて、総合的な評価値Enを求める。なお、w1乃至w5は、それぞれの顔評価値の重み付け係数である。
En=w1×顔領域の面積
+w2×顔領域の座標
+w3×顔らしさの値
+w4×正面向きの度合い
+w5×顔の傾きの度合い……(式3)
For example, when a face area is detected by the face detection unit 300 in the current frame image (image 716), the coordinates of the face area, the face-likeness value, and the face orientation value for one or more detected faces. A comprehensive evaluation value En is obtained based on various information such as. For example, a comprehensive evaluation value En is obtained using the following (Expression 3). Note that w1 to w5 are weighting coefficients of the respective face evaluation values.
En = w1 × face area area + w2 × face area coordinates + w3 × face-like value + w4 × frontal degree + w5 × face inclination degree (Equation 3)

なお、(式3)で示す顔に関する各種情報以外の情報を用いて総合的な評価値Enを求めるようにしてもよく、各評価値を統合せずに、個々に用いてもよい。また、(式3)で示す総合的な評価値Enは一例であり、他の各種情報に基づいて総合的な評価値Enを求めるようにしてもよい。   Note that the comprehensive evaluation value En may be obtained using information other than the various types of information related to the face shown in (Expression 3), or may be used individually without integrating the evaluation values. Moreover, the comprehensive evaluation value En shown by (Formula 3) is an example, and you may make it obtain | require the comprehensive evaluation value En based on other various information.

また、前フレーム画像(画像715)において現フレーム画像(画像716)で検出された顔領域の近傍を含む広めのサーチ範囲を設定する。この設定されたサーチ範囲において、顔検出部300により検出された顔領域に関する評価値と相関の高い顔を探索する。探索した結果、顔評価値が類似する顔が前フレームと現フレームとの双方に存在する場合には、その間のベクトルを動きベクトル(顔領域ベクトル)と判定する。   In addition, a wider search range including the vicinity of the face area detected in the current frame image (image 716) in the previous frame image (image 715) is set. In the set search range, a face having a high correlation with the evaluation value related to the face area detected by the face detection unit 300 is searched. As a result of the search, if faces having similar face evaluation values exist in both the previous frame and the current frame, the vector between them is determined as a motion vector (face region vector).

また、振動センサ200により検出された画像に依存しない手振れベクトルを用いて、次の(式4)を用いて、最終的な補正ベクトルを求める。なお、w7、w8は、それぞれの重み付け係数である。なお、w8は、上述したw6と同じ値を用いるようにしてもよい。
補正ベクトル=手振れ成分の補正ベクトル
+w7×顔領域の動きベクトル
+w8×顔から画面中心までのベクトル……(式4)
In addition, a final correction vector is obtained by using the following (Equation 4) using a camera shake vector that does not depend on the image detected by the vibration sensor 200. Note that w7 and w8 are respective weighting coefficients. Note that w8 may be the same value as w6 described above.
Correction vector = correction vector for camera shake components
+ W7 × face area motion vector
+ W8 x vector from face to center of screen ... (Formula 4)

なお、顔領域が複数検出された場合には、(式4)を用いて算出された補正ベクトルを1フレームに対して1つの補正ベクトルに統合するようにしてもよく、それぞれの顔領域に最適な補正ベクトルをローカルに適用してブレ補正するようにしてもよい。   When a plurality of face areas are detected, the correction vector calculated using (Equation 4) may be integrated into one correction vector for each frame, and is optimal for each face area. A correction vector may be applied locally to correct blur.

次に、顔領域に基づく動きベクトルを用いたブレ補正方法の動作について図21を参照して説明する。   Next, the operation of the shake correction method using the motion vector based on the face area will be described with reference to FIG.

図21は、撮像装置100によるブレ補正量算出処理の処理手順を示すフローチャートである。   FIG. 21 is a flowchart illustrating a processing procedure of blur correction amount calculation processing by the imaging apparatus 100.

最初に、撮像装置100において撮像部120が撮像した画像である撮影画像が入力される(ステップS941)。撮像部120から撮影画像が入力されると、顔検出の設定がONにされているか否かが判断される(ステップS942)。顔検出の設定がOFFであれば(ステップS942)、振動センサ200が検出した手振れベクトルに基づいて、ブレ補正量である補正量3を算出し(ステップS950)、ステップS951に進む。   First, a captured image that is an image captured by the image capturing unit 120 in the image capturing apparatus 100 is input (step S941). When a captured image is input from the imaging unit 120, it is determined whether the face detection setting is turned on (step S942). If the face detection setting is OFF (step S942), based on the camera shake vector detected by the vibration sensor 200, a correction amount 3 that is a shake correction amount is calculated (step S950), and the process proceeds to step S951.

顔検出の設定がONにされていれば(ステップS942)、顔検出部300は、入力された画像から顔を検出するとともに検出された各顔の各種情報を算出する(ステップS943)。   If the face detection setting is ON (step S942), the face detection unit 300 detects a face from the input image and calculates various information of each detected face (step S943).

続いて、顔検出部300により検出された各顔の各種情報に基づいて総合的な評価値Enを求める。例えば、次の(式3)を用いて、総合的な評価値Enを求める(ステップS944)。続いて、動画像を構成する時間的に連続する前フレーム画像において現フレーム画像で検出された顔領域の近傍を含む広めのサーチ範囲を設定し、このサーチ範囲において、顔検出部300により検出された顔領域に関する評価値と相関の高い顔が存在するか否かが判断される(ステップS945)。このサーチ範囲において、顔領域に関する評価値と相関の高い顔が存在しなければ(ステップS945)、顔領域に基づく動きベクトルを検出することができないため、ステップS950に進む。   Subsequently, a comprehensive evaluation value En is obtained based on various information of each face detected by the face detection unit 300. For example, a comprehensive evaluation value En is obtained using the following (Equation 3) (step S944). Subsequently, a wide search range including the vicinity of the face area detected in the current frame image is set in the temporally continuous previous frame image constituting the moving image, and the face detection unit 300 detects the search range in this search range. It is determined whether or not there is a face highly correlated with the evaluation value related to the face area (step S945). If there is no face highly correlated with the evaluation value related to the face area in this search range (step S945), a motion vector based on the face area cannot be detected, and the process proceeds to step S950.

一方、このサーチ範囲において、顔領域に関する評価値と相関の高い顔が存在していれば(ステップS945)、前フレームと現フレームとの双方に存在する相関の高い顔と判断された各顔領域に基づいて、その間のベクトルを動きベクトル(顔領域の動きベクトル)と判定する(ステップS946)。   On the other hand, in the search range, if there is a face highly correlated with the evaluation value related to the face area (step S945), each face area determined to be a highly correlated face existing in both the previous frame and the current frame. Based on, a vector between them is determined as a motion vector (a motion vector of the face area) (step S946).

続いて、振動センサ200が検出した手振れベクトルに基づいて、ブレ補正量である補正量1を算出し(ステップS947)、算出された補正量1と検出された顔領域の動きベクトルとに基づいて、次の(式5)を用いて補正量2を算出する(ステップS948)。
補正量2=補正量1
+w7×顔領域の動きベクトル……(式5)
Subsequently, based on the camera shake vector detected by the vibration sensor 200, a correction amount 1 that is a shake correction amount is calculated (step S947), and based on the calculated correction amount 1 and the detected motion vector of the face area. Then, the correction amount 2 is calculated using the following (Equation 5) (step S948).
Correction amount 2 = correction amount 1
+ W7 × Face area motion vector (Equation 5)

続いて、算出された補正量2と、次の(式6)を用いて補正量3を算出する(ステップS949)。
補正量3=補正量2
+w8×顔から画面中心までのベクトル……(式6)
Subsequently, the correction amount 3 is calculated using the calculated correction amount 2 and the following (Equation 6) (step S949).
Correction amount 3 = correction amount 2
+ W8 × vector from the face to the center of the screen (Equation 6)

なお、ステップS948およびS949では、上記で示した(式4)の値を求める。また、W7、W8は、上記で示した重み付け係数と同じものである。   In steps S948 and S949, the value of (Equation 4) shown above is obtained. W7 and W8 are the same as the weighting coefficients shown above.

続いて、ステップS949またはステップS950で算出された補正量3に基づいて、撮影画像全体のブレ補正量を算出し、算出されたブレ補正量がブレ補正部410に出力される(ステップS951)。   Subsequently, based on the correction amount 3 calculated in step S949 or S950, the blur correction amount of the entire captured image is calculated, and the calculated blur correction amount is output to the blur correction unit 410 (step S951).

これにより、顔領域についてのブレ補正処理とともに、顔が画像中心に向かって移動するようなフレーミング補正を同時に実現することができるため、顔領域のブレを抑圧するとともに、フレーミングのバランスのよい、より好ましい出力画像を得ることができる。なお、(式1)等で示す数値や式等は一例であり、他の数値や式等を用いるようにしてもよい。   As a result, it is possible to simultaneously realize the framing correction such that the face moves toward the center of the image together with the blur correction process for the face area, so that the blur of the face area is suppressed and the framing balance is better. A preferable output image can be obtained. Note that the numerical values and expressions shown in (Expression 1) and the like are examples, and other numerical values and expressions may be used.

以上で示したように、本発明の実施の形態によれば、ブレが少ない鮮鋭な画像を撮影することができる。特に人の顔の付近については、ブレを適切に補正することができるため、主要な被写体を高画質で撮影することができる。   As described above, according to the embodiment of the present invention, a sharp image with little blur can be taken. Particularly in the vicinity of a human face, blurring can be appropriately corrected, so that a main subject can be photographed with high image quality.

また、背景ブレや背景の物体の動きに関する影響を低減させることができるため、人物の顔に重点をおいて効果的にブレ補正を実現することができる。   In addition, since it is possible to reduce the influence of background blur and background object movement, it is possible to effectively achieve blur correction with emphasis on the face of a person.

さらに、顔領域の座標、画像内での位置、面積、顔らしさの値、正面向きの度合い、顔の傾きの度合い等に基づいて、ブレ補正量の重み付け処理を実行することができ、適切なブレ補正量を算出することができる。   Furthermore, it is possible to execute a blur correction amount weighting process based on the coordinates of the face region, the position in the image, the area, the value of the face-likeness, the degree of frontal orientation, the degree of inclination of the face, etc. The amount of blur correction can be calculated.

また、画面全体で1つのベクトルを用いて全体的にブレを補正することができるとともに、画面内の複数のベクトルを用いてローカルにブレを補正することができるため、被写体に応じて適切にブレ補正をすることができる。   In addition, it is possible to correct blur entirely using a single vector on the entire screen, and to correct blur locally using a plurality of vectors in the screen. Corrections can be made.

さらに、ローカルなブレ補正をする場合には、顔領域をなるべく画像の中央寄りに移動させるような補正ベクトルを算出することによって、主要な被写体としての人物をより適切なフレーミングにすることができる。   Furthermore, in the case of local blur correction, a person as a main subject can be more appropriately framed by calculating a correction vector that moves the face region as close to the center of the image as possible.

また、ブレ検出手段およびブレ補正手段として電子的なブレ検出手段およびブレ補正手段のみを撮像装置に設けるようにする場合には、撮像装置としての小型化、低コスト化、省電力化を可能とすることができる。   Further, when only the electronic shake detection means and the shake correction means are provided in the image pickup apparatus as the shake detection means and the shake correction means, it is possible to reduce the size, cost and power consumption of the image pickup apparatus. can do.

さらに、人物のグループの画像(いわゆる集合写真)を判別することによって、いわゆる集合写真に適した重み付け処理を実行することができるため、適切な集合写真を撮影することができる。   Furthermore, by discriminating an image of a group of people (a so-called group photo), a weighting process suitable for a so-called group photo can be executed, so that an appropriate group photo can be taken.

また、主たる被写体の人物と、背景に混在する人物とを判別することによって、背景の人物の影響を低減させることができるため、主たる被写体の人物に対する最適なブレ補正を実現することができる。   Further, since the influence of the person in the background can be reduced by discriminating between the person of the main subject and the person mixed in the background, it is possible to realize the optimum blur correction for the person of the main subject.

さらに、画面内に複数の顔が存在する場合には、フォーカスや露出が最も適正な顔を選び出し、その領域のブレを重点的に補正することによって最適なブレ補正を実現することができ、適切な写真を撮影することができる。   In addition, when there are multiple faces on the screen, the most suitable blur correction can be realized by selecting the face with the most appropriate focus and exposure and correcting the blur in that area. You can take pictures.

また、撮影画像から特定人物の顔が検出された場合には、特定人物に係る重み付け係数を大きめ値に変更することによって、特定人物に最適なブレ補正を実現することができる。   In addition, when a face of a specific person is detected from the captured image, it is possible to realize blur correction optimum for the specific person by changing the weighting coefficient related to the specific person to a larger value.

さらに、動きベクトル検出の結果から顔領域付近のブレ成分を減算することによって、動被写体の動きに引かれない画像全体のブレ成分を抽出することができる。   Furthermore, by subtracting the blur component in the vicinity of the face area from the result of motion vector detection, the blur component of the entire image that is not attracted by the motion of the moving subject can be extracted.

また、従来から知られているブロックマッチング方式の動きベクトル検出方法の代わりに、顔領域の移動ベクトルを検出することによって動きベクトルを検出する方法を用いることもできる。これにより、ブロックマッチング方式の動きベクトル検出方法と同様に、それぞれの顔領域に最適なローカル補正を実現することができ、顔が複数存在している場合であってもそれぞれの顔のブレを適正に補正することができる。   Further, instead of the conventionally known block matching type motion vector detection method, a method of detecting a motion vector by detecting a movement vector of a face region may be used. As a result, similar to the block matching motion vector detection method, it is possible to achieve optimal local correction for each face area, and even if there are multiple faces, each face is properly shaken. Can be corrected.

このように、本発明の実施の形態によれば、画像に含まれるブレを適切に補正することができる。   Thus, according to the embodiment of the present invention, it is possible to appropriately correct blur included in an image.

なお、デジタルスチルカメラ等から出力された画像を入力し、入力された画像をディスプレイ等に表示するパーソナルコンピュータ等の画像処理装置に本実施の形態を適用することができる。   Note that the present embodiment can be applied to an image processing apparatus such as a personal computer that inputs an image output from a digital still camera or the like and displays the input image on a display or the like.

なお、本発明の実施の形態は本発明を具現化するための一例を示したものであり、以下に示すように特許請求の範囲における発明特定事項とそれぞれ対応関係を有するが、これに限定されるものではなく本発明の要旨を逸脱しない範囲において種々の変形を施すことができる。   The embodiment of the present invention is an example for embodying the present invention and has a corresponding relationship with the invention-specific matters in the claims as shown below, but is not limited thereto. However, various modifications can be made without departing from the scope of the present invention.

すなわち、請求項1において、撮像手段は、例えば撮像部120に対応する。   That is, in claim 1, the imaging unit corresponds to the imaging unit 120, for example.

また、請求項1、請求項5、請求項17において、顔検出手段は、顔検出部300に対応する。   In claim 1, claim 5, and claim 17, the face detection unit corresponds to the face detection unit 300.

また、請求項1、請求項8、請求項16、請求項17において、移動量検出手段は、例えば動きベクトル検出部400に対応する。   Further, in claims 1, 8, 16, and 17, the movement amount detection unit corresponds to, for example, the motion vector detection unit 400.

また、請求項1、請求項9、請求項15、請求項17において、ブレ補正手段は、例えばブレ補正部410に対応する。   Further, in claims 1, 9, 15, and 17, the shake correction unit corresponds to, for example, the shake correction unit 410.

また、請求項2乃至請求項7、請求項10、請求項12乃至請求項14において、補正量算出手段は、例えば補正量算出部440に対応する。   Further, in claims 2 to 7, 10, and 12 to 14, the correction amount calculation means corresponds to, for example, the correction amount calculation unit 440.

また、請求項9において、振動検出手段は、例えば振動センサ200に対応する。   Further, in claim 9, the vibration detecting means corresponds to the vibration sensor 200, for example.

また、請求項10において、カメラ制御値検出手段は、例えば制御部110に対応する。   In claim 10, camera control value detection means corresponds to the control unit 110, for example.

また、請求項11において、設定手段は、例えば選択受付部162に対応する。   In claim 11, the setting means corresponds to, for example, the selection receiving unit 162.

また、請求項12において、特定人物記憶手段は、メモリ210に対応する。また、特定人物判定手段は、例えば制御部110に対応する。   Further, in claim 12, the specific person storage means corresponds to the memory 210. The specific person determination unit corresponds to the control unit 110, for example.

また、請求項17において、画像入力手段は、例えば信号処理部130に対応する。   The image input means corresponds to the signal processing unit 130, for example.

また、請求項18または請求項19において、画像入力手順は、ステップS901に対応する。また、顔検出手順は、ステップS903に対応する。また、移動量検出手順は、ステップS907に対応する。また、ブレ補正手順は、ステップS916に対応する。   Further, in claim 18 or claim 19, the image input procedure corresponds to step S <b> 901. The face detection procedure corresponds to step S903. The movement amount detection procedure corresponds to step S907. The blur correction procedure corresponds to step S916.

なお、本発明の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。   The processing procedure described in the embodiment of the present invention may be regarded as a method having a series of these procedures, and a program for causing a computer to execute these series of procedures or a recording medium storing the program May be taken as

本発明の実施の形態における撮像装置100の機能構成例を示すブロック図である。It is a block diagram which shows the function structural example of the imaging device 100 in embodiment of this invention. 顔検出部300の機能構成例を示すブロック図である。3 is a block diagram illustrating an exemplary functional configuration of a face detection unit 300. FIG. 本発明の実施の形態における撮像装置100における画像のブレ補正に関する機能構成例を示すブロック図である。It is a block diagram which shows the function structural example regarding the blurring correction of the image in the imaging device 100 in embodiment of this invention. 動きベクトル検出部400がブロックマッチング方式の画像処理によって撮影画像から動きベクトルを検出する場合における画像分割の一例を示す図である。It is a figure which shows an example of an image division in case the motion vector detection part 400 detects a motion vector from a picked-up image by the image processing of a block matching system. 動きベクトル検出部400がブロックマッチング方式の画像処理によって撮影画像から動きベクトルを検出する場合における前フレーム540と現フレーム550との関係の一例を示す図である。It is a figure which shows an example of the relationship between the front frame 540 and the present frame 550 in case the motion vector detection part 400 detects a motion vector from a picked-up image by the image processing of a block matching system. 動きベクトル検出部400がブロックマッチング方式の画像処理によって撮影画像から動きベクトルを検出する場合における画像分割の例を示す図である。It is a figure which shows the example of an image division in case the motion vector detection part 400 detects a motion vector from a picked-up image by the image processing of a block matching system. 動きベクトル検出部400が画像580から検出した動きベクトルの例を示す図である。6 is a diagram illustrating an example of a motion vector detected from an image 580 by a motion vector detection unit 400. FIG. 人間の顔613、615、617が含まれている画像701を示す図である。It is a figure which shows the image 701 in which the human face 613, 615, 617 is contained. 複数の人間の顔が含まれている撮影画像の例を示す図である。It is a figure which shows the example of the picked-up image containing the several human face. 複数の人間の顔が含まれている撮影画像の例を示す図である。It is a figure which shows the example of the picked-up image containing the several human face. 複数の人間の顔が含まれている撮影画像の例を示す図である。It is a figure which shows the example of the picked-up image containing the several human face. 複数の人間の顔が含まれている撮影画像の例を示す図である。It is a figure which shows the example of the picked-up image containing the several human face. 撮像装置100によるブレ補正量算出処理の処理手順を示すフローチャートである。12 is a flowchart illustrating a processing procedure of blur correction amount calculation processing by the imaging apparatus. 人間648が含まれている画像707において、9分割された各ブロックから算出された動きベクトル751乃至759を示す図である。It is a figure which shows the motion vector 751 thru | or 759 calculated from each block divided into 9 in the image 707 in which the person 648 is included. 撮像装置100本体のブレ成分201と、画像の各部分におけるブレ成分401とに基づいて、被写体のブレ成分を抽出する抽出方法の一例を示す図である。It is a figure which shows an example of the extraction method which extracts the blur component of a to-be-photographed object based on the blur component 201 of the imaging device 100 main body, and the blur component 401 in each part of an image. 画像708の各部分における動きベクトルと、画像708に含まれる人間651の動きベクトルとに基づいて、画像708に含まれる背景部分のブレ成分を抽出する抽出方法の一例を示す図である。10 is a diagram illustrating an example of an extraction method for extracting a blur component of a background portion included in an image 708 based on a motion vector in each portion of the image 708 and a motion vector of a human 651 included in the image 708. FIG. 人間652および人間655が含まれている画像711において、16分割された各ブロックから算出された動きベクトル759乃至774を示す図である。It is a figure which shows the motion vector 759 thru | or 774 calculated from each block divided | segmented into 16 in the image 711 containing the human 652 and the human 655. FIG. 撮像装置100によるブレ補正量算出処理の処理手順を示すフローチャートである。12 is a flowchart illustrating a processing procedure of blur correction amount calculation processing by the imaging apparatus. 顔領域を含む動被写体領域が撮影画像の中央寄りになるように算出する場合における概略を示す図である。It is a figure which shows the outline in the case of calculating so that the moving subject area | region including a face area | region may become near the center of a picked-up image. 顔検出部300が検出した顔領域に基づいて撮影画像から動きベクトルを検出する場合における動きベクトル検出方法の一例を示す図である。It is a figure which shows an example of the motion vector detection method in the case of detecting a motion vector from a picked-up image based on the face area | region which the face detection part 300 detected. 撮像装置100によるブレ補正量算出処理の処理手順を示すフローチャートである。12 is a flowchart illustrating a processing procedure of blur correction amount calculation processing by the imaging apparatus.

符号の説明Explanation of symbols

100 撮像装置
110 制御部
120 撮像部
121 光学系
122 撮像素子
130 信号処理部
140 画像記憶部
150 画像圧縮伸張部
160 ユーザインターフェース
161 表示部
162 選択受付部
170 入出力端子
180 記憶媒体
190 バス
200 振動センサ
210 メモリ
300 顔検出部
310 制御部
320 画像入力部
330 画像拡大縮小部
340 画像保持部
350 基準データ保持部
360 判定部
370 検出結果出力部
380 画像出力部
400 動きベクトル検出部
410 ブレ補正部
420 画像入力部
430 画像出力部
440 補正量算出部
DESCRIPTION OF SYMBOLS 100 Image pick-up device 110 Control part 120 Image pick-up part 121 Optical system 122 Image pick-up element 130 Signal processing part 140 Image memory | storage part 150 Image compression / expansion part 160 User interface 161 Display part 162 Selection reception part 170 Input / output terminal 180 Storage medium 190 Bus 200 Vibration sensor 210 memory 300 face detection unit 310 control unit 320 image input unit 330 image enlargement / reduction unit 340 image holding unit 350 reference data holding unit 360 determination unit 370 detection result output unit 380 image output unit 400 motion vector detection unit 410 motion correction unit 420 image Input unit 430 Image output unit 440 Correction amount calculation unit

Claims (19)

被写体の画像を撮像する撮像手段と、
前記撮像手段により撮像された画像から顔を検出する顔検出手段と、
前記撮像手段により撮像された画像における前記顔検出手段により検出された顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出する移動量検出手段と、
前記移動量検出手段により検出された顔移動量および背景移動量に基づいて前記撮像手段により撮像された画像のブレを補正するブレ補正手段と
を具備することを特徴とする撮像装置。
Imaging means for capturing an image of a subject;
Face detection means for detecting a face from an image captured by the imaging means;
A movement amount for detecting a face movement amount that is a blur amount of the face area detected by the face detection unit and a background movement amount that is a blur amount of an area other than the face region in the image captured by the imaging unit. Detection means;
An image pickup apparatus comprising: a shake correction unit that corrects a shake of an image captured by the image pickup unit based on a face movement amount and a background movement amount detected by the movement amount detection unit.
前記移動量検出手段により検出された顔移動量および背景移動量に基づいて前記ブレ補正手段により補正される画像のブレの補正量を算出する補正量算出手段をさらに具備することを特徴とする請求項1記載の撮像装置。   The image processing apparatus further comprises a correction amount calculation unit that calculates a correction amount of an image blur corrected by the blur correction unit based on the face movement amount and the background movement amount detected by the movement amount detection unit. Item 2. The imaging device according to Item 1. 前記補正量算出手段は、前記移動量検出手段により検出された顔移動量および背景移動量と所定の重み付け係数とに基づいて前記補正量を算出することを特徴とする請求項2記載の撮像装置。   The imaging apparatus according to claim 2, wherein the correction amount calculation unit calculates the correction amount based on a face movement amount and a background movement amount detected by the movement amount detection unit and a predetermined weighting coefficient. . 前記補正量算出手段は、前記移動量検出手段により検出された背景移動量に係る重み付け係数の値よりも前記移動量検出手段により検出された顔移動量に係る重み付け係数の値を大きくして前記補正量を算出することを特徴とする請求項3記載の撮像装置。   The correction amount calculation means increases the value of the weighting coefficient related to the face movement amount detected by the movement amount detection means to be larger than the weighting coefficient value related to the background movement amount detected by the movement amount detection means. The imaging apparatus according to claim 3, wherein a correction amount is calculated. 前記顔検出手段は、前記撮像手段により撮像された画像から検出された顔に関する各種情報を検出し、
前記補正量算出手段は、前記顔検出手段により検出された顔に関する各種情報に基づいて前記重み付け係数を算出する
ことを特徴とする請求項3記載の撮像装置。
The face detection means detects various information related to the face detected from the image picked up by the image pickup means,
The imaging apparatus according to claim 3, wherein the correction amount calculating unit calculates the weighting coefficient based on various types of information related to the face detected by the face detecting unit.
前記顔に関する各種情報は、顔領域の面積、顔領域の座標、顔らしさの値、顔の正面向きの度合い、顔の傾きの度合い、表情が笑っている度合い、表情が真剣な度合い、目を閉じている度合いの何れか1つの情報またはこれらを組み合わせた情報であることを特徴とする請求項5記載の撮像装置。   The various information about the face includes the area of the face area, the coordinates of the face area, the value of the face-likeness, the degree of face orientation, the degree of inclination of the face, the degree of facial expression smiling, the degree of serious expression, The imaging apparatus according to claim 5, wherein the information is any one information of a degree of closing or information obtained by combining them. 前記補正量算出手段は、前記顔検出手段により検出された顔の領域付近における重み付け係数の値を大きくして前記補正量を算出することを特徴とする請求項5記載の撮像装置。   The imaging apparatus according to claim 5, wherein the correction amount calculating unit calculates the correction amount by increasing a value of a weighting coefficient in the vicinity of the face area detected by the face detecting unit. 前記移動量検出手段は、前記顔検出手段により検出された顔が所定の領域に含まれるように前記撮像手段により撮像された画像を複数の領域に分割して当該顔が含まれる領域から顔移動量を検出して当該顔が含まれる領域以外の領域から背景移動量を検出する
ことを特徴とする請求項1記載の撮像装置。
The movement amount detection unit divides the image captured by the imaging unit into a plurality of regions so that the face detected by the face detection unit is included in a predetermined region, and moves the face from the region including the face. The imaging apparatus according to claim 1, wherein the background movement amount is detected from a region other than the region including the face by detecting the amount.
前記撮像装置の振動によるブレ量を検出する振動検出手段をさらに具備し、
前記ブレ補正手段は、前記移動量検出手段により検出された顔移動量および背景移動量と前記振動検出手段により検出されたブレ量とに基づいて前記撮像手段により撮像された画像のブレを補正することを特徴とする請求項1記載の撮像装置。
Further comprising vibration detecting means for detecting a blur amount due to vibration of the imaging device;
The blur correction unit corrects the blur of the image captured by the imaging unit based on the face movement amount and the background movement amount detected by the movement amount detection unit and the blur amount detected by the vibration detection unit. The imaging apparatus according to claim 1.
前記顔検出手段により検出された顔に関する各種情報に基づいて当該顔についてフォーカスが合っている度合いまたは露出が合っている度合いを検出するカメラ制御値検出手段をさらに具備し、
前記補正量算出手段は、前記カメラ制御値検出手段により検出された顔についてのフォーカスが合っている度合いまたは露出が合っている度合いに基づいて当該顔に係る補正量を算出する
ことを特徴とする請求項5記載の撮像装置。
Further comprising camera control value detection means for detecting a degree of focus or exposure of the face based on various information about the face detected by the face detection means;
The correction amount calculation unit calculates a correction amount related to the face based on a degree of focus or exposure of the face detected by the camera control value detection unit. The imaging device according to claim 5.
前記撮像手段により撮像された画像から顔を検出するか否かを設定する設定手段をさらに具備することを特徴とする請求項1記載の撮像装置。   The imaging apparatus according to claim 1, further comprising setting means for setting whether or not to detect a face from an image captured by the imaging means. 特定の人物の顔に関する特定人物情報を記憶する特定人物記憶手段と、
前記顔検出手段により検出された顔が前記特定人物記憶手段に記憶されている特定人物の顔と一致するか否かを判定する特定人物判定手段とをさらに具備し、
前記補正量算出手段は、前記顔検出手段により検出された顔が前記特定人物記憶手段に記憶されている特定人物の顔と一致すると前記特定人物判定手段により判定された場合には当該特定人物の顔の領域であるか否かに応じて前記重み付け係数を変更して前記補正量を算出する
ことを特徴とする請求項3記載の撮像装置。
Specific person storage means for storing specific person information relating to the face of a specific person;
A specific person determination means for determining whether or not the face detected by the face detection means matches the face of the specific person stored in the specific person storage means;
The correction amount calculation means, when the specific person determination means determines that the face detected by the face detection means matches the face of the specific person stored in the specific person storage means, The imaging apparatus according to claim 3, wherein the correction amount is calculated by changing the weighting coefficient according to whether or not the region is a face region.
前記補正量算出手段は、前記移動量検出手段により検出された顔移動量の平均値である第1平均値を算出して当該第1平均値に基づいて前記顔検出手段により検出された顔の領域に係る補正量を算出するとともに前記移動量検出手段により検出された背景移動量の平均値である第2平均値を算出して当該第2平均値に基づいて前記顔検出手段により検出された顔の領域以外の領域に係る補正量を算出することを特徴とする請求項2記載の撮像装置。   The correction amount calculation means calculates a first average value that is an average value of the face movement amounts detected by the movement amount detection means, and based on the first average value, detects the face detected by the face detection means. A correction amount related to the area is calculated, a second average value that is an average value of the background movement amount detected by the movement amount detection unit is calculated, and the face detection unit detects the second average value based on the second average value. The imaging apparatus according to claim 2, wherein a correction amount relating to an area other than the face area is calculated. 前記補正量算出手段は、前記顔検出手段により複数の顔が検出された場合には前記検出された顔の領域毎に顔移動量の平均値を算出して当該平均値に基づいて前記補正量を算出することを特徴とする請求項13記載の撮像装置。   When a plurality of faces are detected by the face detection unit, the correction amount calculation unit calculates an average value of face movement amounts for each detected face area, and calculates the correction amount based on the average value. The imaging device according to claim 13, wherein the imaging device is calculated. 前記ブレ補正手段は、前記撮像手段により撮像された画像において前記顔検出手段により検出された顔の領域が当該画像の中央寄りに移動するように当該画像のブレを補正することを特徴とする請求項1記載の撮像装置。   The blur correction unit corrects the blur of the image so that the face area detected by the face detection unit moves closer to the center of the image in the image captured by the imaging unit. Item 2. The imaging device according to Item 1. 前記移動量検出手段は、前記撮像手段により撮像された画像において前記顔検出手段により検出された顔と当該画像の所定時間前に撮像された画像において前記顔検出手段により検出された顔との相関性の高さに基づいて当該顔の領域に係る顔移動量を検出することを特徴とする請求項1記載の撮像装置。   The movement amount detecting means correlates a face detected by the face detecting means in an image picked up by the image pickup means and a face detected by the face detecting means in an image picked up a predetermined time before the image. The image pickup apparatus according to claim 1, wherein a face movement amount related to the face area is detected based on the height of the characteristic. 画像を入力する画像入力手段と、
前記画像入力手段により入力された画像から顔を検出する顔検出手段と、
前記画像入力手段により入力された画像における前記顔検出手段により検出された顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出する移動量検出手段と、
前記移動量検出手段により検出された顔移動量および背景移動量に基づいて前記画像入力手段により入力された画像のブレを補正するブレ補正手段と
を具備することを特徴とする画像処理装置。
An image input means for inputting an image;
Face detection means for detecting a face from the image input by the image input means;
Movement for detecting a face movement amount that is a blur amount of the face area detected by the face detection means and a background movement amount that is a blur amount of an area other than the face area in the image input by the image input means. A quantity detection means;
An image processing apparatus comprising: a blur correction unit that corrects a blur of an image input by the image input unit based on a face movement amount and a background movement amount detected by the movement amount detection unit.
画像を入力する画像入力手順と、
前記画像入力手順で入力された画像から顔を検出する顔検出手順と、
前記画像入力手順で入力された画像における前記顔検出手順で検出された顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出する移動量検出手順と、
前記移動量検出手順で検出された顔移動量および背景移動量に基づいて前記画像入力手順で入力された画像のブレを補正するブレ補正手順と
を具備することを特徴とする画像処理方法。
Image input procedure for inputting images,
A face detection procedure for detecting a face from the image input in the image input procedure;
Movement that detects a face movement amount that is a blur amount of the face area detected by the face detection procedure and a background movement amount that is a blur amount of an area other than the face area in the image input by the image input procedure. A quantity detection procedure;
An image processing method comprising: a blur correction procedure for correcting blur of an image input in the image input procedure based on a face movement amount and a background movement amount detected in the movement amount detection procedure.
画像を入力する画像入力手順と、
前記画像入力手順で入力された画像から顔を検出する顔検出手順と、
前記画像入力手順で入力された画像における前記顔検出手順で検出された顔の領域のブレ量である顔移動量と当該顔の領域以外の領域のブレ量である背景移動量とを検出する移動量検出手順と、
前記移動量検出手順で検出された顔移動量および背景移動量に基づいて前記画像入力手順で入力された画像のブレを補正するブレ補正手順と
をコンピュータに実行させることを特徴とするプログラム。
Image input procedure for inputting images,
A face detection procedure for detecting a face from the image input in the image input procedure;
Movement that detects a face movement amount that is a blur amount of the face area detected by the face detection procedure and a background movement amount that is a blur amount of an area other than the face area in the image input by the image input procedure. A quantity detection procedure;
A program for causing a computer to execute a blur correction procedure for correcting blur of an image input in the image input procedure based on a face movement amount and a background movement amount detected in the movement amount detection procedure.
JP2006325015A 2006-11-30 2006-11-30 Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method Expired - Fee Related JP4274233B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2006325015A JP4274233B2 (en) 2006-11-30 2006-11-30 Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
US11/924,158 US8228390B2 (en) 2006-11-30 2007-10-25 Image taking apparatus with shake correction, image processing apparatus with shake correction, image processing method with shake correction, and image processing program with shake correction
CN2007101954816A CN101193208B (en) 2006-11-30 2007-11-30 Image shooting device, image processing device, image processing method and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006325015A JP4274233B2 (en) 2006-11-30 2006-11-30 Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method

Publications (2)

Publication Number Publication Date
JP2008141437A JP2008141437A (en) 2008-06-19
JP4274233B2 true JP4274233B2 (en) 2009-06-03

Family

ID=39487927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006325015A Expired - Fee Related JP4274233B2 (en) 2006-11-30 2006-11-30 Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method

Country Status (3)

Country Link
US (1) US8228390B2 (en)
JP (1) JP4274233B2 (en)
CN (1) CN101193208B (en)

Families Citing this family (66)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2395781A (en) * 2002-11-29 2004-06-02 Sony Uk Ltd Face detection
JP4201809B2 (en) * 2006-11-13 2008-12-24 三洋電機株式会社 Camera shake correction apparatus and method, and imaging apparatus
JP4956375B2 (en) * 2007-10-30 2012-06-20 キヤノン株式会社 Image processing apparatus and image processing method
JP4986175B2 (en) * 2007-12-28 2012-07-25 カシオ計算機株式会社 Imaging apparatus and program
JP5048542B2 (en) * 2008-02-07 2012-10-17 オリンパス株式会社 Image processing apparatus and image processing program
JP4940164B2 (en) * 2008-02-07 2012-05-30 オリンパス株式会社 Imaging apparatus and imaging method
JP4561845B2 (en) * 2008-02-29 2010-10-13 カシオ計算機株式会社 Imaging apparatus and image processing program
JP4919297B2 (en) * 2008-03-13 2012-04-18 富士フイルム株式会社 Image evaluation apparatus and method, and program
JP4534172B2 (en) * 2008-04-03 2010-09-01 ソニー株式会社 Image processing apparatus, image processing method, and program
JP5109866B2 (en) * 2008-08-13 2012-12-26 カシオ計算機株式会社 Imaging apparatus, imaging method, and program
JP4720880B2 (en) * 2008-09-04 2011-07-13 ソニー株式会社 Image processing apparatus, imaging apparatus, image processing method, and program
JP5213613B2 (en) * 2008-09-26 2013-06-19 キヤノン株式会社 Image processing apparatus, image processing method, imaging apparatus, and program
DE102008042562A1 (en) * 2008-10-02 2010-04-08 Robert Bosch Gmbh Camera and corresponding method for selecting an object to be recorded
US20100150447A1 (en) * 2008-12-12 2010-06-17 Honeywell International Inc. Description based video searching system and method
JP2010224677A (en) * 2009-03-19 2010-10-07 Seiko Epson Corp Image evaluation method, image evaluation program and printing device
US8452599B2 (en) * 2009-06-10 2013-05-28 Toyota Motor Engineering & Manufacturing North America, Inc. Method and system for extracting messages
US8269616B2 (en) * 2009-07-16 2012-09-18 Toyota Motor Engineering & Manufacturing North America, Inc. Method and system for detecting gaps between objects
US20110019018A1 (en) * 2009-07-22 2011-01-27 National Chung Cheng University Image comprssion system in coordination with camera motion
CN101990063B (en) * 2009-08-05 2012-05-09 华晶科技股份有限公司 Method for adjusting shooting setting of digital camera by mobile detection
US8337160B2 (en) * 2009-10-19 2012-12-25 Toyota Motor Engineering & Manufacturing North America, Inc. High efficiency turbine system
US8237792B2 (en) 2009-12-18 2012-08-07 Toyota Motor Engineering & Manufacturing North America, Inc. Method and system for describing and organizing image data
US8723965B2 (en) * 2009-12-22 2014-05-13 Panasonic Corporation Image processing device, imaging device, and image processing method for performing blur correction on an input picture
CN102118559B (en) * 2009-12-30 2012-10-03 华晶科技股份有限公司 Method for adjusting shooting conditions of digital camera by utilizing motion detection
JP5488076B2 (en) * 2010-03-15 2014-05-14 オムロン株式会社 Object tracking device, object tracking method, and control program
JP5484184B2 (en) * 2010-04-30 2014-05-07 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2011257502A (en) * 2010-06-07 2011-12-22 Sony Corp Image stabilizer, image stabilization method, and program
US8424621B2 (en) 2010-07-23 2013-04-23 Toyota Motor Engineering & Manufacturing North America, Inc. Omni traction wheel system and methods of operating the same
EP2424243B1 (en) * 2010-08-31 2017-04-05 OCT Circuit Technologies International Limited Motion estimation using integral projection
JP5857322B2 (en) * 2011-06-02 2016-02-10 新シコー科技株式会社 Autofocus camera and mobile terminal with camera
JP2012257080A (en) 2011-06-09 2012-12-27 Sony Corp Image processor, image processing method, and program
US9357161B1 (en) * 2011-10-17 2016-05-31 Pixelworks, Inc. Motion vector interpolation for motion compensation
GB2511973A (en) * 2011-12-27 2014-09-17 Hewlett Packard Development Co User interface device
FR2991785B1 (en) * 2012-06-06 2014-07-18 Astrium Sas STABILIZATION OF A VIEWING LINE OF AN IMAGING SYSTEM ON BOARD A SATELLITE
KR20140031613A (en) * 2012-09-05 2014-03-13 삼성전자주식회사 Apparatus and method for processing image
US10666860B2 (en) * 2012-09-11 2020-05-26 Ricoh Company, Ltd. Image processor, image processing method and program, and imaging system
EP2739044B1 (en) * 2012-11-29 2015-08-12 Alcatel Lucent A video conferencing server with camera shake detection
CN103888655B (en) * 2012-12-21 2017-07-25 联想(北京)有限公司 A kind of photographic method and electronic equipment
US10547774B2 (en) * 2013-01-09 2020-01-28 Sony Corporation Image processing device, image processing method, and program
JP5892075B2 (en) * 2013-01-16 2016-03-23 トヨタ自動車株式会社 Object detection device and object detection method, alarm device and alarm method, driving support device and driving support method
US9852511B2 (en) 2013-01-22 2017-12-26 Qualcomm Incoporated Systems and methods for tracking and detecting a target object
CN104427240A (en) * 2013-09-09 2015-03-18 深圳富泰宏精密工业有限公司 Electronic device and image adjustment method thereof
US9736381B2 (en) * 2014-05-30 2017-08-15 Intel Corporation Picture in picture recording of multiple regions of interest
JP2016009998A (en) * 2014-06-24 2016-01-18 キヤノン株式会社 Imaging apparatus, imaging method and program
CN104093014A (en) * 2014-07-21 2014-10-08 宇龙计算机通信科技(深圳)有限公司 Image processing method and image processing device
US9462189B2 (en) * 2014-07-31 2016-10-04 Apple Inc. Piecewise perspective transform engine
JP6454112B2 (en) * 2014-09-25 2019-01-16 キヤノン株式会社 Blur correction apparatus, blur correction method and program, and imaging apparatus
JP6415228B2 (en) * 2014-10-03 2018-10-31 キヤノン株式会社 Image synthesizing apparatus and image synthesizing apparatus control method
KR102306538B1 (en) * 2015-01-20 2021-09-29 삼성전자주식회사 Apparatus and method for editing content
KR102655625B1 (en) * 2015-11-24 2024-04-09 삼성전자주식회사 Method and photographing device for controlling the photographing device according to proximity of a user
JP6725979B2 (en) * 2015-11-27 2020-07-22 キヤノン株式会社 Image blur correction device, control method thereof, and storage medium
JP6577852B2 (en) * 2015-12-03 2019-09-18 キヤノン株式会社 Motion vector detection device and control method thereof
CN105516589B (en) * 2015-12-07 2018-07-03 凌云光技术集团有限责任公司 Intelligent exposure method and system based on recognition of face
US20170272660A1 (en) * 2016-03-17 2017-09-21 Casio Computer Co., Ltd. Imaging device configured to control a region of imaging
JP6815747B2 (en) * 2016-05-02 2021-01-20 キヤノン株式会社 Image processing device, imaging device, control method of image processing device, program, and storage medium
JP2018164146A (en) * 2017-03-24 2018-10-18 カシオ計算機株式会社 Image-processing device, image processing method, and program
US10764499B2 (en) * 2017-06-16 2020-09-01 Microsoft Technology Licensing, Llc Motion blur detection
CN109255797B (en) * 2017-07-14 2021-08-06 富士通株式会社 Image processing device and method, and electronic device
CN107995413B (en) * 2017-10-31 2020-09-29 维沃移动通信有限公司 Photographing control method and mobile terminal
EP3912131A4 (en) 2019-06-25 2022-08-31 Hewlett-Packard Development Company, L.P. Global motion suppression in an event-driven camera
US11575834B2 (en) * 2019-12-17 2023-02-07 Canon Kabushiki Kaisha Image stabilization apparatus, method of controlling same, and storage medium
CN111479035B (en) * 2020-04-13 2022-10-18 Oppo广东移动通信有限公司 Image processing method, electronic device, and computer-readable storage medium
KR20210155284A (en) * 2020-06-15 2021-12-22 한화테크윈 주식회사 Image process device
CN112738405B (en) * 2020-12-30 2022-02-01 维沃移动通信(杭州)有限公司 Video shooting method and device and electronic equipment
US11228702B1 (en) * 2021-04-23 2022-01-18 Gopro, Inc. Stabilization of face in video
US20230368343A1 (en) * 2022-02-08 2023-11-16 Meta Platforms Technologies, Llc Global motion detection-based image parameter control
CN114827473B (en) * 2022-04-29 2024-02-09 北京达佳互联信息技术有限公司 Video processing method and device

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3384459B2 (en) 1992-04-17 2003-03-10 ソニー株式会社 Imaging device
JPH1091795A (en) * 1996-09-12 1998-04-10 Toshiba Corp Device for detecting mobile object and method therefor
JP3466895B2 (en) * 1997-12-12 2003-11-17 キヤノン株式会社 Image stabilizer, imaging device, imaging system, camera unit, and lens unit
US6501794B1 (en) * 2000-05-22 2002-12-31 Microsoft Corporate System and related methods for analyzing compressed media content
JP3659157B2 (en) * 2000-10-17 2005-06-15 日本電気株式会社 Image compression method for weighting video content
US7298412B2 (en) * 2001-09-18 2007-11-20 Ricoh Company, Limited Image pickup device, automatic focusing method, automatic exposure method, electronic flash control method and computer program
CN1221101C (en) * 2002-09-25 2005-09-28 北京中星微电子有限公司 Communication terminal and method locking keyboard through face image
WO2005066897A1 (en) * 2004-01-06 2005-07-21 Sony Corporation Image processing device and method, recording medium, and program
JP4489608B2 (en) * 2004-03-31 2010-06-23 富士フイルム株式会社 DIGITAL STILL CAMERA, IMAGE REPRODUCTION DEVICE, FACE IMAGE DISPLAY DEVICE, AND CONTROL METHOD THEREOF
JP4379918B2 (en) * 2004-11-29 2009-12-09 富士フイルム株式会社 Imaging apparatus and imaging method
JP2006295350A (en) * 2005-04-07 2006-10-26 Sony Corp Imaging apparatus and method of processing imaging result
JP2007033543A (en) * 2005-07-22 2007-02-08 Fujifilm Holdings Corp Imaging apparatus
US8073280B2 (en) * 2006-05-16 2011-12-06 Panasonic Corporation Image processing apparatus and image processing program for correcting image degradation
US8699857B2 (en) * 2007-12-06 2014-04-15 Olympus Imaging Corp. Reproducer, digital camera, slide show reproduction method, program, image display apparatus, image display method, image reproduction method, and image display program

Also Published As

Publication number Publication date
US8228390B2 (en) 2012-07-24
US20080186386A1 (en) 2008-08-07
CN101193208A (en) 2008-06-04
CN101193208B (en) 2010-09-01
JP2008141437A (en) 2008-06-19

Similar Documents

Publication Publication Date Title
JP4274233B2 (en) Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
JP6106921B2 (en) Imaging apparatus, imaging method, and imaging program
US8314854B2 (en) Apparatus and method for image recognition of facial areas in photographic images from a digital camera
JP4535164B2 (en) Imaging apparatus, image processing apparatus, and image analysis method and program therefor
KR101537948B1 (en) Photographing method and apparatus using pose estimation of face
JP5195120B2 (en) Digital camera
JP2010067102A (en) Object detecting device, imaging apparatus, object detecting method, and program
KR20100055946A (en) Method and apparatus for generating thumbnail of moving picture
JP2007074143A (en) Imaging device and imaging system
CN112036311A (en) Image processing method and device based on eye state detection and storage medium
US20130293741A1 (en) Image processing apparatus, image capturing apparatus, and storage medium storing image processing program
CN108259769B (en) Image processing method, image processing device, storage medium and electronic equipment
JP4885792B2 (en) Guide device and guide method
JP5167236B2 (en) Subject tracking device and control method thereof
JP5272797B2 (en) Digital camera
JP5096610B2 (en) Guide device and guide method
JP5222429B2 (en) Subject tracking device and control method thereof
JP5380833B2 (en) Imaging apparatus, subject detection method and program
JP2009017135A (en) Imaging device, imaging method, and program
JP5002311B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2009212867A (en) Shot image processing apparatus, shooting control program, and phiotographing control method
JP2009130840A (en) Imaging apparatus, control method thereof ,and program
JP2010039795A (en) Data generation device and electronic camera for recognition, data generation program for recognition, and data generation method for recognition
JP5901687B2 (en) Image capturing apparatus and method for controlling image capturing apparatus
JP2022150652A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090130

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

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

R151 Written notification of patent or utility model registration

Ref document number: 4274233

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130313

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20140313

Year of fee payment: 5

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

LAPS Cancellation because of no payment of annual fees