JP2003030664A - Mobile object extraction method and device - Google Patents
Mobile object extraction method and deviceInfo
- Publication number
- JP2003030664A JP2003030664A JP2001217991A JP2001217991A JP2003030664A JP 2003030664 A JP2003030664 A JP 2003030664A JP 2001217991 A JP2001217991 A JP 2001217991A JP 2001217991 A JP2001217991 A JP 2001217991A JP 2003030664 A JP2003030664 A JP 2003030664A
- Authority
- JP
- Japan
- Prior art keywords
- image
- moving object
- frame
- difference
- moving
- 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.)
- Pending
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 24
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000010586 diagram Methods 0.000 description 9
- 241001465754 Metazoa Species 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
Description
【0001】[0001]
【発明の属する分野】本発明は、固定したカメラによっ
て撮影された動画像中の移動物体を抽出する方法及び装
置に関するものであるBACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for extracting a moving object in a moving image captured by a fixed camera.
【0002】[0002]
【従来の技術】従来において、固定したカメラによって
撮影した画像から移動物体を抽出する方法として、2つ
のフレーム画像間の差分を利用する方法が知られてい
る。詳細は「画像処理ハンドブック」(尾上守夫監修:
昭晃堂(1987))記載されている。2. Description of the Related Art Conventionally, a method of utilizing a difference between two frame images is known as a method of extracting a moving object from an image captured by a fixed camera. For details, see "Image Processing Handbook" (supervised by Morio Onoue:
Shokodo (1987)).
【0003】ある2つのフレーム画像の差分とは、両フ
レームにおける同一画素の画像をf(x, y)、g(x, y)で表
した場合、これらの画像間の濃度値の差、あるいは差の
絶対値のことであり、差分画像h(x, y)は
h(x, y) = f(x, y) − g(x, y)
または
h(x, y) = |f(x, y) − g(x, y)|
で定義される。2つのフレーム画像の差分画像を作る
と、背景の部分では差が非常に小さくなり、移動物体の
前後には負の領域と正の領域ができる。すなわち、移動
物体が移動する前に位置していた部分には負の領域が生
成され、移動した新たな位置には正の領域が生成され
る。従って、差分画像において負(または正)の領域を
求めれば、動領域を検出できる。この方法では直接には
移動物体の一部しか検出できないので、この情報を第一
近似とし、他の方法で移動物体全体を検出する必要があ
る。The difference between two frame images is the difference between the density values between the two images when the images of the same pixel in both frames are represented by f (x, y) and g (x, y). It is the absolute value of the difference, and the difference image h (x, y) is h (x, y) = f (x, y) − g (x, y) or h (x, y) = | f (x , y) − g (x, y) | When a difference image of two frame images is created, the difference becomes very small in the background part, and a negative region and a positive region are formed before and after the moving object. That is, a negative region is generated in the portion where the moving object was located before the movement, and a positive region is generated in the new position where the moving object is moved. Therefore, if a negative (or positive) area is obtained in the difference image, the moving area can be detected. Since this method can directly detect only a part of the moving object, it is necessary to use this information as the first approximation to detect the entire moving object by another method.
【0004】[0004]
【発明が解決しようとする課題】ところで、上記の従来
の方法において、移動物体が複数存在する場合、2つの
フレーム画像間で移動物体の重なりがあると、正確に動
領域が検出できないことがある。すなわち、図13に示
すように、時刻t1で道路1301を移動中の車両A,B
を撮影した第1のフレーム画像では、車両A,Bが図1
3(a)の位置にあったが、時刻t2で撮影したフレーム
画像では図13(b)の位置にあったとすると、その差
分画像を求めた場合、車両Bの位置には車両Aが移動し
て来ているので(車両Aが車両Bの元の位置に重なって
いるので)、時刻t1、t2間での動領域は車両Aの移
動前の位置のみとなり、車両Bの動領域を検出できない
という問題がある。これは、例えば道路を所定の車間距
離を保ちながら走行している車両を検出する場合などに
おいて、先行している車両を検出できないことを意味す
る。By the way, in the above-mentioned conventional method, when there are a plurality of moving objects, the moving area may not be accurately detected if the moving objects overlap each other between the two frame images. . That is, as shown in FIG. 13, vehicles A and B moving on the road 1301 at time t1.
Vehicles A and B are shown in FIG.
Although it was at the position of 3 (a), if it is at the position of FIG. 13 (b) in the frame image taken at time t2, when the difference image is obtained, the vehicle A moves to the position of the vehicle B. (The vehicle A overlaps the original position of the vehicle B), the moving area between the times t1 and t2 is only the position before the movement of the vehicle A, and the moving area of the vehicle B cannot be detected. There is a problem. This means that a preceding vehicle cannot be detected, for example, when detecting a vehicle traveling on a road while maintaining a predetermined inter-vehicle distance.
【0005】本発明の目的は、複数の移動物体の位置が
移動前後のフレーム画像間で重なっている場合であって
も、それぞれの移動物体を個別に抽出することができる
移動物体の抽出方法及び装置を提供することにある。An object of the present invention is to provide a moving object extraction method and a moving object extraction method which can individually extract each moving object even when the positions of a plurality of moving objects overlap between frame images before and after movement. To provide a device.
【0006】[0006]
【課題を解決するための手段】上記目的を達成するため
に、本発明の方法は、固定したカメラによって撮影した
動画像から移動物体を抽出する方法であって、前記カメ
ラによって撮影した移動物体を含む複数のフレーム画像
の平均値を求めることによって抽出対象の移動物体の背
景画像を生成するステップと、抽出対象時刻におけるフ
レーム画像と前記背景画像との差分画像を生成するステ
ップと、前記差分画像を2値化してマスク画像を生成す
るステップと、前記マスク画像を用いて、抽出対象時刻
におけるフレーム画像中の移動物体の領域を切り出すス
テップとを備えることを特徴とする。In order to achieve the above object, the method of the present invention is a method for extracting a moving object from a moving image taken by a fixed camera. A step of generating a background image of the moving object to be extracted by obtaining an average value of the plurality of frame images, a step of generating a difference image between the frame image and the background image at the extraction target time, and the difference image It is characterized by including a step of binarizing to generate a mask image and a step of using the mask image to cut out a region of a moving object in a frame image at an extraction target time.
【0007】また、本発明の装置は、固定したカメラに
よって撮影した動画像から移動物体を抽出する装置であ
って、前記カメラによって撮影した移動物体を含む複数
のフレーム画像の平均値を求めることによって抽出対象
の移動物体の背景画像を生成する手段と、抽出対象時刻
におけるフレーム画像と前記背景画像との差分により差
分画像を生成する手段と、前記差分画像を2値化してマ
スク画像を生成する手段と、前記マスク画像を用いて、
抽出対象時刻におけるフレーム画像中の移動物体の領域
を切り出す手段とを備えることを特徴とする。The device of the present invention is a device for extracting a moving object from a moving image taken by a fixed camera, and by obtaining an average value of a plurality of frame images including the moving object taken by the camera. Means for generating a background image of the moving object to be extracted, means for generating a difference image by the difference between the frame image and the background image at the extraction time, and means for binarizing the difference image to generate a mask image. And using the mask image,
Means for cutting out a region of the moving object in the frame image at the extraction target time.
【0008】[0008]
【発明の実施の形態】以下、本発明を図示する実施の形
態に基づいて詳細に説明する。図1は、本発明の一実施
形態を示す移動物体抽出装置のハードウェアのブロック
図である。この実施形態の移動物体抽出装置は、キーボ
ード101、処理装置102、記憶装置107、および
ディスプレイ112から構成されている。キーボード1
01はコマンド名やそのパラメータの入力を行う。処理
装置102は移動物体抽出システムのコマンドの処理を
行う。より詳細には、動画像から背景画像を生成する背
景画像生成処理103と、動画像の任意のフレームと背
景画像から差分画像を生成する差分画像生成処理104
と、差分画像からマスク画像を生成するマスク画像生成
処理105とマスク画像を用いて原フレーム画像から移
動物体を切り出す移動物体の切り出し処理106とを備
えている。BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail based on illustrated embodiments. FIG. 1 is a block diagram of hardware of a moving object extraction device showing an embodiment of the present invention. The moving object extraction device of this embodiment includes a keyboard 101, a processing device 102, a storage device 107, and a display 112. Keyboard 1
01 inputs a command name and its parameters. The processing device 102 processes a command of the moving object extraction system. More specifically, a background image generation process 103 that generates a background image from a moving image and a difference image generation process 104 that generates a difference image from an arbitrary frame of the moving image and the background image.
And a mask image generation process 105 for generating a mask image from the difference image and a moving object cutout process 106 for cutting out a moving object from the original frame image using the mask image.
【0009】記憶装置107には処理装置102への入
力となる動画像108と処理装置102のコマンド処理
の入出力データである背景画像109と差分画像110
とマスク画像111を蓄えている。ディスプレイ112
は、キーボード101が入力した文字列や処理装置10
2がコマンドの処理した結果などの表示を行う。In the storage device 107, a moving image 108 that is an input to the processing device 102, a background image 109 that is input / output data for command processing of the processing device 102, and a difference image 110.
And the mask image 111 is stored. Display 112
Is a character string input by the keyboard 101 or the processing device 10.
2 displays the result of command processing.
【0010】本実施形態においては、次のようにして移
動物体を抽出する。
(1)複数のフレーム画像から平均値をとって背景画像
を作成する。
(2)抽出対象時刻におけるフレーム画像と背景画像と
の差分により差分画像を生成する。
(3)差分画像を2値化し、移動物体の画素の値を
“1”、背景の画素の値を“0”とするマスク画像を生
成する。
(4)マスク画像を用いて、抽出対象時刻におけるフレ
ーム画像中の移動物体の領域を切り出す。In this embodiment, moving objects are extracted as follows. (1) A background image is created by taking an average value from a plurality of frame images. (2) A difference image is generated from the difference between the frame image and the background image at the extraction target time. (3) The difference image is binarized to generate a mask image in which the pixel value of the moving object is "1" and the pixel value of the background is "0". (4) Using the mask image, the region of the moving object in the frame image at the extraction target time is cut out.
【0011】すなわち、固定したカメラによって撮影さ
れた動画像では、背景が静止し、移動物体が移動してい
る。従って、動画像のフレームを重ねると、背景は固定
した位置にあるため、強調される。一方、移動物体はフ
レームごとに様々な場所に位置するため、その像は比較
的不鮮明になる。十分多くのフレームを重ねれば、移動
物体は消滅し、背景だけから成るいわゆる背景画像が得
られる。この手法は写真撮影の場合の長時間露出を行っ
ていることに対応している。正確には、背景画像は、各
フレームの画素の濃度値を加算し、フレームの枚数で割
り算して得られる平均値を画素の値として持つ画像とし
て得られる。抽出対象時刻における移動物体を含んでい
るフレーム画像と移動物体を含んでいない背景画像との
差分画像を求めることによって、抽出対象時刻における
移動物体を容易に抽出できる。差分画像では、移動物体
の領域で値が比較的大きく、背景の所で値が非常に小さ
い。そこで、差分画像から移動物体に対応する画素の値
を“1”、背景に対応する画素の値を“0”とするマス
ク画像を作成する。次に、マスク画像の値が“1”の部
分原フレーム画像から切り出す。すると、移動物体を容
易に抽出することができる。That is, in the moving image taken by the fixed camera, the background is stationary and the moving object is moving. Therefore, when the frames of the moving image are overlapped, the background is in a fixed position and is emphasized. On the other hand, since the moving object is located in various places in each frame, its image becomes relatively unclear. If enough frames are overlapped, the moving object disappears and a so-called background image consisting of only the background is obtained. This method corresponds to the long exposure in the case of photography. To be precise, the background image is obtained as an image having a pixel value that is an average value obtained by adding the density values of the pixels of each frame and dividing by the number of frames. The moving object at the extraction target time can be easily extracted by obtaining the difference image between the frame image including the moving object at the extraction target time and the background image not including the moving object. In the difference image, the value is relatively large in the area of the moving object and very small in the background. Therefore, a mask image in which the value of the pixel corresponding to the moving object is “1” and the value of the pixel corresponding to the background is “0” is created from the difference image. Next, the partial original frame image in which the value of the mask image is “1” is cut out. Then, the moving object can be easily extracted.
【0012】以下、車両が移動している風景を写した動
画像から、その車両を抽出する例を挙げて本実施形態の
処理について説明する。図2は、固定カメラによって撮
影した動画像の時刻t1における原フレーム画像F1であ
る。ここで原フレーム画像F1とは、抽出対象時刻のフ
レーム画像のことである。背景は2本の樹木201,2
02と1軒の家屋203から成り、その前面の左側に左
から右に移動している車両AMがある。図3は、図2の
原フレーム画像F1からしばらく経過した時刻t2におい
て撮影されたフレーム画像F2である。このフレーム画
像F2では、車両AMは同じ背景の前面の右側に移動し
ている。図4は、図2と図3の平均値をとって生成した
背景画像109である。車両AMの像は平均値をとった
ため、破線で示すように不鮮明になっている。一方、背
景は両方の図で同じであったため、平均値をとっても、
不鮮明になっていない。図5は、さらに多くのフレーム
画像を重ねて生成された背景画像109である。この画
像では車両AMの像は完全に消滅している。The process of this embodiment will be described below by taking an example of extracting a vehicle from a moving image showing a landscape in which the vehicle is moving. FIG. 2 is an original frame image F1 of a moving image captured by a fixed camera at time t1. Here, the original frame image F1 is a frame image at the extraction target time. The background is two trees 201,
02 and one house 203, and a vehicle AM moving from left to right is on the left side of the front surface thereof. FIG. 3 is a frame image F2 taken at time t2, which is a short time after the original frame image F1 of FIG. In this frame image F2, the vehicle AM is moving to the right of the front of the same background. FIG. 4 is a background image 109 generated by taking the average value of FIGS. 2 and 3. Since the image of the vehicle AM has an average value, it is unclear as indicated by the broken line. On the other hand, the background was the same in both figures, so even if you take the average value,
Not blurred. FIG. 5 is a background image 109 generated by superimposing more frame images. In this image, the image of the vehicle AM has completely disappeared.
【0013】図6は、図2の原フレーム画像F1と図5
の背景画像109の差分をとって差分画像110を生成
した後、2値化し、車両AMを黒、背景を白で表したマ
スク画像111である。図7は、マスク画像111を用
いて、図2のフレーム画像F1から車両AMを切り出し
たものである。FIG. 6 shows the original frame image F1 of FIG. 2 and FIG.
Is a mask image 111 in which the difference image 110 is generated by taking the difference of the background image 109 and binarized to represent the vehicle AM in black and the background in white. FIG. 7 shows the vehicle AM cut out from the frame image F1 of FIG. 2 using the mask image 111.
【0014】図8は、複数のフレーム画像f(x, y, t)か
ら平均値の画像img1(x, y)を生成するアルゴリズムを説
明するフローチャートである。ここで、xとyは画素の座
標、tはフレームが撮影された時刻を表す。まず、ステ
ップ801で、平均の対象となるフレームの枚数Nを計
算する。詳しくは、N=(t2-t1)/dt+1を計算する。ここ
で、t1は図8(b)に示すように最初のフレームの開始
時刻、t2は最後のフレームの開始時刻を示す定数であ
る。dtはフレーム間の時間を示す定数である。ステップ
802、ステップ803およびステップ806は、xに
ついてのループを構成している。ここで、xはx1からx2
まで値を1だけ増やしながら変わる。ステップ803で
xがx2を超えたら、処理を終了する。超えなければ、ス
テップ804に進む。ステップ804、ステップ80
5、および、ステップ811はyについてのループを構
成している。ここで、yはy1からy2まで値を1だけ増や
しながら変わる。なお、x1は図8(b)に示すようにあ
る1つのフレームにおけるx座標方向の最初の画素、x2
は最後の画素を表し、またy1はy座標方向の最初の画
素、y2は最後の画素を表す。FIG. 8 is a flow chart for explaining an algorithm for generating an average value image img1 (x, y) from a plurality of frame images f (x, y, t). Here, x and y represent pixel coordinates, and t represents the time when the frame was captured. First, in step 801, the number N of frames to be averaged is calculated. Specifically, N = (t2-t1) / dt + 1 is calculated. Here, t1 is a constant indicating the start time of the first frame and t2 is the start time of the last frame, as shown in FIG. dt is a constant indicating the time between frames. Step 802, step 803 and step 806 form a loop for x. Where x is from x1 to x2
It changes while increasing the value by 1. In step 803
When x exceeds x2, the processing ends. If not, go to step 804. Step 804, Step 80
5 and step 811 form a loop for y. Here, y changes from y1 to y2 by increasing the value by 1. Note that x1 is the first pixel in the x-coordinate direction in one frame as shown in FIG. 8B, x2
Represents the last pixel, y1 represents the first pixel in the y coordinate direction, and y2 represents the last pixel.
【0015】ステップ805でyがy2を超えたら、ステ
ップ806に進み、xの値を1だけ増やして、xのループ
に戻る。超えなければ、ステップ807で変数vの値を
0に設定する。ステップ808、ステップ809、およ
びステップ813はtについてのループを構成してい
る。ここで、tはt1からt2まで値をdtだけ増やしながら
変わる。ステップ809でtがt2+dtに達していなけれ
ば、ステップ812でvにf(x, y,t)を加え、ステップ8
13でtの値をdtだけ増やして、ループする。達してい
れば、ステップ810でimg1(x, y)に平均値v / Nを代
入し、ステップ811でyの値を1だけ増やして、yのル
ープに戻る。When y exceeds y2 in step 805, the process proceeds to step 806, the value of x is incremented by 1, and the process returns to the loop of x. If it does not exceed, the value of the variable v is set to 0 in step 807. Steps 808, 809, and 813 form a loop for t. Here, t changes from t1 to t2 by increasing the value by dt. If t has not reached t2 + dt in step 809, f (x, y, t) is added to v in step 812, and step 8
At 13, the value of t is increased by dt and the loop is executed. If it has reached, the average value v / N is assigned to img1 (x, y) in step 810, the value of y is increased by 1 in step 811, and the process returns to the loop of y.
【0016】すなわち、ステップ802でx座標を設定
し、かつステップ804でy座標を設定した後、ステッ
プ812、813でt1からt2までの各フレームにおけ
る該当座標の画像f(x, y, t)を加算し、さらにステップ
810で平均値を求めることによってt1からt2のフレ
ームまでのy座標方向における1ライン分の平均値を求
めたならば、y座標を1つ更新して次の1ライン分の平
均値を求める処理をx座標方向の座標値がx2を超える
まで実行する。これによって、Nフレーム分の画像につ
いて平均値の画像が得られる。That is, after the x coordinate is set in step 802 and the y coordinate is set in step 804, the image f (x, y, t) of the corresponding coordinate in each frame from t1 to t2 is set in steps 812 and 813. Is calculated and the average value is calculated in step 810, and if the average value for one line in the y coordinate direction from the frame from t1 to t2 is calculated, the y coordinate is updated by one and the next one line is calculated. The process of obtaining the average value of is executed until the coordinate value in the x coordinate direction exceeds x2. As a result, an average value image is obtained for the N frame images.
【0017】図9はフレーム画像f(x, y, t1)と背景画
像img1(x, y)の差分画像img2(x, y)を生成するアルゴリ
ズムを説明するフローチャートである。このフローチャ
ートはxとyの2重のループを含んでいる。xはx1からx2
まで、yはy1からy2までの値をとり、ステップ906が
実行される。ステップ906ではフレームf(x, y, t1)
と背景画像img1(x, y)の差の絶対値を計算し、差分画像
img2(x, y)にその値を代入する。FIG. 9 is a flow chart for explaining an algorithm for generating a difference image img2 (x, y) between the frame image f (x, y, t1) and the background image img1 (x, y). This flow chart contains a double loop of x and y. x is from x1 to x2
Up to, y takes a value from y1 to y2, and step 906 is executed. In step 906, the frame f (x, y, t1)
And the background image img1 (x, y) is calculated as the absolute value of the difference, and the difference image
Substitute that value into img2 (x, y).
【0018】図10は、差分画像img2(x, y)を2値化
し、マスク画像img3(x, y)を生成するアルゴリズムを説
明するフローチャートである。このフローチャートはx
とyの2重のループを含んでいる。xはx1からx2まで、y
はy1からy2までの値をとり、ステップ1006、ステッ
プ1007およびステップ1008が実行される。ステ
ップ1006では、差分画像img2(x, y)が所定のしきい
値Tより大きいか判定する。大きければ、ステップ10
07でマスク画像img3(x, y)に“1”を代入する。大き
くなければ、ステップ1008でマスク画像img3(x, y)
に“0”を代入する。FIG. 10 is a flow chart for explaining an algorithm for binarizing the difference image img2 (x, y) to generate the mask image img3 (x, y). This flow chart is x
It contains a double loop of y and y. x is from x1 to x2, y
Takes a value from y1 to y2, and step 1006, step 1007 and step 1008 are executed. In step 1006, it is determined whether the difference image img2 (x, y) is larger than a predetermined threshold value T. If so, step 10
At 07, "1" is assigned to the mask image img3 (x, y). If it is not large, the mask image img3 (x, y) in step 1008
Substitute "0" for.
【0019】図11は、マスク画像img3(x, y)を用い
て、原フレーム画像f(x, y, t1)の移動物体の領域を切
り出した画像img4(x, y)を生成するアルゴリズムを説明
するフローチャートである。このフローチャートはxとy
の2重のループを含んでいる。xはx1からx2まで、yはy1
からy2までの値をとり、ステップ1106、ステップ1
107およびステップ1108が実行される。ステップ
1106でマスク画像img3(x, y)が“1”であるか判定
する。“1”であれば、ステップ1107で画像img4
(x, y)に原フレーム画像f(x, y, t1)の値を代入する。
“1”でなければ、ステップ1108で画像img4(x, y)
に“0”を代入する。この画像img4(x, y)が移動物体の
抽出画像として出力される。FIG. 11 shows an algorithm for generating an image img4 (x, y) obtained by cutting out a region of a moving object in the original frame image f (x, y, t1) using the mask image img3 (x, y). It is a flowchart explaining. This flow chart is x and y
It contains a double loop. x is from x1 to x2, y is y1
Take values from 1 to y2, step 1106, step 1
107 and step 1108 are executed. In step 1106, it is determined whether the mask image img3 (x, y) is "1". If it is “1”, the image img4 is displayed in step 1107.
Substitute the value of the original frame image f (x, y, t1) for (x, y).
If not "1", the image img4 (x, y) in step 1108
Substitute "0" for. This image img4 (x, y) is output as the extracted image of the moving object.
【0020】従って、例えば、図12(a)に示すよう
に移動中の2台の車両AM1、AM2が撮影されたフレ
ーム画像があった場合、同じ位置から撮影した複数のフ
レーム画像の平均値をとることによって図12(b)に
示すような背景画像が生成される。そこで、この背景画
像と図12(a)の原フレーム画像との差分をとると、
図12(c)に示すような差分画像が生成される。そし
て、この差分画像を2値化すると、図12(d)に示す
ようなマスク画像が生成される。最後に、2値化画像を
用いて原フレーム画像F1から2つの車両AM1、AM
2を切り出すと、図12(e)に示すように2台の車両
AM1、AM2の画像が得られる。すなわち、本実施形
態によれば、時間経過に伴って後続車両が先行車両の位
置に重なって撮影されている場合であっても、個々の車
両を鮮明に抽出することができる。ちなみに、従来の方
法では、車両AM1のみが抽出され、AM2は抽出され
ない。Therefore, for example, when there are frame images in which two moving vehicles AM1 and AM2 are photographed as shown in FIG. 12A, the average value of a plurality of frame images photographed from the same position is calculated. By taking the above, a background image as shown in FIG. 12B is generated. Therefore, if the difference between this background image and the original frame image of FIG.
A difference image as shown in FIG. 12C is generated. Then, when the difference image is binarized, a mask image as shown in FIG. 12D is generated. Finally, using the binarized image, two vehicles AM1, AM from the original frame image F1
When 2 is cut out, the images of the two vehicles AM1 and AM2 are obtained as shown in FIG. That is, according to the present embodiment, even when the following vehicle is photographed so as to overlap the position of the preceding vehicle over time, each vehicle can be clearly extracted. By the way, in the conventional method, only the vehicle AM1 is extracted and AM2 is not extracted.
【0021】従って、ある間隔をおいて移動している物
体を固定したカメラで撮影した動画像から容易に抽出す
ることが可能になり、例えば、航空写真や衛星画像など
のリモートセンシング画像上で動中の車両を数え上げて
交通量を観測するシステムや、監視カメラによる不審者
の検出する防犯システム、動物の行動の理解を目的とし
た動物実験における動物の動態検出システムに適用する
ことにより、極めて有用な効果を奏する。マスク画像は
移動物体の形状を忠実に反映したものでなく、移動物体
の形状より大き目に広げるようにしてもよい。Therefore, it becomes possible to easily extract an object moving at a certain interval from a moving image taken by a fixed camera. For example, the moving object can be moved on a remote sensing image such as an aerial photograph or a satellite image. It is extremely useful when applied to a system that counts the number of vehicles inside and observes the traffic volume, a security system that detects suspicious persons with a surveillance camera, and an animal dynamics detection system in animal experiments for the purpose of understanding animal behavior Has a great effect. The mask image does not faithfully reflect the shape of the moving object, and may be wider than the shape of the moving object.
【0022】[0022]
【発明の効果】以上の説明から明らかなように、本発明
によれば、複数の移動物体の位置が移動前後のフレーム
画像間で重なっている場合であっても、それぞれの移動
物体を個別に抽出することができる。As is apparent from the above description, according to the present invention, even if the positions of a plurality of moving objects are overlapped between the frame images before and after the movement, the moving objects are individually separated. Can be extracted.
【図1】本発明の一実施形態を示す移動物体抽出装置の
ハードウェアのブロック図である。FIG. 1 is a block diagram of hardware of a moving object extraction device showing an embodiment of the present invention.
【図2】固定カメラによって撮影した動画像の時刻t1に
おける原フレーム画像F1の例を示す図である。FIG. 2 is a diagram showing an example of an original frame image F1 of a moving image captured by a fixed camera at time t1.
【図3】図2の原フレーム画像F1からしばらく経過し
た時刻t2において撮影されたフレーム画像F2の例を示
す図である。FIG. 3 is a diagram showing an example of a frame image F2 captured at time t2, which is a time after the original frame image F1 of FIG.
【図4】図2と図3の平均値をとって生成した背景画像
の例を示す図である。FIG. 4 is a diagram showing an example of a background image generated by taking the average value of FIGS. 2 and 3;
【図5】さらに多くのフレーム画像を重ねて生成された
背景画像の例を示す図である。FIG. 5 is a diagram showing an example of a background image generated by superimposing more frame images.
【図6】図2の原フレーム画像F1と図5の背景画像と
の差分をとって差分画像を生成した後、2値化したマス
ク画像の例を示す図である。6 is a diagram showing an example of a mask image binarized after the difference image is generated by taking the difference between the original frame image F1 of FIG. 2 and the background image of FIG.
【図7】マスク画像を用いて、図2のフレーム画像F1
から移動物体を切り出した図である。FIG. 7 shows a frame image F1 of FIG. 2 using a mask image.
It is the figure which cut out the moving object from.
【図8】複数のフレーム画像から平均値の画像を生成す
るアルゴリズムを示すフローチャートである。FIG. 8 is a flowchart showing an algorithm for generating an average value image from a plurality of frame images.
【図9】フレーム画像と背景画像の差分画像を生成する
アルゴリズムを示すフローチャートである。FIG. 9 is a flowchart showing an algorithm for generating a difference image between a frame image and a background image.
【図10】差分画像を2値化し、マスク画像を生成する
アルゴリズムを示すフローチャートである。FIG. 10 is a flowchart showing an algorithm for binarizing a difference image and generating a mask image.
【図11】マスク画像を用いて移動物体の領域を切り出
した画像を生成するアルゴリズムを示すフローチャート
である。FIG. 11 is a flowchart showing an algorithm for generating an image in which a region of a moving object is cut out using a mask image.
【図12】移動中の複数の移動物体を抽出する過程を示
す説明図である。FIG. 12 is an explanatory diagram showing a process of extracting a plurality of moving objects that are moving.
【図13】従来方法の問題点を説明する図である。FIG. 13 is a diagram illustrating a problem of the conventional method.
101…キーボード、102…処理装置、103…背景
画像生成処理、104差分画像生成処理、105…マス
ク画像生成処理、106…移動物体の切り出し処理、1
07…記憶装置、108…動画像、109…背景画像、
110…差分画像、111…マスク画像、AM…移動物
体。101 ... Keyboard, 102 ... Processing device, 103 ... Background image generation processing, 104 Difference image generation processing, 105 ... Mask image generation processing, 106 ... Moving object cutout processing, 1
07 ... storage device, 108 ... moving image, 109 ... background image,
110 ... Difference image, 111 ... Mask image, AM ... Moving object.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 小野山 隆 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウエアエンジニアリング株式会 社内 Fターム(参考) 5L096 AA06 DA01 EA37 GA08 HA03 JA09 ─────────────────────────────────────────────────── ─── Continued front page (72) Inventor Takashi Onoyama 6-81 Onoe-cho, Naka-ku, Yokohama-shi, Kanagawa Hitachi Software Engineering Stock Association In-house F term (reference) 5L096 AA06 DA01 EA37 GA08 HA03 JA09
Claims (2)
から移動物体を抽出する方法であって、 前記カメラによって撮影した移動物体を含む複数のフレ
ーム画像の平均値を求めることによって抽出対象の移動
物体の背景画像を生成するステップと、 抽出対象時刻におけるフレーム画像と前記背景画像との
差分画像を生成するステップと、 前記差分画像を2値化してマスク画像を生成するステッ
プと、 前記マスク画像を用いて、抽出対象時刻におけるフレー
ム画像中の移動物体の領域を切り出すステップとを備え
ることを特徴とする移動物体抽出方法。1. A method for extracting a moving object from a moving image captured by a fixed camera, comprising: determining an average value of a plurality of frame images including the moving object captured by the camera, Generating a background image, generating a difference image between the frame image at the extraction target time and the background image, binarizing the difference image to generate a mask image, and using the mask image And a step of cutting out a region of the moving object in the frame image at the extraction target time.
から移動物体を抽出する装置であって、 前記カメラによって撮影した移動物体を含む複数のフレ
ーム画像の平均値を求めることによって抽出対象の移動
物体の背景画像を生成する手段と、 抽出対象時刻におけるフレーム画像と前記背景画像との
差分により差分画像を生成する手段と、 前記差分画像を2値化してマスク画像を生成する手段
と、 前記マスク画像を用いて、抽出対象時刻におけるフレー
ム画像中の移動物体の領域を切り出す手段とを備えるこ
とを特徴とする移動物体抽出装置。2. An apparatus for extracting a moving object from a moving image captured by a fixed camera, wherein the moving object to be extracted is obtained by obtaining an average value of a plurality of frame images including the moving object captured by the camera. A means for generating a background image; a means for generating a difference image based on the difference between the frame image at the extraction target time and the background image; a means for binarizing the difference image to generate a mask image; A moving object extracting apparatus, comprising means for cutting out an area of a moving object in a frame image at an extraction target time.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001217991A JP2003030664A (en) | 2001-07-18 | 2001-07-18 | Mobile object extraction method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001217991A JP2003030664A (en) | 2001-07-18 | 2001-07-18 | Mobile object extraction method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2003030664A true JP2003030664A (en) | 2003-01-31 |
Family
ID=19052233
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001217991A Pending JP2003030664A (en) | 2001-07-18 | 2001-07-18 | Mobile object extraction method and device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2003030664A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010009275A (en) * | 2008-06-26 | 2010-01-14 | Mitsubishi Electric Corp | Moving target detector, computer program, and moving target detection method |
| JP2013156868A (en) * | 2012-01-31 | 2013-08-15 | Nk Works Kk | Image processing program and image processing device |
| US9699916B2 (en) | 2014-05-13 | 2017-07-04 | Ngk Spark Plug Co., Ltd. | Method of manufacturing wiring substrate, and wiring substrate |
| CN112887611A (en) * | 2021-01-27 | 2021-06-01 | 维沃移动通信有限公司 | Image processing method, device, equipment and storage medium |
| WO2022206680A1 (en) * | 2021-03-29 | 2022-10-06 | 影石创新科技股份有限公司 | Image processing method and apparatus, computer device, and storage medium |
-
2001
- 2001-07-18 JP JP2001217991A patent/JP2003030664A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010009275A (en) * | 2008-06-26 | 2010-01-14 | Mitsubishi Electric Corp | Moving target detector, computer program, and moving target detection method |
| JP2013156868A (en) * | 2012-01-31 | 2013-08-15 | Nk Works Kk | Image processing program and image processing device |
| US9699916B2 (en) | 2014-05-13 | 2017-07-04 | Ngk Spark Plug Co., Ltd. | Method of manufacturing wiring substrate, and wiring substrate |
| CN112887611A (en) * | 2021-01-27 | 2021-06-01 | 维沃移动通信有限公司 | Image processing method, device, equipment and storage medium |
| WO2022206680A1 (en) * | 2021-03-29 | 2022-10-06 | 影石创新科技股份有限公司 | Image processing method and apparatus, computer device, and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11042999B2 (en) | Advanced driver assist systems and methods of detecting objects in the same | |
| US20230110116A1 (en) | Advanced driver assist system, method of calibrating the same, and method of detecting object in the same | |
| US9760791B2 (en) | Method and system for object tracking | |
| CN109784290B (en) | Target detection method, device, equipment and readable storage medium | |
| JP2006059252A (en) | Method, device and program for detecting movement, and monitoring system for vehicle | |
| WO2020154990A1 (en) | Target object motion state detection method and device, and storage medium | |
| US20250045933A1 (en) | Object tracking apparatus, control method, and program | |
| JP2019092076A (en) | Image processing system, image processing method, and program | |
| CN113850209A (en) | Dynamic object detection method and device, vehicle and storage medium | |
| WO2021084818A1 (en) | Object detection device, object detection method, and object detection program | |
| CN103077533B (en) | A kind of based on frogeye visual characteristic setting movement order calibration method | |
| JP2003030664A (en) | Mobile object extraction method and device | |
| JPH05205052A (en) | Automatic tracking device | |
| JP2012103748A (en) | Road section line recognition device | |
| KR20160108979A (en) | Method and apparatus of tracking targets | |
| US9953448B2 (en) | Method and system for image processing | |
| CN114219837A (en) | Vehicle anti-collision perception algorithm based on computer vision | |
| KR20100084015A (en) | Method for tracking moving object and apparatus in intelligent visual surveillance system | |
| US20250220145A1 (en) | Parallax information generation device, parallax information generation method, and parallax information generation program | |
| JP2001357388A (en) | Device for monitoring road | |
| Satzoda et al. | Vision-based front and rear surround understanding using embedded processors | |
| US20240221181A1 (en) | Image processing system | |
| JPH10111944A (en) | Background image updating method and apparatus | |
| CN116194832A (en) | Information processing device, information processing method, and program | |
| CN115147528A (en) | Learning device, learning method, storage medium, and object detection device |