JP2003168117A - Device and method of image processing, computer program and computer readable storage medium - Google Patents

Device and method of image processing, computer program and computer readable storage medium

Info

Publication number
JP2003168117A
JP2003168117A JP2001368995A JP2001368995A JP2003168117A JP 2003168117 A JP2003168117 A JP 2003168117A JP 2001368995 A JP2001368995 A JP 2001368995A JP 2001368995 A JP2001368995 A JP 2001368995A JP 2003168117 A JP2003168117 A JP 2003168117A
Authority
JP
Japan
Prior art keywords
image
background
background image
unit
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2001368995A
Other languages
Japanese (ja)
Inventor
Ryotaro Wakae
亮太郎 若江
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2001368995A priority Critical patent/JP2003168117A/en
Priority to US10/293,432 priority patent/US7162101B2/en
Publication of JP2003168117A publication Critical patent/JP2003168117A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To enable discrimination of an object entering an image pickup range of an image pickup means from background with high accuracy while focusing on the object. <P>SOLUTION: An object detection part 104 acquires an image focused on the background from an image pickup part 102 by controlling a focus lens control part 103. In addition, a plurality of background images the focal points of which are gradually shifted in front are also acquired and stored by associating them with positions of the focal points. When the focal point is changed due to a fact that an object is positioned in a photographic visual field, a background image corresponding to a position of the changed focal point is selected. Then, pixels in which difference between the selected background image and an image being photographed exceeds a threshold are determined as pixels of the object. then, this decision result and the image being photographed are outputted to an image encoding part 105 and encoded there. <P>COPYRIGHT: (C)2003,JPO

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 method and apparatus and a storage medium, and more particularly to an image processing method and apparatus for detecting an object in a moving image, a computer program for executing the method, and a computer program storing the computer program. The present invention relates to a computer-readable storage medium.

【0002】[0002]

【従来の技術】動画像処理における対象物検出方法とし
て、背景差分方式という手法が知られている。これは、
予め撮影した背景画像と実際の入力画像とを比較するこ
とにより、変化点を検出するものである。以下、簡単に
その原理を説明する。画像平面上の座標(x,y)にお
ける点の入力画像の画素値をPc(x,y)、背景画像
の画素値をPb(x,y)とする。このとき、Pc
(x,y)とPb(x,y)との差分をとり、その絶対
値をある閾値Thと比較する。
2. Description of the Related Art As a method of detecting an object in moving image processing, a method called a background subtraction method is known. this is,
The change point is detected by comparing the background image captured in advance with the actual input image. The principle will be briefly described below. The pixel value of the input image of the point at the coordinates (x, y) on the image plane is Pc (x, y), and the pixel value of the background image is Pb (x, y). At this time, Pc
The difference between (x, y) and Pb (x, y) is calculated, and the absolute value is compared with a certain threshold Th.

【0003】判定式の例を示すと次の通りである。 |Pc(x,y)−Pb(x,y)| ≦ Th … (1) 上記式(1)において差分絶対値が閾値Th以下なら、
PcとPbとの差が小さいことを意味することになるか
ら、Pcは背景と判定される。また、差分絶対値が閾値
Thを超えている場合は、検出対象とみなされる。画面
上のすべての点において、上記の判定を行うことで、1
フレーム分の検出が完了する。
An example of the judgment formula is as follows. | Pc (x, y) −Pb (x, y) | ≦ Th (1) If the absolute difference value is equal to or smaller than the threshold value Th in the above formula (1),
Since it means that the difference between Pc and Pb is small, Pc is determined to be the background. If the absolute difference value exceeds the threshold Th, it is regarded as a detection target. By making the above judgment at all points on the screen, 1
Detection of frames is completed.

【0004】これを更に表示画像の例で説明する。図1
1(a)は背景画像の一例であり、図11(b)は監視
中の撮像画像を示している。背景画像上のある点P1b
と、同じ位置の監視画面上の点P1cの値を比較する
と、差分絶対値は0もしくは0に近い値となるため、上
記式(1)が満足することになり、P1cの位置は背景
と判定される。
This will be further described with an example of a display image. Figure 1
1 (a) is an example of a background image, and FIG. 11 (b) shows a captured image being monitored. Some point P1b on the background image
And the value of the point P1c on the monitoring screen at the same position is compared, the absolute difference value becomes 0 or a value close to 0, so that the above equation (1) is satisfied, and the position of P1c is determined to be the background. To be done.

【0005】一方、別の点P2bとP2cを比較する
と、差分絶対値が大きくなるため背景ではない、すなわ
ち、対象物(オブジェクト)と判定される。
On the other hand, when the points P2b and P2c are compared with each other, it is determined that they are not the background because the difference absolute value is large, that is, they are objects.

【0006】対象物中にあると判断された画素を仮に
“1”、背景中にあると判断された画素を“0”と定義
し、撮影画像上のすべての点について行った結果が図1
1(c)である。図中黒で表されている部分が背景、白
で表される部分が対象物体を表している。
A pixel determined to be in the object is defined as "1", a pixel determined to be in the background is defined as "0", and the result obtained for all points on the photographed image is shown in FIG.
1 (c). In the figure, the black portion represents the background, and the white portion represents the target object.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、背景差
分方式には、背景となるシーンと、撮影するカメラにそ
れぞれ制約条件が必要となる。背景となるシーンの基本
的な条件としては、動くものを含んでいてはならない。
つまりPb(x,y)は時間に関わらず一定でなければ
ならない。実際には、背景となる範囲に動物体がない場
合でも、天候などの照明条件の変化は、背景の画素値が
変動する要因となる。また、カメラ側の条件としては、
対応点の位置ずれをおこさないよう、三脚等で撮影方向
が固定されている必要がある。さらに、フォーカス、絞
り、ホワイトバランスなどのカメラパラメータの変化も
対応点同士の差分を大きくする方向に働く。そのため、
背景撮影時と物体検出時のカメラパラメータは揃えてお
く必要がある。
However, the background subtraction method requires a constraint condition for each of the background scene and the shooting camera. The basic condition of the background scene must not include moving objects.
That is, Pb (x, y) must be constant regardless of time. Actually, even when there is no moving object in the background area, a change in lighting conditions such as the weather causes a change in the pixel value of the background. Also, as the condition on the camera side,
The shooting direction must be fixed with a tripod or the like so as not to shift the position of the corresponding points. Furthermore, changes in camera parameters such as focus, aperture, and white balance also tend to increase the difference between corresponding points. for that reason,
Camera parameters at the time of background shooting and at the time of object detection must be the same.

【0008】上記の条件は、実際の利用形態によって
は、実用に耐えられない厳しい制約となることもありう
る。例えば監視カメラ用途を考える際、監視対象領域が
屋内の場合は、背景に動物体を含まないように設定する
ことや照明条件を一定にすることは、それほど困難なこ
とではない。また、カメラ位置を固定することも実用上
の障害とはならない。ただし、カメラパラメータのう
ち、フォーカスに関しては、固定した際に、実用上の問
題を生じる。以下、図12を用いて詳しく説明する。
[0008] The above conditions may be severe constraints that cannot be put to practical use, depending on the actual usage. For example, when considering a surveillance camera application, when the surveillance target area is indoors, it is not so difficult to set the background so as not to include a moving object and to keep the illumination condition constant. Further, fixing the camera position does not become a practical obstacle. However, among the camera parameters, the focus causes a practical problem when fixed. Hereinafter, a detailed description will be given with reference to FIG.

【0009】現在多くのカメラがオートフォーカス機能
を有している。これは、カメラと対象物との距離に応じ
て自動的にピントあわせを行うものである。背景画像を
生成する際には、当然背景にフォーカスポイントが合っ
ているわけだが、監視時に進入物を検出すると、検出物
体の方にフォーカスポイントが合うため、背景のピント
はずれてしまう。図12(a)は、このときの様子を示
しており、人物にピントが合い、背景はボケた画像を表
している。このように実際の画像は、図11(b)で説
明したものとは異なり、背景部分同士の差分絶対値を計
算しても、大きな差が生じ、背景ではないと誤判定され
てしまう場合がある。
Currently, many cameras have an autofocus function. This is for automatically focusing according to the distance between the camera and the object. When the background image is generated, the focus point is naturally aligned with the background, but if an intruding object is detected during monitoring, the focus point is aligned with the detected object, so the background is out of focus. FIG. 12A shows the situation at this time, in which the person is in focus and the background represents a blurred image. As described above, the actual image is different from that described in FIG. 11B, and even if the absolute value of the difference between the background portions is calculated, a large difference occurs, and it may be erroneously determined not to be the background. is there.

【0010】逆に、オートフォーカスの機能を使わず
に、背景画像にピントを合わせたまま、フォーカスポイ
ントをロックして、差分を計算することも考えられる。
このときは、背景部分同士はほぼ同じ値となり、誤判定
を防ぐことはできる。しかしながら、対象物のほうには
ピントが合わないため、例えば人物の顔がボケてしまう
という別の問題を生じる。図12(b)は、このときの
画像を表している。監視対象物にピントが合っていなけ
れば、監視という本来の目的からは、逸脱したものとな
ってしまう。
Conversely, it is also possible to calculate the difference by locking the focus point while keeping the background image in focus without using the autofocus function.
At this time, the background portions have almost the same value, and erroneous determination can be prevented. However, since the object is out of focus, another problem occurs, for example, the face of a person is blurred. FIG. 12B shows the image at this time. If the object to be monitored is out of focus, it deviates from the original purpose of monitoring.

【0011】本発明は、かかる問題点に鑑みなされたも
のであり、撮像範囲内に進入するオブジェクトに焦点を
合わせながらも、高い精度で背景と識別可能な画像処理
方法及び装置、並びにその方法を実行するコンピュータ
プログラム及びそれを記憶するコンピュータ可読記憶媒
体を提供しようとするものである。
The present invention has been made in view of the above problems, and provides an image processing method and apparatus capable of discriminating a background with high accuracy while focusing on an object entering an imaging range, and a method thereof. It is intended to provide a computer program to be executed and a computer-readable storage medium storing the computer program.

【0012】[0012]

【課題を解決するための手段】この課題を解決するた
め、例えば本発明の画像処理装置は以下の構成を備え
る。すなわち、対象物体にフォーカスする機能を有する
撮像手段の撮像視野内にある対象物を示す情報を抽出す
る画像処理装置であって、前記撮像手段によって、予め
複数のフォーカスポイントによる背景画像を格納する格
納手段と、前記格納手段に格納された背景画像の1つを
選択する選択手段と、前記撮像手段で撮像して得られた
画像と前記選択手段で選択された背景画像との差分を検
出することで、前記撮像手段の撮影視野内の、背景以外
の対象物体の存在する位置を示す情報を抽出する抽出手
段とを備える。
In order to solve this problem, for example, an image processing apparatus of the present invention has the following configuration. That is, an image processing device for extracting information indicating an object within an imaging field of view of an imaging means having a function of focusing on a target object, wherein the imaging means stores a background image with a plurality of focus points in advance. Means, selecting means for selecting one of the background images stored in the storing means, and detecting a difference between the image obtained by the imaging means and the background image selected by the selecting means. Then, there is provided an extracting means for extracting information indicating a position where the target object other than the background exists within the field of view of the image capturing means.

【0013】[0013]

【発明の実施の形態】以下、添付図面を参照して本発明
の好適な実施の形態を詳細に説明する。
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

【0014】図1は実施形態における画像処理装置のブ
ロック構成図である。同図において、撮像部102は被
写体の光学像を電気信号に変換し、所定形式のビデオ信
号として出力する部分である。フォーカスレンズ制御部
103は、撮像画像のフォーカスが合うようにフォーカ
スレンズ101の制御を行う(フォーカスレンズ101
及び撮像部102で撮像手段を構成する)。撮像に必要
なレンズ群はフォーカスレンズ以外にもいくつかの種類
があるが、ここでは説明を省略する。撮像部から出力さ
れるビデオ信号は、物体検出部104の入力信号とな
る。物体検出部104は、背景画像の生成と選択、差分
処理等の機能を有する。また、物体検出部104は、フ
ォーカスレンズ制御部103との通信機能も備えてお
り、今現在の撮影条件(実施形態では焦点を示すパラメ
ータデータ)を受信し、それも検出処理に用いる。物体
検出部104の出力は撮像画像データと2値の検出結果
データ(背景かオブジェクトかを示すデータ)である。
物体検出部104の詳細は、後に説明する。
FIG. 1 is a block diagram of the image processing apparatus according to the embodiment. In the figure, an imaging unit 102 is a unit that converts an optical image of a subject into an electric signal and outputs it as a video signal of a predetermined format. The focus lens control unit 103 controls the focus lens 101 so that the captured image is in focus (focus lens 101
And the image pickup unit 102 constitutes an image pickup means). There are several types of lens groups required for imaging other than the focus lens, but description thereof is omitted here. The video signal output from the imaging unit becomes an input signal of the object detection unit 104. The object detection unit 104 has functions such as generation and selection of a background image and difference processing. The object detection unit 104 also has a communication function with the focus lens control unit 103, receives the current shooting condition (parameter data indicating the focus in the embodiment), and uses it also for the detection process. The output of the object detection unit 104 is captured image data and binary detection result data (data indicating whether it is a background or an object).
Details of the object detection unit 104 will be described later.

【0015】これらの出力データは画像符号化部105
で符号化することにより、帯域の狭い回線での通信や、
容量の少ない蓄積メディアへの記録が行える。動画像の
符号化技術で高い符号化効率を得られる方式としては、
国際標準規格のMPEG−4ビジュアル符号化がある。
These output data are output to the image coding unit 105.
By encoding with, communication on a line with a narrow band,
Recording on a storage medium with a small capacity is possible. As a method that can obtain high coding efficiency with moving image coding technology,
There is an international standard MPEG-4 visual coding.

【0016】図10は、この符号化方式のブロック図を
示すものである。輝度、色差の画像信号と符号化したい
物体の形状を表す形状信号の2種類を入力し、圧縮後の
ビットストリームを出力とする。符号化処理の詳細は既
知(例えば、三木弼一編著「MPEG−4のすべて」1
998)であるため、ここでの詳述は省略する。本発明
の検出技術と高能率の符号化技術の組み合わせにより、
高精度・高画質の監視システムを実現することができ
る。
FIG. 10 shows a block diagram of this encoding system. Two types of image signals of luminance and color difference and a shape signal representing the shape of an object to be encoded are input, and a compressed bit stream is output. The details of the encoding process are known (for example, "All about MPEG-4", edited by Shinichi Miki 1
998), detailed description thereof is omitted here. By the combination of the detection technology of the present invention and the highly efficient coding technology,
It is possible to realize a monitoring system with high accuracy and high image quality.

【0017】つぎに、物体検出部104における処理の
詳細を以下に3つの実施形態で説明する。
Next, details of the processing in the object detection unit 104 will be described below in three embodiments.

【0018】<第1の実施形態>本発明の第1の実施形
態について、図2乃至図5を用いて説明する。図2は第
1の実施形態における物体検出処理のブロック図、図3
は背景画像生成のフローチャート、図4は生成された背
景画像の例、図5は背景画像選択方法のフローチャート
である。
<First Embodiment> A first embodiment of the present invention will be described with reference to FIGS. 2 is a block diagram of the object detection processing according to the first embodiment, and FIG.
Is a flowchart of background image generation, FIG. 4 is an example of the generated background image, and FIG. 5 is a flowchart of the background image selection method.

【0019】まず背景生成の部分から説明する。図3の
ステップS301にて、フォーカスをオートに設定し、
撮像部から入ってくる背景画像のフォーカスポイントを
背景部分に合わせる。焦点が合ったところで、フォーカ
スレンズをその位置で固定する(ステップS302)。
そして、このときのフォーカスレンズの位置(撮像パラ
メータ)をメモリ等に記録し(ステップS303)、そ
のときの画像を入力する(ステップS304)。次にス
テップS305にて、入力画像から背景画像を1フレー
ム分生成する。このときの入力画像は、1フレームのみ
でも、複数フレームから平均処理して1フレームを生成
してもよい。いずれにしても、ひとつのフォーカスポイ
ントと、ひとつの背景画像を組としたデータの生成とな
る。
First, the background generation part will be described. In step S301 of FIG. 3, the focus is set to auto,
The focus point of the background image coming from the image pickup unit is set to the background portion. When the focus is achieved, the focus lens is fixed at that position (step S302).
Then, the position (imaging parameter) of the focus lens at this time is recorded in a memory or the like (step S303), and the image at that time is input (step S304). Next, in step S305, a background image for one frame is generated from the input image. The input image at this time may be only one frame, or may be averaged from a plurality of frames to generate one frame. In either case, one focus point and one background image are combined to generate data.

【0020】そして、これらのデータセット(異なるフ
ォーカスポイントとそれぞれの背景画像のセット)をい
くつか用意する。このため、ステップS306にて、ル
ープ処理を行う。必要フレーム数(背景画像の数)に満
たない場合は、ステップS307にて、オートフォーカ
スのロックを解除し、フォーカスポイントをわざと手前
にずらした状態で固定する。ステップS303に戻り、
このときのフォーカスレンズ位置を記録し、ステップS
304、S305にて新たな背景画像を生成する。この
ようにフォーカスポイントを少しずつずらしながら、そ
のときのレンズ位置と背景画像データを記録していく。
必要フレーム数になったところで、背景画像生成の一連
の処理を終える。
Then, some of these data sets (sets of different focus points and respective background images) are prepared. Therefore, loop processing is performed in step S306. If the number of frames is less than the required number of frames (the number of background images), in step S307, the lock of the autofocus is released, and the focus point is intentionally fixed in the state of being shifted toward you. Returning to step S303,
The focus lens position at this time is recorded, and step S
In 304 and S305, a new background image is generated. In this way, while shifting the focus point little by little, the lens position and the background image data at that time are recorded.
When the required number of frames is reached, a series of processes for background image generation is finished.

【0021】図4は、上記の方法で生成した背景画像の
例を示している。同図(a)は背景にフォーカスポイン
トの合っている画像、同図(b)は背景より少し手前に
フォーカスポイントが合っている画像、同図(c)は、
同図(b)より更に手前にフォーカスポイントを合せた
場合の画像を示している。
FIG. 4 shows an example of the background image generated by the above method. (A) is an image in which the focus point is in the background, (b) is an image in which the focus point is slightly in front of the background, and (c) is
The image in the case where the focus point is set further in front of FIG.

【0022】図2のブロック図において、制御部201
は各ブロック間の制御を行う回路である。また、フォー
カスレンズ制御部103との通信部分を有し、フォーカ
スに関するコマンドの送受信を行う。具体的には、オー
トフォーカスのオン・オフ、フォーカスレンズ位置(フ
ォーカスレンズ位置)の設定および取得などである。入
力信号は、撮像部から出力される画像データであり、必
要に応じてフォーマット変換や、ノイズ除去処理などが
施される。背景画像生成時は、入力データは、背景画像
生成部202に入力され、不図示のメモリに格納され
る。また、このときのフォーカスレンズの位置情報も、
制御部201を通じて、画像データに関連づけられて記
録(格納)される。記録される媒体は、メモリでもハー
ドディスク等、その情報を記憶保存できればその種類は
問わない。なお、背景画像とフォーカスレンズの位置情
報の対応関係が明確になっていれば良いので、例えが背
景画像を記憶する際のファイル名にフォーカスレンズ位
置を採用しても構わない。
In the block diagram of FIG. 2, the control unit 201
Is a circuit for controlling each block. In addition, it has a communication part with the focus lens control unit 103, and transmits and receives commands relating to focus. Specifically, it is on / off of autofocus, and setting and acquisition of a focus lens position (focus lens position). The input signal is image data output from the imaging unit, and is subjected to format conversion, noise removal processing, and the like as necessary. When the background image is generated, the input data is input to the background image generation unit 202 and stored in a memory (not shown). Also, the position information of the focus lens at this time is
It is recorded (stored) in association with the image data through the control unit 201. The recording medium may be of any type, such as a memory or a hard disk, as long as the information can be stored. It should be noted that the correspondence relationship between the background image and the position information of the focus lens only needs to be clear, and thus the focus lens position may be used as a file name when the background image is stored.

【0023】なお、背景画像記録処理時には、背景画像
選択処理部203や、背景差分処理部204は、制御部
201からの信号によって、出力動作を停止させてい
る。また、背景画像の伝送または記録が必要なときは、
出力側のスイッチ回路205をA側に設定して出力す
る。出力画像は、1フレームの画像データなので、先に
説明したMPEG−4の符号化でなくとも、JPEG符
号化等の静止画符号化を用いることもできる。なお、検
出した物体のみの記録、伝送で構わない場合は、背景画
像を画像符号化部に送る必要はない。
During the background image recording process, the background image selection processing unit 203 and the background difference processing unit 204 stop the output operation by the signal from the control unit 201. Also, when you need to transmit or record a background image,
The switch circuit 205 on the output side is set to the A side for output. Since the output image is one frame of image data, still image coding such as JPEG coding can be used instead of the MPEG-4 coding described above. If only the detected object is to be recorded and transmitted, it is not necessary to send the background image to the image encoding unit.

【0024】さて、上記のようにして、背景画像生成部
202に複数のフォーカスレンズ位置に対応する背景画
像の格納処理が終了すると、実際に物体検出処理を行う
ことになる。
As described above, when the background image generation unit 202 completes the storage process of the background images corresponding to the plurality of focus lens positions, the object detection process is actually performed.

【0025】先ず、物体の検出を行う際に、どの背景画
像を選択するかの処理について、図5(a)のフローチ
ャートを使って説明する。まずステップS501にて、
フォーカスをオートにしておき、ステップS502でフ
ォーカスの変化の検出を続ける。物体が検出されるまで
は、フォーカスポイントは背景に合ったままなので、変
化は検出されない。監視領域内に物体が進入すると、そ
ちらにフォーカスポイントが合うために、フォーカスの
変化が検出される。このときステップS503で検出し
た新たなフォーカスポイントと同じフォーカスポイント
を持つ背景画像を選択する。同じフォーカスポイントの
背景画像が見つからない場合は、一番近い値の背景画像
を選択し、その選択した背景画像を背景差分処理部20
4に出力する。
First, the process of selecting a background image when detecting an object will be described with reference to the flowchart of FIG. First, in step S501,
The focus is set to auto and the change in focus is continuously detected in step S502. Until the object is detected, the focus point remains in the background, so no change is detected. When an object enters the monitoring area, the focus point is set there, so that a change in focus is detected. At this time, a background image having the same focus point as the new focus point detected in step S503 is selected. When the background image of the same focus point is not found, the background image having the closest value is selected and the selected background image is used as the background difference processing unit 20.
Output to 4.

【0026】次に背景画像選択の他の方法を図5(b)
のフローチャートを使って説明する。フォーカスをオー
トにしておく最初のステップS511は、先の例と同じ
である。次にステップS512にて、入力画像と背景画
像との間で差分検出を行う。このとき用いる背景画像
は、最初に生成したフォーカスポイントの合った画像で
ある。したがって、物体が検出されるまでは、差分値は
ほとんど生じない。監視領域内に物体が進入すると、物
体にフォーカスが合うため、大きな差分値が検出され
る。このとき、ステップS513にてフォーカスポイン
トを検出し、ステップS514にて、このフォーカスポ
イントと同じフォーカスポイントを持つ背景画像を選択
する。同じフォーカスポイントの背景画像が見つからな
い場合は、一番近い値の背景画像を選択する。この方法
は、画像処理でフォーカスポイントの変化を検出してい
るため、フォーカス情報取得にかかる通信時間を削減す
ることができ、システム全体のパフォーマンス向上が期
待できる。
Next, another method of selecting a background image will be described with reference to FIG.
This will be explained using the flowchart of. The first step S511 in which the focus is set to auto is the same as the previous example. Next, in step S512, difference detection is performed between the input image and the background image. The background image used at this time is an image in which the focus point is initially generated. Therefore, the difference value hardly occurs until the object is detected. When an object enters the monitoring area, the object is in focus and a large difference value is detected. At this time, the focus point is detected in step S513, and the background image having the same focus point as this focus point is selected in step S514. If no background image with the same focus point is found, select the background image with the closest value. Since this method detects the change of the focus point by the image processing, it is possible to reduce the communication time required to acquire the focus information, and it is expected to improve the performance of the entire system.

【0027】これを表示画像の例で説明する。図4で説
明した複数の背景画像が用意されており、物体が進入し
たときの画像が図12(a)であったとすると、このと
きのフォーカスポイントの値から、例えば図4(c)が
差分比較用の背景画像として選択される。図12(a)
と図4(c)の画素値の比較は、先に説明した図11
(a)と図11(b)の比較と同じ関係になるので、図
11(c)の結果を得ることができる。
This will be described with an example of a display image. If a plurality of background images described in FIG. 4 are prepared and the image when the object enters is FIG. 12A, the difference between the focus point values at this time is shown in FIG. 4C, for example. It is selected as a background image for comparison. Figure 12 (a)
And the pixel value of FIG. 4C is compared with that of FIG.
Since the relationship is the same as the comparison between (a) and FIG. 11 (b), the result of FIG. 11 (c) can be obtained.

【0028】図2のブロック図を用いた説明を行う。背
景画像は既に生成されているため、背景画像生成部20
2の出力動作は、制御部201によって停止させてい
る。背景画像選択処理部203では、制御部201を経
由してフォーカスポイントの情報を得、変化があれば、
これと同じフォーカスポイントを持つ背景画像を背景画
像生成部202から選択し、背景差分処理部204に出
力する。なお、フォーカスポイントの変化の検出に、入
力画像を用いない場合は、背景画像選択処理部203に
監視画像を入力する必要はない。この入力は、図5
(b)のフローチャートで説明したような場合に必要と
なる。背景差分処理部204では、新たに選択された背
景画像と入力監視画像との間で、比較、判定処理を行
い、結果を形状データとして出力する。このとき、スイ
ッチ回路205はB側の設定となり、画像データと形状
データの組が画像符号化部105に送られることとな
る。MPEG−4ビジュアル符号化では、画像データは
抽出された部分だけが符号化されるため、画像フレーム
全体を符号化する場合に比べ、大幅なデータ圧縮が可能
となる。
Description will be given using the block diagram of FIG. Since the background image has already been generated, the background image generation unit 20
The output operation of No. 2 is stopped by the control unit 201. The background image selection processing unit 203 obtains focus point information via the control unit 201, and if there is a change,
A background image having the same focus point is selected from the background image generation unit 202 and output to the background difference processing unit 204. If the input image is not used to detect the change in the focus point, it is not necessary to input the monitoring image to the background image selection processing unit 203. This input is
It is necessary in the case described in the flowchart of (b). The background difference processing unit 204 performs comparison and determination processing between the newly selected background image and the input monitoring image, and outputs the result as shape data. At this time, the switch circuit 205 is set to the B side, and the set of image data and shape data is sent to the image encoding unit 105. In the MPEG-4 visual encoding, only the extracted portion of the image data is encoded, so that it is possible to significantly compress the data as compared with the case of encoding the entire image frame.

【0029】以上説明したように本第1の実施形態によ
れば、複数の背景画像の中から、物体検出時のフォーカ
スポイントと同じフォーカスポイントを持つ背景画像を
選択し、差分処理を行うことから、背景部分における判
定誤差をなくし、かつ、進入物体にもピントの合った精
度の高い検出処理を行うことができる。また、高精度の
検出処理結果を利用し、検出対象の符号化を行うこと
で、高能率の監視システムを実現することができる。
As described above, according to the first embodiment, the background image having the same focus point as that at the time of object detection is selected from the plurality of background images, and the difference processing is performed. Therefore, it is possible to eliminate the determination error in the background portion and perform highly accurate detection processing in which the entering object is also in focus. In addition, a highly efficient monitoring system can be realized by using the highly accurate detection processing result and encoding the detection target.

【0030】<第2の実施形態>本発明の第2の実施形
態について説明する。上記第1の実施形態では、フォー
カスレンズの位置の情報を背景画像データとセットで保
持していくものであったが、第2の実施形態において
は、フォーカスレンズの位置の情報が得られない場合の
例を説明する。以下、図4および図6乃至図8を用いて
詳細に説明する。図6は第2の実施形態における物体検
出処理のブロック図、図7は背景画像生成のフローチャ
ート、図8は背景画像選択方法のフローチャートであ
る。
<Second Embodiment> A second embodiment of the present invention will be described. In the first embodiment, the information on the position of the focus lens is held as a set with the background image data, but in the second embodiment, when the information on the position of the focus lens cannot be obtained. An example will be described. Hereinafter, a detailed description will be given with reference to FIGS. 4 and 6 to 8. FIG. 6 is a block diagram of the object detection processing in the second embodiment, FIG. 7 is a flowchart of background image generation, and FIG. 8 is a flowchart of a background image selection method.

【0031】まず背景生成の部分から説明する。図7の
ステップS701にて、フォーカスをオートに設定し、
撮像部から入ってくる背景画像のフォーカスポイントを
背景部分に合わせる。焦点が合ったところで、フレーム
画像の入力を行う(ステップS702)。次にステップ
S703にて、入力画像から背景画像を1フレーム分生
成する。このときの入力画像は、1フレームのみでも、
複数フレームから平均処理して1フレームを生成しても
よい。これで1つ目の背景画像の生成は完了である。ス
テップS704にて、必要なフレーム数(背景画像の
数)になるまでループ処理を行う。2枚目以降の背景画
像は、ステップS705におけるフィルタリング処理に
より行う。フォーカスポイントのずれた画像は、ローパ
スフィルタによって、高域側の周波数成分を落としてや
ることにより生成できる。フィルタに通す周波数帯域を
徐々に狭めていくことで、フォーカスポイントのずれが
徐々に大きくなる画像を生成することができる。このよ
うにして、必要フレーム数の背景画像が生成できたら、
ステップS704のループを抜け、背景画像生成の一連
の処理を終える。
First, the background generation part will be described. In step S701 of FIG. 7, the focus is set to auto,
The focus point of the background image coming from the image pickup unit is set to the background portion. When the focus is achieved, the frame image is input (step S702). Next, in step S703, a background image for one frame is generated from the input image. The input image at this time is only one frame,
One frame may be generated by averaging a plurality of frames. This completes the generation of the first background image. In step S704, loop processing is performed until the required number of frames (the number of background images) is reached. The second and subsequent background images are subjected to the filtering process in step S705. An image with a shifted focus point can be generated by dropping the frequency component on the high frequency side using a low-pass filter. By gradually narrowing the frequency band passed through the filter, it is possible to generate an image in which the shift of the focus point is gradually increased. In this way, if you can generate the background image of the required number of frames,
The process exits the loop of step S704 and ends the series of processes for generating the background image.

【0032】上記の方法で生成した背景画像は図4、す
なわち、第1の実施形態にて行った説明と同様である。
図4(a)は背景にフォーカスポイントの合っている画
像、(b)は背景より少し手前にフォーカスポイントが
合っている画像、(c)は(b)より更に手前にフォー
カスポイントが合っている画像を示している。
The background image generated by the above method is the same as that explained in FIG. 4, that is, in the first embodiment.
FIG. 4A shows an image in which the focus point is in the background, FIG. 4B is an image in which the focus point is slightly in front of the background, and FIG. 4C is in which the focus point is further in front of B. The image is shown.

【0033】図6のブロック図において、制御部601
は各ブロック間の制御を行う回路である。また、フォー
カスレンズ制御部との通信部分を有し、フォーカスに関
するコマンドの送受信を行う。具体的には、オートフォ
ーカスのオン・オフである。
In the block diagram of FIG. 6, the control unit 601.
Is a circuit for controlling each block. It also has a communication part with the focus lens control part, and transmits and receives commands relating to focus. Specifically, it is on / off of autofocus.

【0034】図2の場合と異なり、フォーカスレンズ位
置の設定および取得などのデータは得られない。入力信
号は、撮像部から出力される画像データであり、必要に
応じてフォーマット変換や、ノイズ除去処理などが施さ
れる。背景画像生成時は、入力データは、基準背景画像
生成部602に入力される。基準背景画像生成部602
からの出力は、フォーカスの合った1フレームの背景画
像であり、検出用背景画像生成部603では、この基準
背景画像から複数の背景画像の生成を行う。生成した複
数の背景画像は、検出用背景画像選択処理部604に記
憶される。記憶媒体は、メモリでもハードディスクでも
よい。背景画像生成時には、検出用背景画像選択処理部
604や、背景差分処理部605は、制御部601から
の信号によって、出力動作を停止させている。背景画像
の伝送または記録が必要なときは、出力側のスイッチ回
路606をA側に設定して、出力する。背景画像は、1
フレームの画像データなので、先に説明したMPEG−
4の符号化でなくとも、JPEG符号化等の静止画符号
化を用いることもできる。なお、検出した物体のみの記
録、伝送で構わない場合は、背景画像を画像符号化部に
送る必要はない。
Unlike the case of FIG. 2, data such as setting and acquisition of the focus lens position cannot be obtained. The input signal is image data output from the imaging unit, and is subjected to format conversion, noise removal processing, and the like as necessary. When generating the background image, the input data is input to the reference background image generating unit 602. Reference background image generation unit 602
Is a focused one-frame background image, and the detection background image generation unit 603 generates a plurality of background images from this reference background image. The generated background images are stored in the detection background image selection processing unit 604. The storage medium may be a memory or a hard disk. At the time of generating the background image, the detection background image selection processing unit 604 and the background difference processing unit 605 stop the output operation by the signal from the control unit 601. When the background image needs to be transmitted or recorded, the output side switch circuit 606 is set to the A side and output. Background image is 1
Since it is frame image data, the MPEG-
It is also possible to use still picture coding such as JPEG coding instead of the coding of 4. If only the detected object is to be recorded and transmitted, it is not necessary to send the background image to the image encoding unit.

【0035】次に、これら複数の背景画像が用意されて
いる状態で、物体の検出を行う際に、どの背景画像を選
択するかの処理について、図8(a)のフローチャート
を使って説明する。
Next, with reference to the flow chart of FIG. 8A, a process of selecting a background image when detecting an object in the state where these plural background images are prepared will be described. .

【0036】まずステップS801にて、フォーカスを
オートにしておき、ステップS802で差分の検出をす
る。このとき用いる背景画像は、最初に生成したフォー
カスポイントの合った画像である。したがって、物体が
検出されるまでは、差分値はほとんど生じない。監視領
域内に物体が進入すると、そちらにフォーカスポイント
が合うために、大きな差分値が検出される。このときス
テップS803にて、背景画像と監視画像の比較を行い
一致度を計算する。一致度の計算方法は、後述する。ス
テップS805では、次の背景画像を選択し、ステップ
S803に戻り入力監視画像との一致度計算を行う。ス
テップS804のループ処理にて、予め用意したすべて
の背景画像との一致度計算ができたかどうかを判定し、
すべての計算が終わった時点で、次のステップS806
に進む。ステップS806では、一致度を計算したすべ
ての背景画像の中から最も一致度の高かった背景を1つ
選択する。この背景画像を差分処理用の画像として一連
の処理を終える。この方法は、物体進入時の最初のフレ
ームにおいて、画面全体に大きな差分値を生じるため、
フォーカスレンズの位置情報が得られなくても、変化に
対し確実な検出が期待できる。
First, in step S801, the focus is set to auto, and the difference is detected in step S802. The background image used at this time is an image in which the focus point is initially generated. Therefore, the difference value hardly occurs until the object is detected. When an object enters the surveillance area, a large difference value is detected because the focus point is placed there. At this time, in step S803, the background image and the monitor image are compared to calculate the degree of coincidence. The method of calculating the degree of coincidence will be described later. In step S805, the next background image is selected, and the process returns to step S803 to calculate the degree of coincidence with the input monitoring image. In the loop processing of step S804, it is determined whether or not the degree of coincidence with all the background images prepared in advance has been calculated,
Upon completion of all calculations, the next step S806
Proceed to. In step S806, one background having the highest matching score is selected from all the background images for which the matching score has been calculated. A series of processes is completed by using this background image as an image for difference processing. This method produces a large difference value on the entire screen in the first frame when entering an object.
Even if the position information of the focus lens cannot be obtained, reliable detection of changes can be expected.

【0037】次に背景画像選択の他の方法を図8(b)
のフローチャートを使って説明する。
Next, another method of selecting a background image will be described with reference to FIG.
This will be explained using the flowchart of.

【0038】まず最初のステップS811で、フォーカ
スを背景に合った状態のまま固定にしておく。次にステ
ップS812にて、入力画像と背景画像との間で差分検
出を行う。背景画像は、フォーカスポイントの合った画
像であるので、物体が検出されるまでは、差分値はほと
んど生じない。監視領域内に物体が進入すると、物体の
存在する部分で、大きな差分値が検出される。このと
き、ステップS813にてフォーカスをオートに設定
し、入力監視画像のフォーカスポイントを進入物体に合
わせる。ステップS814にて、このときの背景画像と
監視画像の比較を行い一致度を計算する。ステップS8
16では、次の背景画像を選択し、ステップS814に
戻り入力監視画像との一致度計算を行う。ステップS8
15のループ処理にて、予め用意したすべての背景画像
との一致度計算ができたかどうかを判定し、すべての計
算が終わった時点で、次のステップS817に進む。ス
テップS817では、一致度を計算したすべての背景画
像の中から最も一致度の高かった背景を1つ選択し、一
連の処理を終える。この方法は、物体進入時の最初のフ
レームにおいても、背景画像のフォーカスが合っている
ために、精度の高い形状データを出力できる。
First, in step S811, the focus is fixed while being in the background. Next, in step S812, difference detection is performed between the input image and the background image. Since the background image is an image in which the focus points match, a difference value hardly occurs until an object is detected. When an object enters the monitoring area, a large difference value is detected in the part where the object exists. At this time, the focus is set to auto in step S813, and the focus point of the input monitoring image is set to the entering object. In step S814, the background image and the monitor image at this time are compared to calculate the degree of coincidence. Step S8
In step 16, the next background image is selected, and the process returns to step S814 to calculate the degree of coincidence with the input monitoring image. Step S8
In the loop process of 15, it is determined whether or not the degree of coincidence with all the prepared background images has been calculated, and when all the calculations are completed, the process proceeds to the next step S817. In step S817, the background having the highest degree of coincidence is selected from all the background images for which the degree of coincidence has been calculated, and the series of processes is ended. According to this method, since the background image is in focus even in the first frame when the object enters, highly accurate shape data can be output.

【0039】これを表示画像の例で説明する。以下の説
明は、第1の実施形態にて行った説明と同様である。図
4で説明した複数の背景画像が用意されており、物体が
進入したときの画像が図12(a)であったとすると、
このときの背景の一致度から、図4(c)が差分比較用
の背景画像として選択される。図12(a)と図4
(c)の画素値の比較は、先に説明した図11(a)と
図11(b)の比較と同じ関係になるので、図11
(c)の結果を得ることができる。
This will be described with an example of a display image. The following description is the same as the description given in the first embodiment. If a plurality of background images described in FIG. 4 are prepared and the image when an object enters is FIG. 12A,
Based on the degree of coincidence of the backgrounds at this time, FIG. 4C is selected as the background image for difference comparison. FIG. 12A and FIG.
Since the comparison of the pixel values of (c) has the same relationship as the comparison of FIGS. 11 (a) and 11 (b) described above, FIG.
The result of (c) can be obtained.

【0040】ここまでの処理を、図6のブロック図で説
明する。背景画像は既に生成されているため、基準背景
画像生成部602及び検出用背景画像生成部603の出
力動作は、制御部601によって停止させている。検出
用背景画像選択処理部604では、入力監視画像と複数
の背景画像との一致度を測定し、一致度の最も高い背景
画像を選択し、背景差分処理部605に出力する。背景
差分処理部605では、選択された背景画像と入力監視
画像との間で、比較、判定処理を行い、結果を形状デー
タとして出力する。このとき、スイッチ回路606はB
側の設定となり、画像データと形状データの組が画像符
号化部105に送られることとなる。MPEG−4ビジ
ュアル符号化では、画像データは抽出された部分だけが
符号化されるため、画像フレーム全体を符号化する場合
に比べ、大幅なデータ圧縮が可能となる。
The processing up to this point will be described with reference to the block diagram of FIG. Since the background image has already been generated, the output operations of the reference background image generation unit 602 and the detection background image generation unit 603 are stopped by the control unit 601. The detection background image selection processing unit 604 measures the degree of coincidence between the input monitoring image and the plurality of background images, selects the background image with the highest degree of coincidence, and outputs it to the background difference processing unit 605. The background difference processing unit 605 performs comparison and determination processing between the selected background image and the input monitoring image, and outputs the result as shape data. At this time, the switch circuit 606 is B
Then, the set of the image data and the shape data is sent to the image coding unit 105. In the MPEG-4 visual encoding, only the extracted portion of the image data is encoded, so that it is possible to significantly compress the data as compared with the case of encoding the entire image frame.

【0041】次に一致度の検出方法について詳細に説明
する。一致の度合いを調べるための最も簡単な方法は、
画像間の差分の和を求めるものである。次式(2)はそ
の一例である。 ki = Σ|Pc(x,y)−Pbi(x,y)| … (2) i=1,…,N(Nは背景画像の数) ここで、Pc(x,y)は、入力した監視画像の画素値
であり、Pbi(x,y)は、i番目の背景画像の画素
値である。kiはこの画素間の差分絶対値の総和であ
る。k1からkNの中で最小のものが、検出用背景画像
となる。
Next, the method of detecting the degree of coincidence will be described in detail. The easiest way to find a match is to
The sum of differences between images is calculated. The following formula (2) is an example. ki = Σ | Pc (x, y) -Pbi (x, y) | (2) i = 1, ..., N (N is the number of background images) where Pc (x, y) is input. Pbi (x, y) is the pixel value of the monitoring image, and Pbi (x, y) is the pixel value of the i-th background image. ki is the sum of absolute differences between the pixels. The smallest one among k1 to kN is the background image for detection.

【0042】また、全画素を対象に計算する場合は、画
像中に進入物の画素も含まれてしまうことから、背景部
分同士の一致度が一番高くならない場合もある。このと
きは、画像の一部を用いた一致度検出も可能である。あ
らかじめ、監視領域内で進入物が表示されない領域がわ
かっている場合は、その領域内で一致度検出を行えばよ
い。図9の(a)はこの例を示しており、901の斜線
領域は、進入物が表示されない領域なので、この領域を
一致度検出の対象としている。また、進入物が表示され
ない領域があらかじめ特定できない場合には、複数の小
領域を設定し、これらの一致度の関係から求めることも
できる。
Further, when the calculation is performed for all the pixels, the pixels of the entering matter are also included in the image, so that the degree of coincidence between the background portions may not be the highest. At this time, the degree of coincidence detection using a part of the image is also possible. If it is known in advance that a region in which the entering matter is not displayed is known in the monitoring region, the matching degree detection may be performed in the region. FIG. 9A shows this example. Since the hatched area 901 is an area in which an entering matter is not displayed, this area is targeted for coincidence detection. Further, when the area in which the entering matter is not displayed cannot be specified in advance, it is possible to set a plurality of small areas and obtain the relationship from the degree of coincidence.

【0043】図9(b)は、表示画面上にA1からA5
の5ヶ所の小領域を設定した例である。これら5ヶ所の
一致度をそれぞれ求めると、背景部分の画素のみを含む
領域A1、A2、A4、A5は、お互いに近い値とな
り、進入物の画素を含む領域A3だけ大きく異なる値と
なる。そこで、一致度判定の対象領域をA3以外で行う
ことにより、簡便(高速化に寄与する)で高い精度の一
致度検出が可能となる。
FIG. 9B shows A1 to A5 on the display screen.
This is an example in which five small areas are set. When the degree of coincidence at each of these five points is obtained, the areas A1, A2, A4, and A5 including only the pixels of the background portion have values close to each other, and the areas A3 including the pixels of the entering matter have greatly different values. Therefore, if the target area for the matching degree determination is other than A3, the matching degree can be detected easily (contributes to the speedup) with high accuracy.

【0044】上記の通り本第2の実施形態によれば、1
つの背景画像からフィルタ処理により複数の背景画像を
生成し、背景画像選択時には、監視画像と複数の背景画
像との間で一致度の最も高いものを選択した後、差分処
理を行うことから、背景部分における判定誤差をなく
し、かつ、進入物体にもピントの合った精度の高い検出
処理を行うことができる。また、高精度の検出処理結果
を利用し、検出対象の符号化を行うことで、高能率の監
視システムを実現することができる。
As described above, according to the second embodiment, 1
Multiple background images are generated from one background image by filtering, and when selecting a background image, the background image is selected because the one with the highest degree of coincidence between the monitoring image and the multiple background images is selected, and then the difference processing is performed. It is possible to eliminate a determination error in a portion and perform highly accurate detection processing in which an entering object is in focus. In addition, a highly efficient monitoring system can be realized by using the highly accurate detection processing result and encoding the detection target.

【0045】<第3の実施形態>第3の実施形態につい
て説明する。第1の実施形態では、フォーカスレンズの
位置の情報を背景画像生成時と背景画像選択時に利用す
るものであり、第2の実施形態では、背景画像の生成と
背景画像の選択をそれぞれ画像処理で行うものであっ
た。しかしながら、背景画像の選択時にはカメラパラメ
ータが得られないが、背景画像の生成時には、カメラコ
ントロールができる場合が考えられる。このときは、背
景画像の生成に第1の実施形態で説明した、図3のフロ
ーチャートを用い、背景画像の選択には、第2の実施形
態で説明した図8のフローチャートを用いる組み合わせ
を実現することが可能である。
<Third Embodiment> A third embodiment will be described. In the first embodiment, the information on the position of the focus lens is used when the background image is generated and when the background image is selected. In the second embodiment, the background image generation and the background image selection are performed by image processing. It was something to do. However, although the camera parameters cannot be obtained when the background image is selected, it may be possible to control the camera when the background image is generated. At this time, the combination of using the flowchart of FIG. 3 described in the first embodiment for generating the background image and using the flowchart of FIG. 8 described in the second embodiment for selecting the background image is realized. It is possible.

【0046】上記の通り本第3の実施形態によれば、背
景生成時にフォーカスポイントを変えながら複数の背景
画像を生成し、背景画像選択時には、監視画像と複数の
背景画像との間で一致度の最も高いものを選択した後、
差分処理を行うことから、背景部分における判定誤差を
なくし、かつ、進入物体にもピントの合った精度の高い
検出処理を行うことができる。また、高精度の検出処理
結果を利用し、検出対象の符号化を行うことで、高能率
の監視システムを実現することができる。
As described above, according to the third embodiment, a plurality of background images are generated while changing the focus point when the background is generated, and when the background image is selected, the degree of coincidence between the monitor image and the plurality of background images is high. After choosing the highest of
Since the difference process is performed, it is possible to eliminate the determination error in the background portion and perform the highly accurate detection process in which the entering object is also in focus. In addition, a highly efficient monitoring system can be realized by using the highly accurate detection processing result and encoding the detection target.

【0047】<他の実施形態>なお、本発明は、複数の
機器(例えばホストコンピュータ、インタフェイス機
器、スキャナ、ビデオカメラなど)から構成されるシス
テムに適用しても、一つの機器からなる装置に適用して
もよい。
<Other Embodiments> The present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a scanner, a video camera, etc.), but also an apparatus including one device. May be applied to.

【0048】また、本発明の目的は、前述した実施形態
の機能を実現するソフトウェアのプログラムコードを記
録した記憶媒体(または記録媒体)を、システムあるい
は装置に供給し、そのシステムあるいは装置のコンピュ
ータ(またはCPUやMPU)が記憶媒体に格納された
プログラムコードを読み出し実行することによっても、
達成されることは言うまでもない。この場合、記憶媒体
から読み出されたプログラムコード自体が前述した実施
形態の機能を実現することになり、そのプログラムコー
ドを記憶した記憶媒体は本発明を構成することになる。
また、コンピュータが読み出したプログラムコードを実
行することにより、前述した実施形態の機能が実現され
るだけでなく、そのプログラムコードの指示に基づき、
コンピュータ上で稼働しているオペレーティングシステ
ム(OS)などが実際の処理の一部または全部を行い、
その処理によって前述した実施形態の機能が実現される
場合も含まれることは言うまでもない。ここでプログラ
ムコードを記憶する記憶媒体としては、例えば、フロッ
ピー(登録商標)ディスク、ハードディスク、ROM、
RAM、磁気テープ、不揮発性のメモリカード、CD−
ROM、CD−R、DVD、光ディスク、光磁気ディス
ク、MOなどが考えられる。
Further, an object of the present invention is to supply a storage medium (or recording medium) recording a program code of software for realizing the functions of the above-described embodiments to a system or apparatus, and to supply a computer of the system or apparatus ( Alternatively, by the CPU or MPU) reading and executing the program code stored in the storage medium,
It goes without saying that it will be achieved. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also based on the instruction of the program code,
An operating system (OS) running on the computer does some or all of the actual processing,
It goes without saying that the processing includes the case where the functions of the above-described embodiments are realized. Here, as the storage medium for storing the program code, for example, a floppy (registered trademark) disk, a hard disk, a ROM,
RAM, magnetic tape, non-volatile memory card, CD-
ROM, CD-R, DVD, optical disk, magneto-optical disk, MO, etc. are considered.

【0049】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張カー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書込まれた後、そのプログラムコードの指示
に基づき、その機能拡張カードや機能拡張ユニットに備
わるCPUなどが実際の処理の一部または全部を行い、
その処理によって前述した実施形態の機能が実現される
場合も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written in the memory provided in the function expansion card inserted into the computer or the function expansion unit connected to the computer, based on the instruction of the program code. , The CPU provided in the function expansion card or the function expansion unit performs some or all of the actual processing,
It goes without saying that the processing includes the case where the functions of the above-described embodiments are realized.

【0050】本発明を上記記憶媒体に適用する場合、そ
の記憶媒体には、先に説明した図3、5、7、8に示す
フローチャートに対応するプログラムコードが格納され
ることになる。
When the present invention is applied to the above storage medium, the storage medium stores the program code corresponding to the flowcharts shown in FIGS. 3, 5, 7, and 8 described above.

【0051】上記の通り本発明によれば、あらかじめ複
数の背景画像を生成し、監視時に入力監視画像と複数の
背景画像との間で背景部分の一致度の最も高いものを選
択した後、差分処理を行うことから、背景部分における
判定誤差をなくし、かつ、進入物体にも正確なフォーカ
スポイントで、精度の高い画像処理方法及び装置並びに
記憶媒体を提示することができる。
As described above, according to the present invention, a plurality of background images are generated in advance, the one having the highest degree of coincidence in the background portion between the input monitor image and the plurality of background images is selected at the time of monitoring, and then the difference is calculated. Since the processing is performed, it is possible to eliminate the determination error in the background portion, and to present the highly accurate image processing method and device and the storage medium with the accurate focus point even for the entering object.

【0052】[0052]

【発明の効果】以上説明したように本発明によれば、撮
像手段の撮像範囲内に進入するオブジェクトに焦点を合
わせながらも、高い精度で背景との識別が可能になる。
As described above, according to the present invention, it is possible to discriminate from the background with high accuracy while focusing on an object that enters the image pickup range of the image pickup means.

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

【図1】実施形態における画像処理装置のブロック構成
図である。
FIG. 1 is a block configuration diagram of an image processing apparatus according to an embodiment.

【図2】実施形態における物体検出部のブロック構成図
である。
FIG. 2 is a block configuration diagram of an object detection unit in the embodiment.

【図3】実施形態における背景画像の生成処理手順を示
すフローチャートである。
FIG. 3 is a flowchart showing a background image generation processing procedure according to the embodiment.

【図4】実施形態における複数の背景画像を示す図であ
る。
FIG. 4 is a diagram showing a plurality of background images in the embodiment.

【図5】第1の実施形態における背景画像選択処理手順
を示すフローチャートである。
FIG. 5 is a flowchart showing a background image selection processing procedure according to the first embodiment.

【図6】第2の実施形態における物体検出部のブロック
構成図である。
FIG. 6 is a block configuration diagram of an object detection unit in the second embodiment.

【図7】第2の実施形態における背景画像の生成処理手
順を示すフローチャートである。
FIG. 7 is a flowchart illustrating a background image generation processing procedure according to the second embodiment.

【図8】第2の実施形態における背景画像の選択処理手
順を示すフローチャートである。
FIG. 8 is a flowchart showing a background image selection processing procedure according to the second embodiment.

【図9】第2、第3の実施形態における背景画像の選択
処理を説明するための図である。
FIG. 9 is a diagram for explaining a background image selection process in the second and third embodiments.

【図10】MPEG−4ビジュアル符号化のブロック図
である。
FIG. 10 is a block diagram of MPEG-4 visual encoding.

【図11】背景差分処理による物体検出を説明する図で
ある。
FIG. 11 is a diagram illustrating object detection by background subtraction processing.

【図12】背景差分処理による物体検出の問題点を説明
する図である。
FIG. 12 is a diagram illustrating a problem of object detection by background subtraction processing.

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 対象物体にフォーカスする機能を有する
撮像手段の撮像視野内にある対象物を示す情報を抽出す
る画像処理装置であって、 前記撮像手段によって、予め複数のフォーカスポイント
による背景画像を格納する格納手段と、 前記格納手段に格納された背景画像の1つを選択する選
択手段と、 前記撮像手段で撮像して得られた画像と前記選択手段で
選択された背景画像との差分を検出することで、前記撮
像手段の撮影視野内の、背景以外の対象物体の存在する
位置を示す情報を抽出する抽出手段とを備えることを特
徴とする画像処理装置。
1. An image processing apparatus for extracting information indicating an object within an imaging field of view of an imaging means having a function of focusing on an object, wherein the imaging means preliminarily displays a background image with a plurality of focus points. Storing means for storing; selecting means for selecting one of the background images stored in the storing means; and a difference between the image obtained by the image pickup means and the background image selected by the selecting means. An image processing apparatus comprising: an detecting unit that detects and detects information indicating a position where a target object other than the background exists in the photographing field of view of the image capturing unit.
【請求項2】 前記格納手段には、各フォーカスポイン
トと背景画像とを対応づけて格納されることを特徴とす
る請求項第1項に記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein each focus point and a background image are stored in the storage unit in association with each other.
【請求項3】 前記選択手段は、前記撮像手段のフォー
カスポイントに関する情報を入力する入力手段を含み、
該入力手段の入力した情報に基づいて、該当するフォー
カスポイントを有する背景画像を選択することを特徴と
する請求項第2項に記載の画像処理装置。
3. The selecting means includes input means for inputting information about a focus point of the image pickup means,
The image processing apparatus according to claim 2, wherein a background image having a corresponding focus point is selected based on the information input by the input unit.
【請求項4】 前記選択手段は、 初期状態では、背景画像にフォーカスした背景画像を選
択する第1の選択手段と、 前記撮像手段によって得られた画像と、従前に選択され
た背景画像との差が大きくなった場合、前記格納手段に
格納されている他の背景画像との差を順に算出する算出
手段と、 該算出手段で算出した差が最小となる背景画像を選択す
る第2の選択手段とを含むことを特徴とする請求項第1
項に記載の画像処理装置。
4. The selection means, in an initial state, comprises a first selection means for selecting a background image focused on a background image, an image obtained by the imaging means, and a background image previously selected. When the difference becomes large, a calculating unit that sequentially calculates the difference from the other background images stored in the storing unit, and a second selection that selects the background image having the smallest difference calculated by the calculating unit. A first means comprising:
The image processing device according to item.
【請求項5】 前記算出手段は、前記撮像手段の視野内
に予め設定した所定の複数の部分的な領域について差分
を算出することを特徴とする請求項第4項に記載の画像
処理装置。
5. The image processing apparatus according to claim 4, wherein the calculation unit calculates a difference between a plurality of predetermined partial areas set in advance in the field of view of the image pickup unit.
【請求項6】 前記複数の背景画像は、フォーカスして
得られた背景画像を基準背景画像とし、当該基準背景画
像に対してフィルタ係数を徐々に変えながらフィルタリ
ング処理を行って生成することを特徴とする請求項第4
項に記載の画像処理装置。
6. The plurality of background images are generated by subjecting a background image obtained by focusing to a reference background image and performing a filtering process on the reference background image while gradually changing filter coefficients. Claim 4
The image processing device according to item.
【請求項7】 前記抽出手段は、画素毎に、背景画素で
あるか、背景以外の対象物体であるかを識別する2値情
報を抽出することを特徴とする請求項第1項乃至第6項
のいずれか1項に記載の画像処理装置。
7. The extraction means extracts binary information for identifying, for each pixel, whether the pixel is a background pixel or a target object other than the background. The image processing apparatus according to any one of items.
【請求項8】 前記撮像手段で得られた画像情報と前記
抽出手段で抽出された情報をMPEG−4符号化手段に
出力する手段を更に備えることを特徴とする請求項第1
項乃至第7項のいずれか1項に記載の画像処理装置。
8. The apparatus according to claim 1, further comprising means for outputting the image information obtained by the image pickup means and the information extracted by the extraction means to an MPEG-4 encoding means.
The image processing apparatus according to any one of items 1 to 7.
【請求項9】 対象物体にフォーカスする機能を有する
撮像手段の撮像視野内にある対象物を示す情報を抽出す
る画像処理方法であって、 前記撮像手段によって、予め複数のフォーカスポイント
による背景画像を所定の記憶媒体に格納する格納工程
と、 前記格納工程で格納された背景画像の1つを選択する選
択工程と、 前記撮像手段で撮像して得られた画像と前記選択工程で
選択された背景画像との差分を検出することで、前記撮
像手段の撮影視野内の、背景以外の対象物体の存在する
位置を示す情報を抽出する抽出工程とを備えることを特
徴とする画像処理方法。
9. An image processing method for extracting information indicating an object within an imaging field of view of an imaging means having a function of focusing on a target object, wherein the imaging means preliminarily creates a background image with a plurality of focus points. A storing step of storing in a predetermined storage medium, a selecting step of selecting one of the background images stored in the storing step, an image obtained by the image capturing means, and a background selected in the selecting step. An image processing method, comprising: detecting a difference from an image, and extracting information indicating a position where a target object other than the background exists in the photographing field of view of the image pickup unit.
【請求項10】 対象物体にフォーカスする機能を有す
る撮像手段の撮像視野内にある対象物を示す情報を抽出
する画像処理装置として機能するコンピュータプログラ
ムであって、 前記撮像手段によって、予め複数のフォーカスポイント
による背景画像を格納する格納手段と、 前記格納手段に格納された背景画像の1つを選択する選
択手段と、 前記撮像手段で撮像して得られた画像と前記選択手段で
選択された背景画像との差分を検出することで、前記撮
像手段の撮影視野内の、背景以外の対象物体の存在する
位置を示す情報を抽出する抽出手段ととして機能するこ
とを特徴とするコンピュータプログラム。
10. A computer program functioning as an image processing device for extracting information indicating an object within an imaging field of view of an imaging means having a function of focusing on a target object, wherein the imaging means pre-selects a plurality of focus points. Storage means for storing a background image based on points, selection means for selecting one of the background images stored in the storage means, image obtained by the image pickup means, and background selected by the selection means A computer program that functions as an extracting unit that detects information indicating the position of a target object other than the background in the photographing field of the image pickup unit by detecting a difference from the image.
【請求項11】 請求項第10項に記載のコンピュータ
プログラムを格納することを特徴とするコンピュータ可
読記憶媒体。
11. A computer-readable storage medium storing the computer program according to claim 10.
JP2001368995A 2001-11-15 2001-12-03 Device and method of image processing, computer program and computer readable storage medium Withdrawn JP2003168117A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2001368995A JP2003168117A (en) 2001-12-03 2001-12-03 Device and method of image processing, computer program and computer readable storage medium
US10/293,432 US7162101B2 (en) 2001-11-15 2002-11-14 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001368995A JP2003168117A (en) 2001-12-03 2001-12-03 Device and method of image processing, computer program and computer readable storage medium

Publications (1)

Publication Number Publication Date
JP2003168117A true JP2003168117A (en) 2003-06-13

Family

ID=19178475

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001368995A Withdrawn JP2003168117A (en) 2001-11-15 2001-12-03 Device and method of image processing, computer program and computer readable storage medium

Country Status (1)

Country Link
JP (1) JP2003168117A (en)

Similar Documents

Publication Publication Date Title
US7453506B2 (en) Digital camera having a specified portion preview section
US7162101B2 (en) Image processing apparatus and method
US9489747B2 (en) Image processing apparatus for performing object recognition focusing on object motion, and image processing method therefor
CN107707871B (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
US6738197B2 (en) Autofocusing apparatus
US20110221920A1 (en) Digital photographing apparatus, method of controlling the same, and computer readable storage medium
US20110081141A1 (en) Focus adjusting device, image pickup apparatus, and focus adjustment method
US8284994B2 (en) Image processing apparatus, image processing method, and storage medium
US8675089B2 (en) Apparatus and method for assisting composition of photographic image
JP2003219225A (en) Device for monitoring moving object image
JP2007304280A (en) Imaging apparatus, its control method, program and storage medium
US20140185875A1 (en) Object area tracking apparatus, control method, and program of the same
JP6924064B2 (en) Image processing device and its control method, and image pickup device
JP2007067559A (en) Image processing method, image processing apparatus, and control method of imaging apparatus
US9357124B2 (en) Focusing control device and controlling method of the same
JP4909063B2 (en) Imaging apparatus and image recording method
JPH0723322A (en) Moving image recording medium, still image extracting device, moving image recorder, and automatic extracting method for still image
JP2003199099A (en) Apparatus and method for processing image as well as computer program and computer readable storage medium
JP5118590B2 (en) Subject tracking method and imaging apparatus
JP2007251532A (en) Imaging device and face area extraction method
JP5539565B2 (en) Imaging apparatus and subject tracking method
JP2003168117A (en) Device and method of image processing, computer program and computer readable storage medium
JP2008160280A (en) Imaging apparatus and automatic imaging method
KR101720775B1 (en) Photoghraphing apparatus and method
JP5024033B2 (en) Object tracking device, object tracking program, and object tracking method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050301