Nothing Special   »   [go: up one dir, main page]

JP4040651B2 - Camera shake correction method and image system - Google Patents

Camera shake correction method and image system Download PDF

Info

Publication number
JP4040651B2
JP4040651B2 JP2005349061A JP2005349061A JP4040651B2 JP 4040651 B2 JP4040651 B2 JP 4040651B2 JP 2005349061 A JP2005349061 A JP 2005349061A JP 2005349061 A JP2005349061 A JP 2005349061A JP 4040651 B2 JP4040651 B2 JP 4040651B2
Authority
JP
Japan
Prior art keywords
image
movement
camera shake
amount
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2005349061A
Other languages
Japanese (ja)
Other versions
JP2006094560A (en
Inventor
小沼  知恵子
小林  芳樹
彰二 村松
文男 持丸
邦造 酒井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2005349061A priority Critical patent/JP4040651B2/en
Publication of JP2006094560A publication Critical patent/JP2006094560A/en
Application granted granted Critical
Publication of JP4040651B2 publication Critical patent/JP4040651B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は動画システムから特定の移動物体を識別する画像システムに関し、特にカメラの揺れ補正に関する。 The present invention relates to an image system that identifies a specific moving object from the moving system, about the particular camera shake correction.

監視対象エリアの動画像中から人物などの移動体を認識する場合、設置カメラの振動や風による揺れ補正が必要になる。類似の技術として、撮影時のカメラ手ぶれ補正方法がある。すなわち、カメラ視野範囲の所定の小ブロックに対し、そのブロックがどこにあるか1画素ずつシフトしてサーチし、最大類似のブロックの位置を検出してぶれ量を補正する。   When recognizing a moving body such as a person from a moving image in the monitoring target area, it is necessary to correct the vibration of the installation camera and the vibration due to the wind. As a similar technique, there is a camera shake correction method at the time of shooting. That is, with respect to a predetermined small block in the camera field of view, a search is performed by shifting one pixel at a time, and the position of the most similar block is detected to correct the blur amount.

また、揺れるカメラの動画像中から移動物体を認識する方法として、複数の注目点を設定して連続する画像フレーム間のマッチングを行い、その結果をもとにアフィン変換を2段階に適用することで背景の位置合わせを行い、さらに、位置合わせした後の時間軸方向での差分画像から移動物体領域の抽出を行うものが知られている(非特許文献1)。   In addition, as a method of recognizing a moving object from a moving image of a shaking camera, a plurality of attention points are set and matching between successive image frames is performed, and affine transformation is applied in two stages based on the result. In this method, the background is aligned and the moving object region is extracted from the difference image in the time axis direction after the alignment (Non-patent Document 1).

信学技報(PRU95−181、1995年−12月)IEICE Technical Report (PRU95-181, 1995-December)

従来のカメラの手ぶれ補正方法は、手ぶれのずれ量が比較的少ないので、視野範囲の所定位置の小さな基準ブロックをテンプレートパターンとして使用でき、マッチングのサーチ範囲も狭くてよい。しかし、基準ブロックが小さいあるいは位置が固定していると、そのブロックに外乱や移動体が進入するとマッチングが不可能になる。   A conventional camera shake correction method has a relatively small amount of camera shake shift, so that a small reference block at a predetermined position in the visual field range can be used as a template pattern, and a matching search range may be narrow. However, if the reference block is small or the position is fixed, matching becomes impossible if disturbance or a moving body enters the block.

一方、引用文献による移動物体の抽出方法は、設定した複数の注目パターンで画像フレーム間のマッチングを行うが、特徴のない注目パターン(規則的なパターン)が含まれていると、位置合わせに誤りが発生する。さらに、複数の注目パターンのいくつかでマッチング領域が存在した場合、これらのマッチング結果を基にアフィン変換を2段階適用して背景の位置合わせを行うと、時間がかかり過ぎてリアルタイムのオンライン処理が困難になる。   On the other hand, the moving object extraction method based on the cited document performs matching between image frames with a plurality of set attention patterns, but if there is an attention pattern with no features (regular pattern), the alignment is incorrect. Will occur. In addition, if there are matching regions in some of the target patterns, applying the two-step affine transformation based on these matching results to perform background alignment will take too much time, and real-time online processing will take place. It becomes difficult.

本発明の目的は、従来技術の問題点を克服し、カメラの揺れ量が大きくさらに外乱が存在する環境下においても、正確にかつ高速にカメラの揺れを補正するカメラ揺れ補正方法と、それを利用した画像システムを提供することにある。 An object of the present invention is to overcome the problems of the prior art, and to provide a camera shake correction method that corrects camera shake accurately and at high speed even in an environment where the amount of camera shake is large and disturbances exist. The purpose is to provide a used image system .

上記目的は、カメラが撮影した画像のカメラ揺れを補正する方法において、前記画像の2フレームの一方を基準画像、他方を処理画像とし、前記基準画像から作成したテンプレートパターンを用いて前記処理画像のパターンマッチングを行うことで、カメラ揺れ量を算出して画像ずれを補正することにより達成される。 The above objects are achieved by a method of the camera to correct the camera shake of the captured image, while the reference image of two frames of the image, while the processed image, the processed image using a template pattern created from the reference image By performing pattern matching, this is achieved by calculating the amount of camera shake and correcting image shift.

カメラ揺れによる画像ずれは、処理画像の全体にわたり同一方向に同一移動量となる規則性を有している。従って、テンプレート領域とマッチング領域の間の移動ベクトルのうち、この規則性、少なくとも移動方向が一致する移動ベクトルを特定することで、カメラ揺れ量を算出できる。なお、上記マッチング領域は、パターンマッチングによって抽出された最大類似度の領域である。   Image shift due to camera shake has regularity that is the same amount of movement in the same direction over the entire processed image. Therefore, the camera shake amount can be calculated by specifying a movement vector having the regularity, at least the movement direction, among the movement vectors between the template area and the matching area. The matching area is an area having the maximum similarity extracted by pattern matching.

この一方法として、前記基準画像から作成した複数のテンプレートパターンを用いて前記処理画像に対するパターンマッチングを行ない、前記テンプレートパターン毎にマッチング領域との移動ベクトルを算出し、移動方向が同一または移動方向及び移動量が同一となる頻度最大の移動ベクトル(群)を求め、該移動ベクトル(群)の移動方向と移動量からカメラ揺れ量を算出し、該カメラ揺れ量だけ画像シフトして前記基準画像と前記処理画像の背景を位置合わせすることで、カメラ揺れの補正が実現できる。   As one method, pattern matching is performed on the processed image using a plurality of template patterns created from the reference image, a movement vector with a matching area is calculated for each template pattern, and the movement direction is the same or the movement direction and The movement vector (group) having the maximum frequency with the same movement amount is obtained, the camera shake amount is calculated from the movement direction and the movement amount of the movement vector (group), the image is shifted by the camera shake amount, and the reference image and The camera shake can be corrected by aligning the background of the processed image.

前記テンプレートパターンは前記基準画像の領域中に、1つずつ指定しあるいは所定規則に従って自動的に位置決めされた所定面積の矩形領域として設定される。   The template pattern is set as a rectangular area having a predetermined area which is designated one by one in the area of the reference image or is automatically positioned according to a predetermined rule.

また、上記のように設定された複数のテンプレートパターンを候補とし、各々の濃度分散値を求め、濃度の分散値が一定以上となるテンプレートパターンのみをパターンマッチングに使用する。このように、分散値の大きい特徴あるテンプレートパターンを用いることで、パターンマッチングの精度が向上する。また、パターンが基準画像の全体的に多数設定されるとき、特徴のないパターンは捨てられるので処理効率が向上する。   Further, using a plurality of template patterns set as described above as candidates, the density dispersion value of each is obtained, and only the template pattern having a density dispersion value equal to or greater than a certain value is used for pattern matching. In this way, by using a characteristic template pattern having a large variance value, the accuracy of pattern matching is improved. Further, when a large number of patterns are set as a whole of the reference image, the pattern having no features is discarded, so that the processing efficiency is improved.

上記目的は、カメラが撮影した画像のカメラ揺れを補正する画像システムにおいて、前記画像の2フレームの一方を基準画像、他方を処理画像として記憶する画像記憶手段、基準画像からテンプレートパターンを生成するテンプレートパターン作成手段、テンプレートパターンに前記処理画像に対するパターンマッチングを行いカメラ揺れ量を算出し、前記基準画像と前記処理画像の位置合わせを行うカメラ揺れ補正手段を設けたことにより達成される。 The above objects are achieved by a imaging system camera to correct the camera shake of the captured image, while the reference image of two frames of the image, image storage means for storing the other as the processed image, the reference image or Latin plate patterns generating template pattern creating means calculates a camera shake amount performs pattern matching for the processed image to the template pattern, is achieved by providing the camera shake correction means for performing a position alignment of the processed image and the reference image The

さらに、前記位置合わせ後の基準画像と処理画像の差分画像を基に、移動画像の移動距離を含む特徴量を算出し、該特徴量を利用した所定の判定基準に従って特定の移動物体の識別を行なう移動物体識別手段を設けたことを特徴とする。   Further, based on the difference image between the reference image after the alignment and the processed image, a feature amount including a moving distance of the moving image is calculated, and a specific moving object is identified according to a predetermined determination criterion using the feature amount. A moving object identification means is provided.

また、前記差分画像の濃度頻度分布から2値化しきい値を決定し、前記差分画像を2値化処理する2値化処理手段を設け、この2値化画像から前記特徴量を算出することを特徴とする。   Further, a binarization threshold value is determined from the density frequency distribution of the difference image, binarization processing means for binarizing the difference image is provided, and the feature amount is calculated from the binarized image. Features.

また、前記特定の移動物体の位置座標を時系列に蓄積し、該移動物体の現時点の画像と過去の位置座標から移動軌跡を表示する表示処理手段を設けたことを特徴とする。   Further, the present invention is characterized in that there is provided display processing means for accumulating the position coordinates of the specific moving object in time series and displaying a movement locus from the current image of the moving object and the past position coordinates.

本発明によれば、カメラが振動や風で揺れている場合に、その揺れを正確に補正した動画像が得られる。さらに、外乱や対象外の種々の移動体から識別した移動物体の映像をモニタ上でオンラインで見ることができる。 According to the present invention, when the camera is shaken by vibration or wind, a moving image in which the shake is accurately corrected can be obtained. Furthermore, it is possible to view the image of the identified from various mobile outside disturbance or target moving objects on the monitor online.

本発明のカメラ揺れ補正方法によれば、カメラで対象エリアを撮影した入力画像の1フレームを基準画像、次のフレームを処理画像として取り込み、基準画像から作成したテンプレートパターンと処理画像のパターンマッチングを行ってカメラ揺れ量を算出し、基準画像と処理画像の背景の位置合わせを行うので、入力画像に移動体やノイズが存在する場合にもカメラの揺れを正確に検出できる。 According to the camera shake correction method of the present invention, one frame of an input image obtained by photographing a target area with a camera is taken as a reference image and the next frame is taken as a processed image, and pattern matching between the template pattern created from the reference image and the processed image is performed. performed to calculate the camera shake amount, since the positioning of the background of the reference image and the processed image, Ru can accurately detect the camera shake even if the mobile and noise present in the input image.

また、パターンマッチングに使用するテンプレートパターンは、濃度の分散値が一定以上で特徴のあるパターンを用いるので、パターンマッチングの信頼性が高く、かつ、効率処理できる。   Further, since the template pattern used for pattern matching uses a characteristic pattern having a density dispersion value of a certain value or more, the pattern matching is highly reliable and can be processed efficiently.

本発明の画像システムによれば、動画像中における移動物体の移動量を含む特徴量から人物などの対象物体の識別を行う場合に、カメラの揺れによる画像のずれを補正できる画像システムを提供できる
According to the image system of the present invention, it is possible to provide an image system capable of correcting image shift due to camera shake when identifying a target object such as a person from a feature amount including a moving amount of a moving object in a moving image. .

以下、本発明の一実施形態を図面を用いて詳細に説明する。各図を通して、同等の要素には同一の符号を付している。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Equivalent elements are denoted by the same reference numerals throughout the drawings.

図1は、一実施形態による画像監視システムの機能ブロック図である。本システムでは、ITVカメラ100が対象エリアをサンプリングタイミングで撮影した映像を、画像入力部200が順次画像信号として取り込んでA/D変換する。テンプレートパターン作成部400は、取り込んだ1フレームの画像を基準画像として複数のテンプレートパターンを作成し、テンプレートパターン毎の濃度の分散値を求め、分散値が大きいテンプレートパターンを採用する。   FIG. 1 is a functional block diagram of an image monitoring system according to an embodiment. In this system, the image input unit 200 sequentially captures images obtained by capturing the target area at the sampling timing by the ITV camera 100 as image signals and performs A / D conversion. The template pattern creation unit 400 creates a plurality of template patterns using the captured image of one frame as a reference image, obtains a variance value of density for each template pattern, and adopts a template pattern having a large variance value.

カメラ揺れ量算出部600は、次のサンプリングタイミングで、画像入力部200から取り込まれた1フレームの画像を処理画像として、採用したテンプレートパターンによるパターンマッチングを行い、揺れ量を算出する。カメラ揺れ補正部800は、カメラ揺れ量算出部600で求めたカメラ揺れ量だけ処理画像を移動し、この移動画像と基準画像の背景の位置合わせを行なう。   The camera shake amount calculation unit 600 calculates the amount of shake by performing pattern matching using the adopted template pattern using the image of one frame captured from the image input unit 200 as a processed image at the next sampling timing. The camera shake correction unit 800 moves the processed image by the camera shake amount obtained by the camera shake amount calculation unit 600, and aligns the background of the moved image and the reference image.

移動物体抽出部1000は、移動画像と処理画像の差分を行って差分画像を作成し、差分画像の濃度頻度分布を算出して、濃度頻度分布のノイズを除去した濃度情報から算出したしきい値で2値化した2値画像や差分画像から、移動物体領域を抽出して移動物体領域の特徴量を算出する。   The moving object extraction unit 1000 creates a difference image by performing a difference between the moving image and the processed image, calculates a density frequency distribution of the difference image, and calculates a threshold value calculated from density information obtained by removing noise in the density frequency distribution The moving object area is extracted from the binary image or the difference image binarized in step 1, and the feature amount of the moving object area is calculated.

移動物体識別部1200は、移動物体領域の特徴量を用いて外乱を除外し移動物体の判別を行い、監視対象の移動物体の存在を認識すると、画像格納部1500に当該移動物体の画像を格納する。表示制御部1400は、画像格納部1500に格納した移動物体の画像及びその移動軌跡を用いて、表示装置1600に表示する制御を行う。これら画像入力部200、テンプレートパターン作成部400、カメラ揺れ量算出部600、カメラ揺れ補正部800、移動物体抽出部1000、移動物体識別部1200、画像格納部1500、表示制御部1400を順次繰り返して処理し、リアルタイムに表示装置1600に表示し、監視者は識別した目的の物体が写っている映像をモニタ等の表示装置1600でオンライン監視する。   The moving object identification unit 1200 discriminates the moving object by using the feature amount of the moving object region, discriminates the moving object, and stores the image of the moving object in the image storage unit 1500 when recognizing the presence of the moving object to be monitored. To do. The display control unit 1400 performs control to display on the display device 1600 using the image of the moving object stored in the image storage unit 1500 and the movement locus thereof. These image input unit 200, template pattern creation unit 400, camera shake amount calculation unit 600, camera shake correction unit 800, moving object extraction unit 1000, moving object identification unit 1200, image storage unit 1500, and display control unit 1400 are sequentially repeated. The image is displayed on the display device 1600 in real time, and the monitor monitors the video of the identified target object online using the display device 1600 such as a monitor.

図2に、カメラが揺れている動画像から移動物体を検出する概念図を示す。同図(a)のように、カメラ揺れがある場合、基準画像10の建物30に対して処理画像40の建物50がずれている。そこで、カメラ揺れでずれた分、処理画像40を基準画像10に位置合わせした後、共通シーン20の領域の差分を行う。この場合は、移動物体や外乱がないので共通シーン20の領域には何も検出されない。   FIG. 2 is a conceptual diagram for detecting a moving object from a moving image in which the camera is shaking. As shown in FIG. 4A, when the camera shakes, the building 50 of the processed image 40 is shifted from the building 30 of the reference image 10. Therefore, after the processed image 40 is aligned with the reference image 10 by the amount displaced by the camera shake, the difference of the area of the common scene 20 is performed. In this case, nothing is detected in the area of the common scene 20 because there is no moving object or disturbance.

一方、同図(b)のように、カメラ揺れとともにシーンに移動人物がいる場合、カメラ揺れに対しては処理画像40を基準画像10に位置合わせして補正する。しかし、基準画像10の人物70は処理画像40で人物80に移動しているため、基準画像10と処理画像40の差分を行うと、人物70の移動前の画像90と移動後の画像95が正しい移動距離で検出できる。このように、カメラ揺れの影響を排除すると、移動距離などの特徴量を利用して特定の移動物体、たとえば人物を識別できる。   On the other hand, when there is a moving person in the scene with camera shake as shown in FIG. 5B, the processed image 40 is aligned with the reference image 10 and corrected for camera shake. However, since the person 70 in the reference image 10 has moved to the person 80 in the processed image 40, when the difference between the reference image 10 and the processed image 40 is performed, the image 90 before the movement of the person 70 and the image 95 after the movement are obtained. It can be detected with the correct distance. In this way, when the influence of camera shake is eliminated, a specific moving object, for example, a person can be identified using a feature amount such as a moving distance.

図3は、画像入力部の構成を示す機能ブロック図である。ITVカメラ100が対象シーンを撮影すると、一方の画像取り込み部(Fi)220より取り込まれた画像信号を基準画像とし、もう一方の画像取り込み部(Fi+1)240より取り込まれた画像信号を処理画像として、A/D変換部260でA/D変換して、基準画像をテンプレートパターン作成部400に、処理画像をカメラ揺れ算出部600に送信する。   FIG. 3 is a functional block diagram showing the configuration of the image input unit. When the ITV camera 100 captures a target scene, the image signal captured from one image capturing unit (Fi) 220 is used as a reference image, and the image signal captured from the other image capturing unit (Fi + 1) 240 is processed. As an image, A / D conversion is performed by the A / D conversion unit 260, and the reference image is transmitted to the template pattern creation unit 400 and the processed image is transmitted to the camera shake calculation unit 600.

図4は、テンプレートパターン作成部の構成を示す機能ブロック図である。テンプレートパターン作成部400は画像入力部200からの基準画像を取り込み、テンプレートパターン生成部420で複数のテンプレートパターンの候補を生成し、テンプレートパターン決定部440で各候補パターン毎に濃度の分散値を計算して、しきい値以上の分散値を有する候補パターンをテンプレートとして決定し、テンプレートパターン格納部460に格納する。採用するテンプレートパターンは、例えば窓のある事務室等の映像の場合、分散値のしきい値が約35〜40以上である。このように、テンプレートパターンの分散値が小さい個所は、後述のようにずれ位置の探索は行わない。   FIG. 4 is a functional block diagram showing the configuration of the template pattern creation unit. The template pattern creation unit 400 takes in the reference image from the image input unit 200, the template pattern generation unit 420 generates a plurality of template pattern candidates, and the template pattern determination unit 440 calculates the density dispersion value for each candidate pattern. Then, a candidate pattern having a variance value equal to or greater than the threshold value is determined as a template and stored in the template pattern storage unit 460. As the template pattern to be adopted, for example, in the case of an image of an office room with a window, the threshold value of the dispersion value is about 35-40 or more. In this way, the position of the template pattern with a small variance value is not searched for a shift position as will be described later.

図5は、テンプレートパターンの生成方法を示す説明図で、濃淡テンプレートパターンの生成例である。テンプレートパターン生成部420は、画像入力部200からの基準画像に対し、注目点423を与えて注目点423を中心とする矩形をテンプレートパターン425として生成する。注目点423は、マウス等の入力装置でその位置を全て指示したり、基準となる1点の位置を指示し、この点から予め定めた規則的な位置を注目点として、複数の候補パターンを自動生成する。   FIG. 5 is an explanatory diagram showing a template pattern generation method, and is an example of generating a light and dark template pattern. The template pattern generation unit 420 gives the attention point 423 to the reference image from the image input unit 200 and generates a rectangle centered on the attention point 423 as the template pattern 425. The attention point 423 is instructed by using an input device such as a mouse or the position of one reference point. From this point, a plurality of candidate patterns are set with a predetermined regular position as the attention point. Generate automatically.

図6は、テンプレートパターンの別の生成方法を示す説明図である。この例でのテンプレートパターン生成部420は、基準画像上でマウス等により直接指示された矩形427の領域を候補パターンとして生成する。   FIG. 6 is an explanatory diagram showing another method for generating a template pattern. The template pattern generation unit 420 in this example generates a region of a rectangle 427 directly designated by a mouse or the like on the reference image as a candidate pattern.

上記のテンプレートは2値パターンでもよい。2値パターンの場合、テンプレートは、基準画像を所定のしきい値で2値化した2値画像から生成する。あるいは、基準画像のエッジを求めて所定のしきい値で2値化した2値画像から生成してもよい。   The template may be a binary pattern. In the case of a binary pattern, the template is generated from a binary image obtained by binarizing the reference image with a predetermined threshold value. Or you may produce | generate from the binary image which calculated | required the edge of the reference | standard image and binarized with the predetermined threshold value.

図7は、カメラ揺れ算出部の構成を示す機能ブロック図である。カメラ揺れ算出部600は作成されたテンプレートと処理画像を入力し、パターンマッチング領域設定部620で処理画像に対しパターンマッチングを行うパターンマッチングの処理領域を設定する(ウインドウ設定)。パターンマッチング処理領域は必ずしも処理画像全体でなくてよい。例えば、テンプレートパターン領域自身の左右にm画素、上下にn画素拡大したり、任意に指定してもよく、カメラの揺れの幅に合わせて設定すればよい。   FIG. 7 is a functional block diagram illustrating a configuration of the camera shake calculation unit. The camera shake calculation unit 600 inputs the created template and the processed image, and the pattern matching region setting unit 620 sets a pattern matching processing region for performing pattern matching on the processed image (window setting). The pattern matching processing area is not necessarily the entire processed image. For example, the template pattern area itself may be enlarged by m pixels on the left and right, n pixels on the top and bottom, or arbitrarily specified, and may be set in accordance with the width of camera shake.

パターンマッチング部640は、パターンマッチングの処理領域に対するテンプレートパターン毎のパターンマッチングを行い、最も一致したマッチング領域を検出する。テンプレートが濃淡パターンの場合は濃淡パターンマッチング、2値パターンの場合は2値パターンマッチングを行う。カメラ揺れベクトル算出部660は、各パターン毎に移動ベクトルを算出する。   The pattern matching unit 640 performs pattern matching for each template pattern with respect to the pattern matching processing region, and detects the matching region that is the best match. When the template is a light / dark pattern, light / dark pattern matching is performed, and when the template is a binary pattern, binary pattern matching is performed. The camera shake vector calculation unit 660 calculates a movement vector for each pattern.

図8は、カメラ揺れ算出部の処理手順を示すフロー図である。まず、テンプレートパターン領域を含んだパターンマッチング領域を設定する(S650)。次に、設定したパターンマッチング領域内において、テンプレートパターンを1画素ずつシフトしながら最も一致しているマッチング領域をサーチする(S660)。さらに、ステップS660で最も一致しているマッチング領域とテンプレートパターンの位置を比較し、その移動方向と移動量からなる移動ベクトルを算出する(S670)。さらに、設定したテンプレートパターンによるパターンマッチングが全て終了したかチェックし(S680)、終了していない場合はステップS650へ戻り、一連の処理ステップを繰り返す。   FIG. 8 is a flowchart showing the processing procedure of the camera shake calculation unit. First, a pattern matching area including a template pattern area is set (S650). Next, in the set pattern matching area, the matching area that matches most is searched while shifting the template pattern pixel by pixel (S660). Further, the position of the template pattern is compared with the matching region that most matches in step S660, and a movement vector composed of the movement direction and the movement amount is calculated (S670). Furthermore, it is checked whether or not all pattern matching using the set template pattern has been completed (S680). If not completed, the process returns to step S650, and a series of processing steps are repeated.

図9は、カメラ揺れ算出部で算出した移動ベクトルの例を示す説明図である。基準画像上で生成した複数のテンプレートパタン毎に、処理画像に対してパターンマッチングを行って、所定のしきい値以上で類似度が最大のマッチング領域を探索する。   FIG. 9 is an explanatory diagram illustrating an example of the movement vector calculated by the camera shake calculation unit. For each of a plurality of template patterns generated on the reference image, pattern matching is performed on the processed image to search for a matching region having a maximum similarity not less than a predetermined threshold value.

マッチング領域が検知されると、基準画像の代表位置(例えば、矩形左上の位置)915に一致した処理画像の代表位置(例えば、矩形左上の位置)918をずれ位置とする。基準画像の代表位置915をベクトルの始点、見つけた処理画像の代表位置918をベクトルの終点とし、始点と終点を結ぶベクトル910を移動ベクトルとする。同様にして、次のテンプレートパターンに対しても、パターンマッチングを行ってマッチング領域を見つけ、基準画像の代表位置925をベクトルの始点、見つけた処理画像の代表位置928をベクトルの終点とし、始点と終点を結ぶベクトル920を移動ベクトルとする。   When the matching region is detected, the representative position (for example, the upper left position of the rectangle) 918 of the processed image that matches the representative position (for example, the upper left position of the rectangle) 915 of the reference image is set as the shift position. The representative position 915 of the reference image is the starting point of the vector, the representative position 918 of the found processed image is the ending point of the vector, and the vector 910 connecting the starting point and the ending point is the moving vector. Similarly, for the next template pattern, pattern matching is performed to find a matching region, the representative position 925 of the reference image is the start point of the vector, the representative position 928 of the found processed image is the end point of the vector, A vector 920 connecting the end points is set as a movement vector.

図示の移動人物1430が存在する場合、移動人物1430に対応する移動ベクトル692は、人物の移動方向と移動量を示す。しかし、移動人物1430により背景が変化した部分の移動ベクトル694、696、698などは、その移動方向に規則性がない。また、分散値が小さいテンプレートパターンは使用しないので(ずれ位置の探索が行わなれない)、図示のように移動ベクトルが抜けている。   When the illustrated moving person 1430 exists, a moving vector 692 corresponding to the moving person 1430 indicates the moving direction and moving amount of the person. However, the movement vectors 694, 696, 698, etc. of the part whose background has been changed by the moving person 1430 have no regularity in the moving direction. Further, since a template pattern having a small variance value is not used (the shift position is not searched), the movement vector is missing as shown.

図10は、カメラ揺れ補正部の構成を示す機能ブロック図である。カメラ揺れ算出部600で算出した各テンプレート毎の移動ベクトルに対して、対応ベクトル間の距離算出部820で、基準とするベクトル(基準ベクトル)と比較対象のベクトル(対象ベクトル)の始点間の距離と終点間の距離を算出する。また、対応ベクトル間の傾き算出部830で、基準ベクトルの傾きと対象ベクトルの傾きを算出する。   FIG. 10 is a functional block diagram illustrating the configuration of the camera shake correction unit. With respect to the movement vector for each template calculated by the camera shake calculation unit 600, the distance between the corresponding vectors (reference vector) and the comparison vector (target vector) between the start points of the corresponding vector distance calculation unit 820 And the distance between the end points. In addition, the inclination calculation unit 830 between corresponding vectors calculates the inclination of the reference vector and the inclination of the target vector.

さらに、同一ベクトルの頻度分布算出部840で、始点間の距離と終点間の距離が等しく、かつ、基準ベクトルの傾きと対象ベクトルの傾きが等しい場合、両者を同一ベクトルとして頻度分布を算出する。ここでの距離と傾きには、若干の誤差が許容される。例えば、距離及び傾きの差が、±1〜2画素以下では同一としてもよい。   Furthermore, when the distance between the start points and the distance between the end points are equal and the inclination of the reference vector and the inclination of the target vector are equal, the frequency distribution calculation unit 840 of the same vector calculates the frequency distribution using both as the same vector. Some errors are allowed in the distance and inclination here. For example, the difference between the distance and the inclination may be the same for ± 1 to 2 pixels or less.

X方向揺れ量算出部850及びY方向揺れ量算出部860は、頻度分布の最大度数のベクトルの始点と終点から、X軸の揺れ量(移動量)とY軸の揺れ量(移動量)を算出する。   The X-direction swing amount calculation unit 850 and the Y-direction swing amount calculation unit 860 calculate the X-axis swing amount (movement amount) and the Y-axis swing amount (movement amount) from the start point and the end point of the maximum frequency vector of the frequency distribution. calculate.

画像シフト部870は、算出したX方向及びY方向の揺れ量で、処理画像(又は基準画像)をX方向とY方向にシフトする。なお、シフトの対象は上記のパターンマッチングの処理領域でよい。   The image shift unit 870 shifts the processed image (or the reference image) in the X direction and the Y direction with the calculated amount of shaking in the X direction and the Y direction. The shift target may be the pattern matching processing area.

図11は、カメラ揺れ補正部による補正手順を示すフロー図である。まず、i番目の移動ベクトルを基準に、i+1番目〜m番目の移動ベクトルに対し、始点同士及び終点同士の距離を計算し(S825)、また、i番目の移動ベクトルを基準に、i+1番目〜m番目の移動ベクトルに対し、傾きを計算する(S835)。次に、始点同士と終点同士の距離が等しくて傾きが同じ移動ベクトルを同一ベクトルとし(S845)、同一ベクトルの個数をカウントして、ベクトルの頻度分布を算出する(S855)。全ての移動ベクトルの処理が終了したかチェックし(S865)、終了してない場合はステップS825へ戻る。全ベクトルの処理が終了したとき、ベクトルの頻度分布が作成される。   FIG. 11 is a flowchart showing a correction procedure by the camera shake correction unit. First, with respect to the i-th movement vector, the distances between the start points and the end points are calculated for the i + 1-th to m-th movement vectors (S825), and i + 1-th to the i-th movement vector. The inclination is calculated for the m-th movement vector (S835). Next, the movement vectors having the same distance and the same inclination between the start points and the end points are set as the same vector (S845), the number of the same vectors is counted, and the vector frequency distribution is calculated (S855). It is checked whether all the movement vectors have been processed (S865). If not, the process returns to step S825. When all the vectors have been processed, a vector frequency distribution is created.

次に、作成された頻度分布から最大頻度のベクトルを探し(S875)、そのベクトルの始点と終点よりX方向揺れ量とY方向揺れ量を算出する(S880)。最後に、算出した揺れ量だけ、X方向とY方向に処理画像をシフトする(S890)。なお、ステップS875で、最大頻度が全て1以下の場合は、ベクトルの方向がばらばらで規則性がないので、カメラ揺れは発生していないものとみなす。   Next, the maximum frequency vector is searched from the created frequency distribution (S875), and the X-direction fluctuation amount and the Y-direction fluctuation amount are calculated from the start point and end point of the vector (S880). Finally, the processed image is shifted in the X and Y directions by the calculated amount of shaking (S890). In step S875, if the maximum frequencies are all equal to or less than 1, the vector directions are disjoint and there is no regularity, so it is considered that camera shake has not occurred.

図12は、対応ベクトル間の距離と傾きの算出方法を示す説明図である。図9に示した移動ベクトル910及び移動ベクトル920を例に説明する。対応ベクトル間の距離算出部820は、基準ベクトルVkの始点P1(x1,y1)と対象ベクトルVk+1の始点P2(x2,y2)の距離L1を、基準ベクトルVkの終点P1*(x1*,y1*)と、対象ベクトルVk+1の終点P2*(x2*,y2*)の距離L2を、数1により計算する。
(数1)
L1=√((x2−x1)+(y2−y1)2
L2=√((x2*−x1*)2+(y2*−y1*)2
ここで、基準ベクトルVkと対象ベクトルVk+1が同一であるためには、L1=L2を満足すればよい。実際には、|L1−L2|≦1〜2画素を誤差範囲として、同一ベクトルとみなす。
FIG. 12 is an explanatory diagram showing a method for calculating the distance and inclination between corresponding vectors. The movement vector 910 and the movement vector 920 shown in FIG. 9 will be described as an example. Distance calculating section 820 between the corresponding vectors, the distance L1 of the start point of the reference vector V k P1 (x1, y1) and the object vector V k + 1 of the starting point P2 (x2, y2), the reference vector V k endpoint P1 * The distance L2 between (x1 *, y1 *) and the end point P2 * (x2 *, y2 *) of the target vector V k + 1 is calculated by Equation 1.
(Equation 1)
L1 = √ ((x2-x1) + (y2-y1) 2 )
L2 = √ ((x2 * −x1 *) 2 + (y2 * −y1 *) 2 )
Here, in order for the reference vector V k and the target vector V k + 1 to be the same, it is only necessary to satisfy L1 = L2. Actually, | L1−L2 | ≦ 1 to 2 pixels is regarded as an error range and regarded as the same vector.

対応ベクトル間の傾き算出部830は、基準ベクトルVkの傾きM1を始点P1(x1,y1)と終点P1*(x1*,y1*)から、対象ベクトルVk+1の傾きM2を始点P2(x2,y2)と終点P2*(x2*,y2*)から、数2により計算する。
(数2)
M1=(y1*−y1)/(x1*−x1)
M2=(y2*−y2)/(x2*−x2)
ここで、M1=M2を満たす場合に、基準ベクトルVkと対象ベクトルVk+1の傾きが同一である。実際には、M1−M2=±1程度までは同一とみなす。
The slope calculation unit 830 between corresponding vectors sets the slope M1 of the reference vector V k from the start point P1 (x1, y1) and the end point P1 * (x1 *, y1 *), and the slope M2 of the target vector V k + 1 as the start point P2. From (x2, y2) and the end point P2 * (x2 *, y2 *), the calculation is performed by Equation 2.
(Equation 2)
M1 = (y1 * −y1) / (x1 * −x1)
M2 = (y2 * −y2) / (x2 * −x2)
Here, when M1 = M2 is satisfied, the gradients of the reference vector V k and the target vector V k + 1 are the same. Actually, it is regarded as the same up to about M1-M2 = ± 1.

図13は、図9の移動ベクトルの頻度分布を算出したテーブルである。すなわち、移動ベクトル910について、他の移動ベクトル920、692、694…と同一ベクトルか次々と判定し、同一の場合に比較したベクトル番号(たとえば、920)を消去し、移動ベクトル910の度数を更新する。次に、移動ベクトル692、694と同様の手法を繰返して、処理画像中における異なる移動ベクトルとその頻度を集計した頻度分布テーブルが作成される。同図のテーブルにおいて、移動ベクトル910の頻度が最大であり、その始点座標と終点座標からカメラの揺れ量を、数3により決定する。
(数3)
X方向の揺れ量(Δx)=x1*−x1
Y方向の揺れ量(Δy)=y1*−y1
カメラ揺れ補正部800は、上記によるX方向揺れ量ΔxとY方向揺れ量Δyを用いて、画像シフト部870が処理画像の位置をX方向にΔx、Y方向にΔyシフトして、基準画像の背景と位置合わせしてカメラ揺れを補正する。
FIG. 13 is a table in which the frequency distribution of the movement vector in FIG. 9 is calculated. That is, for the movement vector 910, it is determined whether it is the same vector as the other movement vectors 920, 692, 694..., The vector number (for example, 920) compared in the same case is deleted, and the frequency of the movement vector 910 is updated. To do. Next, the same method as the movement vectors 692 and 694 is repeated to create a frequency distribution table in which different movement vectors and their frequencies in the processed image are tabulated. In the table shown in the figure, the frequency of the movement vector 910 is the maximum, and the amount of camera shake is determined by Equation 3 from the start point coordinates and the end point coordinates.
(Equation 3)
X-direction shaking (Δx) = x1 * −x1
Y-direction swing (Δy) = y1 * −y1
The camera shake correction unit 800 uses the X-direction shake amount Δx and the Y-direction shake amount Δy as described above, and the image shift unit 870 shifts the position of the processed image by Δx in the X direction and Δy in the Y direction. Correct camera shake by aligning with the background.

上記の実施形態では、同一ベクトルの頻度算出で、移動ベクトルの移動方向と移動量の両方が一致するものとしたが、カメラ揺れによる画像ずれの規則性から移動方向のみの一致でも可能である。さらに、複数のテンプレートパターンを用いたが、予め、カメラ揺れによるずれ方向の予測ができる場合は、1つのテンプレートパターンによるパターンマッチングの結果からでも、カメラ揺れ量の算出が可能となる。   In the above-described embodiment, it is assumed that both the movement direction and the movement amount of the movement vector match in calculating the frequency of the same vector. However, it is possible to match only the movement direction due to the regularity of image shift caused by camera shake. Further, although a plurality of template patterns are used, when the shift direction due to camera shake can be predicted in advance, the camera shake amount can be calculated even from the result of pattern matching using one template pattern.

図14は、移動物体抽出部の構成を示す機能ブロック図である。移動物体抽出部1000は画像入力部200からの基準画像と、カメラ揺れ補正部800からの補正後の処理画像を取り込んで、差分画像算出部1020で画像間の画素毎の差を算出して差分画像を作成する。次に、濃度頻度分布算出部1040が、差分画像の濃度頻度分布を算出した後、ノイズ除去部1060が濃度頻度分布Hj(j=0,1,...,n)を、数4により平滑化してノイズ除去を行う。nは濃度の最大値である。
(数4)
j=(Hj-1+2Hj+Hj+1)/4−1
0=(2H0+H1)/3−1
n=(2Hn+Hn-1)/3−1
但し、J=1,...,n−1である。
FIG. 14 is a functional block diagram illustrating a configuration of the moving object extraction unit. The moving object extraction unit 1000 captures the reference image from the image input unit 200 and the processed image after correction from the camera shake correction unit 800, and the difference image calculation unit 1020 calculates the difference for each pixel between the images. Create an image. Next, after the density frequency distribution calculation unit 1040 calculates the density frequency distribution of the difference image, the noise removal unit 1060 smoothes the density frequency distribution Hj (j = 0, 1,..., N) according to Equation 4. To remove noise. n is the maximum concentration.
(Equation 4)
H j = (H j-1 + 2H j + H j + 1 ) / 4-1
H 0 = (2H 0 + H 1 ) / 3-1
H n = (2H n + H n-1) / 3-1
However, J = 1,. . . , N-1.

2値化しきい値算出部1070は、ノイズ除去部1060で平滑化した濃度頻度分布から差分画像の2値化しきい値を算出する。2値化処理部1080は、算出された2値化しきい値で2値化処理し差分画像の2値画像を作成し、検知対象に不適当な面積をもつ画素ブロックをノイズとして除外し、膨張・収縮等を行って整形した2値画像を作成する。   A binarization threshold value calculation unit 1070 calculates a binarization threshold value of the difference image from the density frequency distribution smoothed by the noise removal unit 1060. The binarization processing unit 1080 performs binarization processing with the calculated binarization threshold value to create a binary image of the difference image, excludes pixel blocks having an area inappropriate for the detection target as noise, and expands -Create a binary image shaped by shrinking or the like.

特徴量算出部1090は、2値化処理部1080による2値画像から検知対象の特徴量を算出して、監視対象物体の識別に用いる。なお、監視場所が暗く、目標物体が存在しても差分画像を抽出できない場合は、抽出できる明るさに照明する。   The feature amount calculation unit 1090 calculates the feature amount of the detection target from the binary image by the binarization processing unit 1080, and uses it to identify the monitoring target object. In addition, when the monitoring place is dark and the difference image cannot be extracted even if the target object is present, illumination is performed so that the brightness can be extracted.

図15は、2値化しきい値の算出方法を示す説明図である。2値化しきい値算出部1070は、ノイズ除去部1060で平滑化した濃度頻度分布から求めた最大濃度値(max)から、2値化のしきい値thを自動算出する。   FIG. 15 is an explanatory diagram showing a binarization threshold value calculation method. The binarization threshold value calculation unit 1070 automatically calculates the binarization threshold value th from the maximum density value (max) obtained from the density frequency distribution smoothed by the noise removal unit 1060.

差分画像の変化領域が多い場合、平滑化した濃度頻度分布は、(a)に示すようになる。最大濃度値(max)1110から小さい方に濃度を探索すると、少なくとも1個の極大値1120が存在する。この極大値1120を基準に、更に小さい方に濃度を探索すると、最大濃度に最も近い極小値1130が存在する。この極小値1130の濃度値から最大濃度1110までが、変化部分の濃度分布である。従って、極小値1130の濃度値を2値化しきい値thとする。これは、モード法による2値化しきい値の決定方法である。   When there are many change areas of the difference image, the smoothed density frequency distribution is as shown in (a). When the density is searched from the maximum density value (max) 1110 to a smaller value, at least one local maximum value 1120 exists. When the density is searched for on the basis of the maximum value 1120, a minimum value 1130 closest to the maximum density exists. The density value from the minimum value 1130 to the maximum density 1110 is the density distribution of the changed portion. Therefore, the density value of the minimum value 1130 is set as the binarization threshold th. This is a method for determining the binarization threshold value by the mode method.

一方、差分画像の変化領域が少ない場合は、変化部分の濃度の度数が少ないため、(a)のような極大値1120が存在しないで、(b)に示すような濃度頻度分布となる。この場合の2値化しきい値thは、数5により最大濃度(max)1110から定数Cを差し引いた値に設定する。
(数5)
th=max−C
但し、th≧thmin(下限しきい値)である。
On the other hand, when the difference area of the difference image is small, the density frequency distribution is as shown in (b) without the local maximum value 1120 as shown in (a) because the frequency of density of the changed portion is small. In this case, the binarization threshold th is set to a value obtained by subtracting the constant C from the maximum density (max) 1110 according to Equation 5.
(Equation 5)
th = max-C
However, th ≧ thmin (lower threshold).

算出したしきい値thが予め設定したthminより小さくなる場合は、下限しきい値thminとする。定数Cは、対象画像の正常画像から、予め算出した正常状態での白色ノイズの上限しきい値thmaxと下限しきい値thminの差の値とする。又は、対象画像の正常状態におけるノイズの最大変動幅を示す値なら何でもよい。例えば、昼間の屋外環境を監視するシーンならば、上限しきい値thmaxは12〜14階調程度で、下限しきい値thminは4〜5階調程度である。従って、定数Cは7〜10階調程度となる。なお、変化部分の最大値に白色ノイズが加味された場合でも、数4の平滑化処理でノイズ低減されるので、濃度差のわずかな変化に対しても精度よく設定できる。   When the calculated threshold value th is smaller than a preset thmin, the lower limit threshold value thmin is set. The constant C is a value of a difference between the upper limit threshold thmax and the lower limit threshold thmin of white noise in a normal state calculated in advance from the normal image of the target image. Alternatively, any value that indicates the maximum fluctuation range of noise in the normal state of the target image may be used. For example, in a scene where the outdoor environment is monitored in the daytime, the upper limit threshold thmax is about 12 to 14 gradations, and the lower limit threshold thmin is about 4 to 5 gradations. Therefore, the constant C is about 7 to 10 gradations. Even when white noise is added to the maximum value of the changed portion, the noise is reduced by the smoothing process of Equation 4, so that it can be accurately set even for a slight change in density difference.

図16は、2値化処理部の構成を示す機能ブロック図である。2値化処理部1080は、差分画像と2値化しきい値を取り込み、2値化部1082が2値化しきい値で2値画像を作成し、微小面積除去部1084が抽出の対象外となる微小面積の領域をノイズとして除去し、差分画像の変化領域の2値画像を作成する。   FIG. 16 is a functional block diagram showing the configuration of the binarization processing unit. The binarization processing unit 1080 takes in the difference image and the binarization threshold value, the binarization unit 1082 creates a binary image with the binarization threshold value, and the minute area removal unit 1084 is excluded from extraction. A region with a small area is removed as noise, and a binary image of a change region of the difference image is created.

2値化処理部1080が変化領域として2値化するのは、例えば抽出対象が人物の場合、カメラの視野範囲に対応して人物としての適当な面積をもっている領域である。それ以下の領域はノイズである。   For example, when the extraction target is a person, the binarization processing unit 1080 binarizes the area having an appropriate area as a person corresponding to the visual field range of the camera. The area below that is noise.

変化領域の2値画像は抽出対象物体が分離している場合が多く、画像補正部1086がこれら分離領域を膨張して連結した後、収縮して2値画像を補正する。画像補正部1086の膨張回数と収縮回数は同一回数で、例えば、人物の抽出の例では2〜3回程度である。   In many cases, the binary image of the change area is separated from the object to be extracted, and the image correction unit 1086 expands and connects these separation areas and then contracts to correct the binary image. The number of times of expansion and contraction of the image correction unit 1086 is the same, for example, about 2 to 3 in the example of person extraction.

図17は、特徴量算出部の構成を示す機能ブロック図である。本例の特徴量算出部1090は2値画像から、以下の特徴量を算出する。即ち、面積算出部1094で算出した面積、縦横比算出部1095で算出した縦横比、移動距離算出部1096で算出した移動距離であり、これらを、画像入力のタイミングiの度に、時系列に算出する。   FIG. 17 is a functional block diagram illustrating a configuration of the feature amount calculation unit. The feature amount calculation unit 1090 of this example calculates the following feature amounts from the binary image. That is, the area calculated by the area calculating unit 1094, the aspect ratio calculated by the aspect ratio calculating unit 1095, and the moving distance calculated by the moving distance calculating unit 1096, and these are time-sequentially at every image input timing i. calculate.

面積算出部1094は、2値画像の画素数を計算して面積を算出する。縦横比算出部1095は、2値画像をX方向に投影してX軸の位置毎の画素数を累積したX投影分布と、Y方向に投影してY軸の位置毎の画素数を累積したY投影分布の割合を縦横比として算出する。移動距離算出部1096は、2値画像のうち、最大面積を有する領域の重心を用いて、i−1回目とi回目の重心間の長さをi回目の距離として算出する。但し、i=1回目の移動距離は0とする。   The area calculation unit 1094 calculates the area by calculating the number of pixels of the binary image. The aspect ratio calculation unit 1095 projects a binary image in the X direction and accumulates the number of pixels for each position of the X axis, and projects in the Y direction and accumulates the number of pixels for each position of the Y axis. The ratio of the Y projection distribution is calculated as the aspect ratio. The movement distance calculation unit 1096 calculates, as the i-th distance, the length between the (i−1) th and i-th centroids using the centroid of the region having the largest area in the binary image. However, i = 1 is the first moving distance.

図18は、本実施形態における検出対象と特徴量の関係を説明するテーブルである。ここでの検出対象は移動物体で、人物、小動物、車両である。特徴量は面積、縦横比、移動距離を用いる。検出対象が人物の場合、人物の特徴として、移動距離が小さく面積が中くらいで、形状が縦に長い。例えば、昼間の屋外シーンで目視で明らかに確認できる人物を検出する場合は、移動距離のしきい値を約20〜30画素、縦横比を約3:1とすればよい。   FIG. 18 is a table for explaining the relationship between the detection target and the feature amount in the present embodiment. The detection target here is a moving object, which is a person, a small animal, or a vehicle. The feature amount uses an area, an aspect ratio, and a moving distance. When the detection target is a person, the characteristics of the person are that the moving distance is small, the area is medium, and the shape is vertically long. For example, when detecting a person who can be visually confirmed in an outdoor scene in the daytime, the threshold value of the moving distance may be about 20 to 30 pixels and the aspect ratio may be about 3: 1.

検出対象が小動物の場合、小動物の特徴として移動距離が中程度で面積が小さくかつ、形状が横長もしくは縦横比が1程度である。検出対象が車両の場合、車両の特徴として、移動距離と面積がともに大きくかつ、形状が横長の場合や縦横比が1程度である。   When the detection target is a small animal, the movement distance is medium, the area is small, and the shape is horizontally long or the aspect ratio is approximately 1 as a feature of the small animal. When the detection target is a vehicle, as a feature of the vehicle, both the moving distance and the area are large, the shape is horizontally long, and the aspect ratio is about 1.

移動物体識別部1200は、移動距離算出部1096で求めた移動距離、面積算出部1094で求めた面積、縦横比算出部1095で求めた縦横比を用いて、検出対象とする人物、小動物または車両を識別して検出する。目的の検出対象が識別されると、その画像を表示制御部1400に渡し、その重心などの所定位置の座標を画像格納部1500に時系列に蓄積する。   The moving object identification unit 1200 uses the movement distance obtained by the movement distance calculation unit 1096, the area obtained by the area calculation unit 1094, and the aspect ratio obtained by the aspect ratio calculation unit 1095 to detect a person, a small animal, or a vehicle to be detected. Identify and detect. When the target detection target is identified, the image is transferred to the display control unit 1400, and the coordinates of a predetermined position such as the center of gravity are accumulated in the image storage unit 1500 in time series.

図19は、移動物体識別部の処理手順を示すフロー図である。まず、面積をチェックし(S1300)、面積が中程度の場合、X投影分布とY投影分布を用いて形状が縦長か否かチェックする(S1310)。形状が縦長の場合、移動距離をチェックし(S1315)、移動距離が小ならば人物と判定する(S1320)。ステップS1310で形状が縦長でない場合やステップS1315で移動距離が小さくない場合は、ともに外乱と判定する(S1330)。   FIG. 19 is a flowchart showing the processing procedure of the moving object identification unit. First, the area is checked (S1300). If the area is medium, it is checked whether the shape is vertically long using the X projection distribution and the Y projection distribution (S1310). If the shape is vertically long, the moving distance is checked (S1315), and if the moving distance is small, it is determined as a person (S1320). If the shape is not vertically long in step S1310 or if the moving distance is not small in step S1315, both are determined to be disturbances (S1330).

次に、ステップS1300で面積が小さいと判定した場合、形状をチェックし(S1340)、形状が横長又は縦横比が同程度の場合、移動距離をチェックし(S1350)、移動距離が中程度ならば小動物と判定する(S1360)。ステップS1340で形状が縦長な場合やステップS1350で中程度でない場合は、外乱と判定する(S1370)。   Next, if it is determined in step S1300 that the area is small, the shape is checked (S1340). If the shape is horizontally long or the aspect ratio is the same, the moving distance is checked (S1350). If the moving distance is medium Determined as a small animal (S1360). If the shape is vertically long in step S1340 or not moderate in step S1350, it is determined as a disturbance (S1370).

ステップS1300で面積が大きいと判定した場合、移動距離をチェックし(S1380)、移動距離がい大きい場合、形状判定を行い(S1390)、形状が横長又は縦横比が同程度の場合、車両と判定する(S1395)。ステップS1380で移動距離が大きくない場合やステップS1390で形状が縦長な場合は、外乱と判定する(S1370)。   If it is determined in step S1300 that the area is large, the moving distance is checked (S1380). If the moving distance is large, the shape is determined (S1390). If the shape is horizontally long or the aspect ratio is the same, the vehicle is determined. (S1395). If the moving distance is not large in step S1380 or the shape is vertically long in step S1390, it is determined as a disturbance (S1370).

図20は、識別された人物の移動軌跡の表示図である。表示制御部1400は、移動物体識別部1200から検出対象の移動物体、例えば人物の識別通知とその画像データを受信すると、その画像と移動軌跡を表示装置1600にオンライン表示する。   FIG. 20 is a display diagram of the movement trajectory of the identified person. When the display control unit 1400 receives a moving object to be detected, for example, a person identification notification and its image data from the moving object identification unit 1200, the display control unit 1400 displays the image and the movement locus on the display device 1600 online.

即ち、移動物体識別部1200が、i−1回目、i回目、i+1回目等毎に時系列で識別した人物のi+1回目の画像1430を表示し、更に、i−1回目とi回目の移動軌跡1450、i回目とi+1回目の移動軌跡1460を表示する。これにより、監視者は、人物およびその移動状態を画面上で監視できる。   That is, the moving object identification unit 1200 displays the i + 1th image 1430 of the person identified in time series every i−1th, ith, i + 1th, etc., and the i−1th and ith movement trajectory. 1450, i-th and i + 1-th movement trajectory 1460 is displayed. Thereby, the monitoring person can monitor a person and its movement state on a screen.

本発明の一実施形態による画像監視システムの構成を示す機能ブロック図。The functional block diagram which shows the structure of the image monitoring system by one Embodiment of this invention. カメラが揺れている状態において移動物体を検知する原理説明図。Explanatory drawing which detects a moving object in the state where the camera is shaking. 画像入力部の構成を示す機能ブロック図。The functional block diagram which shows the structure of an image input part. テンプレートパターン作成部の構成を示す機能ブロック図。The functional block diagram which shows the structure of a template pattern creation part. テンプレートパターンの生成方法を示す説明図。Explanatory drawing which shows the production | generation method of a template pattern. テンプレートパターンの別の生成方法を示す説明図。Explanatory drawing which shows another production | generation method of a template pattern. カメラ揺れ算出部の構成を示す機能ブロック図。The functional block diagram which shows the structure of a camera shake calculation part. 移動ベクトル算出の処理手順を示すフロー図。The flowchart which shows the process sequence of movement vector calculation. 1フレームの画像の移動ベクトルの算出例を示す説明図。Explanatory drawing which shows the example of calculation of the movement vector of the image of 1 frame. カメラ揺れ補正部の構成を示す機能ブロック図。The functional block diagram which shows the structure of a camera shake correction part. カメラ揺れ補正の処理手順を示すフロー図。The flowchart which shows the process sequence of camera shake correction. 対応ベクトル間の距離と傾きの算出方法を示す説明図。Explanatory drawing which shows the calculation method of the distance between corresponding | compatible vectors and inclination. 移動ベクトルの頻度分布の一例を示すテーブル。The table which shows an example of the frequency distribution of a movement vector. 移動物体抽出部の構成を示す機能ブロック図。The functional block diagram which shows the structure of a moving object extraction part. 2値化しきい値の算出方法を示す説明図。Explanatory drawing which shows the calculation method of a binarization threshold value. 2値化処理部の構成を示す機能ブロック図。The functional block diagram which shows the structure of a binarization process part. 特徴量算出部の構成を示す機能ブロック図。The functional block diagram which shows the structure of a feature-value calculation part. 検出対象とその特徴を説明するテーブル。A table explaining the detection target and its characteristics. 移動物体識別部の識別手順を示すフロー図。The flowchart which shows the identification procedure of a moving object identification part. 移動人物の識別結果を示す表示図。The display figure which shows the identification result of a moving person.

符号の説明Explanation of symbols

100…ITVカメラ、200…画像入力部、400…テンプレートパターン作成部、420…テンプレートパターン生成部、440…テンプレートパターン決定部、600…カメラ揺れ算出部、640…パターンマッチング部、660…カメラ揺れベクトル算出部、800…カメラ揺れ補正部、820…対応ベクトル間の距離算出部、830…対応ベクトル間の傾き算出部、840…同一ベクトルの頻度分布算出部、850…X方向揺れ量算出部、860…Y方向揺れ量算出部、870…画像シフト部、1000…移動物体抽出部、1020…差分画像算出部、1040…濃度頻度分布算出部、1060…ノイズ除去部、1070…2値化しきい値算出部、1080…2値化処理部、1090…特徴量算出部、1200…移動物体識別部、1400…表示制御部、1500…画像格納部、1600…表示装置。   100 ... ITV camera, 200 ... Image input unit, 400 ... Template pattern creation unit, 420 ... Template pattern generation unit, 440 ... Template pattern determination unit, 600 ... Camera shake calculation unit, 640 ... Pattern matching unit, 660 ... Camera shake vector Calculation unit, 800 ... camera shake correction unit, 820 ... distance calculation unit between corresponding vectors, 830 ... inclination calculation unit between corresponding vectors, 840 ... frequency distribution calculation unit of the same vector, 850 ... X-direction shake amount calculation unit, 860 ... Y-direction fluctuation amount calculation unit, 870 ... image shift unit, 1000 ... moving object extraction unit, 1020 ... difference image calculation unit, 1040 ... density frequency distribution calculation unit, 1060 ... noise removal unit, 1070 ... binary threshold calculation , 1080 ... binarization processing unit, 1090 ... feature amount calculation unit, 1200 ... moving object identification unit, 1400 ... display control unit, 1500 ... image storage unit, 1600 ... display device.

Claims (4)

カメラが撮影した画像のカメラ揺れを補正する方法において、
前記画像の2フレームの一方を基準画像、他方を処理画像とし、前記基準画像から作成した複数のテンプレートパターンを用いて前記処理画像のパターンマッチングを行い、前記テンプレートパターン毎にマッチング領域との移動ベクトルを算出し、移動方向が同一または移動方向及び移動量が同一となる頻度が最大の移動ベクトル(群)を求め、該移動ベクトル(群)の移動方向と移動量からカメラ揺れ量を算出し、前記カメラ揺れ量だけ画像シフトして前記基準画像と前記処理画像の位置合わせを行うことを特徴とするカメラ揺れ補正方法。
In the method of correcting camera shake of images taken by the camera,
Using one of the two frames of the image as a reference image and the other as a processed image, pattern matching of the processed image is performed using a plurality of template patterns created from the reference image, and a movement vector with a matching region for each template pattern Calculating a movement vector (group) having the same frequency of movement or having the same movement direction and movement amount, calculating a camera shake amount from the movement direction and movement amount of the movement vector (group), A camera shake correction method, wherein the image is shifted by the camera shake amount to align the reference image and the processed image.
カメラにより撮影した画像から、移動量などの特徴量を利用して移動物体を識別する画像システムのカメラ揺れ補正方法において、
前記画像の2フレームの一方を基準画像、他方を処理画像とし、前記基準画像から作成した複数のテンプレートパターンを用いて前記処理画像のパターンマッチングを行い、前記テンプレートパターン毎にマッチング領域との移動ベクトルを算出し、移動方向及び移動量が同一となる頻度最大の移動ベクトル(群)を求め、該移動ベクトル(群)の移動方向と移動量からカメラ揺れ量を算出し、前記特徴量を算出する前記基準画像と前記処理画像を前記カメラ揺れ量に応じて位置合わせすることを特徴とするカメラ揺れ補正方法。
In a camera shake correction method of an image system for identifying a moving object from an image taken by a camera using a feature amount such as a movement amount,
Using one of the two frames of the image as a reference image and the other as a processed image, pattern matching of the processed image is performed using a plurality of template patterns created from the reference image, and a movement vector with a matching region for each template pattern Is calculated, a movement vector (group) having the maximum frequency in which the movement direction and the movement amount are the same is obtained, a camera shake amount is calculated from the movement direction and movement amount of the movement vector (group), and the feature amount is calculated. A camera shake correction method comprising aligning the reference image and the processed image in accordance with the camera shake amount.
カメラが撮影した画像のカメラ揺れを補正する画像システムにおいて、
前記画像の2フレームの一方を基準画像、他方を処理画像として記憶する画像記憶手段前記基準画像から複数のテンプレートパターンを生成するテンプレートパターン作成手段前記テンプレートパターンにより前記処理画像に対するパターンマッチングを行い、前記テンプレートパターン毎にマッチング領域との移動ベクトルを算出し、移動方向が同一または移動方向及び移動量が同一となる頻度が最大の移動ベクトル(群)を求め、該移動ベクトル(群)の移動方向と移動量からカメラ揺れ量を算出し、前記カメラ揺れ量だけ画像シフトして前記基準画像と前記処理画像の位置合わせを行うカメラ揺れ補正手段と、を設けたことを特徴とする画像システム。
In an image system that corrects camera shake in images taken by the camera,
While the reference image of two frames of the image, the pattern image storing means for storing as the other processed images, and the template pattern generating means for generating a plurality of template pattern from the reference image, for a more said processed image to said template pattern Matching is performed, a movement vector with the matching area is calculated for each template pattern, a movement vector (group) having the same movement direction or a movement frequency and the same amount of movement is obtained, and the movement vector (group) is obtained. ) to calculate the camera shake amount from the moving direction and the moving amount, characterized in that in the image shifted by said camera shake amount provided, and the camera shake correction means for aligning the processed image and the reference image Imaging system.
請求項3において、
前記位置合わせ後の基準画像と処理画像の差分画像を基に、移動画像の移動距離を含む特徴量を算出し、該特徴量を利用した所定の判定基準に従って特定の移動物体の識別を行なう移動物体識別手段を設けたことを特徴とする画像システム。
In claim 3,
Based on the difference image between the reference image after alignment and the processed image, a feature amount including a moving distance of the moving image is calculated, and a specific moving object is identified according to a predetermined determination criterion using the feature amount. An image system comprising an object identification unit.
JP2005349061A 2005-12-02 2005-12-02 Camera shake correction method and image system Expired - Lifetime JP4040651B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005349061A JP4040651B2 (en) 2005-12-02 2005-12-02 Camera shake correction method and image system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005349061A JP4040651B2 (en) 2005-12-02 2005-12-02 Camera shake correction method and image system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP17771796A Division JP3776514B2 (en) 1996-07-08 1996-07-08 Camera shake correction method and image monitoring system

Publications (2)

Publication Number Publication Date
JP2006094560A JP2006094560A (en) 2006-04-06
JP4040651B2 true JP4040651B2 (en) 2008-01-30

Family

ID=36234983

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005349061A Expired - Lifetime JP4040651B2 (en) 2005-12-02 2005-12-02 Camera shake correction method and image system

Country Status (1)

Country Link
JP (1) JP4040651B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9191589B2 (en) 2011-12-09 2015-11-17 Hitachi Kokusai Electric Inc. Image processing device

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4962230B2 (en) * 2007-09-07 2012-06-27 株式会社明電舎 Intruder detection device
JP5062626B2 (en) * 2007-10-23 2012-10-31 学校法人玉川学園 Object identification device
JP2009267466A (en) * 2008-04-22 2009-11-12 Mega Chips Corp Monitoring camera with moving body detection function
KR100895385B1 (en) 2008-10-29 2009-04-30 (주)유디피 Image stabilization method and image stabilization apparatus performing the method
KR20110123744A (en) * 2009-01-28 2011-11-15 배 시스템즈 피엘시 Detection of potentially changed objects in the image
US9147260B2 (en) * 2010-12-20 2015-09-29 International Business Machines Corporation Detection and tracking of moving objects
JP5816459B2 (en) * 2011-05-16 2015-11-18 Hoya株式会社 Electronic endoscope system, operation method of electronic endoscope system, and software
JP5782871B2 (en) * 2011-07-05 2015-09-24 株式会社リコー Image difference detection apparatus and image difference detection program
KR101657524B1 (en) 2012-01-11 2016-09-19 한화테크윈 주식회사 Apparatus for adjusting image, method thereof and image stabilization apparatus having the apparatus
JP6289027B2 (en) * 2013-10-24 2018-03-07 日本放送協会 Person detection device and program
JP6995013B2 (en) * 2018-05-15 2022-01-14 国際航業株式会社 Monitoring system
CN111832538A (en) * 2020-07-28 2020-10-27 北京小米松果电子有限公司 Video processing method and device, and storage medium
WO2024202506A1 (en) * 2023-03-31 2024-10-03 パナソニックIpマネジメント株式会社 Image processing method and image processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9191589B2 (en) 2011-12-09 2015-11-17 Hitachi Kokusai Electric Inc. Image processing device

Also Published As

Publication number Publication date
JP2006094560A (en) 2006-04-06

Similar Documents

Publication Publication Date Title
JP4040651B2 (en) Camera shake correction method and image system
JP3776514B2 (en) Camera shake correction method and image monitoring system
JP5241782B2 (en) Surveillance camera system having a camera abnormality detection device
JP4541316B2 (en) Video surveillance search system
JP3279479B2 (en) Video monitoring method and device
KR101071352B1 (en) Apparatus and method for tracking object based on PTZ camera using coordinate map
US8842162B2 (en) Method and system for improving surveillance of PTZ cameras
JPH07168932A (en) Method for search of human being in video image
JP4874150B2 (en) Moving object tracking device
WO1995004329A1 (en) Device and method for detecting image matching
JP4969291B2 (en) Moving object tracking device
US20250078316A1 (en) Method for updating position of area, security system, and computer-readable storage medium
JP2008259161A (en) Target tracing device
JP2007188294A (en) Method for detecting moving object candidate by image processing, moving object detecting method for detecting moving object from moving object candidate, moving object detecting apparatus, and moving object detecting program
JP4578864B2 (en) Automatic tracking device and automatic tracking method
WO2010113417A1 (en) Moving object tracking device, moving object tracking method, and moving object tracking program
WO2016031573A1 (en) Image-processing device, image-processing method, program, and recording medium
JP2018041406A (en) Water surface boundary detection device, water surface boundary detection method and computer program
CN107958202B (en) Human body detection apparatus, control method of human body detection apparatus, and storage medium
KR102128319B1 (en) Method and Apparatus for Playing Video by Using Pan-Tilt-Zoom Camera
WO2020095644A1 (en) State-change detection device, state-change detection method, and computer-readable recording medium
JP6073474B2 (en) Position detection device
JP2010124028A (en) Monitoring apparatus
US9842260B2 (en) Image processing apparatus and image processing method of performing image segmentation
JP2004222200A (en) Intruding object detection method and intruding object detection device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051227

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070821

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071012

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20071106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071107

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

Free format text: PAYMENT UNTIL: 20101116

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101116

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20101116

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20101116

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121116

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121116

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131116

Year of fee payment: 6

EXPY Cancellation because of completion of term