JP2011150594A - Image processor and image processing method, and program - Google Patents
Image processor and image processing method, and program Download PDFInfo
- Publication number
- JP2011150594A JP2011150594A JP2010012258A JP2010012258A JP2011150594A JP 2011150594 A JP2011150594 A JP 2011150594A JP 2010012258 A JP2010012258 A JP 2010012258A JP 2010012258 A JP2010012258 A JP 2010012258A JP 2011150594 A JP2011150594 A JP 2011150594A
- Authority
- JP
- Japan
- Prior art keywords
- subject
- input image
- image
- unit
- tracking
- 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.)
- Withdrawn
Links
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、画像処理装置および方法、並びにプログラムに関し、特に、より簡単かつ迅速に、安定して被写体をトラッキングできるようにした画像処理装置および方法、並びにプログラムに関する。 The present invention relates to an image processing apparatus and method, and a program, and more particularly, to an image processing apparatus and method, and a program capable of tracking a subject more simply, quickly and stably.
近年、シャッタ操作がされる前にユーザに対して提示される、いわゆるプレビュー画像を撮像する場合など、複数の画像が連続して撮像される場合に、撮像された画像上にある、ユーザにより選択された被写体を追尾する機能を有する撮像装置が知られている。 In recent years, when a plurality of images are captured continuously, such as when capturing a so-called preview image that is presented to the user before the shutter operation is performed, the user selects a captured image on the captured image. There is known an imaging apparatus having a function of tracking a captured subject.
このような被写体を追尾(トラッキング)する撮像装置には、シリコン網膜を利用してトラッキングをするもの(例えば、特許文献1参照)や、深度感知撮像技術を利用してトラッキングを行なうものがある(例えば、特許文献2参照)。 Such an imaging device that tracks (tracks) a subject includes tracking using a silicon retina (see, for example, Patent Document 1) and tracking using a depth sensing imaging technique ( For example, see Patent Document 2).
また、Lucas-Kanadeアルゴリズムを利用して被写体をトラッキングする手法も提案されている(例えば、非特許文献1参照)。この手法では、画像から特徴点を検出し、この特徴点を追跡することにより、被写体のトラッキングが実現される。 In addition, a method of tracking a subject using the Lucas-Kanade algorithm has been proposed (for example, see Non-Patent Document 1). In this method, subject tracking is realized by detecting a feature point from an image and tracking the feature point.
しかしながら、シリコン網膜や深度感知撮像技術を利用する手法では、シリコン網膜や深度カメラといった特殊な器具が必要となる。そのため、カメラ等の一般的な撮像装置での被写体のトラッキングを実現することは困難であった。 However, the technique using the silicon retina and depth sensing imaging technology requires special instruments such as a silicon retina and a depth camera. For this reason, it has been difficult to realize tracking of a subject with a general imaging device such as a camera.
また、Lucas-Kanadeアルゴリズムを利用したトラッキング手法では、特徴点の検出やトラッキングの処理量が多く、時間がかかってしまう。さらに、Lucas-Kanadeアルゴリズムを利用したトラッキング手法では、被写体の形状変化が激しい場合などには、安定してトラッキングを行なうことができなかった。例えば、被写体としての人が、歩いている状態からしゃがんだ場合、これまで特徴として用いられていた足の部分の特徴量が得られなくなってしまう。そのため、その後、被写体としての人が立ち上がって、再び歩き出した場合には、足以外の部分しかトラッキングできなくなってしまう。 In addition, the tracking method using the Lucas-Kanade algorithm requires a large amount of feature point detection and tracking, which takes time. Furthermore, with the tracking method using the Lucas-Kanade algorithm, tracking could not be performed stably, for example, when the subject's shape changes drastically. For example, when a person as a subject squats down from a walking state, the feature amount of the foot portion that has been used as a feature until now cannot be obtained. Therefore, when a person as a subject stands up and walks again, only the part other than the foot can be tracked.
本発明は、このような状況に鑑みてなされたものであり、より簡単かつ迅速に、安定して被写体をトラッキングすることができるようにするものである。 The present invention has been made in view of such circumstances, and makes it possible to track a subject more simply, quickly and stably.
本発明の一側面の画像処理装置は、連続する複数フレームの入力画像のそれぞれについて、前記入力画像から被写体を検出する画像処理装置であって、処理対象の現フレームの前記入力画像と、前記現フレームよりも時間的に前の前フレームにおける追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像から、前記追尾対象の被写体を検出するトラッキング手段と、前記入力画像から予め定められた第1の特徴の特徴量を抽出して、前記特徴量に基づいて前記入力画像の特性を特定するとともに、前記入力画像の特性に応じて、互いに異なる方法により前記入力画像から前記追尾対象の被写体を検出する複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる切り替え手段とを備える。 An image processing apparatus according to an aspect of the present invention is an image processing apparatus that detects a subject from an input image for each of a plurality of consecutive frames of an input image, the input image of the current frame to be processed, and the current image Based on the detection result of the subject to be tracked in the previous frame temporally before the frame, tracking means for detecting the subject to be tracked from the input image of the current frame, and predetermined from the input image The feature amount of the first feature is extracted, the characteristics of the input image are specified based on the feature amount, and the tracking target is extracted from the input image by different methods according to the characteristics of the input image. One of the plurality of tracking means for detecting the subject is provided with switching means for detecting the subject to be tracked.
前記切り替え手段には、前記特徴量として前記入力画像の各領域における画素の画素値の分散値を抽出して、前記分散値から前記入力画像の平坦さの度合いを示す平坦度を算出する平坦度算出手段と、前記平坦度から前記入力画像が、空間方向の画素値の変化の少ない平坦な画像であるか否かを判定し、その判定結果に応じて複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる判定手段とを設けることができる。 The switching means extracts a variance value of pixel values of pixels in each region of the input image as the feature amount, and calculates a flatness indicating a flatness degree of the input image from the variance value It is determined whether the input image is a flat image with little change in the pixel value in the spatial direction from the calculation means and the flatness, and any one of the plurality of tracking means according to the determination result And determining means for detecting the subject to be tracked.
前記トラッキング手段には、前記入力画像が平坦な画像でない場合、前記前フレームの前記入力画像上の前記追尾対象の被写体が含まれる被写体領域と、前記現フレームの前記入力画像とを用いた動き検出を行なって、前記被写体領域の動きを求めることにより、前記現フレームの前記入力画像上の前記追尾対象の被写体の領域を検出する第1のトラッキング手段と、前記入力画像が平坦な画像である場合、前記現フレームの前記入力画像から、複数の第2の特徴の特徴量を抽出し、前記第2の特徴の特徴量から前記入力画像の各領域における被写体らしさを示す被写体マップを生成するとともに、前記被写体マップにより特定される前記入力画像における被写体らしい領域のうち、前記前フレームの前記被写体領域と同じ位置の領域が含まれる領域を、前記現フレームの前記入力画像上の前記追尾対象の被写体の領域として検出する第2のトラッキング手段とを設けることができる。 When the input image is not a flat image, the tracking means uses a subject area including the subject to be tracked on the input image of the previous frame and a motion detection using the input image of the current frame. When the input image is a flat image, the first tracking means for detecting the region of the subject to be tracked on the input image of the current frame by calculating the movement of the subject region Extracting a feature quantity of a plurality of second features from the input image of the current frame, generating a subject map indicating the subjectivity in each region of the input image from the feature quantities of the second feature, Among the regions that are likely to be subjects in the input image specified by the subject map, include regions at the same position as the subject region in the previous frame That region, the may be provided a second tracking means for detecting a region of the tracking target subject on the input image of the current frame.
前記切り替え手段には、前記現フレームの前記入力画像から人の顔を検出する顔検出手段をさらに設け、前記トラッキング手段には、前記現フレームの前記入力画像からの前記人の顔の検出結果に基づいて、前記現フレームの前記入力画像から検出された前記人の顔の領域のうち、前記前フレームの前記被写体領域と最も近い領域を前記現フレームの前記入力画像上の前記追尾対象の被写体の領域として検出する第3のトラッキング手段をさらに設け、前記顔検出手段には、前記入力画像から前記人の顔が検出された場合、前記第3のトラッキング手段に前記追尾対象の被写体を検出させ、前記平坦度算出手段には、前記入力画像から前記人の顔が検出されなかった場合、前記平坦度を算出させることができる。 The switching means further includes a face detection means for detecting a human face from the input image of the current frame, and the tracking means includes a detection result of the human face from the input image of the current frame. Based on the area of the person's face detected from the input image of the current frame, the area closest to the subject area of the previous frame is defined as the tracking target object on the input image of the current frame. Third tracking means for detecting as an area is further provided, and when the human face is detected from the input image, the face detecting means causes the third tracking means to detect the subject to be tracked, The flatness calculating means can calculate the flatness when the human face is not detected from the input image.
前記切り替え手段には、前記特徴量として前記入力画像の画素の色成分を抽出し、前記前フレームの前記入力画像上の前記追尾対象の被写体が含まれる被写体領域における画素の色の分布を示す前景ヒストグラムを生成する前景ヒストグラム生成手段と、前記特徴量として前記入力画像の画素の色成分を抽出し、前記前フレームの前記入力画像における前記被写体領域を除く領域の画素の色の分布を示す背景ヒストグラムを生成する背景ヒストグラム生成手段と、前記前景ヒストグラムと前記背景ヒストグラムとの類似の度合いを示す距離に応じて、複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる判定手段とを設けることができる。 The switching means extracts a color component of a pixel of the input image as the feature amount, and indicates a color distribution of the pixel in a subject area including the subject to be tracked on the input image of the previous frame. A foreground histogram generating means for generating a histogram, and a background histogram showing a color distribution of pixels in a region excluding the subject region in the input image of the previous frame by extracting a color component of the pixel of the input image as the feature amount A background histogram generation unit that generates a tracking histogram, and a determination unit that causes any one of the plurality of tracking units to detect the subject to be tracked according to a distance indicating a degree of similarity between the foreground histogram and the background histogram. And can be provided.
前記トラッキング手段には、前記距離が所定の閾値以下である場合、前記現フレームの前記入力画像の各領域の被写体の輪郭を示す輪郭画像において、前記前フレームの前記被写体領域の被写体の輪郭を示す前景輪郭画像と最も類似の度合いの高い領域を検索することにより、前記現フレームの前記入力画像上の前記追尾対象の被写体を検出する第4のトラッキング手段と、前記距離が前記閾値より大きい場合、前記現フレームの前記入力画像において、前記前景ヒストグラムと最も類似の度合いの高い、色の分布を示すヒストグラムが得られる領域を検索することにより、前記現フレームの前記入力画像上の前記追尾対象の被写体を検出する第5のトラッキング手段とを設けることができる。 When the distance is equal to or smaller than a predetermined threshold, the tracking means indicates a contour of the subject in the subject area of the previous frame in a contour image showing a contour of the subject in each region of the input image of the current frame. A fourth tracking means for detecting a subject to be tracked on the input image of the current frame by searching a region having the highest degree of similarity to a foreground contour image, and when the distance is greater than the threshold, In the input image of the current frame, the tracking target object on the input image of the current frame is searched by searching for an area in which a histogram showing a color distribution having the highest degree of similarity to the foreground histogram is obtained. And a fifth tracking means for detecting.
本発明の一側面の画像処理方法またはプログラムは、連続する複数フレームの入力画像のそれぞれについて、前記入力画像から被写体を検出する画像処理方法またはプログラムであって、前記入力画像から予め定められた特徴の特徴量を抽出して、前記特徴量に基づいて前記入力画像の特性を特定するとともに、前記入力画像の特性に応じて、互いに異なる方法により前記入力画像から追尾対象の被写体を検出する複数のトラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させ、前記トラッキング手段が、処理対象の現フレームの前記入力画像と、前記現フレームよりも時間的に前の前フレームにおける前記追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像から、前記追尾対象の被写体を検出するステップを含む。 An image processing method or program according to an aspect of the present invention is an image processing method or program for detecting a subject from an input image for each of a plurality of consecutive frames of an input image, wherein the image processing method or program is predetermined from the input image. A plurality of feature amounts of the input image based on the feature amounts, and a subject to be tracked is detected from the input image by a different method according to the characteristics of the input image. Either of the tracking means detects the subject to be tracked, and the tracking means detects the input image of the current frame to be processed and the tracking target in the previous frame temporally before the current frame. On the basis of the detection result of the subject in the current frame from the input image of the current frame. Tsu, including the flop.
本発明の一側面においては、連続する複数フレームの入力画像のそれぞれについて、前記入力画像から被写体を検出する場合に、前記入力画像から予め定められた特徴の特徴量が抽出されて、前記特徴量に基づいて前記入力画像の特性が特定されるとともに、前記入力画像の特性に応じて、互いに異なる方法により前記入力画像から追尾対象の被写体を検出する複数のトラッキング手段のうちの何れかにより、前記追尾対象の被写体が検出され、前記トラッキング手段により、処理対象の現フレームの前記入力画像と、前記現フレームよりも時間的に前の前フレームにおける前記追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像から、前記追尾対象の被写体が検出される。 In one aspect of the present invention, for each of a plurality of consecutive frames of input images, when a subject is detected from the input image, a feature amount of a predetermined feature is extracted from the input image, and the feature amount The characteristics of the input image are specified based on the input image, and depending on the characteristics of the input image, any one of a plurality of tracking units that detect a tracking target subject from the input image by different methods, A tracking target subject is detected, and the tracking unit is configured to detect the tracking target subject in a previous frame temporally prior to the current frame based on the input image of the current frame to be processed. The subject to be tracked is detected from the input image of the current frame.
本発明の一側面によれば、より簡単かつ迅速に、安定して被写体をトラッキングすることができる。 According to one aspect of the present invention, a subject can be tracked more simply, quickly and stably.
以下、図面を参照して、本発明を適用した実施の形態について説明する。 Embodiments to which the present invention is applied will be described below with reference to the drawings.
〈発明の概要〉
[画像処理装置の構成]
図1は、本発明を適用した画像処理装置の概要を説明するための図である。
<Summary of invention>
[Configuration of image processing apparatus]
FIG. 1 is a diagram for explaining an outline of an image processing apparatus to which the present invention is applied.
本発明を適用した画像処理装置11は、切り替え部21、トラッキング部22−1乃至トラッキング部22−N、表示制御部23、および表示部24から構成される。
The
例えば、画像処理装置11は、被写体を撮像するカメラ等の撮像装置に設けられ、撮像装置により時間的に連続して撮像された複数フレームの入力画像が、順次、切り替え部21および表示制御部23に供給される。なお、入力画像は、連続して撮像された静止画像であってもよいし、動画像であってもよい。また、入力画像は、撮像後に記録媒体に記録されて、記録媒体から読み出されたものであってもよい。
For example, the
切り替え部21は、供給された入力画像から、入力画像が有する特徴の特徴量を抽出し、抽出した特徴量に基づいて入力画像の特性を特定する。そして、切り替え部21は、入力画像の特性に適したトラッキング方法を選択し、そのトラッキング方法により、入力画像上の被写体をトラッキングさせる。すなわち、切り替え部21は、入力画像の特性に応じて、互いに異なるトラッキング方法でトラッキングを行うトラッキング部22−1乃至トラッキング部22−Nの何れかに入力画像を供給し、トラッキングの実行を指示する。
The switching
トラッキング部22−1乃至トラッキング部22−Nは、切り替え部21からの指示に応じて、予め定められたトラッキング方法により、入力画像から、追尾対象となる被写体を検出し、その検出結果を表示制御部23に供給する。
The tracking unit 22-1 to tracking unit 22-N detect a subject to be tracked from an input image by a predetermined tracking method according to an instruction from the switching
なお、追尾対象となる被写体は、トラッキングの開始時にユーザにより指定されるものとする。また、以下、トラッキング部22−1乃至トラッキング部22−Nを個々に区別する必要のない場合、単にトラッキング部22とも称する。
Note that the subject to be tracked is designated by the user at the start of tracking. Hereinafter, the tracking units 22-1 to 22-N are also simply referred to as tracking
表示制御部23は、トラッキング部22から供給された被写体の検出結果と、供給された入力画像とを用いて、入力画像上に追尾対象の被写体の領域を囲む枠(以下、被写体枠と称する)が表示されるように入力画像を加工する。そして、表示制御部23は、加工により得られた入力画像を表示部24に供給し、入力画像を表示させる。これにより、入力画像とともに被写体枠が表示される。
The
画像処理装置11は、以上において説明した処理を入力画像のフレームごとに行って、被写体をトラッキングする。表示部24には、入力画像とともに、ユーザが指定した被写体を囲む被写体枠が表示されるので、ユーザは、入力画像や被写体枠を見ながら構図を決定し、撮像装置を操作して、静止画像等を撮像させることができる。また、撮像装置は、画像処理装置11のトラッキング処理の結果に基づいて、追尾対象の被写体にレンズの焦点が合うようにフォーカス調整したり、被写体が適度に明るくなるように露出調整したりすることができる。
The
画像処理装置11では、入力画像の特性に対して、その特性の入力画像を得意とするトラッキング方法、つまりその特性を持つ入力画像を処理対象とした場合に、より少ない処理量で、より高精度に被写体を検出できるトラッキング方法が予め定められている。そして、入力画像の特性が特定されると、その特定結果に基づいて、トラッキング方法が選択されて、被写体の検出が行なわれる。これにより、画像処理装置11では、より簡単かつ迅速に、安定して被写体をトラッキングすることができる。
In the
以下、図面を参照して画像処理装置11のより具体的な構成例について説明する。
Hereinafter, a more specific configuration example of the
〈第1の実施の形態〉
[画像処理装置の構成]
図2は、本発明を適用した画像処理装置11の一実施の形態の構成例を示す図である。
<First Embodiment>
[Configuration of image processing apparatus]
FIG. 2 is a diagram showing a configuration example of an embodiment of the
図2の画像処理装置11は、平坦判定部51、トラッキング部52、トラッキング部53、保持部54、表示制御部23、および表示部24から構成される。また、画像処理装置11では、撮像装置で撮像された入力画像が、平坦判定部51、保持部54、および表示制御部23に供給される。なお、図2において、図1における場合と対応する部分には、同一の符号を付してあり、その説明は適宜省略する。
2 includes a
平坦判定部51は、図1の切り替え部21に対応し、供給された入力画像から特徴量として入力画像の画素の画素値の分散値を抽出することにより、画像の平坦さを指標として、入力画像の特性を特定する。すなわち、平坦判定部51は、入力画像が平坦な画像であるか否かを判定する。ここで、平坦な画像とは、画像上の画素が並ぶ方向、つまり空間方向に対する画素の画素値の変化が少ない画像をいう。
The
平坦判定部51は、分散値算出部61、平坦度算出部62、および判定部63から構成され、撮像装置からの各フレームの入力画像が、分散値算出部61および判定部63に供給される。
The
分散値算出部61は、供給された入力画像を複数のブロックに分割し、各ブロックについて、ブロック内の画素の画素値の分散値を求め、平坦度算出部62に供給する。平坦度算出部62は、分散値算出部61から供給された入力画像の各ブロックの分散値に基づいて、入力画像の平坦さの度合いを示す平坦度を算出し、判定部63に供給する。
The variance
判定部63は、平坦度算出部62から供給された平坦度と、予め定められた閾値とを比較して、入力画像が平坦な画像であるか否かを判定する。また、判定部63は、入力画像が平坦であるか否かの判定結果に応じて、供給された入力画像をトラッキング部52またはトラッキング部53の何れか一方に供給し、被写体の検出を指示する。
The
トラッキング部52およびトラッキング部53は、図1のトラッキング部22に対応し、平坦判定部51の指示に応じて、互いに異なるトラッキング方法により、入力画像から被写体を検出する。
The
すなわち、トラッキング部52は、判定部63から供給された処理対象の現フレームの入力画像と、保持部54に保持されている現フレームよりも1つ前のフレーム(以下、前フレームと称する)の入力画像および被写体領域情報とを用いて、動き検出により追尾対象の被写体を検出する。ここで、被写体領域情報とは、入力画像から検出された、追尾対象の被写体を囲む領域(以下、被写体領域と称する)の位置を示す情報をいう。
That is, the
また、トラッキング部52は、被写体の検出の結果得られた現フレームの被写体領域情報を、表示制御部23に供給する。
Further, the
トラッキング部53は、判定部63から供給された現フレームの入力画像と、保持部54に保持されている前フレームの被写体領域情報とを用いて、ビジュアルアテンションと呼ばれる被写体抽出の手法を利用して、入力画像から追尾対象の被写体を検出する。また、トラッキング部53は、被写体の検出の結果得られた現フレームの被写体領域情報を、表示制御部23に供給する。
The
保持部54は、供給された入力画像と、トラッキング部52またはトラッキング部53から供給された被写体領域情報とを保持するとともに、必要に応じて入力画像または被写体領域情報を、トラッキング部52やトラッキング部53に供給する。
The holding
[トラッキング部52の構成]
また、図2のトラッキング部52は、より詳細には、図3に示すように構成される。
[Configuration of Tracking Unit 52]
In more detail, the
すなわち、トラッキング部52は、ブロック動き検出部91、被写体動き検出部92、および被写体領域決定部93から構成される。
That is, the
ブロック動き検出部91は、保持部54に保持されている前フレームの入力画像と被写体領域情報とを用いて、前フレームの入力画像上の被写体領域をいくつかのブロックに分割する。また、ブロック動き検出部91は、分割により得られた各ブロックと、判定部63からの現フレームの入力画像とから、各ブロックの動きを検出し、その検出結果を被写体動き検出部92に供給する。
The block
被写体動き検出部92は、ブロック動き検出部91から供給された各ブロックの動きの検出結果を用いて、被写体領域全体の動きを求め、被写体領域決定部93に供給する。被写体領域決定部93は、被写体動き検出部92から供給された被写体領域全体の動きと、保持部54に保持されている前フレームの被写体領域情報とから、現フレームの入力画像上の被写体領域を特定する。また、被写体領域決定部93は、現フレームの入力画像上における被写体領域の位置を示す被写体領域情報を生成して表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。
The subject
[トラッキング部53の構成]
また、図2のトラッキング部53は、より詳細には、図4に示すように構成される。
[Configuration of Tracking Unit 53]
In more detail, the
すなわち、トラッキング部53は、被写体抽出部121、被写体候補領域決定部122、および被写体領域決定部123から構成される。
That is, the
被写体抽出部121は、判定部63から供給された現フレームの入力画像から、入力画像の各領域における被写体らしさを示す被写体マップを生成し、被写体候補領域決定部122に供給する。ここで、被写体マップにより示される被写体は、任意の被写体であり、ユーザが入力画像を一瞥した場合に、ユーザが注目すると推定される入力画像上の物体、つまりユーザが目を向けると推定される物体をいう。したがって、被写体は必ずしも人物に限られる訳ではない。
The
被写体候補領域決定部122は、被写体抽出部121からの被写体マップを用いて、被写体マップ上の被写体領域の候補となる領域、つまり被写体らしい領域を含む矩形領域(以下、被写体候補領域とも称する)を抽出し、被写体領域決定部123に供給する。
Using the subject map from the
被写体領域決定部123は、被写体候補領域決定部122からの被写体候補領域の抽出結果と、保持部54に保持されている前フレームの被写体領域情報とを用いて、被写体候補領域のうちの何れかを現フレームの被写体領域を示す領域として選択する。すなわち、被写体マップ上の選択された被写体候補領域と同じ位置にある入力画像上の領域が、現フレームの被写体領域とされる。なお、以下では、被写体マップ上の被写体領域を示す領域として選択された被写体候補領域を、単に被写体領域とも称することとする。
The subject
被写体領域決定部123は、現フレームの被写体領域を示す被写体領域情報を生成して表示制御部23に供給するとともに、被写体領域情報を保持部54に供給して保持させる。
The subject
このように、トラッキング部53では、被写体マップ上において、ユーザが注目すると推定される任意の被写体らしい領域が、ユーザにより指定された追尾対象の被写体の領域の候補(被写体領域候補)とされる。そして、それらの被写体候補領域のなかから、最も追尾対象の被写体らしい領域が、被写体領域として選択される。
In this way, in the
[被写体抽出部の構成]
さらに、図4の被写体抽出部121は、より詳細には、図5に示すように構成される。すなわち、被写体抽出部121は、輝度情報抽出部151、色情報抽出部152、エッジ情報抽出部153、顔情報抽出部154、および被写体マップ生成部155から構成される。
[Configuration of subject extraction unit]
Furthermore, the
輝度情報抽出部151は、供給された入力画像に基づいて、入力画像の各領域における、輝度に関する情報を示す輝度情報マップを生成し、被写体マップ生成部155に供給する。
色情報抽出部152は、供給された入力画像に基づいて、入力画像の各領域における、色に関する情報を示す色情報マップを生成し、被写体マップ生成部155に供給する。
The luminance
Based on the supplied input image, the color
エッジ情報抽出部153は、供給された入力画像に基づいて、入力画像の各領域における、エッジに関する情報を示すエッジ情報マップを生成し、被写体マップ生成部155に供給する。顔情報抽出部154は、供給された入力画像に基づいて、入力画像の各領域における、被写体としての人の顔に関する情報を示す顔情報マップを生成し、被写体マップ生成部155に供給する。
The edge
なお、以下、輝度情報抽出部151乃至顔情報抽出部154から出力される、輝度情報マップ乃至顔情報マップのそれぞれを個々に区別する必要のない場合、単に情報マップとも称する。これらの情報マップに含まれる情報は、輝度や色等の特徴の特徴量から求まる、入力画像上の各領域における被写体らしさを示す情報であり、それらの情報が入力画像の各領域に対応させて並べられたものが情報マップとされる。
Hereinafter, when it is not necessary to individually distinguish the luminance information map or the face information map output from the luminance
被写体マップ生成部155は、輝度情報抽出部151乃至顔情報抽出部154から供給された情報マップを線形結合し、被写体マップを生成する。すなわち、輝度情報マップ乃至顔情報マップの各領域の情報が、同じ位置にある領域ごとに重み付き加算されて被写体マップが生成される。被写体マップ生成部155は、生成した被写体マップを被写体候補領域決定部122に供給する。
The subject
なお、以下においては、各情報マップおよび被写体マップのそれぞれにおける各領域(位置)を画素といい、その領域に対応する情報(値)を画素値ということとする。 In the following, each region (position) in each information map and subject map is referred to as a pixel, and information (value) corresponding to that region is referred to as a pixel value.
次に、図6乃至図9を参照して、図5の輝度情報抽出部151乃至顔情報抽出部154のより詳細な構成について説明する。
Next, a more detailed configuration of the luminance
[輝度情報抽出部の構成]
図6は、輝度情報抽出部151の構成例を示すブロック図である。
[Configuration of luminance information extraction unit]
FIG. 6 is a block diagram illustrating a configuration example of the luminance
輝度情報抽出部151は、輝度画像生成部181、ピラミッド画像生成部182、差分算出部183、および輝度情報マップ生成部184から構成される。
The luminance
輝度画像生成部181は、供給された入力画像を用いて、入力画像の画素の輝度値を、画素の画素値とする輝度画像を生成し、ピラミッド画像生成部182に供給する。ここで、輝度画像の任意の画素の画素値は、その画素と同じ位置にある入力画像の画素の輝度値を示している。
Using the supplied input image, the luminance
ピラミッド画像生成部182は、輝度画像生成部181から供給された輝度画像を用いて、互いに解像度の異なる複数の輝度画像を生成し、それらの輝度画像を輝度のピラミッド画像として差分算出部183に供給する。
The pyramid
例えば、レベルL1乃至レベルL8までの8つの解像度の階層のピラミッド画像が生成され、レベルL1のピラミッド画像が最も解像度が高く、レベルL1からレベルL8まで順番にピラミッド画像の解像度が低くなるものとする。 For example, it is assumed that pyramid images of eight resolution layers from level L1 to level L8 are generated, the pyramid image of level L1 has the highest resolution, and the resolution of the pyramid image sequentially decreases from level L1 to level L8. .
この場合、輝度画像生成部181により生成された輝度画像が、レベルL1のピラミッド画像とされる。また、レベルLi(但し、1≦i≦7)のピラミッド画像における、互いに隣接する4つの画素の画素値の平均値が、それらの画素と対応するレベルL(i+1)のピラミッド画像の1つの画素の画素値とされる。したがって、レベルL(i+1)のピラミッド画像は、レベルLiのピラミッド画像に対して縦横半分(割り切れない場合は切り捨て)の画像となる。
In this case, the luminance image generated by the luminance
差分算出部183は、ピラミッド画像生成部182から供給された複数のピラミッド画像のうち、互いに階層の異なる2つのピラミッド画像を選択し、選択したピラミッド画像の差分を求めて輝度の差分画像を生成する。なお、各階層のピラミッド画像は、それぞれ大きさ(画素数)が異なるので、差分画像の生成時には、より小さい方のピラミッド画像が、より大きいピラミッド画像に合わせてアップコンバートされる。
The
差分算出部183は、予め定められた数だけ輝度の差分画像を生成すると、生成したそれらの差分画像を正規化し、輝度情報マップ生成部184に供給する。輝度情報マップ生成部184は、差分算出部183から供給された差分画像に基づいて輝度情報マップを生成し、被写体マップ生成部155に供給する。
When the
[色情報抽出部の構成]
図7は、図5の色情報抽出部152の構成例を示すブロック図である。
[Configuration of color information extraction unit]
FIG. 7 is a block diagram illustrating a configuration example of the color
色情報抽出部152は、RG差分画像生成部211、BY差分画像生成部212、ピラミッド画像生成部213、ピラミッド画像生成部214、差分算出部215、差分算出部216、色情報マップ生成部217、および色情報マップ生成部218から構成される。
The color
RG差分画像生成部211は、供給された入力画像を用いて、入力画像の画素のR(赤)成分とG(緑)成分との差分を、画素の画素値とするRG差分画像を生成し、ピラミッド画像生成部213に供給する。RG差分画像の任意の画素の画素値は、その画素と同じ位置にある入力画像の画素のRの成分と、Gの成分との差分の値を示している。
The RG difference
BY差分画像生成部212は、供給された入力画像を用いて、入力画像の画素のB(青)成分とY(黄)成分との差分を、画素の画素値とするBY差分画像を生成し、ピラミッド画像生成部214に供給する。BY差分画像の任意の画素の画素値は、その画素と同じ位置にある入力画像の画素のB(青)成分と、Y(黄)成分との差分の値を示している。
The BY difference
ピラミッド画像生成部213およびピラミッド画像生成部214は、RG差分画像生成部211およびBY差分画像生成部212から供給されたRG差分画像およびBY差分画像を用いて、互いに解像度の異なる複数のRG差分画像およびBY差分画像を生成する。そして、ピラミッド画像生成部213およびピラミッド画像生成部214は、生成したそれらのRG差分画像およびBY差分画像を、RGの差分のピラミッド画像、およびBYの差分のピラミッド画像として差分算出部215および差分算出部216に供給する。
The pyramid
例えば、RGの差分のピラミッド画像、およびBYの差分のピラミッド画像として、輝度のピラミッド画像の場合と同様に、それぞれレベルL1乃至レベルL8までの8つの解像度の階層のピラミッド画像が生成される。 For example, as the pyramid image of the difference of RG and the pyramid image of the difference of BY, as in the case of the pyramid image of luminance, pyramid images of eight resolution layers from level L1 to level L8 are generated.
差分算出部215および差分算出部216は、ピラミッド画像生成部213およびピラミッド画像生成部214から供給された複数のピラミッド画像のうち、互いに階層の異なる2つのピラミッド画像を選択し、選択したピラミッド画像の差分を求めてRGの差分の差分画像、およびBYの差分の差分画像を生成する。なお、各階層のピラミッド画像は、それぞれ大きさが異なるので、差分画像の生成時には、より小さい方のピラミッド画像がアップコンバートされて、より大きい方のピラミッド画像と同じ大きさとされる。
The
差分算出部215および差分算出部216は、予め定められた数だけRGの差分の差分画像、およびBYの差分の差分画像を生成すると、生成したそれらの差分画像を正規化し、色情報マップ生成部217および色情報マップ生成部218に供給する。色情報マップ生成部217および色情報マップ生成部218は、差分算出部215および差分算出部216から供給された差分画像に基づいて色情報マップを生成し、被写体マップ生成部155に供給する。色情報マップ生成部217ではRGの差分の色情報マップが生成され、色情報マップ生成部218ではBYの差分の色情報マップが生成される。
When the
[エッジ情報抽出部の構成]
図8は、図5のエッジ情報抽出部153の構成例を示すブロック図である。
[Configuration of edge information extraction unit]
FIG. 8 is a block diagram illustrating a configuration example of the edge
エッジ情報抽出部153は、エッジ画像生成部241乃至エッジ画像生成部244、ピラミッド画像生成部245乃至ピラミッド画像生成部248、差分算出部249乃至差分算出部252、およびエッジ情報マップ生成部253乃至エッジ情報マップ生成部256から構成される。
The edge
エッジ画像生成部241乃至エッジ画像生成部244は、供給された入力画像に対して、ガボアフィルタを用いたフィルタ処理を施し、例えば0度、45度、90度、および135度の方向のエッジ強度を画素の画素値とするエッジ画像を生成し、ピラミッド画像生成部245乃至ピラミッド画像生成部248に供給する。
The edge
例えば、エッジ画像生成部241により生成されるエッジ画像の任意の画素の画素値は、その画素と同じ位置にある入力画像の画素における0度の方向のエッジ強度を示している。なお、各エッジの方向とは、ガボアフィルタを構成するガボア関数における角度成分により示される方向をいう。
For example, the pixel value of an arbitrary pixel of the edge image generated by the edge
ピラミッド画像生成部245乃至ピラミッド画像生成部248は、エッジ画像生成部241乃至エッジ画像生成部244から供給された各方向のエッジ画像を用いて、互いに解像度の異なる複数のエッジ画像を生成する。そして、ピラミッド画像生成部245乃至ピラミッド画像生成部248は、生成したそれらの各方向のエッジ画像を、エッジの各方向のピラミッド画像として差分算出部249乃至差分算出部252に供給する。
The pyramid
例えば、エッジの各方向のピラミッド画像として、輝度のピラミッド画像の場合と同様に、それぞれレベルL1乃至レベルL8までの8つの階層のピラミッド画像が生成される。 For example, as the pyramid image in each direction of the edge, as in the case of the pyramid image of luminance, eight levels of pyramid images from level L1 to level L8 are generated.
差分算出部249乃至差分算出部252は、ピラミッド画像生成部245乃至ピラミッド画像生成部248から供給された、複数のピラミッド画像のうち、互いに階層の異なる2つのピラミッド画像を選択し、選択したピラミッド画像の差分を求めてエッジの各方向の差分画像を生成する。なお、各階層のピラミッド画像は、それぞれ大きさが異なるので、差分画像の生成時には、より小さい方のピラミッド画像がアップコンバートされる。
The
差分算出部249乃至差分算出部252は、予め定められた数だけエッジの各方向の差分画像を生成すると、生成したそれらの差分画像を正規化し、エッジ情報マップ生成部253乃至エッジ情報マップ生成部256に供給する。エッジ情報マップ生成部253乃至エッジ情報マップ生成部256は、差分算出部249乃至差分算出部252から供給された差分画像に基づいて、各方向のエッジ情報マップを生成し、被写体マップ生成部155に供給する。
When the
[顔情報抽出部の構成]
図9は、図5の顔情報抽出部154の構成例を示すブロック図である。
[Configuration of face information extraction unit]
FIG. 9 is a block diagram illustrating a configuration example of the face
顔情報抽出部154は、顔検出部281および顔情報マップ生成部282から構成される。
The face
顔検出部281は、供給された入力画像から被写体としての人の顔の領域を検出し、その検出結果を顔情報マップ生成部282に供給する。顔情報マップ生成部282は、顔検出部281からの検出結果に基づいて顔情報マップを生成し、被写体マップ生成部155に供給する。
The
[トラッキング処理の説明]
ところで、撮像装置により時間的に連続して複数の入力画像が撮像され、各入力画像が画像処理装置11に供給されると、表示制御部23は、供給された入力画像を表示部24に供給して表示させる。このとき、ユーザが撮像装置(画像処理装置11)を操作して、被写体枠の表示を指示し、追尾すべき被写体が表示されている入力画像上の領域を指定すると、画像処理装置11は、トラッキング処理を開始する。すなわち、画像処理装置11は、入力画像から追尾対象の被写体を検出して、入力画像上に被写体枠を表示させる。
[Description of tracking process]
By the way, when a plurality of input images are picked up continuously by the image pickup device and each input image is supplied to the
以下、図10のフローチャートを参照して、図2の画像処理装置11によるトラッキング処理について説明する。
Hereinafter, the tracking process by the
ステップS11において、平坦判定部51は、平坦度算出処理を行い、供給された現フレームの入力画像の平坦度を算出する。算出された平坦度は、平坦度算出部62から判定部63に供給される。なお、平坦度算出処理の詳細は後述する。
In step S11, the
ステップS12において、判定部63は、平坦度算出部62から供給された平坦度に基づいて、現フレームの入力画像が平坦な画像であるか否かを判定する。
In step S <b> 12, the
具体的には、平坦度が予め定められた閾値thAより大きい場合、入力画像は平坦な画像であると判定される。ここで、平坦度は、入力画像の各ブロックのうち、分散値が予め定められた閾値thB未満であるブロックの数とされる。 Specifically, when the flatness is greater than a predetermined threshold thA, it is determined that the input image is a flat image. Here, the flatness is the number of blocks whose variance value is less than a predetermined threshold thB among the blocks of the input image.
分散値がある程度小さいブロックでは、空間方向における画素の画素値の変化が少ないので、そのブロックには、例えば、空などの平坦な模様の被写体が表示されているはずである。したがって、入力画像上に、このような平坦なブロックが一定数以上ある場合、その入力画像は、全体として起伏の少ない絵柄の被写体が表示される平坦な画像であるといえる。 In a block having a small variance value, there is little change in the pixel value of the pixel in the spatial direction, and therefore, a flat pattern subject such as the sky should be displayed in the block. Therefore, when there are a certain number or more of such flat blocks on the input image, it can be said that the input image is a flat image on which a subject having a pattern with few undulations is displayed as a whole.
ステップS12において、平坦な画像でないと判定された場合、判定部63は、供給された現フレームの入力画像を、トラッキング部52のブロック動き検出部91に供給し、トラッキング部52に被写体領域の検出を指示して、処理はステップS13に進む。
When it is determined in step S12 that the image is not a flat image, the
入力画像全体が平坦でない場合、つまり入力画像上の被写体にある程度起伏(テクスチャ)がある場合、ブロックマッチング等により、フレーム間の被写体の動きを精度よく検出することができる。そこで、判定部63は、現フレームの入力画像が平坦でない場合には、動き検出により被写体領域を検出するトラッキング部52を選択し、被写体領域を検出させる。
When the entire input image is not flat, that is, when the subject on the input image has a certain undulation (texture), the motion of the subject between frames can be detected with high accuracy by block matching or the like. Therefore, when the input image of the current frame is not flat, the
ステップS13において、トラッキング部52は、動き検出による被写体検出処理を行って、判定部63から供給された現フレームの入力画像から、追尾対象の被写体の領域を検出する。トラッキング部52は、追尾対象の被写体の領域を検出すると、その検出結果を示す被写体領域情報を生成し、表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。
In step S <b> 13, the
動き検出により被写体の領域が検出されると、その後、処理はステップS15に進む。なお、動き検出による被写体検出処理の詳細は後述する。 When the subject area is detected by the motion detection, the process proceeds to step S15. Details of the subject detection process based on motion detection will be described later.
また、ステップS12において、平坦な画像であると判定された場合、判定部63は、供給された現フレームの入力画像を、トラッキング部53の被写体抽出部121に供給し、トラッキング部53に被写体領域の検出を指示して、処理はステップS14に進む。
If it is determined in step S12 that the image is a flat image, the
入力画像全体が平坦な絵柄である場合、ブロックマッチング等の処理では、精度よく被写体の位置を特定することはできないので、動き検出を利用したトラッキングでは、安定して被写体を追尾することは困難である。 If the entire input image has a flat pattern, the subject position cannot be accurately identified by processing such as block matching. Therefore, tracking using motion detection is difficult to track the subject stably. is there.
これに対して、ビジュアルアテンションを利用した被写体の検出では、輝度や色、エッジなどの複数の特徴の特徴量を用いて入力画像から被写体を検出するので、平坦な画像であっても精度よく被写体を検出することができる。 On the other hand, in the detection of a subject using visual attention, the subject is detected from an input image using feature quantities of a plurality of features such as luminance, color, and edge, so that even a flat image can be accurately detected. Can be detected.
具体的には、ビジュアルアテンションでは、ユーザが入力画像を一瞥した場合に、目を向ける物体が被写体であるとされる。一般に、追尾対象となる被写体は、いわゆる前景であることが殆どであるが、入力画像全体においては、前景よりも背景の面積が大きいことが多い。そのため、入力画像全体、すなわち背景が平坦であれば、ユーザの目は背景には向きにくいはずであるから、容易に前景である追尾対象の被写体を捉えることができる。 Specifically, in visual attention, when a user glances at an input image, an object that turns his eyes is a subject. In general, the subject to be tracked is mostly a so-called foreground, but in the entire input image, the background area is often larger than the foreground. Therefore, if the entire input image, that is, the background is flat, the user's eyes should be difficult to face the background, so that the subject to be tracked that is the foreground can be easily captured.
また、ビジュアルアテンションでは、色に関する情報が用いられて被写体マップが生成されるため、背景だけでなく前景も平坦な絵柄であったとしても、前景と背景とである程度強いコントラストがあれば、充分な精度で被写体を検出することができる。 In addition, visual attention uses color information to generate a subject map, so even if the foreground is flat as well as the background, it is sufficient if there is a strong contrast between the foreground and the background. The subject can be detected with high accuracy.
そこで、判定部63は、入力画像が平坦である場合には、動き検出を利用する場合よりも、より高精度に平坦な画像から被写体を検出可能な、ビジュアルアテンションを利用した被写体検出を行なうトラッキング部53を選択し、被写体領域を検出させる。
Therefore, when the input image is flat, the
なお、ビジュアルアテンションを利用した被写体検出では、入力画像の背景が平坦でない場合、ユーザが入力画像を一瞥したときに、ユーザの目は背景にも向けられる可能性があるため、追尾対象ではない背景の被写体が、追尾対象として検出されてしまうこともある。入力画像全体が平坦でない場合には、ビジュアルアテンションを利用したトラッキングでは、入力画像全体が平坦な場合よりも被写体の検出精度が低下してしまう恐れがあるため、入力画像が平坦でない場合には、動き検出を利用した被写体検出がより適している。 In subject detection using visual attention, if the background of the input image is not flat, the user's eyes may be directed toward the background when the user glances at the input image. May be detected as a tracking target. When the entire input image is not flat, tracking using visual attention may cause the subject detection accuracy to be lower than when the entire input image is flat. Subject detection using motion detection is more suitable.
ステップS14において、トラッキング部53は、ビジュアルアテンションによる被写体検出処理を行って、判定部63から供給された現フレームの入力画像から、追尾対象の被写体の領域を検出する。トラッキング部53は、追尾対象の被写体の領域を検出すると、その検出結果を示す被写体領域情報を生成し、表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。
In step S <b> 14, the
トラッキング部53により被写体の領域が検出されると、その後、処理はステップS15に進む。なお、ビジュアルアテンションによる被写体検出処理の詳細は後述する。
When the subject area is detected by the
ステップS13またはステップS14において、現フレームの入力画像から被写体領域が検出されると、ステップS15において、表示制御部23は、供給された現フレームの入力画像を表示部24に表示させるとともに、入力画像上に被写体枠を表示させる。
When the subject area is detected from the input image of the current frame in step S13 or step S14, in step S15, the
すなわち、表示制御部23は、トラッキング部52またはトラッキング部53から供給された被写体領域情報に基づいて、入力画像上の被写体領域情報により示される位置に、被写体枠が表示されるように入力画像を加工する。そして、表示制御部23は、加工された入力画像を表示部24に供給し、表示させる。
That is, the
なお、トラッキング処理の開始時、つまり1回目のトラッキング処理においては、ユーザにより指定された領域が、現フレームの被写体領域とされ、その被写体領域を示す被写体領域情報と入力画像とが保持部54に保持される。この場合、ステップS11乃至ステップS14の処理は行われず、入力画像と被写体枠の表示の処理だけが行われる。
Note that at the start of the tracking process, that is, in the first tracking process, the area specified by the user is the subject area of the current frame, and subject area information indicating the subject area and the input image are stored in the holding
ステップS16において、画像処理装置11は、被写体枠を表示させる処理を終了するか否かを判定する。例えば、ユーザにより処理の終了が指示された場合、処理を終了すると判定される。
In step S16, the
ステップS16において、処理を終了しないと判定された場合、処理はステップS11に戻り、上述した処理が繰り返される。すなわち、次のフレームの入力画像から被写体領域が検出され、入力画像とともに被写体枠が表示される。 If it is determined in step S16 that the process is not terminated, the process returns to step S11, and the above-described process is repeated. That is, the subject area is detected from the input image of the next frame, and the subject frame is displayed together with the input image.
これに対して、ステップS16において、終了すると判定された場合、画像処理装置11の各部は行なっている処理を終了し、トラッキング処理は終了する。
On the other hand, when it is determined in step S16 that the process is to be ended, each unit of the
このようにして、画像処理装置11は、フレームごとに、入力画像が平坦であるか否かを判定し、その判定結果に応じて、動き検出、またはビジュアルアテンションの何れかを利用した方法により入力画像から被写体を検出し、被写体枠を表示させる。
In this manner, the
このように、入力画像が平坦であるかといった、入力画像の特性を特定し、特定された特性を有する画像を得意とするトラッキング方法により、入力画像から被写体を検出するようにしたので、より迅速に、かつより安定して被写体をトラッキングすることができる。 As described above, the characteristics of the input image, such as whether the input image is flat, are specified, and the subject is detected from the input image by the tracking method that is good at the image having the specified characteristics. In addition, the subject can be tracked more stably.
例えば、ビジュアルアテンションや動き検出では、Lucas-Kanadeアルゴリズムを利用して特徴点を検出する場合よりも処理量が少なくてすむので、より迅速に被写体を検出することができる。しかも、画像処理装置11では、被写体の検出にシリコン網膜や深度カメラといった特殊な器具が不要であるため、より簡単にトラッキングを行なうことができ、一般的な撮像装置等にも、容易に実装することが可能である。
For example, in visual attention and motion detection, the amount of processing is smaller than in the case where feature points are detected using the Lucas-Kanade algorithm, so that the subject can be detected more quickly. In addition, the
[平坦度算出処理の説明]
次に、図11のフローチャートを参照して、図10のステップS11に対応する平坦度算出処理について説明する。
[Description of flatness calculation processing]
Next, the flatness calculation process corresponding to step S11 of FIG. 10 will be described with reference to the flowchart of FIG.
ステップS41において、分散値算出部61は、供給された現フレームの入力画像を複数のブロックに分割する。
In step S41, the variance
ステップS42において、分散値算出部61は、入力画像上の1つのブロックを選択し、そのブロック内の画素の画素値を用いて、画素値の分散値を算出する。
In step S42, the variance
すなわち、分散値算出部61は、ブロック内の各画素について、その画素の画素値と、ブロック内の画素の画素値の平均値との差分の2乗値を求め、それらの画素ごとの2乗値の総和をブロック内の全画素数で除算することにより、ブロックの分散値を求める。分散値算出部61は、算出した分散値を平坦度算出部62に供給する。
That is, the variance
ステップS43において、平坦度算出部62は、分散値算出部61から供給されたブロックの分散値が予め定められた閾値thB未満であるか否か、すなわち処理対象のブロックが平坦であるか否かを判定する。
In step S43, the
ブロックの分散値がある程度小さい場合、ブロック内の画素の画素値は、ばらつきが少ないため、そのブロックは平坦な絵柄であるといえる。そのため、分散値が閾値thB未満であるブロックは、平坦なブロックであるとされる。 When the variance value of the block is small to some extent, it can be said that the pixel value of the pixels in the block has a small variation, and thus the block has a flat picture. Therefore, a block having a variance value less than the threshold thB is regarded as a flat block.
ステップS43において、分散値が閾値thB未満であると判定された場合、つまり処理対象のブロックが平坦なものである場合、ステップS44において、平坦度算出部62は、保持している平坦度に1を加算する。
If it is determined in step S43 that the variance is less than the threshold thB, that is, if the processing target block is flat, in step S44, the
すなわち、平坦度算出部62は、処理対象のフレームの入力画像について、その入力画像を構成する平坦なブロックの数を示す平坦度を保持しており、この平坦度は、新たなフレームの入力画像が供給されるたびに「0」に初期化される。平坦度算出部62は、平坦なブロックが検出されると、保持している平坦度に1を加算する。
That is, the
したがって、入力画像の全てのブロックが処理対象とされたとき、平坦度により示される数は、処理対象のフレームの入力画像における、平坦なブロックの数と等しくなり、この平坦度を指標とすれば、入力画像全体が平坦であるかを特定することができる。 Therefore, when all the blocks of the input image are processed, the number indicated by the flatness is equal to the number of flat blocks in the input image of the processing target frame, and this flatness is used as an index. It is possible to specify whether the entire input image is flat.
ステップS44において、平坦度に1が加算されると、その後、処理はステップS45に進む。 If 1 is added to the flatness in step S44, then the process proceeds to step S45.
一方、ステップS43において、分散値が閾値thB以上であると判定された場合、つまり処理対象のブロックが平坦ではないと判定された場合、平坦度は更新されないので、ステップS44の処理は行われず、処理はステップS45へと進む。 On the other hand, if it is determined in step S43 that the variance is greater than or equal to the threshold thB, that is, if it is determined that the block to be processed is not flat, the flatness is not updated, so the process of step S44 is not performed. The process proceeds to step S45.
ステップS44において平坦度が更新されたか、またはステップS43において分散値が閾値thB以上であると判定されると、ステップS45において、平坦判定部51は、入力画像上の全てのブロックが処理対象とされたか否かを判定する。
If it is determined in step S44 that the flatness has been updated or the variance value is greater than or equal to the threshold thB in step S43, the
ステップS45において、まだ全てのブロックが処理対象とされていないと判定された場合、処理はステップS42に戻り、上述した処理が繰り返される。すなわち、次のブロックが処理対象とされて、平坦度が更新される。 If it is determined in step S45 that not all blocks have been processed, the process returns to step S42 and the above-described process is repeated. That is, the next block is set as a processing target, and the flatness is updated.
これに対して、ステップS45において、全てのブロックが処理対象とされたと判定された場合、平坦度算出部62は、保持している平坦度を、現フレームの入力画像の最終的な平坦度として判定部63に供給し、平坦度算出処理は終了する。そして、その後、処理は図10のステップS12へと進む。
On the other hand, when it is determined in step S45 that all the blocks have been processed, the
このようにして、平坦判定部51は、現フレームの入力画像について、その入力画像の特性を示す平坦度を算出する。これにより、入力画像の特性を特定し、より適切なトラッキング方法を選択することができるようになる。
In this way, the
[動き検出による被写体検出処理の説明]
次に、図12のフローチャートを参照して、図10のステップS13の処理に対応する動き検出による被写体検出処理について説明する。
[Description of subject detection processing by motion detection]
Next, a subject detection process by motion detection corresponding to the process of step S13 of FIG. 10 will be described with reference to the flowchart of FIG.
ステップS71において、ブロック動き検出部91は、保持部54から前フレームの入力画像と被写体領域情報を取得して、前フレームの入力画像における被写体領域情報により示される被写体領域を複数のブロックに分割する。
In step S71, the block
ステップS72において、ブロック動き検出部91は、分割された各ブロックについて、ブロックと、供給された現フレームの入力画像とを用いて各ブロックの動きを検出する。
In step S72, the block
例えば、ブロック動き検出部91は、現フレームの入力画像と、処理対象のブロックとを用いたブロックマッチングにより、現フレームの入力画像上において、処理対象のブロックと最も相関の高い(類似の度合いの高い)領域を検索する。そして、ブロック動き検出部91は、検索の結果に基づいて、フレーム間のブロックの動きとして、処理対象のブロックの動きベクトルを求める。
For example, the block
これにより、例えば図13の図中、左側に示すように、前フレームの入力画像P(n−1)上の被写体領域SR(n−1)が複数のブロックに分割され、各ブロックの動きベクトルが求められる。図13の例では、被写体領域SR(n−1)は、縦4×横4の合計16個のブロックに分割されており、これらのブロック内の矢印は、各ブロックの動きベクトルを表している。 Accordingly, for example, as shown on the left side in FIG. 13, the subject region SR (n−1) on the input image P (n−1) of the previous frame is divided into a plurality of blocks, and the motion vector of each block Is required. In the example of FIG. 13, the subject region SR (n−1) is divided into a total of 16 blocks of 4 × 4 in the vertical direction, and the arrows in these blocks represent the motion vectors of each block. .
ブロック動き検出部91は、各ブロックの動きベクトルを求めると、それらの動きベクトルを被写体動き検出部92に供給する。
When the block
ステップS73において、被写体動き検出部92は、ブロック動き検出部91から供給された各ブロックの動きベクトルを用いて、被写体領域全体の動きを検出する。例えば、被写体動き検出部92は、被写体領域の動きとして、各ブロックの動きベクトルの平均を求め、得られた動きベクトルを被写体領域決定部93に供給する。
In step S <b> 73, the subject
ステップS74において、被写体領域決定部93は、被写体動き検出部92から供給された被写体領域全体の動きを示す動きベクトルと、保持部54に保持されている前フレームの被写体領域情報とから、現フレームの入力画像上の被写体領域を特定する。
In step S 74, the subject
具体的には、例えば図13に示すように、被写体領域SR(n−1)内の各ブロックの動きベクトルの平均が求められ、図中、右側に示されるように、被写体領域SR(n−1)全体の動きを示す動きベクトルV(n−1)が得られたとする。 Specifically, for example, as shown in FIG. 13, the average of the motion vectors of the respective blocks in the subject region SR (n−1) is obtained, and as shown on the right side in the drawing, the subject region SR (n− 1) Assume that a motion vector V (n−1) indicating the overall motion is obtained.
ここで、図中、横方向および縦方向をそれぞれx方向およびy方向とし、各ブロックの動きベクトルがx成分およびy成分からなるとする。このとき、ブロックの動きベクトルのx成分およびy成分の平均値が、それぞれ動きベクトルV(n−1)のx成分およびy成分とされる。 Here, in the figure, it is assumed that the horizontal direction and the vertical direction are the x direction and the y direction, respectively, and the motion vector of each block consists of an x component and a y component. At this time, the average values of the x and y components of the motion vector of the block are set as the x and y components of the motion vector V (n−1), respectively.
被写体領域決定部93は、このようにして得られた動きベクトルV(n−1)と、前フレームの被写体領域情報により示される被写体領域SR(n−1)の位置とから、現フレームの被写体領域SR(n)を特定する。すなわち、被写体領域決定部93は、現フレームの入力画像P(n)上において、被写体領域SR(n−1)と同じ位置の領域を、動きベクトルV(n−1)の方向に、動きベクトルV(n−1)の大きさだけ移動させ、移動後の領域を被写体領域SR(n)とする。
The subject
前フレームの被写体領域SR(n−1)には、追尾対象の被写体が含まれているから、その被写体領域全体のフレーム間の動きは、追尾対象の被写体のフレーム間の動きとなる。したがって、現フレームの入力画像上では、入力画像上の前フレームの被写体領域と同じ位置から、その被写体領域の動きの分だけ離れた位置にある領域内に、追尾対象の被写体が存在するはずである。 Since the subject area SR (n−1) of the previous frame includes the subject to be tracked, the movement between frames of the entire subject area is the movement between frames of the subject to be tracked. Therefore, on the input image of the current frame, the subject to be tracked should exist in an area that is separated from the same position as the subject area of the previous frame on the input image by the movement of the subject area. is there.
そこで、被写体領域決定部93は、現フレームの入力画像において、前フレームの被写体領域と同じ位置から、被写体領域の動きの分だけ離れた位置の領域を、現フレームの被写体領域とする。
Therefore, the subject
ステップS75において、被写体領域決定部93は、特定された現フレームの被写体領域の位置を示す被写体領域情報を生成し、表示制御部23に供給するとともに、現フレームの被写体領域情報を保持部54に供給し、保持させる。
In step S75, the subject
現フレームの被写体領域情報が生成されると、動き検出による被写体検出処理は終了し、その後、処理は図10のステップS15に進む。 When the subject area information of the current frame is generated, the subject detection process by motion detection ends, and then the process proceeds to step S15 in FIG.
このようにして、トラッキング部52は、被写体領域のフレーム間の動きを検出することで、現フレームの被写体領域を検出する。このように、フレーム間の動きを利用して、現フレームにおける被写体の位置を検出すれば、入力画像が平坦でない、ある程度起伏のある画像である場合には、より高い精度で被写体を検出することができる。
In this way, the
[ビジュアルアテンションによる被写体検出処理の説明]
さらに、図14のフローチャートを参照して、図10のステップS14の処理に対応するビジュアルアテンションによる被写体検出処理について説明する。
[Description of subject detection processing by visual attention]
Further, a subject detection process based on visual attention corresponding to the process of step S14 of FIG. 10 will be described with reference to the flowchart of FIG.
ステップS101において、被写体抽出部121は、判定部63から供給された現フレームの入力画像を用いて被写体マップ生成処理を行い、入力画像の各領域における被写体らしさを示す被写体マップを生成し、被写体候補領域決定部122に供給する。この被写体マップでは、画素の画素値が大きい領域ほど、被写体らしい領域であることを示している。なお、被写体マップ生成処理の詳細は後述する。
In step S101, the
ステップS102において、被写体候補領域決定部122は、被写体抽出部121から供給された被写体マップを、予め定められた閾値thCを用いた閾値処理により2値化する。具体的には、被写体候補領域決定部122は、被写体マップの画素の画素値が閾値thC以上であれば、その画素の画素値を「1」とし、被写体マップの画素の画素値が閾値thC未満であれば、その画素の画素値を「0」とする。
In step S102, the subject candidate
2値化された被写体マップにおいては、画素値が「1」である画素が、被写体らしい領域であり、画素値が「0」である画素は、被写体ではない領域(例えば、背景の領域)であるとされる。つまり、2値化後の被写体マップは、入力画像における被写体らしい領域を示している。 In the binarized subject map, a pixel with a pixel value “1” is a region that seems to be a subject, and a pixel with a pixel value “0” is a region that is not a subject (for example, a background region). It is supposed to be. That is, the binarized subject map indicates a region that seems to be a subject in the input image.
ステップS103において、被写体候補領域決定部122は、2値化された被写体マップに対して矩形化処理を行い、被写体マップ上における被写体領域の候補となる被写体候補領域を抽出する。
In step S103, the subject candidate
具体的には、被写体候補領域決定部122は、2値化後の被写体マップにおいて、互いに隣接する、画素値が1である画素からなる領域を検出し、検出された領域を囲む矩形の領域を、被写体候補領域とする。画素値が「1」である画素からなる領域は、1つの被写体全体の領域を表しているため、この領域が、追尾対象の被写体が含まれる被写体領域の候補となる被写体候補領域とされる。
Specifically, the subject candidate
被写体候補領域決定部122は、被写体候補領域を抽出すると、各被写体候補領域の位置を示す情報を被写体領域決定部123に供給する。
When the subject candidate
ステップS104において、被写体領域決定部123は、保持部54に保持されている前フレームの被写体領域情報を用いて、被写体候補領域決定部122から供給された情報に示される被写体候補領域のうちの何れかを、現フレームの被写体領域として選択する。
In step S <b> 104, the subject
例えば、図15の左側に示すように、前フレームの入力画像P(n−1)上のほぼ中央に被写体領域SR(n−1)が検出されたとする。この場合、被写体領域決定部123は、現フレームの入力画像P(n)上において、前フレームの被写体領域情報により示される被写体領域SR(n−1)の中心と同じ位置を中心位置C(n−1)とする。
For example, as shown on the left side of FIG. 15, it is assumed that the subject region SR (n−1) is detected at approximately the center of the input image P (n−1) of the previous frame. In this case, the subject
そして、被写体領域決定部123は、入力画像P(n)において、現フレームの被写体候補領域のうち、中心位置C(n−1)が含まれる被写体候補領域を、現フレームの被写体領域として選択する。例えば、図中、右側の例では、入力画像P(n)上の中心位置C(n−1)が含まれる被写体候補領域S(n)が、現フレームの被写体領域として選択される。すなわち、被写体領域として選択された被写体候補領域S(n)は、被写体候補領域のうち、現フレームの入力画像P(n)上における、最も前フレームの被写体領域と同じ位置から近い被写体候補領域である。
Then, the subject
被写体候補領域が複数検出された場合、前フレームの被写体領域から近い位置にある被写体候補領域内に、追尾対象となる被写体が含まれている可能性が高い。そこで、被写体領域決定部123は、中心位置C(n−1)が含まれる被写体候補領域を、現フレームの被写体領域として選択する。
When a plurality of subject candidate areas are detected, there is a high possibility that a subject to be tracked is included in the subject candidate area located near the subject area of the previous frame. Therefore, the subject
なお、入力画像上に中心位置C(n−1)が含まれる被写体候補領域が複数ある場合、それらの被写体候補領域のうち、最も被写体らしさの評価の高い被写体候補領域が、現フレームの被写体領域とされる。 If there are a plurality of subject candidate regions including the center position C (n−1) on the input image, the subject candidate region with the highest evaluation of subjectness among those subject candidate regions is the subject region of the current frame. It is said.
そのような場合、例えば被写体候補領域決定部122は、2値化前の被写体マップに基づいて、各被写体候補領域の被写体らしさの評価を示す評価値を算出する。例えば、被写体マップ上の被写体候補領域と同じ領域内の画素の画素値の平均値または最大値が、その被写体候補領域の評価値とされる。そして、被写体領域決定部123は、被写体候補領域決定部122により算出された評価値を用いて、中心位置C(n−1)を含む被写体候補領域のうち、評価値が最大の被写体候補領域を被写体領域として選択する。
In such a case, for example, the subject candidate
また、被写体候補領域は検出されたが、中心位置C(n−1)が含まれる被写体候補領域がないこともあり得る。そのような場合、検出された被写体候補領域のうちの評価値が最大のものが被写体領域とされてもよいし、中心位置C(n−1)から最も近い位置に中心がある被写体候補領域が、被写体領域として選択されてもよい。 In addition, although the subject candidate area is detected, there may be no subject candidate area including the center position C (n−1). In such a case, the detected subject candidate region having the largest evaluation value may be set as the subject region, or the subject candidate region having the center closest to the center position C (n−1). May be selected as the subject area.
図14のフローチャートの説明に戻り、ステップS105において、被写体領域決定部123は、特定された現フレームの被写体領域の位置を示す被写体領域情報を生成し、表示制御部23に供給するとともに、現フレームの被写体領域情報を保持部54に供給し、保持させる。
Returning to the description of the flowchart of FIG. 14, in step S105, the subject
現フレームの被写体領域情報が生成されると、ビジュアルアテンションによる被写体検出処理は終了し、その後、処理は図10のステップS15に進む。 When the subject area information of the current frame is generated, the subject detection processing by visual attention is finished, and then the processing proceeds to step S15 in FIG.
このようにして、トラッキング部53は、被写体マップを用いて入力画像から任意の被写体らしい領域を被写体候補領域として抽出する。そして、トラッキング部53は、それらの被写体候補領域のなかから、前フレームの被写体領域の中心位置を含むものを、追尾対象の被写体が含まれる現フレームの被写体領域として選択する。このように、被写体マップを利用して、現フレームにおける被写体の位置を検出すれば、入力画像が平坦である場合でも、より高い精度で被写体を検出することができる。
In this way, the
[被写体マップ生成処理の説明]
また、以下、図16のフローチャートを参照して、図14のステップS101の処理に対応する被写体マップ生成処理について説明する。
[Description of subject map generation processing]
Hereinafter, the subject map generation process corresponding to the process of step S101 of FIG. 14 will be described with reference to the flowchart of FIG.
ステップS131において、輝度情報抽出部151は、輝度情報抽出処理を行って、判定部63から供給された入力画像に基づいて輝度情報マップを生成し、被写体マップ生成部155に供給する。そして、ステップS132において、色情報抽出部152は、色情報抽出処理を行って、判定部63から供給された入力画像に基づいて色情報マップを生成し、被写体マップ生成部155に供給する。
In step S 131, the luminance
ステップS133において、エッジ情報抽出部153は、エッジ情報抽出処理を行って、判定部63から供給された入力画像に基づいてエッジ情報マップを生成し、被写体マップ生成部155に供給する。また、ステップS134において、顔情報抽出部154は、顔情報抽出処理を行って、判定部63から供給された入力画像に基づいて顔情報マップを生成し、被写体マップ生成部155に供給する。
In step S <b> 133, the edge
なお、これらの輝度情報抽出処理、色情報抽出処理、エッジ情報抽出処理、および顔情報抽出処理の詳細は後述する。 Details of these luminance information extraction processing, color information extraction processing, edge information extraction processing, and face information extraction processing will be described later.
ステップS135において、被写体マップ生成部155は、輝度情報抽出部151乃至顔情報抽出部154から供給された輝度情報マップ乃至顔情報マップを用いて、被写体マップを生成し、被写体候補領域決定部122に供給する。
In step S135, the subject
例えば、被写体マップ生成部155は、情報マップごとに予め求められている重みである、情報重みWbを用いて各情報マップを線形結合し、さらに、その結果得られたマップの画素値に、予め求められた重みである、被写体重みWcを乗算して正規化し、被写体マップとする。
For example, the subject
つまり、これから求めようとする被写体マップ上の注目する画素を注目画素とすると、各情報マップの注目画素と同じ位置の画素の画素値に、情報マップごとの情報重みWbが乗算され、情報重みWbの乗算された画素値の総和が、注目画素の画素値とされる。さらに、このようにして求められた被写体マップの各画素の画素値に、被写体マップに対して予め求められた被写体重みWcが乗算されて正規化され、最終的な被写体マップとされる。 That is, assuming that the pixel of interest on the subject map to be obtained is the pixel of interest, the pixel value of the pixel at the same position as the pixel of interest of each information map is multiplied by the information weight Wb for each information map, and the information weight Wb Is the pixel value of the target pixel. Further, the pixel value of each pixel of the subject map obtained in this way is multiplied by a subject weight Wc obtained in advance for the subject map to be normalized to obtain a final subject map.
なお、より詳細には、色情報マップとして、RGの差分の色情報マップと、BYの差分の色情報マップとが用いられ、エッジ情報マップとして、0度、45度、90度、135度のそれぞれの方向のエッジ情報マップが用いられて、被写体マップが生成される。 More specifically, an RG difference color information map and a BY difference color information map are used as the color information map, and 0 degree, 45 degree, 90 degree, and 135 degree are used as the edge information map. The subject information map is generated using the edge information maps in the respective directions.
被写体マップが生成されて被写体候補領域決定部122に供給されると、被写体マップ生成処理は終了し、その後、処理は図14のステップS102へと進む。
When the subject map is generated and supplied to the subject candidate
[輝度情報抽出処理の説明]
次に、図17乃至図20のフローチャートを参照して、図16のステップS131乃至ステップS134の処理のそれぞれに対応する処理について説明する。
[Description of luminance information extraction processing]
Next, processing corresponding to each of the processing of step S131 to step S134 of FIG. 16 will be described with reference to the flowcharts of FIGS.
まず、図17のフローチャートを参照して、図16のステップS131の処理に対応する輝度情報抽出処理について説明する。 First, the luminance information extraction process corresponding to the process of step S131 of FIG. 16 will be described with reference to the flowchart of FIG.
ステップS161において、輝度画像生成部181は、判定部63から供給された入力画像を用いて輝度画像を生成し、ピラミッド画像生成部182に供給する。例えば、輝度画像生成部181は、入力画像の画素のR、G、およびBの各成分の値に、成分ごとに予め定められた係数を乗算し、係数の乗算された各成分の値の和を、入力画像の画素と同じ位置にある輝度画像の画素の画素値とする。つまり、輝度成分(Y)および色差成分(Cb,Cr)からなるコンポーネント信号の輝度成分が求められる。なお、画素のR、G、およびBの各成分の値の平均値が、輝度画像の画素の画素値とされてもよい。
In step S <b> 161, the luminance
ステップS162において、ピラミッド画像生成部182は、輝度画像生成部181から供給された輝度画像に基づいて、レベルL1乃至レベルL8の各階層のピラミッド画像を生成し、差分算出部183に供給する。
In step S <b> 162, the pyramid
ステップS163において、差分算出部183は、ピラミッド画像生成部182から供給されたピラミッド画像を用いて差分画像を生成して正規化し、輝度情報マップ生成部184に供給する。正規化は、差分画像の画素の画素値が、例えば0乃至255の間の値となるように行われる。
In step S <b> 163, the
具体的には、差分算出部183は、各階層の輝度のピラミッド画像のうち、レベルL6およびレベルL3、レベルL7およびレベルL3、レベルL7およびレベルL4、レベルL8およびレベルL4、並びにレベルL8およびレベルL5の各階層の組み合わせのピラミッド画像の差分を求める。これにより、合計5つの輝度の差分画像が得られる。
Specifically, the
例えば、レベルL6およびレベルL3の組み合わせの差分画像が生成される場合、レベルL6のピラミッド画像が、レベルL3のピラミッド画像の大きさに合わせてアップコンバートされる。つまり、アップコンバート前のレベルL6のピラミッド画像の1つの画素の画素値が、その画素に対応する、アップコンバート後のレベルL6のピラミッド画像の互いに隣接するいくつかの画素の画素値とされる。そして、レベルL6のピラミッド画像の画素の画素値と、その画素と同じ位置にあるレベルL3のピラミッド画像の画素の画素値との差分が求められ、その差分が差分画像の画素の画素値とされる。 For example, when a difference image of a combination of level L6 and level L3 is generated, the pyramid image of level L6 is up-converted according to the size of the pyramid image of level L3. That is, the pixel value of one pixel of the pyramid image of level L6 before up-conversion is the pixel value of several pixels adjacent to each other of the pyramid image of level L6 after up-conversion corresponding to that pixel. Then, the difference between the pixel value of the pixel of the level L6 pyramid image and the pixel value of the pixel of the level L3 pyramid image at the same position as the pixel is obtained, and the difference is set as the pixel value of the pixel of the difference image. The
これらの差分画像を生成する処理は、輝度画像にバンドパスフィルタを用いたフィルタ処理を施して、輝度画像から所定の周波数成分を抽出することと等価である。このようにして得られた差分画像の画素の画素値は、各レベルのピラミッド画像の輝度値の差、つまり入力画像における所定の画素における輝度と、その画素の周囲の平均的な輝度との差分を示している。 The process of generating these difference images is equivalent to performing a filter process using a bandpass filter on the luminance image and extracting a predetermined frequency component from the luminance image. The pixel value of the pixel of the difference image obtained in this way is the difference between the luminance values of the pyramid images at each level, that is, the difference between the luminance at a predetermined pixel in the input image and the average luminance around the pixel. Is shown.
一般的に、画像において周囲との輝度の差分の大きい領域は、その画像を見る人の目を引く領域であるので、その領域は被写体の領域である可能性が高い。したがって、各差分画像において、より画素値の大きい画素が、より被写体の領域である可能性の高い領域であることを示しているということができる。 In general, an area having a large luminance difference from the surroundings in an image is an area that catches the eye of a person who sees the image, so that the area is highly likely to be a subject area. Therefore, it can be said that in each difference image, a pixel having a larger pixel value is a region that is more likely to be a subject region.
ステップS164において、輝度情報マップ生成部184は、差分算出部183から供給された差分画像に基づいて輝度情報マップを生成し、被写体マップ生成部155に供給する。輝度情報マップが輝度情報マップ生成部184から被写体マップ生成部155に供給されると、輝度情報抽出処理は終了し、処理は図16のステップS132に進む。
In step S 164, the luminance information
例えば、輝度情報マップ生成部184は、供給された5つの差分画像を、予め求められた差分画像ごとの重みである差分重みWaにより重み付き加算し、1つの画像を求める。すなわち、各差分画像の同じ位置にある画素の画素値のそれぞれに差分重みWaが乗算されて、差分重みWaが乗算された画素値の総和が求められる。
For example, the luminance information
なお、輝度情報マップの生成時において、各差分画像が同じ大きさとなるように、差分画像のアップコンバートが行われる。 Note that, at the time of generating the luminance information map, the difference image is up-converted so that each difference image has the same size.
このようにして、輝度情報抽出部151は、入力画像から輝度画像を求め、その輝度画像から輝度情報マップを生成する。このようにして得られた輝度情報マップによれば、入力画像において、輝度の差の大きい領域、つまり入力画像を一瞥した観察者の目に付きやすい領域を簡単に検出することができる。
In this way, the luminance
[色情報抽出処理の説明]
次に、図18のフローチャートを参照して、図16のステップS132の処理に対応する色情報抽出処理について説明する。
[Description of color information extraction processing]
Next, color information extraction processing corresponding to the processing in step S132 in FIG. 16 will be described with reference to the flowchart in FIG.
ステップS191において、RG差分画像生成部211は、判定部63から供給された入力画像を用いて、RG差分画像を生成し、ピラミッド画像生成部213に供給する。
In step S191, the RG difference
ステップS192において、BY差分画像生成部212は、判定部63から供給された入力画像を用いてBY差分画像を生成し、ピラミッド画像生成部214に供給する。
In step S 192, the BY difference
ステップS193において、ピラミッド画像生成部213およびピラミッド画像生成部214は、RG差分画像生成部211からのRG差分画像、およびBY差分画像生成部212からのBY差分画像を用いて、ピラミッド画像を生成する。
In step S193, the pyramid
例えば、ピラミッド画像生成部213は、解像度の異なる複数のRG差分画像を生成することにより、レベルL1乃至レベルL8の各階層のピラミッド画像を生成し、差分算出部215に供給する。同様に、ピラミッド画像生成部214は、解像度の異なる複数のBY差分画像を生成することにより、レベルL1乃至レベルL8の各階層のピラミッド画像を生成し、差分算出部216に供給する。
For example, the pyramid
ステップS194において、差分算出部215および差分算出部216は、ピラミッド画像生成部213およびピラミッド画像生成部214から供給されたピラミッド画像に基づいて差分画像を生成して正規化し、色情報マップ生成部217および色情報マップ生成部218に供給する。差分画像の正規化では、例えば、画素の画素値が0乃至255の間の値となるようにされる。
In step S194, the
例えば、差分算出部215は、各階層のRGの差分のピラミッド画像のうち、レベルL6およびレベルL3、レベルL7およびレベルL3、レベルL7およびレベルL4、レベルL8およびレベルL4、並びにレベルL8およびレベルL5の各階層の組み合わせのピラミッド画像の差分を求める。これにより、合計5つのRGの差分の差分画像が得られる。
For example, the
同様に、差分算出部216は、各階層のBYの差分のピラミッド画像のうち、レベルL6およびレベルL3、レベルL7およびレベルL3、レベルL7およびレベルL4、レベルL8およびレベルL4、並びにレベルL8およびレベルL5の各階層の組み合わせのピラミッド画像の差分を求める。これにより、合計5つのBYの差分の差分画像が得られる。 Similarly, the difference calculation unit 216 includes a level L6 and a level L3, a level L7 and a level L3, a level L7 and a level L4, a level L8 and a level L4, and a level L8 and a level among the BY difference pyramid images of each layer. The difference of the pyramid image of the combination of each layer of L5 is obtained. As a result, a difference image of a total of five BY differences is obtained.
これらの差分画像を生成する処理は、RG差分画像またはBY差分画像にバンドパスフィルタを用いたフィルタ処理を施して、RG差分画像またはBY差分画像から所定の周波数成分を抽出することと等価である。このようにして得られた差分画像の画素の画素値は、各レベルのピラミッド画像の特定の色成分の差、つまり入力画像の画素における特定の色の成分と、その画素の周囲の平均的な特定の色の成分との差分を示している。 The process of generating these difference images is equivalent to performing a filtering process using a bandpass filter on the RG difference image or the BY difference image and extracting a predetermined frequency component from the RG difference image or the BY difference image. . The pixel value of the pixel of the difference image obtained in this way is the difference between the specific color component of the pyramid image at each level, that is, the specific color component in the pixel of the input image and the average around the pixel. A difference from a specific color component is shown.
一般的に、画像において周囲と比べて目立つ色の領域、つまり特定の色成分の周囲との差分の大きい領域は、その画像を見る人の目を引く領域であるので、その領域は被写体の領域である可能性が高い。したがって、各差分画像において、より画素値の大きい画素が、より被写体の領域である可能性の高い領域であることを示しているということができる。 In general, an area of a color that stands out from the surroundings in the image, that is, an area that has a large difference from the surroundings of a specific color component is an eye-catching area of the person who sees the image. Is likely. Therefore, it can be said that in each difference image, a pixel having a larger pixel value is a region that is more likely to be a subject region.
ステップS195において、色情報マップ生成部217および色情報マップ生成部218は、差分算出部215からの差分画像、および差分算出部216からの差分画像を用いて色情報マップを生成し、被写体マップ生成部155に供給する。
In step S195, the color information map generation unit 217 and the color information
例えば、色情報マップ生成部217は、差分算出部215から供給されたRGの差分の差分画像を、予め求められた差分画像ごとの差分重みWaにより重み付き加算して、1つのRGの差分の色情報マップとする。
For example, the color information map generation unit 217 weights and adds the difference image of the RG supplied from the
同様に、色情報マップ生成部218は、差分算出部216から供給されたBYの差分の差分画像を、予め求められた差分重みWaにより重み付き加算して、1つのBYの差分の色情報マップとする。なお、色情報マップの生成時において、各差分画像が同じ大きさとなるように、差分画像のアップコンバートが行われる。
Similarly, the color information
色情報マップ生成部217および色情報マップ生成部218が、このようにして得られたRGの差分の色情報マップ、およびBYの差分の色情報マップを被写体マップ生成部155に供給すると、色情報抽出処理は終了し、処理は図16のステップS133に進む。
When the color information map generation unit 217 and the color information
このようにして、色情報抽出部152は、入力画像から特定の色の成分の差分の画像を求め、その画像から色情報マップを生成する。このようにして得られた色情報マップによれば、入力画像において、特定の色成分の差の大きい領域、つまり入力画像を一瞥した観察者の目に付きやすい領域を簡単に検出することができる。
In this way, the color
なお、色情報抽出部152では、入力画像から抽出される色の情報として、R(赤)の成分と、G(緑)の成分の差分、およびB(青)の成分と、Y(黄)の成分との差分が抽出されると説明したが、色差成分Crと色差成分Cbなどが抽出されるようにしてもよい。ここで、色差成分Crは、R成分と輝度成分との差分であり、色差成分Cbは、B成分と輝度成分との差分である。
In the color
[エッジ情報抽出処理の説明]
図19は、図16のステップS133の処理に対応するエッジ情報抽出処理を説明するフローチャートである。以下、このエッジ情報抽出処理について説明する。
[Description of edge information extraction processing]
FIG. 19 is a flowchart for explaining edge information extraction processing corresponding to the processing in step S133 in FIG. Hereinafter, the edge information extraction process will be described.
ステップS221において、エッジ画像生成部241乃至エッジ画像生成部244は、判定部63から供給された入力画像に対して、ガボアフィルタを用いたフィルタ処理を施し、0度、45度、90度、および135度の方向のエッジ強度を画素の画素値とするエッジ画像を生成する。そして、エッジ画像生成部241乃至エッジ画像生成部244は、生成されたエッジ画像をピラミッド画像生成部245乃至ピラミッド画像生成部248に供給する。
In step S <b> 221, the edge
ステップS222において、ピラミッド画像生成部245乃至ピラミッド画像生成部248は、エッジ画像生成部241乃至エッジ画像生成部244からのエッジ画像を用いて、ピラミッド画像を生成し、差分算出部249乃至差分算出部252に供給する。
In step S222, the pyramid
例えば、ピラミッド画像生成部245は、解像度の異なる複数の0度方向のエッジ画像を生成することにより、レベルL1乃至レベルL8の各階層のピラミッド画像を生成し、差分算出部249に供給する。同様に、ピラミッド画像生成部246乃至ピラミッド画像生成部248は、レベルL1乃至レベルL8の各階層のピラミッド画像を生成して差分算出部250乃至差分算出部252に供給する。
For example, the pyramid
ステップS223において、差分算出部249乃至差分算出部252は、ピラミッド画像生成部245乃至ピラミッド画像生成部248からのピラミッド画像を用いて差分画像を生成して正規化し、エッジ情報マップ生成部253乃至エッジ情報マップ生成部256に供給する。差分画像の正規化では、例えば、画素の画素値が0乃至255の間の値となるようにされる。
In step S223, the
例えば、差分算出部249は、ピラミッド画像生成部245から供給された、各階層の0度方向のエッジのピラミッド画像のうち、レベルL6およびレベルL3、レベルL7およびレベルL3、レベルL7およびレベルL4、レベルL8およびレベルL4、並びにレベルL8およびレベルL5の組み合わせのピラミッド画像の差分を求める。これにより、合計5つのエッジの差分画像が得られる。
For example, the
同様に、差分算出部250乃至差分算出部252は、各階層のピラミッド画像のうち、レベルL6およびレベルL3、レベルL7およびレベルL3、レベルL7およびレベルL4、レベルL8およびレベルL4、並びにレベルL8およびレベルL5の各階層の組み合わせのピラミッド画像の差分を求める。これにより、各方向のエッジについて、それぞれ合計5つの差分画像が得られる。
Similarly, the
これらの差分画像を生成する処理は、エッジ画像にバンドパスフィルタを用いたフィルタ処理を施して、エッジ画像から所定の周波数成分を抽出することと等価である。このようにして得られた差分画像の画素の画素値は、各レベルのピラミッド画像のエッジ強度の差、つまり入力画像の所定の位置のエッジ強度と、その位置の周囲の平均的なエッジ強度との差を示している。 The process of generating these difference images is equivalent to performing a filter process using a bandpass filter on the edge image and extracting a predetermined frequency component from the edge image. The pixel values of the pixels of the difference image obtained in this way are the difference in edge strength between the pyramid images at each level, that is, the edge strength at a predetermined position of the input image and the average edge strength around that position. The difference is shown.
一般的に、画像において周囲と比べてエッジ強度の強い領域は、その画像を見る人の目を引く領域であるので、その領域は被写体の領域である可能性が高い。したがって、各差分画像において、より画素値の大きい画素が、より被写体の領域である可能性の高い領域であることを示しているということができる。 Generally, an area having a higher edge strength than the surrounding area in an image is an area that catches the eye of a person who sees the image, and therefore, there is a high possibility that the area is a subject area. Therefore, it can be said that in each difference image, a pixel having a larger pixel value is a region that is more likely to be a subject region.
ステップS224において、エッジ情報マップ生成部253乃至エッジ情報マップ生成部256は、差分算出部249乃至差分算出部252からの差分画像を用いて各方向のエッジ情報マップを生成し、被写体マップ生成部155に供給する。
In step S224, the edge information
例えば、エッジ情報マップ生成部253は、差分算出部249から供給された差分画像を、予め求められた差分重みWaにより重み付き加算して0度方向のエッジ情報マップとする。
For example, the edge information
同様に、エッジ情報マップ生成部254は差分算出部250からの差分画像を差分重みWaにより重み付き加算し、エッジ情報マップ生成部255は差分算出部251からの差分画像を差分重みWaにより重み付き加算し、エッジ情報マップ生成部256は差分算出部252からの差分画像を差分重みWaにより重み付き加算する。これにより、45度、90度、および135度の各方向のエッジ情報マップが得られる。なお、エッジ情報マップの生成時において、各差分画像が同じ大きさとなるように、差分画像のアップコンバートが行われる。
Similarly, the edge information
エッジ情報マップ生成部253乃至エッジ情報マップ生成部256が、このようにして得られた各方向の合計4つのエッジ情報マップを被写体マップ生成部155に供給すると、エッジ情報抽出処理は終了し、処理は図16のステップS134に進む。
When the edge information
このようにして、エッジ情報抽出部153は、入力画像から特定の方向のエッジの差分画像を求め、その差分画像からエッジ情報マップを生成する。このようにして得られた方向ごとのエッジ情報マップによれば、入力画像において、周囲の領域と比べて、特定の方向へのエッジ強度の大きい領域、つまり入力画像を一瞥した観察者の目に付きやすい領域を簡単に検出することができる。
In this way, the edge
なお、エッジ情報抽出処理では、エッジの抽出にガボアフィルタが用いられると説明したが、その他、Sobelフィルタや、Robertsフィルタなどのエッジ抽出フィルタが用いられるようにしてもよい。 In the edge information extraction process, it has been described that a Gabor filter is used for edge extraction. However, an edge extraction filter such as a Sobel filter or a Roberts filter may be used.
[顔情報抽出処理の説明]
次に、図20のフローチャートを参照して、図16のステップS134の処理に対応する顔情報抽出処理について説明する。
[Description of face information extraction processing]
Next, face information extraction processing corresponding to the processing in step S134 in FIG. 16 will be described with reference to the flowchart in FIG.
ステップS251において、顔検出部281は、判定部63から供給された入力画像から、人の顔の領域を検出し、その検出結果を顔情報マップ生成部282に供給する。例えば、顔検出部281は、入力画像に対してガボアフィルタを用いたフィルタ処理を施し、入力画像から人の目、口、鼻などの特徴的な領域を抽出することにより、入力画像における顔の領域を検出する。
In step S <b> 251, the
ステップS252において、顔情報マップ生成部282は、顔検出部281からの検出結果を用いて顔情報マップを生成し、被写体マップ生成部155に供給する。
In
例えば、入力画像からの顔の検出結果として、顔が含まれると推定される入力画像上の矩形の領域(以下、候補領域と称する)が複数検出されたとする。ここで、入力画像上の所定の位置近傍に複数の候補領域が検出され、それらの候補領域の一部が互いに重なることもあることとする。すなわち、例えば、入力画像上の1つの顔の領域に対して、その顔を含む複数の領域が候補領域として得られた場合には、それらの候補領域の一部が互いに重なることになる。 For example, it is assumed that a plurality of rectangular areas (hereinafter referred to as candidate areas) on the input image that are estimated to include a face are detected as face detection results from the input image. Here, a plurality of candidate areas are detected near a predetermined position on the input image, and some of these candidate areas may overlap each other. That is, for example, when a plurality of areas including the face are obtained as candidate areas for one face area on the input image, some of these candidate areas overlap each other.
顔情報マップ生成部282は、顔の検出により得られた候補領域に対して、候補領域ごとに、入力画像と同じ大きさの検出画像を生成する。この検出画像は、検出画像上における処理対象の候補領域と同じ領域内の画素の画素値が、候補領域とは異なる領域内の画素の画素値よりも大きい値とされる。
The face information
また、検出画像上の画素の画素値は、より人の顔が含まれる可能性が高いと推定された候補領域の画素と同じ位置の画素ほど、画素値が大きくなる。顔情報マップ生成部282は、このようにして得られた検出画像を足し合わせて、1つの画像を生成して正規化し、顔情報マップとする。したがって、顔情報マップ上において、入力画像上の複数の候補領域の一部が重なる領域と同じ位置の領域の画素の画素値は大きくなり、より顔が含まれる可能性が高いことになる。なお、正規化は、顔情報マップの画素の画素値が、例えば0乃至255の間の値となるようにされる。
In addition, the pixel value of the pixel on the detected image has a larger pixel value as the pixel is located at the same position as the pixel in the candidate area that is estimated to be more likely to include a human face. The face information
顔情報マップが生成されると、顔情報抽出処理は終了し、処理は図16のステップS135に進む。 When the face information map is generated, the face information extraction process ends, and the process proceeds to step S135 in FIG.
このようにして、顔情報抽出部154は、入力画像から顔を検出し、その検出結果から顔情報マップを生成する。このようにして得られた顔情報マップによれば、入力画像において、被写体としての人の顔の領域を簡単に検出することができる。
In this way, the face
以上において説明した輝度情報抽出処理乃至顔情報抽出処理により、各情報マップが得られ、これらの情報マップから被写体マップが生成される。 Each information map is obtained by the luminance information extraction processing or face information extraction processing described above, and a subject map is generated from these information maps.
〈第2の実施の形態〉
[画像処理装置の構成]
また、以上においては、入力画像の特性に応じて2つのトラッキング方法のうちの何れかを選択する例について説明したが、3以上のトラッキング方法から、入力画像に適した1つのトラッキング方法が選択されるようにしてもよい。
<Second Embodiment>
[Configuration of image processing apparatus]
In the above description, an example of selecting one of the two tracking methods according to the characteristics of the input image has been described. However, one tracking method suitable for the input image is selected from the three or more tracking methods. You may make it do.
そのような場合、例えば画像処理装置11は、図21に示すように構成される。
In such a case, for example, the
すなわち、画像処理装置11は、顔検出部311、被写体領域決定部312、平坦判定部51、トラッキング部52、トラッキング部53、保持部54、表示制御部23、および表示部24から構成される。なお、図21において、図2における場合と対応する部分には、同一の符号を付してあり、その説明は適宜省略する。
That is, the
図21の画像処理装置11では、顔検出部311および平坦判定部51が図1の切り替え部21に対応し、被写体領域決定部312、トラッキング部52、およびトラッキング部53のそれぞれが、図1のトラッキング部22に対応する。
In the
顔検出部311は、撮像装置から供給された入力画像から人の顔を検出し、検出の結果、入力画像から顔が検出された場合、被写体領域決定部312にその検出結果を供給し、被写体の検出を指示する。また、顔検出部311は、顔検出の結果、入力画像から顔が検出されなかった場合、平坦判定部51に入力画像が平坦であるかの判定を指示する。
The
被写体領域決定部312は、顔検出部311から供給された顔の検出結果と、保持部54に保持されている被写体領域情報とを用いて、入力画像から追尾対象の被写体を検出し、その検出結果を示す被写体領域情報を表示制御部23と保持部54に供給する。
The subject
[トラッキング処理の説明]
次に、図22のフローチャートを参照して、図21の画像処理装置11により行なわれるトラッキング処理について説明する。
[Description of tracking process]
Next, tracking processing performed by the
ステップS281において、顔検出部311は、供給された入力画像から、人の顔を検出する。例えば、顔検出部311は、入力画像に対してガボアフィルタを用いたフィルタ処理を施して、入力画像から人の目や口、鼻などの特徴的な部位を抽出することにより、入力画像における顔の領域を検出する。
In step S281, the
すなわち、顔検出部311では、入力画像の特性を特定するための特徴の特徴量として、入力画像の各領域における人の顔らしさを示す値が抽出される。なお、人の顔の検出は、入力画像から肌色の画素を検出することにより行なったり、テンプレートマッチングにより行なったりするようにしてもよい。
That is, the
ステップS282において、顔検出部311は、入力画像から人の顔が検出されたか否かを判定する。ステップS282において、顔が検出されたと判定された場合、顔検出部311は、顔の検出結果を被写体領域決定部312に供給し、被写体の検出を指示する。追尾対象の被写体の検出が指示されると、処理はステップS283に進む。
In step S282, the
なお、追尾対象の被写体が人の顔でないことが、予めユーザにより指定されている場合には、入力画像から顔が検出されても、ステップS282において顔が検出されなかったと判定される。 If the user has previously designated that the subject to be tracked is not a human face, it is determined in step S282 that no face has been detected even if a face is detected from the input image.
ステップS283において、被写体領域決定部312は、顔検出部311から供給された顔の検出結果と、保持部54に保持されている被写体領域情報とを用いて、被写体領域を決定し、被写体領域情報を生成する。
In step S283, the subject
すなわち、被写体領域決定部312は、入力画像上において、顔検出部311により検出された顔が含まれる矩形領域のうち、前フレームの被写体領域情報により示される被写体領域に最も近い位置にある矩形領域を、現フレームの被写体領域として選択する。そして、被写体領域決定部312は、選択した被写体領域の位置を示す被写体領域情報を生成し、表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。被写体領域情報が生成されると、その後、処理はステップS288に進む。
That is, the subject
また、ステップS282において、顔が検出されなかったと判定された場合、顔検出部311は、平坦判定部51に入力画像が平坦であるかの判定を指示し、処理はステップS284に進む。そして、その後、ステップS284乃至ステップS289の処理が行われてトラッキング処理は終了するが、これらの処理は図10のステップS11乃至ステップS16の処理と同様であるので、その説明は省略する。なお、ステップS289において、処理を終了しないと判定された場合、処理はステップS281に戻る。
If it is determined in step S282 that no face has been detected, the
このようにして、画像処理装置11は、入力画像から顔を検出し、顔が検出された場合には、その顔検出の結果を用いて、入力画像から追尾対象の被写体を検出する。また、画像処理装置11は、顔が検出されなかった場合には、入力画像が平坦であるか否かに応じて、ビジュアルアテンションまたは動き検出の何れかを利用して、入力画像から追尾対象の被写体を検出する。
In this way, the
このように、入力画像が人の顔を含む画像であるか、平坦であるかといった入力画像の特性を特定し、特定された特性を有する画像を得意とするトラッキング方法により、入力画像から被写体を検出するようにしたので、より簡単かつ迅速に、安定して被写体をトラッキングすることができる。 In this way, the characteristics of the input image, such as whether the input image is an image including a human face or is flat, are specified, and a subject is extracted from the input image by a tracking method that is good at an image having the specified characteristics. Since the detection is made, the subject can be tracked more easily, quickly and stably.
〈第3の実施の形態〉
[画像処理装置の構成]
以上においては、トラッキング方法として、ビジュアルアテンションや動き検出を利用する方法を例に説明したが、入力画像の各領域の色に関する情報や、輪郭に関する情報が利用されてトラッキングされるようにしてもよい。そのような場合、画像処理装置11は、例えば図23に示すように構成される。
<Third Embodiment>
[Configuration of image processing apparatus]
In the above, a method using visual attention or motion detection has been described as an example of the tracking method. However, information regarding the color of each region of the input image or information regarding the contour may be used for tracking. . In such a case, the
図23の画像処理装置11は、色判定部341、トラッキング部342、トラッキング部343、保持部54、表示制御部23、および表示部24から構成される。なお、図23において、図2における場合と対応する部分には、同一の符号を付してあり、その説明は適宜省略する。
23 includes a
色判定部341は、入力画像の特性を特定するための特徴の特徴量として、入力画像から画素の色成分を抽出し、入力画像の被写体領域である前景と、入力画像の被写体領域を除く領域である背景との色の分布が類似しているか否かを判定する。色判定部341は、前景ヒストグラム生成部351、背景ヒストグラム生成部352、および距離算出部353から構成される。
The
前景ヒストグラム生成部351は、保持部54から前フレームの入力画像と被写体領域情報を取得して、前フレームの入力画像の被写体領域(前景)の色の分布を示す前景ヒストグラムを生成する。前景ヒストグラムは、前景を構成する画素の色の範囲をビンとし、各ビンに属す(分類された)前景内の画素の数を頻度とするヒストグラムである。前景ヒストグラム生成部351は、生成した前景ヒストグラムを距離算出部353に供給する。
The foreground
背景ヒストグラム生成部352は、保持部54から前フレームの入力画像と被写体領域情報を取得して、前フレームの入力画像の背景の色の分布を示す背景ヒストグラムを生成する。背景ヒストグラムは、背景を構成する画素の色の範囲をビンとし、各ビンに属す(分類された)背景内の画素の数を頻度とするヒストグラムである。背景ヒストグラム生成部352は、生成した背景ヒストグラムを距離算出部353に供給する。
The background
距離算出部353は、前景ヒストグラム生成部351からの前景ヒストグラムと、背景ヒストグラム生成部352からの背景ヒストグラムとの距離、つまりそれらのヒストグラムの類似の度合いを算出する。また、距離算出部353は、算出した距離に応じて、トラッキング部342またはトラッキング部343の何れか一方に、入力画像からの被写体の検出を指示する。なお、距離算出部353は、トラッキング部343に被写体の検出を指示する場合、トラッキング部343に前景ヒストグラムを供給する。
The
トラッキング部342は、距離算出部353の指示に応じて、供給された現フレームの入力画像と、保持部54に保持されている前フレームの入力画像および被写体領域情報とを用いて、被写体の輪郭を利用して、入力画像から被写体を検出する。また、トラッキング部342は、被写体の検出結果を示す被写体領域情報を生成し、表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。
The
トラッキング部343は、距離算出部353の指示に応じて、供給された現フレームの入力画像と、距離算出部353からの前景ヒストグラムとを用い、入力画像の色の分布を利用して入力画像から被写体を検出し、被写体領域情報を生成する。また、トラッキング部343は、生成した被写体領域情報を表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。
The
[トラッキング部342の構成]
また、図23のトラッキング部342およびトラッキング部343は、より詳細には図24および図25に示すように構成される。
[Configuration of Tracking Unit 342]
Further, the
図24は、トラッキング部342の構成例を示す図である。トラッキング部342は、輪郭画像生成部381、輪郭画像生成部382、および被写体領域決定部383から構成される。
FIG. 24 is a diagram illustrating a configuration example of the
輪郭画像生成部381は、保持部54から前フレームの入力画像および被写体領域情報を取得して、前フレームの入力画像の被写体領域の輪郭を示す前景輪郭画像を生成し、被写体領域決定部383に供給する。輪郭画像生成部382は、撮像装置から供給された現フレームの入力画像を用いて、その入力画像上の被写体の輪郭を示す輪郭画像を生成し、被写体領域決定部383に供給する。
The contour
被写体領域決定部383は、輪郭画像生成部382から供給された、現フレームの輪郭画像上において、輪郭画像生成部381から供給された前フレームの前景輪郭画像と最も類似する領域を検索することで、現フレームの入力画像上の被写体領域を検出する。被写体領域決定部383は、検出された被写体領域の位置を示す被写体領域情報を、表示制御部23および保持部54に供給する。
The subject
[トラッキング部343の構成]
図25は、トラッキング部343のより詳細な構成例を示す図である。トラッキング部343は、ヒストグラム生成部411および被写体領域決定部412から構成される。
[Configuration of Tracking Unit 343]
FIG. 25 is a diagram illustrating a more detailed configuration example of the
ヒストグラム生成部411は、撮像装置から供給された現フレームの入力画像上の領域を比較対象領域とし、入力画像上の比較対象領域内の画素の色の分布を示すヒストグラムを生成する。このとき、ヒストグラム生成部411は、保持部54に保持されている被写体領域情報を参照し、比較対象領域を前フレームの被写体領域と同じ大きさの領域とするとともに、入力画像における比較対象領域の位置をずらしながら、入力画像上の各領域を比較対象領域とする。ヒストグラム生成部411は、生成した現フレームの入力画像の各比較対象領域のヒストグラムを被写体領域決定部412に供給する。
The
被写体領域決定部412は、距離算出部353から供給された、前フレームの前景ヒストグラムと、ヒストグラム生成部411から供給された、現フレームの比較対象領域のヒストグラムとを用いて、現フレームの入力画像の被写体領域を検出する。また、被写体領域決定部412は、検出された被写体領域の位置を示す被写体領域情報を、表示制御部23および保持部54に供給する。
The subject
[トラッキング処理の説明]
次に、図26のフローチャートを参照して、図23の画像処理装置11により行なわれるトラッキング処理について説明する。
[Description of tracking process]
Next, tracking processing performed by the
ステップS311において、前景ヒストグラム生成部351は、保持部54に保持されている前フレームの入力画像および被写体領域情報を用いて、前フレームの前景ヒストグラムを生成し、距離算出部353に供給する。
In step S <b> 311, the foreground
ステップS312において、背景ヒストグラム生成部352は、保持部54に保持されている前フレームの入力画像および被写体領域情報を用いて、前フレームの背景ヒストグラムを生成し、距離算出部353に供給する。
In step S <b> 312, the background
ステップS313において、距離算出部353は、前景ヒストグラム生成部351からの前景ヒストグラムと、背景ヒストグラム生成部352からの背景ヒストグラムとの距離を算出する。例えば、前景ヒストグラムと背景ヒストグラムとの距離は、EMD(Earth Mover's Distance)などとされる。
In step S313, the
ステップS314において、距離算出部353は、算出した前景ヒストグラムと背景ヒストグラムの距離が、予め定められた閾値thD以下であるか否かを判定する。
In step S314, the
ステップS314において、距離が閾値thD以下であると判定された場合、距離算出部353は、トラッキング部342に追尾対象の被写体の検出を指示し、処理はステップS315に進む。
If it is determined in step S314 that the distance is equal to or smaller than the threshold thD, the
前景ヒストグラムと背景ヒストグラムの距離が閾値thD以下となるのは、前フレームにおいて、入力画像上の前景(被写体領域)と背景の色の分布がある程度類似している場合である。入力画像の被写体の領域と背景の色の分布が似ていると、入力画像上の被写体部分の領域と背景部分の領域とを精度よく分離することが困難になるので、入力画像の色に関する情報を用いて追尾対象の被写体を検出すると、その検出精度が低下してしまう。 The distance between the foreground histogram and the background histogram is equal to or less than the threshold thD when the foreground (subject area) on the input image and the background color distribution are somewhat similar in the previous frame. If the subject area of the input image and the background color distribution are similar, it will be difficult to accurately separate the subject area and the background area on the input image. If the subject to be tracked is detected using, the detection accuracy decreases.
これに対して、入力画像上の各被写体の輪郭を利用して、入力画像から追尾対象の被写体を検出する場合には、入力画像の色に関する情報は用いられないので、前景と背景の色の分布が類似している場合であっても、高精度に被写体の検出が可能である。 On the other hand, when the subject to be tracked is detected from the input image using the contour of each subject on the input image, information on the color of the input image is not used. Even if the distribution is similar, the subject can be detected with high accuracy.
そこで、距離算出部353は、前景ヒストグラムと背景ヒストグラムの距離が閾値thD以下である場合、トラッキング部342に輪郭を利用したトラッキングを指示する。
Therefore, when the distance between the foreground histogram and the background histogram is equal to or less than the threshold thD, the
ステップS315において、輪郭画像生成部381は、保持部54に保持されている前フレームの入力画像および被写体領域情報を用いて、入力画像の被写体領域にフィルタ処理を施すことで、被写体領域内にある被写体の輪郭を抽出し、前景輪郭画像を生成する。
In step S315, the contour
この前景輪郭画像は、前フレームの被写体領域と同じ大きさの画像であり、被写体領域内にある被写体のエッジの部分と同じ位置にある画素の画素値が「1」となり、被写体のエッジではない部分と同じ位置にある画素の画素値が「0」となる画像である。 This foreground contour image is an image having the same size as the subject area of the previous frame, and the pixel value of the pixel at the same position as the edge portion of the subject in the subject area is “1”, not the subject edge. This is an image in which the pixel value of a pixel at the same position as the portion is “0”.
輪郭画像生成部381は、前フレームの前景輪郭画像を生成すると、生成した前景輪郭画像を被写体領域決定部383に供給する。
When the foreground contour image of the previous frame is generated, the contour
ステップS316において、輪郭画像生成部382は、供給された現フレームの入力画像にフィルタ処理を施すことで入力画像上にある被写体の輪郭を抽出し、輪郭画像を生成する。輪郭画像生成部382は、得られた輪郭画像を被写体領域決定部383に供給する。
In step S316, the contour
現フレームの輪郭画像は、前景輪郭画像と同様に、入力画像上の被写体のエッジの部分と同じ位置にある画素の画素値が「1」となり、被写体のエッジではない部分と同じ位置にある画素の画素値が「0」となる画像である。また、輪郭画像は入力画像と同じ大きさとされる。 As in the foreground contour image, the contour image of the current frame has a pixel value “1” at the same position as the edge portion of the subject on the input image, and the pixel at the same position as the portion that is not the edge of the subject. Is an image with a pixel value of “0”. The contour image is the same size as the input image.
ステップS317において、被写体領域決定部383は、輪郭画像生成部382から供給された現フレームの輪郭画像と、輪郭画像生成部381から供給された前フレームの前景輪郭画像とに基づいて、現フレームの入力画像上の被写体領域を特定する。
In step S317, the subject
具体的には、被写体領域決定部383は、現フレームの輪郭画像上における前景輪郭画像と同じ大きさの領域を処理対象の領域(以下、比較領域とも称する)とし、比較領域と前景輪郭画像との画素の画素値の差分絶対値和を求める。つまり、比較領域と前景輪郭画像の同じ位置の画素の画素値の差分の絶対値の総和が求められる。
Specifically, the subject
ここで、例えば比較領域と前景輪郭画像との同じ位置に、同じ被写体があれば、画素値の差分絶対値和は「0」となるはずである。また、比較領域と同じ位置の現フレームの入力画像の部分が、前フレームの入力画像の被写体領域により似た(近い)画像であるほど、比較領域と前景輪郭画像の差分絶対値和は小さくなるはずである。 Here, for example, if there is the same subject at the same position in the comparison area and the foreground contour image, the sum of absolute differences of pixel values should be “0”. In addition, the difference absolute value sum between the comparison region and the foreground contour image becomes smaller as the portion of the input image of the current frame at the same position as the comparison region is an image that is more similar (closer) to the subject region of the input image of the previous frame. It should be.
被写体領域決定部383は、現フレームの輪郭画像における比較領域とする領域の位置をずらしながら、輪郭画像の各位置を比較領域として、それらの比較領域と前景輪郭画像との差分絶対値和を求める。そして、被写体領域決定部383は、求めた差分絶対値和が最小となる比較領域と同じ位置にある現フレームの入力画像の領域を、被写体領域とする。
The subject
前景輪郭画像は、前フレームの被写体領域の輪郭を示す画像である。したがって、前景輪郭画像との差分絶対値和が最小となる領域、つまり前景輪郭画像と最も類似する現フレームの輪郭画像の領域と同じ位置にある現フレームの入力画像の領域には、追尾対象の被写体が含まれているはずである。そこで、被写体領域決定部383は、前景輪郭画像と最も類似する輪郭画像の領域と同じ位置にある、現フレームの入力画像上の領域を、現フレームの被写体領域とする。
The foreground contour image is an image showing the contour of the subject area of the previous frame. Therefore, in the region where the sum of absolute differences from the foreground contour image is the minimum, that is, the region of the input image of the current frame at the same position as the region of the contour image of the current frame most similar to the foreground contour image, The subject should be included. Therefore, the subject
ステップS318において、被写体領域決定部383は、特定した現フレームの被写体領域の位置を示す被写体領域情報を生成し、表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。そして、その後、処理はステップS322に進む。
In step S318, the subject
また、ステップS314において、前景ヒストグラムと背景ヒストグラムの距離が閾値thDより大きい、つまり閾値を超えると判定された場合、距離算出部353は、トラッキング部343に追尾対象の被写体の検出を指示し、処理はステップS319に進む。また、このとき、距離算出部353は、前フレームの前景ヒストグラムをトラッキング部343の被写体領域決定部412に供給する。
In step S314, if it is determined that the distance between the foreground histogram and the background histogram is greater than the threshold thD, that is, exceeds the threshold, the
前景ヒストグラムと背景ヒストグラムの距離が閾値thDよりも大きくなるのは、前フレームにおいて、入力画像上の前景(被写体領域)と背景の色の分布がある程度異なる場合である。そのような場合、色に関する情報を指標とすれば、入力画像の前景と背景の特徴が大きく異なることになるため、色に関する情報を用いて容易に前景と背景を分離することができる。 The distance between the foreground histogram and the background histogram is larger than the threshold thD when the foreground (subject area) and background color distribution on the input image are somewhat different in the previous frame. In such a case, if the information about the color is used as an index, the foreground and background characteristics of the input image are greatly different. Therefore, the foreground and the background can be easily separated using the information about the color.
一方、被写体の輪郭を利用して追尾対象の被写体を検出する場合には、前景と背景の色の分布が異なる場合であっても、入力画像全体でエッジが少なければ、精度よく追尾対象の被写体を検出できない可能性がある。 On the other hand, when the subject to be tracked is detected using the contour of the subject, even if the foreground and background color distributions are different, if the entire input image has few edges, the subject to be tracked can be accurately detected. May not be detected.
そこで、距離算出部353は、前景ヒストグラムと背景ヒストグラムの距離が閾値thDよりも大きい場合、トラッキング部343に色のヒストグラムを利用したトラッキングを指示する。
Therefore, when the distance between the foreground histogram and the background histogram is larger than the threshold thD, the
ステップS319において、ヒストグラム生成部411は保持部54に保持されている被写体領域情報を参照し、供給された現フレームの入力画像の比較対象領域とする位置をずらしながら、比較対象領域の色のヒストグラムを生成し、被写体領域決定部412に供給する。
In step S319, the
ステップS320において、被写体領域決定部412は、距離算出部353から供給された前フレームの前景ヒストグラムと、ヒストグラム生成部411から供給された現フレームの比較対象領域のヒストグラムとを用いて、入力画像の被写体領域を特定する。
In step S320, the subject
具体的には、被写体領域決定部412は、各比較対象領域について、比較対象領域のヒストグラムと、前景ヒストグラムとの距離を求める。この距離は、例えば、EMDなどのヒストグラム同士の類似の度合いを示す距離とされる。そして、被写体領域決定部412は、現フレームの入力画像の比較対象領域のうち、最も前景ヒストグラムとの距離が小さい比較対象領域を、現フレームの被写体領域として選択する。
Specifically, the subject
前景ヒストグラムは、前フレームの入力画像の被写体領域の色のヒストグラムである。したがって、入力画像において、最も前景ヒストグラムと類似するヒストグラムが得られる領域(比較対象領域)は、色の分布を指標とした場合に、前フレームの被写体領域と最も類似する領域であり、追尾対象の被写体が含まれている可能性が高い。 The foreground histogram is a color histogram of the subject area of the input image of the previous frame. Therefore, in the input image, the region (comparison target region) from which the histogram most similar to the foreground histogram is obtained is the region most similar to the subject region in the previous frame when the color distribution is used as an index, and is the tracking target. There is a high possibility that the subject is included.
そこで、被写体領域決定部412は、現フレームの入力画像上において、前景ヒストグラムとの距離が最も小さい比較対象領域を、現フレームの被写体領域とする。
Therefore, the subject
ステップS321において、被写体領域決定部412は、特定した現フレームの被写体領域の位置を示す被写体領域情報を生成し、表示制御部23に供給するとともに、被写体領域情報を保持部54に供給し、保持させる。そして、その後、処理はステップS322に進む。
In step S321, the subject
ステップS318またはステップS321において、被写体領域情報が生成されると、その後、ステップS322およびステップS323の処理が行われてトラッキング処理は終了する。すなわち、表示制御部23は、現フレームの入力画像を表示部24に表示させるとともに、被写体領域情報に基づいて、入力画像上に被写体枠を表示させる。なお、これらの処理は図10のステップS15およびステップS16の処理と同様であるので、その詳細な説明は省略する。
When the subject area information is generated in step S318 or step S321, the processing in step S322 and step S323 is performed thereafter, and the tracking process ends. That is, the
なお、ステップS323において、処理を終了しないと判定された場合、処理はステップS311に戻り、次のフレームの被写体領域が検出される。 If it is determined in step S323 that the process is not to be terminated, the process returns to step S311 to detect the subject area of the next frame.
このようにして、画像処理装置11は、フレームごとに、入力画像の前景と背景の色の分布が類似しているか否かを判定し、その判定結果に応じて、被写体の輪郭または色の分布の何れかを利用した方法により入力画像から被写体を検出し、被写体枠を表示させる。
In this manner, the
このように、前景と背景の色の分布が類似している画像であるかといった、入力画像の特性を特定し、特定された特性を有する画像を得意とするトラッキング方法により、追尾対象の被写体を検出するようにしたので、より簡単かつ迅速に、安定して被写体をトラッキングすることができる。 In this way, the characteristics of the input image, such as whether the color distribution of the foreground and the background is similar, are specified, and the tracking target subject is identified by a tracking method that is good at images having the specified characteristics. Since the detection is made, the subject can be tracked more easily, quickly and stably.
なお、入力画像から追尾対象の被写体を検出する方法は、ビジュアルアテンションを利用した方法等、以上において説明した方法に限らず、例えば前フレームの被写体領域と、現フレームの入力画像とのブロックマッチングなど、どのような方法であってもよい。また、入力画像の特性として、入力画像全体の明るさ等から昼または夜など、どのようなシーンで撮像された画像であるかなどが特定されるようにしてもよい。 Note that the method of detecting the tracking target subject from the input image is not limited to the method described above, such as a method using visual attention. For example, block matching between the subject region of the previous frame and the input image of the current frame, etc. Any method may be used. Further, as a characteristic of the input image, it may be specified in what scene the image is captured such as day or night from the brightness of the entire input image.
上述した一連の処理は、ハードウェアにより実行することもできるし、ソフトウェアにより実行することもできる。一連の処理をソフトウェアにより実行する場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム記録媒体からインストールされる。 The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.
図27は、上述した一連の処理をプログラムにより実行するコンピュータのハードウェアの構成例を示すブロック図である。 FIG. 27 is a block diagram illustrating a configuration example of hardware of a computer that executes the above-described series of processing by a program.
コンピュータにおいて、CPU(Central Processing Unit)601,ROM(Read Only Memory)602,RAM(Random Access Memory)603は、バス604により相互に接続されている。
In a computer, a CPU (Central Processing Unit) 601, a ROM (Read Only Memory) 602, and a RAM (Random Access Memory) 603 are connected to each other by a
バス604には、さらに、入出力インターフェース605が接続されている。入出力インターフェース605には、キーボード、マウス、マイクロホンなどよりなる入力部606、ディスプレイ、スピーカなどよりなる出力部607、ハードディスクや不揮発性のメモリなどよりなる記録部608、ネットワークインターフェースなどよりなる通信部609、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア611を駆動するドライブ610が接続されている。
An input /
以上のように構成されるコンピュータでは、CPU601が、例えば、記録部608に記録されているプログラムを、入出力インターフェース605及びバス604を介して、RAM603にロードして実行することにより、上述した一連の処理が行われる。
In the computer configured as described above, the
コンピュータ(CPU601)が実行するプログラムは、例えば、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)等)、光磁気ディスク、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア611に記録して、あるいは、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の伝送媒体を介して提供される。
The program executed by the computer (CPU 601) is, for example, a magnetic disk (including a flexible disk), an optical disk (CD-ROM (Compact Disc-Read Only Memory), DVD (Digital Versatile Disc), etc.), a magneto-optical disk, or a semiconductor. It is recorded on a
そして、プログラムは、リムーバブルメディア611をドライブ610に装着することにより、入出力インターフェース605を介して、記録部608にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部609で受信し、記録部608にインストールすることができる。その他、プログラムは、ROM602や記録部608に、あらかじめインストールしておくことができる。
The program can be installed in the
なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。 The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.
なお、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。 The embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.
11 画像処理装置, 21 切り替え部, 22−1乃至22−N,22 トラッキング部, 51 平坦判定部, 52 トラッキング部, 53 トラッキング部, 91 ブロック動き検出部, 92 被写体動き検出部, 93 被写体領域決定部, 121 被写体抽出部, 122 被写体候補領域決定部, 123 被写体領域決定部, 311 顔検出部, 312 被写体領域決定部, 341 色判定部, 342 トラッキング部, 343 トラッキング部
DESCRIPTION OF
Claims (8)
処理対象の現フレームの前記入力画像と、前記現フレームよりも時間的に前の前フレームにおける追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像から、前記追尾対象の被写体を検出するトラッキング手段と、
前記入力画像から予め定められた第1の特徴の特徴量を抽出して、前記特徴量に基づいて前記入力画像の特性を特定するとともに、前記入力画像の特性に応じて、互いに異なる方法により前記入力画像から前記追尾対象の被写体を検出する複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる切り替え手段と
を備える画像処理装置。 An image processing apparatus for detecting a subject from the input image for each of a plurality of continuous input images,
Based on the input image of the current frame to be processed and the detection result of the tracking target subject in the previous frame temporally prior to the current frame, the tracking target subject is obtained from the input image of the current frame. Tracking means for detecting
A feature amount of a first feature determined in advance from the input image is extracted, and a characteristic of the input image is specified based on the feature amount. An image processing apparatus comprising: a switching unit configured to detect the tracking target subject in any of the plurality of tracking units that detect the tracking target subject from an input image.
前記特徴量として前記入力画像の各領域における画素の画素値の分散値を抽出して、前記分散値から前記入力画像の平坦さの度合いを示す平坦度を算出する平坦度算出手段と、
前記平坦度から前記入力画像が、空間方向の画素値の変化の少ない平坦な画像であるか否かを判定し、その判定結果に応じて複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる判定手段と
を備える
請求項1に記載の画像処理装置。 The switching means is
Flatness calculation means for extracting a variance value of pixel values of pixels in each region of the input image as the feature amount, and calculating a flatness indicating a degree of flatness of the input image from the variance value;
It is determined from the flatness whether the input image is a flat image with little change in pixel values in the spatial direction, and the tracking is performed in any of the plurality of tracking units according to the determination result. The image processing apparatus according to claim 1, further comprising: a determination unit that detects a target subject.
前記入力画像が平坦な画像でない場合、前記前フレームの前記入力画像上の前記追尾対象の被写体が含まれる被写体領域と、前記現フレームの前記入力画像とを用いた動き検出を行なって、前記被写体領域の動きを求めることにより、前記現フレームの前記入力画像上の前記追尾対象の被写体の領域を検出する第1のトラッキング手段と、
前記入力画像が平坦な画像である場合、前記現フレームの前記入力画像から、複数の第2の特徴の特徴量を抽出し、前記第2の特徴の特徴量から前記入力画像の各領域における被写体らしさを示す被写体マップを生成するとともに、前記被写体マップにより特定される前記入力画像における被写体らしい領域のうち、前記前フレームの前記被写体領域と同じ位置の領域が含まれる領域を、前記現フレームの前記入力画像上の前記追尾対象の被写体の領域として検出する第2のトラッキング手段と
を備える
請求項2に記載の画像処理装置。 The tracking means includes
If the input image is not a flat image, motion detection is performed using a subject area including the subject to be tracked on the input image of the previous frame and the input image of the current frame, and the subject First tracking means for detecting a region of the subject to be tracked on the input image of the current frame by obtaining a movement of the region;
When the input image is a flat image, feature quantities of a plurality of second features are extracted from the input image of the current frame, and subjects in each region of the input image are extracted from the feature quantities of the second feature. Generating a subject map indicating the likelihood, and among regions that are likely to be a subject in the input image specified by the subject map, a region including a region at the same position as the subject region of the previous frame is included in the current frame. The image processing apparatus according to claim 2, further comprising: a second tracking unit that detects the tracking target subject area on the input image.
前記トラッキング手段は、前記現フレームの前記入力画像からの前記人の顔の検出結果に基づいて、前記現フレームの前記入力画像から検出された前記人の顔の領域のうち、前記前フレームの前記被写体領域と最も近い領域を前記現フレームの前記入力画像上の前記追尾対象の被写体の領域として検出する第3のトラッキング手段をさらに備え、
前記顔検出手段は、前記入力画像から前記人の顔が検出された場合、前記第3のトラッキング手段に前記追尾対象の被写体を検出させ、
前記平坦度算出手段は、前記入力画像から前記人の顔が検出されなかった場合、前記平坦度を算出する
請求項3に記載の画像処理装置。 The switching means further comprises face detection means for detecting a human face from the input image of the current frame,
The tracking means is based on a detection result of the person's face from the input image of the current frame, of the area of the person's face detected from the input image of the current frame, and A third tracking unit for detecting a region closest to the subject region as a region of the subject to be tracked on the input image of the current frame;
The face detection means, when the human face is detected from the input image, causes the third tracking means to detect the subject to be tracked,
The image processing apparatus according to claim 3, wherein the flatness calculation unit calculates the flatness when the human face is not detected from the input image.
前記特徴量として前記入力画像の画素の色成分を抽出し、前記前フレームの前記入力画像上の前記追尾対象の被写体が含まれる被写体領域における画素の色の分布を示す前景ヒストグラムを生成する前景ヒストグラム生成手段と、
前記特徴量として前記入力画像の画素の色成分を抽出し、前記前フレームの前記入力画像における前記被写体領域を除く領域の画素の色の分布を示す背景ヒストグラムを生成する背景ヒストグラム生成手段と、
前記前景ヒストグラムと前記背景ヒストグラムとの類似の度合いを示す距離に応じて、複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる判定手段と
を備える
請求項1に記載の画像処理装置。 The switching means is
A foreground histogram that extracts a color component of a pixel of the input image as the feature amount and generates a foreground histogram indicating a distribution of pixel colors in a subject region including the subject to be tracked on the input image of the previous frame. Generating means;
Background histogram generation means for extracting a color component of a pixel of the input image as the feature amount, and generating a background histogram indicating a color distribution of pixels in a region excluding the subject region in the input image of the previous frame;
The determination unit according to claim 1, further comprising: a determination unit configured to detect the tracking target subject in any of the plurality of tracking units according to a distance indicating a degree of similarity between the foreground histogram and the background histogram. Image processing device.
前記距離が所定の閾値以下である場合、前記現フレームの前記入力画像の各領域の被写体の輪郭を示す輪郭画像において、前記前フレームの前記被写体領域の被写体の輪郭を示す前景輪郭画像と最も類似の度合いの高い領域を検索することにより、前記現フレームの前記入力画像上の前記追尾対象の被写体を検出する第4のトラッキング手段と、
前記距離が前記閾値より大きい場合、前記現フレームの前記入力画像において、前記前景ヒストグラムと最も類似の度合いの高い、色の分布を示すヒストグラムが得られる領域を検索することにより、前記現フレームの前記入力画像上の前記追尾対象の被写体を検出する第5のトラッキング手段と
を備える
請求項5に記載の画像処理装置。 The tracking means includes
When the distance is less than or equal to a predetermined threshold, the contour image showing the contour of the subject in each area of the input image of the current frame is most similar to the foreground contour image showing the contour of the subject in the subject area of the previous frame. A fourth tracking means for detecting the tracking target object on the input image of the current frame by searching a region having a high degree of
When the distance is greater than the threshold, the input image of the current frame is searched for an area from which a histogram showing a color distribution having the highest degree of similarity with the foreground histogram is obtained, and The image processing apparatus according to claim 5, further comprising: a fifth tracking unit that detects the tracking target subject on the input image.
処理対象の現フレームの前記入力画像と、前記現フレームよりも時間的に前の前フレームにおける追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像から、前記追尾対象の被写体を検出するトラッキング手段と、
前記入力画像から予め定められた特徴の特徴量を抽出して、前記特徴量に基づいて前記入力画像の特性を特定するとともに、前記入力画像の特性に応じて、互いに異なる方法により前記入力画像から前記追尾対象の被写体を検出する複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させる切り替え手段と
を備える画像処理装置の画像処理方法であって、
前記切り替え手段が、前記入力画像の特性に応じて、複数の前記トラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させ、
前記トラッキング手段が、前記現フレームの前記入力画像と、前記前フレームの前記追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像上の前記追尾対象の被写体を検出する
ステップを含む画像処理方法。 An image processing apparatus that detects a subject from the input image for each of a plurality of continuous input images,
Based on the input image of the current frame to be processed and the detection result of the tracking target subject in the previous frame temporally prior to the current frame, the tracking target subject is obtained from the input image of the current frame. Tracking means for detecting
A feature amount of a predetermined feature is extracted from the input image, the characteristic of the input image is specified based on the feature amount, and the input image is extracted from the input image by different methods according to the characteristic of the input image. An image processing method for an image processing apparatus, comprising: a switching unit that detects the tracking target subject in any of the plurality of tracking units that detect the tracking target subject,
The switching unit causes the tracking target to be detected by any one of the plurality of tracking units according to the characteristics of the input image,
The tracking unit detects the tracking target object on the input image of the current frame based on the input image of the current frame and the detection result of the tracking target object of the previous frame. Including image processing method.
前記入力画像から予め定められた特徴の特徴量を抽出して、前記特徴量に基づいて前記入力画像の特性を特定するとともに、前記入力画像の特性に応じて、互いに異なる方法により前記入力画像から追尾対象の被写体を検出する複数のトラッキング手段のうちの何れかに、前記追尾対象の被写体を検出させ、
前記トラッキング手段が、処理対象の現フレームの前記入力画像と、前記現フレームよりも時間的に前の前フレームにおける前記追尾対象の被写体の検出結果とに基づいて、前記現フレームの前記入力画像から、前記追尾対象の被写体を検出する
ステップを含む処理をコンピュータに実行させるプログラム。 An image processing program for detecting a subject from the input image for each of a plurality of consecutive frames of input images,
A feature amount of a predetermined feature is extracted from the input image, the characteristic of the input image is specified based on the feature amount, and the input image is extracted from the input image by different methods according to the characteristic of the input image. Let any one of a plurality of tracking means for detecting a tracking target subject detect the tracking target subject;
Based on the input image of the current frame to be processed and the detection result of the subject to be tracked in the previous frame temporally prior to the current frame, the tracking means A program for causing a computer to execute processing including a step of detecting the subject to be tracked.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010012258A JP2011150594A (en) | 2010-01-22 | 2010-01-22 | Image processor and image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010012258A JP2011150594A (en) | 2010-01-22 | 2010-01-22 | Image processor and image processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011150594A true JP2011150594A (en) | 2011-08-04 |
Family
ID=44537497
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010012258A Withdrawn JP2011150594A (en) | 2010-01-22 | 2010-01-22 | Image processor and image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011150594A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015142281A (en) * | 2014-01-29 | 2015-08-03 | キヤノン株式会社 | Subject searching device, control method and control program of the same, and imaging device |
CN104871525A (en) * | 2012-12-26 | 2015-08-26 | 索尼公司 | Image processing device, and image processing method and program |
KR20170131257A (en) * | 2016-05-19 | 2017-11-29 | 라온피플 주식회사 | Image analysis method and apparatus for machine vision |
KR102120007B1 (en) * | 2019-05-27 | 2020-06-05 | 한국항공대학교산학협력단 | Object tracking device and method of tracking object |
-
2010
- 2010-01-22 JP JP2010012258A patent/JP2011150594A/en not_active Withdrawn
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104871525A (en) * | 2012-12-26 | 2015-08-26 | 索尼公司 | Image processing device, and image processing method and program |
EP2940985A4 (en) * | 2012-12-26 | 2016-08-17 | Sony Corp | Image processing device, and image processing method and program |
JP2015142281A (en) * | 2014-01-29 | 2015-08-03 | キヤノン株式会社 | Subject searching device, control method and control program of the same, and imaging device |
KR20170131257A (en) * | 2016-05-19 | 2017-11-29 | 라온피플 주식회사 | Image analysis method and apparatus for machine vision |
KR102447915B1 (en) * | 2016-05-19 | 2022-09-27 | 라온피플 주식회사 | Image analysis method and apparatus for machine vision |
KR102120007B1 (en) * | 2019-05-27 | 2020-06-05 | 한국항공대학교산학협력단 | Object tracking device and method of tracking object |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2010024265A1 (en) | Image processing device and method, and learning device, method, and program | |
KR101468351B1 (en) | Object tracking device, object tracking method, and control program | |
JP6371553B2 (en) | Video display device and video display system | |
US8923612B2 (en) | Image processing apparatus and method, and program | |
JP2009246919A (en) | Image processing apparatus, image processing method, and image processing program | |
CN102831382A (en) | Face tracking apparatus and method | |
JP2009059060A (en) | Moving body image extraction unit and program | |
CN110264493A (en) | A kind of multiple target object tracking method and device under motion state | |
KR20110090787A (en) | Image processing device and method, and program therefor | |
JP6610535B2 (en) | Image processing apparatus and image processing method | |
JP2002216129A (en) | Face area detector, its method and computer readable recording medium | |
Boujut et al. | Fusion of multiple visual cues for visual saliency extraction from wearable camera settings with strong motion | |
CN101398896B (en) | Device and method for extracting color characteristic with strong discernment for image forming apparatus | |
JP2011193125A (en) | Image processing apparatus, image processing method, program, and imaging apparatus | |
Janardhana Rao et al. | Hybridized cuckoo search with multi-verse optimization-based patch matching and deep learning concept for enhancing video inpainting | |
JP2011150594A (en) | Image processor and image processing method, and program | |
JP2011146827A (en) | Unit and method for processing image, and program | |
JP2011146826A (en) | Unit and method for processing image, and program | |
Shi et al. | A method for detecting pedestrian height and distance based on monocular vision technology | |
Li et al. | Optimal seamline detection in dynamic scenes via graph cuts for image mosaicking | |
JP2016219879A (en) | Image processing apparatus, image processing method and program | |
JP6544970B2 (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
JP4750758B2 (en) | Attention area extraction method, attention area extraction device, computer program, and recording medium | |
Veeravasarapu et al. | Fast and fully automated video colorization | |
JP2011018199A (en) | Apparatus, method and program for processing image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20130402 |