JP2002312787A - Image processor, image processing method, recording medium and program - Google Patents

Image processor, image processing method, recording medium and program

Info

Publication number
JP2002312787A
JP2002312787A JP2001115638A JP2001115638A JP2002312787A JP 2002312787 A JP2002312787 A JP 2002312787A JP 2001115638 A JP2001115638 A JP 2001115638A JP 2001115638 A JP2001115638 A JP 2001115638A JP 2002312787 A JP2002312787 A JP 2002312787A
Authority
JP
Japan
Prior art keywords
probability
image
subject
area
pixel
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.)
Granted
Application number
JP2001115638A
Other languages
Japanese (ja)
Other versions
JP4622141B2 (en
JP2002312787A5 (en
Inventor
Masami Ogata
昌美 緒形
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2001115638A priority Critical patent/JP4622141B2/en
Publication of JP2002312787A publication Critical patent/JP2002312787A/en
Publication of JP2002312787A5 publication Critical patent/JP2002312787A5/ja
Application granted granted Critical
Publication of JP4622141B2 publication Critical patent/JP4622141B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To correct an area division result by using the pixels of a neighborhood area to be processed. SOLUTION: A memory 271 preserves a pixel value B' (i, j) of a binary picture indicating a corrected area division result outputted from a subject probability calculating part 203 for a whole picture. A neighborhood area corresponding to coordinates to be corrected can be constituted of pixels within a prescribed distance (within a circle having a prescribed radius) from the coordinates (i, j) to be corrected, or pixels in a square-shaped area decided by a preliminarily set constant m, or pixels in an area set by another method. A background correcting part 272 selects only pixels judged as a subject by a background difference calculating part 202 or the subject probability calculating part 203 in the neighborhood area of the pixels of the coordinates (i, j), and corrects the area division result by using a value calculated by weighting and then averaging the selected pixel value with corresponding subject probability.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理装置およ
び画像処理方法、記録媒体、並びにプログラムに関し、
特に、背景領域と被写体領域とからなる画像から被写体
領域のみを抽出する場合に用いて好適な、画像処理装置
および画像処理方法、記録媒体、並びにプログラムに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus, an image processing method, a recording medium, and a program.
In particular, the present invention relates to an image processing apparatus, an image processing method, a recording medium, and a program that are suitable for extracting only a subject area from an image including a background area and a subject area.

【0002】[0002]

【従来の技術】例えば、背景と被写体からなる画像デー
タから被写体を抽出する場合など、画像の領域を分割す
る領域分割法として、従来、主に3つの方法が提案され
ている。
2. Description of the Related Art For example, three methods have been conventionally proposed as a region dividing method for dividing an image region, for example, when a subject is extracted from image data composed of a background and a subject.

【0003】第1の方法は、画像データの画素値のみを
利用するものであり、代表的なものとして、例えば、画
素値の類似度を定義して、領域統合を繰り返す方法や、
特徴空間におけるクラスタリングなどがある。
The first method uses only the pixel values of image data. As a typical method, for example, a method of defining similarity of pixel values and repeating area integration,
There is clustering in the feature space.

【0004】第2の方法は、画素値と他の付加情報を併
用することによって、被写体領域を背景領域から分離し
て抽出するものであり、例えば、抽出すべき被写体領域
の大まかな境界線を予め与え、その境界線近傍のみを画
像処理することにより、正確に被写体領域を抽出するよ
うな方法である。この方法を動画像に適用する場合に
は、第1フレームにおいて抽出した領域に対して、動き
検出やフレーム間差分、あるいは、Snakes(動的輪郭モ
デル)を用いることにより領域の変化を追跡したり、第
1フレームと最終フレームにおいて、被写体領域を予め
抽出しておき、その間の画像に対しては、これら2つの
フレームにおいて抽出された被写体領域を基に補間を行
う方法などが提案されている。
A second method is to separate and extract a subject area from a background area by using a pixel value and other additional information together. For example, a rough boundary line of the subject area to be extracted is determined. This is a method in which a subject region is accurately extracted by applying image processing only in the vicinity of the boundary line in advance. When this method is applied to a moving image, the region extracted in the first frame is tracked for changes in the region by using motion detection, inter-frame differences, or Snakes (active contour model). A method has been proposed in which a subject region is extracted in advance in a first frame and a final frame, and interpolation is performed on an image between the subject frames based on the subject region extracted in these two frames.

【0005】第2の方法において、抽出すべき被写体領
域の大まかな境界線の入力などの手動操作の介入を避け
る方法としては、例えば、被写体を含まない背景のみの
画像を予め撮像しておき、被写体を含む画像を、背景の
みの画像と比較して、その差分を演算することにより被
写体を抽出する背景差分法がある。
In the second method, as a method of avoiding the intervention of manual operation such as input of a rough boundary line of a subject region to be extracted, for example, an image of only a background not including a subject is taken in advance. There is a background difference method in which an image including a subject is compared with an image of only the background, and the difference is calculated to extract the subject.

【0006】また、撮像時に被写体以外の背景領域を一
定の色のスクリーンで覆い、この色情報を用いて対象物
を抽出するクロマキーという手法は、例えば、映像制作
などに現在最も頻繁に用いられている手法である。
A technique called chroma key, which covers a background area other than a subject with a screen of a fixed color at the time of imaging, and extracts an object using this color information, is currently most frequently used in, for example, video production. It is a technique that is.

【0007】第3の方法は、特殊な撮像装置を用いて距
離情報などを算出し、それに基づいて被写体を抽出する
方法であり、例えば、視点の異なる複数のカメラによっ
て得られた画像間の視差情報を用いる方法が多く提案さ
れている。また、複数のカメラを用いずに、一台のカメ
ラの撮像面位置を変化させ、そのときに画像上に生じる
ぼけの変化を利用して距離を算出する方法も提案されて
いる。
The third method is a method of calculating distance information and the like using a special imaging device and extracting a subject based on the information. For example, a parallax between images obtained by a plurality of cameras having different viewpoints is used. Many methods using information have been proposed. Also, a method has been proposed in which the position of the imaging surface of one camera is changed without using a plurality of cameras, and the distance is calculated by using a change in blur occurring on an image at that time.

【0008】[0008]

【発明が解決しようとする課題】被写体を背景から切り
取り抽出するために、以上説明したような、様々な方法
が用いられている。
As described above, various methods have been used to cut out and extract a subject from the background.

【0009】しかしながら、第1の方法は、物理的に一
様な局所領域(例えば、ある一定の色情報を有する領域
や、境界線など)を抽出するための手段としては優れて
いるが、意味のある被写体を1つの領域として抽出する
ためには、充分な方法ではない。
[0009] However, the first method is excellent as a means for extracting a physically uniform local region (for example, a region having certain color information, a boundary line, and the like). This is not a sufficient method for extracting a subject having a certain area as one area.

【0010】また、第3の方法として説明した視差情報
を用いる方法では、複数のカメラが必要となる(もしく
は、ひとつのカメラで複数の画像を撮像する必要がある
ため、撮像に時間がかかる)上に、画像間の対応を演算
するための演算量が非常に多い。また、ぼけ情報を用い
る場合、撮像装置における実現可能な被写界深度が問題
となる。近年の撮像装置、特に民生用途の撮像装置は、
小型化される傾向にある。そのため、被写界深度が深く
なる場合が多く、撮像面位置の変化によるぼけの差が検
出し難い場合が殆どである。
In the method using parallax information described as the third method, a plurality of cameras are required (or it takes a long time to capture a plurality of images with one camera). In addition, the amount of calculation for calculating the correspondence between images is very large. When blur information is used, the depth of field achievable in the imaging apparatus becomes a problem. Recent imaging devices, especially imaging devices for consumer use,
It tends to be downsized. For this reason, the depth of field is often deep, and in most cases, it is difficult to detect a difference in blur due to a change in the position of the imaging surface.

【0011】第2の方法において、手動操作に依存する
方法を取る場合、柔軟なインターフェースが求められる
ため、アプリケーションとして実現するのが非常に困難
である。また、時間的に領域を追跡している方法を採用
する場合、動き検出などのエラーが蓄積されていく可能
性が大きく、長時間のシーケンスを処理するのには向か
ない。更に、動き検出やSnakesは、演算量が多いため、
リアルタイムに画像を処理するアプリケーションに導入
するのは非常に困難である。
In the second method, when a method relying on a manual operation is employed, a flexible interface is required, so that it is very difficult to realize it as an application. Further, when a method of temporally tracking an area is employed, errors such as motion detection are likely to accumulate, which is not suitable for processing a long sequence. Furthermore, since motion detection and Snakes require a large amount of computation,
It is very difficult to introduce into applications that process images in real time.

【0012】これらに対して、背景差分法は、演算が比
較的簡単であるとともに、背景領域が変化しない限り、
差分値が大きい画素は、非常に高い確率で被写体領域と
して抽出されることが期待できる上に、時間的なエラー
の蓄積の恐れもない。
On the other hand, the background subtraction method is relatively simple in operation, and as long as the background area does not change.
A pixel having a large difference value can be expected to be extracted as a subject region with a very high probability, and there is no possibility of accumulation of a temporal error.

【0013】しかしながら、背景差分法においても、差
分値が小さい場合(例えば、被写体が背景に近い色の部
分を有する場合など)は、必ずしも正しい領域分割がで
きていると保証することはできず、このような場合は、
被写体領域が背景領域として誤判定されやすい。差分値
を統計的に処理することにより、被写体の抽出精度を向
上させるような試みもなされているが、従来の方法で
は、必ずしも満足できる領域分割が実現できているとは
いえない。
However, even in the background subtraction method, when the difference value is small (for example, when the subject has a color portion close to the background), it cannot always be guaranteed that correct area division has been performed. In such a case,
The subject area is likely to be erroneously determined as a background area. Attempts have been made to improve the extraction accuracy of the subject by statistically processing the difference values, but it cannot be said that the conventional method has always achieved satisfactory region division.

【0014】本発明はこのような状況に鑑みてなされた
ものであり、背景差分法の簡便さを利用しつつ、簡単な
装置を用いて、簡単な演算によって、正確に被写体領域
を抽出することができるようにするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of such circumstances, and it is possible to accurately extract a subject area by a simple operation using a simple device while utilizing the simplicity of the background subtraction method. Is to be able to do.

【0015】[0015]

【課題を解決するための手段】本発明の画像処理装置
は、撮像された画像データの入力を受ける入力手段と、
入力手段により入力された背景領域のみからなる背景画
像と、入力手段により入力された背景領域および被写体
領域からなる対象画像との差分を算出する画像差分算出
手段と、画像差分算出手段により算出された背景画像と
対象画像との差分を基に、対象画像から、被写体領域の
候補領域を分割する分割手段と、対象画像の各画素が、
被写体領域に含まれている第1の確率を算出する確率算
出手段と、確率算出手段により算出された第1の確率を
基に、分割手段により分割された被写体領域の候補領域
を補正する第1の補正手段と、確率算出手段により算出
された第1の確率、および所定の画素の近傍領域内の画
素の相関から、所定の画素が被写体に含まれる画素であ
るか否かを判断することにより、第1の補正手段により
補正された被写体領域の候補領域を更に補正する第2の
補正手段とを備えることを特徴とする。
According to the present invention, there is provided an image processing apparatus comprising: input means for receiving input of captured image data;
Calculated by an image difference calculating means for calculating a difference between a background image consisting of only the background area input by the input means and a target image consisting of the background area and the subject area input by the input means, and the image difference calculating means. Based on a difference between the background image and the target image, a dividing unit that divides the candidate region of the subject region from the target image, and each pixel of the target image is
Probability calculating means for calculating a first probability included in the subject area, and a first correcting means for correcting the candidate area of the subject area divided by the dividing means based on the first probability calculated by the probability calculating means. By determining from the correction means, the first probability calculated by the probability calculation means, and the correlation between the pixels in the vicinity of the predetermined pixel whether or not the predetermined pixel is a pixel included in the subject, And a second correcting means for further correcting the candidate area of the subject area corrected by the first correcting means.

【0016】確率算出手段には、ベイズ推定を用いて第
1の確率を算出させるようにすることができる。
The probability calculating means may calculate the first probability using Bayes estimation.

【0017】確率算出手段には、座標毎に設定された重
み付け係数に基づいて、第1の確率を算出させるように
することができる。
[0017] The probability calculating means may calculate the first probability based on a weighting coefficient set for each coordinate.

【0018】確率算出手段には、分割手段による分割結
果を基に、被写体領域の候補領域と背景領域の候補領域
の分布にたいして平滑化処理を行うことにより、第1の
確率を算出させるようにすることができる。
The probability calculating means calculates the first probability by performing a smoothing process on the distribution of the candidate area of the subject area and the candidate area of the background area based on the result of the division by the dividing means. be able to.

【0019】平滑化処理は、非線形平滑化処理であるも
のとすることができる。
[0019] The smoothing process may be a non-linear smoothing process.

【0020】第2の補正手段には、第1の補正手段によ
り補正された結果、被写体領域の候補領域ではないと判
定された領域についてのみ、所定の画素の近傍領域内の
画素の相関を基に補正を行わせるようにすることができ
る。
[0020] The second correction means uses the correlation between the pixels in the vicinity of the predetermined pixel only in the area determined as not being the candidate area of the subject area as a result of the correction by the first correction means. Can be corrected.

【0021】第2の補正手段には、確率算出手段により
算出された第1の確率、および所定の画素の近傍領域内
の画素の相関を基に、所定の画素に対して、背景領域で
ある確率を示す第2の確率と被写体領域である確率を示
す第3の確率を算出させるようにすることができ、第2
の確率が第3の確率より小さい場合、所定の画素を被写
体領域に含まれる画素であると判断させるようにするこ
とができる。
The second correction means sets a background area to a predetermined pixel based on the first probability calculated by the probability calculation means and a correlation of pixels in the vicinity of the predetermined pixel. The second probability indicating the probability and the third probability indicating the probability of being the subject area can be calculated.
Is smaller than the third probability, a predetermined pixel can be determined to be a pixel included in the subject area.

【0022】第2の確率は、対象画像の対応する座標の
画素値と背景画像の対応する座標の画素値との差が小さ
いほど大きな値を取るものとすることができる。
The second probability can take a larger value as the difference between the pixel value of the corresponding coordinate of the target image and the pixel value of the corresponding coordinate of the background image is smaller.

【0023】第3の確率は、近傍領域内において、所定
の画素以外で第1の確率が高い画素の画素値を、第1の
確率で重み付け平均した値を利用して算出されるものと
することができる。
The third probability is calculated by using a value obtained by weighting and averaging the pixel values of pixels having a high first probability other than the predetermined pixel in the neighboring area. be able to.

【0024】入力手段により入力された画像データが色
情報を含む場合、画像差分算出手段には、背景画像と対
象画像との差分を色情報の成分毎に算出させるようにす
ることができる。
When the image data input by the input means includes color information, the image difference calculating means may calculate the difference between the background image and the target image for each component of the color information.

【0025】入力手段により入力された画像データが色
情報を含む場合、第2の補正手段には、第2の確率およ
び第3の確率を、色情報の成分毎に算出させるようにす
ることができる。
When the image data input by the input means includes color information, the second correction means may calculate the second probability and the third probability for each component of the color information. it can.

【0026】本発明の画像処理方法は、撮像された画像
データの入力を制御する入力制御ステップと、入力制御
ステップの処理により入力が制御された背景領域のみか
らなる背景画像と、入力制御ステップの処理により入力
が制御された背景領域および被写体領域からなる対象画
像との差分を算出する画像差分算出ステップと、画像差
分算出ステップの処理により算出された背景画像と対象
画像との差分を基に、対象画像から、被写体領域の候補
領域を分割する分割ステップと、対象画像の各画素が、
被写体領域に含まれている確率を算出する確率算出ステ
ップと、確率算出ステップの処理により算出された確率
を基に、分割ステップの処理により分割された被写体領
域の候補領域を補正する第1の補正ステップと、確率算
出ステップの処理により算出された確率、および所定の
画素の近傍領域内の画素の相関から、所定の画素が被写
体に含まれる画素であるか否かを判断することにより、
第1の補正ステップの処理により補正された被写体領域
の候補領域を更に補正する第2の補正ステップとを含む
ことを特徴とする。
According to the image processing method of the present invention, there is provided an input control step of controlling input of captured image data, a background image consisting only of a background area whose input is controlled by the processing of the input control step, and an input control step. Based on the difference between the background image and the target image calculated by the processing of the image difference calculation step, and an image difference calculation step of calculating a difference between the target image including the background area and the subject area whose input is controlled by the processing. A dividing step of dividing a candidate region of a subject region from the target image, and each pixel of the target image
A first calculating step of correcting the candidate area of the subject area divided by the processing of the dividing step based on the probability calculation step of calculating the probability of being included in the subject area, and the probability calculated by the processing of the probability calculating step; Step and the probability calculated by the process of the probability calculation step, and from the correlation of the pixels in the vicinity of the predetermined pixel, by determining whether the predetermined pixel is a pixel included in the subject,
And a second correction step of further correcting the candidate area of the subject area corrected by the processing of the first correction step.

【0027】本発明の記録媒体に記録されているプログ
ラムは、撮像された画像データの入力を制御する入力制
御ステップと、入力制御ステップの処理により入力が制
御された背景領域のみからなる背景画像と、入力制御ス
テップの処理により入力が制御された背景領域および被
写体領域からなる対象画像との差分を算出する画像差分
算出ステップと、画像差分算出ステップの処理により算
出された背景画像と対象画像との差分を基に、対象画像
から、被写体領域の候補領域を分割する分割ステップ
と、対象画像の各画素が、被写体領域に含まれている確
率を算出する確率算出ステップと、確率算出ステップの
処理により算出された確率を基に、分割ステップの処理
により分割された被写体領域の候補領域を補正する第1
の補正ステップと、確率算出ステップの処理により算出
された確率、および所定の画素の近傍領域内の画素の相
関から、所定の画素が被写体に含まれる画素であるか否
かを判断することにより、第1の補正ステップの処理に
より補正された被写体領域の候補領域を更に補正する第
2の補正ステップとを含むことを特徴とする。
The program recorded on the recording medium of the present invention includes an input control step for controlling the input of captured image data, and a background image consisting only of a background area whose input is controlled by the processing of the input control step. An image difference calculating step of calculating a difference between the background image and the subject image whose input is controlled by the processing of the input control step, and a processing of the background image and the target image calculated by the processing of the image difference calculating step. Based on the difference, from the target image, a dividing step of dividing a candidate region of a subject region, a probability calculating step of calculating a probability that each pixel of the target image is included in the subject region, and a process of a probability calculating step A first method of correcting a candidate area of a subject area divided by the processing of the dividing step based on the calculated probability
Correction step, the probability calculated by the process of the probability calculation step, and from the correlation of the pixels in the vicinity of the predetermined pixel, by determining whether the predetermined pixel is a pixel included in the subject, And a second correction step of further correcting the candidate area of the subject area corrected by the processing of the first correction step.

【0028】本発明のプログラムは、撮像された画像デ
ータの入力を制御する入力制御ステップと、入力制御ス
テップの処理により入力が制御された背景領域のみから
なる背景画像と、入力制御ステップの処理により入力が
制御された背景領域および被写体領域からなる対象画像
との差分を算出する画像差分算出ステップと、画像差分
算出ステップの処理により算出された背景画像と対象画
像との差分を基に、対象画像から、被写体領域の候補領
域を分割する分割ステップと、対象画像の各画素が、被
写体領域に含まれている確率を算出する確率算出ステッ
プと、確率算出ステップの処理により算出された確率を
基に、分割ステップの処理により分割された被写体領域
の候補領域を補正する第1の補正ステップと、確率算出
ステップの処理により算出された確率、および所定の画
素の近傍領域内の画素の相関から、所定の画素が被写体
に含まれる画素であるか否かを判断することにより、第
1の補正ステップの処理により補正された被写体領域の
候補領域を更に補正する第2の補正ステップとを含む処
理をコンピュータに実行させることを特徴とする。
The program according to the present invention comprises an input control step for controlling the input of captured image data, a background image consisting only of a background area whose input has been controlled by the processing of the input control step, and a processing of the input control step. An image difference calculating step of calculating a difference between the target image including the background area and the subject area whose input is controlled, and a target image based on a difference between the background image and the target image calculated by the processing of the image difference calculating step. From the dividing step of dividing the candidate area of the subject area, the probability calculating step of calculating the probability that each pixel of the target image is included in the subject area, and the probability calculated by the processing of the probability calculating step. The first correction step of correcting the candidate area of the subject area divided by the processing of the division step and the processing of the probability calculation step By determining whether the predetermined pixel is a pixel included in the subject based on the calculated probability and the correlation of the pixels in the vicinity of the predetermined pixel, the correction is performed by the processing in the first correction step. And a second correction step for further correcting the candidate area of the subject area.

【0029】本発明の画像処理装置および画像処理方
法、並びにプログラムにおいては、撮像された画像デー
タが入力され、入力された背景領域のみからなる背景画
像と、背景領域および被写体領域からなる対象画像との
差分が算出され、算出された背景画像と対象画像との差
分を基に、対象画像から、被写体領域の候補領域が分割
され、対象画像の各画素が、被写体領域に含まれている
確率が算出され、算出された確率を基に、分割された被
写体領域の候補領域が補正され、算出された確率、およ
び所定の画素の近傍領域内の画素の相関から、所定の画
素が被写体に含まれる画素であるか否かを判断すること
により、補正された被写体領域の候補領域が更に補正さ
れる。
In the image processing apparatus, the image processing method, and the program according to the present invention, captured image data is input, and a background image consisting only of the input background area, and a target image consisting of the background area and the subject area, Is calculated, and based on the calculated difference between the background image and the target image, the candidate region of the subject region is divided from the target image, and the probability that each pixel of the target image is included in the subject region is calculated. Based on the calculated and calculated probabilities, the candidate regions of the divided subject regions are corrected, and the predetermined pixels are included in the subject based on the calculated probabilities and the correlation of the pixels in the vicinity of the predetermined pixels. By determining whether or not the pixel is a pixel, the corrected candidate region of the subject region is further corrected.

【0030】[0030]

【発明の実施の形態】以下、図を参照して、本発明の実
施の形態について説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0031】まず、本発明の第1の実施の形態について
説明する。図1は、本発明を適応した画像処理装置1の
構成を示すブロック図である。
First, a first embodiment of the present invention will be described. FIG. 1 is a block diagram showing a configuration of an image processing apparatus 1 to which the present invention is applied.

【0032】画像処理装置1は、動作モードとして、背
景情報抽出モードと被写体抽出モードとの、2つのモー
ドを有しており、ユーザは、図示しない操作部を操作す
ることによって、背景情報抽出モードと被写体抽出モー
ドを切り替えることができる。背景情報抽出モードで
は、背景のみからなる画像の入力を受けて背景領域に関
する情報を抽出する処理が実行される。一方、被写体抽
出モードでは、背景情報抽出モードにおいて抽出された
背景情報を基に、被写体と背景から構成された画像から
被写体領域のみを抽出する処理が実行される。
The image processing apparatus 1 has two operation modes, a background information extraction mode and a subject extraction mode. The user operates an operation unit (not shown) to operate the background information extraction mode. And the subject extraction mode. In the background information extraction mode, a process of extracting information related to a background region in response to an input of an image including only a background is executed. On the other hand, in the subject extraction mode, a process of extracting only a subject region from an image composed of a subject and a background is executed based on the background information extracted in the background information extraction mode.

【0033】撮像部11は、例えばCCD(Charge Couple
d Devices)カメラなどから構成されている。撮像部1
1は、制御部13の制御に従って画像を撮像し、画素値
I(i,j)からなる画像データを被写体領域検出部1
2に出力する。ここで、画素値I(i,j)は、撮像さ
れた画像データの二次元座標(i,j)上の画素値を表
す。
The imaging unit 11 is, for example, a CCD (Charge Couple).
d Devices) It consists of a camera. Imaging unit 1
1 captures an image under the control of the control unit 13 and converts the image data including the pixel values I (i, j) into the subject area detection unit 1
Output to 2. Here, the pixel value I (i, j) represents a pixel value on the two-dimensional coordinates (i, j) of the captured image data.

【0034】被写体領域検出部12は、スイッチ21、
背景情報抽出部22、メモリ23、被写体候補検出部2
4、および被写体判定部25で構成され、制御部13の
処理に従って、撮像部11から入力された画像データを
処理し、被写体領域を検出する処理を実行する。
The subject area detector 12 includes a switch 21
Background information extraction unit 22, memory 23, subject candidate detection unit 2
4 and a subject determination unit 25, according to the processing of the control unit 13, processes the image data input from the imaging unit 11 and executes a process of detecting a subject area.

【0035】スイッチ21は、制御部13から入力され
る信号を基に、背景情報抽出モードの場合、背景のみで
構成される背景画像の画像データを背景情報抽出部22
に供給し、被写体抽出モードの場合、被写体を含む画像
データを被写体候補検出部24および被写体判定部25
に供給する。
In the background information extraction mode, the switch 21 converts the image data of the background image composed of only the background into the background information extraction unit 22 based on the signal input from the control unit 13.
And in the case of the subject extraction mode, the image data including the subject is subjected to subject candidate detection section 24 and subject determination section 25.
To supply.

【0036】制御部13は、画像処理装置1の動作を制
御するものであり、例えば、図示しない操作部から入力
された信号を基に背景情報抽出モードか被写体抽出モー
ドかを判断し、撮像部11で撮像された画像データを被
写体領域検出部12の適する部分に供給するようにスイ
ッチ21を切り替えさせる。また、制御部13にはドラ
イブ14も接続されている。ドライブ14には、必要に
応じて磁気ディスク31、光ディスク32、光磁気ディ
スク33、および半導体メモリ34が装着され、データ
の授受を行うようになされている。
The control unit 13 controls the operation of the image processing apparatus 1. For example, based on a signal input from an operation unit (not shown), the control unit 13 determines whether the mode is the background information extraction mode or the subject extraction mode, and The switch 21 is switched so that the image data captured at 11 is supplied to a suitable portion of the subject area detection unit 12. Further, a drive 14 is also connected to the control unit 13. A magnetic disk 31, an optical disk 32, a magneto-optical disk 33, and a semiconductor memory 34 are mounted on the drive 14 as necessary, so that data is transferred.

【0037】背景情報抽出部22の更に詳細な構成を示
すブロック図を図2に示す。
FIG. 2 is a block diagram showing a more detailed configuration of the background information extracting unit 22.

【0038】背景抽出モードにおいて、スイッチ21を
介して入力された背景画像データは、最大値画像生成部
41、最小値画像生成部42、および平均値画像生成部
43に供給される。最大値画像生成部41は、入力され
た複数の画像の座標(i,j)毎の画素の最大値を、式
(1)により算出し、それぞれの座標における最大の画
素値Max(i,j)からなる最大値画像を背景情報と
して生成し、メモリ23に出力して保存させる。
In the background extraction mode, the background image data input via the switch 21 is supplied to the maximum value image generation unit 41, the minimum value image generation unit 42, and the average value image generation unit 43. The maximum value image generation unit 41 calculates the maximum value of the pixel for each coordinate (i, j) of the plurality of input images using Expression (1), and calculates the maximum pixel value Max (i, j) at each coordinate. ) Is generated as background information and output to the memory 23 for storage.

【数1】 ・・・(1)(Equation 1) ... (1)

【0039】ここで、Ik(i,j)は、k番目の画像
の、座標(i,j)における画素値を示す。また、MA
X(・)は、括弧内に示される複数の数値の最大値を算
出する演算を示す。
Here, Ik (i, j) indicates the pixel value at the coordinates (i, j) of the k-th image. Also, MA
X (•) indicates an operation for calculating the maximum value of a plurality of numerical values shown in parentheses.

【0040】最小値画像生成部42は、入力された複数
の画像の座標(i,j)毎の画素の最小値を、式(2)
により算出し、それぞれの座標における最小の画素値M
in(i,j)からなる最小値画像を背景情報として生
成し、メモリ23に出力して保存させる。平均値画像生
成部43は、入力された複数の画像の座標(i,j)毎
の画素の平均値を、式(3)により算出し、それぞれの
座標における平均の画素値Ave(i,j)からなる平
均値画像を背景情報として生成し、メモリ23に出力し
て保存させる。
The minimum value image generation unit 42 calculates the minimum value of the pixel for each coordinate (i, j) of the plurality of input images by the following equation (2).
And the minimum pixel value M at each coordinate
A minimum value image composed of in (i, j) is generated as background information, output to the memory 23 and stored. The average value image generation unit 43 calculates the average value of the pixels at each coordinate (i, j) of the plurality of input images using Expression (3), and calculates the average pixel value Ave (i, j) at each coordinate. ) Is generated as background information and output to the memory 23 for storage.

【数2】 ・・・(2)(Equation 2) ... (2)

【数3】 ・・・(3)(Equation 3) ... (3)

【0041】ここで、MIN(・)は、括弧内に示され
る複数の数値の最小値を算出する演算を示す。また、N
は、背景情報抽出部22に供給された画像の枚数を示
す。
Here, MIN (•) indicates an operation for calculating the minimum value of a plurality of numerical values shown in parentheses. Also, N
Indicates the number of images supplied to the background information extraction unit 22.

【0042】メモリ23は、背景情報抽出部22が抽出
した背景情報の入力を受け、背景情報を保存するととも
に、保存している背景情報を、被写体候補検出部24お
よび被写体判定部25に供給する。
The memory 23 receives the input of the background information extracted by the background information extracting unit 22, stores the background information, and supplies the stored background information to the subject candidate detecting unit 24 and the subject determining unit 25. .

【0043】被写体候補検出部24の更に詳細な構成を
示すブロック図を図3に示す。
FIG. 3 is a block diagram showing a more detailed configuration of the subject candidate detecting section 24. As shown in FIG.

【0044】被写体候補検出部24の2値化処理部52
は、スイッチ21を介して入力画像データの画素値I
(i,j)の供給を受ける。閾値算出部51は、メモリ
23に記録されている背景情報から必要な情報(ここで
は、最大値画像の画素値Max(i,j)および最小値
画像の画素値Min(i,j))を読み込み、背景領域
か被写体かを判断するための、画素値の上限の閾値Tm
axおよび画素値の下限の閾値Tminを算出する。
The binarization processing section 52 of the subject candidate detection section 24
Is the pixel value I of the input image data via the switch 21.
(I, j) is supplied. The threshold calculator 51 calculates necessary information (here, the pixel value Max (i, j) of the maximum value image and the pixel value Min (i, j) of the minimum value image) from the background information recorded in the memory 23. Upper threshold value Tm of the pixel value for reading and determining whether it is a background area or a subject
ax and the lower limit threshold value Tmin of the pixel value are calculated.

【0045】背景領域か被写体かを判断するための、画
素値の上限の閾値Tmaxおよび画素値の下限の閾値T
minの算出方法は、いかなる方法であってもかまわな
いが、この例においては、式(4)および式(5)を用
いて画素値の上限の閾値Tmaxおよび画素値の下限の
閾値Tminを算出し、算出結果を2値化処理部52に
出力する。
The upper threshold value Tmax of the pixel value and the lower threshold value T of the pixel value for determining whether it is a background area or a subject.
The method of calculating min may be any method, but in this example, the upper limit threshold value Tmax of the pixel value and the lower limit threshold value Tmin of the pixel value are calculated using Expressions (4) and (5). Then, the calculation result is output to the binarization processing unit 52.

【数4】 ・・・(4)(Equation 4) ... (4)

【数5】 ・・・(5)(Equation 5) ... (5)

【0046】式(4)の係数aおよび式(5)の係数b
は、それぞれ予め設定された係数であり、例えば、照明
光の変動などによる画素値のゆらぎを吸収するために、
通常、a>1.0、b<1.0で、実験などにより、も
しくは、経験的に求められる。
The coefficient a in equation (4) and the coefficient b in equation (5)
Are preset coefficients, for example, in order to absorb fluctuations in pixel values due to fluctuations in illumination light, etc.
Usually, when a> 1.0 and b <1.0, it is determined experimentally or empirically.

【0047】2値化処理部52は、閾値算出部51によ
り算出された閾値の入力を受け、図示しない内部のメモ
リに保存する。2値化処理部52は、スイッチ21を介
して画素値I(i,j)の入力を受け、内部のメモリに
保存している閾値を用いて、次の式(6)に基づいて、
2値化された画素値B(i,j)からなる2値画像を生
成し、被写体判定部25に出力する。
The binarization processing section 52 receives the threshold value calculated by the threshold value calculation section 51 and stores it in an internal memory (not shown). The binarization processing unit 52 receives the input of the pixel value I (i, j) via the switch 21 and uses the threshold value stored in the internal memory based on the following equation (6).
A binary image including the binarized pixel values B (i, j) is generated and output to the subject determination unit 25.

【数6】 ・・・(6)(Equation 6) ... (6)

【0048】すなわち、2値化処理部52は、入力され
た画素値I(i,j)のうち、閾値の範囲内の画素値に
対応する画素には背景候補であることを示す値として
0、閾値の範囲外の画素値に対応する画素は被写体候補
であることを示す値として1を設定した2値画像の画素
値B(i,j)を生成する。
That is, the binarization processing unit 52 sets the pixel corresponding to the pixel value within the threshold value range of the input pixel value I (i, j) to 0 as a value indicating that it is a background candidate. And a pixel value B (i, j) of a binary image in which 1 is set as a value indicating that a pixel value outside the threshold value range is a subject candidate.

【0049】図3においては、閾値算出部51におい
て、式(4)および式(5)を用いて最大値画像の画素
値Max(i,j)および最小値画像の画素値Min
(i,j)に所定の係数を積算することにより、例え
ば、照明光の変動などによる画素値のゆらぎを吸収する
ようになされているが、閾値算出部51を省略し、最大
値画像の画素値Max(i,j)および最小値画像の画
素値Min(i,j)を直接2値化処理部52に入力す
ることにより、ゆらぎは吸収することができないが、そ
の代わりに演算量を削減するようにしても良い。
In FIG. 3, the threshold value calculating section 51 calculates the pixel value Max (i, j) of the maximum value image and the pixel value Min of the minimum value image by using the equations (4) and (5).
By integrating a predetermined coefficient into (i, j), for example, the fluctuation of the pixel value due to the fluctuation of the illumination light is absorbed. However, the threshold value calculation unit 51 is omitted, and the pixel of the maximum value image is omitted. By directly inputting the value Max (i, j) and the pixel value Min (i, j) of the minimum value image to the binarization processing unit 52, the fluctuation cannot be absorbed, but the amount of calculation is reduced instead. You may do it.

【0050】被写体判定部25には、被写体抽出モード
において、スイッチ21から画素値I(i,j)が入力
され、被写体候補検出部24から2値画像の画素値B
(i,j)が入力されるとともに、メモリ23から最大
値画像の画素値Max(i,j)、最小値画像の画素値
Min(i,j)、および平均値画像の画素値Ave
(i,j)が読み込まれる。被写体判定部25の更に詳
細な構成を示すブロック図を図4に示す。
In the subject extraction mode, the pixel value I (i, j) is input from the switch 21 to the subject determination unit 25, and the pixel value B of the binary image is supplied from the subject candidate detection unit 24.
(I, j) is input, and the pixel value Max (i, j) of the maximum value image, the pixel value Min (i, j) of the minimum value image, and the pixel value Ave of the average value image are input from the memory 23.
(I, j) is read. FIG. 4 is a block diagram showing a more detailed configuration of the subject determining unit 25.

【0051】背景条件確率検出部61は、メモリ23か
ら背景情報(ここでは、最大値画像の画素値Max
(i,j)、最小値画像の画素値Min(i,j)、お
よび平均値画像の画素値Ave(i,j))を読み込
み、式(7)を用いて、ガウス分布により、背景である
という条件の基で画素値I(i,j)が出現する確率P
(I(i,j)|bg)を算出し、ベイズ推定演算部6
6に出力する。
The background condition probability detecting section 61 reads the background information (here, the pixel value Max of the maximum value image) from the memory 23.
(I, j), the pixel value Min (i, j) of the minimum value image, and the pixel value Ave (i, j) of the average value image are read, and the Gaussian distribution is applied to the background using Expression (7). Probability P that pixel value I (i, j) appears under the condition that there is
(I (i, j) | bg) and calculates the Bayesian estimation
6 is output.

【数7】 ・・・(7)(Equation 7) ... (7)

【0052】ここで、確率P(A|B)とは、事象Bで
あるという条件の基で、事象Aが発生する確率のことで
ある。
Here, the probability P (A | B) is the probability that the event A will occur under the condition that the event is the event B.

【0053】式(7)の係数sは、ガウス分布の標準偏
差であり、この例においては、最大値画像の画素値Ma
x(i,j)、最小値画像の画素値Min(i,j)、
および平均値画像の画素値Ave(i,j)を用いて、
次の式(8)によって算出される。
The coefficient s in the equation (7) is the standard deviation of the Gaussian distribution, and in this example, the pixel value Ma of the maximum value image
x (i, j), the pixel value Min (i, j) of the minimum value image,
And the pixel value Ave (i, j) of the average image,
It is calculated by the following equation (8).

【数8】 ・・・(8)(Equation 8) ... (8)

【0054】すなわち、式(7)は、背景情報抽出モー
ドにおいて、背景として出現した画素値に近い画素値で
あるほど、背景領域である確率が高いことを示してい
る。
That is, equation (7) indicates that, in the background information extraction mode, the closer the pixel value is to the pixel value that appeared as the background, the higher the probability of being a background area.

【0055】ヒストグラム生成部62は、入力画像デー
タの画素値I(i,j)および2値画像の画素値B
(i,j)の入力を受け、2値画像の画素値B(i,
j)が1である座標(すなわち、被写体候補検出部24
において被写体候補とみなされた画素の座標)に対応す
る画素値I(i,j)に対応するヒストグラムH(I
(i,j))を生成し、被写体条件確率検出部63に出
力する。
The histogram generation section 62 calculates the pixel value I (i, j) of the input image data and the pixel value B of the binary image.
(I, j), the pixel value B (i, j) of the binary image is received.
j) is 1 (that is, the subject candidate detection unit 24
, The histogram H (I) corresponding to the pixel value I (i, j) corresponding to the coordinates of the pixel considered as the subject candidate
(I, j)) is generated and output to the subject condition probability detection unit 63.

【0056】被写体条件確率検出部63は、入力画像デ
ータの画素値I(i,j)、およびヒストグラムH(I
(i,j))の入力を受け、被写体であるという条件の
基で画素値I(i,j)が出現する確率P(I(i,
j)|obj)を式(9)によって算出する。 P(I(i,j)|obj)=H(I(i,j))/obj_count・・・(9)
The subject condition probability detection unit 63 calculates the pixel value I (i, j) of the input image data and the histogram H (I
(I, j)), and the probability P (I (i, j) that the pixel value I (i, j) appears under the condition that the subject is a subject.
j) | obj) is calculated by equation (9). P (I (i, j) | obj) = H (I (i, j)) / obj_count (9)

【0057】ここで、obj_countは、被写体候補の画素
の総数(すなわち、2値画像の画素値B(i,j)のう
ち、画素値が1である画素の総数)である。
Here, obj_count is the total number of pixels of the subject candidate (that is, the total number of pixels having a pixel value of 1 in the pixel values B (i, j) of the binary image).

【0058】被写体候補検出部24において、背景差分
法により得られた被写体候補(すなわち、被写体候補と
背景候補で異なる値を持つ画素値B(i,j)からなる
2値画像)が得られる。この被写体候補は、背景情報抽
出モードにおいて抽出された画素値の情報との差が小さ
い画素は必ずしも背景領域に属するとはいえないが、そ
の差が大きい画素に関してはかなり高い確率で被写体領
域に属するといえるという性質を利用して抽出される。
式(9)における確率P(I(i,j)|obj)の定
義は、この性質に基づいたものであり、被写体候補検出
部24において検出された被写体候補に対応する画素の
うち出現頻度が高い画素値(すなわち、ヒストグラムで
高い数値を得ている画素値)ほど、被写体領域に出現す
る確率が高いことを示している。
The subject candidate detector 24 obtains a subject candidate obtained by the background subtraction method (ie, a binary image composed of pixel values B (i, j) having different values for the subject candidate and the background candidate). In this subject candidate, a pixel having a small difference from the pixel value information extracted in the background information extraction mode does not necessarily belong to the background region, but a pixel having a large difference belongs to the subject region with a considerably high probability. It is extracted using the property that it can be said.
The definition of the probability P (I (i, j) | obj) in equation (9) is based on this property, and the appearance frequency of the pixels corresponding to the subject candidate detected by the subject candidate detection unit 24 is A higher pixel value (that is, a pixel value having a higher numerical value in the histogram) indicates a higher probability of appearing in the subject area.

【0059】多値マスク生成部64は、入力された2値
画像の画素値B(i,j)に対して、例えば、式(1
0)で示されるような平滑化処理を施し、平滑化された
画素値M(i,j)からなる帯域の狭い多値画像を生成
し、被写体/背景確率検出部65に出力する。 M(i,j)=LPF(B(i,j)×C)・・・(10)
The multi-value mask generating section 64 calculates, for example, the equation (1) for the pixel value B (i, j) of the input binary image.
0) is performed to generate a multi-valued image having a narrow band composed of the smoothed pixel values M (i, j), and output it to the subject / background probability detection unit 65. M (i, j) = LPF (B (i, j) × C) (10)

【0060】ここで、式(10)において、画素値B
(i,j)に乗算されている係数Cは、予め設定された
定数であり、後述する被写体/背景確率検出部65が実
行する計算における、確率の値の精度を定めるものであ
る。また、LPFとしては、例えば、平均値フィルタな
どを用いることができる。
Here, in equation (10), the pixel value B
The coefficient C multiplied by (i, j) is a preset constant and determines the accuracy of the probability value in the calculation performed by the subject / background probability detection unit 65 described later. As the LPF, for example, an average filter can be used.

【0061】被写体/背景確率検出部65は、多値マス
ク生成部64から入力された多値画像の画素値M(i,
j)を基に、次の式(11)で示される被写体である確
率P(obj)および式(12)で示される背景である
確率P(bg)を算出し、ベイズ推定演算部66に出力
する。 P(obj)=M(i,j)/C・・・(11) P(bg)=1.0−P(obj)・・・(12)
The subject / background probability detection unit 65 calculates the pixel value M (i, i,
j), a probability P (obj) of a subject represented by the following equation (11) and a probability P (bg) of a background represented by the following equation (12) are calculated and output to the Bayes estimation calculation unit 66. I do. P (obj) = M (i, j) / C (11) P (bg) = 1.0-P (obj) (12)

【0062】ここで、式(11)の係数Cは、式(1
0)の係数Cと同一の値である。多値マスク生成部64
で生成された多値画像の画素値M(i,j)は、被写体
候補検出部24において被写体候補とされた画素(画素
値1に設定された画素)に空間的に近いほど大きな画素
値(1に近い画素値)となる。すなわち、式(11)お
よび式(12)は、背景差分法によって抽出された被写
体候補の空間的な分布によって被写体である確率、およ
び背景である確率を定義するものであり、被写体候補の
画素に近いほど被写体である確率が高いといえる。
Here, the coefficient C in the equation (11) is calculated by the equation (1)
0) is the same value as the coefficient C. Multi-value mask generator 64
The pixel value M (i, j) of the multi-valued image generated in step (1) is larger as the pixel value (the pixel set to pixel value 1) spatially closer to the subject candidate in the subject candidate detection unit 24 (pixel set to pixel value 1). (Pixel value close to 1). That is, Expressions (11) and (12) define the probability of being a subject and the probability of being a background based on the spatial distribution of subject candidates extracted by the background difference method. The closer it is, the higher the probability of being a subject.

【0063】ベイズ推定演算部66は、入力された情報
を基に、ベイズの定理に従って、画素値I(i,j)が
被写体領域に属する確率P(obj|I(i,j))を
演算する。
The Bayesian estimation calculating unit 66 calculates the probability P (obj | I (i, j)) that the pixel value I (i, j) belongs to the subject area according to Bayes' theorem based on the input information. I do.

【0064】2つの事象AおよびBがあるとき、事象A
であるという条件の基で、事象Bが発生する確率は、次
の式(13)で表わされる。これをベイズの定理とい
う。
When there are two events A and B, the event A
The probability that the event B will occur under the condition of is represented by the following equation (13). This is called Bayes' theorem.

【数9】 ・・・(13)(Equation 9) ... (13)

【0065】すなわち、ベイズ推定演算部66は、背景
条件確率検出部61から入力された、背景であるという
条件の基で画素値I(i,j)が出現する確率P(I
(i,j)|bg)、被写体条件確率検出部63から入
力された被写体であるという条件の基で画素値I(i,
j)が出現する確率P(I(i,j)|obj)、並び
に、被写体/背景確率検出部65から入力された被写体
である確率P(obj)および背景である確率P(b
g)を用いて、次の式(14)により、画素値I(i,
j)が被写体領域に属する確率P(obj|I(i,
j))を演算する。
That is, the Bayesian estimation calculation unit 66 calculates the probability P (I, j) that the pixel value I (i, j) appears under the condition of being the background, which is input from the background condition probability detection unit 61.
(I, j) | bg), the pixel value I (i, i, j) based on the condition that the subject is input from the subject condition probability detection unit 63.
j) appears, and the probability P (obj) of the subject and the probability P (b) of the background input from the subject / background probability detection unit 65
g) and the pixel value I (i, i,
j) belongs to the subject area P (obj | I (i,
j)) is calculated.

【数10】 ・・・(14)(Equation 10) ... (14)

【0066】そして、ベイズ推定演算部66は、式(1
4)によって求められた画素値I(i,j)が被写体領
域に属する確率P(obj|I(i,j))が、予め設
定された閾値Tより大きい場合には、対応する画素
(i,j)は被写体領域であると判定し、閾値Tより小
さい場合には、背景領域と判定し、次の式(15)に従
って、2値化された画素値O´(i,j)からなる2値
画像を生成し、論理和演算部67に出力する。
The Bayesian estimator 66 calculates the equation (1)
If the probability P (obj | I (i, j)) that the pixel value I (i, j) obtained by 4) belongs to the subject area is larger than a predetermined threshold T, the corresponding pixel (i , J) is determined to be a subject area, and if smaller than the threshold T, it is determined to be a background area, and is made up of binarized pixel values O ′ (i, j) according to the following equation (15). A binary image is generated and output to the logical sum operation unit 67.

【数11】 ・・・(15)[Equation 11] ... (15)

【0067】論理和演算部67は、被写体候補検出部2
4において背景の候補とされた画素についてのみベイズ
推定による補正を反映させるため、被写体候補検出部2
4から入力された2値画像の画素値B(i,j)と、ベ
イズ推定演算部66から入力された2値画像の画素値O
´(i,j)の座標毎の論理和を演算し、その結果得ら
れた画素値O(i,j)からなる2値画像を出力する。
The logical sum operation unit 67 includes the subject candidate detection unit 2
In order to reflect the correction based on the Bayesian estimation only for the pixels that are considered as background candidates in FIG.
4, the pixel value B (i, j) of the binary image input from the Bayesian estimator 66 and the pixel value O of the binary image input from the Bayes estimation calculation unit 66.
A logical OR of coordinates' (i, j) is calculated, and a binary image composed of the pixel values O (i, j) obtained as a result is output.

【0068】また、被写体候補検出部24から入力され
た2値画像の画素値B(i,j)と、ベイズ推定演算部
66から入力された2値画像の画素値O´(i,j)の
論理を逆(すなわち、背景であると判断された場合は
1、被写体であると判断された場合は0)とし、論理和
演算部67に代わって、入力された2値画像の座標毎の
論理積を演算する論理積演算部を備えるようにしても良
い。
The pixel value B (i, j) of the binary image input from the subject candidate detection unit 24 and the pixel value O ′ (i, j) of the binary image input from the Bayesian estimation calculation unit 66 (That is, 1 when it is determined to be a background, and 0 when it is determined to be a subject), and replaces the logical sum operation unit 67 with each coordinate of the input binary image. An AND operation unit that performs an AND operation may be provided.

【0069】図1を用いて説明した画像処理装置1にお
いては、メモリ23に最大値画像の画素値Max(i,
j)、最小値画像の画素値Min(i,j)、および平
均値画像の画素値Ave(i,j)を保存させ、被写体
候補検出部24の閾値算出部51に最大値画像の画素値
Max(i,j)および最小値画像の画素値Min
(i,j)を読み込ませ、背景領域か被写体かを判断す
るための画素値の上限の閾値Tmaxおよび画素値の下
限の閾値Tminを、式(4)および式(5)を用いて
算出させるようにしているが、背景情報抽出モード時
に、背景情報抽出部22に、式(4)および式(5)の
演算を予め実行させ、メモリ23に、画素値の上限の閾
値Tmaxおよび画素値の下限の閾値Tminを保存さ
せるようにしても良い。その場合、閾値算出部51を省
略することができ、被写体抽出モードにおける演算時間
を削減することが可能となる。
In the image processing apparatus 1 described with reference to FIG. 1, the pixel value Max (i,
j), the pixel value Min (i, j) of the minimum value image, and the pixel value Ave (i, j) of the average value image, and the threshold value calculation unit 51 of the subject candidate detection unit 24 stores the pixel value of the maximum value image. Max (i, j) and the pixel value Min of the minimum value image
(I, j) is read, and a threshold value Tmax of the upper limit of the pixel value and a threshold value Tmin of the lower limit of the pixel value for determining whether the pixel is the background area or the subject are calculated using Expressions (4) and (5). However, in the background information extraction mode, the background information extraction unit 22 is caused to execute the calculations of Expressions (4) and (5) in advance, and the memory 23 stores the threshold value Tmax of the pixel value upper limit and the pixel value The lower threshold Tmin may be stored. In that case, the threshold value calculation unit 51 can be omitted, and the calculation time in the subject extraction mode can be reduced.

【0070】また、式(8)を用いて説明した標準偏差
sも、背景情報抽出モード時に、背景情報抽出部22に
より予め演算させるようにし、メモリ23に保存させる
ようにしても良い。
The standard deviation s described using the equation (8) may be calculated in advance by the background information extraction unit 22 in the background information extraction mode, and may be stored in the memory 23.

【0071】また、被写体判定部25において、背景で
あるという条件の基で画素値I(i,j)が出現する確
率P(I(i,j)|bg)を、式(8)によって算出
される標準偏差sのガウス分布で近似しているが、標準
偏差の算出に他の式を用いたり、あるいは、背景画像の
性質に応じた他の分布関数を用いても良いことは言うま
でもない。
The probability P (I (i, j) | bg) that the pixel value I (i, j) appears under the condition of the background is calculated by the subject determining unit 25 by the equation (8). Although it is approximated by a Gaussian distribution of the standard deviation s, it is needless to say that another formula may be used for the calculation of the standard deviation, or another distribution function according to the property of the background image may be used.

【0072】また、被写体である確率P(obj)は、
式(11)以外にも、例えば、次の式(16)に示され
るような非線形関数を用いて求める(被写体領域、もし
くは背景領域に重み付けを施す)ようにしても良い。
The probability P (obj) of the subject is
In addition to equation (11), for example, a non-linear function as shown in the following equation (16) may be used (weight is applied to the subject area or the background area).

【数12】 ・・・(16) ここで、gは重み付けを行うのに適当な、予め定められ
た定数である。
(Equation 12) (16) Here, g is a predetermined constant suitable for performing weighting.

【0073】次に、本発明の第2の実施の形態について
説明する。図5は、本発明を適応した画像処理装置71
の構成を示すブロック図である。なお、図1における場
合と対応する部分には同一の符号を付してあり、その説
明は適宜省略する。
Next, a second embodiment of the present invention will be described. FIG. 5 shows an image processing apparatus 71 to which the present invention is applied.
FIG. 3 is a block diagram showing the configuration of FIG. The parts corresponding to those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0074】すなわち、図5の画像処理装置71は、被
写体領域検出部12に代わって、被写体領域検出部81
が設けられている以外は、図1の画像処理装置1と基本
的に同様の構成を有しており、被写体領域検出部81
は、背景情報抽出部22に代わって、背景情報抽出部9
1が設けられている以外は、図1の被写体領域検出部1
2と基本的に同様の構成を有している。
That is, the image processing apparatus 71 shown in FIG.
1 is basically the same as that of the image processing apparatus 1 of FIG.
Replaces the background information extraction unit 22 with the background information extraction unit 9
1 except that the object area detection unit 1 shown in FIG.
2 has basically the same configuration.

【0075】図6は、背景情報抽出部91の更に詳細な
構成を示すブロック図である。
FIG. 6 is a block diagram showing a more detailed configuration of the background information extracting unit 91.

【0076】平均値画像生成部43は、図2を用いて説
明したので、ここではその説明を省略する。
Since the average value image generation unit 43 has been described with reference to FIG. 2, the description is omitted here.

【0077】偏差画像生成部101は、入力された複数
の画像データの画素値I(i,j)から、それぞれの座
標毎に、次の式(17)を用いて標準偏差を算出し、そ
の値を画素値Sdv1(i,j)とする偏差画像を背景
情報として生成し、メモリ23に出力する。
The deviation image generation unit 101 calculates a standard deviation from the pixel values I (i, j) of the plurality of input image data for each coordinate by using the following equation (17). A deviation image whose value is a pixel value Sdv1 (i, j) is generated as background information and output to the memory 23.

【数13】 ・・・(17)(Equation 13) ... (17)

【0078】また、偏差画像生成部101における演算
量の削減のために、式(17)の演算において、平方根
を省略し、分散値をメモリ23に保存するようにしても
良い。
In order to reduce the amount of calculation in the deviation image generation unit 101, the square root may be omitted in the calculation of the equation (17), and the variance value may be stored in the memory 23.

【0079】被写体候補検出部24は、メモリ23か
ら、背景情報(ここでは、平均値画像の画素値Ave
(i,j)および偏差画像の画素値Sdv1(i,
j))を読み出す。閾値算出部51は、式(18)およ
び式(19)を用いて、画素値の上限の閾値Tmaxお
よび画素値の下限の閾値Tminを算出し、算出結果を
2値化処理部52に出力する。2値化処理部52は、第
1の実施の形態と同様にして、2値画像の画素値B
(i,j)を算出して出力する。
The subject candidate detecting section 24 reads the background information (here, the pixel value Ave of the average image) from the memory 23.
(I, j) and the pixel value Sdv1 (i,
j)) is read. The threshold calculation unit 51 calculates the upper threshold Tmax of the pixel value and the lower threshold Tmin of the pixel value using Expressions (18) and (19), and outputs the calculation result to the binarization processing unit 52. . The binarization processing unit 52 performs the pixel value B of the binary image in the same manner as in the first embodiment.
(I, j) is calculated and output.

【数14】 ・・・(18)[Equation 14] ... (18)

【数15】 ・・・(19) ここで、係数cおよび係数c’は、予め設定された定数
である。
(Equation 15) (19) Here, the coefficient c and the coefficient c ′ are preset constants.

【0080】そして、被写体判定部25の背景条件確率
検出部61において、上述した式(7)を用いて背景で
あるという条件の基で画素値I(i,j)が出現する確
率P(I(i,j)|bg)が算出されるが、この場
合、ガウス分布の標準偏差sには、式(8)を用いず
に、メモリ23に保存されている偏差画像の画素値Sd
v1(I,j)の各画素値を用いることができる。
Then, in the background condition probability detecting section 61 of the subject judging section 25, the probability P (I, j) that the pixel value I (i, j) appears under the condition of the background using the above equation (7). (I, j) | bg) is calculated. In this case, the standard deviation s of the Gaussian distribution is calculated using the pixel value Sd of the deviation image stored in the memory 23 without using the equation (8).
Each pixel value of v1 (I, j) can be used.

【0081】また、照明光や撮像部11の撮像パラメー
タの変動などを考慮して、例えば、偏差画像の画素値S
dv1(I,j)の各画素値に、予め設定された係数を
積算しておき、積算結果をガウス分布の標準偏差として
用いるようにしても良い。
In consideration of the illumination light and the variation of the imaging parameters of the imaging unit 11, for example, the pixel value S of the deviation image
A preset coefficient may be integrated with each pixel value of dv1 (I, j), and the integration result may be used as the standard deviation of the Gaussian distribution.

【0082】そして、第1の実施の形態と同様にして、
被写体判定部25において背景であると判定された場合
は0、被写体であると判定された場合は1の画素値を有
する2値画像の画素値O(i,j)が生成され、出力さ
れる。
Then, similarly to the first embodiment,
A pixel value O (i, j) of a binary image having a pixel value of 0 is generated when the subject is determined to be a background by the subject determination unit 25, and is output when the subject is determined to be a subject. .

【0083】第2の実施の形態によれば、メモリ23に
おいて保存される情報が、平均値画像の画素値Ave
(i,j)および偏差画像の画素値Sdv1(i,j)
の2種類であるので、メモリ23の容量を削減すること
が可能である。
According to the second embodiment, the information stored in the memory 23 is the pixel value Ave of the average image.
(I, j) and the pixel value Sdv1 (i, j) of the deviation image
Therefore, the capacity of the memory 23 can be reduced.

【0084】次に、本発明の第3の実施の形態について
説明する。図7は、本発明を適応した画像処理装置11
1の構成を示すブロック図である。なお、図1における
場合と対応する部分には同一の符号を付してあり、その
説明は適宜省略する。
Next, a third embodiment of the present invention will be described. FIG. 7 shows an image processing apparatus 11 to which the present invention is applied.
1 is a block diagram showing a configuration of FIG. The parts corresponding to those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0085】すなわち、図7の画像処理装置111は、
被写体領域検出部12に代わって、被写体領域検出部1
21が設けられている以外は、基本的に、図1を用いて
説明した画像処理装置1と基本的に同様の構成を有し、
被写体領域検出部121は、補正係数算出部131、メ
モリ132、および画素値補正部133が新たに設けら
れている以外は、図1を用いて説明した被写体領域検出
部12と基本的に同様の構成を有している。
That is, the image processing device 111 of FIG.
Instead of the subject area detection unit 12, the subject area detection unit 1
Except that the image processing apparatus 21 is provided, it has basically the same configuration as the image processing apparatus 1 described with reference to FIG.
The object region detection unit 121 is basically the same as the object region detection unit 12 described with reference to FIG. 1 except that a correction coefficient calculation unit 131, a memory 132, and a pixel value correction unit 133 are newly provided. It has a configuration.

【0086】被写体抽出モードにおいて、撮像部11に
おいて撮像された画像データは、被写体候補検出部24
および被写体判定部25に入力される前に、補正係数算
出部131、メモリ132、および画素値補正部133
において、照明光や撮像部11の撮像パラメータの変動
成分の補正が実行される。撮像部11において撮像され
た画像データの画素値I(i,j)は、スイッチ21を
介して、補正係数算出部131およびメモリ132に出
力される。
In the subject extraction mode, the image data picked up by the image pick-up unit 11 is
Before being input to the subject determination unit 25, the correction coefficient calculation unit 131, the memory 132, and the pixel value correction unit 133
In, the correction of the illumination light and the fluctuation component of the imaging parameter of the imaging unit 11 is performed. The pixel value I (i, j) of the image data imaged by the imaging unit 11 is output to the correction coefficient calculation unit 131 and the memory 132 via the switch 21.

【0087】補正係数算出部131は、入力された画素
値I(i,j)とメモリ23から読み出した平均値画像
の画素値Ave(i,j)から、式(20)を用いて補
正係数pを算出し、画素値補正部133に出力する。
The correction coefficient calculating section 131 calculates the correction coefficient from the input pixel value I (i, j) and the pixel value Ave (i, j) of the average image read from the memory 23 by using the equation (20). p is calculated and output to the pixel value correction unit 133.

【数16】 ・・・(20) ここで、式(20)中のdifは、入力された画素値I
(i,j)と、平均値画像の画素値Ave(i,j)と
の差の絶対値であり、次の式(21)で示される。
(Equation 16) (20) where dif in equation (20) is the input pixel value I
This is the absolute value of the difference between (i, j) and the pixel value Ave (i, j) of the average image, and is represented by the following equation (21).

【数17】 ・・・(21)[Equation 17] ... (21)

【0088】また、式(20)のLは、被写体領域以外
の部分を示すが、実際には、この領域を事前に知ること
はできないため、例えば、図8に示される画像の4すみ
などのように、被写体が入り込みにくいと思われる領域
が予め設定される。
Further, L in equation (20) indicates a portion other than the subject region. However, since this region cannot be known in advance, for example, the four corners of the image shown in FIG. In this way, an area in which the subject is unlikely to enter is set in advance.

【0089】式(20)のTは、閾値であり、式(2
1)で示される入力された画素値I(i,j)と、平均
値画像の画素値Ave(i,j)との差の絶対値がこの
閾値を越える場合には、領域Lに含まれる座標(i,
j)には被写体が撮像されているものとみなされ、補正
係数の算出から除外されるようになされている。
In the equation (20), T is a threshold value, and the equation (2)
If the absolute value of the difference between the input pixel value I (i, j) shown in 1) and the pixel value Ave (i, j) of the average image exceeds this threshold, it is included in the region L. Coordinates (i,
In j), the subject is regarded as being imaged, and is excluded from the calculation of the correction coefficient.

【0090】また、VminおよびVmaxは予め設定
された定数であり、入力された画素値I(i,j)と、
平均値画像の画素値Ave(i,j)とが、いずれもV
min以上Vmax以下である場合にのみ、その値が補
正係数の算出に用いられる。これは、画素の値が非常に
大きい場合は、飽和している可能性が高く、逆に非常に
小さい場合は、ノイズの影響を強く受けてしまうため、
いずれも補正係数の算出に用いるのが好ましくないから
である。
Vmin and Vmax are constants set in advance, and the input pixel value I (i, j) and
The pixel value Ave (i, j) of the average image is V
Only when the value is not less than min and not more than Vmax, the value is used for calculating the correction coefficient. This is because if the pixel value is very large, it is likely that the pixel is saturated, and if the pixel value is very small, the pixel is strongly affected by noise.
This is because it is not preferable to use any of them for calculating the correction coefficient.

【0091】メモリ132は、スイッチ21を介して入
力された画素値I(i,j)を、補正係数算出部131
の補正係数算出処理の実行時間に合わせて一時保存す
る。
The memory 132 stores the pixel value I (i, j) input via the switch 21 into the correction coefficient calculating unit 131.
Is temporarily stored in accordance with the execution time of the correction coefficient calculation process.

【0092】画素値補正部133は、補正係数算出部1
31が算出した補正係数pの入力を受け、メモリ132
から入力画像データの画素値I(i,j)を読み出し、
次の式(22)により、各画素値の補正を実行する。 I’(i,j)=I(i,j)/p・・・(22)
The pixel value correction section 133 is provided with the correction coefficient calculation section 1
31 receives the input of the correction coefficient p calculated,
Reads the pixel value I (i, j) of the input image data from
The correction of each pixel value is executed by the following equation (22). I ′ (i, j) = I (i, j) / p (22)

【0093】補正後の画素値I’(i,j)からなる補
正画像は、被写体候補検出部24および被写体判定部2
5に供給され、図1を用いて説明した場合と同様にし
て、被写体領域が検出され、画素値O(i,j)からな
る2値画像が出力される。
The corrected image including the corrected pixel values I ′ (i, j) is obtained by the subject candidate detecting section 24 and the subject determining section 2.
5, and the subject area is detected in the same manner as described with reference to FIG. 1, and a binary image including the pixel values O (i, j) is output.

【0094】図7を用いて説明した画像処理装置111
においては、例えば、式(20)を用いて説明した補正
係数pの算出式において、分母と分子を入れ替えた算出
式を用いて補正係数pを算出し、画素値補正部133に
おいて、メモリ132から読み出した入力画像データの
画素値I(i,j)に、補正係数を積算するようにして
も良い。
The image processing apparatus 111 described with reference to FIG.
In the formula, for example, the correction coefficient p is calculated by using the calculation formula obtained by exchanging the denominator and the numerator in the calculation formula of the correction coefficient p described by using Expression (20), and the pixel value correction unit 133 outputs The correction coefficient may be added to the pixel value I (i, j) of the read input image data.

【0095】また、図7の画像処理装置111において
は、第1の実施の形態と同様に、背景情報抽出部22を
用いて背景情報を抽出し、その背景情報を用いて被写体
領域を検出しているものとして説明しているが、背景情
報抽出部22に代わって、背景情報抽出部91を設ける
ようにし、第2の実施の形態と同様に、背景情報91を
用いて背景情報を抽出し、その背景情報を用いて被写体
領域を検出するようにしても良い。
In the image processing apparatus 111 of FIG. 7, as in the first embodiment, background information is extracted by using the background information extraction unit 22, and the subject area is detected by using the background information. However, a background information extraction unit 91 is provided in place of the background information extraction unit 22, and the background information is extracted using the background information 91 as in the second embodiment. Alternatively, the subject area may be detected using the background information.

【0096】次に、本発明の第4の実施の形態について
説明する。図9は、本発明を適応した画像処理装置14
1の構成を示すブロック図である。画像処理装置141
は、特に、動画像から被写体領域を抽出する場合に適し
ている。なお、図1における場合と対応する部分には同
一の符号を付してあり、その説明は適宜省略する。
Next, a fourth embodiment of the present invention will be described. FIG. 9 shows an image processing apparatus 14 to which the present invention is applied.
1 is a block diagram showing a configuration of FIG. Image processing device 141
Is particularly suitable for extracting a subject region from a moving image. The parts corresponding to those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0097】すなわち、図9の画像処理装置141は、
被写体領域検出部12に代わって、被写体領域検出部1
51が設けられている以外は、基本的に、図1を用いて
説明した画像処理装置1と基本的に同様の構成を有し、
被写体領域検出部151は、被写体判定部25に代わっ
て、被写体判定部161が設けられている以外は、図1
を用いて説明した被写体領域検出部12と基本的に同様
の構成を有している。
That is, the image processing apparatus 141 shown in FIG.
Instead of the subject area detection unit 12, the subject area detection unit 1
Except that the image processing apparatus 51 is provided, the image processing apparatus 1 has basically the same configuration as the image processing apparatus 1 described with reference to FIG.
The object region detection unit 151 is the same as that shown in FIG. 1 except that an object determination unit 161 is provided instead of the object determination unit 25.
Has a configuration basically similar to that of the subject region detection unit 12 described with reference to FIG.

【0098】図10は、被写体判定部161の更に詳細
な構成を示すブロック図である。なお、図4における場
合と対応する部分には同一の符号を付してあり、その説
明は適宜省略する。
FIG. 10 is a block diagram showing a more detailed configuration of the subject determining unit 161. Parts corresponding to those in FIG. 4 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0099】まず、1枚目の画像データに対応する画素
値I(i,j)および背景情報(ここでは、最大値画像
の画素値Max(i,j)、最小値画像の画素値Min
(i,j)、および平均値画像の画素値Ave(i,
j))が被写体判定部161に入力される。
First, the pixel value I (i, j) and background information (here, the pixel value Max (i, j) of the maximum value image, the pixel value Min of the minimum value image corresponding to the first image data)
(I, j) and the pixel value Ave (i,
j)) is input to the subject determination unit 161.

【0100】1枚目の画像データに対してのみ、被写体
候補検出部24から出力される2値画像の画素値B
(i,j)は、論理和演算部67およびメモリ172を
介して、ヒストグラム生成部62および多値マスク生成
部64に直接供給される。また、メモリ171に供給さ
れる入力画像データの画素値I(i,j)は、すぐにヒ
ストグラム生成部62に入力されるが、1枚目の入力画
像データの画素値I(i,j)は、まだ、メモリ171
に保存されたままであるものとする。
For only the first image data, the pixel value B of the binary image output from the subject candidate detecting section 24
(I, j) is directly supplied to the histogram generation unit 62 and the multi-value mask generation unit 64 via the logical sum operation unit 67 and the memory 172. The pixel value I (i, j) of the input image data supplied to the memory 171 is immediately input to the histogram generation unit 62, but the pixel value I (i, j) of the first input image data is obtained. Is still in memory 171
Shall be stored in

【0101】ヒストグラム生成部62は、メモリ171
を介して入力された画素値B(i,j)およびメモリ1
71を介して入力された画素値I(i,j)を用いて、
図4を用いて説明した方法と同様にしてヒストグラムH
(I(i,j))を生成し、メモリ173を介して、被
写体条件確率検出部63に出力する。
The histogram generation section 62 has a memory 171
Pixel value B (i, j) inputted through the memory 1
Using the pixel value I (i, j) input via
In the same manner as the method described with reference to FIG.
(I (i, j)) is generated and output to the subject condition probability detection unit 63 via the memory 173.

【0102】背景条件確率検出部61、被写体条件確率
検出部63、多値マスク生成部64、被写体/背景確率
検出部65、ベイズ推定演算部66、および論理和演算
部67は、図4を用いて説明した処理と同様の処理を実
行し、1枚目の画像データに対応する画素値O(i,
j)からなる2値画像を生成する。生成された画素値O
(i,j)からなる2値画像は、出力されるとともに、
メモリ172に供給される。
The background condition probability detection section 61, the subject condition probability detection section 63, the multi-value mask generation section 64, the subject / background probability detection section 65, the Bayes estimation calculation section 66, and the logical sum calculation section 67 are shown in FIG. A process similar to the process described above is executed, and the pixel value O (i,
Generate a binary image consisting of j). Generated pixel value O
The binary image consisting of (i, j) is output and
The data is supplied to the memory 172.

【0103】ヒストグラム生成部62は、メモリ171
から、1枚目の画像データに対応する画素値I(i,
j)を読み込むとともに、メモリ172から、1枚目の
画像データに対応する2値画像の画素値O(i,j)を
読み込み、2値画像の画素値O(i,j)が1となる座
標、すなわち、1枚目の画像データにおいて被写体候補
とみなされた座標の画素値に関するヒストグラムH(I
(i,j))を生成し、メモリ173に出力する。
The histogram generation section 62 has a memory 171
From the pixel value I (i, i, i) corresponding to the first image data.
j), the pixel value O (i, j) of the binary image corresponding to the first image data is read from the memory 172, and the pixel value O (i, j) of the binary image becomes 1. The histogram H (I) related to the coordinates, that is, the pixel value of the coordinates that are regarded as subject candidates in the first image data
(I, j)) is generated and output to the memory 173.

【0104】次に、2枚目の画像データに対応する画素
値I(i,j)が被写体判定部161に入力される。
Next, the pixel value I (i, j) corresponding to the second image data is input to the subject determining unit 161.

【0105】メモリ171には、2枚目の画像データに
対応する画素値I(i,j)が入力され、保存(1枚目
の画像データに対応する画素値I(i,j)に上書き)
される。
The memory 171 receives the pixel value I (i, j) corresponding to the second image data and saves (overwrites the pixel value I (i, j) corresponding to the first image data) )
Is done.

【0106】背景条件確率検出部61は、図4を用いて
説明した処理と同様の処理を実行し、2枚目の画像デー
タに対して、背景であるという条件の基で画素値I
(i,j)が出現する確率P(I(i,j)|bg)を
算出し、ベイズ推定演算部66に出力する。
The background condition probability detection section 61 executes a process similar to the process described with reference to FIG. 4, and performs pixel value I based on the condition that the second image data is a background.
The probability P (I (i, j) | bg) at which (i, j) appears is calculated and output to the Bayes estimation calculation unit 66.

【0107】被写体条件確率検出部63は、2枚目の画
像データに対応する画素値I(i,j)の入力を受ける
とともに、メモリ173から、1枚目の画像データにお
いて被写体候補とみなされた座標に対応するヒストグラ
ムH(I(i,j))を読み込み、式(9)を用いて、
被写体であるという条件の基で画素値I(i,j)が出
現する確率P(I(i,j)|obj)を算出し、ベイ
ズ推定演算部66に出力する。
The subject condition probability detection unit 63 receives the input of the pixel value I (i, j) corresponding to the second image data, and is regarded as a subject candidate from the memory 173 in the first image data. The histogram H (I (i, j)) corresponding to the coordinates thus obtained is read, and using equation (9),
A probability P (I (i, j) | obj) at which the pixel value I (i, j) appears under the condition that the subject is a subject is calculated and output to the Bayes estimation calculation unit 66.

【0108】多値マスク生成部64は、メモリ172か
ら、1枚目の画像データにおいて被写体候補とみなされ
た座標を示す2値画像の画素値O(i,j)を読み込
み、例えば、式(10)で示されるような平滑化処理を
施し、平滑化された画素値M(i,j)からなる帯域の
狭い多値画像生成し、被写体/背景確率検出部65に出
力する。
The multi-value mask generation unit 64 reads from the memory 172 the pixel value O (i, j) of the binary image indicating the coordinates regarded as the subject candidate in the first image data, and for example, formula ( By performing a smoothing process as shown in 10), a multi-valued image having a narrow band composed of the smoothed pixel values M (i, j) is generated and output to the subject / background probability detection unit 65.

【0109】被写体/背景確率検出部65は、図4を用
いて説明した処理(式(11)および式(12)を用い
て説明した演算処理)と同様の処理を実行し、対応する
画素が被写体である確率P(obj)および背景である
確率P(bg)を算出し、ベイズ推定演算部66に出力
する。
The subject / background probability detecting section 65 executes the same processing as the processing described with reference to FIG. 4 (the arithmetic processing described using the equations (11) and (12)), and the corresponding pixel is determined. The probability P (obj) of the subject and the probability P (bg) of the background are calculated and output to the Bayesian estimation calculation unit 66.

【0110】ベイズ推定演算部66、および論理和演算
部67は、図4を用いて説明した処理と同様の処理を実
行し、2枚目の画像データに対応する画素値O(i,
j)からなる2値画像を生成する。生成された画素値O
(i,j)からなる2値画像は、出力されるとともに、
メモリ172に供給(上書き)される。
The Bayes estimation calculation unit 66 and the logical sum calculation unit 67 execute the same processing as the processing described with reference to FIG. 4, and the pixel values O (i,
Generate a binary image consisting of j). Generated pixel value O
The binary image consisting of (i, j) is output and
The data is supplied (overwritten) to the memory 172.

【0111】ヒストグラム生成部62は、メモリ171
から、2枚目の画像データに対応する画素値I(i,
j)を読み込むとともに、メモリ172から、2枚目の
画像データに対応する2値画像の画素値O(i,j)を
読み込み、2値画像の画素値O(i,j)が1となる座
標、すなわち、2枚目の画像データにおいて被写体候補
とみなされた座標の画素値に関するヒストグラムH(I
(i,j))を生成し、メモリ173に出力する。
The histogram generation section 62 has a memory 171
From the pixel value I (i, i,
j), the pixel value O (i, j) of the binary image corresponding to the second image data is read from the memory 172, and the pixel value O (i, j) of the binary image becomes 1. The histogram H (I) related to the coordinates, that is, the pixel values of the coordinates of the coordinates regarded as the subject candidates in the second image data
(I, j)) is generated and output to the memory 173.

【0112】そして、3枚目以降の画像データに対応す
る画素値I(i,j)および背景情報が被写体判定部1
61に入力され、同様の処理が繰り返されることによ
り、複数の連続した画像データからなる動画像データに
おける被写体領域を、一つ前の画像データにおいて被写
体領域であると推定された領域の情報を基に、精度よく
検出することができる。
The pixel value I (i, j) and background information corresponding to the third and subsequent image data are stored in the
61, and the same processing is repeated, so that the subject region in the moving image data composed of a plurality of continuous image data is determined based on the information of the region estimated to be the subject region in the immediately preceding image data. In addition, detection can be performed with high accuracy.

【0113】また、図10においては、1枚目の画像デ
ータに関して、被写体候補検出部24から供給される2
値画像の画素値B(i,j)を直接メモリ172に入力
させ、1枚目の画像データに対するベイズ推定に必要な
情報を生成する場合について説明したが、例えば、1枚
目の画像データを表示させないものとし、1枚目の画像
データは、2枚目の画像データに対するベイズ推定に必
要な情報を生成するためのみに利用するようにしても良
い。
Further, in FIG. 10, the second image data supplied from the subject candidate detecting section 24 for the first image data is shown.
The case where the pixel value B (i, j) of the value image is directly input to the memory 172 to generate information necessary for Bayesian estimation for the first image data has been described. The display may not be performed, and the first image data may be used only for generating information necessary for Bayesian estimation with respect to the second image data.

【0114】なお、図10においては、1つ前の入力画
像に対するヒストグラムおよび多値マスクを利用する場
合について説明したが、ヒストグラム生成部62、もし
くは多値マスク生成部64のうちのいずれか一方に、被
写体候補検出部24から供給される2値画像の画素値B
(i,j)を直接供給して、現在処理中の画像データに
対するヒストグラム、もしくは多値マスクを生成させ
て、ベイズ推論に用いるようにしても良い。
In FIG. 10, the case where the histogram and the multi-value mask for the immediately preceding input image are used has been described, but either the histogram generator 62 or the multi-value mask generator 64 may be used. , The pixel value B of the binary image supplied from the subject candidate detection unit 24
(I, j) may be directly supplied to generate a histogram or a multi-value mask for the image data that is currently being processed, and use it for Bayesian inference.

【0115】また、図9の画像処理装置141において
は、第1の実施の形態と同様に、背景情報抽出部22を
用いて背景情報を抽出し、その背景情報を用いて、補正
係数の算出を行わずに、被写体領域を検出しているもの
として説明しているが、背景情報抽出部22に代わっ
て、背景情報抽出部91を設けるようにし、第2の実施
の形態と同様に、背景情報91を用いて背景情報を抽出
し、その背景情報を用いて被写体領域を検出するように
しても良いし、第3の実施の形態と同様に、図7を用い
て説明した補正係数算出部131、メモリ132、およ
び画素値補正部133を設け、補正係数を算出するよう
にしても良い。
In the image processing apparatus 141 of FIG. 9, as in the first embodiment, the background information is extracted by using the background information extracting unit 22, and the correction coefficient is calculated by using the background information. Although the description has been made assuming that the subject area is detected without performing the above, a background information extraction unit 91 is provided in place of the background information extraction unit 22, and the background information extraction unit 91 is provided as in the second embodiment. The background information may be extracted using the information 91, and the subject area may be detected using the background information. Alternatively, the correction coefficient calculation unit described with reference to FIG. 7 may be used as in the third embodiment. 131, a memory 132, and a pixel value correction unit 133 may be provided to calculate a correction coefficient.

【0116】以上説明した実施の形態1乃至実施の形態
4においては、画素値が単独の値である場合について説
明したが、次に、第5の実施の形態として、図1の画像
処理装置1でカラー画像を処理する場合について説明す
る。
In the first to fourth embodiments described above, the case where the pixel value is a single value has been described. Next, as a fifth embodiment, the image processing apparatus 1 shown in FIG. A case where a color image is processed will be described.

【0117】撮像部11から入力される画像データの画
素I(i,j)には、例えば、輝度信号Y(i,j)、
色差信号U(i,j)および色差信号V(i,j)など
の、色を表す複数の成分が含まれている。
The pixels I (i, j) of the image data input from the imaging unit 11 include, for example, a luminance signal Y (i, j),
A plurality of components representing colors, such as a color difference signal U (i, j) and a color difference signal V (i, j), are included.

【0118】輝度信号Y(i,j)、色差信号U(i,
j)および色差信号V(i,j)は、背景情報抽出モー
ドにおいては、スイッチ21を介して背景情報抽出部2
2に、被写体抽出モードにおいては、被写体候補検出部
24および被写体判定部25に供給される。
A luminance signal Y (i, j) and a color difference signal U (i, j)
j) and the color difference signal V (i, j) are output from the background information extraction unit 2 via the switch 21 in the background information extraction mode.
Second, in the subject extraction mode, it is supplied to the subject candidate detection unit 24 and the subject determination unit 25.

【0119】背景抽出モードにおいて、スイッチ21を
介して、図2を用いて説明した背景情報抽出部22に入
力された背景画像データは、最大値画像生成部41、最
小値画像生成部42、および平均値画像生成部43に供
給される。最大値画像生成部41、最小値画像生成部4
2、および平均値画像生成部43は、それぞれの画像デ
ータの輝度信号Y(i,j)、色差信号U(i,j)お
よび色差信号V(i,j)の成分毎に、画素値の最大値
からなる最大値画像、画素値の最小値からなる最小値画
像、および画素値の平均値からなる平均値画像をそれぞ
れ生成し、メモリ23に出力する。
In the background extraction mode, the background image data input to the background information extraction unit 22 described with reference to FIG. 2 through the switch 21 is converted into a maximum value image generation unit 41, a minimum value image generation unit 42, The average value image generation unit 43 supplies the image data. Maximum value image generation unit 41, minimum value image generation unit 4
2, and the average value image generation unit 43 calculates the pixel value of each of the components of the luminance signal Y (i, j), the color difference signal U (i, j), and the color difference signal V (i, j) of the image data. A maximum value image including a maximum value, a minimum value image including a minimum pixel value, and an average value image including an average pixel value are generated and output to the memory 23.

【0120】最大値画像生成部41は、次の式(23)
乃至式(25)を用いて、輝度信号Y(i,j)、色差
信号U(i,j)および色差信号V(i,j)の成分毎
に、画素値の最大値MaxY(i,j)、MaxU
(i,j)、およびMaxV(i,j)、からなる最大
値画像を生成する。
The maximum value image generation unit 41 calculates the following equation (23).
From Equation (25), the maximum pixel value MaxY (i, j) for each component of the luminance signal Y (i, j), the color difference signal U (i, j), and the color difference signal V (i, j). ), MaxU
A maximum value image including (i, j) and MaxV (i, j) is generated.

【数18】 ・・・(23)(Equation 18) ... (23)

【数19】 ・・・(24)[Equation 19] ... (24)

【数20】 ・・・(25)(Equation 20) ... (25)

【0121】ここで、Yk(i,j)は、k番目の画像
の、座標(i,j)における輝度信号の値を、Uk
(i,j)およびVk(i,j)は、k番目の画像の、
座標(i,j)におけるそれぞれの要素の色差信号の値
を示す。また、MAX(・)は、括弧内に示される複数
の数値の最大値を算出する演算を示す。
Here, Yk (i, j) represents the value of the luminance signal at the coordinates (i, j) of the k-th image by Uk
(I, j) and Vk (i, j) are the k-th image,
The value of the color difference signal of each element at the coordinates (i, j) is shown. MAX (•) indicates an operation for calculating the maximum value of a plurality of numerical values shown in parentheses.

【0122】最小値画像生成部42は、次の式(26)
乃至式(28)を用いて、輝度信号Y(i,j)、色差
信号U(i,j)および色差信号V(i,j)の成分毎
に、画素値の最小値MinY(i,j)、MinU
(i,j)、およびMinV(i,j)、からなる最小
値画像を生成する。
The minimum value image generation section 42 calculates the following equation (26).
From Expression (28), the minimum pixel value MinY (i, j) for each component of the luminance signal Y (i, j), the color difference signal U (i, j) and the color difference signal V (i, j). ), MinU
A minimum value image composed of (i, j) and MinV (i, j) is generated.

【数21】 ・・・(26)(Equation 21) ... (26)

【数22】 ・・・(27)(Equation 22) ... (27)

【数23】 ・・・(28)(Equation 23) ... (28)

【0123】ここで、MIN(・)は、括弧内に示され
る複数の数値の最小値を算出する演算を示す。
Here, MIN (•) indicates an operation for calculating the minimum value of a plurality of numerical values shown in parentheses.

【0124】平均値画像生成部43は、次の式(29)
乃至式(31)を用いて、輝度信号Y(i,j)、色差
信号U(i,j)および色差信号V(i,j)の成分毎
に、画素値の平均値AveY(i,j)、AveU
(i,j)、およびAveV(i,j)からなる平均値
画像を生成する。
The average value image generation section 43 calculates the following equation (29).
From Equation (31), the average value AveY (i, j) of the pixel values is used for each of the components of the luminance signal Y (i, j), the color difference signal U (i, j), and the color difference signal V (i, j). ), AveU
An average image composed of (i, j) and AveV (i, j) is generated.

【数24】 ・・・(29)(Equation 24) ... (29)

【数25】 ・・・(30)(Equation 25) ... (30)

【数26】 ・・・(31) ここで、Nは、背景情報抽出部22に供給された画像の
枚数を示す。
(Equation 26) (31) Here, N indicates the number of images supplied to the background information extraction unit 22.

【0125】図3を用いて説明した被写体候補検出部2
4は、被写体抽出モードにおいて、スイッチ21を介し
て入力画像データの画素値I(i,j)を供給されると
ともに、メモリ23に記録されている背景情報から必要
な情報(ここでは、最大値画像の画素値Max(i,
j)および最小値画像の画素値Min(i,j))を読
み込む。
The subject candidate detector 2 described with reference to FIG.
4, in the subject extraction mode, the pixel value I (i, j) of the input image data is supplied via the switch 21, and the necessary information (here, the maximum value The pixel value Max (i,
j) and the pixel value Min (i, j) of the minimum value image are read.

【0126】閾値算出部51は、背景領域か被写体かを
判断するために用いられる閾値を算出する。閾値算出部
51は、輝度信号Y(i,j)、色差信号U(i,j)
および色差信号V(i,j)の成分毎に、式(32)乃
至式(34)を用いて画素値の上限の閾値Tmaxを算
出し、式(35)乃至式(37)を用いて、画素値の下
限の閾値Tminを算出して、2値化処理部52に出力
する。
The threshold value calculating section 51 calculates a threshold value used for determining whether the object is a background area or a subject. The threshold calculator 51 calculates a luminance signal Y (i, j) and a color difference signal U (i, j).
For each component of the color difference signal V (i, j), the threshold value Tmax of the upper limit of the pixel value is calculated by using Expressions (32) to (34), and by using Expressions (35) to (37), The threshold value Tmin of the lower limit of the pixel value is calculated and output to the binarization processing unit 52.

【0127】[0127]

【数27】 ・・・(32)[Equation 27] ... (32)

【数28】 ・・・(33)[Equation 28] ... (33)

【数29】 ・・・(34)(Equation 29) ... (34)

【数30】 ・・・(35)[Equation 30] ... (35)

【数31】 ・・・(36)(Equation 31) ... (36)

【数32】 ・・・(37)(Equation 32) ... (37)

【0128】ここで、ay,au,av,by,bu,
およびbvは、それぞれ予め設定された係数であり、照
明光などによる画素値のゆらぎなどを吸収するために、
通常、それぞれay,au,av>1.0、by,b
u,bv<1.0となる値が設定される。
Here, ay, au, av, by, bu,
And bv are coefficients set in advance, respectively, in order to absorb fluctuations in pixel values due to illumination light or the like,
Usually, ay, au, av> 1.0, by, b
u, bv <1.0 are set.

【0129】2値化処理部52は、スイッチ21を介し
て入力画像データの画素値I(i,j)の入力を受け、
式(32)乃至式(37)によって表わされる閾値Tm
axおよび閾値Tminを用いて、次の式(38)によ
り、画素値B(i,j)によって構成される2値画像を
生成し、被写体判定部25に出力する。
The binarization processing section 52 receives the input of the pixel value I (i, j) of the input image data via the switch 21,
Threshold Tm represented by equations (32) to (37)
Using the ax and the threshold Tmin, a binary image composed of the pixel values B (i, j) is generated by the following equation (38), and is output to the subject determination unit 25.

【数33】 ・・・(38)[Equation 33] ... (38)

【0130】すなわち、2値化処理部52は、入力され
た画像データの画素値I(i,j)の輝度信号Y(i,
j)、色差信号U(i,j)および色差信号V(i,
j)の全ての成分が、閾値Tmaxと閾値Tminとの
範囲内である場合、対応する画素は背景候補であること
を示す値として0を設定し、輝度信号Y(i,j)、色
差信号U(i,j)および色差信号V(i,j)のうち
のいずれかの成分が閾値の範囲外である場合,対応する
画素は被写体候補であることを示す値として1を設定し
た2値画像の画素値B(i,j)を生成する。
That is, the binarization processing section 52 outputs the luminance signal Y (i, j) of the pixel value I (i, j) of the input image data.
j), the color difference signal U (i, j) and the color difference signal V (i,
If all the components of j) are within the range between the threshold value Tmax and the threshold value Tmin, the corresponding pixel is set to 0 as a value indicating that it is a background candidate, and the luminance signal Y (i, j) and the color difference signal If any component of U (i, j) and the color difference signal V (i, j) is out of the range of the threshold, the corresponding pixel is set to 1 as a value indicating that it is a subject candidate. Generate an image pixel value B (i, j).

【0131】図4を用いて説明した被写体判定部25の
背景条件確率検出部61は、入力画像データの画素値I
(i,j)の入力を受けるとともに、メモリ23から式
(23)乃至式(31)で示される背景情報を読み出
し、背景であるという条件のもとで、色成分の組み合わ
せであるI(i,j)=(Y(i,j),U(i,
j),V(i,j))が出現する確率であるP(I,
(i,j)|bg)を、次の式(39)を用いて算出
し、ベイズ推論演算部に出力する。
The background condition probability detection section 61 of the subject determination section 25 described with reference to FIG.
While receiving the input of (i, j), the background information represented by the equations (23) to (31) is read from the memory 23, and the combination of the color components I (i , J) = (Y (i, j), U (i,
j), V (i, j)), which is the probability of occurrence of P (I,
(I, j) | bg) is calculated using the following equation (39), and is output to the Bayesian inference operation unit.

【数34】 ・・・(39)(Equation 34) ... (39)

【0132】ここで、P(Y(i,j)|bg)、P
(U(i,j)|bg)、およびP(V(i,j)|b
g)は、背景であるという条件のもとで、それぞれの成
分が出現する確率であり、メモリ23から式(23)乃
至式(31)で示される背景情報を読み出し、式(7)
および式(8)の画素値I(i,j)に代わって代入す
ることによって、それぞれ算出することができる。
Here, P (Y (i, j) | bg), P
(U (i, j) | bg) and P (V (i, j) | b
g) is the probability that each component appears under the condition that it is a background. The background information represented by Expressions (23) to (31) is read from the memory 23, and Expression (7) is obtained.
And by substituting for the pixel value I (i, j) in equation (8).

【0133】ヒストグラム生成部62は、入力画像デー
タの画素値I(i,j)および2値画像の画素値B
(i,j)の入力を受け、2値画像の画素値B(i,
j)が1となる座標(i,j)、すなわち、被写体候補
検出部24が被写体候補とみなした画素の色成分に関す
る3次元ヒストグラムH(Y(i,j),U(i,
j),V(i,j))を生成し、被写体条件確率検出部
63に出力する。
The histogram generation unit 62 calculates the pixel value I (i, j) of the input image data and the pixel value B of the binary image.
(I, j), the pixel value B (i, j) of the binary image is received.
j) is 1 (ie, three-dimensional histogram H (Y (i, j), U (i,
j), V (i, j)) are generated and output to the subject condition probability detection unit 63.

【0134】被写体条件確率検出部63は、ヒストグラ
ム生成部62より入力された3次元ヒストグラムH(Y
(i,j),U(i,j),V(i,j))を用いて、
被写体であるという条件のもとで、色成分の組み合わせ
であるI(i,j)=(Y(i,j),U(i,j),
V(i,j))が出現する確率であるP(I,(i,
j)|obj)を、次の式(40)を用いて算出し、ベ
イズ推論演算部に出力する。
The subject condition probability detecting section 63 outputs the three-dimensional histogram H (Y
(I, j), U (i, j), V (i, j))
Under the condition of being a subject, a combination of color components I (i, j) = (Y (i, j), U (i, j),
V (i, j)), which is the probability of occurrence of P (I, (i,
j) | obj) is calculated using the following equation (40), and is output to the Bayesian inference operation unit.

【数35】 ・・・(40) ここで、obj_countは、式(9)の場合と同様に、被写
体候補の画素の総数(すなわち、2値画像の画素値B
(i,j)のうち、画素値が1である画素の総数)であ
る。
(Equation 35) (40) where obj_count is the total number of pixels of the subject candidate (that is, the pixel value B of the binary image) as in the case of Expression (9).
(I, j), the total number of pixels having a pixel value of 1).

【0135】そして、多値マスク生成部64、被写体/
背景確率検出部65、ベイズ推定演算部66、および論
理和演算部67においては、第1の実施の形態において
説明した処理と同様の処理が実行され、背景であると判
断された座標には0、被写体であると判断された座標に
は1の値を有する2値画像O(i,j)が、入力された
カラー画像の色情報を効果的に利用して生成され、出力
されるので、より正確な被写体領域の抽出が可能とな
る。
Then, the multi-value mask generator 64 sets the subject /
In the background probability detection section 65, the Bayes estimation calculation section 66, and the logical sum calculation section 67, the same processing as the processing described in the first embodiment is executed, and the coordinates determined to be the background are set to 0. Since a binary image O (i, j) having a value of 1 is generated and output by effectively utilizing the color information of the input color image at the coordinates determined to be the subject, It is possible to extract a more accurate subject region.

【0136】ここでは、図1の画像処理装置1でカラー
画像を処理する場合について説明したが、図5、図7、
および図9を用いて説明した画像処理装置においても、
同様にしてカラー画像を処理することができるのはもち
ろんである。
Here, the case where a color image is processed by the image processing apparatus 1 of FIG. 1 has been described.
Also in the image processing apparatus described with reference to FIG.
Of course, a color image can be processed in a similar manner.

【0137】例えば、図5を用いて説明した画像処理装
置71においてカラー画像を処理する場合、背景情報抽
出部91の偏差画像生成部101で、式(15)を用い
て生成される偏差画像の画素値Sdv1(i,j)を、
輝度信号Y(i,j)、色差信号U(i,j)および色
差信号V(i,j)の全ての成分についてそれぞれ生成
させ、閾値算出部51で、各色成分毎の画素値の上限の
閾値Tmax、および画素値の下限の閾値Tminを算
出させるようにすればよい。このとき、上限の閾値Tm
ax、および画素値の下限の閾値Tminを算出するた
めに乗算される係数は、色成分毎に異なる定数を用いる
ようにしても良い。
For example, when a color image is processed by the image processing apparatus 71 described with reference to FIG. 5, the deviation image generation unit 101 of the background information extraction unit 91 calculates the deviation image generated using the equation (15). The pixel value Sdv1 (i, j) is
All the components of the luminance signal Y (i, j), the color difference signal U (i, j) and the color difference signal V (i, j) are generated, and the threshold value calculation unit 51 sets the upper limit of the pixel value for each color component. The threshold value Tmax and the lower limit threshold value Tmin of the pixel value may be calculated. At this time, the upper threshold Tm
The constant multiplied to calculate ax and the lower limit threshold value Tmin of the pixel value may be different for each color component.

【0138】また、図7を用いて説明した画像処理装置
71においてカラー画像を処理する場合、補正係数算出
部131で、輝度信号Y(i,j)、色差信号U(i,
j)および色差信号V(i,j)の全ての成分について
それぞれの補正係数を算出させ、画素値補正部133
で、それぞれの成分の補正係数を用いて、輝度信号Y
(i,j)、色差信号U(i,j)および色差信号V
(i,j)の全ての成分について補正を行うようにすれ
ばよい。
When a color image is processed in the image processing device 71 described with reference to FIG. 7, the correction coefficient calculating section 131 outputs a luminance signal Y (i, j) and a color difference signal U (i, j).
j) and all the components of the color difference signal V (i, j) are calculated, and the pixel value correction unit 133 is calculated.
Then, using the correction coefficient of each component, the luminance signal Y
(I, j), color difference signal U (i, j) and color difference signal V
What is necessary is just to correct all the components of (i, j).

【0139】これ以降の実施の形態においては、入力さ
れた画像データがカラー画像であるものとして説明する
が、入力された画像に色情報が含まれていない場合につ
いても、入力される情報が複数の色成分から成立してい
ないだけで、基本的に同様の処理を実行するので、その
説明については省略する。
In the following embodiments, it is assumed that the input image data is a color image. However, even when the input image does not include color information, a plurality of pieces of input information are required. Since the same processing is basically performed only when the color components do not hold, the description thereof is omitted.

【0140】次に、本発明の第6の実施の形態について
説明する。図11は、本発明を適応した画像処理装置1
81の構成を示すブロック図である。なお、図1におけ
る場合と対応する部分には同一の符号を付してあり、そ
の説明は適宜省略する。
Next, a sixth embodiment of the present invention will be described. FIG. 11 shows an image processing apparatus 1 to which the present invention is applied.
It is a block diagram which shows the structure of 81. The parts corresponding to those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0141】すなわち、図11の画像処理装置181
は、被写体領域検出部12に代わって、被写体領域検出
部191が設けられている以外は、図1を用いて説明し
た場合と、基本的に同様の構成を有している。
That is, the image processing device 181 shown in FIG.
Has basically the same configuration as that described with reference to FIG. 1 except that a subject area detection unit 191 is provided instead of the subject area detection unit 12.

【0142】撮像部11から入力される画像データの画
素I(i,j)には、例えば、輝度信号Y(i,j)、
色差信号U(i,j)および色差信号V(i,j)など
の、色を表す複数の成分が含まれている。輝度信号Y
(i,j)、色差信号U(i,j)および色差信号V
(i,j)は、背景情報抽出モードにおいては、スイッ
チ21を介して背景情報抽出部201に、被写体抽出モ
ードにおいては、背景差分算出部202、背景補正部2
06、およびメモリ205に供給される。
The pixels I (i, j) of the image data input from the imaging unit 11 include, for example, a luminance signal Y (i, j),
A plurality of components representing colors, such as a color difference signal U (i, j) and a color difference signal V (i, j), are included. Luminance signal Y
(I, j), color difference signal U (i, j) and color difference signal V
(I, j) indicates to the background information extraction unit 201 via the switch 21 in the background information extraction mode, and to the background difference calculation unit 202 and the background correction unit 2 in the subject extraction mode.
06 and the memory 205.

【0143】背景情報抽出部201は、図2を用いて説
明した平均値画像生成部43から構成され、背景情報抽
出モードにおいて、式(29)乃至式(31)を用い
て、画素値の平均値AveY(i,j)、AveU
(i,j)、およびAveV(i,j)からなる平均値
画像を生成し、メモリ23に出力して保存させるととも
に、照明光などの変動要素を考慮して、次の式(41)
乃至式(43)を用いて、分散画像の画素値Sav2
(I,j)=(Sav2Y(I,j),Sav2U
(I,j),SavV(I,2j))を生成し、この分
散画像の画素値Sav2(I,j)をメモリ23に出力
して保存させる。
The background information extracting section 201 is composed of the average value image generating section 43 described with reference to FIG. 2, and in the background information extracting mode, calculates the average of the pixel values by using equations (29) to (31). Value AveY (i, j), AveU
An average image composed of (i, j) and AveV (i, j) is generated, output to the memory 23 and stored, and in consideration of a variable element such as illumination light, the following equation (41) is used.
To the pixel value Sav2 of the dispersed image using Expression (43).
(I, j) = (Sav2Y (I, j), Sav2U
(I, j), SavV (I, 2j)), and outputs the pixel value Sav2 (I, j) of the dispersed image to the memory 23 for storage.

【数36】 ・・・(41)[Equation 36] ... (41)

【数37】 ・・・(42)(37) ... (42)

【数38】 ・・・(43)(38) ... (43)

【0144】背景差分算出部202は、被写体抽出モー
ドにおいて、スイッチ21を介して、入力画像データの
画素値I(i,j)の入力を受けるとともに、メモリ2
3から背景情報を読み出して、次の式(44)に従っ
て、平均値画像と入力画像データの画素値を比較するこ
とにより、対応する座標の画素が被写体候補であるか背
景候補であるかを判断し、対応する画素が被写体候補で
あれば1、背景候補であれば0である画素B(i,j)
で構成される2値画像を生成して被写体確率算出部20
3に出力する。
In the subject extraction mode, the background difference calculation unit 202 receives the input of the pixel value I (i, j) of the input image data via the switch 21 and
3, the average value image is compared with the pixel value of the input image data according to the following equation (44) to determine whether the pixel at the corresponding coordinate is a subject candidate or a background candidate. Then, a pixel B (i, j) which is 1 if the corresponding pixel is a subject candidate and is 0 if it is a background candidate
Generates a binary image composed of
Output to 3.

【数39】 ・・・(44)[Equation 39] ... (44)

【0145】また、背景差分算出部202は、被写体確
率算出部203が上述したベイズ推論を用いて被写体確
率を算出する場合、画素B(i,j)で構成される2値
画像とともに、スイッチ21を介して入力された入力画
像データの画素値I(i,j)を被写体確率算出部20
3に出力する。
When the subject probability calculation unit 203 calculates the subject probability using the Bayesian inference described above, the background difference calculation unit 202 switches the switch 21 together with the binary image composed of the pixels B (i, j). The pixel value I (i, j) of the input image data input through the
Output to 3.

【0146】ここで、式(44)に用いられている各成
分の閾値Ty,TuおよびTvは、例えば、背景情報抽
出部201において算出された分散画像の画素値Sav
2(I,j)を用いて、次の式(45)乃至式(47)
によって算出することができる。
Here, the threshold values Ty, Tu and Tv of each component used in the equation (44) are, for example, the pixel values Sav of the dispersed image calculated by the background information extraction unit 201.
Using 2 (I, j), the following equations (45) to (47)
Can be calculated by

【数40】 ・・・(45)(Equation 40) ... (45)

【数41】 ・・・(46)[Equation 41] ... (46)

【数42】 ・・・(47) ここで、ay,au,およびavは、予め設定された係
数である。
(Equation 42) (47) where ay, au, and av are preset coefficients.

【0147】被写体確率算出部203は、各座標が被写
体領域に含まれる確率Pobj(i,j)を算出する。
各座標が被写体領域に含まれる確率Pobj(i,j)
を求める方法は、第1の実施の形態において説明したよ
うなベイズ推定理論を用いた方法でも良いし、他の方法
であっても良い。例えば、背景差分法の性質上、背景差
分算出部202において被写体候補とされた画素は、実
際に被写体である確率が高いので、入力された2値画像
の画素値B(i,j)が1である画素に対しては、被写
体確率Pobj(i,j)を1.0とし、それ以外の画
素については、経験的、もしくは実験的に領域毎の被写
体確率を設定するようにしても良い。
The subject probability calculating section 203 calculates the probability Pobj (i, j) that each coordinate is included in the subject area.
Probability Pobj (i, j) that each coordinate is included in subject area
May be a method using Bayesian estimation theory as described in the first embodiment, or may be another method. For example, due to the nature of the background subtraction method, the pixel that has been set as a subject candidate in the background difference calculation unit 202 has a high probability of actually being a subject, so that the pixel value B (i, j) of the input binary image is 1 For the pixel of, the subject probability Pobj (i, j) may be set to 1.0, and for the other pixels, the subject probability for each region may be set empirically or experimentally.

【0148】例えば、被写体領域が画像の中央に位置す
る確率が高い場合、画像上の座標による被写体確率を、
図12に示されるように予め設定されるようにしてもよ
い。このような場合、被写体確率算出部203に、座標
によって被写体確率を参照するためのテーブルが予め用
意され、画素の位置に応じてテーブルが参照されて、被
写体確率Pobj(i,j)が算出される。被写体確率
Pobj(i,j)は、メモリ204に出力されて保存
される。
For example, if the probability that the subject area is located at the center of the image is high, the subject probability based on the coordinates on the image is calculated as follows.
It may be set in advance as shown in FIG. In such a case, a table for referencing the subject probability by the coordinates is prepared in advance in the subject probability calculation unit 203, and the table is referred to according to the position of the pixel to calculate the subject probability Poj (i, j). You. The object probability Pobj (i, j) is output to the memory 204 and stored.

【0149】また、被写体確率算出部203が、上述し
たベイズ推論を用いて被写体確率Pobj(i,j)を
求めるようになされている場合、被写体確率算出部20
3は、実質的に、図4の被写体判定部25もしくは図1
0の被写体判定部161と同様の構成を有して、同様の
処理を実行する。そして、被写体確率算出部203は、
図4および図10を用いて説明した場合の画素O(I,
j)を被写体確率Pobj(i,j)として出力する。
In the case where the subject probability calculation unit 203 obtains the subject probability Pobj (i, j) using the Bayesian inference described above, the subject probability calculation unit 20
3 substantially corresponds to the subject determination unit 25 of FIG.
It has a configuration similar to that of the subject determination unit 161 of 0, and executes similar processing. Then, the subject probability calculation unit 203
The pixel O (I, I,
j) is output as the subject probability Poj (i, j).

【0150】また、被写体確率算出部203において
は、必要に応じて、入力された2値画像の画素値B
(i,j)を補正することもできる。例えば、被写体確
率Pobj(i,j)の閾値を予め設定しておき、画素
値B(i,j)=0である画素に対して、対応する被写
体確率Pobj(i,j)が閾値よりも大きい場合は、
対応する画素を被写体とみなして、画素値B’(i,
j)=1とする。必要に応じて補正された画素値B’
(i,j)は、被写体確率Pobj(i,j)ととも
に、背景補正部206に出力される。
In the subject probability calculating section 203, if necessary, the pixel value B of the input binary image
(I, j) can also be corrected. For example, a threshold value of the object probability Pobj (i, j) is set in advance, and for a pixel whose pixel value B (i, j) = 0, the corresponding object probability Pobj (i, j) is smaller than the threshold value. If larger,
The corresponding pixel is regarded as a subject, and the pixel value B ′ (i, i,
j) = 1. Pixel value B ′ corrected as necessary
(I, j) is output to the background correction unit 206 together with the subject probability Pobj (i, j).

【0151】メモリ204は、被写体確率算出部203
から現在処理中の画像の被写体確率Pobj(i,j)
の入力を受け、保存するとともに、1つ前の画像の被写
体確率をPprv(i,j)として、背景補正部206
に出力する。
The memory 204 includes a subject probability calculating section 203
From the object probability Pobj (i, j) of the image currently being processed
Is received and saved, and the background correction unit 206 sets the subject probability of the previous image as Pprv (i, j).
Output to

【0152】メモリ205は、被写体確率算出部203
から現在処理中の画像の画素値I(i,j)の入力を受
け、保存するとともに、1つ前の画像の画素値を画素値
Iprv(i,j)として、背景補正部206に出力す
る。
The memory 205 has a subject probability calculating section 203.
, Receives and stores the pixel value I (i, j) of the image currently being processed, and outputs the pixel value of the immediately preceding image to the background correction unit 206 as the pixel value Iprv (i, j). .

【0153】背景補正部206は、被写体確率算出部2
03から入力された2値画像の画素値B’(i,j)に
おいて、その値が0である画素、すなわち、背景候補と
みなされている画素についてのみ補正を実行する。
The background correction unit 206 includes the subject probability calculation unit 2
In the pixel value B ′ (i, j) of the binary image input from step 03, the correction is performed only on the pixel whose value is 0, that is, the pixel regarded as a background candidate.

【0154】背景補正部206が、座標(i,j)で示
される画素が背景であるか、被写体であるかを判断する
ためには、対応する座標の画素が、背景であると仮定し
た場合に適当であると考えられる画素と、被写体である
と仮定した場合に適当であると考えられる画素とを算出
し、実際に入力された画素値I(i,j)が、どちらに
近いかを比較することによって行われる。
In order for the background correction unit 206 to determine whether the pixel indicated by the coordinates (i, j) is the background or the subject, it is assumed that the pixel at the corresponding coordinate is the background. And a pixel considered appropriate when the object is assumed to be an object, and it is determined which pixel value I (i, j) actually input is closer to. This is done by comparison.

【0155】背景候補とみなされている画素に対して、
座標(i,j)の画素が背景であると仮定した場合に適
当であると考えられる画素値I’bg=(Y’bg,
U’bg,V’bg)、および被写体であると仮定した
場合に適当であると考えられる画素値I’obj=
(Y’obj,U’obj,V’obj)それぞれの値
と、入力された画素値との三次元的な距離Dbgおよび
距離Dobjは、次の式(48)および式(49)によ
って示される。
For pixels considered as background candidates,
A pixel value I′bg = (Y′bg, which is considered to be appropriate when the pixel at the coordinates (i, j) is assumed to be the background.
U′bg, V′bg), and a pixel value I′obj = appropriate assuming that the subject is assumed
The three-dimensional distance Dbg and distance Dobj between each value of (Y'obj, U'obj, V'obj) and the input pixel value are expressed by the following equations (48) and (49). .

【数43】 ・・・(48)[Equation 43] ... (48)

【数44】 ・・・(49)[Equation 44] ... (49)

【0156】そして、背景補正部206は、式(48)
を用いて算出した距離Dbgおよび距離Dobjを比較
し、Dobjの方が小さい場合には、座標(i,j)で
示される画素を被写体であると判定し、Dbgの方が小
さい場合には、座標(i,j)で示される画素を背景で
あると判定する。
Then, the background correction unit 206 calculates the expression (48)
The distance Dbg and the distance Dobj calculated using are compared. If the distance Dbj is smaller, the pixel indicated by the coordinates (i, j) is determined to be the subject. If the distance Dbg is smaller, The pixel indicated by the coordinates (i, j) is determined to be the background.

【0157】背景の推定画素値I’bg(i,j)は、
メモリ23に保存されている背景画像データの平均値画
像の画素値Ave(i,j)を読み出して利用すること
ができるので、式(29)乃至式(31)で示される、
画素値の平均値AveY(i,j)、AveU(i,
j)、およびAveV(i,j)を、上述した式(4
8)に代入することにより、距離Dbgは算出可能であ
る。
The estimated pixel value I'bg (i, j) of the background is
Since the pixel value Ave (i, j) of the average value image of the background image data stored in the memory 23 can be read and used, it is expressed by Expressions (29) to (31).
Average values AveY (i, j) and AveU (i,
j) and AveV (i, j) are obtained by using the above equation (4).
By substituting into 8), the distance Dbg can be calculated.

【0158】しかしながら、被写体の推定画素値I’o
bj(i,j)は、対応する画素値が与えられていない
ため、背景補正部206は、メモリ204およびメモリ
205に保存されている1つ前の入力画像の画素値Ip
rv(i,j)およびその画像の各座標の被写体確率P
prv(I,j)を利用して、被写体の推定画素値I’
obj(i,j)を算出する。
However, the estimated pixel value I'o of the subject
Since no corresponding pixel value is given to bj (i, j), the background correction unit 206 determines the pixel value Ip of the immediately preceding input image stored in the memory 204 and the memory 205.
rv (i, j) and the object probability P at each coordinate of the image
Using prv (I, j), the estimated pixel value I ′ of the subject
obj (i, j) is calculated.

【0159】図13は、背景補正部206の更に詳細な
構成を示すブロック図である。
FIG. 13 is a block diagram showing a more detailed configuration of background correction section 206.

【0160】背景距離算出部211は、現在処理中の画
像データの画素値I(i,j)および平均値画像の画素
値Ave(i,j)の入力を受け、上述した式(48)
に、画素値の平均値AveY(i,j)、AveU
(i,j)、およびAveV(i,j)を代入した次の
式(50)を用いて、距離Dbgを算出し、補正部21
5に出力する。
The background distance calculation unit 211 receives the input of the pixel value I (i, j) of the image data currently being processed and the pixel value Ave (i, j) of the average image, and receives the above equation (48).
Are average values of pixel values AveY (i, j), AveU
The distance Dbg is calculated using the following equation (50) in which (i, j) and AveV (i, j) are substituted, and the correction unit 21
5 is output.

【数45】 ・・・(50)[Equation 45] ... (50)

【0161】前画像距離算出部212は、現在処理中の
画像データの画素値I(i,j)およびメモリ205に
保存されている1つ前の入力画像の画素値Iprv
(i,j)の入力を受け、上述した式(49)に、1つ
前の入力画像の画素値IprvY(i,j)、Iprv
U(i,j)、およびIprvV(i,j)を代入した
次の式(51)を用いて、距離Dprvを求め、被写体
距離算出部214に出力する。
The previous image distance calculator 212 calculates the pixel value I (i, j) of the image data currently being processed and the pixel value Iprv of the immediately preceding input image stored in the memory 205.
Upon receiving the input of (i, j), the pixel values IprvY (i, j), Iprv of the immediately preceding input image are calculated in the above equation (49).
The distance Dprv is obtained by using the following equation (51) into which U (i, j) and IprvV (i, j) are substituted, and is output to the subject distance calculation unit 214.

【数46】 ・・・(51)[Equation 46] ... (51)

【0162】重み算出部213は、1つ前の画像の各座
標の被写体確率Pprv(I,j)の入力を受け、被写
体距離算出部214において、前画像距離算出部212
で算出された距離Dprvを補正し、距離Dobjを算
出するための補正値wを、次の式(52)を用いて算出
し、被写体距離算出部214に出力する。
The weight calculating section 213 receives the subject probability Pprv (I, j) of each coordinate of the immediately preceding image, and the subject distance calculating section 214 causes the previous image distance calculating section 212
Is corrected using the following equation (52), and the correction value w for calculating the distance Dobj is output to the subject distance calculation unit 214.

【数47】 ・・・(52)[Equation 47] ... (52)

【0163】被写体距離算出部214は、前画像距離算
出部212から式(51)に示される距離Dprvの入
力を受けるとともに、重み算出部213から式(52)
に示される補正値wの入力を受け、次の式(53)に示
されるように、距離Dprvに補正値wを積算すること
により補正を行い、距離Dobjを算出して補正部21
5に出力する。 Dobj=w×Dprv ・・・(53)
The subject distance calculation unit 214 receives the input of the distance Dprv shown in the equation (51) from the previous image distance calculation unit 212 and receives the input from the weight calculation unit 213 in the equation (52).
, The correction is performed by multiplying the distance Dprv by the correction value w, and the distance Dobj is calculated as shown in the following equation (53).
5 is output. Dobj = w × Dprv (53)

【0164】すなわち、被写体距離算出部214におい
ては、1つ前の画像の各座標の被写体確率Pprv
(I,j)が1のとき、距離Dobj=距離Dprvと
なり、被写体確率Pprv(I,j)が小さくなるほ
ど、距離Dobjが大きな値となるように補正される。
That is, in the subject distance calculating section 214, the subject probability Pprv of each coordinate of the immediately preceding image is calculated.
When (I, j) is 1, the distance Dobj = the distance Dprv, and the correction is made so that the smaller the subject probability Pprv (I, j), the larger the distance Dobj becomes.

【0165】補正部215は、被写体確率算出部203
から2値画像の画素値B’(i,j)の入力を受けると
ともに、背景距離算出部211から式(50)に示され
る距離Dbgを、被写体距離算出部214から式(5
3)に示される距離Dobjの入力を受ける。補正部2
15は、まず、初めに2値画像の画素値B’(i,j)
を参照し、画素値B’(i,j)=1である場合には、
補正を行わず、対応する座標(i,j)の画素は被写体
であると判定し、画素値O(I,j)=1を出力する。
The correction unit 215 includes a subject probability calculation unit 203
, The input of the pixel value B ′ (i, j) of the binary image from the background distance calculation unit 211 and the distance Dbg shown in the equation (50) from the subject distance calculation unit 214 to the equation (5).
The input of the distance Dobj shown in 3) is received. Correction unit 2
Reference numeral 15 denotes a pixel value B '(i, j) of the binary image first.
And if the pixel value B ′ (i, j) = 1,
Without correction, the pixel at the corresponding coordinates (i, j) is determined to be a subject, and a pixel value O (I, j) = 1 is output.

【0166】それに対して、画素値B’(i,j)=0
である場合、補正部215は、距離Dbgと距離Dob
jとを比較し、距離Dobjが距離Dbgよりも小さか
った場合、対応する座標(i,j)の画素は被写体であ
ると判定し、画素値O(I,j)=1を出力し、距離D
objが距離Dbgよりも大きかった場合、対応する座
標(i,j)の画素は背景であると判定し、画素値O
(I,j)=0を出力する。
On the other hand, pixel value B ′ (i, j) = 0
, The correction unit 215 calculates the distance Dbg and the distance Dob
j, and when the distance Dobj is smaller than the distance Dbg, the pixel at the corresponding coordinate (i, j) is determined to be a subject, and a pixel value O (I, j) = 1 is output, and the distance D
If obj is greater than the distance Dbg, the pixel at the corresponding coordinate (i, j) is determined to be the background, and the pixel value O
(I, j) = 0 is output.

【0167】なお、図11を用いて説明した画像処理装
置181においては、背景情報抽出モードにおいて、背
景情報抽出部201が式(41)乃至式(43)を用い
て説明した背景情報を抽出し、メモリ23に出力して保
存させるものとして説明したが、例えば、背景情報抽出
部201に代わって、図2を用いて説明した背景情報抽
出部22を用いて背景情報を抽出し、式(23)乃至式
(31)に示される画素値を算出させるとともに、背景
差分算出部202に代わって、図2を用いて説明した被
写体候補検出部24を用いて、式(44)の演算に代わ
って式(32)乃至式(38)の演算を実行することに
より、画素値B(I,j)からなる2値画像を得るよう
にしても良い。
In the image processing apparatus 181 described with reference to FIG. 11, in the background information extraction mode, the background information extraction unit 201 extracts the background information described using the equations (41) to (43). Has been described as being output to and stored in the memory 23. For example, instead of the background information extraction unit 201, background information is extracted using the background information extraction unit 22 described with reference to FIG. ) Through (31), and using the subject candidate detection unit 24 described with reference to FIG. 2 instead of the background difference calculation unit 202, instead of the calculation of expression (44). By executing the operations of Expressions (32) to (38), a binary image including the pixel values B (I, j) may be obtained.

【0168】また、第6の実施の形態においては、被写
体確率Pobj(i,j)を算出するための先見的知識
として、図12を用いて説明した、画面上で被写体が存
在する確率が高い位置の情報を用いたが、例えば、被写
体領域に出現する可能正の高い色情報など、被写体領域
に関する他の上方を反映して被写体確率Pobj(i,
j)を算出するようにしても良い。
Also, in the sixth embodiment, as the a priori knowledge for calculating the subject probability Pobj (i, j), the probability that the subject exists on the screen described with reference to FIG. 12 is high. Although the position information is used, for example, the object probability Pobj (i,
j) may be calculated.

【0169】次に、本発明の第7の実施の形態について
説明する。第7の実施の形態は、上述した第6の実施の
形態における画像処理に、図4および図10を用いて説
明した多値マスク生成部64が実行したのと同様の平滑
化処理を加えたものである。
Next, a seventh embodiment of the present invention will be described. In the seventh embodiment, the same smoothing processing as that performed by the multi-value mask generation unit 64 described with reference to FIGS. 4 and 10 is added to the image processing in the above-described sixth embodiment. Things.

【0170】図14は、本発明を適応した画像処理装置
221の構成を示すブロック図である。なお、図11に
おける場合と対応する部分には同一の符号を付してあ
り、その説明は適宜省略する。
FIG. 14 is a block diagram showing a configuration of an image processing device 221 to which the present invention is applied. Parts corresponding to those in FIG. 11 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0171】すなわち、図14の画像処理装置221
は、被写体領域検出部191に代わって、被写体領域検
出部231が設けられている以外は、図11を用いて説
明した場合と、基本的に同様の構成を有している。
That is, the image processing device 221 shown in FIG.
Has basically the same configuration as that described with reference to FIG. 11 except that a subject area detection unit 231 is provided instead of the subject area detection unit 191.

【0172】そして、被写体領域検出部231は、被写
体確率算出部203に代わって被写体確率算出部241
が設けられ、更に、メモリ242が新たに設けられてい
る以外は、図11を用いて説明した被写体領域検出部1
91と、基本的に同様の構成を有している。
The subject area detecting section 231 replaces the subject probability calculating section 203 with the subject probability calculating section 241.
And the memory area 242 is newly provided, and the object region detecting unit 1 described with reference to FIG.
It has basically the same configuration as 91.

【0173】ここで、背景情報抽出部201、メモリ2
3、および背景差分算出部202の処理は、第6の実施
の形態における場合と同様であるので、その説明は省略
する。
Here, the background information extraction unit 201 and the memory 2
3 and the processing of the background difference calculation unit 202 are the same as those in the sixth embodiment, and thus description thereof is omitted.

【0174】被写体抽出モードの1枚目の画像データに
対して、背景差分算出部202、被写体確率算出部24
1、背景補正部206、メモリ204、およびメモリ2
05は、第6の実施の形態における背景差分算出部20
2乃至背景補正部206と同様の処理を実行して、1枚
目の画像データに対応する2値画像の画素値O(i,
j)を生成して出力する。そして、メモリ242に、1
枚目の画像データに対応する2値画像の画素値O(i,
j)が入力されて、次の画像データの被写体領域を検出
するために用いられる、一つ前の画像データに対応する
2値画像の画素値Oprv(i,j)として保存され
る。
For the first image data in the subject extraction mode, the background difference calculator 202 and the subject probability calculator 24
1. Background correction unit 206, memory 204, and memory 2.
05 is the background difference calculation unit 20 in the sixth embodiment.
The same processing as that of the second to the background correction unit 206 is performed, and the pixel values O (i,
j) is generated and output. Then, 1
The pixel value O (i, i) of the binary image corresponding to the
j) is input and stored as the pixel value Oprv (i, j) of the binary image corresponding to the immediately preceding image data, which is used to detect the subject area of the next image data.

【0175】2枚目の画像データに対応する2値画像の
画素値B(i,j)の入力を受けた被写体確率算出部2
41は、メモリ242から一つ前の画像データに対応す
る2値画像の画素値Oprv(i,j)を読み込む。そ
して、被写体確率算出部241は、例えば、上述した式
(10)を用いて、2値画像の画素値Oprv(i,
j)を平滑化し、画素値M(i,j)からなる多値画像
を生成する。例えば、2値画像の画素値Oprv(i,
j)が、図15に示されるように平滑化された場合、画
素値M(i,j)は、一つ前の画像データに対応する2
値画像の画素値Oprv(i,j)において、被写体領
域であると判断されていた部分の中心点に近い位置ほ
ど、1に近い数値になる(すなわち、被写体である確率
が高いと判断される)。
Object probability calculating section 2 receiving the input of the pixel value B (i, j) of the binary image corresponding to the second image data
41 reads the pixel value Oprv (i, j) of the binary image corresponding to the immediately preceding image data from the memory 242. Then, the subject probability calculation unit 241 uses, for example, Equation (10) described above to calculate the pixel value Oprv (i,
j) is smoothed to generate a multi-valued image composed of pixel values M (i, j). For example, the pixel value Oprv (i,
When j) is smoothed as shown in FIG. 15, the pixel value M (i, j) becomes 2 corresponding to the immediately preceding image data.
In the pixel value Oprv (i, j) of the value image, a position closer to the center point of the part determined to be the subject area has a value closer to 1 (that is, it is determined that the probability of being the subject is higher). ).

【0176】そして、被写体確率算出部241は、上述
した式(11)を用いて、画素値M(i,j)を正規化
して被写体確率Pobj(i,j)を生成し、メモリ2
04に出力する。すなわち、被写体確率Pobj(i,
j)は、一つ前の画像データに対応する2値画像の画素
値Oprv(i,j)において、被写体領域であると判
断されていた部分の中心点に近い位置ほど、高い確率で
あるとされる。
The object probability calculating section 241 normalizes the pixel value M (i, j) using the above-described equation (11) to generate the object probability Pobj (i, j),
04. That is, the object probability Pobj (i,
j) indicates that a pixel position Oprv (i, j) of a binary image corresponding to the immediately preceding image data has a higher probability as the position is closer to the center point of a portion determined to be a subject area. Is done.

【0177】なお、第7の実施の形態においても、背景
情報の抽出方法、および被写体確率Pobj(i,j)
の算出方法は、第6の実施の形態において説明したいず
れの方法を用いても良いし、更に、被写体確率Pobj
(i,j)の算出に、1つ前の画像データに対応する2
値画像の画素値Oprv(i,j)において、被写体領
域であると判断されていた画素に対応する入力画像の画
素値のヒストグラムや背景画像のヒストグラムを生成し
て、これらのヒストグラムを比較することにより、ある
色が被写体領域に現れる可能性を評価し、被写体確率を
算出するようにしてもよい。
It should be noted that also in the seventh embodiment, the background information extraction method and the subject probability Pobj (i, j)
May be calculated using any of the methods described in the sixth embodiment, and furthermore, the subject probability Pobj
In calculating (i, j), 2 corresponding to the immediately preceding image data
In the pixel value Oprv (i, j) of the value image, a histogram of the pixel value of the input image and a histogram of the background image corresponding to the pixel determined to be the subject area are generated, and these histograms are compared. Thus, the possibility that a certain color appears in the subject area may be evaluated to calculate the subject probability.

【0178】次に、本発明の第8の実施の形態について
説明する。
Next, an eighth embodiment of the present invention will be described.

【0179】図16は、本発明を適応した画像処理装置
251の構成を示すブロック図である。なお、図11に
おける場合と対応する部分には同一の符号を付してあ
り、その説明は適宜省略する。
FIG. 16 is a block diagram showing a configuration of an image processing device 251 to which the present invention is applied. Parts corresponding to those in FIG. 11 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0180】すなわち、図16の画像処理装置251
は、被写体領域検出部191に代わって、被写体領域検
出部261が設けられている以外は、図11を用いて説
明した場合と、基本的に同様の構成を有している。
That is, the image processing device 251 shown in FIG.
Has basically the same configuration as that described with reference to FIG. 11 except that a subject area detection unit 261 is provided instead of the subject area detection unit 191.

【0181】そして、被写体領域検出部261は、背景
補正部206に代わって背景補正部272が設けられ、
更にメモリ271が新たに設けられている以外は、図1
1の被写体領域検出部191と基本的に同様の構成を有
するので、その説明は省略する。
The subject area detection section 261 is provided with a background correction section 272 instead of the background correction section 206.
1 except that a memory 271 is newly provided.
Since the configuration is basically the same as that of the first subject area detection unit 191, the description thereof is omitted.

【0182】また、背景情報抽出部201、メモリ2
3、背景差分算出部202、および被写体確率算出部2
03の処理は、第6の実施の形態における場合と同様で
あるので、その説明は省略する。
The background information extraction unit 201 and the memory 2
3. Background difference calculation unit 202 and subject probability calculation unit 2
The process of step 03 is the same as that of the sixth embodiment, and a description thereof will be omitted.

【0183】被写体確率算出部203は、上述した処理
により各座標が被写体領域に含まれる確率Pobj
(i,j)を算出し、メモリ204に出力するととも
に、必要に応じて、背景差分算出部202から入力され
た2値画像の画素値B(i,j)を補正し、補正後の2
値画像の画素値B’(i,j)をメモリ271に出力す
る。
The subject probability calculating section 203 calculates the probability Pobj that each coordinate is included in the subject area by the above-described processing.
(I, j) is calculated and output to the memory 204. If necessary, the pixel value B (i, j) of the binary image input from the background difference calculation unit 202 is corrected.
The pixel value B ′ (i, j) of the value image is output to the memory 271.

【0184】背景補正部272は、後述する補正処理に
おいて、2値画像の画素値B’(i,j)のうち、補正
対象の座標(i,j)の近傍の領域の画素値を必要とす
る。メモリ271は、全画面分の2値画像の画素値B’
(i,j)を保存し、背景補正部272の処理のタイミ
ングにあわせて、補正に必要となる2値画像の画素値R
(i,j)を出力するか、もしくは、背景補正部272
が、メモリ271から、画素値R(i,j)を読み出
す。
The background correction section 272 needs the pixel values of the area near the coordinates (i, j) to be corrected among the pixel values B ′ (i, j) of the binary image in the correction processing described later. I do. The memory 271 stores the pixel value B ′ of the binary image for the entire screen.
(I, j) is stored, and the pixel value R of the binary image required for the correction is adjusted according to the processing timing of the background correction unit 272.
(I, j) is output or the background correction unit 272 is output.
Reads the pixel value R (i, j) from the memory 271.

【0185】補正対象の座標に対する近傍領域は、例え
ば、補正対象の座標(i,j)から所定の距離内の画素
(すなわち、補正対象の座標(i,j)を中心とした所
定の半径の円内の画素)であっても良いし、次の式(5
4)に示されるように、予め設定された定数mで決めら
れる正方形の形状の領域内の画素であっても良いし、ほ
かの方法で設定された領域内の画素であってもよい。
The neighborhood area for the coordinates to be corrected is, for example, a pixel within a predetermined distance from the coordinates (i, j) to be corrected (that is, a pixel having a predetermined radius around the coordinates (i, j) to be corrected). Pixel within a circle) or the following equation (5)
As shown in 4), it may be a pixel in a square area determined by a preset constant m, or may be a pixel in an area set by another method.

【数48】 ・・・(54)[Equation 48] ... (54)

【0186】以下、近傍領域内の座標を座標(i’,
j’)とする。
Hereinafter, the coordinates in the vicinity area are represented by coordinates (i ′,
j ').

【0187】背景補正部272は、背景補正部206と
同様に、メモリ271を介して被写体確率算出部203
から入力された2値画像の画素値B’(i,j)におい
て、その値が0である画素、すなわち、背景候補とみな
されている画素についてのみ補正を実行する。
[0187] The background correction section 272 is, like the background correction section 206, provided with the object probability calculation section 203 via the memory 271.
In the pixel value B ′ (i, j) of the binary image input from the above, the correction is performed only on the pixel whose value is 0, that is, the pixel regarded as the background candidate.

【0188】また、背景補正部272が、座標(i,
j)で示される画素が背景であるか、被写体であるかを
判断する方法も、背景補正部206と同様であり、上述
した式(48)および式(49)を用いて、対応する座
標の画素が、背景であると仮定した場合に適当であると
考えられる画素と、被写体であると仮定した場合に適当
であると考えられる画素とを算出し、実際に入力された
画素値I(i,j)が、どちらに近いかを比較すること
によって行われる。
The background correction unit 272 calculates the coordinates (i,
The method of determining whether the pixel indicated by j) is the background or the subject is also the same as that of the background correction unit 206, and the above-described equations (48) and (49) are used to calculate the corresponding coordinates. Pixels that are considered appropriate when the pixel is assumed to be the background and pixels that are considered appropriate when the pixel is assumed to be the subject are calculated, and the actually input pixel value I (i , J) by comparing which one is closer.

【0189】従って、この場合においても、第7の実施
の形態と同様に、距離Dbgは算出可能であるが、被写
体の推定画素値I’obj(i,j)に対応する画素値
は与えられていない。従って、背景補正部272は、メ
モリ271、メモリ204およびメモリ205に保存さ
れている対応する座標の近傍の情報を利用して、被写体
の推定画素値I’obj(i,j)を算出する。
Therefore, in this case as well, the distance Dbg can be calculated as in the seventh embodiment, but the pixel value corresponding to the estimated pixel value I'obj (i, j) of the subject is given. Not. Therefore, the background correction unit 272 calculates the estimated pixel value I'obj (i, j) of the subject using information near the corresponding coordinates stored in the memory 271, the memory 204, and the memory 205.

【0190】図17は、背景補正部272の更に詳細な
構成を示すブロック図である。なお、図13における場
合と対応する部分には同一の符号を付してあり、その説
明は適宜省略する。
FIG. 17 is a block diagram showing a more detailed configuration of the background correction section 272. Parts corresponding to those in FIG. 13 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0191】背景距離算出部211は、図13を用いて
説明した場合と同様に、現在処理中の画像データの画素
値I(i,j)および平均値画像の画素値Ave(i,
j)の入力を受け、式(50)を用いて、距離Dbgを
算出し、補正部215に出力する。
As described with reference to FIG. 13, the background distance calculation unit 211 calculates the pixel value I (i, j) of the image data currently being processed and the pixel value Ave (i, j) of the average image.
j), the distance Dbg is calculated using Expression (50), and is output to the correction unit 215.

【0192】被写体距離算出部281は、メモリ271
から供給される画素値R(i,j)、メモリ204から
供給される、上述した近傍領域(例えば、式(54)で
示される領域)の被写体確率Pobj(i’,j’)、
およびメモリ205から供給される、上述した近傍領域
の画素値I(i’,j’)を用いて、次の式(55)乃
至式(57)より、背景の推定画素値I’bg(i,
j)を求める。
The subject distance calculation section 281
, The object probability Pobj (i ′, j ′) of the above-described neighboring region (for example, the region represented by Expression (54)) supplied from the memory 204,
And the estimated pixel value I′bg (i) of the background from the following Expressions (55) to (57) using the pixel value I (i ′, j ′) of the above-described neighborhood supplied from the memory 205. ,
j) is obtained.

【数49】 ・・・(55)[Equation 49] ... (55)

【数50】 ・・・(56)[Equation 50] ... (56)

【数51】 ・・・(57)(Equation 51) ... (57)

【0193】ここで、被写体距離算出部281は、必要
な領域の座標に対応する被写体確率Pobj(i’,
j’)および画素値I(i’,j’)を、選択的にメモ
リ204およびメモリ205から読み出すようにしても
良い。
Here, the subject distance calculation unit 281 calculates the subject probability Pobj (i ′,
j ′) and the pixel value I (i ′, j ′) may be selectively read from the memories 204 and 205.

【0194】式(55)乃至式(57)は、座標(i,
j)の画素の近傍領域内において、背景差分算出部20
2もしくは被写体確率算出部203において被写体であ
ると判断された画素のみを選択して、選択された画素値
を、対応する被写体確率で重み付けしたのち平均するも
のである。
Equations (55) to (57) represent the coordinates (i,
j) In the neighborhood of the pixel, the background difference calculation unit 20
2 or only the pixels determined to be the subject in the subject probability calculation unit 203 are selected, and the selected pixel values are weighted by the corresponding subject probabilities and then averaged.

【0195】補正部215は、背景距離算出部211か
ら供給された距離Dbgおよび被写体距離算出部281
から供給された距離Dobjを用いて、図13を用いて
説明した場合と同様の処理により補正を実行し、生成さ
れた2値画像の画素O(i,j)を出力する。
The correction unit 215 includes the distance Dbg supplied from the background distance calculation unit 211 and the subject distance calculation unit 281.
The correction is executed by using the distance Dobj supplied from, by the same processing as that described with reference to FIG. 13, and the pixel O (i, j) of the generated binary image is output.

【0196】なお、第8の実施の形態においても、背景
情報の抽出方法、および被写体確率Pobj(i,j)
の算出方法は、第6の実施の形態、もしくは第7の実施
の形態において説明したいずれの方法を用いても良い。
Note that also in the eighth embodiment, the method of extracting background information and the object probability Pobj (i, j)
May be calculated by any of the methods described in the sixth embodiment or the seventh embodiment.

【0197】次に、本発明の第9の実施の形態について
説明する。
Next, a ninth embodiment of the present invention will be described.

【0198】図18は、本発明を適応した画像処理装置
291の構成を示すブロック図である。なお、図16に
おける場合と対応する部分には同一の符号を付してあ
り、その説明は適宜省略する。
FIG. 18 is a block diagram showing a configuration of an image processing device 291 to which the present invention is applied. Parts corresponding to those in FIG. 16 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.

【0199】すなわち、図18の画像処理装置291
は、被写体領域検出部261に代わって、被写体領域検
出部301が設けられている以外は、図16を用いて説
明した場合と、基本的に同様の構成を有している。
That is, the image processing device 291 shown in FIG.
Has basically the same configuration as the case described with reference to FIG. 16 except that a subject area detection unit 301 is provided instead of the subject area detection unit 261.

【0200】そして、被写体領域検出部301は、被写
体確率算出部203に代わって、被写体確率算出部31
1が設けられ、新たにメモリ312が設けられている以
外は、図16を用いて説明した場合と、基本的に同様の
構成を有している。被写体確率算出部311およびメモ
リ312以外については、第8の実施の形態と同様の処
理が実行されるので、その説明は省略する。
The subject area detecting section 301 replaces the subject probability calculating section 203 with the subject probability calculating section 31.
1 and a new memory 312 are provided, and the configuration is basically the same as that described with reference to FIG. Except for the subject probability calculation unit 311 and the memory 312, the same processing as that of the eighth embodiment is executed, and the description is omitted.

【0201】メモリ132には、背景差分算出部202
で算出された2値画像の画素値B(i,j)が供給さ
れ、保存される。メモリ312は、被写体確率算出部3
11が実行する処理に合わせたタイミングで、保存して
いる2値画像の画素値B(i,j)を被写体確率算出部
311に出力するか、もしくは、被写体確率算出部31
1によって2値画像の画素値B(i,j)を読み出され
る。
The memory 132 has a background difference calculation unit 202
The pixel value B (i, j) of the binary image calculated in is supplied and stored. The memory 312 stores the subject probability calculation unit 3
The pixel value B (i, j) of the stored binary image is output to the subject probability calculation unit 311 at a timing corresponding to the processing executed by the subject probability calculation unit 31 or the subject probability calculation unit 31
The pixel value B (i, j) of the binary image is read by 1.

【0202】被写体確率算出部311は、メモリ312
から必要な情報の入力を受け、もしくは、必要な情報を
読み出し、次の式(58)に示されるような非線形平滑
化処理を施して、多値画像M(i,j)を生成する。
The subject probability calculating section 311 has a memory 312
, Or necessary information is read out, and a non-linear smoothing process as shown in the following equation (58) is performed to generate a multi-valued image M (i, j).

【数52】 ・・・(58)(Equation 52) ... (58)

【0203】ここで、C’は予め定められた定数であ
り、被写体である確率Pobj(i,j)の値の精度を
定めるものである。また、dminは、図19に示され
るように、対応する座標の近傍においてB(i’,
j’)=1である最も近い画素(i’,j’)までの距
離であり、次の式(59)および式(60)によって算
出される。
Here, C ′ is a predetermined constant, which determines the accuracy of the value of the probability Pobj (i, j) of the subject. Also, dmin is, as shown in FIG. 19, B (i ′,
j ′) = 1 is the distance to the nearest pixel (i ′, j ′), and is calculated by the following equations (59) and (60).

【数53】 ・・・(59)(Equation 53) ... (59)

【数54】 ・・・(60) ここで、係数Dは、dminが取り得る最大の値として
予め設定された値である。
(Equation 54) (60) Here, the coefficient D is a value preset as the maximum value that dmin can take.

【0204】式(58)によって生成された多値画像M
(i,j)は、次の式(61)によって正規化され、被
写体確率Pobj(i,j)としてメモリ204に出力
される。 Pobj(i,j)=M(i,j)/C’・・・(61)
The multi-valued image M generated by equation (58)
(I, j) is normalized by the following equation (61), and is output to the memory 204 as the subject probability Pobj (i, j). Pobj (i, j) = M (i, j) / C ′ (61)

【0205】その他の処理については、第8の実施の形
態を用いて説明した場合と同じであるので、その説明は
省略する。
Other processes are the same as those described with reference to the eighth embodiment, and a description thereof will not be repeated.

【0206】なお、第9の実施の形態においては、背景
情報の抽出方法、および被写体確率Pobj(i,j)
の算出方法は、第6の実施の形態乃至第8の実施の形態
において説明したいずれの方法を用いても良い。
In the ninth embodiment, the background information extraction method and the subject probability Pobj (i, j)
Any of the methods described in the sixth to eighth embodiments may be used as the calculation method.

【0207】以上説明した第1乃至第9の実施の形態に
おいて、背景情報抽出モードと被写体抽出モードとで実
行されている処理は、それぞれ異なる組み合わせにより
実行するようにしても良いことは言うまでもない。
In the first to ninth embodiments described above, it goes without saying that the processes executed in the background information extraction mode and the subject extraction mode may be executed in different combinations.

【0208】また、以上説明した全ての処理において
は、背景情報抽出モードにおいて、背景画像を複数枚撮
像して、背景情報を抽出するものとして説明したが、背
景画像を1枚だけ撮像して、その背景画像の各座標の画
素値を用いるようにすることにより、背景情報抽出モー
ドの処理を簡略化するようにしても良い。
In all the processing described above, a plurality of background images are captured in the background information extraction mode to extract background information. However, only one background image is captured. The processing in the background information extraction mode may be simplified by using the pixel value of each coordinate of the background image.

【0209】上述した一連の処理は、ソフトウェアによ
り実行することもできる。そのソフトウェアは、そのソ
フトウェアを構成するプログラムが、専用のハードウェ
アに組み込まれているコンピュータ、または、各種のプ
ログラムをインストールすることで、各種の機能を実行
することが可能な、例えば汎用のパーソナルコンピュー
タなどに、記録媒体からインストールされる。
[0209] The above-described series of processing can be executed by software. The software is a computer in which a program constituting the software is built in dedicated hardware, or a general-purpose personal computer that can execute various functions by installing various programs. For example, it is installed from a recording medium.

【0210】この記録媒体は、図1などに示すように、
コンピュータとは別に、ユーザにプログラムを提供する
ために配布される、プログラムが記録されている磁気デ
ィスク31(フロッピー(登録商標)ディスクを含
む)、光ディスク32(CD-ROM(Compact Disk-Read On
ly Memory),DVD(Digital Versatile Disk)を含む)、
光磁気ディスク33(MD(Mini-Disk)を含む)、もし
くは半導体メモリ34などよりなるパッケージメディア
などにより構成される。
As shown in FIG. 1 and the like, this recording medium
Apart from the computer, a magnetic disk 31 (including a floppy (registered trademark) disk) on which the program is recorded and an optical disk 32 (CD-ROM (Compact Disk-Read On) which are distributed to provide the program to the user.
ly Memory), DVD (including Digital Versatile Disk)),
It is composed of a magneto-optical disk 33 (including an MD (Mini-Disk)) or a package medium including a semiconductor memory 34 or the like.

【0211】また、本明細書において、記録媒体に記録
されるプログラムを記述するステップは、記載された順
序に沿って時系列的に行われる処理はもちろん、必ずし
も時系列的に処理されなくとも、並列的あるいは個別に
実行される処理をも含むものである。
[0211] In this specification, a step of describing a program recorded on a recording medium may be performed in a chronological order according to the described order. This also includes processing executed in parallel or individually.

【0212】[0212]

【発明の効果】本発明の画像処理装置および画像処理方
法、並びにプログラムによれば、撮像された画像データ
の入力を受け、入力された背景領域のみからなる背景画
像と、背景領域および被写体領域からなる対象画像との
差分を算出し、算出された背景画像と対象画像との差分
を基に、対象画像から、被写体領域の候補領域を分割
し、対象画像の各画素が、被写体領域に含まれている確
率を算出し、算出された確率を基に、分割された被写体
領域の候補領域を補正し、算出された確率、および所定
の画素の近傍領域内の画素の相関から、所定の画素が被
写体に含まれる画素であるか否かを判断することによ
り、補正された被写体領域の候補領域を更に補正するよ
うにしたので、背景差分法の簡便さを利用しつつ、注目
画素の近傍の画素の情報を用いて補正を行うことによ
り、例えば、被写体の一部に背景と近い値を持つ画素が
含まれていた場合においても、正確に被写体領域を抽出
することができる。
According to the image processing apparatus, the image processing method, and the program of the present invention, a captured image data is input, and a background image consisting only of the input background region, and a background image and a subject region are input. Is calculated, and based on the calculated difference between the background image and the target image, the candidate region of the subject region is divided from the target image, and each pixel of the target image is included in the subject region. Is calculated, and based on the calculated probability, the candidate region of the divided subject region is corrected.From the calculated probability and the correlation of the pixels in the vicinity of the predetermined pixel, the predetermined pixel is calculated. By judging whether or not the pixel is included in the subject, the corrected candidate region of the subject region is further corrected. Feelings By performing correction using, for example, even if it contains a pixel having a background value close to the part of the subject can be extracted accurately subject area.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明を適応した画像処理装置の構成を示すブ
ロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図2】図1の背景情報抽出部の更に詳細な構成を示す
ブロック図である。
FIG. 2 is a block diagram illustrating a more detailed configuration of a background information extraction unit in FIG. 1;

【図3】図1の被写体候補検出部の更に詳細な構成を示
すブロック図である。
FIG. 3 is a block diagram illustrating a more detailed configuration of a subject candidate detection unit in FIG. 1;

【図4】図1の被写体判定部の更に詳細な構成を示すブ
ロック図である。
FIG. 4 is a block diagram illustrating a more detailed configuration of a subject determination unit in FIG. 1;

【図5】本発明を適応した画像処理装置の構成を示すブ
ロック図である。
FIG. 5 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図6】図5の背景情報抽出部の更に詳細な構成を示す
ブロック図である。
FIG. 6 is a block diagram illustrating a more detailed configuration of a background information extraction unit in FIG. 5;

【図7】本発明を適応した画像処理装置の構成を示すブ
ロック図である。
FIG. 7 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図8】被写体領域以外の部分として選択する領域の例
について説明するための図である。
FIG. 8 is a diagram for describing an example of an area selected as a part other than a subject area.

【図9】本発明を適応した画像処理装置の構成を示すブ
ロック図である。
FIG. 9 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図10】図9の被写体判定部の更に詳細な構成を示す
ブロック図である。
FIG. 10 is a block diagram illustrating a more detailed configuration of a subject determination unit in FIG. 9;

【図11】本発明を適応した画像処理装置の構成を示す
ブロック図である。
FIG. 11 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図12】被写体確率の設定例について説明するための
ブロック図である。
FIG. 12 is a block diagram for explaining an example of setting a subject probability.

【図13】図11の背景補正部の更に詳細な構成を示す
ブロック図である。
13 is a block diagram illustrating a more detailed configuration of the background correction unit in FIG.

【図14】本発明を適応した画像処理装置の構成を示す
ブロック図である。
FIG. 14 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図15】平滑化の例について説明するための図であ
る。
FIG. 15 is a diagram for describing an example of smoothing.

【図16】本発明を適応した画像処理装置の構成を示す
ブロック図である。
FIG. 16 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図17】図16の背景補正部の更に詳細な構成を示す
ブロック図である。
FIG. 17 is a block diagram illustrating a more detailed configuration of a background correction unit in FIG. 16;

【図18】本発明を適応した画像処理装置の構成を示す
ブロック図である。
FIG. 18 is a block diagram illustrating a configuration of an image processing apparatus to which the present invention has been applied.

【図19】非線形平滑化処理について説明するための図
である。
FIG. 19 is a diagram illustrating a non-linear smoothing process.

【図20】2値画像と被写体確率の関係について説明す
るための図である。
FIG. 20 is a diagram for describing a relationship between a binary image and a subject probability.

【符号の説明】[Explanation of symbols]

1 画像処理装置, 11 撮像部, 12 被写体領
域検出部, 13 制御部, 21 スイッチ, 22
背景情報抽出部, 23 メモリ, 24被写体候補
検出部, 25 被写体判定部, 41 最大値画像生
成部, 42最小値画像生成部, 43 平均値画像生
成部, 51 閾値算出部, 522値化処理部, 6
1 背景条件確率検出部, 62 ヒストグラム生成
部,63 被写体条件確率検出部, 64 多値マスク
生成部, 65 被写体/背景確率検出部, 66 ベ
イズ推定演算部, 67 論理和演算部, 71画像処
理装置, 81 被写体領域検出部, 91 背景情報
抽出部, 101偏差画像生成部, 111 画像処理
装置, 121 被写体領域検出部,131 補正係数
算出部, 132 メモリ, 133 画素値補正部,
141 画像処理装置, 151 被写体領域検出
部, 161 被写体判定部,171乃至173 メモ
リ, 181 画像処理装置, 191 被写体領域検
出部, 201 背景情報抽出部, 202 背景差分
算出部, 203 被写体確率算出部, 204,20
5 メモリ, 206 背景補正部, 211背景距離
算出部, 212 前画像距離算出部, 213 重み
算出部, 214 被写体距離算出部, 215 補正
部, 221 画像処理装置, 231被写体領域検出
部, 241 被写体確率算出部, 242 メモリ,
251 画像処理装置, 261 被写体領域検出
部, 271 メモリ, 272背景補正部, 281
被写体距離算出部, 291 画像処理装置, 30
1 被写体領域検出部, 311 被写体確率算出部,
312 メモリ
DESCRIPTION OF SYMBOLS 1 Image processing apparatus, 11 imaging part, 12 subject area detection part, 13 control part, 21 switch, 22
Background information extraction section, 23 memory, 24 subject candidate detection section, 25 subject determination section, 41 maximum value image generation section, 42 minimum value image generation section, 43 average value image generation section, 51 threshold value calculation section, 522 value processing section , 6
1 background condition probability detection section, 62 histogram generation section, 63 subject condition probability detection section, 64 multi-value mask generation section, 65 subject / background probability detection section, 66 Bayes estimation calculation section, 67 logical sum calculation section, 71 image processing device , 81 subject area detecting section, 91 background information extracting section, 101 deviation image generating section, 111 image processing apparatus, 121 subject area detecting section, 131 correction coefficient calculating section, 132 memory, 133 pixel value correcting section,
141 image processing device, 151 subject region detection unit, 161 subject determination unit, 171 to 173 memory, 181 image processing device, 191 subject region detection unit, 201 background information extraction unit, 202 background difference calculation unit, 203 subject probability calculation unit, 204, 20
5 memory, 206 background correction unit, 211 background distance calculation unit, 212 previous image distance calculation unit, 213 weight calculation unit, 214 subject distance calculation unit, 215 correction unit, 221 image processing device, 231 subject area detection unit, 241 subject probability Calculator, 242 memory,
251 image processing device, 261 subject area detection unit, 271 memory, 272 background correction unit, 281
Subject distance calculation unit, 291 image processing device, 30
1 subject area detecting section, 311 subject probability calculating section,
312 memory

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 撮像された画像データの入力を受ける入
力手段と、 前記入力手段により入力された背景領域のみからなる背
景画像と、前記入力手段により入力された前記背景領域
および被写体領域からなる対象画像との差分を算出する
画像差分算出手段と、 前記画像差分算出手段により算出された前記背景画像と
前記対象画像との差分を基に、前記対象画像から、前記
被写体領域の候補領域を分割する分割手段と、 前記対象画像の各画素が、前記被写体領域に含まれてい
る第1の確率を算出する確率算出手段と、 前記確率算出手段により算出された前記第1の確率を基
に、前記分割手段により分割された前記被写体領域の候
補領域を補正する第1の補正手段と、 前記確率算出手段により算出された前記第1の確率、お
よび所定の画素の近傍領域内の画素の相関から、前記所
定の画素が前記被写体に含まれる画素であるか否かを判
断することにより、前記第1の補正手段により補正され
た前記被写体領域の候補領域を更に補正する第2の補正
手段とを備えることを特徴とする画像処理装置。
1. An input means for receiving input of imaged image data, a background image consisting only of a background area inputted by the input means, and an object consisting of the background area and the subject area inputted by the input means Image difference calculating means for calculating a difference from an image; and dividing the candidate area of the subject area from the target image based on a difference between the background image and the target image calculated by the image difference calculating means. A dividing unit, a probability calculating unit that calculates a first probability that each pixel of the target image is included in the subject area, and the first probability calculated by the probability calculating unit, based on the first probability. First correcting means for correcting the candidate area of the subject area divided by the dividing means, the first probability calculated by the probability calculating means, and the vicinity of a predetermined pixel Determining whether or not the predetermined pixel is a pixel included in the subject from the correlation of the pixels in the area, thereby further correcting the candidate area of the subject area corrected by the first correction unit; An image processing apparatus comprising: a second correction unit.
【請求項2】 前記確率算出手段は、ベイズ推定を用い
て前記第1の確率を算出することを特徴とする請求項1
に記載の画像処理装置。
2. The apparatus according to claim 1, wherein said probability calculating means calculates said first probability using Bayesian estimation.
An image processing apparatus according to claim 1.
【請求項3】 前記確率算出手段は、座標毎に設定され
た重み付け係数に基づいて、前記第1の確率を算出する
ことを特徴とする請求項1に記載の画像処理装置。
3. The image processing apparatus according to claim 1, wherein the probability calculation unit calculates the first probability based on a weighting factor set for each coordinate.
【請求項4】 前記確率算出手段は、前記分割手段によ
る分割結果を基に、前記被写体領域の候補領域と前記背
景領域の候補領域の分布にたいして平滑化処理を行うこ
とにより、前記第1の確率を算出することを特徴とする
請求項1に記載の画像処理装置。
4. The first probability calculating means performs a smoothing process on a distribution of a candidate area of the subject area and a distribution of a candidate area of the background area based on a result of the division by the dividing means. The image processing apparatus according to claim 1, wherein is calculated.
【請求項5】 前記平滑化処理は、非線形平滑化処理で
あることを特徴とする請求項4に記載の画像処理装置。
5. The image processing apparatus according to claim 4, wherein the smoothing process is a nonlinear smoothing process.
【請求項6】 前記第2の補正手段は、前記第1の補正
手段により補正された結果、前記被写体領域の候補領域
ではないと判定された領域についてのみ、前記所定の画
素の近傍領域内の画素の相関を基に補正を行うことを特
徴とする請求項1に記載の画像処理装置。
6. The method according to claim 1, wherein the second correction unit corrects only an area determined as not being a candidate area of the subject area as a result of the correction by the first correction unit, in an area adjacent to the predetermined pixel. The image processing apparatus according to claim 1, wherein the correction is performed based on pixel correlation.
【請求項7】 前記第2の補正手段は、前記確率算出手
段により算出された前記第1の確率、および前記所定の
画素の近傍領域内の画素の相関を基に、前記所定の画素
に対して、前記背景領域である確率を示す第2の確率と
前記被写体領域である確率を示す第3の確率を算出し、
前記第2の確率が前記第3の確率より小さい場合、前記
所定の画素を前記被写体領域に含まれる画素であると判
断することを特徴とする請求項1に記載の画像処理装
置。
7. The method according to claim 6, wherein the second correction unit is configured to calculate the first probability based on the first probability calculated by the probability calculation unit and a correlation between pixels in an area near the predetermined pixel. Calculating a second probability indicating the probability of being the background area and a third probability indicating the probability of being the subject area;
The image processing apparatus according to claim 1, wherein when the second probability is smaller than the third probability, the predetermined pixel is determined to be a pixel included in the subject area.
【請求項8】 前記第2の確率は、前記対象画像の対応
する座標の画素値と前記背景画像の対応する座標の画素
値との差が小さいほど大きな値を取ることを特徴とする
請求項7に記載の画像処理装置。
8. The method according to claim 1, wherein the second probability takes a larger value as the difference between the pixel value of the corresponding coordinate of the target image and the pixel value of the corresponding coordinate of the background image is smaller. 8. The image processing device according to 7.
【請求項9】 前記第3の確率は、前記近傍領域内にお
いて、前記所定の画素以外で前記第1の確率が高い画素
の画素値を、前記第1の確率で重み付け平均した値を利
用して算出されることを特徴とする請求項7に記載の画
像処理装置。
9. The third probability uses a value obtained by weighting and averaging a pixel value of a pixel having a high first probability except for the predetermined pixel in the neighboring region. The image processing apparatus according to claim 7, wherein the calculation is performed by:
【請求項10】 前記入力手段により入力された前記画
像データが色情報を含む場合、前記画像差分算出手段
は、前記背景画像と前記対象画像との差分を前記色情報
の成分毎に算出することを特徴とする請求項1に記載の
画像処理装置。
10. When the image data input by the input unit includes color information, the image difference calculation unit calculates a difference between the background image and the target image for each component of the color information. The image processing apparatus according to claim 1, wherein:
【請求項11】 前記入力手段により入力された前記画
像データが色情報を含む場合、前記第2の補正手段は、
前記第2の確率および前記第3の確率を、前記色情報の
成分毎に算出することを特徴とする請求項7に記載の画
像処理装置。
11. When the image data input by the input unit includes color information, the second correction unit includes:
The image processing apparatus according to claim 7, wherein the second probability and the third probability are calculated for each component of the color information.
【請求項12】 撮像された画像データの入力を制御す
る入力制御ステップと、 前記入力制御ステップの処理により入力が制御された背
景領域のみからなる背景画像と、前記入力制御ステップ
の処理により入力が制御された前記背景領域および被写
体領域からなる対象画像との差分を算出する画像差分算
出ステップと、 前記画像差分算出ステップの処理により算出された前記
背景画像と前記対象画像との差分を基に、前記対象画像
から、前記被写体領域の候補領域を分割する分割ステッ
プと、 前記対象画像の各画素が、前記被写体領域に含まれてい
る確率を算出する確率算出ステップと、 前記確率算出ステップの処理により算出された前記確率
を基に、前記分割ステップの処理により分割された前記
被写体領域の候補領域を補正する第1の補正ステップ
と、 前記確率算出ステップの処理により算出された前記確
率、および所定の画素の近傍領域内の画素の相関から、
前記所定の画素が前記被写体に含まれる画素であるか否
かを判断することにより、前記第1の補正ステップの処
理により補正された前記被写体領域の候補領域を更に補
正する第2の補正ステップとを含むことを特徴とする画
像処理方法。
12. An input control step of controlling input of captured image data; a background image consisting only of a background area whose input is controlled by the processing of the input control step; and an input by the processing of the input control step. An image difference calculating step of calculating a difference between the controlled background image and a target image including the subject area, based on a difference between the background image and the target image calculated by the processing of the image difference calculating step, A dividing step of dividing the candidate region of the subject region from the target image; a probability calculating step of calculating a probability that each pixel of the target image is included in the subject region; and a process of the probability calculating step. A first correcting unit that corrects the candidate area of the subject area divided by the processing of the dividing step based on the calculated probability. A positive step, the probability calculated by the process at the probability calculating step, and from the correlation of the pixels in the vicinity area of a given pixel,
A second correction step of further correcting the candidate area of the subject area corrected by the processing of the first correction step by determining whether the predetermined pixel is a pixel included in the subject; An image processing method comprising:
【請求項13】 撮像された画像データの入力を制御す
る入力制御ステップと、 前記入力制御ステップの処理により入力が制御された背
景領域のみからなる背景画像と、前記入力制御ステップ
の処理により入力が制御された前記背景領域および被写
体領域からなる対象画像との差分を算出する画像差分算
出ステップと、 前記画像差分算出ステップの処理により算出された前記
背景画像と前記対象画像との差分を基に、前記対象画像
から、前記被写体領域の候補領域を分割する分割ステッ
プと、 前記対象画像の各画素が、前記被写体領域に含まれてい
る確率を算出する確率算出ステップと、 前記確率算出ステップの処理により算出された前記確率
を基に、前記分割ステップの処理により分割された前記
被写体領域の候補領域を補正する第1の補正ステップ
と、 前記確率算出ステップの処理により算出された前記確
率、および所定の画素の近傍領域内の画素の相関から、
前記所定の画素が前記被写体に含まれる画素であるか否
かを判断することにより、前記第1の補正ステップの処
理により補正された前記被写体領域の候補領域を更に補
正する第2の補正ステップとを含むことを特徴とするコ
ンピュータが読み取り可能なプログラムが記録されてい
る記録媒体。
13. An input control step of controlling input of captured image data; a background image consisting only of a background area whose input is controlled by the processing of the input control step; and an input by the processing of the input control step. An image difference calculating step of calculating a difference between the controlled background image and a target image including the subject area, based on a difference between the background image and the target image calculated by the processing of the image difference calculating step, A dividing step of dividing the candidate region of the subject region from the target image; a probability calculating step of calculating a probability that each pixel of the target image is included in the subject region; and a process of the probability calculating step. A first correcting unit that corrects the candidate area of the subject area divided by the processing of the dividing step based on the calculated probability. A positive step, the probability calculated by the process at the probability calculating step, and from the correlation of the pixels in the vicinity area of a given pixel,
A second correction step of further correcting the candidate area of the subject area corrected by the processing of the first correction step by determining whether the predetermined pixel is a pixel included in the subject; A recording medium on which a computer-readable program is recorded.
【請求項14】 撮像された画像データの入力を制御す
る入力制御ステップと、 前記入力制御ステップの処理により入力が制御された背
景領域のみからなる背景画像と、前記入力制御ステップ
の処理により入力が制御された前記背景領域および被写
体領域からなる対象画像との差分を算出する画像差分算
出ステップと、 前記画像差分算出ステップの処理により算出された前記
背景画像と前記対象画像との差分を基に、前記対象画像
から、前記被写体領域の候補領域を分割する分割ステッ
プと、 前記対象画像の各画素が、前記被写体領域に含まれてい
る確率を算出する確率算出ステップと、 前記確率算出ステップの処理により算出された前記確率
を基に、前記分割ステップの処理により分割された前記
被写体領域の候補領域を補正する第1の補正ステップ
と、 前記確率算出ステップの処理により算出された前記確
率、および所定の画素の近傍領域内の画素の相関から、
前記所定の画素が前記被写体に含まれる画素であるか否
かを判断することにより、前記第1の補正ステップの処
理により補正された前記被写体領域の候補領域を更に補
正する第2の補正ステップとを含む処理をコンピュータ
に実行させることを特徴とするプログラム。
14. An input control step of controlling input of captured image data; a background image consisting only of a background area whose input is controlled by the processing of the input control step; and an input by the processing of the input control step. An image difference calculating step of calculating a difference between the controlled background image and a target image including the subject area, based on a difference between the background image and the target image calculated by the processing of the image difference calculating step, A dividing step of dividing the candidate region of the subject region from the target image; a probability calculating step of calculating a probability that each pixel of the target image is included in the subject region; and a process of the probability calculating step. A first correcting unit that corrects the candidate area of the subject area divided by the processing of the dividing step based on the calculated probability. A positive step, the probability calculated by the process at the probability calculating step, and from the correlation of the pixels in the vicinity area of a given pixel,
A second correction step of further correcting the candidate area of the subject area corrected by the processing of the first correction step by determining whether the predetermined pixel is a pixel included in the subject; A program causing a computer to execute a process including:
JP2001115638A 2001-04-13 2001-04-13 Image processing apparatus, image processing method, recording medium, and program Expired - Fee Related JP4622141B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001115638A JP4622141B2 (en) 2001-04-13 2001-04-13 Image processing apparatus, image processing method, recording medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001115638A JP4622141B2 (en) 2001-04-13 2001-04-13 Image processing apparatus, image processing method, recording medium, and program

Publications (3)

Publication Number Publication Date
JP2002312787A true JP2002312787A (en) 2002-10-25
JP2002312787A5 JP2002312787A5 (en) 2008-04-10
JP4622141B2 JP4622141B2 (en) 2011-02-02

Family

ID=18966505

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001115638A Expired - Fee Related JP4622141B2 (en) 2001-04-13 2001-04-13 Image processing apparatus, image processing method, recording medium, and program

Country Status (1)

Country Link
JP (1) JP4622141B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008072669A1 (en) * 2006-12-14 2008-06-19 Panasonic Corporation Dynamic image encoding method, dynamic image encoding device, dynamic image recording method, recording medium, dynamic image reproducing method, dynamic image reproducing device, and dynamic image reproducing system
JP2009525636A (en) * 2006-01-30 2009-07-09 マイクロソフト コーポレーション Bayesian demosaicing method using two-color image
JP2012003358A (en) * 2010-06-15 2012-01-05 Yahoo Japan Corp Background determination device, method, and program
JP2012234494A (en) * 2011-05-09 2012-11-29 Canon Inc Image processing apparatus, image processing method, and program
JP2012238175A (en) * 2011-05-11 2012-12-06 Canon Inc Information processing device, information processing method, and program
JP2015165433A (en) * 2015-06-11 2015-09-17 キヤノン株式会社 Information processing device, information processing method, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844874A (en) * 1994-07-27 1996-02-16 Toshiba Corp Image change detector
JPH0844844A (en) * 1994-07-26 1996-02-16 Mitsubishi Electric Corp Object detector
JPH10111942A (en) * 1996-10-04 1998-04-28 Nippon Hoso Kyokai <Nhk> Moving image area dividing device
JPH10320566A (en) * 1997-05-19 1998-12-04 Canon Inc Picture processor, picture processing method, and storage medium storing the same method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844844A (en) * 1994-07-26 1996-02-16 Mitsubishi Electric Corp Object detector
JPH0844874A (en) * 1994-07-27 1996-02-16 Toshiba Corp Image change detector
JPH10111942A (en) * 1996-10-04 1998-04-28 Nippon Hoso Kyokai <Nhk> Moving image area dividing device
JPH10320566A (en) * 1997-05-19 1998-12-04 Canon Inc Picture processor, picture processing method, and storage medium storing the same method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009525636A (en) * 2006-01-30 2009-07-09 マイクロソフト コーポレーション Bayesian demosaicing method using two-color image
US8023804B2 (en) 2006-12-14 2011-09-20 Panasonic Corporation Moving image coding method, moving image coding device, moving image recording method, recording medium, moving image playback method, moving image playback device, and moving image playback system
JP2011097612A (en) * 2006-12-14 2011-05-12 Panasonic Corp Moving image coding method, moving image coding device, moving image recording method, moving image playback method, and moving image playback apparatus
JP2011103669A (en) * 2006-12-14 2011-05-26 Panasonic Corp Dynamic image encoding method, dynamic image encoding device, dynamic image recording method, dynamic image reproducing method, and dynamic image reproducing system
US7974521B2 (en) 2006-12-14 2011-07-05 Panasonic Corporation Moving image coding method, moving image coding device, moving image recording method, recording medium, moving image playback method, moving image playback device, and moving image playback system
JP4718616B2 (en) * 2006-12-14 2011-07-06 パナソニック株式会社 Moving picture coding method, moving picture coding apparatus, moving picture recording method, moving picture reproduction method, and moving picture reproduction apparatus
WO2008072669A1 (en) * 2006-12-14 2008-06-19 Panasonic Corporation Dynamic image encoding method, dynamic image encoding device, dynamic image recording method, recording medium, dynamic image reproducing method, dynamic image reproducing device, and dynamic image reproducing system
RU2475997C2 (en) * 2006-12-14 2013-02-20 Панасоник Корпорэйшн Method to code moving image, device to code moving image, method to record moving image, record medium, method to reproduce moving image, device to reproduce moving image, and system to reproduce moving image
US8526797B2 (en) 2006-12-14 2013-09-03 Panasonic Corporation Moving image coding method, moving image coding device, moving image recording method, recording medium, moving image playback method, moving image playback device, and moving image playback system
JP2012003358A (en) * 2010-06-15 2012-01-05 Yahoo Japan Corp Background determination device, method, and program
JP2012234494A (en) * 2011-05-09 2012-11-29 Canon Inc Image processing apparatus, image processing method, and program
JP2012238175A (en) * 2011-05-11 2012-12-06 Canon Inc Information processing device, information processing method, and program
JP2015165433A (en) * 2015-06-11 2015-09-17 キヤノン株式会社 Information processing device, information processing method, and program

Also Published As

Publication number Publication date
JP4622141B2 (en) 2011-02-02

Similar Documents

Publication Publication Date Title
JP6501092B2 (en) Image processing apparatus and method for foreground mask correction for object segmentation
US9317772B2 (en) Method for improving tracking using dynamic background compensation with centroid compensation
US8508605B2 (en) Method and apparatus for image stabilization
US9674441B2 (en) Image processing apparatus, image processing method, and storage medium
KR20150117646A (en) Method and apparatus for image enhancement and edge verification using at least one additional image
JP7272024B2 (en) Object tracking device, monitoring system and object tracking method
JP2009522591A (en) Method and apparatus for controlling autofocus of a video camera by tracking a region of interest
EP2591460A1 (en) Method, apparatus and computer program product for providing object tracking using template switching and feature adaptation
US9609233B2 (en) Method and system for luminance adjustment of images in an image sequence
US20100208140A1 (en) Image processing apparatus, image processing method and storage medium storing image processing program
CN112883940A (en) Silent in-vivo detection method, silent in-vivo detection device, computer equipment and storage medium
JP2008259161A (en) Target tracing device
JP2002312787A (en) Image processor, image processing method, recording medium and program
JP4631199B2 (en) Image processing apparatus, image processing method, recording medium, and program
JP4192719B2 (en) Image processing apparatus and method, and program
CN112288780A (en) Multi-feature dynamically weighted target tracking algorithm
JP4622140B2 (en) Image processing apparatus, image processing method, recording medium, and program
US10346680B2 (en) Imaging apparatus and control method for determining a posture of an object
JP2018160024A (en) Image processing device, image processing method and program
JP6378496B2 (en) Image processing apparatus, control method, and recording medium
JP4631198B2 (en) Image processing apparatus, image processing method, recording medium, and program
JP5470529B2 (en) Motion detection device, motion detection method, and motion detection program
AU2009230796A1 (en) Location-based brightness transfer function
KR20190102736A (en) Method and Apparatus for Video Denoising Considering Moving Object
Gurrala et al. Enhancing Safety and Security: Face Tracking and Detection in Dehazed Video Frames Using KLT and Viola-Jones Algorithms.

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080225

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080225

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100803

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100915

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101005

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101018

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

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees